# Kerr-Newman spacetime¶

This worksheet demonstrates a few capabilities of SageManifolds (version 1.0, as included in SageMath 7.5) in computations regarding Kerr-Newman spacetime.

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

NB: a version of SageMath at least equal to 7.5 is required to run this worksheet:

In :
version()

Out:
'SageMath version 7.5, Release Date: 2017-01-11'

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

In :
%display latex


We also define a viewer for 3D plots (use 'threejs' or 'jmol' for interactive 3D graphics):

In :
viewer3D = 'threejs' # must be 'threejs', jmol', 'tachyon' or None (default)


Since some computations are quite long, we ask for running them in parallel on 8 cores:

In :
Parallelism().set(nproc=8)


## Spacetime manifold¶

We declare the Kerr-Newman spacetime as a 4-dimensional diffentiable manifold:

In :
M = Manifold(4, 'M', r'\mathcal{M}')


Let us use the standard Boyer-Lindquist coordinates on it, by first introducing the part $\mathcal{M}_0$ covered by these coordinates

In :
M0 = M.open_subset('M0', r'\mathcal{M}_0')
# BL = Boyer-Lindquist
BL.<t,r,th,ph> = M0.chart(r't r:(0,+oo) th:(0,pi):\theta ph:(0,2*pi):\phi')
print(BL) ; BL

Chart (M0, (t, r, th, ph))

Out:

## Metric tensor

The 3 parameters $m$, $a$ and $q$ of the Kerr-Newman spacetime are declared as symbolic variables:

In :
var('m a q')

Out:

Let us introduce the spacetime metric:

In :
g = M.lorentzian_metric('g')


The metric is defined by its components in the coordinate frame associated with Boyer-Lindquist coordinates, which is the current manifold's default frame:

In :
rho2 = r^2 + (a*cos(th))^2
Delta = r^2 -2*m*r + a^2 + q^2
g[0,0] = -1 + (2*m*r-q^2)/rho2
g[0,3] = -a*sin(th)^2*(2*m*r-q^2)/rho2
g[1,1], g[2,2] = rho2/Delta, rho2
g[3,3] = (r^2 + a^2 + (2*m*r-q^2)*(a*sin(th))^2/rho2)*sin(th)^2
g.display()

Out:

The list of the non-vanishing components:

In :
g.display_comp()

Out:

The component $g^{tt}$ of the inverse metric:

In :
g.inverse()[0,0]

Out:

The lapse function:

In :
N = 1/sqrt(-(g.inverse()[[0,0]])) ; N

Out:
In :
N.display()

Out:

## Electromagnetic field tensor

Let us first introduce the 1-form basis associated with Boyer-Lindquist coordinates:

In :
dBL = BL.coframe() ; dBL

Out:

The electromagnetic field tensor $F$ is formed as [cf. e.g. Eq. (33.5) of Misner, Thorne & Wheeler (1973)]

In :
F = M.diff_form(2, name='F')
F.set_restriction( q/rho2^2 * (r^2-a^2*cos(th)^2)* dBL.wedge( dBL - a*sin(th)^2* dBL ) + \
2*q/rho2^2 * a*r*cos(th)*sin(th)* dBL.wedge( (r^2+a^2)* dBL - a* dBL ) )
F.display()

Out:

The list of non-vanishing components:

In :
F.display_comp()

Out:

The Hodge dual of $F$:

In :
star_F = F.hodge_dual(g) ; star_F.display()

Out:

### Maxwell equations

Let us check that $F$ obeys the two (source-free) Maxwell equations:

In :
F.exterior_derivative().display()

Out:
In :
star_F.exterior_derivative().display()

Out:

## Levi-Civita Connection

The Levi-Civita connection $\nabla$ associated with $g$:

In :
nab = g.connection() ; print(nab)

Levi-Civita connection nabla_g associated with the Lorentzian metric g on the 4-dimensional differentiable manifold M


Let us verify that the covariant derivative of $g$ with respect to $\nabla$ vanishes identically:

In :
nab(g) == 0

Out:

Another view of the above property:

In :
nab(g).display()

Out:

The nonzero Christoffel symbols (skipping those that can be deduced by symmetry of the last two indices):

In :
g.christoffel_symbols_display()

Out:

## Killing vectors

The default vector frame on the spacetime manifold is the coordinate basis associated with Boyer-Lindquist coordinates:

In :
M.default_frame() is BL.frame()

Out:
In :
BL.frame()

Out:

Let us consider the first vector field of this frame:

In :
xi = BL.frame() ; xi

Out:
In :
print(xi)

Vector field d/dt on the Open subset M0 of the 4-dimensional differentiable manifold M


The 1-form associated to it by metric duality is

In :
xi_form = xi.down(g) ; xi_form.display()

Out:

Its covariant derivative is

In :
nab_xi = nab(xi_form) ; print(nab_xi) ; nab_xi.display()

Tensor field of type (0,2) on the Open subset M0 of the 4-dimensional differentiable manifold M

Out:

Let us check that the vector field $\xi=\frac{\partial}{\partial t}$ obeys Killing equation:

In :
nab_xi.symmetrize() == 0

Out:

Similarly, let us check that $\chi := \frac{\partial}{\partial\phi}$ is a Killing vector:

In :
chi = BL.frame() ; chi

Out:
In :
nab(chi.down(g)).symmetrize() == 0

Out:

Another way to check that $\xi$ and $\chi$ are Killing vectors is the vanishing of the Lie derivative of the metric tensor along them:

In :
g.lie_derivative(xi) == 0

Out:
In :
g.lie_derivative(chi) == 0

Out:

## Curvature

The Ricci tensor associated with $g$:

In :
Ric = g.ricci() ; print(Ric)

Field of symmetric bilinear forms Ric(g) on the 4-dimensional differentiable manifold M

In :
Ric.display()

Out:
In :
Ric[:]

Out:

Let us check that in the Kerr case, i.e. when $q=0$, the Ricci tensor is zero:

In :
Ric[:].subs(q=0)

Out:

The Riemann curvature tensor associated with $g$:

In :
R = g.riemann() ; print(R)

Tensor field Riem(g) of type (1,3) on the 4-dimensional differentiable manifold M


The component $R^0_{\ \, 101}$ of the Riemann tensor is

In :
R[0,1,0,1]

Out:

The expression in the uncharged limit (Kerr spacetime) is

In :
R[0,1,0,1].expr().subs(q=0).simplify_rational()

Out:

while in the non-rotating limit (Reissner-Nordström spacetime), it is

In :
R[0,1,0,1].expr().subs(a=0).simplify_rational()

Out:

In the Schwarzschild limit, it reduces to

In :
R[0,1,0,1].expr().subs(a=0, q=0).simplify_rational()

Out:

Obviously, it vanishes in the flat space limit:

In :
R[0,1,0,1].expr().subs(m=0, a=0, q=0)

Out:

### Bianchi identity

Let us check the Bianchi identity $\nabla_p R^i_{\ \, j kl} + \nabla_k R^i_{\ \, jlp} + \nabla_l R^i_{\ \, jpk} = 0$:

In :
DR = nab(R) ; print(DR)  #long (takes a while)

Tensor field nabla_g(Riem(g)) of type (1,4) on the 4-dimensional differentiable manifold M

In :
for i in M.irange():
for j in M.irange():
for k in M.irange():
for l in M.irange():
for p in M.irange():
print DR[i,j,k,l,p] + DR[i,j,l,p,k] + DR[i,j,p,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 0 0 0


If the last sign in the Bianchi identity is changed to minus, the identity does no longer hold:

In :
DR[0,1,2,3,1] + DR[0,1,3,1,2] + DR[0,1,1,2,3] # should be zero (Bianchi identity)

Out:
In :
DR[0,1,2,3,1] + DR[0,1,3,1,2] - DR[0,1,1,2,3] # note the change of the second + to -

Out:

### Ricci scalar¶

The Ricci scalar $R = g^{ab} R_{ab}$ of the Kerr-Newman spacetime vanishes identically:

In :
g.ricci_scalar().display()

Out:

## Einstein equation

The Einstein tensor is

In :
G = Ric - 1/2*g.ricci_scalar()*g ; print(G)

Field of symmetric bilinear forms +Ric(g) on the 4-dimensional differentiable manifold M


Since the Ricci scalar is zero, the Einstein tensor reduces to the Ricci tensor:

In :
G == Ric

Out:

The invariant $F_{ab} F^{ab}$ of the electromagnetic field:

In :
Fuu = F.up(g)
F2 = F['_ab']*Fuu['^ab'] ; print(F2)

Scalar field on the 4-dimensional differentiable manifold M

In :
F2.display()

Out:

The energy-momentum tensor of the electromagnetic field:

In :
Fud = F.up(g,0)
T = 1/(4*pi)*( F['_k.']*Fud['^k_.'] - 1/4*F2 * g ); print(T)

Tensor field of type (0,2) on the 4-dimensional differentiable manifold M

In :
T[:]

Out:

Check of the Einstein equation:

In :
G == 8*pi*T

Out:

### Kretschmann scalar¶

The tensor $R^\flat$, of components $R_{abcd} = g_{am} R^m_{\ \, bcd}$:

In :
dR = R.down(g) ; print(dR)

Tensor field of type (0,4) on the 4-dimensional differentiable manifold M


The tensor $R^\sharp$, of components $R^{abcd} = g^{bp} g^{cq} g^{dr} R^a_{\ \, pqr}$:

In :
uR = R.up(g) ; print(uR)

Tensor field of type (4,0) on the 4-dimensional differentiable manifold M


The Kretschmann scalar $K := R^{abcd} R_{abcd}$:

In :
Kr_scalar = uR['^ijkl']*dR['_ijkl']
Kr_scalar.display()

Out:

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:

In :
Kr = Kr_scalar.coord_function()
Kr.factor()

Out:

As a check, we can compare Kr to the formula given by R. Conn Henry, Astrophys. J. 535, 350 (2000):

In :
Kr == 8/(r^2+(a*cos(th))^2)^6 *(
6*m^2*(r^6 - 15*r^4*(a*cos(th))^2 + 15*r^2*(a*cos(th))^4 - (a*cos(th))^6)
- 12*m*q^2*r*(r^4 - 10*(a*r*cos(th))^2 + 5*(a*cos(th))^4)
+ q^4*(7*r^4 - 34*(a*r*cos(th))^2 + 7*(a*cos(th))^4) )

Out:

The Schwarzschild value of the Kretschmann scalar is recovered by setting $a=0$ and $q=0$:

In :
Kr.expr().subs(a=0, q=0)

Out:

Let us plot the Kretschmann scalar for $m=1$, $a=0.9$ and $q=0.5$:

In :
K1 = Kr.expr().subs(m=1, a=0.9, q=0.5)
plot3d(K1, (r,1,3), (th, 0, pi), viewer=viewer3D, axes_labels=['r', 'theta', 'Kr'])

Out: