How this lab computes
Representative stars move in the gravity of three fixed components per galaxy, and the galaxy centers pull on each other.
Learn more
Each star moves in the gravity of three fixed components per galaxy: a dark matter halo, a disk and a bulge. The galaxy centers pull on each other and lose orbital energy and dark matter through dynamical friction and tidal stripping. No rule forces the centers together.
- 01 · Find the pull — add up the gravity of each galaxy's wide dark matter halo (NFW), flat stellar disk and round bulge. Most of the mass is in the invisible halo. The difference in pull between the near and far sides is the tidal force.
- 02 · Update velocity and position — motion uses leapfrog integration. Dynamical friction passes kinetic energy to the surrounding matter and slows the centers' relative motion; tidal stripping moves dark matter from the small galaxy's outskirts to the big one.
- 03 · Repeat in small steps — the basic step is 0.5 Myr, split further for galaxies with dense centers. At 16× the steps stay the same size; more of them run per second.
The full equations and checks are in the physics model notes (Markdown). You can hand them to an AI or an expert for review as they are.
Formula
a = Σ G [M_halo(<r) ÷ r² + bulge (Hernquist) + disk (Miyamoto–Nagai)]
In this simulation
For galaxies you build, halo mass comes from stellar mass through an observed relation (Moster et al. 2013) and concentration follows Dutton & Macciò 2014. Friction uses the Chandrasekhar formula (lnΛ = ln(1 + M_big/M_small), calibration factor 0.5), calibrated to research N-body results (Boylan-Kolchin et al. 2008).