Visualizing advancement of perihelion in Schwarzschild space-time

import numpy as np
import astropy.units as u

from plotly.offline import init_notebook_mode

from einsteinpy.plotting import GeodesicPlotter
from einsteinpy.coordinates import SphericalDifferential
from einsteinpy.bodies import Body
from einsteinpy.geodesic import Geodesic
# Essential when using Jupyter Notebook (May skip in Jupyter Lab)

Defining various parameters

  • Mass of the attractor(M)

  • Initial position and velocity vectors of test partcle

Attractor = Body(name="BH", mass=6e24 *, parent=None)
sph_obj = SphericalDifferential(130*u.m, np.pi/2*u.rad, -np.pi/8*u.rad,
                                0*u.m/u.s, 0*u.rad/u.s, 1900*u.rad/u.s)
Object = Body(differential=sph_obj, parent=Attractor)
geodesic = Geodesic(body=Object, time=0 * u.s, end_lambda=0.002, step_size=5e-8)

Plotting the trajectory

obj = GeodesicPlotter()

It can be seen that the orbit advances along the azimuth angle on each revolution of test partcle .