 tensor(deprecated)/displayGR - Help

# Online Help

###### All Products    Maple    MapleSim

Home : Support : Online Help : tensor(deprecated)/displayGR

tensor

 displayGR
 display the nonzero components of a specific general relativity tensor
 display_allGR
 display the nonzero components of all of the general relativity tensors and quantities calculated by tensor[tensorsGR]

 Calling Sequence displayGR(GR_name, object) display_allGR(coord, cov_metric, con_metric, det_met, C1, C2, Rm, Rc, R, G, C)

Parameters

 GR_name - name of a specific GR-related object where the name is one of coordinates, cov_metric, contra_metric, detmetric, Christoffel1, Christoffel2, Riemann, Ricci, Ricciscalar, Einstein, or Weyl object - object to display coord - list of coordinate variable names (for example, [t, x, y, z]) cov_metric - covariant metric tensor (index_char=[-1,-1]) con_metric - contravariant metric tensor (index_char=[1,1]) det_met - determinant of metric tensor components C1, C2 - Christoffel symbols of first and second kind Rm, Rc, R - Riemann tensor, Ricci tensor, Ricci scalar G, C - Einstein and Weyl tensors

Description

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

 • The function displayGR(Einstein, G) displays the nonzero components and the index character of the tensor_type G using the symmetries of the Einstein tensor to reduce the number of components shown. G is expected to be a tensor of rank 2 with the proper symmetries. It can be calculated using tensor[Einstein].
 • The function display_allGR(coord, cov_met, cont_met, det_met, C1, C2, Rm, Rc, R, G, C) displays all of the GR-related objects passed in the parameter list. They must be passed in the following order: the coordinates list, the covariant metric tensor ([-1,-1]), the contravariant metric tensor ([1,1]), the determinant of the metric tensor components (algebraic type), the Christoffel symbols of the 1st kind ([-1,-1,-1]), the Christoffel symbols of the 2nd kind ([1,-1,-1]), the Riemann tensor, the Ricci tensor, the Ricciscalar ([]), the Einstein tensor, the Weyl tensor.  Each of the quantities is displayed by making the appropriate call to tensor[displayGR]. See tensor[tensorsGR] for the calculation of these quantities.
 • For displaying general tensor_type objects not listed above, use the 'display' option of tensor[act].
 • These functions are part of the tensor package, and so can be used in the form displayGR(..) / display_allGR(..) only after performing the command with(tensor), or with(tensor, displayGR) / with(tensor, display_allGR).

Examples

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

Define the coordinates and covariant metric for the Schwarzschild metric:

 > $\mathrm{with}\left(\mathrm{tensor}\right):$
 > $\mathrm{coords}≔\left[t,r,\mathrm{\theta },\mathrm{\phi }\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{\theta }\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{\theta }}\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):$

Use displayGR to show that 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)

Use displayGR to show the nonzero Christoffel symbols of the first kind:

 > $\mathrm{displayGR}\left(\mathrm{Christoffel1},\mathrm{C1}\right)$
 ${}$
 ${\mathrm{The Christoffel Symbols of the First Kind}}$
 ${\mathrm{non-zero components :}}$
 ${\mathrm{\left[11,2\right]}}{=}{-}\frac{{m}}{{{r}}^{{2}}}$
 ${\mathrm{\left[12,1\right]}}{=}\frac{{m}}{{{r}}^{{2}}}$
 ${\mathrm{\left[22,2\right]}}{=}\frac{{m}}{{\left({-}{r}{+}{2}{}{m}\right)}^{{2}}}$
 ${\mathrm{\left[23,3\right]}}{=}{-}{r}$
 ${\mathrm{\left[24,4\right]}}{=}{-}{r}{}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}$
 ${\mathrm{\left[33,2\right]}}{=}{r}$
 ${\mathrm{\left[34,4\right]}}{=}{-}{{r}}^{{2}}{}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right){}{\mathrm{cos}}{}\left({\mathrm{\theta }}\right)$
 ${\mathrm{\left[44,2\right]}}{=}{r}{}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}$
 ${\mathrm{\left[44,3\right]}}{=}{{r}}^{{2}}{}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right){}{\mathrm{cos}}{}\left({\mathrm{\theta }}\right)$ (3)

Display everything using display_allGR:

 > $\mathrm{display_allGR}\left(\mathrm{coords},\mathrm{metric},\mathrm{contra_metric},\mathrm{det_met},\mathrm{C1},\mathrm{C2},\mathrm{Rm},\mathrm{Rc},R,G,C\right)$
 ${\mathrm{_____________}}$
 ${\mathrm{_____________}}$
 ${\mathrm{The coordinates variables are :}}$
 ${\mathrm{x1}}{=}{t}$
 ${\mathrm{x2}}{=}{r}$
 ${\mathrm{x3}}{=}{\mathrm{\theta }}$
 ${\mathrm{x4}}{=}{\mathrm{\phi }}$
 ${\mathrm{_____________}}$
 ${\mathrm{_____________}}$
 ${\mathrm{The Covariant Metric}}$
 ${\mathrm{non-zero components :}}$
 ${\mathrm{cov_g11}}{=}{1}{-}\frac{{2}{}{m}}{{r}}$
 ${\mathrm{cov_g22}}{=}{-}\frac{{1}}{{1}{-}\frac{{2}{}{m}}{{r}}}$
 ${\mathrm{cov_g33}}{=}{-}{{r}}^{{2}}$
 ${\mathrm{cov_g44}}{=}{-}{{r}}^{{2}}{}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}$
 ${\mathrm{_____________}}$
 ${\mathrm{Determinant of the covariant metric tensor :}}$
 ${\mathrm{detg}}{=}{-}{{r}}^{{4}}{}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}$
 ${\mathrm{_____________}}$
 ${\mathrm{_____________}}$
 ${\mathrm{The Contravariant Metric}}$
 ${\mathrm{non-zero components :}}$
 ${\mathrm{contra_g11}}{=}{-}\frac{{r}}{{-}{r}{+}{2}{}{m}}$
 ${\mathrm{contra_g22}}{=}\frac{{-}{r}{+}{2}{}{m}}{{r}}$
 ${\mathrm{contra_g33}}{=}{-}\frac{{1}}{{{r}}^{{2}}}$
 ${\mathrm{contra_g44}}{=}{-}\frac{{1}}{{{r}}^{{2}}{}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}}$
 ${\mathrm{_____________}}$
 ${\mathrm{_____________}}$
 ${\mathrm{The Christoffel Symbols of the First Kind}}$
 ${\mathrm{non-zero components :}}$
 ${\mathrm{\left[11,2\right]}}{=}{-}\frac{{m}}{{{r}}^{{2}}}$
 ${\mathrm{\left[12,1\right]}}{=}\frac{{m}}{{{r}}^{{2}}}$
 ${\mathrm{\left[22,2\right]}}{=}\frac{{m}}{{\left({-}{r}{+}{2}{}{m}\right)}^{{2}}}$
 ${\mathrm{\left[23,3\right]}}{=}{-}{r}$
 ${\mathrm{\left[24,4\right]}}{=}{-}{r}{}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}$
 ${\mathrm{\left[33,2\right]}}{=}{r}$
 ${\mathrm{\left[34,4\right]}}{=}{-}{{r}}^{{2}}{}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right){}{\mathrm{cos}}{}\left({\mathrm{\theta }}\right)$
 ${\mathrm{\left[44,2\right]}}{=}{r}{}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}$
 ${\mathrm{\left[44,3\right]}}{=}{{r}}^{{2}}{}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right){}{\mathrm{cos}}{}\left({\mathrm{\theta }}\right)$
 ${\mathrm{_____________}}$
 ${\mathrm{_____________}}$
 ${\mathrm{The Christoffel Symbols of the Second Kind}}$
 ${\mathrm{non-zero components :}}$
 ${\mathrm{\left\{1,12\right\}}}{=}{-}\frac{{m}}{{r}{}\left({-}{r}{+}{2}{}{m}\right)}$
 ${\mathrm{\left\{2,11\right\}}}{=}{-}\frac{\left({-}{r}{+}{2}{}{m}\right){}{m}}{{{r}}^{{3}}}$
 ${\mathrm{\left\{2,22\right\}}}{=}\frac{{m}}{{r}{}\left({-}{r}{+}{2}{}{m}\right)}$
 ${\mathrm{\left\{2,33\right\}}}{=}{-}{r}{+}{2}{}{m}$
 ${\mathrm{\left\{2,44\right\}}}{=}\left({-}{r}{+}{2}{}{m}\right){}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}$
 ${\mathrm{\left\{3,23\right\}}}{=}\frac{{1}}{{r}}$
 ${\mathrm{\left\{3,44\right\}}}{=}{-}{\mathrm{sin}}{}\left({\mathrm{\theta }}\right){}{\mathrm{cos}}{}\left({\mathrm{\theta }}\right)$
 ${\mathrm{\left\{4,24\right\}}}{=}\frac{{1}}{{r}}$
 ${\mathrm{\left\{4,34\right\}}}{=}\frac{{\mathrm{cos}}{}\left({\mathrm{\theta }}\right)}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}$
 ${\mathrm{_____________}}$
 ${\mathrm{_____________}}$
 ${\mathrm{The Riemann Tensor}}$
 ${\mathrm{non-zero components :}}$
 ${\mathrm{R1212}}{=}\frac{{2}{}{m}}{{{r}}^{{3}}}$
 ${\mathrm{R1313}}{=}\frac{\left({-}{r}{+}{2}{}{m}\right){}{m}}{{{r}}^{{2}}}$
 ${\mathrm{R1414}}{=}\frac{\left({-}{r}{+}{2}{}{m}\right){}{m}{}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}}{{{r}}^{{2}}}$
 ${\mathrm{R2323}}{=}{-}\frac{{m}}{{-}{r}{+}{2}{}{m}}$
 ${\mathrm{R2424}}{=}{-}\frac{{m}{}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}}{{-}{r}{+}{2}{}{m}}$
 ${\mathrm{R3434}}{=}{-}{2}{}{r}{}{m}{}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}$
 ${\mathrm{R3434}}{=}{-}{2}{}{r}{}{m}{}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}$
 ${\mathrm{character : \left[-1, -1, -1, -1\right]}}$
 ${\mathrm{_____________}}$
 ${\mathrm{_____________}}$
 ${\mathrm{The Ricci tensor}}$
 ${\mathrm{non-zero components :}}$
 ${\mathrm{None}}$
 ${\mathrm{None}}$
 ${\mathrm{character : \left[-1, -1\right]}}$
 ${\mathrm{_____________}}$
 ${\mathrm{_____________}}$
 ${\mathrm{The Ricci Scalar}}$
 ${R}{=}{0}$
 ${\mathrm{_____________}}$
 ${\mathrm{_____________}}$
 ${\mathrm{The Einstein Tensor}}$
 ${\mathrm{non-zero components :}}$
 ${\mathrm{None}}$
 ${\mathrm{None}}$
 ${\mathrm{character : \left[-1, -1\right]}}$
 ${\mathrm{_____________}}$
 ${\mathrm{_____________}}$
 ${\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{\theta }}\right)}^{{2}}}{{{r}}^{{2}}}$
 ${\mathrm{C2323}}{=}{-}\frac{{m}}{{-}{r}{+}{2}{}{m}}$
 ${\mathrm{C2424}}{=}{-}\frac{{m}{}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}}{{-}{r}{+}{2}{}{m}}$
 ${\mathrm{C3434}}{=}{-}{2}{}{r}{}{m}{}{{\mathrm{sin}}{}\left({\mathrm{\theta }}\right)}^{{2}}$
 ${\mathrm{character : \left[-1, -1, -1, -1\right]}}$
 ${\mathrm{_____________}}$ (4)

 See Also