Skip to content

Look up a padded Zalmoxis surface node at the target pressure - #1045

Merged
timlichtenberg merged 4 commits into
mainfrom
tl/zalmoxis-padded-surface-density
Oct 23, 2026
Merged

timlichtenberg merged 4 commits into
mainfrom
tl/zalmoxis-padded-surface-density

Conversation

@timlichtenberg

Copy link
Copy Markdown
Member

Description

Companion of FormingWorlds/Zalmoxis#115, which gives the padded surface node of a Zalmoxis structure (P = 0 past a stop of the outward integration) its EOS density at the target surface pressure.

After a Zalmoxis solve, zalmoxis_solver rebuilds the density and temperature on the JAX path node by node. It looked a padded node up at 0 Pa; it now looks it up at target_surface_pressure, as Zalmoxis does. The docstring of _resolve_zalmoxis_anchor_temperatures states what the padded node's temperature is in each case.

PROTEUS pins the Zalmoxis release with this change later, in its own PR.

Validation of changes

macOS, Python 3.12.

  • pytest tests/interior_struct/test_zalmoxis.py at the head: 193 passed. With the lookup back at the node pressure, the new test fails (1 failed).
  • Nightly on the merge of main into this branch (the head differs from it by the docstring only), all 25 jobs green: https://github.com/FormingWorlds/PROTEUS/actions/runs/39908825780

Checklist

  • I have followed the contributing guidelines
  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • My changes generate no new warnings or errors
  • I have checked that the tests still pass on my computer
  • I have updated the docs, as appropriate
  • I have added tests for these changes, as appropriate
  • I have checked that all dependencies have been updated, as required

On the JAX path PROTEUS rebuilds the density column from the EOS at each node's pressure and the hand-off temperature. A padded outer node (zero pressure past a surface stop) is the surface, so its density is now looked up at the target surface pressure, as Zalmoxis returns it, instead of at 0 Pa.
The Zalmoxis anchor docstring states that a zero-pressure node takes the adiabat continued to the target surface pressure once the adiabat blend reaches 1, and the linear profile at the outer radius before that.
@codecov

codecov Bot commented Oct 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.62%. Comparing base (8849aea) to head (849548b).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1045      +/-   ##
==========================================
+ Coverage   94.44%   94.62%   +0.18%     
==========================================
  Files         139      139              
  Lines       23569    23570       +1     
  Branches     3944     3944              
==========================================
+ Hits        22259    22304      +45     
+ Misses        882      863      -19     
+ Partials      428      403      -25     
Flag Coverage Δ
unit-tests 93.38% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@timlichtenberg
timlichtenberg merged commit 79f226e into main Oct 23, 2026
16 checks passed
@timlichtenberg
timlichtenberg deleted the tl/zalmoxis-padded-surface-density branch October 23, 2026 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant