BetaFree coursewareRewritten from MIT OpenCourseWareCC BY-NC-SA 4.0
Open CosmologyPhysics & cosmology, from high school to a graduate year

Simulating galaxy formation: gravity, gas and "subgrid" physics

Computer simulations follow dark matter, gas and stars from small early ripples to today's galaxies. Dark matter is the easy part (Poisson's equation for billions of particles, made affordable by softening, trees and Fourier meshes). Gas needs hydrodynamics, and star formation, supernovae and black holes must be added "by hand" as subgrid recipes.

You need this first

Full reading path (57 pages)
  1. Vectors (8.01)
  2. Position and velocity in one dimension (8.01)
  3. Acceleration in one dimension (8.01)
  4. Motion in two dimensions and projectiles (8.01)
  5. Newton's laws of motion (8.01)
  6. The universal law of gravitation (8.01)
  7. The homogeneous expanding universe (8.286)
  8. Why a static universe cannot work (8.286)
  9. The expanding sphere and the equation for a(t) (8.286)
  10. The Friedmann equation (8.286)
  11. Open, closed and flat universes (8.286)
  12. The dark matter problem: weighing the sky with gravity (Ferreras)
  13. The Doppler effect and special relativity (8.286)
  14. Rotation curves: the flat signature of dark matter (Ferreras)
  15. Galaxy clusters: Zwicky's missing mass (Ferreras)
  16. Counting the ordinary matter: stars, gas, and systems without dark matter (Ferreras)
  17. Cosmological redshift (8.286)
  18. The closed universe as a cycloid (8.286)
  19. The age of the universe and the Big Bang singularity (8.286)
  20. The age of a closed universe from H and Ω (8.286)
  21. The open universe and the age of any matter universe (8.286)
  22. Non-Euclidean geometry (8.286)
  23. The metric of a sphere and of a closed universe (8.286)
  24. Curvature and expansion: the Robertson–Walker metric (8.286)
  25. The geometry of open universes (8.286)
  26. The spacetime interval (8.286)
  27. The spacetime metric of the universe (8.286)
  28. The geodesic equation (8.286)
  29. Simplifying the geodesic equation (8.286)
  30. Falling into a black hole (8.286)
  31. Mass, energy and the dilution of radiation (8.286)
  32. Matter–radiation equality and the pressure of light (8.286)
  33. The horizon distance (8.286)
  34. The radiation-dominated universe (8.286)
  35. The cosmological constant and vacuum energy (8.286)
  36. The age of the universe with vacuum energy (8.286)
  37. How bright is a distant supernova? (8.286)
  38. Gravitational lensing: weighing mass by bending light (Ferreras)
  39. Weak lensing, the Bullet Cluster and MACHOs (Ferreras)
  40. The supernova evidence for acceleration (8.286)
  41. The puzzle of the vacuum energy, and Einstein's mistake about Friedmann (8.286)
  42. Black-body radiation (8.286)
  43. Neutrinos and counting particle species (8.286)
  44. The temperature of the early universe and decoupling (8.286)
  45. The horizon problem (8.286)
  46. The flatness problem (8.286)
  47. The Standard Model, gauge theories and grand unification (8.286)
  48. The Higgs field and spontaneous symmetry breaking (8.286)
  49. Topological defects and the magnetic monopole problem (8.286)
  50. The false vacuum and the mechanism of inflation (8.286)
  51. Exponential expansion, de Sitter space and the inflationary scenario (8.286)
  52. How inflation solves the problems of the Big Bang (8.286)
  53. How small ripples grow: linear perturbation theory (8.902)
  54. Why structure formation needs cold dark matter (8.902)
  55. Measuring structure: the power spectrum and the correlation function (8.902)
  56. When ripples collapse: the spherical collapse model (8.902)
  57. Dark matter halos: mass, profile, concentration, shape and spin (Ferreras)
On this page · 4 sections
  1. Dark matter: solving Poisson's equation with particles
  2. Hydrodynamics
  3. Subgrid physics
  4. Summary

Simple models of gravity rely on symmetries: spherical collapse, spherical or axisymmetric Jeans models. To go further, to see how real galaxies and their halos form, Ferreras's Chapter 4 turns to numerical simulations, which today follow billions of particles on large supercomputers. They rest on three pillars:

  1. the growth of structure in the collisionless dark matter, the backbone of the large-scale structure;
  2. the hydrodynamics of the gas, the original baryonic material that eventually makes stars;
  3. subgrid physics: everything else (star formation, feedback, black holes) added as recipes because it happens below the resolution.

Dark matter: solving Poisson's equation with particles#

Dark matter dominates the gravitational potential of galaxies, especially in their outer parts, and drives the growth of structure on cosmological scales. So the first simulations followed only dark matter: collisionless particles in an expanding universe, each feeling the potential made by all the others, with no need for costly two-body encounters.

Each simulation particle is a synthetic particle that stands for an enormous number of real dark matter particles. In the EAGLE simulation, in a cube 100 Mpc on a side, each dark matter particle has a mass of 9.7×106 M⊙9.7 \times 10^6\,M_\odot, as much as the stars of a dwarf galaxy. The computer's memory fixes the number of particles; the volume then fixes their mass. With NN particles of mass mDMm_\text{DM}, Poisson's equation becomes

Poisson's equation for simulation particles
∇2Φ(r⃗)=4πG mDM∑iδ3(r⃗−r⃗i)\nabla^2\Phi(\vec r) = 4\pi G\,m_\text{DM}\sum_i \delta^3(\vec r - \vec r_i)
In words

del squared capital phi ( vector r ) equals 4 pi capital G m sub D M the sum over i of delta cubed the quantity vector r minus vector r sub i

Simulations range from a single galaxy's halo (about 100 kpc) to cosmological volumes (about a gigaparsec). One problem is that a point particle's potential −GmDM/r-Gm_\text{DM}/r, and its force, diverge at small separations. That is unphysical (a synthetic particle is not a point) and numerically harmful: huge forces need tiny time steps and grow errors. So the potential is softened:

Softened (Plummer) potential
Φ(r;ϵ)=−G mDMr2+ϵ2\Phi(r; \epsilon) = -\frac{G\,m_\text{DM}}{\sqrt{r^2 + \epsilon^2}}
In words

capital phi (r; epsilon ) equals minus capital G m sub D M over the square root of r squared plus epsilon squared, end of root

This is the potential of a Plummer sphere: the force fades smoothly as separations fall below the softening length ϵ\epsilon, which is therefore the simulation's force resolution. The best cosmological simulations reach about 100 pc. Zoom-in simulations re-run a small region, chosen from a larger low-resolution run, at much higher resolution.

The acceleration of particle ii is then a sum over all the others:

Direct force summation
r⃗¨i=−G mDM∑j≠iNr⃗i−r⃗j(∣r⃗i−r⃗j∣2+ϵ2)3/2\ddot{\vec r}_i = -G\,m_\text{DM}\sum_{j \neq i}^{N}\frac{\vec r_i - \vec r_j}{\left(|\vec r_i - \vec r_j|^2 + \epsilon^2\right)^{3/2}}
In words

vector r double dot sub i equals minus capital G m sub D M the sum from j is not equal to i to capital N of the quantity vector r sub i minus vector r sub j, all over the quantity the quantity the absolute value of vector r sub i minus vector r sub j squared plus epsilon squared, all to the power three halves

after which velocities and positions are updated, step by step. This particle–particle (PP) method needs about N2N^2 operations per step. Special hardware (such as the GRAPE "Gravity Pipe" computers) and parallel computing help, but two ideas cut the cost far more:

Poisson's equation on a mesh
∇2Φ=4πGρ  ⟹  −k2Φ^k⃗=4πG ρ^k⃗,F⃗^k⃗=−ik⃗ Φ^k⃗\nabla^2\Phi = 4\pi G\rho \;\Longrightarrow\; -k^2\hat\Phi_{\vec k} = 4\pi G\,\hat\rho_{\vec k}, \qquad \hat{\vec F}_{\vec k} = -i\vec k\,\hat\Phi_{\vec k}
In words

del squared capital phi equals 4 pi capital G rho which gives minus k squared capital phi hat sub k hat equals 4 pi capital G rho hat sub k hat, vector F hat sub vector k equals minus i vector k capital phi hat sub k hat

Source: Chapter 4, Simulating galaxy formation (Sections 4.1–4.4), Eqs. (4.4)–(4.5), pp. 79–80

Its accuracy is limited by the mesh size. The P³M method combines a mesh for distant forces with direct sums for close neighbours.

Worked example

Why trees matter

A modern simulation has N=1010N = 10^{10} particles. Compare the number of pair interactions per time step for direct summation and for a tree code.

Direct summation

N2=1020N^2 = 10^{20} interactions per step.

Tree code

Nlog⁡2N≈1010×33≈3.3×1011N\log_2 N \approx 10^{10} \times 33 \approx 3.3 \times 10^{11} operations: about 300 million times fewer.

Meaning

Even at 101510^{15} operations per second, direct summation would need about a day per step, and a simulation needs thousands of steps; a tree code takes well under a second of pure arithmetic per step.

Initial conditions. A cosmological run starts early, while fluctuations are still linear, in a comoving box typically about 100 Mpc across with periodic boundaries (opposite faces joined). Particles are first laid out uniformly, then displaced and given velocities so that the density field is a Gaussian random field with the power spectrum of the chosen cosmology (on this site: linear perturbations and the power spectrum). The box size limits what can be studied: objects rarer than about one per (100 Mpc)³, such as massive galaxy clusters, are missed.

Hydrodynamics#

Dark matter dominates the mass, so dark-matter-only simulations already describe halos well. Adding baryons is much harder: gas is not collisionless. It feels pressure, obeys an equation of state, exists in several phases (of temperature, density, composition), loses energy by radiating, and is stirred by turbulence and magnetic fields. Stars, formed from gas, behave again as collisionless particles.

The gas equations can be solved on a grid of cells (the Eulerian approach) or by following parcels of gas as particles (the Lagrangian approach). For a single gas phase they are:

Equations of gas dynamics
dρdt=−ρ ∇⋅v⃗,dv⃗dt=−∇Pρ−∇Φ,dudt=−Pρ ∇⋅v⃗+Q−Λ(T,Z,ρ)ρ,P=(γ−1) ρ u\frac{d\rho}{dt} = -\rho\,\nabla\cdot\vec v, \qquad \frac{d\vec v}{dt} = -\frac{\nabla P}{\rho} - \nabla\Phi, \qquad \frac{du}{dt} = -\frac{P}{\rho}\,\nabla\cdot\vec v + \frac{Q - \Lambda(T, Z, \rho)}{\rho}, \qquad P = (\gamma - 1)\,\rho\,u
In words

d rho over d t equals minus rho del dot vector v, d vector v over d t equals minus del capital P over rho minus del capital phi, d u over d t equals minus capital P over rho, times del dot vector v plus the quantity Q minus capital lambda ( capital T, Z, rho ), all over rho, capital P equals the quantity gamma minus 1, rho u

These are the continuity equation (mass conservation), the Euler equation (pressure gradient and gravity accelerate the gas), energy conservation for the internal energy uu (compression, heating sources QQ and radiative cooling Λ\Lambda, which depends on temperature TT, metallicity ZZ and density ρ\rho), and the equation of state of an ideal gas with adiabatic index γ\gamma. [The book calls uu the energy density; with P=(γ−1)ρuP = (\gamma - 1)\rho u and the source terms divided by ρ\rho, it is the energy per unit mass, as written here.] The time derivative follows the moving gas:

Lagrangian time derivative
ddt=∂∂t+v⃗⋅∇\frac{d}{dt} = \frac{\partial}{\partial t} + \vec v\cdot\nabla
In words

d over d t equals partial over partial t plus vector v dot del

In simulated galaxies (Ferreras shows one from IllustrisTNG) the dark matter halo is far more extended than the stars, and the gas is clumpy. Radio observations trace the atomic gas, optical and near-infrared light the stars and ionised gas, and very deep images reveal faint stellar streams. The dark matter itself can never be mapped directly; it is inferred through the gas and stars.

Subgrid physics#

Many processes act on scales far below what even the best simulations resolve. The standard picture is that gas falling into a halo is shock-heated to the halo's virial temperature, then cools and flows to the centre (hot-mode accretion). Early models with only this physics hit the overcooling problem: the gas cooled too efficiently, formed stars too early and too fast, and lost its angular momentum, giving too many old, massive, compact galaxies with little rotation. Extra baryonic physics is essential.

An alternative to full hydrodynamics is the semi-analytic model (SAM): dark matter halos and their merger trees come from Press–Schechter theory or a dark-matter-only simulation, and the gas physics is added as recipes. SAMs run much faster, so the most uncertain part, the subgrid physics, can be explored widely. The main recipes are:

Star formation. The star formation rate follows the gas density as a power law, ρ˙⋆∝ρgn\dot\rho_\star \propto \rho_g^n (Schmidt) or per unit area Σ˙⋆∝Σgn\dot\Sigma_\star \propto \Sigma_g^n (Kennicutt), with n≈1n \approx 1–2 and an efficiency in the constant, above a threshold surface density of about 10 M⊙10\,M_\odot per pc² where cold gas can exist. Too efficient, and galaxies become too massive for the observed stellar mass function; too inefficient, and they stay too gas-rich. Massive early-type galaxies formed their stars fast and efficiently; low-mass galaxies slowly.

Supernova feedback. The most massive stars live only 1–30 Myr and explode as core-collapse supernovae, each releasing about 105110^{51} erg, in the gas-rich regions where stars are still forming. They heat the gas and drive it out, lowering further star formation: negative feedback, strongest in starbursts. Gas may be removed from the galaxy altogether (blow-away), or only from its disc, later raining back in a galactic fountain (blow-out). In massive galaxies gravity wins, and supernova feedback becomes inefficient.

Worked example

Can supernovae unbind a dwarf galaxy's gas? (adapted from a "How about…?" box in the book)

A dwarf galaxy has 109 M⊙10^9\,M_\odot within 2 kpc, modelled as a truncated isothermal sphere with binding energy GM2/RGM^2/R. It forms stars at 1 M⊙1\,M_\odot per year for 50 million years, with one supernova for every 100 M⊙100\,M_\odot of stars formed. What fraction of the supernova energy would be needed to match the binding energy?

Binding energy

GM2/R=6.674×10−11×(1.99×1039)2/(6.17×1019)GM^2/R = 6.674 \times 10^{-11} \times (1.99 \times 10^{39})^2 / (6.17 \times 10^{19}) J ≈4.3×1048\approx 4.3 \times 10^{48} J =4.3×1055= 4.3 \times 10^{55} erg.

Supernova energy

5×107 M⊙5 \times 10^7\,M_\odot of stars gives 5×1055 \times 10^5 supernovae, releasing 5×10565 \times 10^{56} erg in total.

Efficiency

Only about 9% of that energy needs to couple to the gas. Most of a supernova's energy is radiated away, but a modest coupling suffices in a small galaxy, while a galaxy a hundred times more massive, of the same size, would be bound ten thousand times more strongly.

Black holes and active nuclei. Supermassive black holes sit at the centres of most galaxies, and their masses correlate with their hosts' bulge velocity dispersions, a sign of coevolution. When enough gas falls in, accretion can turn up to about 10% of the infalling rest-mass energy into radiation: an active galactic nucleus (AGN), seen at great distances as a quasar. AGN feedback can stop star formation across a whole galaxy, especially in massive ones. This is the most "subgrid" recipe of all. An accretion disc is as small as the Solar System; even the black hole's radius of influence, GMBH/c∞2GM_\text{BH}/c_\infty^2 with c∞c_\infty the sound speed of the surrounding gas, is only about 0.05 kpc for MBH=107 M⊙M_\text{BH} = 10^7\,M_\odot and c∞=30c_\infty = 30 km/s, below the resolution of about 100 pc. Simulations plant seed black holes (about 105 M⊙10^5\,M_\odot) in halos above a threshold mass and let them grow as sink particles, by Bondi accretion from gas of density ρ\rho and sound speed csc_s when the black hole moves at speed vv:

Bondi accretion rate
dMBHdt=4πG2MBH2 ρ(cs2+v2)3/2\frac{dM_\text{BH}}{dt} = \frac{4\pi G^2 M_\text{BH}^2\,\rho}{\left(c_s^2 + v^2\right)^{3/2}}
In words

d capital M sub B H over d t equals 4 pi capital G squared capital M sub B H squared rho over the quantity the quantity c s squared plus v squared, all to the power three halves

usually with a fudge factor calibrated on observations, and capped at the Eddington rate, where radiation pressure halts the infall:

Eddington accretion rate
dMEdddt=4πGMBH mpεr σT c\frac{dM_\text{Edd}}{dt} = \frac{4\pi G M_\text{BH}\,m_p}{\varepsilon_r\,\sigma_T\,c}
In words

d capital M sub Eddington over d t equals 4 pi capital G capital M sub B H m p over the quantity epsilon sub r sigma sub T c

with σT\sigma_T the Thomson cross-section and εr=L/(M˙BHc2)≈0.1\varepsilon_r = L/(\dot M_\text{BH}c^2) \approx 0.1 the radiative efficiency. AGN feedback has two modes: at low accretion rates, a kinetic ("maintenance") mode that keeps massive galaxies quiescent; at high rates, a thermal (quasar) mode that heats the surrounding gas.

Worked example

How fast can a black hole grow?

A seed black hole of 105 M⊙10^5\,M_\odot grows at the Eddington rate with εr=0.1\varepsilon_r = 0.1. How long until it reaches 109 M⊙10^9\,M_\odot?

Exponential growth

The Eddington rate is proportional to MBHM_\text{BH}, so the mass grows exponentially with e-folding time tE=εrσTc/(4πGmp)=0.1×6.652×10−29×2.998×108/(4π×6.674×10−11×1.673×10−27)t_E = \varepsilon_r\sigma_T c/(4\pi G m_p) = 0.1 \times 6.652 \times 10^{-29} \times 2.998 \times 10^8 / (4\pi \times 6.674 \times 10^{-11} \times 1.673 \times 10^{-27}) s ≈1.4×1015\approx 1.4 \times 10^{15} s ≈45\approx 45 Myr.

Time needed

A factor 10410^4 needs ln⁡(104)≈9.2\ln(10^4) \approx 9.2 e-foldings: about 415 Myr of uninterrupted Eddington-limited growth: possible, but only if gas keeps flowing in, which is why the seeding recipes of different simulations matter so much for early quasars.

Stellar populations. Each synthetic star particle (in IllustrisTNG, 10510^5–107 M⊙10^7\,M_\odot) is created from a gas particle and treated as a simple stellar population, with its own age and the chemical composition of its parent gas, and stars of all masses drawn from an IMF. Its evolution returns gas, energy and heavy elements to its surroundings; since most of this comes from short-lived massive stars, some models return it instantly (the instantaneous recycling approximation). Population synthesis then turns star particles into colours and spectra to compare with surveys.

Dust and radiation. Cooling rates are first tabulated assuming collisional ionisation equilibrium; strong star formation, AGNs and the epoch of reionisation need radiative transfer. Dust, under one per cent of the interstellar mass, scatters blue light more (Rayleigh-like) or dims all colours (Mie-like) depending on grain size, and re-emits in the infrared. It adds a third member to the age–metallicity degeneracy: a red colour may mean old, metal-rich or dusty.

Magnetic fields and cosmic rays add pressure to the interstellar medium and help regulate star formation; including them requires magnetohydrodynamics and a relativistic cosmic-ray fluid from supernovae (typical energies about 1 GeV). These details lie outside dark matter physics, but they control how baryons flow in halos and so the ratio of stars to dark matter.

Summary#

Symbols on this page

Show the 67 symbols used here
γ\gamma gamma.
The ratio of specific heats of a gas (adiabatic index). Say it: “gamma”.
δ\delta delta.
The Dirac delta: δ³(r − rᵢ) is zero except at the particle's position, and integrates to 1. Say it: “delta”.
ε\varepsilon epsilon.
ε: the softening length of a simulation (its force resolution); ε_r: the radiative efficiency of black hole accretion (about 0.1). Say it: “epsilon”.
Λ\Lambda capital lambda.
The cooling function Λ(T, Z, ρ): the rate per unit volume at which gas of temperature T, metallicity Z and density ρ loses energy by radiating. Unit: W/m³ (often erg/(cm³·s)). Say it: “capital lambda”.
π\pi pi.
The ratio of a circle's circumference to its diameter, π ≈ 3.14159. Say it: “pi”.
ρ\rho rho.
Density: mass (or energy divided by c²) per unit volume. ρ_c is the critical density, ρ̄ the mean density. Unit: kg/m³ (on some pages an energy density in natural units: GeV⁴, eV/cm³). Say it: “rho”.
σ\sigma sigma.
σ_T: the Thomson cross-section of the electron, about 6.65 × 10⁻²⁹ m². Unit: m². Say it: “sigma”.
⊙\odot Sun symbol.
The Sun: M_⊙ is one solar mass, about 1.99 × 10³⁰ kg. Say it: “solar”.
∞\infty infinity.
Infinity: larger than any number. Say it: “infinity”.
≈\approx approximately equal.
Is approximately equal to. Say it: “is approximately”.
∝\propto proportional to.
Is proportional to: doubling one doubles the other. Say it: “is proportional to”.
≠\neq not equal.
Is not equal to. Say it: “is not equal to”.
⇒\Rightarrow implies.
Implies: what follows is a consequence of what came before. Say it: “which gives”.
×\times times.
Times (multiplication). Between two vectors: the cross product. Say it: “times”.
⋅\cdot dot.
Times (multiplication). Between two vectors: the dot product. Say it: “times”.
∂\partial partial.
Partial derivative: the rate of change with one variable, holding the others fixed. Say it: “partial”.
∇\nabla nabla (del).
Del: ∇f is the gradient, ∇·v the divergence, ∇×v the curl, ∇² the Laplacian. Say it: “del”.
∑\sum sum.
Sum: add up the terms over the range written below and above. Say it: “the sum of”.
ln⁡\ln natural logarithm.
Natural logarithm (base e ≈ 2.718). Say it: “log”.
log⁡\log logarithm.
Logarithm; log₁₀ is the base-10 logarithm. Say it: “log”.
v⃗\vec v vector arrow.
A vector: a quantity with a size and a direction. Say it: “vector”.
ı^\hat\imath hat.
A unit vector: a vector of length 1 that only gives a direction (î, r̂). Say it: “hat”.
GG G.
Newton's gravitational constant, G ≈ 6.674 × 10⁻¹¹ m³ kg⁻¹ s⁻². Unit: m³/(kg·s²). Say it: “capital G”.
cc c.
The speed of light, c ≈ 2.998 × 10⁸ m/s (in the Eddington rate and ε_r = L/(Ṁc²)); as c_∞, the speed of sound far from the black hole (in its radius of influence, GM/c_∞²). Unit: m/s. Say it: “c”.
kk k.
The wavenumber of a Fourier mode (in Φ̂_k): the Poisson equation becomes −k²Φ̂ = 4πGρ̂. Unit: 1/m. Say it: “k”.
TT T.
Temperature, in kelvin. Unit: K (often given as an energy, kT, in eV). Say it: “capital T”.
M⊙M_{\odot} solar mass.
One solar mass, about 1.99 × 10³⁰ kg. Unit: kg. Say it: “solar masses”.
csc_{s} speed of sound.
The speed of sound in the gas. Unit: m/s. Say it: “c s”.
Φ\Phi capital phi.
The gravitational potential: the force on a mass m is −m∇Φ. Unit: J/kg = m²/s². Say it: “capital phi”.
⋆\star star.
As a subscript, stars: ρ̇⋆ and Σ̇⋆ are the star formation rate per unit volume and per unit area. Say it: “star”.
Σ\Sigma capital sigma.
Surface density: mass per unit area; Σ_g for gas, Σ̇⋆ the star formation rate per unit area. Unit: kg/m² (usually M⊙/pc²); Σ̇⋆ in kg/(m²·s). Say it: “capital sigma”.
tt t.
Time. Unit: s. Say it: “t”.
dd d.
As in dr or dM: d marks an infinitesimally small change, in a derivative or an integral. Say it: “d”.
ii i.
Index of a simulation particle; in F̂_k = −ik⃗Φ̂_k, the imaginary unit. Say it: “i”.
nn n.
The exponent of the star formation law (about 1 to 2). Say it: “n”.
ee e.
Euler's number, e ≈ 2.718: each e-folding multiplies the black hole's mass by e. Say it: “e”.
mm m.
Mass of a simulation particle (m_DM) or of the proton (m_p). Unit: kg. Say it: “m”.
FF F.
Force; F̂_k is its Fourier transform on the mesh. Unit: N. Say it: “F”.
vv v.
Velocity of the gas (v⃗); in Bondi accretion, the black hole's speed relative to the gas. Unit: m/s. Say it: “v”.
rr r.
A position (r⃗), or the separation of two simulation particles. Unit: m. Say it: “r”.
PP P.
Gas pressure. Unit: Pa. Say it: “capital P”.
QQ Q.
Heating of the gas by its sources, per unit volume. Unit: W/m³. Say it: “Q”.
LL L.
Luminosity radiated by the accreting black hole. Unit: W. Say it: “L”.
NN N.
Number of particles in the simulation. Say it: “capital N”.
MM M.
Mass of the dwarf galaxy, in its binding energy GM²/R. Unit: kg (here M☉). Say it: “capital M”.
RR R.
Radius of the dwarf galaxy, in its binding energy GM²/R. Unit: m (here kpc). Say it: “capital R”.
uu u.
Internal energy of the gas per unit mass. Unit: J/kg. Say it: “u”.
rir_{i} r i.
Position of particle i (r⃗_i). Unit: m. Say it: “r sub i”.
mpm_{p} proton mass.
The proton mass, 1.673 × 10⁻²⁷ kg. Unit: kg. Say it: “m p”.
ZZ Z.
Metallicity of the gas: its fraction of elements heavier than helium. Say it: “Z”.
ρg\rho_{g} gas density.
Density of the gas. Unit: kg/m³. Say it: “rho sub g”.
mDMm_{\text{DM}} particle mass.
Mass of one dark matter simulation particle. Unit: kg (here M☉). Say it: “m sub D M”.
rjr_{j} position of particle j.
Position of particle j (r⃗_j). Unit: m. Say it: “r sub j”.
Φ^k⃗\hat\Phi_{\vec k} Fourier-space potential.
Fourier transform of the potential at wavevector k⃗ (Φ̂_k). Say it: “capital phi hat sub k”.
ρ^k⃗\hat\rho_{\vec k} Fourier-space density.
Fourier transform of the density at wavevector k⃗ (ρ̂_k). Say it: “rho hat sub k”.
MBHM_{\text{BH}} black hole mass.
Mass of the black hole. Unit: kg (here M☉). Say it: “capital M sub B H”.
MEddM_{\text{Edd}} Eddington-limited mass.
Mass of a black hole growing at the Eddington limit; dM_Edd/dt is the Eddington accretion rate. Unit: kg (here M☉). Say it: “capital M sub Eddington”.
εr\varepsilon_{r} radiative efficiency.
Radiative efficiency: the fraction of the accreted rest-mass energy radiated, about 0.1. Say it: “epsilon sub r”.
σT\sigma_{T} Thomson cross-section.
The Thomson cross-section, 6.652 × 10⁻²⁹ m². Unit: m². Say it: “sigma sub T”.
Σg\Sigma_{g} gas surface density.
Surface density of the gas. Unit: kg/m². Say it: “capital sigma sub g”.
c∞c_{\infty} sound speed far from the black hole.
Sound speed of the gas around the black hole. Unit: m/s. Say it: “c sub infinity”.
tEt_{E} t sub E.
E-folding time of Eddington-limited black hole growth, about 45 Myr. Unit: s. Say it: “t sub E”.
ρ˙⋆\dot{\rho}_{\star} rho dot sub star.
The star formation rate per unit volume: the mass of gas turned into stars per unit volume and time. Unit: kg/(m³·s) (usually M☉ yr⁻¹ kpc⁻³). Say it: “rho dot sub star”.
Σ˙⋆\dot{\Sigma}_{\star} capital sigma dot sub star.
The star formation rate per unit area of a galaxy's disc (the Kennicutt law). Unit: kg/(m²·s) (usually M☉ yr⁻¹ kpc⁻²). Say it: “capital sigma dot sub star”.
M˙BH\dot{M}_{\text{BH}} M dot sub BH.
The rate at which a black hole gains mass (its accretion rate). Unit: kg/s (usually M☉/yr). Say it: “capital M dot sub B H”.
M˙Edd\dot{M}_{\text{Edd}} M dot sub Edd.
The Eddington accretion rate: the largest rate at which a black hole can grow before its own radiation pushes the gas away. Unit: kg/s (usually M☉/yr). Say it: “capital M dot sub Eddington”.
r⃗¨i\ddot{\vec r}_{i} r vector double dot sub i.
The acceleration of simulation particle i: the second rate of change of its position vector r⃗_i with time. Unit: m/s². Say it: “vector r double dot sub i”.

Tap or click a symbol in a formula to see the same explanation. All symbols: symbols and notation.

Words on this page

Show the 111 words used here

New here

hydrodynamic.
The physics of flowing fluids such as gas: how pressure, gravity and motion change their density, speed and temperature.
subgrid physics.
Processes too small for a simulation to follow directly, such as star formation and feedback, added through simple rules called recipes.
resolution.
The smallest scale or mass that a computer simulation can represent; anything smaller is not followed.
softening length.
A small distance below which a simulation weakens the force between particles, to avoid huge forces at tiny separations.
Plummer sphere.
A simple model of a ball of stars whose potential is minus GM over the square root of r² plus a core radius squared.
zoom-in simulation.
A simulation that re-runs one small region of a larger run at much higher resolution, keeping the rest coarse.
particle–particle method.
Computing gravity in a simulation by adding up the pull of every particle on every other: exact but slow, about N² steps.
tree code.
A fast way of computing gravity in a simulation by grouping distant particles into cells and treating each cell as one mass.
particle–mesh method.
Computing gravity in a simulation by spreading the particles' mass onto a grid and solving for the potential there.
periodic boundaries.
Boundary conditions that make opposite faces of a box match, so whatever leaves one face, particle or wave, comes back through the other.
Lagrangian.
Of a description of a fluid or gas: following each element as it moves, labelled by where it started.
hot-mode accretion.
Growth of a galaxy from gas that is shock-heated to the halo's virial temperature as it falls in, then cools and sinks to the centre.
overcooling problem.
The failure of early galaxy-formation models without feedback: gas cooled and formed stars too early and too fast.
semi-analytic model.
A quick model of galaxy formation that takes halos and their merger histories from theory or simulations and adds the gas physics as simple rules.
merger tree.
A diagram of how a halo was built: its branches are the smaller halos that merged, step by step, to form it.
coevolution.
The growth of a galaxy and its central black hole together, each affecting the other.
radius of influence.
The distance within which a body's gravity, such as a black hole's, outweighs that of the surrounding stars and gas.
Bondi accretion.
Steady, spherical infall of gas onto a black hole or star, at a rate set by its mass and the gas's density and sound speed.

Also used

symmetry.
A change, such as a reflection, a rotation or a shift, that leaves something looking exactly the same. Explained in The derivative: slope of the tangent line and rate of change.
spherical collapse model.
A simple, exactly solvable model in which one uniform, slightly overdense sphere expands, stops, collapses and forms a halo. Explained in When ripples collapse: the spherical collapse model.
axisymmetric.
Unchanged by any rotation about one axis, like a disc or a spinning top. Explained in Orbits in galaxies: epicycles, Oort constants and the Tully–Fisher relation.
galaxy.
A huge system of stars, gas and dust, from thousands to over a trillion stars, held together by gravity inside a dark matter halo. Explained in Towards the universe: weighing the Sun and the Galaxy with orbits.
halo.
A large, roughly round cloud of dark matter, held together by its own gravity, inside which a galaxy or a cluster of galaxies sits. Explained in When ripples collapse: the spherical collapse model.
collisionless.
Of a gas or a set of particles: whose particles almost never hit one another, so each moves only under the overall forces. Explained in Mean free path, effusion, sound and diffusion.
dark matter.
Matter that gives out no light and is detected only through its gravity; there is about five times more of it than ordinary matter. Explained in Towards the universe: weighing the Sun and the Galaxy with orbits.
baryon.
A particle made of three quarks, such as a proton or a neutron; in cosmology, ordinary matter as opposed to dark matter. Explained in Cores or cusps? How baryons reshape dark matter halos.
feedback.
Energy and momentum that stars, supernovae and black holes return to the gas around them, heating it or blowing it out and slowing star formation. Explained in Cores or cusps? How baryons reshape dark matter halos.
black hole.
A region of spacetime from which nothing, not even light, can escape, formed when matter collapses beyond its own horizon. Explained in Black holes.
gravitational potential.
The gravitational potential energy a mass would have at a point, per kilogram of mass. Explained in Electric potential and potential energy.
megaparsec.
A million parsecs, about 3.26 million light-years: the usual unit for distances between galaxies. Explained in Towards the universe: redshift, stretched light from moving sources.
dwarf galaxy.
A small, faint galaxy, below about a billion solar masses; the faintest, ultra-faint dwarfs, have under about 100,000 solar masses of stars. Explained in Counting the ordinary matter: stars, gas, and systems without dark matter.
Poisson's equation.
The equation linking a potential to its source: for gravity, the density of mass; for electricity, the density of charge. Explained in Why a static universe cannot work.
diverge.
To fail to settle on a finite value: a series or integral diverges when its partial results grow without limit or never settle. Explained in Improper integrals.
acceleration.
How fast velocity changes: the change in velocity in each unit of time. Explained in Rates of change and area under a graph.
velocity.
How fast and in which direction something moves: the change in position in each unit of time. Explained in Speed and velocity.
hierarchical.
In nested levels: each cell split into smaller cells, and those into smaller ones again.
dimension.
The number of independent directions in a space: one for a line, two for a plane, three for ordinary space. Explained in Position and velocity in one dimension.
multipole expansion.
Writing the far field of a charge or mass distribution as a sum of simpler terms that fade ever faster with distance. Explained in The multipole expansion with traceless symmetric tensors.
fast Fourier transform.
A fast method for multiplying by the Fourier matrix, splitting the work in halves again and again, so n log n steps replace n². Explained in Complex matrices and the fast Fourier transform.
initial condition.
The state of a system at the starting time, such as its position and speed, which picks out one solution of its equation. Explained in Introduction to first-order systems.
fluctuation.
A departure of a quantity from its average value, usually small and random, from moment to moment or from place to place. Explained in Zero-point energy, fluctuations and surprises.
linear.
Of a relation or equation: using only first powers of the unknowns, so doubling the cause doubles the effect and effects simply add. Explained in Solving and rearranging formulas.
comoving.
Moving along with the expansion of the universe, or measured on a grid that stretches with it, so the expansion itself is divided out. Explained in The homogeneous expanding universe.
uniform.
The same at every point, or unchanging in time: a uniform rod has the same density all along it. Explained in The electric field.
density.
How much of something (mass, charge, energy, particles or probability) there is in each unit of volume, area, length or other variable. Explained in Density and pressure.
field.
Something that has a value at every point of space, such as the temperature, the wind velocity or the electric field at each place. Explained in Newton's law of gravitation.
Gaussian random field.
A random pattern of values in space whose value at each point, and any combination of values, follows a bell-shaped normal distribution. Explained in How many halos? The Press–Schechter mass function.
power spectrum.
How strong the ripples of a random field, such as the density of matter or the CMB temperature, are on each scale of size. Explained in Measuring structure: the power spectrum and the correlation function.
linear perturbation theory.
Following small departures from a smooth state by keeping only terms in the equations that are proportional to the departures, not their squares. Explained in How small ripples grow: linear perturbation theory.
galaxy cluster.
A group of hundreds to thousands of galaxies held together by their shared gravity: the largest bound objects in the universe. Explained in Galaxy clusters: Zwicky's missing mass.
pressure.
The force pushing on a surface divided by the area of the surface, so the push on each square metre. Explained in Density and pressure.
equation of state.
A relation between a substance's pressure, volume (or density) and temperature, such as the ideal gas law PV = NkT. Explained in Thermodynamic variables, temperature and work.
energy.
A quantity, measured in joules, that a body or field has because of its motion, position or state; a closed system keeps its total. Explained in Conservation of energy.
turbulence.
Irregular, swirling fluid flow with eddies of many sizes, the opposite of smooth laminar flow. Explained in Viscosity, heat conduction and the Boltzmann equation for metals.
magnetic field.
The field made by magnets and moving charges, which pushes sideways on other moving charges and turns compass needles. Explained in Magnetic fields and magnetic force.
Eulerian.
Describing a fluid by recording, at each fixed point of space, the velocity, density and pressure of whatever fluid passes. Explained in From a chain of masses to a fluid: fields, Eulerian variables and pressure.
continuity equation.
An equation saying that something such as mass or charge is conserved: it changes in a region only by flowing across the edge. Explained in Mean free path, effusion, sound and diffusion.
conserved.
Keeping the same total value as time passes, as energy and momentum do when nothing outside changes them. Explained in Conservation of energy.
Euler equation.
Newton's second law for a fluid without viscosity: an element speeds up because of pressure differences and external forces. Explained in The Euler equation, momentum flux and Bernoulli's equation.
gradient.
The vector of a function's partial derivatives; it points the way the function increases fastest, and its length is that fastest rate. Explained in Graphs, straight lines and slope.
internal energy.
The total energy held inside a system, in the motion and interactions of its particles, not counting the motion of the system as a whole. Explained in Temperature and thermal energy.
metallicity.
The fraction of a star's or gas cloud's mass in elements heavier than helium, which astronomers call metals. Explained in Stellar populations and the chemical evolution of galaxies.
adiabatic.
Happening without any heat flowing in or out. Explained in The first law of thermodynamics.
energy density.
The energy stored in each cubic metre of space, for example in an electric or magnetic field, or in radiation. Explained in Conductors, capacitors and stored energy.
derivative.
The rate at which a function changes as its input changes: the slope of its graph at a point. Explained in Position and velocity in one dimension.
ionization.
Removing one or more electrons from an atom or molecule, leaving it electrically charged. Explained in The Bohr atom and spectral lines.
angular momentum.
The turning version of momentum: for a particle, its position from a chosen point crossed with its momentum, r × p. Explained in Kepler's laws and orbits.
Press–Schechter.
A simple method for predicting how many dark matter halos of each mass exist, from the statistics of the smoothed early density ripples. Explained in How many halos? The Press–Schechter mass function.
star formation rate.
The mass of new stars a galaxy makes per unit time, usually in solar masses per year. Explained in Stellar populations and the chemical evolution of galaxies.
power law.
A relation in which one quantity is proportional to another raised to a fixed power, such as y ∝ x³. Explained in Quadratics and power laws.
surface density.
An amount of mass, charge or particles per unit area of a thin layer or surface. Explained in Potential–density pairs: from point masses to dark matter halos.
galaxy stellar mass function.
The number of galaxies per unit volume in each range of stellar mass. Explained in Galaxies in halos: mass functions, halo occupation and abundance matching.
supernova.
The explosion of a star at the end of its life, briefly as bright as a whole galaxy. Explained in How bright is a distant supernova?.
heat.
Energy that passes between bodies because their temperatures differ, rather than by one doing mechanical work on the other. Explained in Temperature and thermal energy.
isothermal sphere.
A model of a galaxy or halo in which every part has the same velocity dispersion; its density falls as one over radius squared. Explained in Gravitational lensing: weighing mass by bending light.
binding energy.
The energy needed to pull a bound system, such as a nucleus or an atom, apart into its separate pieces. Explained in Binding energy, fission and fusion.
active galactic nucleus.
The centre of a galaxy that gives off huge amounts of light not made by stars, powered by a supermassive black hole swallowing gas. Explained in The G-dwarf problem and active galactic nuclei.
supermassive black hole.
A black hole of a million to ten billion solar masses, found at the centre of most large galaxies. Explained in Black holes.
velocity dispersion.
The spread of the random speeds of stars, galaxies or particles about their average, measured as the root mean square of the differences. Explained in Rotation curves: the flat signature of dark matter.
accretion.
The growth of an object by gas or matter falling onto it under gravity.
quasar.
A very bright galaxy centre powered by gas falling into a supermassive black hole, visible across most of the universe. Explained in The Lyman-α forest and the reionization of the universe.
accretion disc.
A flat, spinning disc of gas spiralling into a black hole or star, heated by friction until it glows. Explained in Black holes.
speed of sound.
How fast small pressure waves travel through a material: about 340 metres per second in air, nearly 1500 in water. Explained in Sound waves in a fluid, the Mach number and shock cones.
Eddington accretion rate.
The rate of feeding whose released energy equals the Eddington luminosity, roughly the fastest steady rate at which a black hole can swallow gas. Explained in The G-dwarf problem and active galactic nuclei.
radiation pressure.
The push exerted by light or other radiation on matter, because photons carry momentum. Explained in Ripples in the CMB: anisotropies and the acoustic peaks.
Thomson cross-section.
The effective target area that a free electron presents to light it scatters, about 6.65 × 10⁻²⁹ square metres. Explained in The Larmor formula and radiation reaction.
proportional.
Of two quantities: always in the same ratio, so that doubling one doubles the other. Explained in Graphs, straight lines and slope.
e-fold.
A growth by a factor of e, about 2.718; the number of e-folds in a growth is the natural logarithm of the total factor. Explained in The logarithm from an integral, and areas between curves.
stellar population.
The stars of a galaxy or a part of it, described by their ages, chemical make-up and masses. Explained in Stellar populations and the chemical evolution of galaxies.
initial mass function.
The share of newborn stars of each mass: how many stars form at each mass when a population is born. Explained in Stellar populations and the chemical evolution of galaxies.
instantaneous recycling.
The simplifying assumption that massive stars return their new elements to the gas at once, and light stars never. Explained in Stellar populations and the chemical evolution of galaxies.
stellar population synthesis.
Working out which stars make up a galaxy by building its spectrum from the spectra of many kinds of star and matching the result. Explained in Observing galaxies: magnitudes, types, luminosities and velocities.
colour.
In astronomy, the difference between an object's magnitudes in two filters; a larger value means redder light. Explained in Observing galaxies: magnitudes, types, luminosities and velocities.
spectrum.
The spread of light or other radiation over its wavelengths, or the full set of values a quantity such as energy can take. Explained in Light and the electromagnetic spectrum.
equilibrium.
A state that does not change by itself, because the influences acting on it balance. Explained in Newton's first law: inertia.
reionization.
The era, roughly 0.2 to 1 billion years after the Big Bang, when light from the first stars and quasars ionized intergalactic hydrogen again. Explained in The Lyman-α forest and the reionization of the universe.
scatter.
Of light or particles: to be knocked off their path into new directions by something they meet, such as an electron, atom or nucleus. Explained in Electric and magnetic dipole radiation.
age–metallicity degeneracy.
The difficulty that an older stellar population and a more metal-rich one look alike: both are redder. Explained in Counting the ordinary matter: stars, gas, and systems without dark matter.
relativistic.
Moving at a speed comparable to light's, or needing Einstein's theory of space and time to be described correctly. Explained in Four-vectors, the Doppler effect and aberration.
periodic.
Repeating itself exactly after a fixed interval of time or distance, called the period. Explained in Angles, radians and trigonometry.

Academic

model.
A simplified description of a real system, usually in equations, that keeps what matters and leaves out the rest.
numerically.
In terms of actual numbers rather than symbols; often worked out step by step, by computer, instead of from an exact formula.
recipe.
A fixed series of steps that, followed in order, always gives the answer.
dominate.
To be the largest contribution, so that the others hardly matter.
unphysical.
Impossible for a real physical system, such as a negative mass, a negative probability or a speed faster than light.
error.
The difference between a measured or computed value and the true one; often how large that difference may be.
accuracy.
Closeness to the true value: an accurate measurement or calculation gives a result near the right answer.
infer.
To conclude something from evidence, rather than see it directly.
fudge factor.
A number put into a formula to make it agree with the answer wanted, without a full justification.
calibrate.
To set or correct a measuring method by comparing it with a known standard.
assumption.
Something accepted as true, without proof, so that an argument or calculation can proceed; to assume is to accept it so.

Tap or click a word, here or in the text, for its meaning in this lesson. All words: the glossary. How many words are marked in the text: Reading options (the “Aa” button).

Where this leads

Pages that build on this

Practise

Check your understanding

  1. What are the three pillars of a galaxy formation simulation?
  2. Why is the gravitational force between simulation particles 'softened'?
  3. How does the cost of the direct particle–particle force calculation scale with the number of particles NN, and what do tree codes achieve?
  4. With radiative efficiency 0.1, a black hole growing at the Eddington rate increases its mass by a factor ee every εrσTc/(4πGmp)\varepsilon_r\sigma_T c/(4\pi G m_p). About how long is that?
0 of 4 answered

Flashcards

1 / 3

Credits and license

This page is a rewritten explanation based on Chapter 4, Simulating galaxy formation (Sections 4.1–4.4) of Ignacio Ferreras, Fundamentals of Dark Matter (UCL Press, 2025), an open textbook licensed under CC BY-NC 4.0. Attribution: Ferreras, I. 2025. Fundamentals of Dark Matter. London: UCL Press. https://doi.org/10.14324/111.9781800084704

Changes: the text is rewritten in our own words, with our own worked examples; every diagram and plot is generated by this site, and figures from other copyright holders in the book are not used.

The author and UCL Press do not endorse this site. This page is licensed CC BY-NC-SA 4.0: you may share and adapt it for non-commercial use with attribution, under the same license.