GravityLab is a fast astrophysical N-body simulator written in Python and Cython. Performance-critical parts of the code, such as physics solvers, are implemented in Cython, which makes GravityLab very fast. The main Python module provides a powerful, yet simple class Simulation
which makes the process of creating, running, and plotting GralityLab simulations very simple for the user.
-
Fast Cython physics solvers
- N-body integrators:
- Leapfrog method
- Euler-Cromer method
- Acceleration solver
- Separation solver
- N-body integrators:
-
Powerful Python module
Simulation
class: easily setup simulations- Add initial conditions
- Run simulations
- Plot positions (with various options)
I wrote this code during my 10th grade, over the summer, as I learned about N-body simulations.
GravityLab is now available on PyPI, though it doesn't work.