# 3+1 slicing of Kerr spacetime¶

This notebook demonstrates a few capabilities of SageMath in computations regarding the 3+1 slicing of Kerr spacetime. The corresponding tools have been developed within the SageManifolds project (version 1.3, as included in SageMath 8.3).

Click here to download the notebook 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 8.2 is required to run this notebook:

In :
version()

Out:
'SageMath version 8.3, Release Date: 2018-08-03'

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

In :
%display latex


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

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


## Spacelike hypersurface¶

We consider some hypersurface $\Sigma$ of a spacelike foliation $(\Sigma_t)_{t\in\mathbb{R}}$ of Kerr spacetime; we declare $\Sigma_t$ as a 3-dimensional Riemannian manifold:

In :
Sig = Manifold(3, 'Sigma', latex_name=r'\Sigma',
structure='Riemannian', metric_name='gam',
metric_latex_name=r'\gamma', start_index=1)
print(Sig)

3-dimensional Riemannian manifold Sigma


On $\Sigma$, we consider the "rational-polynomial" coordinates $(r,y,\phi)$ inheritated from the standard Boyer-Lindquist coordinates $(t,r,\theta,\phi)$ of Kerr spacetime, via $y=\cos\theta$:

In :
X.<r,y,ph> = Sig.chart(r'r:(1,+oo) y:(-1,1) ph:(0,2*pi):\phi')
print(X) ; X

Chart (Sigma, (r, y, ph))

Out:

### Riemannian metric on $\Sigma$

First the two Kerr parameters:

In :
var('m, a', domain='real')
assume(m > 0)
assume(a > 0)
assume(a^2-2*m*r+r^2 > 0)  # region where Sigma is spacelike
assumptions()

Out:

For dealing with extreme Kerr, the following must be uncommented:

In :
# m = 1 ; a = 1


Some shortcut notations:

In :
rho2 = r^2 + a^2*y^2
Del = r^2 -2*m*r + a^2
AA2 = rho2*(r^2 + a^2) + 2*a^2*m*r*(1-y^2)
BB2 = r^2 + a^2 + 2*a^2*m*r*(1-y^2)/rho2


The metric $\gamma$ induced by the spacetime metric $g$ on $\Sigma$:

In :
gam = Sig.metric()
gam[1,1] = rho2/Del
gam[2,2] = rho2/(1-y^2)
gam[3,3] = BB2*(1-y^2)
gam.display()

Out:

A matrix view of the components w.r.t. coordinates $(r,y,\phi)$:

In :
gam[:]

Out:

### Lapse function and shift vector

In :
N = Sig.scalar_field(sqrt(Del / BB2), name='N')
print(N)
N.display()

Scalar field N on the 3-dimensional Riemannian manifold Sigma

Out:
In :
b = Sig.vector_field('beta', latex_name=r'\beta')
b = -2*m*r*a/AA2
# unset components are zero
b.display()

Out:

### Extrinsic curvature of $\Sigma$¶

We use the formula $$K_{ij} = \frac{1}{2N} \mathcal{L}_{\beta} \gamma_{ij}$$ which is valid for any stationary spacetime:

In :
K = gam.lie_der(b) / (2*N)
K.set_name('K')
print(K) ; K.display()

Field of symmetric bilinear forms K on the 3-dimensional Riemannian manifold Sigma

Out:

Check (comparison with known formulas):

In :
Krp = a*m*(1-y^2)*(3*r^4+a^2*r^2+a^2*(r^2-a^2)*y^2) / rho2^2/sqrt(Del*BB2)
Krp

Out:
In :
K[1,3] - Krp

Out:
In :
Kyp = 2*m*r*a^3*(1-y^2)*y*sqrt(Del)/rho2^2/sqrt(BB2)
Kyp

Out:
In :
K[2,3] - Kyp

Out:

For now on, we use the expressions Krp and Kyp above for $K_{r\phi}$ and $K_{ry}$, respectively:

In :
K1 = Sig.sym_bilin_form_field('K')
K1[1,3] = Krp
K1[2,3] = Kyp
K = K1
K.display()

Out:
In :
K.display_comp()

Out:

The type-(1,1) tensor $K^\sharp$ of components $K^i_{\ \, j} = \gamma^{ik} K_{kj}$:

In :
Ku = K.up(gam, 0)
print(Ku) ; Ku.display()

Tensor field of type (1,1) on the 3-dimensional Riemannian manifold Sigma

Out:

We may check that the hypersurface $\Sigma$ is maximal, i.e. that $K^k_{\ \, k} = 0$:

In :
trK = Ku.trace()
print(trK)
trK.display()

Scalar field zero on the 3-dimensional Riemannian manifold Sigma

Out:

### Connection and curvature

Let us call $D$ the Levi-Civita connection associated with $\gamma$:

In :
D = gam.connection(name='D')
print(D) ; D

Levi-Civita connection D associated with the Riemannian metric gam on the 3-dimensional Riemannian manifold Sigma

Out:

The Ricci tensor associated with $\gamma$:

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

Field of symmetric bilinear forms Ric(gam) on the 3-dimensional Riemannian manifold Sigma

Out:
In :
Ric.display_comp(only_nonredundant=True)

Out:
In :
Ric[1,1].factor()

Out:
In :
Ric[1,2].factor()

Out:
In :
Ric[1,3]

Out:
In :
Ric[2,2].factor()

Out:
In :
Ric[2,3]

Out:
In :
Ric[3,3].factor()

Out:

The scalar curvature $R = \gamma^{ij} R_{ij}$:

In :
R = gam.ricci_scalar(name='R')
print(R)
R.display()

Scalar field R on the 3-dimensional Riemannian manifold Sigma

Out:
In :
R.expr().factor()

Out:

## 3+1 Einstein equations

Let us check that the vacuum 3+1 Einstein equations are satisfied.

We start by the contraint equations:

### Hamiltonian constraint

Let us first evaluate the term $K_{ij} K^{ij}$:

In :
Kuu = Ku.up(gam, 1)
trKK = K['_ij']*Kuu['^ij']
print(trKK) ; trKK.display()

Scalar field on the 3-dimensional Riemannian manifold Sigma

Out:

The vacuum Hamiltonian constraint equation is $$R + K^2 -K_{ij} K^{ij} = 0$$

In :
Ham = R + trK^2 - trKK
print(Ham) ; Ham.display()

Scalar field on the 3-dimensional Riemannian manifold Sigma

Out:

### Momentum constraint¶

In vaccum, the momentum constraint is $$D_j K^j_{\ \, i} - D_i K = 0$$

In :
mom = D(Ku).trace(0,2) - D(trK)
print(mom)
mom.display()

1-form on the 3-dimensional Riemannian manifold Sigma

Out:

### Dynamical Einstein equations

Let us first evaluate the symmetric bilinear form $k_{ij} := K_{ik} K^k_{\ \, j}$:

In :
KK = K['_ik']*Ku['^k_j']
print(KK)

Tensor field of type (0,2) on the 3-dimensional Riemannian manifold Sigma

In :
KK1 = KK.symmetrize()
KK == KK1

Out:
In :
KK = KK1
print(KK)

Field of symmetric bilinear forms on the 3-dimensional Riemannian manifold Sigma

In :
KK.set_name('(KK)')
KK.display_comp()

Out:

In vacuum and for stationary spacetimes, the dynamical Einstein equations are $$\mathcal{L}_\beta K_{ij} - D_i D_j N + N \left( R_{ij} + K K_{ij} - 2 K_{ik} K^k_{\ \, j}\right) = 0$$

In :
dyn = K.lie_der(b) - D(D(N)) + N*( Ric + trK*K - 2*KK )
print(dyn)
dyn.display()

Tensor field of type (0,2) on the 3-dimensional Riemannian manifold Sigma

Out:

## Electric and magnetic parts of the Weyl tensor¶

The electric part is the bilinear form $E$ given by $$E_{ij} = R_{ij} + K K_{ij} - K_{ik} K^k_{\ \, j}$$

In :
E = Ric + trK*K - KK
print(E)

Field of symmetric bilinear forms on the 3-dimensional Riemannian manifold Sigma

In :
E.set_name('E')
E.display_comp(only_nonzero=False)

Out:

Let us factorize the components for a shorter display:

In :
for i in range(1,4):
for j in range(i,4):
comp = E[i,j]
if comp:  # factorization attempted for nonzero components
comp.factor()
E.display_comp(only_nonzero=False)

Out:

The magnetic part is the bilinear form $B$ defined by $$B_{ij} = \epsilon^k_{\ \, i l} D_k K^l_{\ \, j},$$ where $\epsilon^k_{\ \, i l}$ are the components of the type-(1,2) tensor $\epsilon^\sharp$, related to the Levi-Civita alternating tensor $\epsilon$ associated with $\gamma$ by $\epsilon^k_{\ \, i l} = \gamma^{km} \epsilon_{m i l}$. In SageManifolds, $\epsilon$ is obtained by the command volume_form() and $\epsilon^\sharp$ by the command volume_form(1) (1 = one index raised):

In :
eps = gam.volume_form()
print(eps) ; eps.display()

3-form eps_gam on the 3-dimensional Riemannian manifold Sigma

Out:
In :
epsu = gam.volume_form(1)
print(epsu) ; epsu.display()

Tensor field of type (1,2) on the 3-dimensional Riemannian manifold Sigma

Out:
In :
DKu = D(Ku)
B = epsu['^k_il']*DKu['^l_jk']
print(B)

Tensor field of type (0,2) on the 3-dimensional Riemannian manifold Sigma


Let us check that $B$ is symmetric:

In :
B1 = B.symmetrize()
B == B1

Out:

Accordingly, we set

In :
B = B1
B.set_name('B')
print(B)

Field of symmetric bilinear forms B on the 3-dimensional Riemannian manifold Sigma


As we did for $E$, we factorize the components of $B$ before displaying them:

In :
for i in range(1,4):
for j in range(i,4):
comp = B[i,j]
if comp:  # factorization attempted for nonzero components
comp.factor()
B.display_comp(only_nonzero=False)

Out: