Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Analytical test cases validation

San Diego State University

progenax’s analytical IC builders (progenax.analytical) emit exact-solution initial conditions whose defining invariants can be checked directly. Test file: tests/validation/test_analytical_physics.py (see the test dashboard for the live per-suite count); figures: scripts/validate_analytical.py. The orbits are integrated in-script with symplectic velocity-Verlet (the scheme the tests use); the oracle is always the analytic invariant — the energy formula, the figure-eight’s L=0L=0 and closure, Kepler’s third law, the harmonic solution — not the integrator.

What is verified

Rows map to test_analytical_physics.py; Measured values are regenerated by scripts/validate_analytical.py.

Property

Tolerance (as tested)

Measured

Anchor

Two-body energy E=Gm1m2/2aE = -Gm_1m_2/2a

<1012< 10^{-12} (indep. of ee)

exact (-0.0500)

Kepler / vis-viva

Two-body Kepler III period

<1010< 10^{-10} rel

exact

T=2πa3/GMT = 2\pi\sqrt{a^3/GM}

Eccentric ellipse closes (e=0.5e=0.5)

<104< 10^{-4} after 1 period

1.1×1071.1\times10^{-7}

bound Kepler orbit

Figure-eight total LL

<1010< 10^{-10}

0 (exact)

Chenciner–Montgomery L=0L=0

Figure-eight closes

<106< 10^{-6} after 1 period

4.3×1084.3\times10^{-8}

choreography periodicity

Figure-eight COM/momentum

0 to 10-8

108\le10^{-8}

barycentric, mv=0\sum m\mathbf v=0

Kepler III across 8 planets

rel <102< 10^{-2} vs observed TT

max 6.9×1036.9\times10^{-3}

JPL Horizons aa + observed TT

Planet mass ratios (IAU 2009)

rel <2×103< 2\times10^{-3}

332945 / 1047.4 / 3498

Earth / Jupiter / Saturn

Harmonic x(t)=Acos(ωt+ϕ)x(t)=A\cos(\omega t+\phi)

max dev <103< 10^{-3}

5.7×1075.7\times10^{-7}

SHM exact solution

Harmonic energy E=12mω2A2E=\tfrac12 m\omega^2A^2

ΔE/E<104\Delta E/E < 10^{-4}

5.6×1075.6\times10^{-7}

SHM invariant

Adversarial: spun figure-eight fails

L0L\neq0 and no closure

L=0.30L=0.30, closure 2.1

wrong IC correctly rejected

Figures

Generated by scripts/validate_analytical.py (PASS/FAIL per panel; PNG + PDF vector).

The Chenciner–Montgomery figure-eight. Three equal masses chase one another along a
single figure-eight curve (grey); the markers are the canonical collinear start. The
total angular momentum is exactly zero and the orbit closes after one period to
4\times10^{-8} — the two defining properties of the choreography.

Figure 1:The Chenciner–Montgomery figure-eight. Three equal masses chase one another along a single figure-eight curve (grey); the markers are the canonical collinear start. The total angular momentum is exactly zero and the orbit closes after one period to 4×1084\times10^{-8} — the two defining properties of the choreography.

Two-body Kepler. (a) An e=0.5 relative orbit integrated one period returns to its
start (residual 1.1\times10^{-7}), with the focus at the COM. (b) Every invariant is
well inside tolerance: the energy equals -Gm_1m_2/2a to machine precision, and
\Delta E/E and \Delta|L| over the period are far below their thresholds.

Figure 2:Two-body Kepler. (a) An e=0.5e=0.5 relative orbit integrated one period returns to its start (residual 1.1×1071.1\times10^{-7}), with the focus at the COM. (b) Every invariant is well inside tolerance: the energy equals Gm1m2/2a-Gm_1m_2/2a to machine precision, and ΔE/E\Delta E/E and ΔL\Delta|L| over the period are far below their thresholds.

Kepler’s third law across the solar system. (a) The eight planets (JPL a, observed
sidereal T) lie on T^2 = (4\pi^2/GM_\odot)\,a^3 over three decades in a^3. (b) The
Kepler-predicted period matches the observed period to \le0.7\% for every planet (the
residual is dominated by orbital perturbations, not the builder). The planet/Sun mass
ratios match the IAU 2009 values to \le10^{-4}.

Figure 3:Kepler’s third law across the solar system. (a) The eight planets (JPL aa, observed sidereal TT) lie on T2=(4π2/GM)a3T^2 = (4\pi^2/GM_\odot)\,a^3 over three decades in a3a^3. (b) The Kepler-predicted period matches the observed period to 0.7%\le0.7\% for every planet (the residual is dominated by orbital perturbations, not the builder). The planet/Sun mass ratios match the IAU 2009 values to 104\le10^{-4}.

Simple harmonic oscillator. (a) The integrated trajectory tracks the exact
x(t)=A\cos(\omega t+\phi) to 6\times10^{-7}. (b) The energy stays at
\tfrac12 m\omega^2 A^2 to \Delta E/E \approx 6\times10^{-7} over a period.

Figure 4:Simple harmonic oscillator. (a) The integrated trajectory tracks the exact x(t)=Acos(ωt+ϕ)x(t)=A\cos(\omega t+\phi) to 6×1076\times10^{-7}. (b) The energy stays at 12mω2A2\tfrac12 m\omega^2 A^2 to ΔE/E6×107\Delta E/E \approx 6\times10^{-7} over a period.

Why the IC must be exact (adversarial). (a) The canonical figure-eight closes with
L=0. (b) A plausible mistake — adding a spurious solid-body rotation to the velocities
— injects net angular momentum (L=0.30\neq0) and shatters the choreography: the three
bodies drift apart and never close. This is the failure mode the closure + L=0 tests
are designed to catch.

Figure 5:Why the IC must be exact (adversarial). (a) The canonical figure-eight closes with L=0L=0. (b) A plausible mistake — adding a spurious solid-body rotation to the velocities — injects net angular momentum (L=0.300L=0.30\neq0) and shatters the choreography: the three bodies drift apart and never close. This is the failure mode the closure + L=0L=0 tests are designed to catch.

How to run

# exact-solution physics tests (~2 s on CPU)
pytest tests/validation/test_analytical_physics.py -q

# regenerate the five figures with PASS/FAIL tables
python scripts/validate_analytical.py

What this suite does not test

References

Chenciner & Montgomery (2000), Ann. Math. 152, 881 and Simó (2001) for the figure-eight; JPL Horizons (J2000.0) and the IAU 2009 nominal masses for the solar system; standard celestial-mechanics texts for Kepler and the harmonic oscillator. The builders are in progenax/analytical/.