Cosmological perturbation theory and Boltzmann codes
Linear perturbations of an FLRW universe coupled to Boltzmann equations for photons, neutrinos, baryons and dark matter, solved by CAMB and CLASS to predict CMB spectra and the matter power spectrum.
On this page18 sections
Every CMB, BAO, weak-lensing and Lyman-α likelihood calls a Boltzmann code. Downstream it underlies the Hubble tension and sound-horizon models, DESI dynamical dark energy, the S8 tension, the neutrino mass sum, Lyman-α warm and fuzzy dark-matter bounds, primordial B-modes and delensing, and CMB birefringence.
The math that grows tiny early ripples forward in time to predict the afterglow of the Big Bang.
- 1Smooth universe plus tiny ripples
- 2Follow each ripple size separately
- 3Light and matter form ringing plasma
- 4Freed light freezes the pattern in
- 5Codes predict spectra to compare with data
Setting up. Start with a perfectly smooth expanding universe (the FLRW model). Add small perturbations to the metric (the geometry) and to the density, velocity and temperature of each ingredient: photons, neutrinos, ordinary (baryonic) matter and cold dark matter. Keep only terms linear in the perturbation. This is accurate while the ripples are small.
Gauges. Splitting the universe into smooth part plus ripples is a choice, called a gauge. Different choices describe the same physics but make different-looking equations. Two common choices are the conformal Newtonian gauge, which looks like Newtonian gravity, and the synchronous gauge. Physical predictions must not depend on the choice.
Fourier modes. Because the linearized equations treat different spatial wave-numbers k separately, each mode can be evolved by itself. The starting values come from inflation, which predicts a nearly scale-invariant power spectrum: the amplitude of ripples is almost the same on all sizes, with slightly more on large scales. Two numbers describe it: the amplitude A_s and the tilt n_s.
The Boltzmann hierarchy. Photons and neutrinos are not simple fluids, so we track how their distribution depends on direction. We expand that dependence into multipoles (monopole, dipole, quadrupole and higher), which gives a long chain of coupled equations. In practice the chain is cut off at a finite length.
Tight coupling and acoustic oscillations. Early on, photons scatter off electrons very frequently (Thomson scattering), so photons and baryons move as one fluid. Gravity compresses it and radiation pressure pushes it back, producing sound waves with speed c_s about c/√3 reduced slightly by the baryon loading. The distance a sound wave can travel before the universe becomes transparent is the sound horizon, and it acts as a standard ruler: the baryon acoustic oscillation (BAO) scale. Photon diffusion damps small scales (Silk damping).
Recombination. About 380,000 years after the Big Bang, electrons and nuclei combine and photons escape. The detailed ionization history must be computed accurately, with codes such as RECFAST or HyRec, because the data are now very precise.
Output. CAMB and CLASS solve these equations on a grid of k and time and use a line-of-sight integral to quickly give the CMB temperature and polarization spectra, and the matter power spectrum.
Limits. At late times and small scales, matter clumps strongly and the linear approximation fails; that needs simulations (see the N-body entry).
Go deeper
The full technical text.
What it is
The theory perturbs the FLRW metric to first order and evolves each species' phase-space distribution with the linearized Einstein–Boltzmann system. Scalar metric perturbations come in two common gauges (Ma and Bertschinger 1995). The conformal Newtonian gauge is , and the synchronous gauge uses and . Bardeen (1980) built the gauge-invariant combinations. In Fourier space each mode evolves independently, and the initial conditions are set by an inflationary spectrum (adiabatic in the base model).
The core machinery
Hierarchy. Photon temperature and polarization perturbations and massless neutrinos are expanded in Legendre multipoles , giving an infinite coupled hierarchy. Thomson scattering at rate couples photons to baryons. Massive neutrinos also need a momentum grid. The hierarchy is truncated at a finite with a free-streaming closure.
Tight coupling and acoustic oscillations. For the photon–baryon fluid oscillates with sound speed , . The comoving sound horizon at the baryon drag epoch, is the BAO standard ruler. Photon diffusion damps small scales roughly as (Silk damping).
Recombination. The visibility function depends on the ionization history, computed with RECFAST, HyRec or CosmoRec at the accuracy needed for Planck. Reionization adds a large-angle bump in polarization controlled by .
Line of sight. Seljak and Zaldarriaga (1996) wrote as a time integral of sources times spherical Bessel functions. The CMB spectrum is then for T, E and B. Scalars source only T and E. Primordial tensors source B (amplitude ), and lensing converts E into B.
Matter. The linear spectrum is , with the growth rate entering redshift-space distortions as and lensing through . Massive neutrinos, warm dark matter and fuzzy (ultralight) dark matter suppress power below their free-streaming or Jeans scales. Projected observables use the Limber approximation, .
Beyond linear. The halo model and fitted emulators such as HMcode-2020 (which includes baryonic feedback) extend into the non-linear regime that weak lensing probes.
Techniques to master
Gauge transformations and gauge-invariant variables; the Boltzmann equation in an expanding background; tight-coupling and radiation-streaming approximations; stiff ODE integration over many modes; Bessel-function quadrature; the Fisher matrix and MCMC wrappers (Cobaya, MontePython) that call CAMB or CLASS.
Reading path
Start with Dodelson and Schmidt, Modern Cosmology (2nd ed.), and Baumann, Cosmology. Then read Ma and Bertschinger (1995) line by line, Seljak and Zaldarriaga (1996), the CAMB paper of Lewis, Challinor and Lasenby (2000), and CLASS I–II (Lesgourgues 2011; Blas, Lesgourgues and Tram 2011) for approximation schemes. Read the source of either code alongside.
Where it bites
Sound-horizon reduction models (early dark energy, extra , varying electron mass) change through the integral above and are tested against ACT, SPT and DESI. DESI's evolving-dark-energy preference and the neutrino-mass bound both enter through and growth, and the limit comes from free-streaming suppression. The problem hinges on the non-linear and baryonic corrections to . Lyman-α WDM and FDM bounds use the small-scale cutoff in the transfer function. B-mode delensing needs the lensing B-mode template, and birefringence rotates E into B.
Words on this page (12)
- perturbation
- A small deviation from a smooth, simple background that is treated with simplified equations.
- power spectrum
- A plot of how strong the ripples are at each size scale.
- Boltzmann equation
- An equation that tracks how a gas of particles, such as photons, is distributed in position and direction as it scatters.
- gauge
- A choice of how to label space and time; physical predictions should not depend on it.
- Thomson scattering
- The scattering of light off free electrons, which kept light and matter tightly coupled in the early universe.
- baryon acoustic oscillations
- A characteristic distance imprinted in the distribution of matter by early sound waves; used as a ruler.
- sound horizon
- The farthest distance a sound wave in the early universe could travel before the light was released.
- Silk damping
- The smoothing-out of small ripples caused by photons leaking from one region to another.
- recombination
- The time when electrons and nuclei first joined into neutral atoms and the universe became transparent.
- cosmic inflation
- A proposed burst of extremely fast expansion in the very early universe that stretched tiny quantum fluctuations into seeds of structure.
- cosmic microwave background
- The oldest light we can see, released about 380,000 years after the Big Bang.
- multipole
- One term in a breakdown of a pattern over directions: monopole (average), dipole (one side vs the other), quadrupole, and finer ones.
New to this? Read first (4)
- Cosmic microwave background (Wikipedia)Sets the scene for what the perturbation calculation predicts.
- Baryon acoustic oscillations (Wikipedia)Explains the sound-wave ruler that comes out of this theory.
- Wayne Hu's CMB tutorialsFamous visual, intuitive introductions to acoustic peaks and the physics behind them.
- CLASS code websiteHome of one of the two standard solver codes mentioned above.
Understanding map
map of the whole wiki →What to read before Cosmological perturbation theory and Boltzmann codes (left), and what builds on it: entries that depend on it and its open problems (right). Every box links to its page.
- Start with
- Step 2
- Then
Open problems & questions
No open problems or questions on this entry.
Progress timeline
- Sep 3, 2020HMcode-2020source
An updated halo-model fit for the non-linear matter power spectrum, including a baryonic-feedback response, is calibrated against simulations.
- Apr 14, 2011CLASSsource
The Cosmic Linear Anisotropy Solving System is released, with documented approximation schemes and accuracy controls that make it an independent cross-check on CAMB.
- Nov 10, 1999CAMBsource
Lewis, Challinor and Lasenby present the code that became CAMB, extending the line-of-sight method to closed FRW models.
- Mar 8, 1996Line-of-sight integration (CMBFAST)source
Seljak and Zaldarriaga replace the full multipole hierarchy by a source-times-Bessel integral, speeding up CMB spectrum computation by orders of magnitude.
- Jun 11, 1995Synchronous and Newtonian gauge equationssource
Ma and Bertschinger give the full linear Einstein–Boltzmann system in both gauges, including massive neutrinos. It is the template for every later Boltzmann code.