This project uses plummer model to simulate star clusters. This model describes a star cluster consists of 10240 stars.
- The inital positions and velocities of all stars is given by Plummer 3D density profile.
- Leapfrog integration is used to integrate this hamiltonian system.
This project is written in C. Leapfrog integration part is sped up with CUDA.
- stable star clusters. If the velocity distribution is set by Plummer model, the star clusters will maintain in a stable status.
- unstable star clusters. If the velocity distribution is set randomly, the star clusters will spread out after a while.
- clone this repository
git clone https://github.com/CLaigit/plummer_cuda
-
change the compiler directory in Makefile
-
compile code compile both unstable cluster and stable cluster
make
- run run the stable cluster
./stable.o
run the unstable cluster
./unstable.o