Welcome to astrohut!

astrohut is a NBody gravity simulator that aims to help students understand many body systems, as well as motivating the use of computational tools to solve physical problems. Written in Python, with the core functions in C, astrohut depends on the following libraries:

astrohut implements a Barnes-Hut tree to calculate forces.

Installing

astrohut is freely available on PyPI, thus can be easily installed with pip:

pip install astrohut

The development version is hosted on GitHub, and can be installed by running the setup.py.

python setup.py install

Documentation

astrohut is divided in five scripts: core/constants.py, core/core.py, core/interface.py, core/structs2d.py. They contain the definition of the Simulation class, as well as the structures body2d, node2d, point2d.

Root class is Simulation which defines the system in which the simulation will take place.

Indices and tables