---
title: "A Galaxy’s Chemical Clock Interactive Lab | Sandbox Physics"
description: "How can iron and magnesium remember how quickly a galaxy formed stars?"
canonical_url: "https://sandboxphysics.com/labs/galactic-chemical-evolution/"
language: "en"
page_type: "lab"
alternate_languages:
  zh-CN: "https://sandboxphysics.com/zh/labs/galactic-chemical-evolution/"
last_modified: "2026-11-05"
---

Gas, stellar generations and delayed enrichment

# A Galaxy’s Chemical Clock

**How can iron and magnesium remember how quickly a galaxy formed stars?** Magnesium arrives promptly from short-lived massive stars, while delayed sources add much more iron later. Stars keep their birth composition. Different star-formation speeds place that delayed enrichment at different iron abundances; fresh gas and winds also move the track.

Change star formation, fresh-gas inflow and winds. Follow one reservoir’s magnesium and iron, and the birth compositions kept by its stellar generations.

> Interactive simulation: open this page in a web browser to change the parameters and run the model.

Model assumptions

A single well-mixed reservoir follows fixed effective net Mg/Fe yields adopted from VICE1.3.1, a fixed Kroupa mass convention and instantaneous return of forty percent. The effective coefficients are declared inputs, not a new integration of a stellar yield grid or a calibration of Sculptor. Star formation and primordial inflow are prescribed histories; wind removes the current gas mixture. Ia enrichment is a causal normalized delayed source, including a small nonzero Mg yield. Bulk delayed return, thermal and spatial mixing, metallicity-dependent yields, dust and r-process production are omitted. The constant-hydrogen abundance conversion is a trace-element approximation. Gas area and flow glyphs are schematic mass indicators; homogeneous colour represents the same calculated Mg/Fe ratio, not a measured image or luminosity. Glyph progress follows cumulative transport, with compressed model time. Stellar cohorts represent birth intervals of fifty million years and retain mass-weighted birth fractions; their plotted points have no invented abundance scatter. Readouts and playback select actual states saved at intervals of fifty million years from a fully computed history of eight billion years. Bounded controls have finite corner and withheld checks, not a uniform accuracy certificate. Unsupported or exhausted histories retain the last accepted complete record. Original stellar observations are not bundled or fitted here.

## The same gas and stellar generations

Own one-zone model. Colour encodes magnesium relative to iron; each cohort keeps its birth composition.

Magnesium richer Iron richer

$[\mathrm{Fe}/\mathrm H]$ and $[\mathrm{Mg}/\mathrm{Fe}]$

Horizontal: iron abundance. Vertical: magnesium relative to iron. Filled circles are born cohorts, with area proportional to locked mass. The outlined point is the selected gas state.

When new magnesium and iron arrive

Prompt Mg Prompt Fe Delayed Mg Delayed Fe

Vertical rate in $10^{-3}\mathrm{M}_\odot\,\mathrm{yr}^{-1}$. These are net element mass rates, not explosion counts.

Gas, locked mass and transported mass

Gas Locked Wind Cumulative inflow

$G+M_{\rm locked}+M_{\rm wind}-M_{\rm in}=G_0$. Inflow is cumulative transport, not another reservoir.

Dashed lines show the full computed prescribed history. Solid portions and the time cursor stop at the selected saved state; they are not measured stellar observations.

Coefficients, numerical scope and accepted data

The effective net yields are fixed factory coefficients from VICE 1.3.1. Kroupa mass limits, return fraction and the solar reference are explicit assumptions; this is not a newly integrated nucleosynthesis table. The Ia magnesium term is small and retained.

A cohort averages birth mass fractions before taking logarithms. No random scatter, surviving-star selection or real stellar catalogue is generated. The model does not uniquely determine a galaxy’s age or star-formation history.

- [VICE 1.3.1 · fixed net-yield, IMF and solar-reference inputs](https://github.com/giganano/VICE/tree/fa0260957152f630652a5d40ab1edefc03468a2c)
- [Weinberg, Andrews & Freudenburg · one-zone equations and delay definitions](https://arxiv.org/abs/1604.07435v1)

Physics tutorial

## Why the same delay can leave different chemical tracks

**Background** New stars inherit the composition of the gas they form from. Short-lived massive stars supply metals promptly, while delayed sources keep adding iron after that first generation.

**Why it matters** Compare rapid and extended star formation, then add fresh gas. Follow how the same production rules meet a different reservoir history.

Start with the essentials

- **Focus question**: Does one magnesium-to-iron ratio give a unique stellar age?
- **One-sentence intuition**: A chemical ratio remembers both the timing of enrichment and the gas available to receive it.

### Core mathematical model

#### Gas is supplied, locked and carried away

$$
\begin{aligned}\dot G&=I-(1-\mathcal R+\eta)\psi\\\mathcal R&=0.4\end{aligned}
$$

Here $G$ is gas mass, $I$ primordial inflow, $\psi$ gross star formation and $\eta$ wind mass per unit initially formed stellar mass. Rates use billion solar masses per gigayear, numerically solar masses per year.

#### New elements and inherited elements have different roles

$$
\begin{aligned}Z_i&=\frac{M_i}{G}\\\dot M_i&=y_i^{\rm CC}\psi+y_i^{\rm Ia}C(t)\\&\quad-(1-\mathcal R+\eta)\psi Z_i\end{aligned}
$$

Net yields count newly produced material. Inherited metals are recycled under the same return fraction; locking and wind use the current gas fraction. Primordial inflow increases gas without adding these metals, diluting their fractions.

#### A normalized delay distribution supplies a causal source

$$
\begin{aligned}C(t)&=\int_0^t\psi(t-\tau)D(\tau)\,d\tau\\D(\tau)&\propto\tau^{-1.1}\\\int_{0.15\,\mathrm{Gyr}}^{15\,\mathrm{Gyr}}D(\tau)\,d\tau&=1\end{aligned}
$$

The kernel is zero outside the indicated delay range. The integrated Ia yield already includes its enrichment normalization, so no extra event-rate factor is multiplied. This effective delay describes material reaching star-forming gas, not only the explosion clock.

#### Abundance brackets compare with a fixed solar reference

$$
\begin{aligned}\left[\mathrm{Fe}/\mathrm H\right]&=\log_{10}\frac{Z_{\rm Fe}}{Z_{{\rm Fe},\odot}}\\\left[\mathrm{Mg}/\mathrm{Fe}\right]&=\log_{10}\frac{Z_{\rm Mg}/Z_{\rm Fe}}{Z_{{\rm Mg},\odot}/Z_{{\rm Fe},\odot}}\end{aligned}
$$

The trace-element model keeps hydrogen fraction fixed to the adopted solar reference. These are base-ten logarithms. The same fractions colour the reservoir and define the external abundance plot.

#### A stellar generation keeps its integrated birth composition

$$
\overline Z_{i,\rm cohort}=\frac{\Delta M_{i,\rm locked}}{\Delta M_{\rm locked}}
$$

Both increments cover the same birth interval. Average the mass fractions with birth mass before converting to a logarithmic bracket. This does not add a scatter distribution.

### Common difficulties

#### Formed mass differs from mass still locked in stars

**Typical misconception** Every unit of gas that forms stars stays outside the gas forever.

**Better mental model** In this approximation the returned fraction is $0.4$. A generation that initially forms $10^6\mathrm{M}_\odot$ returns $4\times10^5\mathrm{M}_\odot$ immediately and leaves $6\times10^5\mathrm{M}_\odot$ locked in long-lived stars and remnants. A wind removes additional gas separately.

#### Both early and late sources make iron

**Typical misconception** Magnesium means young stars, while all iron comes from old stars.

**Better mental model** Prompt sources already make iron. The delayed effective source is much richer in iron relative to magnesium, so it changes the mixture later. A star then retains the gas composition at its birth. Different histories can pass through the same ratio.

#### Cohort points represent birth intervals

**Typical misconception** Each dot is a measured individual star, and its spread maps spatial mixing.

**Better mental model** Each point represents one saved birth interval, weighted by the mass locked into that cohort. Its composition is the ratio of accumulated element mass to accumulated cohort mass. The single reservoir has no spatial abundance scatter.

### Run the experiment

1. 01

   #### Watch new gas enter

   Use the fresh-gas preset and watch the reservoir through the inflow pulse.

   **What to observe:** The added gas initially carries neither tracked metal. Its arrival can move the gas backwards in iron abundance while older cohorts retain their colours.

2. 02

   #### Compare two star-formation clocks

   Switch between rapid and extended star formation at the same saved time.

   **What to observe:** The production delay is unchanged, but the earlier enrichment and available gas differ. The delayed contribution can therefore meet different iron abundances.

3. 03

   #### Follow what a wind removes

   Increase wind loading and compare gas, locked material and cumulative wind outside the stage.

   **What to observe:** The wind carries the current mixture. A stronger wind changes both the gas available later and the amount of each element removed.

4. 04

   #### Read a cohort and save the experiment

   Pause, choose a saved time in the advanced section and export the accepted JSON.

   **What to observe:** The selected state, rates, cohort birth fractions, input histories, units and fixed coefficient identities are all supplied together.

Physical conclusion

The track links a prescribed history to birth compositions. Its interpretation also needs assumptions about gas transport, yields and stellar sampling.

## Related experiments and articles

Galactic chemical evolution · Reading path

### From gas budgets to chemical populations

Articles on this path that use this experiment, followed by the other experiments they suggest.

1. [Article **Why magnesium and iron remember star formation**](https://sandboxphysics.com/stories/galactic-chemical-evolution/why-magnesium-and-iron-remember-star-formation/)
2. [Article **Follow the gas and the newly made elements**](https://sandboxphysics.com/stories/galactic-chemical-evolution/follow-the-gas-and-new-elements/)
3. [Article **Calculate a delayed enrichment track**](https://sandboxphysics.com/stories/galactic-chemical-evolution/calculate-a-delayed-enrichment-track/)
4. [Article **From a gas track to a stellar abundance population**](https://sandboxphysics.com/stories/galactic-chemical-evolution/from-gas-tracks-to-stellar-abundances/)
5. [Article **Recompute a fixed Sculptor abundance sample**](https://sandboxphysics.com/stories/galactic-chemical-evolution/recompute-a-fixed-sculptor-sample/)
6. [Article **Delayed sources and imperfect mixing**](https://sandboxphysics.com/stories/galactic-chemical-evolution/delayed-sources-and-imperfect-mixing/)

Motion & dynamics · Starter path

## From a falling ball to an orbit

Start by measuring gravity and splitting motion into components. Then add contact forces and collisions, and follow the same laws all the way to an orbit.

[Start here → **Free Fall & Measuring Gravity** Capture a few drops and fit the camera positions to estimate gravitational acceleration. Then add air damping and watch the fit drift from the truth. Observe · 14 min](https://sandboxphysics.com/labs/free-fall/)

1. [1 Free Fall & Measuring Gravity](https://sandboxphysics.com/labs/free-fall/)
2. [2 Projectile Flight Designer](https://sandboxphysics.com/labs/projectile-flight/)
3. [3 Inclined Plane & Friction](https://sandboxphysics.com/labs/inclined-plane/)
4. [4 One-Dimensional Collision Bench](https://sandboxphysics.com/labs/collision-bench/)
5. [5 Mass–Spring Oscillator](https://sandboxphysics.com/labs/mass-spring/)
6. [6 How Orbits Take Shape](https://sandboxphysics.com/labs/orbit/)

[View the full path →](https://sandboxphysics.com/topics/mechanics/#starter-path)
