This repository contains astrophysical N-body simulation experiments.
First prepare an environment. I used conda environment with Python 3.9:
conda create -n agama python=3.9
Clone this repository and install all required packages in the environment:
git clone https://github.com/savchenkoyana/Nbody.git
cd Nbody
conda activate agama
pip install -r requirements.txt
pre-commit install # optional, only if you want to commit to repository
To install NEMO, follow these steps:
git clone https://github.com/teuben/nemo # I use commit 8a2cbf4fcd565d7a55403ba135fd64716ef0b812
cd nemo
./configure --with-yapp=pgplot
make build check bench5
cd ../ # back to repository root
If installation completed successfully, you should get "TESTSUITE: OK" for each test (see file install.log
).
Note: Everytime you want to use NEMO, you first need to execute this from
nemo
repository root:source nemo_start.sh
Alternatively, you might want to add the command above (with the full path to
nemo_start.sh
) at the end of your.bashrc
file.
For more info about NEMO see NEMO's user guide and NEMO's official documentations
Activate conda environment, if it is not activated:
conda activate agama
To install Agama, follow these steps:
git clone https://github.com/GalacticDynamics-Oxford/Agama.git # I use commit acf08a656e2aa67d466cafd7c92ba2cd277ff9e8
cd Agama
pip install .
cd ../ # back to repository root
For more info about Agama see https://arxiv.org/pdf/1802.08239 and official AGAMA documentation.
To install glnemo2
for snapshot visualization, follow the instructions at the official site.
After installation, you will have the following repository structure:
Nbody
├── Agama # Agama repository root
├── nemo # nemo repository root
├── sandbox
├── images
├── README.md
├── requirements.txt
├── ... # other files
This experiment demonstrates how to create a self-consistent model for a custom density function. This is just a toy example based on https://arxiv.org/pdf/1807.06590 For more info see README
This experiment is based on article Primordial Black Hole clusters, phenomenology & implications by Juan Garcia-Bellido. The goal of this experiment is to create a self-consistent model with Plummer density profile and log-normal mass spectrum, and then evolve it for Hubble time. For more info see README