AG-2025.11-291·physics.ed-ph·cross-listed: astro-ph.IMgr-qc
gr-Orbit-Toolkit: A Python-Based Software for Simulating and Visualizing Relativistic Orbits
Authors
- Milagros Delgado
- Wladimir E. Banda-Barragán
Abstract
Creating software dedicated to simulation is essential for teaching and research in Science, Technology, Engineering, and Mathematics (STEM). Physics lecturing can be more effective when digital twins are used to accompany theory classes. Research in physics has greatly benefited from the advent of modern, high-level programming languages, which facilitate the implementation of user-friendly code. Here, we report our own Python-based software, the gr-orbit-toolkit, to simulate orbits in classical and general relativistic scenarios. First, we present the ordinary differential equations (ODEs) for classical and relativistic orbital accelerations. For the latter, we follow a post-Newtonian approach. Second, we describe our algorithm, which numerically integrates these ODEs to simulate the orbits of small-sized objects orbiting around massive bodies by using Euler and Runge-Kutta methods. Then, we study a set of sample two-body models with either the Sun or a black hole in the center. Our simulations confirm that the orbital motions predicted by classical and relativistic ODEs drastically differ for bodies near the Schwarzschild radius of the central massive body. Classical mechanics explains the orbital motion of objects far away from a central massive body, but general relativity is required to study objects moving at close proximity to a massive body, where the gravitational field is strong. Our study on objects with different eccentricities confirms that our code captures relativistic orbital precession. Our convergence analysis shows the toolkit is numerically robust. Our gr-orbit-toolkit aims at facilitating teaching and research in general relativity, so a comprehensive user and developer guide is provided in the public code repository.
Submitted
13 November 20255 months ago
Version
v1
License
CC-BY-4.0
DOI
10.48550/arXiv.2511.19442
Chat with this PDF
Ask questions, probe assumptions, request a plain-English summary. Answers cite sections from the preprint itself.
Community
Questions and answers about this paper from other readers. No formal peer review — just a place to think out loud.