Skip to content

WIP: Fix/smooth truncation#69

Draft
markleader wants to merge 9 commits intonasa:mainfrom
markleader:fix/smooth_truncation
Draft

WIP: Fix/smooth truncation#69
markleader wants to merge 9 commits intonasa:mainfrom
markleader:fix/smooth_truncation

Conversation

@markleader
Copy link
Copy Markdown
Contributor

Summary

Refines smooth-truncation handling in equilibrium/derivative paths so reported thermodynamic quantities and sensitivities are consistent with post-processed nj values, especially for entropy and pressure derivatives.

Changes

  • Updated smooth-truncation linearization in source/equilibrium.f90 (including nj_linear, entropy residual/state terms, and threshold handling per-species including ions).
  • Aligned post-processing entropy calculation with reported gas moles/log-moles (nj/ln_nj) and kept condensed-species entropy handling explicit.
  • Removed a redundant Jacobian post-assembly adjustment block in EqDerivatives_assemble_J.
  • Updated derivative entropy terms to use ln_nj-based expressions in smooth post-processing paths.

Testing

  • Not run (prepared PR description from branch diff only; no local test execution in this pass).

  • Expanded tests in source/equilibrium_test.pf:

    • switched derivative finite-difference comparison focus to H2O where appropriate,
    • added assertions distinguishing smooth vs hard-truncation derivative behavior,
    • added a new test verifying smooth post-processed entropy consistency and dS/dP finite-difference agreement.

Compatibility / Numerical behavior

  • No expected changes to numerical results
  • Expected changes (explain and provide validation)
    Expected changes are localized to smooth-truncation/post-processing behavior (entropy and related derivatives near truncation thresholds). Validation is covered by updated/added finite-difference tests in source/equilibrium_test.pf.

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