Spotlight #25 — Cosmology & the Universe

From the first seconds after the Big Bang to the large-scale structure of the cosmos — six interactive simulations that let you explore the physics of the universe: Hubble expansion, nucleosynthesis, the CMB power spectrum, dark matter, gravitational lensing and binary stars.

Cosmology is the science of the universe as a whole — its origin, evolution, large-scale structure and ultimate fate. Unlike most branches of physics, cosmologists cannot run controlled experiments; they observe a single universe across cosmic time and test models against its statistical fingerprints. Our simulation collection now spans the full timeline, from the first three minutes of nucleosynthesis to the present-day web of galaxies.

1. Hubble's Law — The Expanding Universe

In 1929, Edwin Hubble published a relationship that changed cosmology forever: galaxies recede from us with a velocity proportional to their distance. This is not because galaxies move through space — it is because space itself is stretching, described by the FLRW metric.

Hubble's Law & the FLRW Metric

Hubble's Law:   v = H₀ · d
  v = recession velocity (km/s)
  d = proper distance (Mpc)
  H₀ = Hubble constant (Planck 2018: 67.4 ± 0.5 km/s/Mpc)
       (SH0ES direct measurement: 73.0 ± 1.0 km/s/Mpc)

FLRW metric:  ds² = −c²dt² + a(t)²[dr²/(1−kr²) + r²dΩ²]
  a(t) = scale factor (a(t₀) = 1 today)
  k = curvature (0 for flat universe)

Hubble radius:  r_H = c/H₀ ≈ 14.4 Gly
  Galaxies beyond r_H recede faster than light (not a contradiction —
  no information is transmitted; space expands, not objects)

Friedmann equation:  (ȧ/a)² = (8πG/3)ρ − kc²/a² + Λc²/3
  ρ = total energy density (matter + radiation + dark energy)
  Λ = cosmological constant (dark energy ≈ 68% of ρ_total today)

The simulation places 80 galaxies in an expanding shell and colour-codes them by redshift — blue nearby galaxies, red distant ones. Set H₀ to Planck (67.4), SH0ES (73.0) or Hubble's original 1929 value (500!) to see why the "Hubble tension" keeps cosmologists busy. The Hubble sphere — the boundary where recession equals light speed — pulses in real time.

2. Big Bang Nucleosynthesis — The First Three Minutes

Within the first second after the Big Bang the universe was a quark-gluon plasma far too hot for nuclei to form. By three minutes it had cooled enough for protons and neutrons to fuse into the lightest nuclei. Steven Weinberg's famous book titles this era "The First Three Minutes" — and it set the elemental composition of the entire observable universe.

BBN Rate Equations & Predicted Abundances

Temperature vs time (radiation-dominated era):
  T(t) ≈ 10¹⁰ K / √t   (t in seconds)

Neutron-to-proton freeze-out (T ≈ 0.8 MeV, t ≈ 1 s):
  n/p = exp(−ΔQ/kT) ≈ 1/7   (ΔQ = mₙ−mₚ = 1.293 MeV)

Key reactions (Wagoner–Fowler–Hoyle 1967):
  p + n  → ²H + γ           (deuterium bottleneck cleared at T ≈ 0.07 MeV)
  ²H + p → ³He + γ
  ³He + n → ⁴He + p
  ⁷Be + e⁻ → ⁷Li + νₑ

Predicted primordial abundances (mass fractions):
  ⁴He:  Yₚ ≈ 0.247  (~24.7% by mass)
  ²H:   X_D ≈ 2.5 × 10⁻⁵  (sensitive to η = n_b/n_γ)
  ³He:  X ≈ 1.0 × 10⁻⁵
  ⁷Li:  X ≈ 4.7 × 10⁻¹⁰  (⁷Li problem: theory ~3× observed)

Baryon-to-photon ratio η ≈ 6.1 × 10⁻¹⁰ (fixed by CMB observations)

The simulation runs a simplified network of eight key reactions, tracking abundances as the universe cools from 10 MeV to 10 keV. Drag the baryon-to-photon ratio slider η and watch how the final helium-4 yield is nearly insensitive — a testament to BBN's robustness — while deuterium and lithium-7 shift dramatically, providing the tightest constraints on the baryon density of the universe.

3. Cosmic Microwave Background — Acoustic Peaks

380,000 years after the Big Bang the universe cooled enough for electrons to combine with protons into neutral hydrogen. At this "recombination" epoch photons decoupled from matter and streamed freely, creating the CMB — a nearly perfect blackbody at T = 2.725 K that fills the whole sky. But it is not perfectly uniform: temperature fluctuations of one part in 100,000 encode the acoustic oscillations of the primordial baryon-photon plasma.

CMB Power Spectrum & Acoustic Physics

Angular power spectrum:  Cₗ = (2/π) ∫ Pᵩ(k) |Δₗ(k)|² k² dk
  l = multipole moment ≈ 180°/θ  (l~200 corresponds to ~1° scale)
  Pᵩ(k) ∝ kⁿˢ⁻¹, nₛ ≈ 0.965  (nearly scale-invariant, as inflation predicts)

Acoustic oscillations — sound horizon at recombination:
  rs = ∫₀ᵗ_rec cs dt / a ≈ 147 Mpc  (standard ruler!)
  cs = c/√3(1+R),  R = 3ρ_b/(4ρ_γ)  (baryon loading parameter)

Peak positions (flat ΛCDM):
  l₁ ≈ 220  (first compression peak — matches WMAP, Planck perfectly)
  l₂ ≈ 540  (rarefaction — suppressed by baryon loading)
  l₃ ≈ 810  (second compression — sensitive to dark matter density)
  Ratio l₂/l₁ ↓ as Ω_b↑ (more baryons damp even peaks)

Key cosmological parameters encoded in peaks:
  Ω_b h² (baryon density)   → odd/even peak height ratio
  Ω_c h² (cold dark matter) → peak height decay envelope
  Ω_Λ    (dark energy)      → late ISW effect, low-l plateau
  θₛ     (angular scale)    → peak positions (geometry)

The CMB simulation displays the angular power spectrum D_ℓ = ℓ(ℓ+1)C_ℓ/2π alongside the Planck 2018 data points. Adjust baryon density Ω_b, cold dark matter Ω_c and the Hubble constant H₀ to fit the peaks and see why the CMB is described as the "Rosetta stone of cosmology" — a single image encoding all six fundamental parameters of ΛCDM.

4. Dark Matter — Galaxy Rotation Curves

Vera Rubin's 1970s measurements of spiral galaxy rotation curves revealed a profound mystery: stars at the galaxy's edge orbit just as fast as those near the centre, instead of slowing as Kepler's law demands. The only consistent explanation is a vast invisible halo of matter that neither emits nor absorbs light — dark matter. It constitutes ≈27% of the universe's energy density.

Galaxy Rotation Curves & NFW Halo Profile

Keplerian expectation (visible mass only):
  v_circ(r) = √(GM(r)/r)  → v ∝ r⁻¹/² in outer disk

Observed (flat rotation curves):
  v_circ ≈ const ≈ 200 km/s  out to r > 30 kpc
  ⟹  M(r) ∝ r  (density ρ ∝ r⁻²)

NFW (Navarro–Frenk–White 1997) dark matter halo:
  ρ_NFW(r) = ρ₀ / [(r/rs)(1 + r/rs)²]
  rs = scale radius (typically 15–25 kpc)
  Enclosed mass M_NFW(r) = 4πρ₀rs³ [ln(1+r/rs) − r/(r+rs)]

Baryonic Tully–Fisher relation:
  v_flat⁴ = G · a₀ · M_bary   (a₀ ≈ 1.2 × 10⁻¹⁰ m/s² — MOND)
  ΛCDM and MOND reproduce Tully–Fisher differently;
  distinguishing them requires weak gravitational lensing surveys.

Dark matter evidence (independent):
  • Galaxy rotation curves (Rubin et al. 1970)
  • Gravitational lensing (Clowe et al. 2006 — Bullet Cluster)
  • CMB acoustic peak heights (Spergel et al. 2003)
  • Large-scale structure N-body simulations (Springel et al. 2005)

The dark matter simulation lets you toggle the NFW halo on and off and watch the rotation curve transform from Keplerian decline to flat. Adjust the halo concentration parameter c = r₂₀₀/rs and see how more concentrated haloes produce cuspy inner profiles — the "cusp-core problem" that challenges pure CDM predictions.

5. Gravitational Lensing — Einstein Rings & Arcs

General relativity predicts that mass curves spacetime, bending light from background sources. For a point mass acting as a perfect lens, a source exactly behind it appears as a perfect ring — the Einstein ring, first photographed in 1988. Lensing is now a primary tool for mapping dark matter in galaxy clusters and measuring the Hubble constant via time delays.

Gravitational Lensing Equations

Deflection angle (Schwarzschild mass M):
  α̂ = 4GM / (c²ξ)   (ξ = closest approach distance)
  Factor 2× larger than Newtonian prediction (confirmed 1919, Eddington)

Lens equation (thin lens, angular coordinates):
  β = θ − θ_E²/θ    (β = true source angle, θ = image angle)
  θ_E = √(4GM D_ls / (c² D_l D_s))  — Einstein radius

  D_l, D_s, D_ls = angular diameter distances
  (lens, source, lens–source)

Einstein ring:  β = 0  →  θ = θ_E  (ring image)
  For galaxy-galaxy lensing: θ_E ≈ 1–2 arcsec

Multiple images:  β < θ_E  →  two or more images
  Magnification:  μ = |θ/β · dθ/dβ| (can be ×100+ for point sources)

Microlensing (MACHO/WIMPs):
  Characteristic time t_E = θ_E / μ_rel ≈ days–years
  Light-curve shape: Paczyński A = (u²+2)/[u√(u²+4)], u = β/θ_E

Place the lens mass anywhere on the interactive canvas, adjust its mass and the source position, and watch the image topology shift between a single image, two images and the Einstein ring. A grid of background stars reveals the magnification pattern — a crucial tool for MACHO/dark matter searches.

6. Binary Stars — Kepler Meets Spectroscopy

Over half of all solar-type stars exist in binary systems. Binaries are fundamental to astrophysics: they provide the only direct measurement of stellar masses, calibrate distance scales through eclipsing light curves, are the progenitors of Type Ia supernovae, and eventually produce gravitational-wave sources detectable by LIGO.

Binary Orbital Mechanics

Two-body problem → reduced to one-body with μ = m₁m₂/(m₁+m₂):
  r̈ = −G(m₁+m₂) r̂ / r²

Semi-major axis and period (Kepler's third law):
  a³/P² = G(m₁+m₂)/(4π²)   in SI units
       → a [AU]³/P [yr]² = (m₁+m₂)/M☉   in solar units

Centre-of-mass positions:
  r₁ = m₂/(m₁+m₂) · r,   r₂ = −m₁/(m₁+m₂) · r

Radial velocity (spectroscopic binary, inclination i):
  K₁ = (2πa₁ sin i/P)/√(1−e²)   (semi-amplitude, star 1)
  Mass function: f(m) = m₂³ sin³i / (m₁+m₂)² = K₁³P/(2πG)
  M sin i from K₁ and K₂ alone — without knowing distance!

Gravitational-wave inspiral timescale (Peters 1964):
  T_merge = (12c⁵/85G³) · a₀⁴(m₁+m₂)/(m₁m₂) · (1−e²)^(7/2)
  For two 1.4M☉ neutron stars, a₀=2R☉: T ≈ 300 Myr

Adjust the mass ratio q = m₂/m₁, eccentricity e and orbital period and watch both stars trace their ellipses around the common barycentre. The radial velocity curve — the observable used by Vera Rubin and countless other astronomers — updates in real time. Set high eccentricity to see how the orbit circularises under gravitational-wave emission on astronomical timescales.

The Standard Cosmological Model

All six simulations connect to the ΛCDM model — the current best description of the universe. Its six free parameters (H₀, Ω_b, Ω_c, Ω_Λ, nₛ, A_s) are determined to percent-level precision by the CMB alone and are independently confirmed by BBN, gravitational lensing surveys and galaxy clustering. Yet tensions remain: the Hubble tension (H₀), the σ₈ tension (large-scale structure amplitude) and the lithium problem in BBN hint that the model may be incomplete.

The observational pillars of the Big Bang model: (1) The CMB itself — perfect blackbody at 2.725 K, discovered by Penzias & Wilson in 1965; (2) The cosmic abundance of light elements — ≈25% He-4 by mass, precisely as BBN predicts; (3) Hubble expansion — observed at all wavelengths, confirmed by Type Ia supernovae; (4) The large-scale structure of the universe — hundreds of thousands of galaxy redshifts matching ΛCDM N-body simulations.

For the special and general relativity simulations that are the theoretical backbone of cosmology, see Learning #21 — Special Relativity and Spotlight #16 — Special Relativity. The quantum side of the early universe — particle physics above the electroweak scale — is covered in our Quantum Physics Spotlight.