Weyl Tensor calculations using Symbolic module

[1]:
import sympy
from sympy import cos, sin, sinh
from einsteinpy.symbolic import MetricTensor, WeylTensor

sympy.init_printing()

Defining the Anti-de Sitter spacetime Metric

[2]:
syms = sympy.symbols("t chi theta phi")
t, ch, th, ph = syms
m = sympy.diag(-1, cos(t) ** 2, cos(t) ** 2 * sinh(ch) ** 2, cos(t) ** 2 * sinh(ch) ** 2 * sin(th) ** 2).tolist()
metric = MetricTensor(m, syms)

Calculating the Weyl Tensor (with all indices covariant)

[3]:
weyl = WeylTensor.from_metric(metric)
weyl.tensor()
[3]:
$\displaystyle \left[\begin{matrix}\left[\begin{matrix}0 & 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] & \left[\begin{matrix}0 & 0 & 0 & 0\\\cos^{2}{\left(t \right)} & 0 & 0 & 0\\0 & 0 & 0 & 0\\0 & 0 & 0 & 0\end{matrix}\right] & \left[\begin{matrix}0 & 0 & 0 & 0\\0 & 0 & 0 & 0\\\cos^{2}{\left(t \right)} \sinh^{2}{\left(\chi \right)} & 0 & 0 & 0\\0 & 0 & 0 & 0\end{matrix}\right] & \left[\begin{matrix}0 & 0 & 0 & 0\\0 & 0 & 0 & 0\\0 & 0 & 0 & 0\\\sin^{2}{\left(\theta \right)} \cos^{2}{\left(t \right)} \sinh^{2}{\left(\chi \right)} & 0 & 0 & 0\end{matrix}\right]\\\left[\begin{matrix}0 & \cos^{2}{\left(t \right)} & 0 & 0\\0 & 0 & 0 & 0\\0 & 0 & 0 & 0\\0 & 0 & 0 & 0\end{matrix}\right] & \left[\begin{matrix}- \cos^{2}{\left(t \right)} & 0 & 0 & 0\\0 & 0 & 0 & 0\\0 & 0 & \cos^{4}{\left(t \right)} \sinh^{2}{\left(\chi \right)} & 0\\0 & 0 & 0 & \sin^{2}{\left(\theta \right)} \cos^{4}{\left(t \right)} \sinh^{2}{\left(\chi \right)}\end{matrix}\right] & \left[\begin{matrix}0 & 0 & 0 & 0\\0 & 0 & 0 & 0\\0 & - \cos^{4}{\left(t \right)} \sinh^{2}{\left(\chi \right)} & 0 & 0\\0 & 0 & 0 & 0\end{matrix}\right] & \left[\begin{matrix}0 & 0 & 0 & 0\\0 & 0 & 0 & 0\\0 & 0 & 0 & 0\\0 & - \sin^{2}{\left(\theta \right)} \cos^{4}{\left(t \right)} \sinh^{2}{\left(\chi \right)} & 0 & 0\end{matrix}\right]\\\left[\begin{matrix}0 & 0 & \cos^{2}{\left(t \right)} \sinh^{2}{\left(\chi \right)} & 0\\0 & 0 & 0 & 0\\0 & 0 & 0 & 0\\0 & 0 & 0 & 0\end{matrix}\right] & \left[\begin{matrix}0 & 0 & 0 & 0\\0 & 0 & - \cos^{4}{\left(t \right)} \sinh^{2}{\left(\chi \right)} & 0\\0 & 0 & 0 & 0\\0 & 0 & 0 & 0\end{matrix}\right] & \left[\begin{matrix}- \cos^{2}{\left(t \right)} \sinh^{2}{\left(\chi \right)} & 0 & 0 & 0\\0 & \cos^{4}{\left(t \right)} \sinh^{2}{\left(\chi \right)} & 0 & 0\\0 & 0 & 0 & 0\\0 & 0 & 0 & \sin^{2}{\left(\theta \right)} \cos^{4}{\left(t \right)} \sinh^{4}{\left(\chi \right)}\end{matrix}\right] & \left[\begin{matrix}0 & 0 & 0 & 0\\0 & 0 & 0 & 0\\0 & 0 & 0 & 0\\0 & 0 & - \sin^{2}{\left(\theta \right)} \cos^{4}{\left(t \right)} \sinh^{4}{\left(\chi \right)} & 0\end{matrix}\right]\\\left[\begin{matrix}0 & 0 & 0 & \sin^{2}{\left(\theta \right)} \cos^{2}{\left(t \right)} \sinh^{2}{\left(\chi \right)}\\0 & 0 & 0 & 0\\0 & 0 & 0 & 0\\0 & 0 & 0 & 0\end{matrix}\right] & \left[\begin{matrix}0 & 0 & 0 & 0\\0 & 0 & 0 & - \sin^{2}{\left(\theta \right)} \cos^{4}{\left(t \right)} \sinh^{2}{\left(\chi \right)}\\0 & 0 & 0 & 0\\0 & 0 & 0 & 0\end{matrix}\right] & \left[\begin{matrix}0 & 0 & 0 & 0\\0 & 0 & 0 & 0\\0 & 0 & 0 & - \sin^{2}{\left(\theta \right)} \cos^{4}{\left(t \right)} \sinh^{4}{\left(\chi \right)}\\0 & 0 & 0 & 0\end{matrix}\right] & \left[\begin{matrix}- \sin^{2}{\left(\theta \right)} \cos^{2}{\left(t \right)} \sinh^{2}{\left(\chi \right)} & 0 & 0 & 0\\0 & \sin^{2}{\left(\theta \right)} \cos^{4}{\left(t \right)} \sinh^{2}{\left(\chi \right)} & 0 & 0\\0 & 0 & \sin^{2}{\left(\theta \right)} \cos^{4}{\left(t \right)} \sinh^{4}{\left(\chi \right)} & 0\\0 & 0 & 0 & 0\end{matrix}\right]\end{matrix}\right]$
[4]:
weyl.config
[4]:
'llll'