Newtonian N-body gravity simulator accelerated with C library
This is a student project developed for learning purpose. It aims to provide a toolbox for simple Newtonian gravity simulations and visualizations.
Features:
- Ten integrators including WHFast and IAS15
- Barnes-Hut algorithm
- Interfaces: CLI and API
- CUDA implementation for the pairwise acceleration function
- Multiple sample projects
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:
The documentations for CLI and API are available in the docs
folder.
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