Skip to content

solver: align equilibrium/rocket/shock iteration behavior with legacy CEA2 and expand CI coverage#28

Merged
markleader merged 51 commits intonasa:mainfrom
markleader:fix/solver-review
Feb 11, 2026
Merged

solver: align equilibrium/rocket/shock iteration behavior with legacy CEA2 and expand CI coverage#28
markleader merged 51 commits intonasa:mainfrom
markleader:fix/solver-review

Conversation

@markleader
Copy link
Copy Markdown
Contributor

Summary

This PR updates the equilibrium, rocket, and shock solvers to better match legacy CEA2 iteration behavior and edge-case handling, with a focus on singular recovery, condensed-species activation/order, frozen-flow scheduling, and convergence criteria. It also updates CI to build/test across a broader compiler/OS matrix and publish build artifacts for tagged releases.

Changes

  • source/equilibrium.f90
    • Added/used active-element counting and element swap/restore helpers for singular-recovery paths.
    • Tightened condensed-species activation/deactivation/replacement flow and active-order handling.
    • Updated iteration controls and convergence checks (including max_iterations, esize, pi denominator guards, and absolute-value mole checks) to better track legacy behavior.
    • Applied condensed validity checks in TP solves and fixed related index/phase transitions.
  • source/rocket.f90
    • Updated frozen/throat/area-ratio iteration tolerances and convergence logic to legacy-style criteria.
    • Added frozen schedule gating for invalid pi/p and Ae/At points and ensured omitted points do not consume output indices.
    • Added frozen condensed temperature-range guard band checks and explicit non-convergence handling.
    • Fixed FAC/throat initialization and pressure-update details used by frozen expansions.
  • source/shock.f90
    • Updated convergence thresholding and first-iteration temperature-cap behavior for incident/reflected paths.
    • Seeded incident equilibrium from reactant composition to match legacy initialization behavior.
    • Corrected reflected-frozen enthalpy/cp evaluation path to use incident frozen composition (gas-only where appropriate).
    • Added early exits when prior shock states fail (zeroed temperature/pressure markers).
  • .github/workflows/basic_build.yml
    • Reworked build matrix to explicit labeled jobs across Linux/macOS/Windows (including arm64/aarch64 where available).
    • Added Windows MSYS2 gfortran setup path and explicit compiler selection via FC.
    • Enabled C bindings in CI builds and added verification/upload of CLI + C ABI artifacts.
    • Added tag-triggered release-artifact job with checksum generation.
  • CHANGELOG.md
    • Added draft changelog notes for the upcoming patch release.

Testing

  • Not run locally (changes were prepared for CI validation via the expanded GitHub Actions matrix and existing project test targets).

Compatibility / Numerical behavior

  • No expected changes to numerical results
  • Expected changes (explain and provide validation)
    • Expected numerical differences in some edge cases due to solver convergence/initialization/gating changes intended to match legacy CEA2 behavior more closely (especially condensed-phase, frozen-flow scheduling, and shock iteration paths).
    • Validation plan: compare representative equilibrium/rocket/shock outputs against legacy CEA2 baselines and review CI matrix results for cross-compiler consistency.

@markleader markleader merged commit 485395c into nasa:main Feb 11, 2026
15 checks passed
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