How does the mass of dark matter halos distribute? This project implements the Barnes-Hut algorithm, creating a high performance N-body simulation using recursive data structures. The algorithm evolves 200k+ particles via a verlet scheme. Initial conditions are generated by Metropolis Monte-Carlo sampled from a user-defined distribution function. When the system virialises, it is then fit against known density profiles to study the properties of the halo. (Feb 2025, Year 2)
Libraries used: NumPy, SciPy, MatPlotLib, Imageio
Github link and PDF coming soon.