I am a student trying to code a black hole with a star orbiting around it with Einsteinpy. The example code which I have does not show how to add the masses of the two objects I need. All I want to do with this is code a star with a mass of X orbiting a black hole of mass Y at a distance of Z. I need to use this module as it uses Einsetin's correction to Newton's formula.
I checked the user guide and there's nothing on coding something like this.
https://docs.einsteinpy.org/en/latest/user_guide.html
If anyone knows how to use this module or can figure this out I would be grateful.
import numpy as np
from einsteinpy.geodesic import Timelike
from einsteinpy.plotting.geodesic import GeodesicPlotter
position = [40, np.pi / 2, 0.]
momentum = [0., 0., 0.]
a = 0.
steps = 5500
delta = 1.
geod = Timelike(
metric="Schwarzschild",
metric_params=(a,),
position=position,
momentum=momentum,
steps=steps,
delta=delta,
return_cartesian=True
)
gpl = GeodesicPlotter()
gpl.plot2D(geod, coordinates=(1, 2)) # Plot X & Y only
gpl.show()