Skip to content

fixed minor fac rocket divergence#54

Merged
markleader merged 2 commits intonasa:mainfrom
markleader:fix/example9_diff
Mar 4, 2026
Merged

fixed minor fac rocket divergence#54
markleader merged 2 commits intonasa:mainfrom
markleader:fix/example9_diff

Conversation

@markleader
Copy link
Contributor

Summary

Align FAC rocket chamber-closure behavior in RocketSolver_solve_fac with legacy CEA2 semantics and stabilize cross-platform test expectations for Example 9 / FAC outputs.

Changes

  • Updated FAC chamber-closure iteration logic in source/rocket.f90:
    • Switched Option-1 pressure correction direction to legacy-consistent form (pc / p_inj_check).
    • Normalized Option-1 convergence check using assigned injector pressure semantics.
    • Replaced fixed 4-pass outer loop with tolerance-driven iteration.
    • Added bounded safety guard (max_iter_chamber = 100) with warning on non-convergence.
    • Reseeded FAC combustor-end iterate each chamber iteration from current infinity state.
  • Relaxed/standardized pFUnit FAC rocket tolerances to reflect expected solver deltas and improve robustness across compilers/platforms in source/rocket_test.pf.

Testing

  • ctest -R cea_core_test
  • python test_main.py
  • python -m pytest

Compatibility / Numerical behavior

  • No expected changes to numerical results
  • Expected changes (explain and provide validation)

FAC rocket numerical results are expected to shift slightly due to chamber-closure iteration/parity fixes. Validation is covered by updated pFUnit rocket checks and Python RP-1311 Example 9 FAC assertions with adjusted tolerances.

@markleader markleader merged commit 6d6cc56 into nasa:main Mar 4, 2026
23 checks passed
@markleader markleader deleted the fix/example9_diff branch March 4, 2026 21:28
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