Python N-body gravity solver accelerated with C
This is a student project developed for learning purpose. It aims to provide a toolbox for Newtonian gravity simulations and visualizations.
Features:
- Ten integrators including WHFast and IAS15
- Barnes-Hut algorithm
- CLI (for simple usage) and API Interfaces
- (Optional) OpenMP and CUDA acceleration
- Multiple sample projects
The documentations for CLI and API are available in the docs
folder.
Some projects are done with the API. The scripts are stored at the examples
folder.
Videos:
Note: This simulation is for demonstration only. The initial conditions are very different from actual galaxies.
Videos:
If you found any bugs or want to leave some feedback, please feel free to let me know by opening an issue or sending an email to alvinng324@gmail.com.
The following book helped me a lot in learning the basics of N-body simulations and also the implementation of the integrators.
- J. Roa, et al. Moving Planets Around: An Introduction to N-Body Simulations Applied to Exoplanetary Systems, MIT Press, 2020