Skip to content

fix derivatives in EOS inversion - #1142

Open
zingale wants to merge 4 commits into
mainfrom
MZ/fix_eos_iteration
Open

zingale wants to merge 4 commits into
mainfrom
MZ/fix_eos_iteration

Conversation

@zingale

@zingale zingale commented Nov 27, 2026

Copy link
Copy Markdown
Collaborator

There are 2 places where the conversion from ln to log10 was incorrect:

  • in the egas as input, both of the d/dln* derivatives need the ln10 scaling
  • when log10(P) is input, then the ln10 factor in the numerator and denominator should cancel

Making this change, the number of EOS calls in the test suite case goes from 14 -> 4.

It seems like the log10(P) input is used in the RSP code and time-dependent convection. I don't
think the egas input is widely used.

I've added the number of EOS calls to the test output so it is easy to see the performance difference.

@zingale
zingale requested a review from fxt44 as a code owner November 27, 2026 18:06
@zingale zingale added the eos Equation of state module label Nov 27, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

eos Equation of state module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant