Gas regulator

The gasregulator

A bathtub model for how galaxies set their metallicity.

Gas from the cosmic web pours into every galaxy, star formation and winds drain it away, and each generation of stars returns fresh metals to whatever gas is left. Adjust these taps, and the star formation rate emerges as a hidden third axis of the mass–metallicity relation.

The life of one galaxy

Each surge of inflow lifts the star formation rate and dilutes the gas with pristine material. Dashed lines trace the same halo fed smoothly; drag across the plot to move through its history.

Inflow Φ Star formation Ψ 12 + log(O/H) Smooth inflow
t = 0 Gyr
The equations at this moment

Star formation, the hidden third axis

Scenarios

Mass–metallicity relation

Each dot is a galaxy, colored by how its star formation rate compares with others of the same mass; tap one to follow its history above.

Below the main sequenceAbove it
Most star-forming third Least star-forming third Same halos, smooth inflow

Fundamental metallicity relation

Here the same galaxies are plotted against μα = log M⋆ − α log SFR. The curve below traces the scatter as a function of α, and the α that minimizes it defines the FMR.

0.30

Ticks on the curve mark α = 0.32 (Mannucci et al. 2010) and 0.66 (Andrews & Martini 2013).

The life of one galaxy

The galaxy from the top of the page, redrawn as you change the parameters. Drag across the plot to move through its history.

Inflow Φ Star formation Ψ 12 + log(O/H) Smooth inflow

The dilution signal

Once the mean trends with mass are removed, what remains is how far each galaxy sits above or below the main sequence and the MZR.

A negative slope is the fundamental metallicity relation in its rawest form: at fixed mass, the galaxies forming stars fastest are the most metal-poor.

How the model works

Three coupled equations track the gas, metals and stars in each galaxy, all fed by an inflow that wanders, and your browser solves them from scratch every time you move a slider.

Halos, inflow and the bathtub

Each of 440 dark-matter halos, spanning about 2 × 1010 to 5 × 1012 M☉ today, grows along a smooth average accretion history. Half of the cosmic baryon share of that accretion reaches the galaxy, multiplied by a randomly wandering factor 10δ(t), where δ follows an Ornstein–Uhlenbeck process with rms σin and coherence time τin. The galaxy’s gas, metals and stars then obey

dMgas/dt = Φ − (1 − R + η) Ψ,   Ψ = Mgas/τdep
dMZ/dt = ZinΦ + y Ψ − (1 − R + ζη) Z Ψ
dM⋆/dt = (1 − R) Ψ,   η = η10 (M⋆/1010 M☉)−a

Equilibrium

Held steady long enough, the reservoir settles where inflow balances the drains, and the metallicity approaches Zeq = [Zin(1 − R + η) + y] / (1 − R + ζη). Although Zeq depends on mass through η, it does not depend on how much gas flows in. So steady galaxies of a given mass all share one metallicity, whatever their star formation rate.

Where the FMR comes from

A surge of inflow fills the reservoir with metal-poor gas faster than stars can re-enrich it, so for a while the galaxy sits above the main sequence and below the MZR; a drought does the opposite. Surges much shorter than the reservoir’s response time, τdep/(1 − R + η), average out, and much longer ones let galaxies ride along in equilibrium. The anticorrelation is therefore strongest when surges last about as long as the reservoir takes to respond.

Fixed ingredients

We assume instantaneous recycling with a return fraction R = 0.4. Halos grow as Mh(z) ∝ (1 + z)0.2 e−0.8z in flat ΛCDM with Ωm = 0.3 and h = 0.7, and oxygen abundances assume 12 + log(O/H) = 8.69 at Z☉ = 0.0134.

Each galaxy is integrated from z = 8 in 15 Myr steps, with the equations solved exactly within each step, so the whole population takes only a few tens of milliseconds in your browser. Because strong-line calibrations disagree with one another by 0.3 dex or more, the SDSS curve is a rough guide rather than a target.

Further reading: Bouché et al. 2010; Lara-López et al. 2010; Mannucci et al. 2010; Davé, Finlator & Oppenheimer 2012; Lilly et al. 2013; Forbes et al. 2014; Curti et al. 2020.