SageMath notebooks associated to the Black Hole Lectures (https://luth.obspm.fr/~luthier/gourgoulhon/bh16)
Plots of null 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.2). 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()
:
Functions and for spherical photon orbits:
-turning points:
Plot of for various values of
Critical null geodesic
Parameters of a spherical photon orbit at :
Chosen parameters 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.
The numerical integration of the geodesic equation is performed via integrate()
, by providing the integration step :
quantity | value | initial value | diff. | relative diff. |
Escaping null geodesic close to the critical one
quantity | value | initial value | diff. | relative diff. |
Trapped null geodesic close to the critical one
quantity | value | initial value | diff. | relative diff. |