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:
- the growth of structure in the collisionless dark matter, the backbone of the large-scale structure;
- the hydrodynamics of the gas, the original baryonic material that eventually makes stars;
- 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 , 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 particles of mass , Poisson's equation becomes
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 , 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:
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 , 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 is then a sum over all the others:
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 operations per step. Special hardware (such as the GRAPE "Gravity Pipe" computers) and parallel computing help, but two ideas cut the cost far more:
- Tree codes (Barnes and Hut, 1986). Space is divided hierarchically into cells (octants in three dimensions), down to single particles. Nearby particles are summed directly; a distant cell is replaced by a low-order multipole expansion of its mass. If a cell is far enough away, it is not "opened". Because matter is clustered, the cost drops to about .
- Particle–mesh (PM) codes. The particles' mass is assigned to a grid, and Poisson's equation is solved in Fourier space with fast Fourier transforms:
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
Its accuracy is limited by the mesh size. The P³M method combines a mesh for distant forces with direct sums for close neighbours.
Why trees matter
A modern simulation has particles. Compare the number of pair interactions per time step for direct summation and for a tree code.
Direct summation
interactions per step.
Tree code
operations: about 300 million times fewer.
Meaning
Even at 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:
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 (compression, heating sources and radiative cooling , which depends on temperature , metallicity and density ), and the equation of state of an ideal gas with adiabatic index . [The book calls the energy density; with and the source terms divided by , it is the energy per unit mass, as written here.] The time derivative follows the moving gas:
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, (Schmidt) or per unit area (Kennicutt), with –2 and an efficiency in the constant, above a threshold surface density of about 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 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.
Can supernovae unbind a dwarf galaxy's gas? (adapted from a "How about…?" box in the book)
A dwarf galaxy has within 2 kpc, modelled as a truncated isothermal sphere with binding energy . It forms stars at per year for 50 million years, with one supernova for every of stars formed. What fraction of the supernova energy would be needed to match the binding energy?
Binding energy
J J erg.
Supernova energy
of stars gives supernovae, releasing erg in total.
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, with the sound speed of the surrounding gas, is only about 0.05 kpc for and km/s, below the resolution of about 100 pc. Simulations plant seed black holes (about ) in halos above a threshold mass and let them grow as sink particles, by Bondi accretion from gas of density and sound speed when the black hole moves at speed :
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:
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 the Thomson cross-section and 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.
How fast can a black hole grow?
A seed black hole of grows at the Eddington rate with . How long until it reaches ?
Exponential growth
The Eddington rate is proportional to , so the mass grows exponentially with e-folding time s s Myr.
Time needed
A factor needs 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, –) 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#
- Simulations rest on collisionless dark matter, gas hydrodynamics and subgrid recipes.
- Dark matter is followed with synthetic particles (EAGLE: each) under a softened potential ; force resolution reaches about 100 pc. Direct sums cost ; trees ; particle–mesh codes solve Poisson's equation with FFTs.
- Initial conditions: a Gaussian random field with the cosmological power spectrum, in a periodic box of about 100 Mpc.
- Gas obeys the continuity, Euler and energy equations with an equation of state, on grids or as particles.
- Subgrid physics: star formation laws, supernova feedback (about erg each), black hole seeding, Bondi and Eddington-limited growth (e-folding time about 45 Myr), AGN feedback, stellar evolution, dust, magnetic fields. It is the main uncertainty, and is calibrated against observed galaxies.