Md/obliqua - #859
Md/obliqua#859
Conversation
…sigma. Added evection resonance detection to speed up solver. Added yr to s conversion.
…dded orbital models ps1d and ps1d. Added logging for obliqua.
…dded satellite escape termination check.
Brings the branch's satellite/tides/evection work up to date with ~2.5 months of upstream changes (config v2->v3 migration, LavAtmos/rock vapourisation, noble-gas tracking, auto-generated config/module-map/ output-schema docs, and more). Main had independently accumulated an early, pre-redesign snapshot of the same satellite feature (a simple update_satellite/Ltot in orbit/satellite.py, bool-valued orbit.evolve/orbit.satellite config flags) -- confirmed via matching docstrings and commit history that it predates this branch's ps0d/ps1d/ps1d_evec + Satellite-config redesign and was never touched again, so this branch's version supersedes it throughout. Beyond conflict resolution, fixed cascading breakage the merge exposed in previously-passing tests and generator scripts: - Stale bool orbit.evolve/orbit.satellite references across tests/config/test_config.py, test_config_schema_invariants.py, and tests/utils/test_terminate.py/test_coupler.py, updated to the redesigned star_planet_model/planet_satellite_model schema. - tests/plot/test_cpl_orbit.py rewritten for plot_orbit's current 3x2 (planet/satellite x semi-major axis/eccentricity/timescales) figure layout; the old tests mocked a stale 2-panel layout. - tools/_config_schema.py, generate_module_map.py, and migrate_config_v2_to_v3.py updated for the new orbit/satellite/ Obliqua config surface, including a new v2->v3 migration handler mapping the old evolve/satellite bools to star_planet_model="sp0d"/ planet_satellite_model="ps0d" (the simplest 3.0 analogue) with a unit conversion for the satellite mass/semimajoraxis fields -- worth a second look since it's a real judgment call, not a mechanical fix. - hf_row['n_star'] was declared in the helpfile schema but never populated; wired up in orbit/wrapper.py's run_orbit from the same formula ps1d_evec already computes internally. tests/helpers/test_trajectory.py's golden-run reference is now missing 13 orbit/satellite columns and needs re-recording with --record-golden; left as a follow-up rather than attempting a heavy re-record here. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
M_sat/R_sat/C_sat/semimajorax_sat/eccentricity_sat/evection_angle/ axial_period_sat previously populated unconditionally from config.orbit.satellite's defaults in run_orbit's init branch, so a run with no satellite configured still reported a phantom satellite mass and position. Gate them behind include_satellite instead, matching how evolve_orbit_satellite's own dispatch is already gated. Re-recorded tests/integration/golden_run.tsv, whose configuration has no [orbit.satellite] block: M_sat/perigee/semimajorax_sat now read 0.0 rather than the satellite-config defaults, and the branch's 13 new orbit/satellite/n_star columns are present. Diffed column-by-column against the previous recording first to confirm every change traces to this gate or to genuinely new columns, with no unexplained value drift. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…sed dynamic writes for orbit substeps.
|
@MarijnJ0 please can you updated the pinned AGNI version in the PROTEUS |
timlichtenberg
left a comment
There was a problem hiding this comment.
Blocking issue in the inline comment: four shipped config files no longer load on this branch. Let's get those migrated before merge, otherwise looks good.
…ce the orbit now actually evolves.
timlichtenberg
left a comment
There was a problem hiding this comment.
Re-checked after the latest commit. The four config files that failed to load under the 3.0 schema now parse correctly, and both integration tests that were affected pass, including the zalmoxis test that was previously silently skipping instead of running. That resolves the blocking issue from the last review.
I also looked at the open thread on wrapper.py:296 about the Time<=1 seeding gate, since it's still unresolved and touches the same orbit code path. In the dummy integration test's actual output, semimajorax and eccentricity are seeded to nonzero values at Time=0 and evolve smoothly through the run, so the gate is not being skipped for this config. Not blocking on my end; leaving the thread for whoever raised it to close.
Approving.
|
Ok perfect, I went through the final open threads, they seem to be resolved. Now merging this into main!! |
|
Fantastic work! Exciting to see this merged. |
The orbit-evection slow test failed in two places after the obliqua merge, #859: hf_row lacked core_density, so get_C_planet fell through to a config attribute the test namespace does not have (AttributeError at setup), and the Hansen table spanned k in [-50, 200] while the m=0 mirror requests k down to -200, which broke the array shapes in orbitals() (251 against 401 modes). Add an assertion in the fixture that the table range covers what kmin_kmax_for_m0_mirror requests, so widening the test spectrum without the table fails at setup. Replace the timing, peak eccentricity, capture time and angular momentum drift figures in the module docstring with values measured from the current run (628 s, e_peak=0.744 at a'=12.33 R_earth, drift -4.2%), and drop the claims that came from a standalone run that cannot be reproduced here. Correct the C_planet comment to the C_int key that get_C_planet writes.
The orbit-evection slow-tier test errored at setup after the obliqua merge (#859) for two reasons: the test helpfile row did not set core_density, so get_C_planet fell through to a config attribute the test namespace does not have, and the Hansen table spanned k in [-50, 200] while the m=0 mirror requests k down to -200, which mismatched the array shapes in orbitals(). Add core_density to the row, build the table over [-200, 200], guard the table range against what the mirror requests, and refresh the module docstring figures to values measured from the current run. The four tests pass in 629 s; no assertion changed.
* Bump the AGNI pin to accept Julia 1.12 The previous pin (1c4baad0) declared julia = "~1.11, ~1.13", which excludes every 1.12.x. install.sh pins 1.12 on fresh installs, so phase 5 failed with a compat error. AGNI 9f6a49a5 widens the entry to "~1.11, ~1.12, ~1.13" and changes nothing else. * Default to Julia 1.13 and accept it in install.sh and doctor CI has run on Julia 1.13.0 since #859, but install.sh still pinned fresh installs to 1.12 and rejected an existing 1.13 default, repinning it to 1.12. install.sh now pins 1.13 and accepts 1.11 to 1.13, matching AGNI's compat entry. proteus doctor accepts the same range and suggests 1.13 as the fix. The docs, including the Kapteyn tarball route, point at 1.13. Julia 1.13.0 ships OpenSSL_jll 3.5.6, the same series as 1.12, so the OpenSSL >= 3.5 handling applies unchanged; only its wording now says "1.12 and newer". * Warn that Julia 1.11 support is deprecated Julia 1.11 aborts at run time on some hosts (#885), and 1.12 and 1.13 both work, so 1.11 is on its way out. It stays accepted for now because the OpenSSL < 3.5 fallback in install.sh still relies on it. install.sh warns when it finds 1.11 on PATH and after the OpenSSL fallback moves the juliacall Julia to 1.11, and now lists the OpenSSL upgrade before 1.11 in its manual fix. proteus doctor reports 1.11 as a warning with the 1.13 switch as the fix. That fix is not auto-applied, so proteus update never changes the global Julia of a user who needs 1.11.
Description
The PR introduces the Obliqua tidal module into PROTEUS, along with three compatible orbital dynamics models. The implementation adds:
I added Obliquato the docs and also changed some of the phrasing in the docs, specifically things like:
I tried keeping to the 500 line file limit, but this was not possible for the satellite.py file.
I added basic unit and smoke tests, and one particular case that recreates figure 4 in Canup & Rufu (2020). This takes a little while to run, but is a strong model validation test.
Issues
Obliqua should still be added to PROTEUS doctor (issue #670)
Closes #578, #484, #743, #801
Directly related #843
Validation of changes
The unit tests pass on my machine: Ubuntu 24.04 LTS (noble) with Python 3.12.11
I also have some example output from the ER capture in PROTEUS. Basic orbital dynamics has been tested, and AM remains conserved even at the 1e9 yr mark.
Checklist
@timlichtenberg @nichollsh