| Hosted by CoCalc | Download
Kernel: SageMath 6.10

Checking that Kerr metric is a solution of Einstein equation

This Jupyter/SageMath worksheet is relative to the lectures Geometry and physics of black holes

These computations are based on SageManifolds (v0.9)

Click here to download the worksheet file (ipynb format). To run it, you must start SageMath with the Jupyter notebook, with the command sage -n jupyter

First we set up the notebook to display mathematical objects using LaTeX formatting:

%display latex

Spacetime

We declare the spacetime manifold MM:

M = Manifold(4, 'M') print(M)
4-dimensional differentiable manifold M

and the Boyer-Lindquist coordinates (t,r,θ,ϕ)(t,r,\theta,\phi) as a chart on MM:

XBL.<t,r,th,ph> = M.chart(r't r th:(0,pi):\theta ph:(0,2*pi):\phi') XBL
XBL.coord_range()

Kerr metric

We define the metric gg by its components w.r.t. the Boyer-Lindquist coordinates:

g = M.lorentzian_metric('g') m, a = var('m a') rho2 = r^2 + (a*cos(th))^2 Delta = r^2 - 2*m*r + a^2 g[0,0] = -(1 - 2*m*r/rho2) g[0,3] = -2*a*m*r*sin(th)^2/rho2 g[1,1] = rho2/Delta g[2,2] = rho2 g[3,3] = (r^2 + a^2 + 2*m*r*(a*sin(th))^2/rho2)*sin(th)^2 g.display()
g.display_comp()

The inverse metric:

g.inverse()[:]

The Christoffel symbols:

g.christoffel_symbols_display()

The Einstein equation

Let us check that the Ricci tensor of gg vanishes identically, which is equivalent to the Einstein equation in vacuum:

g.ricci().display() # can take 1 or 2 minutes

On the contrary, the Riemann tensor is not zero:

R = g.riemann() print(R)
Tensor field Riem(g) of type (1,3) on the 4-dimensional differentiable manifold M
R[0,1,2,3]

The Kretschmann scalar

The Kretschmann scalar is the following square of the Riemann tensor: K=RabcdRabcd K = R_{abcd} R^{abcd} We compute first the tensors RabcdR_{abcd} and RabcdR^{abcd} by respectively lowering and raising the indices of RR with the metric gg:

dR = R.down(g) print(dR)
Tensor field of type (0,4) on the 4-dimensional differentiable manifold M
uR = R.up(g) print(uR)
Tensor field of type (4,0) on the 4-dimensional differentiable manifold M

Then we perform the contraction:

K = dR['_{abcd}']*uR['^{abcd}'] print(K) K.display()
Scalar field on the 4-dimensional differentiable manifold M

A variant of this expression can be obtained by invoking the factor() method on the coordinate function representing the scalar field in the manifold's default chart:

Kr = K.expr().factor() Kr

The Schwarzschild value of the Kretschmann scalar is recovered for a=0a=0

Kr.subs(a=0)