Library / Study
9 · Simulating dark matter

N-body simulation and GADGET-4

Cold dark matter is simulated by following particles under gravity — the N-body method. This article covers how it works, the tree/particle-mesh solvers that make it feasible, and GADGET-4, the code that serves as our cold-dark-matter control.

The N-body idea

Cold dark matter is collisionless, so it is modelled as a set of $N$ tracer particles that interact only through gravity. Each particle feels the summed pull of all others; integrating their trajectories forward evolves the density field. The particles are not real dark-matter particles but Monte-Carlo samples of the phase-space distribution (the Vlasov flow, Topic 4.5).

Making gravity affordable

Direct summation is $O(N^2)$ — hopeless for $N\sim10^9$. Real codes use hierarchical tree methods (group distant particles and use their multipole) and particle-mesh (solve Poisson on a grid via FFT for long-range forces), often combined (TreePM). This brings the cost to $O(N\log N)$, making billion-particle boxes routine.

GADGET-4

GADGET-4 (Springel et al.) is a state-of-the-art TreePM N-body (and hydrodynamics) code. In our campaign it plays the role of the cold-dark-matter control: the same cosmological volume evolved with standard CDM physics, giving the baseline any FDM signal must be measured against.

Worked example — our control's validation

Our GADGET-4 run (512³ particles to $z=0$) reproduces the textbook $\Lambda$CDM: the halo mass function matches Sheth–Tormen to $\sim$1% (142,205 halos, median ratio 1.008), the power spectrum tracks linear theory then Halofit, and the concentration–mass relation follows Dutton–Macciò. A trustworthy control is the prerequisite for every FDM comparison.

Our GADGET-4 cold-dark-matter control reproduces the standard $\Lambda$CDM halo mass function (Sheth–Tormen), the validated baseline against which every FDM result is measured.

Why it is the right control

Because the Schrödinger–Poisson system reduces to Vlasov–Poisson as $\hbar/m\to0$ (Topic 4.5), an N-body CDM code and a wave FDM code describe the same physics on large scales. That correspondence is what makes GADGET-4 a valid, apples-to-apples baseline for our wave simulations — identical initial conditions, identical cosmology, only the small-scale physics differs.

N-body particles sampling the density field — the Monte-Carlo representation GADGET-4 evolves.
In our research

GADGET-4 is the CDM control lane of the campaign. Its $z=0$ validation (HMF, P(k), c–M all matching theory) and its $z=6$ FOF catalog (91,058 halos) are what our FDM sims are compared against — most directly in the sim-vs-theory mass function (Task 1) and the $c(M)$ relation (Task 2).

Key references
  • Springel et al. (2021), GADGET-4, MNRAS 506, 2871 (arXiv:2010.03567).
  • Springel (2005), GADGET-2, MNRAS 364, 1105.
  • Barnes & Hut (1986), A hierarchical O(N log N) force calculation, Nature 324, 446.