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 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 | (indep. of ) | exact (-0.0500) | Kepler / vis-viva |
Two-body Kepler III period | rel | exact | |
Eccentric ellipse closes () | after 1 period | bound Kepler orbit | |
Figure-eight total | 0 (exact) | Chenciner–Montgomery | |
Figure-eight closes | after 1 period | choreography periodicity | |
Figure-eight COM/momentum | 0 to 10-8 | barycentric, | |
Kepler III across 8 planets | rel vs observed | max | JPL Horizons + observed |
Planet mass ratios (IAU 2009) | rel | 332945 / 1047.4 / 3498 | Earth / Jupiter / Saturn |
Harmonic | max dev | SHM exact solution | |
Harmonic energy | SHM invariant | ||
Adversarial: spun figure-eight fails | and no closure | , closure 2.1 | wrong IC correctly rejected |
Figures¶
Generated by scripts/validate_analytical.py (PASS/FAIL per panel; PNG + PDF vector).

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 — the two defining properties of the choreography.

Figure 2:Two-body Kepler. (a) An relative orbit integrated one period returns to its start (residual ), with the focus at the COM. (b) Every invariant is well inside tolerance: the energy equals to machine precision, and and over the period are far below their thresholds.

Figure 3:Kepler’s third law across the solar system. (a) The eight planets (JPL , observed sidereal ) lie on over three decades in . (b) The Kepler-predicted period matches the observed period to for every planet (the residual is dominated by orbital perturbations, not the builder). The planet/Sun mass ratios match the IAU 2009 values to .

Figure 4:Simple harmonic oscillator. (a) The integrated trajectory tracks the exact to . (b) The energy stays at to over a period.

Figure 5:Why the IC must be exact (adversarial). (a) The canonical figure-eight closes with . (b) A plausible mistake — adding a spurious solid-body rotation to the velocities — injects net angular momentum () and shatters the choreography: the three bodies drift apart and never close. This is the failure mode the closure + 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.pyWhat this suite does not test¶
Long-term integrator stability — progenax’s analytical builders only provide ICs; long-term N-body integration and its conservation are gravax’s responsibility. (The in-script Verlet here runs for a single period purely to expose the invariants.)
Relativistic corrections — Newtonian gravity only.
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/.