Tensor[EnergyMomentumTensor] - find the energy-momentum tensor for various matter fields
Tensor[MatterFieldEquations] - find the field equations for various matter fields
Tensor[DivergenceIdentities] - check the divergence identities for the energy-momentum tensor field for various matter fields
Calling Sequences
EnergyMomentumTensor(FieldType, g, F1, F2, ...)
MatterFieldEquations(FieldType, g, F1, F2, ...)
DivergenceIdentities(FieldType, g, F1, F2, ... , T, E1, E2,...)
Parameters
FieldType - a string, one of "DiracWeyl", "Dust", "Electromagnetic", "PerfectFluid", "Scalar", "NMCScalar"
g - a metric tensor
F1, F2,.. - scalars, tensors or spinors, defining the fields needed for the field theory designated by FieldType
T - a rank 2 tensor (the energy-momentum tensor)
E1, E2,.. - scalars, tensors or spinors, defining the field equations for the field theory designated by FieldType
Description
Examples
The energy momentum tensor is a symmetric, rank-2 contravariant tensor T which determines the right-hand side of the Einstein field equations.
If FieldType = "DiracWeyl", then the additional arguments for EnergyMomentumTensor are: a solder form (compatible with the metric g), a rank 1 covariant spinor ψ, and the complex conjugate ψ‾.
If FieldType = "Dust", then the additional arguments for EnergyMomentumTensor are: a vector field U, a scalar μ (energy density).
If FieldType = "Electromagnetic", then the additional arguments are either: a 1-form A (the electromagnetic 4-potential), or a skew-symmetric rank 2 tensor F (the field strength tensor).
If FieldType = "PerfectFluid", then the additional arguments for EnergyMomentumTensor are: a vector field U, and scalars μ (energy density) and p (pressure).
If FieldType = "Scalar", then the additional argument for EnergyMomentumTensor is a scalar φ.
If FieldType = "NMCScalar", then the additional argument for EnergyMomentumTensor is a non-minimally coupled scalar φ.
See the Details help page for the explicit formulas used to calculate the various energy-momentum tensors, the matter field equations and the divergence identities.
These commands are part of the DifferentialGeometry:-Tensor: package, and so can be used in the form EnergyMomentumTensor(...), MatterFieldEquations(...), DivergenceIdentities(...) only after executing the commands with(DifferentialGeometry); with(Tensor); in that order. They can always be used in the long form DifferentialGeometry:-Tensor:-EnergyMomentumTensor, DifferentialGeometry:-Tensor-MatterFieldEquations, DifferentialGeometry:-Tensor:-DivergenceIdentities.
with⁡DifferentialGeometry:with⁡Tools:with⁡Tensor:
Example 1. "DiracWeyl"
First create a vector bundle N with base coordinates t,x,y,z and fiber coordinates z1,z2,w1,w2.
DGsetup⁡t,x,y,z,z1,z2,w1,w2,N
frame name: N
Define a metric of signature 1,−1,−1,−1 and an orthonormal tetrad.
g1≔evalDG⁡x4⁢dt&tdt−dx&tdx−dy&tdy−dz&tdz
g1≔x4⁢dt⁢dt−dx⁢dx−dy⁢dy−dz⁢dz
OTetrad≔evalDG⁡1x2⁢D_t,D_x,D_y,D_z
OTetrad≔1x2⁢D_t,D_x,D_y,D_z
Calculate the solder form.
σ1≔SolderForm⁡OTetrad
σ1≔x2⁢22⁢dt⁢D_z1⁢D_w1+x2⁢22⁢dt⁢D_z2⁢D_w2+22⁢dx⁢D_z1⁢D_w2+22⁢dx⁢D_z2⁢D_w1−I2⁢2⁢dy⁢D_z1⁢D_w2+I2⁢2⁢dy⁢D_z2⁢D_w1+22⁢dz⁢D_z1⁢D_w1−22⁢dz⁢D_z2⁢D_w2
Define a rank 1-spinor field ψ1 and its complex conjugate.
ψ1≔evalDG⁡h⁡x⁢dz1−f⁡x⁢dz2
ψ1≔h⁡x⁢dz1−f⁡x⁢dz2
barpsi1≔evalDG⁡h⁡x⁢dw1−f⁡x⁢dw2
barpsi1≔h⁡x⁢dw1−f⁡x⁢dw2
Calculate the Dirac-Weyl energy momentum tensor T.
T1≔EnergyMomentumTensor⁡DiracWeyl,g1,σ1,ψ1,barpsi1
T1≔−2⁢f⁡x2−h⁡x2x3⁢D_t⁢D_y+2⁢−h⁡x⁢f′⁡x+f⁡x⁢h′⁡x⁢D_x⁢D_y−2⁢f⁡x2−h⁡x2x3⁢D_y⁢D_t+2⁢−h⁡x⁢f′⁡x+f⁡x⁢h′⁡x⁢D_y⁢D_x
Evaluate the Dirac-Weyl field equations E1 for the given spinor field ψ.
E1≔MatterFieldEquations⁡DiracWeyl,g1,σ1,ψ1,barpsi1
E1≔I2⁢2⁢f′⁡x⁢x+f⁡xx⁢D_w1−I2⁢2⁢h′⁡x⁢x+h⁡xx⁢D_w2,−I2⁢2⁢f′⁡x⁢x+f⁡xx⁢D_z1+I2⁢2⁢h′⁡x⁢x+h⁡xx⁢D_z2
Check the divergence identity for the dust energy momentum tensor T. The LHS is the covariant divergence of the energy momentum tensor and the RHS is a combination of the field equations.
Div1,RHS1≔DivergenceIdentities⁡DiracWeyl,g1,σ1,ψ1,barpsi1,T1,E1
Div1,RHS1≔2⁢−x⁢h⁡x⁢f″⁡x+x⁢f⁡x⁢h″⁡x+2⁢f⁡x⁢h′⁡x−2⁢h⁡x⁢f′⁡xx⁢D_y,2⁢−x⁢h⁡x⁢f″⁡x+x⁢f⁡x⁢h″⁡x+2⁢f⁡x⁢h′⁡x−2⁢h⁡x⁢f′⁡xx⁢D_y
Div1−RHS1
0
We note that fx=hx=1x is a solution of the Dirac-Weyl field equations:
map⁡DGsimplify,eval⁡E1,f⁡x=1x,h⁡x=1x
0⁢D_z1,0⁢D_z1
The covariant divergence of the energy momentum tensor vanishes on this solution:
DGsimplify⁡eval⁡Div1,f⁡x=1x,h⁡x=1x
0⁢D_t
Example 2. "Dust"
First create a manifold M with base coordinates t,x,y,z:
DGsetup⁡t,x,y,z,M
frame name: M
Define a metric.
g2≔evalDG⁡dt&tdt−t2⁢dx&tdx−dy&tdy−dz&tdz
g2≔dt⁢dt−t2⁢dx⁢dx−dy⁢dy−dz⁢dz
Define the normalized 4-vector representing the 4-velocity of the dust.
u2≔evalDG⁡cosh⁡f⁡t⁢D_t−sinh⁡f⁡tt⁢D_x
u2≔cosh⁡f⁡t⁢D_t−sinh⁡f⁡tt⁢D_x
TensorInnerProduct⁡g2,u2,u2
1
Define the energy density.
μ2≔h⁡t
Calculate the dust energy- momentum tensor T2.
T2≔EnergyMomentumTensor⁡Dust,g2,u2,μ2
T2≔h⁡t⁢cosh⁡f⁡t2⁢D_t⁢D_t−h⁡t⁢cosh⁡f⁡t⁢sinh⁡f⁡tt⁢D_t⁢D_x−h⁡t⁢cosh⁡f⁡t⁢sinh⁡f⁡tt⁢D_x⁢D_t+h⁡t⁢cosh⁡f⁡t2−1t2⁢D_x⁢D_x
Evaluate the dust field equations E2 for the given u2 and μ2.
E2≔MatterFieldEquations⁡Dust,g2,u2,μ2
E2≔h⁡t⁢cosh⁡f⁡t+h.⁡t⁢cosh⁡f⁡t⁢t+h⁡t⁢sinh⁡f⁡t⁢f.⁡t⁢tt,cosh⁡f⁡t2−1+cosh⁡f⁡t⁢sinh⁡f⁡t⁢f.⁡t⁢tt⁢D_t−cosh⁡f⁡t⁢sinh⁡f⁡t+cosh⁡f⁡t⁢f.⁡t⁢tt2⁢D_x
Check that the following values for ft and ht solve the dust field equations.
Soln≔h⁡t=_C21+t2⁢_C1212,f⁡t=arcsinh⁡1t⁢_C1
Soln≔h⁡t=_C21+t2⁢_C12,f⁡t=arcsinh⁡1t⁢_C1
simplify⁡eval⁡E2,Soln,symbolic
0,0⁢D_t+0⁢D_x
Check the divergence identity for the dust energy-momentum tensor T2. The LHS is the covariant divergence of the energy-momentum tensor and the RHS is a combination of the field equations.
Div2,RHS2≔DivergenceIdentities⁡Dust,g2,u2,μ2,T2,E2
Div2,RHS2≔2⁢h⁡t⁢cosh⁡f⁡t2−h⁡t+h.⁡t⁢t⁢cosh⁡f⁡t2+2⁢h⁡t⁢cosh⁡f⁡t⁢sinh⁡f⁡t⁢f.⁡t⁢tt⁢D_t−2⁢h⁡t⁢cosh⁡f⁡t⁢sinh⁡f⁡t+h.⁡t⁢cosh⁡f⁡t⁢sinh⁡f⁡t⁢t+2⁢h⁡t⁢cosh⁡f⁡t2⁢f.⁡t⁢t−h⁡t⁢f.⁡t⁢tt2⁢D_x,2⁢h⁡t⁢cosh⁡f⁡t2−h⁡t+h.⁡t⁢t⁢cosh⁡f⁡t2+2⁢h⁡t⁢cosh⁡f⁡t⁢sinh⁡f⁡t⁢f.⁡t⁢tt⁢D_t−2⁢h⁡t⁢cosh⁡f⁡t⁢sinh⁡f⁡t+h.⁡t⁢cosh⁡f⁡t⁢sinh⁡f⁡t⁢t+2⁢h⁡t⁢cosh⁡f⁡t2⁢f.⁡t⁢t−h⁡t⁢f.⁡t⁢tt2⁢D_x
Div2&minusRHS2
Example 3. "Electromagnetic"
First create a manifold M with base coordinates t,x,y,z.
g3≔evalDG⁡x2⁢dt&tdt−dx&tdx−dy&tdy−dz&tdz
g3≔x2⁢dt⁢dt−dx⁢dx−dy⁢dy−dz⁢dz
Define an electromagnetic 4-potential A3.
A3≔evalDG⁡f1⁡x⁢dt+f2⁡x⁢dy
A3≔f1⁡x⁢dt+f2⁡x⁢dy
Calculate the electromagnetic energy-momentum tensor T3.
T3≔EnergyMomentumTensor⁡Electromagnetic,g3,A3
T3≔−f2′⁡x2⁢x2+f1′⁡x22⁢x4⁢D_t⁢D_t+f1′⁡x⁢f2′⁡xx2⁢D_t⁢D_y+−f2′⁡x2⁢x2+f1′⁡x22⁢x2⁢D_x⁢D_x+f1′⁡x⁢f2′⁡xx2⁢D_y⁢D_t−f2′⁡x2⁢x2+f1′⁡x22⁢x2⁢D_y⁢D_y−−f2′⁡x2⁢x2+f1′⁡x22⁢x2⁢D_z⁢D_z
Note that the energy-momentum tensor can also be computed from the field strength tensor F=dA.
F3≔ExteriorDerivative⁡A3
F3≔−f1′⁡x⁢dt⁢⋀⁢dx+f2′⁡x⁢dx⁢⋀⁢dy
EnergyMomentumTensor⁡Electromagnetic,g3,F3
−f2′⁡x2⁢x2+f1′⁡x22⁢x4⁢D_t⁢D_t+f1′⁡x⁢f2′⁡xx2⁢D_t⁢D_y+−f2′⁡x2⁢x2+f1′⁡x22⁢x2⁢D_x⁢D_x+f1′⁡x⁢f2′⁡xx2⁢D_y⁢D_t−f2′⁡x2⁢x2+f1′⁡x22⁢x2⁢D_y⁢D_y−−f2′⁡x2⁢x2+f1′⁡x22⁢x2⁢D_z⁢D_z
Evaluate the electromagnetic field equations E3 for the given 4-potential A.
E3≔MatterFieldEquations⁡Electromagnetic,g3,A3
E3≔−f1′⁡x−f1″⁡x⁢xx3⁢D_t−f2″⁡x⁢x+f2′⁡xx⁢D_y,0⁢dt⁢⋀⁢dx⁢⋀⁢dy
Note that the electromagnetic field equations E3 can also be computed from the field strength tensor F=dA.
MatterFieldEquations⁡Electromagnetic,g3,F3
−f1′⁡x−f1″⁡x⁢xx3⁢D_t−f2″⁡x⁢x+f2′⁡xx⁢D_y,0⁢dt⁢⋀⁢dx⁢⋀⁢dy
Check the divergence identity for the electromagnetic energy-momentum tensor T3. The LHS is the covariant divergence of the energy momentum tensor and the RHS is a combination of the matter field equations.
Div3,RHS3≔DivergenceIdentities⁡Electromagnetic,g3,A3,T3,E31
Div3,RHS3≔−f2′⁡x⁢x3⁢f2″⁡x−x⁢f1′⁡x⁢f1″⁡x+f1′⁡x2+f2′⁡x2⁢x2x3⁢D_x,−f2′⁡x⁢x3⁢f2″⁡x−x⁢f1′⁡x⁢f1″⁡x+f1′⁡x2+f2′⁡x2⁢x2x3⁢D_x
Div3&minusRHS3
We note that f1x=x2, f2x=lnx is a solution of the electromagnetic field equations:
DGsimplify⁡eval⁡E3,f1⁡x=x2,f2⁡x=ln⁡x
The covariant divergence of the energy-momentum tensor vanishes on this solution:
DGsimplify⁡eval⁡Div3,f1⁡x=x2,f2⁡x=ln⁡x
Example 4. "PerfectFluid"
g4≔evalDG⁡dt&tdt−t2⁢dx&tdx−dy&tdy−dz&tdz
g4≔dt⁢dt−t2⁢dx⁢dx−dy⁢dy−dz⁢dz
Define the normalized 4-velocity.
u4≔evalDG⁡2⁢D_t+sqrt⁡3t⁢D_x
u4≔2⁢D_t+3t⁢D_x
TensorInnerProduct⁡g4,u4,u4
μ4≔k⁡t
Define the pressure.
p4≔h⁡t
Calculate the perfect fluid energy-momentum tensor T4.
T4≔EnergyMomentumTensor⁡PerfectFluid,g4,u4,μ4,p4
T4≔5⁢h⁡t+4⁢k⁡t⁢D_t⁢D_t+2⁢k⁡t+h⁡t⁢3t⁢D_t⁢D_x+2⁢k⁡t+h⁡t⁢3t⁢D_x⁢D_t+2⁢h⁡t+3⁢k⁡tt2⁢D_x⁢D_x−h⁡t⁢D_y⁢D_y−h⁡t⁢D_z⁢D_z
Evaluate the fluid field equations E4 for the given fluid.
E4≔MatterFieldEquations⁡PerfectFluid,g4,u4,μ4,p4
E4≔7⁢k⁡t+7⁢h⁡t+5⁢h.⁡t⁢t+4⁢t⁢k.⁡tt⁢D_t+2⁢3⁢2⁢k⁡t+2⁢h⁡t+t⁢k.⁡t+h.⁡t⁢tt2⁢D_x
We can use the dsolve command to find the energy density kt and the pressure ht which satisfy the field equations.
de≔DGinfo⁡E4,CoefficientSet
de≔7⁢k⁡t+7⁢h⁡t+5⁢h.⁡t⁢t+4⁢t⁢k.⁡tt,2⁢3⁢2⁢k⁡t+2⁢h⁡t+t⁢k.⁡t+h.⁡t⁢tt2
dsolve⁡de
h⁡t=_C1+_C2t2,k⁡t=−_C1−3⁢_C2t2
Example 5. "Scalar"
g5≔evalDG⁡dt&tdt−t2⁢dx&tdx−dy&tdy−dz&tdz
g5≔dt⁢dt−t2⁢dx⁢dx−dy⁢dy−dz⁢dz
Define a scalar field.
φ5≔f⁡t
Calculate the energy- momentum tensor T5 for the scalar field φ5.
T5≔EnergyMomentumTensor⁡Scalar,g5,φ5
T5≔−−f.⁡t22+_m2⁢f⁡t22⁢D_t⁢D_t+f.⁡t2+_m2⁢f⁡t22⁢t2⁢D_x⁢D_x+f.⁡t22+_m2⁢f⁡t22⁢D_y⁢D_y+f.⁡t22+_m2⁢f⁡t22⁢D_z⁢D_z
Evaluate the matter field equations E5 for the given scalar field φ5.
E5≔MatterFieldEquations⁡Scalar,g5,φ5
E5≔f.⁡t+f..⁡t⁢tt−_m2⁢f⁡t
Check the divergence identity for the scalar energy-momentum tensor T5. The LHS is the covariant divergence of the energy-momentum tensor and the RHS is a combination of the matter field equations.
Div5,RHS5≔DivergenceIdentities⁡Scalar,g5,φ5,T5,E5
Div5,RHS5≔f.⁡t⁢f.⁡t+f..⁡t⁢t−t⁢_m2⁢f⁡tt⁢D_t,f.⁡t⁢f.⁡t+f..⁡t⁢t−t⁢_m2⁢f⁡tt⁢D_t
Div5&minusRHS5
Example 6. "NMCScalar"
g6≔evalDG⁡dt&tdt−t2⁢dx&tdx−dy&tdy−dz&tdz
g6≔dt⁢dt−t2⁢dx⁢dx−dy⁢dy−dz⁢dz
Define a scalar field
φ6≔f⁡t
Calculate the energy-momentum tensor T6 for the non-minimally coupled scalar field φ6.
T6≔EnergyMomentumTensor⁡NMCScalar,g6,φ6
T6≔−_m2⁢f⁡t2⁢t+4⁢_ξ⁢f⁡t⁢f.⁡t+f.⁡t2⁢t2⁢t⁢D_t⁢D_t−−_m2⁢f⁡t2+4⁢_ξ⁢f⁡t⁢f..⁡t+4⁢f.⁡t2⁢_ξ−f.⁡t22⁢t2⁢D_x⁢D_x−−_m2⁢f⁡t2⁢t+4⁢_ξ⁢f⁡t⁢f.⁡t+4⁢_ξ⁢f⁡t⁢f..⁡t⁢t+4⁢f.⁡t2⁢t⁢_ξ−f.⁡t2⁢t2⁢t⁢D_y⁢D_y−−_m2⁢f⁡t2⁢t+4⁢_ξ⁢f⁡t⁢f.⁡t+4⁢_ξ⁢f⁡t⁢f..⁡t⁢t+4⁢f.⁡t2⁢t⁢_ξ−f.⁡t2⁢t2⁢t⁢D_z⁢D_z
Evaluate the matter field equations E6 for the given scalar field φ6.
E6≔MatterFieldEquations⁡NMCScalar,g6,φ6
E6≔f.⁡t+f..⁡t⁢tt−_m2⁢f⁡t
Check the divergence identity for the scalar energy-momentum tensor T6. The LHS is the covariant divergence of the energy-momentum tensor and the RHS is a combination of the matter field equations.
Div6,RHS6≔DivergenceIdentities⁡Scalar,g6,φ6,T6,E6
Div6,RHS6≔f.⁡t⁢f.⁡t+f..⁡t⁢t−t⁢_m2⁢f⁡tt⁢D_t,f.⁡t⁢f.⁡t+f..⁡t⁢t−t⁢_m2⁢f⁡tt⁢D_t
Div6&minusRHS6
See Also
DifferentialGeometry
Tensor
Download Help Document