Barnes–Hut simulation to study the formation and evolution of self-gravitating systems.
A configuration file is used to specify all the parameters of the simulation. Simulation data will be written to the folder defined in the configuration file. See conf.ini for an example. It provides sensible default parameters to obtain an accurate simulation of a globular cluster's collapse.
Install Rust: https://www.rust-lang.org/tools/install
Use Cargo to build and run:
cargo run --release conf.ini
Plot energy, virial, density...:
python ./scripts/plot.py <simulation-folder>
Analyse orbits:
python ./scripts/periode.py <simulation-folder>
Render a video of the simulation (use gnuplot + ffmpeg):
./scripts/gnuplot.sh <simulation-folder>