 tensor(deprecated)/tensorsGR - Maple Help

tensor

 tensorsGR
 compute General Relativity curvature tensors in a coordinate basis Calling Sequence tensorsGR(coord, cov_metric, 'contra_metric', 'det_met', 'C1', 'C2', 'Rm', 'Rc', 'R', 'G', 'C', print_flag) Parameters

 coord - list of coordinate variable names, for example, [t,x,y,z] cov_metric - rank-2 symmetric tensor_type of the covariant metric print_flag - (optional) print directive to print results after computation contra_metric - rank-2 symmetric tensor_type of contravariant metric det_met - determinant of the covariant metric component matrix C1 - Christoffel symbols of the first kind C2 - Christoffel symbols of the second kind Rm - covariant Riemann tensor Rc - covariant Ricci tensor R - Ricci scalar G - covariant Einstein tensor C - covariant Weyl tensor Description

Important: The tensor package has been deprecated. Use the superseding packages DifferentialGeometry and Physics instead.

 • The function tensorsGR(coord, cov_metric, 'contra_metric', 'det_met', 'C1', 'C2', 'Rm', 'Rc', 'R', 'G', 'C') calculates the following objects given the coordinates, coord, and covariant metric tensor, cov_metric:
 – contravariant metric tensor, returned through contra_metric
 – determinant of the metric tensor components, returned through det_met
 – Christoffel symbols of the first kind, returned through C1
 – Christoffel symbols of the second kind, returned through C2
 – covariant Riemann tensor, returned through Rm
 – covariant Ricci tensor, returned through Rc
 – Ricci scalar, returned through R
 – covariant Einstein tensor, returned through G
 – covariant Weyl tensor, returned through C
 • The calculated quantities are returned via the third through eleventh parameters.  Since these are output parameters, they must be passed as unassigned names.  The return value is NULL.
 • The last parameter, print_flag, is optional directive to display the calculated results (using tensor[display_allGR]) after they have been calculated. If used, it must be passed with the value print.  Other values will result in an error.
 • The calculations are made simply by making the appropriate calls to the following procedures: tensor[invert], tensor[partial_diff], tensor[Christoffel1], tensor[Christoffel2], tensor[Riemann], tensor[Ricci], tensor[Ricciscalar], tensor[Einstein], and tensor[Weyl].
 • Note that this procedure is not strictly necessary.  However, it provides a convenient way to calculate all of the important general relativity curvature quantities in the natural basis.  The print_flag option provides the further convenience of displaying the results automatically once they are computed.
 • Simplification:  Since this routine computes all of the quantities by calling the appropriate routines from the package, simplification is done according to the simplification methods of each individual routine.
 • This function is part of the tensor package, and so can be used in the form tensorsGR(..) only after performing the command with(tensor), or with(tensor, tensorsGR).  This function can always be accessed in the long form tensor[tensorsGR](..). Examples

Important: The tensor package has been deprecated. Use the superseding packages DifferentialGeometry and Physics instead.

 > $\mathrm{with}\left(\mathrm{tensor}\right):$

Define the coordinates and covariant metric for the Schwarzschild metric:

 > $\mathrm{coords}≔\left[t,r,\mathrm{th},\mathrm{ph}\right]:$
 > $g≔\mathrm{array}\left(\mathrm{symmetric},\mathrm{sparse},1..4,1..4\right):$
 > $g\left[1,1\right]≔1-\frac{2m}{r}:$$g\left[2,2\right]≔-\frac{1}{g\left[1,1\right]}:$$g\left[3,3\right]≔-{r}^{2}:$$g\left[4,4\right]≔-{r}^{2}{\mathrm{sin}\left(\mathrm{th}\right)}^{2}:$
 > $\mathrm{metric}≔\mathrm{create}\left(\left[-1,-1\right],\mathrm{eval}\left(g\right)\right)$
 ${\mathrm{metric}}{≔}{table}{}\left(\left[{\mathrm{compts}}{=}\left[\begin{array}{cccc}{1}{-}\frac{{2}{}{m}}{{r}}& {0}& {0}& {0}\\ {0}& {-}\frac{{1}}{{1}{-}\frac{{2}{}{m}}{{r}}}& {0}& {0}\\ {0}& {0}& {-}{{r}}^{{2}}& {0}\\ {0}& {0}& {0}& {-}{{r}}^{{2}}{}{{\mathrm{sin}}{}\left({\mathrm{th}}\right)}^{{2}}\end{array}\right]{,}{\mathrm{index_char}}{=}\left[{-1}{,}{-1}\right]\right]\right)$ (1)

Compute the curvature (without the print option)

 > $\mathrm{tensorsGR}\left(\mathrm{coords},\mathrm{metric},\mathrm{contra_metric},\mathrm{det_met},\mathrm{C1},\mathrm{C2},\mathrm{Rm},\mathrm{Rc},R,G,C\right)$

Show it is a vacuum solution of the Einstein field equations

 > $\mathrm{displayGR}\left(\mathrm{Einstein},G\right)$
 ${}$
 ${\mathrm{The Einstein Tensor}}$
 ${\mathrm{non-zero components :}}$
 ${\mathrm{None}}$
 ${\mathrm{None}}$
 ${\mathrm{character : \left[-1, -1\right]}}$ (2)

Show that it is not flat.

 > $\mathrm{displayGR}\left(\mathrm{Weyl},C\right)$
 ${}$
 ${\mathrm{The Weyl Tensor}}$
 ${\mathrm{non-zero components :}}$
 ${\mathrm{C1212}}{=}\frac{{2}{}{m}}{{{r}}^{{3}}}$
 ${\mathrm{C1313}}{=}\frac{\left({-}{r}{+}{2}{}{m}\right){}{m}}{{{r}}^{{2}}}$
 ${\mathrm{C1414}}{=}\frac{\left({-}{r}{+}{2}{}{m}\right){}{m}{}{{\mathrm{sin}}{}\left({\mathrm{th}}\right)}^{{2}}}{{{r}}^{{2}}}$
 ${\mathrm{C2323}}{=}{-}\frac{{m}}{{-}{r}{+}{2}{}{m}}$
 ${\mathrm{C2424}}{=}{-}\frac{{m}{}{{\mathrm{sin}}{}\left({\mathrm{th}}\right)}^{{2}}}{{-}{r}{+}{2}{}{m}}$
 ${\mathrm{C3434}}{=}{-}{2}{}{r}{}{m}{}{{\mathrm{sin}}{}\left({\mathrm{th}}\right)}^{{2}}$
 ${\mathrm{character : \left[-1, -1, -1, -1\right]}}$ (3)