Skip to content

Scientific validation

These pages track the tests that pin PROTEUS physics against published benchmarks, analytical limits, and cross-implementation checks. Each page covers one source file and records the reference cited, the test ids that carry the reference_pinned marker, and the scope of the comparison. reference_pinned is a pytest marker for a test that compares the code with a published value, an analytical limit or a second implementation. A physics module's behavior is considered validated when every source file with a public physical API has at least one pinned test inventoried here.

A case with a plot shows the tested values against their reference in a light and a dark version. The test writes the plot with the same numbers it asserts, through validation_plot, a pytest fixture of the proteus-mpl package that draws and checks the plot of a test. This command writes all plots to docs/assets/validation/:

pytest -m reference_pinned tests --validation-plots

Without --validation-plots the tests write nothing, but each plot test compares the data of its plot with the committed pair and fails when that pair is missing or stale. The command makes every plot again; commit only the pair of the case you changed, because the bytes match only for the same matplotlib and Pillow versions. The physics inside a coupled module, such as Zalmoxis, is validated in the documentation of that module.

Pages by process

Process Source file Page Plot
Accretion accretion/dummy.py Analytical accretion collision speed
Accretion accretion/wrapper.py Impact atmosphere-loss dispatch Kegerreis loss law
Atmosphere climate atmos_clim/agni.py Transparent black-body limit grey-gas column
Interior energetics interior_energetics/remelt.py Partial giant-impact re-melt melt front
Interior structure interior_struct/zalmoxis.py Liquidus-super IC anchor MgSiO3 liquidus
Orbit orbit/orbit.py Orbital evolution eccentricity rate
Orbit orbit/parameterized.py Prescribed migration laws eccentricity decay
Orbit orbit/satellite.py Satellite angular momentum Earth-Moon angular momentum
Orbit orbit/wrapper.py Orbit module wrapper orbital period
Orbit orbit/obliqua.py Tidal Love-number lookup Love number
Outgassing outgas/atmodeller.py Species-to-element mass split element mass fractions
Outgassing outgas/binodal.py H2-MgSiO3 binodal moles of H2
Outgassing outgas/burial_ledger.py Burial ledger for remelting ledger against a fine grid
Outgassing outgas/compaction.py Melt drainage across the freezing front drainage velocity
Outgassing outgas/lavatmos.py Rock-vapour molar masses molar masses
Outgassing outgas/trapping.py Solid-phase volatile trapping interstitial-melt trapping
Star star/dummy.py Stellar luminosity and instellation solar luminosity
Star star/wrapper.py Stellar wrapper dispatch equilibrium temperature

Adding a page

Create docs/Validation/<module>/<file>.md when the first reference_pinned test for that source file lands, add it to the table above and to the Validation tab in the nav of mkdocs.yml, and cite the benchmark (paper, figure, table), the analytical limit, or the cross-implementation setup the test compares against.

Adding a plot

Give the test the validation_plot fixture and call it after the asserts with a function that draws a new figure from the tested values, and a case name: validation_plot(figure, '<case>'). The fixture writes <case>.svg and <case>_dark.svg (kind='map' writes AVIF for maps), at most 60 kB per file. Commit both files and show them on the page with the #only-light and #only-dark suffixes, followed by the reference, the tolerance, the test id and the command.