SageMath notebooks associated to the Black Hole Lectures (https://luth.obspm.fr/~luthier/gourgoulhon/bh16)
Timelike orbits in Schwarzschild spacetime
This Jupyter/SageMath worksheet is relative to the lectures Geometry and physics of black holes.
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
It uses the integrated_geodesic
functionality introduced by Karim Van Aelst in SageMath 8.1, in the framework of the SageManifolds project.
A version of SageMath at least equal to 8.1 is required to run this worksheet:
We define first the spacetime manifold and the standard Schwarzschild-Droste coordinates on it:
For graphical purposes, we introduce and some coordinate map :
Next, we define the Schwarzschild metric:
We set the specific conserved energy and angular momentum:
Pericenter and apocenter:
We pick an initial point and an initial tangent vector:
Let us check that the scalar square of is , by means of the metric tensor at :
The scalar square is indeed equal to :
Check
Let us compute the conserved energy and angular momentum along the geodesic by taking scalar products of the 4-velocity with the Killing vectors and :
The specific conserved energy is:
while the specific conserved angular momentum is
We declare the geodesic through having as inital vector, denoting by the affine parameter (proper time):
We ask for the numerical integration of the geodesic, providing some numerical value for the parameter , and then plot it in terms of the Cartesian chart:
Some details about the system solved to get the geodesic:
We recognize in the above list the Christoffel symbols of the metric :