Skip to main content
Sandbox Physics
Stellar evolution from pressure to fuel

L3 · Stellar structure and evolution

Reproduce a saved MESA interior and its conditional age

The scientific download lets you verify a saved stellar interior and reproduce an age interval without installing MESA. Begin with the fixed Keszthelyi package, Zenodo 7069766, and the selected ten-solar-mass Solar-composition model 236. Its known source clock is about 17.3994 million years.

Unpack the small scientific package

Download stellar-evolution-science.zip from the materials below and open the extracted stellar-evolution-science directory. It contains the exact selected output members, original attribution, input manifests and independent Python programs. It contains no website Engine or application TypeScript.

The extended selection has thirty-seven original members from three fixed CC BY 4.0 records. The upstream Fortran extension keeps its own LGPL 2-or-later header and license. The earlier fifteen-solar-mass convergence lesson has its own twenty-one members and CC BY-SA 4.0 terms. Keep the source families separate. Reproducing the supplied outputs is a small offline analysis; generating new stellar tracks would be a different calculation.

The two reference programs verify input hashes before reading the tables. The tests also check failure cases. Their JSON reports retain unavailable energy terms, the failed imported WD state and the independent held-out age failure. Optional figures require Matplotlib; the numerical reference itself only needs NumPy.

python scripts/astronomy/ac25/run_reference.py
python scripts/astronomy/ac25/run_extended_reference.py
python scripts/astronomy/ac25/test_reference.py
python scripts/astronomy/ac25/test_extended_reference.py

Sources: Keszthelyi (2022), fixed reproduction package, Zenodo 7069766, CC BY 4.0 · Anne Thoul and Morgan Chidester (2022), convective-boundary school solutions, Zenodo 7082536, CC BY 4.0 · Kumar and Townsley (2025), fixed white-dwarf cooling reproduction package, Zenodo 17765239, CC BY 4.0 · MESA School Leuven 2025 convergence labs, fixed ade5bca00e5caae97ac0b6f880f1de7ccead1553, CC BY-SA 4.0

Prove which interior you opened

Open extended-member-manifest.json. Find Z14Mix1/0/10.0/prof_midMS.data and its paired out.data. The manifest supplies the original member name, archive byte range, CRC, decompressed size and SHA-256. The stored XZ container has a separate hash. Lossless compression changes the container bytes, not the original text.

The profile header gives model 236. Match that number to the final accepted history and compare the age. In the He and WD cases, profiles.index additionally maps a profile filename to its model number. A restarted history can leave an obsolete suffix; removing only duplicate row numbers can retain states that were never reached on the final branch.

Read the original inlist as well as the header. The massive-grid header still has Zheader=0.02Z_{\mathrm{header}}=0.02 after its composition was relaxed. The actual Solar initial metallicity is Z=0.014Z=0.014. The WD header’s default initial mass and composition do not establish its progenitor. The source member, model number, clock origin and raw hash together identify the case.

Sources: MESA 25.12.1, history, profile and restart output documentation · Keszthelyi (2022), fixed reproduction package, Zenodo 7069766, CC BY 4.0 · Kumar and Townsley (2025), fixed white-dwarf cooling reproduction package, Zenodo 17765239, CC BY 4.0

Check shells before fitting a surface point

The native profile rows run from the surface inward. Subtract the next enclosed mass from the current one to obtain each shell mass, with zero enclosed mass at the centre. Every shell mass and outward radial thickness must be positive. Integrate hydrogen fraction times shell mass and compare it with the native aggregate.

Check a different physical relation as well: density times shell volume should reproduce shell mass, and pressure differences should match the gravitational weight in mass coordinate. The rotating MS family needs its recorded fp_rot factor. Ignoring it gives percent-level pressure-gradient discrepancies; including it reduces the interior finite-difference residual substantially.

Keep units visible. Profile reaction columns are linear power per gram, whereas the massive-history pp and cno columns are logarithms of solar luminosities. The history clock is in years and the source wind speed is in centimetres per second. Check these units numerically before plotting: a missed exponentiation or solar-unit conversion can still produce a smooth graph.

Sources: MESA 25.12.1, history, profile and restart output documentation · Keszthelyi et al., arXiv:2209.06350v1, rotating stellar grids and physical prescriptions

Make an observation whose truth is known

For the inverse problem, hold the selected native initial mass, composition, rotation, mixing and wind prescriptions fixed. Use only the recorded post-relaxation branch with central hydrogen at least 0.010.01. The positive starting age and finite ending age define the supported interval.

Take the saved model’s surface temperature and luminosity as the truth. The tutorial example adds 0.0040.004 to log temperature and −0.023-0.023 to log luminosity. Those offsets create one synthetic observation. The stated independent uncertainties are 0.010.01 and 0.050.05 dex respectively; a dex is a unit on a base-ten logarithmic scale.

The likelihood measures how well each age reproduces that synthetic point. For independent Gaussian errors, square the two residuals after dividing by their uncertainties and add them. Small chi-squared means that this particular forward model passes near the point. It does not verify that the family contains every plausible star.

χ2(t)=[log⁡10Tmodel(t)−log⁡10Tobs0.01]2+[log⁡10Lmodel(t)−log⁡10Lobs0.05]2,L(t)∝e−χ2(t)/2\chi^2(t)=\left[\frac{\log_{10}T_{\mathrm{model}}(t)-\log_{10}T_{\mathrm{obs}}}{0.01}\right]^2+\left[\frac{\log_{10}L_{\mathrm{model}}(t)-\log_{10}L_{\mathrm{obs}}}{0.05}\right]^2,\qquad\mathcal L(t)\propto e^{-\chi^2(t)/2}
Both logarithms use the same Kelvin and solar-luminosity conventions for model and synthetic observation. The Gaussian errors are stipulated synthetic conditions for this exercise. A real measurement would require its own uncertainty model.

Sources: Keszthelyi (2022), fixed reproduction package, Zenodo 7069766, CC BY 4.0

Integrate over years, not saved row numbers

MESA takes adaptive time steps. A rapid phase may have many saved rows despite lasting little physical time. Giving every row equal prior probability therefore changes the age prior when the numerical sampling changes.

The reference integrates in physical years inside each recorded interval, using Gauss–Legendre quadrature and the piecewise-linear HR track. The time width of each quadrature contribution is part of its probability weight. It compares a uniform-age prior with a uniform-log-age prior on the same finite positive interval.

For the displayed known-native-model example, the uniform-age median is about 16.2 Myr16.2\,\mathrm{Myr} and the central sixty-eight-percent interval is about 14.4–17.7 Myr14.4\text{–}17.7\,\mathrm{Myr}. The known truth lies at about 17.4 Myr17.4\,\mathrm{Myr}. One noise realization need not put the median at the truth. Changing the proper prior shifts the result, and the saved reports show that sensitivity.

The interval describes uncertainty inside this fixed model. There is no real observed-star constraint in the exercise. A different rotation, mixing prescription, atmosphere or composition family would require a different forward calculation and an explicit model prior.

p(t∣HR,model)=L(t) π(t)∫L(t′) π(t′) dt′p(t\mid\mathrm{HR},\mathrm{model})=\frac{\mathcal L(t)\,\pi(t)}{\int\mathcal L(t')\,\pi(t')\,dt'}
The denominator normalizes probability over the supported physical-time interval.
πage(t)=1tmax⁡−tmin⁡,πlog⁡age(t)=1tln⁡(tmax⁡/tmin⁡)\pi_{\mathrm{age}}(t)=\frac{1}{t_{\max}-t_{\min}},\qquad\pi_{\log\mathrm{age}}(t)=\frac{1}{t\ln(t_{\max}/t_{\min})}
Both priors are proper for 0<tmin⁡≤t≤tmax⁡<∞0<t_{\min}\le t\le t_{\max}<\infty. The strictly positive lower bound makes the log-age prior normalizable. Extending that prior to zero would make the normalization diverge.

Sources: Dotter (2016), MIST 0, arXiv:1601.05144v1, phase-aware track interpolation · Keszthelyi (2022), fixed reproduction package, Zenodo 7069766, CC BY 4.0

A good fit can still give the wrong age

Read the extended Monte Carlo files. Each trial records a new synthetic HR observation, its known truth and the inferred quantiles. At one native ten-solar-mass truth, the conditional intervals include the truth in 204 of 300 trials at the nominal sixty-eight-percent level, and 280 at the nominal ninety-five-percent level. These are finite tests at a specified truth, not guarantees for all stars.

Now use the separately computed eleven-solar-mass Solar model as truth, but fit only the four ten/twelve-solar-mass Solar/SMC vertices. Each named model has equal prior probability and a normalized physical-age prior over its supported lifetime. The family is deliberately missing the actual mass.

For one displayed realization, the true clock is about 14.94 Myr14.94\,\mathrm{Myr} and the four-vertex posterior median is about 21.45 Myr21.45\,\mathrm{Myr}. All 300 trial distance screens pass, yet only 68 of 300 nominal sixty-eight-percent intervals cover the truth. A track with the wrong mass and composition can explain the HR point at the wrong age.

This failure is why the interactive inverse problem conditions on a known selected native MS model. The four-vertex calculation remains a reproducible missing-model example. Its mismatch is kept as a failed validation. Adding an arbitrary Gaussian term to repair the fit statistic would erase the model failure being tested.

Sources: Keszthelyi (2022), fixed reproduction package, Zenodo 7069766, CC BY 4.0 · Dotter (2016), MIST 0, arXiv:1601.05144v1, phase-aware track interpolation

Recheck a new point without the website

The independent app-reference generator reads the original profiles and histories, checks the rounded view data against them, and evaluates both priors with NumPy. It also reproduces the seeded Gaussian observations used by the browser. The view stores twelve significant digits; the largest tested relative serialization difference is below one part in a hundred billion.

Use the commands below to regenerate that comparison. For another dataset, retain the same order of work: fix its version and permissions, verify the model/clock identity and units, test an independent physical relation, state the time and model priors, then withhold a genuinely independent model. Inspect a failed result before trusting a narrow interval.

python scripts/astronomy/ac25/generate_app_reference.py \
  --view-data docs/astronomy/ac25/native-atlas.json \
  --out docs/astronomy/ac25/rebuilt-app-reference.json

Sources: MESA 25.12.1, history, profile and restart output documentation · Keszthelyi (2022), fixed reproduction package, Zenodo 7069766, CC BY 4.0

Reproduce the saved models

The small package contains licensed native MESA outputs and independent Python. Run it offline with Python and NumPy; source attribution and separate model clocks are included.

Exact bytes, hashes and licenses

stellar-evolution-science.zip
17713149 bytes
SHA-256 55b2bae2cca21a8ecb56461a922f62e07f7fe8217db4005abebe8c46455def36

README-science.md
10655 bytes
SHA-256 1b629f6b94b7c750927996fa8d4dfba6ebb6d668215c59c158f0abdb45477313

include-manifest.json
36365 bytes
SHA-256 d6ee560d65de4642b89fdfa8174f8dd565a34cd9120ae10122bd64bde0e0ee95

extended-member-manifest.json
63478 bytes
SHA-256 34f2072b76946fc580d8d6f416beaf3a759feca11b6391fab077b46fbafd9403

extended-reference-results.json
50847 bytes
SHA-256 b59b46b3e7b6daaf651cc9490051c7926c7ea83d9273b10eb24f77c8ac0660a4

app-reference-results.json
23179 bytes
SHA-256 32e6584facab015398a3d7685fd65745a23aac69b20e1b2cb70987ad0b9d50a9

Native atlas data: CC BY 4.0. Earlier convergence teaching outputs: CC BY-SA 4.0. The original Fortran extension retains LGPL 2-or-later; new standalone Python is MIT. Website Engine and app TypeScript are excluded.

Try the reasoning

Why does equal weight per saved history row give an unstable age prior?

The number of rows depends on adaptive numerical time steps. Refining a short phase would increase its assigned probability without increasing its physical duration.

Does a small chi-squared prove that a four-model library contains the true mass and composition?

No. Different forward models can pass through similar HR locations at different ages. The independent eleven-solar-mass test exposes that degeneracy and its poor interval coverage.

Reproduce one conditional synthetic age record

  1. Keep the default known native main-sequence case. Save its JSON and compare the case, model, clock and source hash with the tutorial.
  2. Change the proper age prior, keeping the synthetic measurement fixed, and compare the age interval.
  3. Set a seed and draw a synthetic point. Save its observation, actual seed and conditional fit; use the Python reference to reproduce it.

Primary sources

  1. Keszthelyi (2022), fixed reproduction package, Zenodo 7069766, CC BY 4.0
  2. Keszthelyi et al., arXiv:2209.06350v1, rotating stellar grids and physical prescriptions
  3. MESA 25.12.1, history, profile and restart output documentation
  4. Dotter (2016), MIST 0, arXiv:1601.05144v1, phase-aware track interpolation
  5. Anne Thoul and Morgan Chidester (2022), convective-boundary school solutions, Zenodo 7082536, CC BY 4.0
  6. Kumar and Townsley (2025), fixed white-dwarf cooling reproduction package, Zenodo 17765239, CC BY 4.0
  7. MESA School Leuven 2025 convergence labs, fixed ade5bca00e5caae97ac0b6f880f1de7ccead1553, CC BY-SA 4.0
FeedbackSomething broken, confusing, or missing on this page?Tell us
What kind of feedback?

Sent with this page’s address, its Lab ID, the site language and your device type. Please leave out personal details. Feedback is kept for up to 12 months.Privacy policy