JohannesC

30 Reputation

4 Badges

4 years, 310 days

MaplePrimes Activity


These are replies submitted by JohannesC

@ecterrab 

Thank you for your reply! 

a) The solution I am expecting is (written in index notation with i,j = 1,2,3 ) $f__1 = f__1 (a_{ii},a_{ij},a_{ij}, a_{ij} a_{jk}, a_{ki},x,y,z)$. Note that the trial solution f__1(x,y,z) should also hold. That is why I'm so confused by the empty set as a solution.

b) I've got the invariance condition through calculations "by hand". In matrix notation th

The solution in terms of the invariants is rather trivial. My aim is to extend these equations later once I've got the correct results for this problem.

Best regards!

> 

NULL

> 

restart

> 

with(PDETools)

> 

assume(r >= 0)

> 

interface(showassumed = 0)

Matrix Roation Generator

 
> 

with(LinearAlgebra)

> 

A := Matrix([[a__11, a__12, a__13], [a__21, a__22, a__23], [a__31, a__32, a__33]])

Matrix(%id = 36893490808319086588)

(1.1)
> 

R__z := Matrix([[0, -1, 0], [1, 0, 0], [0, 0, 0]])

Matrix(%id = 36893490808319091764)

(1.2)
> 

R__zGen := Multiply(R__z, A)+Multiply(A, Transpose(R__z))

Matrix(%id = 36893490808319097780)

(1.3)
> 

NULL

> 

R__y := Matrix([[0, 0, -1], [0, 0, 0], [1, 0, 0]])

Matrix(%id = 36893490808319103212)

(1.4)
> 

R__yGen := Multiply(R__y, A)+Multiply(A, Transpose(R__y))

Matrix(%id = 36893490808319109228)

(1.5)
> 

NULL

> 

R__x := Matrix([[0, 0, 0], [0, 0, -1], [0, 1, 0]])

Matrix(%id = 36893490808319114284)

(1.6)
> 

R__xGen := Multiply(R__x, A)+Multiply(A, Transpose(R__x))

Matrix(%id = 36893490808319120316)

(1.7)
> 

NULL

> 

NULL

> 

NULL

Invariance Condition Statistics

 
> 

Transform := {u = cos(theta)*sin(phi)*u__r-sin(theta)*u__theta+cos(theta)*cos(phi)*u__phi, v = sin(theta)*sin(phi)*u__r+cos(theta)*u__theta+sin(theta)*cos(phi)*u__phi, w = cos(phi)*u__r-sin(phi)*u__phi, x = r*cos(theta)*sin(phi), y = r*sin(theta)*sin(phi), z = r*cos(phi)}

{u = cos(theta)*sin(phi)*u__r-sin(theta)*u__theta+cos(theta)*cos(phi)*u__phi, v = sin(theta)*sin(phi)*u__r+cos(theta)*u__theta+sin(theta)*cos(phi)*u__phi, w = cos(phi)*u__r-sin(phi)*u__phi, x = r*cos(theta)*sin(phi), y = r*sin(theta)*sin(phi), z = r*cos(phi)}

(2.1)
> 

NewVars := [r, theta, phi, a__rr, `a__r phi`, `a__r theta`, `a__phi r`, `a__phi phi`, `a__phi theta`, `a__theta r`, `a__theta phi`, `a__theta theta`]

[r, theta, phi, a__rr, `a__r phi`, `a__r theta`, `a__phi r`, `a__phi phi`, `a__phi theta`, `a__theta r`, `a__theta phi`, `a__theta theta`]

(2.2)
> 

f := f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33)

f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33)

(2.3)
> 

G := R__zGen

> 

X_z2 := G(1, 1)*(diff(f, A(1, 1)))+G(1, 2)*(diff(f, A(1, 2)))+G(1, 3)*(diff(f, A(1, 3)))+G(2, 1)*(diff(f, A(2, 1)))+G(2, 2)*(diff(f, A(2, 2)))+G(2, 3)*(diff(f, A(2, 3)))+G(3, 1)*(diff(f, A(3, 1)))+G(3, 2)*(diff(f, A(3, 2)))+G(3, 3)*(diff(f, A(3, 3))) = 0

(-a__21-a__12)*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__11))+(a__11-a__22)*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__12))-a__23*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__13))+(a__11-a__22)*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__21))+(a__12+a__21)*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__22))+a__13*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__23))-a__32*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__31))+a__31*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__32)) = 0

(2.4)
> 

G := R__yGen

> 

X_y2 := G(1, 1)*(diff(f, A(1, 1)))+G(1, 2)*(diff(f, A(1, 2)))+G(1, 3)*(diff(f, A(1, 3)))+G(2, 1)*(diff(f, A(2, 1)))+G(2, 2)*(diff(f, A(2, 2)))+G(2, 3)*(diff(f, A(2, 3)))+G(3, 1)*(diff(f, A(3, 1)))+G(3, 2)*(diff(f, A(3, 2)))+G(3, 3)*(diff(f, A(3, 3))) = 0

(-a__31-a__13)*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__11))-a__32*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__12))+(a__11-a__33)*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__13))-a__23*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__21))+a__21*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__23))+(a__11-a__33)*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__31))+a__12*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__32))+(a__13+a__31)*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__33)) = 0

(2.5)
> 

G := R__xGen

> 

X_x2 := G(1, 1)*(diff(f, A(1, 1)))+G(1, 2)*(diff(f, A(1, 2)))+G(1, 3)*(diff(f, A(1, 3)))+G(2, 1)*(diff(f, A(2, 1)))+G(2, 2)*(diff(f, A(2, 2)))+G(2, 3)*(diff(f, A(2, 3)))+G(3, 1)*(diff(f, A(3, 1)))+G(3, 2)*(diff(f, A(3, 2)))+G(3, 3)*(diff(f, A(3, 3))) = 0

-a__13*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__12))+a__12*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__13))-a__31*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__21))+(-a__32-a__23)*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__22))+(a__22-a__33)*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__23))+a__21*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__31))+(a__22-a__33)*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__32))+(a__23+a__32)*(diff(f_1(x, y, z, a__11, a__12, a__13, a__21, a__22, a__23, a__31, a__32, a__33), a__33)) = 0

(2.6)
> 

sys := [X_z2, X_y2, X_x2]

> 

sol := pdsolve(sys)

(1)
> 

NULL

Download SO(3)_spherical_3.mw

ese are 

@dharr Thank you very much! Everything seems to work now :)

@dharr Thank you very much! I had tried simplify before, but it seems like it does not work in the context of the DG package. Maybe there are some settings that interfere with the command? Or I'm doing something stupid :)

 

P.S. I noticed I deleted a line from my code that I didn't mean to. The following should work (Except for expanding the derivative, obviously)

 


 

> 

NULL

> 

restart

> 

with(DifferentialGeometry); with(Tensor); with(Tools); Preferences("ShowFramePrompt", false); with(VectorCalculus); BasisFormat(false)
``

> 

DGsetup([r, theta, phi], M)

`frame name: M`

(1)

Defining the Metric Tensor and Calculating the Connection Coefficients

 
> 

g := evalDG(`&t`(dr, dr)+r^2*sin(phi)^2*`&t`(dtheta, dtheta)+r^2*`&t`(dphi, dphi))

_DG([["tensor", M, [["cov_bas", "cov_bas"], []]], [[[1, 1], 1], [[2, 2], r^2*sin(phi)^2], [[3, 3], r^2]]])

(1.1)
> 

g_inv := InverseMetric(g)

_DG([["tensor", M, [["con_bas", "con_bas"], []]], [[[1, 1], 1], [[2, 2], 1/(r^2*sin(phi)^2)], [[3, 3], 1/r^2]]])

(1.2)
> 

C := Christoffel(g)

> 

DGinfo(C, "ObjectComponents")

[[[1, 2, 2], -r*sin(phi)^2], [[1, 3, 3], -r], [[2, 1, 2], 1/r], [[2, 2, 1], 1/r], [[2, 2, 3], cos(phi)/sin(phi)], [[2, 3, 2], cos(phi)/sin(phi)], [[3, 1, 3], 1/r], [[3, 2, 2], -sin(phi)*cos(phi)], [[3, 3, 1], 1/r]]

(1.3)

Defining the PDF as a Tensor (Metric) Density

 
> 

f := f__1(r, theta, phi)

f__1(r, theta, phi)

(2.1)
> 

rho := MetricDensity(g, -1)

_DG([["tensor", M, [[], [["bas", -1]]]], [[[], 1/(r^4*sin(phi)^2)^(1/2)]]])

(2.2)
> 

Tools:-DGinfo(rho, "TensorDensityType")

[["bas", -1]]

(2.3)

Convective Operator

 
> 

v := evalDG(D_phi*v__phi+D_r*v__r+D_theta*v__theta)

_DG([["vector", M, []], [[[1], v__r], [[2], v__theta], [[3], v__phi]]])

(3.1)
> 

CONV := CovariantDerivative(v*f, C)

> 

CONV_1 := simplify(ContractIndices(CONV, [[1, 2]]))

> 

CONV_2 := expand(subs(f__1(r, theta, phi) = f__2(r, theta, phi)*rho, CONV_1))

2*f__2(r, theta, phi)*_DG([["tensor", M, [[], [["bas", -1]]]], [[[], 1/(r^4*sin(phi)^2)^(1/2)]]])*v__r/r+v__phi*(diff(f__2(r, theta, phi), phi))*_DG([["tensor", M, [[], [["bas", -1]]]], [[[], 1/(r^4*sin(phi)^2)^(1/2)]]])+v__phi*f__2(r, theta, phi)*(diff(_DG([["tensor", M, [[], [["bas", -1]]]], [[[], 1/(r^4*sin(phi)^2)^(1/2)]]]), phi))+cos(phi)*f__2(r, theta, phi)*_DG([["tensor", M, [[], [["bas", -1]]]], [[[], 1/(r^4*sin(phi)^2)^(1/2)]]])*v__phi/sin(phi)+(diff(f__2(r, theta, phi), theta))*_DG([["tensor", M, [[], [["bas", -1]]]], [[[], 1/(r^4*sin(phi)^2)^(1/2)]]])*v__theta+v__r*(diff(f__2(r, theta, phi), r))*_DG([["tensor", M, [[], [["bas", -1]]]], [[[], 1/(r^4*sin(phi)^2)^(1/2)]]])+v__r*f__2(r, theta, phi)*(diff(_DG([["tensor", M, [[], [["bas", -1]]]], [[[], 1/(r^4*sin(phi)^2)^(1/2)]]]), r))

(3.2)
> 

CONV_2 := simplify(CONV_2)

(v__phi*f__2(r, theta, phi)*(diff(_DG([["tensor", M, [[], [["bas", -1]]]], [[[], 1/(r^4*sin(phi)^2)^(1/2)]]]), phi))*sin(phi)*r+v__r*f__2(r, theta, phi)*(diff(_DG([["tensor", M, [[], [["bas", -1]]]], [[[], 1/(r^4*sin(phi)^2)^(1/2)]]]), r))*sin(phi)*r+_DG([["tensor", M, [[], [["bas", -1]]]], [[[], 1/(r^4*sin(phi)^2)^(1/2)]]])*(r*v__theta*sin(phi)*(diff(f__2(r, theta, phi), theta))+r*v__phi*sin(phi)*(diff(f__2(r, theta, phi), phi))+r*v__r*sin(phi)*(diff(f__2(r, theta, phi), r))+f__2(r, theta, phi)*(r*v__phi*cos(phi)+2*v__r*sin(phi))))/(sin(phi)*r)

(2)
> 

NULL


 

Download Tensor_Calc_simplified.mw

 

@ecterrab Thank you very much! I will check out the Physics package.

@tomleslie @Carl Love

Thank you very much!

I didn't catch that. What a stupid mistake :)

Page 1 of 1