Issue with transitioning code for computing stellar orbit around a black hole to solve_ivp in Python
I’ve been working on a Python code to compute the orbit of a star around a black hole at the center of our Galaxy. The code includes an implementation of a gaseous disc with hydrodynamical drag force considered alongside the gravitational interaction. Initially, I implemented a 4th order Runge-Kutta method to solve the differential equations governing the motion. However, I wanted to enhance the code’s efficiency and accuracy by leveraging the solve_ivp function from the SciPy library.