Ricci Tensor and Scalar Curvature calculations using Symbolic module

In [1]:
import sympy

from einsteinpy.symbolic import RicciTensor, RicciScalar

from einsteinpy.symbolic.predefined import AntiDeSitter



sympy.init_printing()

Defining the Anti-de Sitter spacetime Metric

In [2]:
metric = AntiDeSitter()

metric.tensor()
Out[2]:
$\displaystyle \left[\begin{matrix}-1 & 0 & 0 & 0\\0 & \cos^{2}{\left(t \right)} & 0 & 0\\0 & 0 & \cos^{2}{\left(t \right)} \sinh^{2}{\left(\chi \right)} & 0\\0 & 0 & 0 & \sin^{2}{\left(\theta \right)} \cos^{2}{\left(t \right)} \sinh^{2}{\left(\chi \right)}\end{matrix}\right]$

Calculating the Ricci Tensor(with both indices covariant)

In [3]:
Ric = RicciTensor.from_metric(metric)

Ric.tensor()
Out[3]:
$\displaystyle \left[\begin{matrix}3 & 0 & 0 & 0\\0 & - 3 \cos^{2}{\left(t \right)} & 0 & 0\\0 & 0 & - 3 \cos^{2}{\left(t \right)} \sinh^{2}{\left(\chi \right)} & 0\\0 & 0 & 0 & - 3 \sin^{2}{\left(\theta \right)} \cos^{2}{\left(t \right)} \sinh^{2}{\left(\chi \right)}\end{matrix}\right]$

Calculating the Ricci Scalar(Scalar Curvature) from the Ricci Tensor

In [4]:
R = RicciScalar.from_riccitensor(Ric)

R.simplify()

R.expr
Out[4]:
$\displaystyle -12$

The curavture is -12 which is in-line with the theoretical results