Stage 1 grows a cosmic web from small ripples (Zel'dovich approximation, ΛCDM growth). Stage 2 zooms into a halo: its mass and spin set the disc, a dark halo flattens the rotation curve, and a spiral density wave sweeps through the stars.
Without a halo the outer rotation curve falls like a Kepler orbit; the observed flat curves need extra mass out there.
Evolves fresh 9000-star discs for 0.9 Gyr at five perturbation strengths and measures the phase-locked response A = |mean of exp(iφ)| of the stars in 3–10 kpc, where φ is the phase of the imposed wave. Linear theory says A grows in proportion to ε until the stars saturate, so A/ε should stay roughly constant for small ε then fall; the noise floor is about 1/√N.
The science
Growth of structure. In the Zel'dovich approximation each particle moves as x = q + D(a) ψ(q) where ψ is a fixed displacement field (here 28 random Fourier modes with amplitude ∝ k−1.5) and D(a) the linear growth factor. For flat ΛCDM, D(a) ∝ E(a) ∫0a da'/(a'E(a'))3 with E = √(Ωma−3 + ΩΛ), Ωm = 0.3. The density follows from the Jacobian, ρ/ρ̄ = 1/|det(I + D ∂ψ/∂q)|, which diverges at shell crossing (a caustic: sheets and filaments). After that the approximation is only a picture of where mass is going. The amplitude slider is an illustrative normalisation, not a fitted σ8.
Spherical collapse. A top-hat overdensity grows linearly until its linear contrast reaches 1.686 (turnaround at 1.062, where the true density is 9π2/16 ≈ 5.55 times the mean); it then virialises. The “node” contrast δ0 (extrapolated to today) therefore collapses when D(ac)δ0 = 1.686. The Einstein–de Sitter numbers are used for the threshold; this is a textbook value [typical value], good to a few per cent in ΛCDM.
Halo. M200 and R200 follow M = 100 H0² R³ / G (H0 = 70 km/s/Mpc). The halo is an NFW profile, ρ ∝ 1/[(r/rs)(1+r/rs)²], with enclosed mass M(<r) = M200 m(r/rs)/m(c), m(x) = ln(1+x) − x/(1+x) and concentration c = 9 (M/1012M☉)−0.1 [rough fit, not a measurement].
Disc size from spin. Tidal torques give the halo a dimensionless spin λ = J|E|1/2/(GM5/2) ≈ 0.035 (log-normal scatter) [typical value]. If the disc keeps the halo's specific angular momentum, Rd = λR200/√2 (Mo, Mao & White 1998 form); a factor 0.6 stands in for halo contraction and angular-momentum loss [illustrative]. The disc mass is the slider fraction of M200 (0.05 is typical of a Milky-Way-like galaxy [typical value]).
Potential. Miyamoto–Nagai disc (Φ = −GM/√(R²+(a+√(z²+b²))²), a = Rd, b = 0.1Rd), Hernquist bulge (Φ = −GM/(r+ab)), NFW halo, a 4×106 M☉ central black hole, all softened by 0.1 kpc. Circular speed vc² = R∂Φ/∂R. Epicyclic frequency κ² = R dΩ²/dR + 4Ω².
Disc stars. Radii from an exponential disc, velocities from epicycle theory: radial dispersion from Toomre Q = σRκ/(3.36 GΣ), σφ/σR = κ/(2Ω), plus asymmetric drift. Integration is a kick–drift–kick leapfrog (symplectic, time step about 1.2 Myr); the particles are test masses and do not feel each other (no self-gravity, no bar, no mergers, no gas physics).
Spiral wave. A rotating logarithmic spiral potential Φ1 = −ε V0² E(R) cos[m(θ + ln(R/R0)/tan i − Ωpt)] is imposed (Lin–Shu / Cox & Gómez style). Stars bunch where the potential is lowest, so arms are a density wave that stars flow through; they are not made of fixed stars. Arm brightening and the pink “gas” clouds are drawn from the phase of the wave (an illustration of star formation in arms, not a gas simulation). The Lindblad resonances are where Ωp = Ω − κ/2 (inner), Ω (corotation) and Ω + κ/2 (outer).
Not modelled. Self-gravity of the disc (swing amplification), baryonic feedback, gas cooling, mergers, bar formation, dark-matter substructure. The 3D black hole is not to scale. Not affiliated with any observatory or mission.