Example 1. "DiracWeyl"
First create a vector bundle with base coordinates and fiber coordinates .
Define a metric of signature and an orthonormal tetrad.
Calculate the solder form.
Define a rank 1-spinor field and its complex conjugate.
Calculate the Dirac-Weyl energy momentum tensor .
Evaluate the Dirac-Weyl field equations for the given spinor field .
Check the divergence identity for the dust energy momentum tensor . The LHS is the covariant divergence of the energy momentum tensor and the RHS is a combination of the field equations.
We note that is a solution of the Dirac-Weyl field equations:
The covariant divergence of the energy momentum tensor vanishes on this solution:
Example 2. "Dust"
First create a manifold with base coordinates :
Define a metric.
Define the normalized 4-vector representing the 4-velocity of the dust.
Define the energy density.
Calculate the dust energy- momentum tensor .
Evaluate the dust field equations for the given and .
Check that the following values for and solve the dust field equations.
Check the divergence identity for the dust energy-momentum tensor . The LHS is the covariant divergence of the energy-momentum tensor and the RHS is a combination of the field equations.
Example 3. "Electromagnetic"
First create a manifold with base coordinates .
Define a metric.
Define an electromagnetic 4-potential .
Calculate the electromagnetic energy-momentum tensor .
Note that the energy-momentum tensor can also be computed from the field strength tensor .
Evaluate the electromagnetic field equations for the given 4-potential .
Note that the electromagnetic field equations can also be computed from the field strength tensor .
Check the divergence identity for the electromagnetic energy-momentum tensor . The LHS is the covariant divergence of the energy momentum tensor and the RHS is a combination of the matter field equations.
We note that is a solution of the electromagnetic field equations:
The covariant divergence of the energy-momentum tensor vanishes on this solution:
Example 4. "PerfectFluid"
First create a manifold with base coordinates :
Define a metric.
Define the normalized 4-velocity.
Define the energy density.
Define the pressure.
Calculate the perfect fluid energy-momentum tensor .
Evaluate the fluid field equations for the given fluid.
We can use the dsolve command to find the energy density and the pressure which satisfy the field equations.
Example 5. "Scalar"
First create a manifold with base coordinates .
Define a metric.
Define a scalar field.
Calculate the energy- momentum tensor for the scalar field .
Evaluate the matter field equations for the given scalar field .
Check the divergence identity for the scalar energy-momentum tensor . The LHS is the covariant divergence of the energy-momentum tensor and the RHS is a combination of the matter field equations.
Example 6. "NMCScalar"
First create a manifold with base coordinates .
Define a metric.
Define a scalar field
Calculate the energy-momentum tensor for the non-minimally coupled scalar field .
Evaluate the matter field equations for the given scalar field .
Check the divergence identity for the scalar energy-momentum tensor . The LHS is the covariant divergence of the energy-momentum tensor and the RHS is a combination of the matter field equations.