SageMath notebooks associated to the Black Hole Lectures (https://luth.obspm.fr/~luthier/gourgoulhon/bh16)
Plots of geodesics in Kerr spacetime
Computation with kerrgeodesic_gw
This Jupyter/SageMath notebook is relative to the lectures Geometry and physics of black holes.
It requires SageMath (version 8.2), with the package kerrgeodesic_gw (version 0.3). To install the latter, simply run
in a terminal.
First, we set up the notebook to use LaTeX-formatted display:
and we ask for CPU demanding computations to be performed in parallel on 8 processes:
A Kerr black bole is entirely defined by two parameters , where is the black hole mass and is the black hole angular momentum divided by . In this notebook, we shall set and we denote the angular momentum parameter by the symbolic variable a
, using a0
for a specific numerical value:
The spacetime object is created as an instance of the class KerrBH
:
The Boyer-Lindquist coordinate of the event horizon:
The method boyer_lindquist_coordinates()
returns the chart of Boyer-Lindquist coordinates BL
and allows the user to instanciate the Python variables (t, r, th, ph)
to the coordinates :
The metric tensor is naturally returned by the method metric()
:
Bound timelike geodesic
We set and pick some values of , and , with to ensure that we are dealing with a bound geodesic:
Let us choose the initial point for the geodesic:
A geodesic is constructed by providing the range of the affine parameter , the initial point and either
(i) the Boyer-Lindquist components of the initial 4-momentum vector ,
(ii) the four integral of motions
or (iii) some of the components of along with with some integrals of motion. We shall also specify some numerical value for the Kerr spin parameter .
Here, we choose , the option (ii) and , where in the black hole mass::
The numerical integration of the geodesic equation is performed via integrate()
, by providing the integration step in units of :
We can then plot the geodesic:
Actually, many options can be passed to the method plot()
. For instance to a get a 3D spacetime diagram:
or to get the trace of the geodesic in the plane:
or else to get the trace in the plane:
Analytic formula for :
Let us check that the values of , , and evaluated at are equal to those at up to the numerical accuracy of the integration scheme:
quantity | value | initial value | diff. | relative diff. |
Decreasing the integration step leads to smaller errors:
quantity | value | initial value | diff. | relative diff. |
Ingoing null geodesic with negative angular momentum
We choose a ingoing null geodesic in the equatorial plane with , starting at the point of Boyer-Lindquist coordinates :
quantity | value | initial value | diff. | relative diff. |
- |
Ingoing time geodesic with zero angular momentum
quantity | value | initial value | diff. | relative diff. |
- |