Requires Python 3.5+. License: MIT
- Initial body config generator (from oscullating elements or state vectors);
- Main simulation;
- Analysis toolkit.
dummy
: for testing onlydummy_method
naive
: straightforward Python implementation without massive Numpy/Scipy usagesemi_explicit_euler
explicit_rk2
explicit_rk4
ralston
bogacki_shampine
(TODO)dormand_prince
(TODO)explicit_rk16
(TODO)crank_nicolson
(TODO)adams_bashforth_2
adams_bashforth_5
velocity_verlet
ruth3
ruth4
scipy
: usesscipy.integrate.solve_ivp
numpy
(TODO): massive Numpy/Scipy usagecython
(TODO): cythonized integration loopnumba
(TODO)cpp
(TODO): main loop in C++
Simulation parameters are set in a single YAML config file. See sample_configs/
for examples and description (TODO). Simulation name is the stem (filename without extension) of the config file, it is used in the intermediate file name generation.
To run simulation:
- Create YAML config (e.g.
simulation.yaml
) - Run
prepare_config.py
, which will generatesimulation.global
andsimulation.bodies
. - Run
nbody.py
(using simulation name as a parameter, heresimulation
), which will output to a directorysimulation/
. - Do some analysis using
plot.py
(using simulation name as a parameter).
- Gather accuracy info: build energy error graphs for
sample_configs/oscullating.yaml
for different dt and methods. - Gather performance info: create a table with per-iteration speeds for each method.
- Add plotting of effective oscullating elements for each body
- Upgrade position plot to use oscullating element "smoothing" to produce nice plots when T is large but
output_point_num
is low. - More methods for
naive
engine. - Create a list of useful methods for other engines.
- How
numpy
can be implemented? - Implement
cython
engine. - Better documentation
- Tests