tensor(deprecated)/Riemann - Help

tensor

 Riemann
 compute the covariant Riemann curvature tensor

 Calling Sequence Riemann(ginv, D2g, Cf1)

Parameters

 ginv - rank two tensor_type of character [-1,-1] representing the contravariant metric tensor; specifically, ${{\mathrm{ginv}}_{\mathrm{compts}}}_{i,j}≔{g}^{\left\{\mathrm{ij}\right\}}$ D2g - rank four tensor_type of character [-1,-1,-1,-1] representing the second partial derivatives of the COVARIANT metric tensor; specifically, ${{\mathrm{D1g}}_{\mathrm{compts}}}_{i,j,k}≔{g}_{\left\{\mathrm{ij},\mathrm{kl}\right\}}$ Cf1 - rank three tensor_type of character [-1,-1,-1] representing the Christoffel symbols of the first kind; specifically, ${{\mathrm{Cf1}}_{\mathrm{compts}}}_{i,j,k}≔\left\{k,ij\right\}$

Description

Important: The tensor package has been deprecated. Use the superseding commands DifferentialGeometry[Tensor][RiemannInvariants] and Physics[Riemann] instead.

 • The routine Riemann(ginv, D2g, Cf1) computes the components of the covariant Riemann tensor using the contravariant metric tensor ginv, the second partial derivatives of the metric D2g, and the Christoffel symbols of the 1st kind Cf1. The result is a tensor_type with character [-1, -1, -1, -1] which uses the tensor package's 'cov_riemann' indexing function.
 • ginv should be indexed using the symmetric indexing function. D2g should be indexed using the d2met indexing function. Cf1 should be indexed using the cf1 indexing function.  All of the parameters can be obtained using the appropriate tensor package routines once the metric is known.
 • Indexing Function:  The result uses the cov_riemann indexing function to implement the symmetrical properties of the indices of the covariant riemann tensor.  Specifically, the indexing function implements the following:
 – skew-symmetry in the first and second indices
 – skew-symmetry in the third and fourth indices
 – symmetry in the first and second pairs of indices
 • Simplification:  This routine uses the tensor/Riemann/simp routine for simplification purposes.  The simplification routine is applied to each component of result after it is computed.  By default, tensor/Riemann/simp is initialized to the tensor/simp routine.  It is recommended that the tensor/Riemann/simp routine be customized to suit the needs of the particular problem.
 • This function is part of the tensor package, and so can be used in the form Riemann(..) only after performing the command with(tensor) or with(tensor, Riemann).  The function can always be accessed in the long form tensor[Riemann](..).

Examples

Important: The tensor package has been deprecated. Use the superseding commands DifferentialGeometry[Tensor][RiemannInvariants] and Physics[Riemann] instead.

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

Define the coordinate variables and the covariant components of the Schwarzchild metric.

 > $\mathrm{coord}≔\left[t,r,\mathrm{θ},\mathrm{φ}\right]:$
 > $\mathrm{g_compts}≔\mathrm{array}\left(\mathrm{symmetric},\mathrm{sparse},1..4,1..4\right):$
 > ${\mathrm{g_compts}}_{1,1}≔1-\frac{2m}{r}:$${\mathrm{g_compts}}_{2,2}≔-\frac{1}{{\mathrm{g_compts}}_{1,1}}:$
 > ${\mathrm{g_compts}}_{3,3}≔-{r}^{2}:$${\mathrm{g_compts}}_{4,4}≔-{r}^{2}{\mathrm{sin}\left(\mathrm{θ}\right)}^{2}:$
 > $g≔\mathrm{create}\left(\left[-1,-1\right],\mathrm{eval}\left(\mathrm{g_compts}\right)\right)$
 ${g}{:=}{\mathrm{table}}\left(\left[{\mathrm{index_char}}{=}\left[{-}{1}{,}{-}{1}\right]{,}{\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{θ}}\right)}^{{2}}\end{array}\right]\right]\right)$ (1)

Compute the Riemann tensor.

 > $\mathrm{ginv}≔\mathrm{invert}\left(g,'\mathrm{detg}'\right):$
 > $\mathrm{D1g}≔\mathrm{d1metric}\left(g,\mathrm{coord}\right):$$\mathrm{D2g}≔\mathrm{d2metric}\left(\mathrm{D1g},\mathrm{coord}\right):$
 > $\mathrm{Cf1}≔\mathrm{Christoffel1}\left(\mathrm{D1g}\right):$
 > $\mathrm{RMN}≔\mathrm{Riemann}\left(\mathrm{ginv},\mathrm{D2g},\mathrm{Cf1}\right):$
 > $\mathrm{RMNc}≔\mathrm{get_compts}\left(\mathrm{RMN}\right):$

Show the nonzero components.

 > map(proc(x) if RMNc[op(x)]<>0 then x=RMNc[op(x)] else NULL end if end proc,  [ indices(RMNc)] );
 $\left[\left[{2}{,}{4}{,}{2}{,}{4}\right]{=}{-}\frac{{m}{}{{\mathrm{sin}}{}\left({\mathrm{θ}}\right)}^{{2}}}{{-}{r}{+}{2}{}{m}}{,}\left[{1}{,}{2}{,}{1}{,}{2}\right]{=}\frac{{2}{}{m}}{{{r}}^{{3}}}{,}\left[{1}{,}{4}{,}{1}{,}{4}\right]{=}\frac{\left({-}{r}{+}{2}{}{m}\right){}{m}{}{{\mathrm{sin}}{}\left({\mathrm{θ}}\right)}^{{2}}}{{{r}}^{{2}}}{,}\left[{1}{,}{3}{,}{1}{,}{3}\right]{=}\frac{\left({-}{r}{+}{2}{}{m}\right){}{m}}{{{r}}^{{2}}}{,}\left[{2}{,}{3}{,}{2}{,}{3}\right]{=}{-}\frac{{m}}{{-}{r}{+}{2}{}{m}}{,}\left[{3}{,}{4}{,}{3}{,}{4}\right]{=}{-}{2}{}{r}{}{m}{}{{\mathrm{sin}}{}\left({\mathrm{θ}}\right)}^{{2}}\right]$ (2)

You can also view the result using the tensor package function displayGR.