Fix bugs in Davis EOS's#638
Conversation
Yurlungur
left a comment
There was a problem hiding this comment.
Thanks for the fix! @chadmeyer FYI since you are the original author.
chadmeyer
left a comment
There was a problem hiding this comment.
This all looks thermodynamically sound to me. Good catch(es)
| return robust::ratio(numerator, std::max(rho, 0.)); | ||
| const Real ke = robust::ratio(numerator, std::max(rho, 0.)); | ||
| const Real p = -esv + rho * gamma * (sie - es); | ||
| return ke + gamma * p; |
There was a problem hiding this comment.
I can confirm that this looks correct to me. Was the adiabatic bulk modulus, but we want the isentropic bulk modulus.
| const Real vvc = robust::ratio(1.0, rho * _vc); | ||
| const Real Fx = | ||
| -4 * _a * | ||
| -4 * _a * _n * |
There was a problem hiding this comment.
Assuming this is dF/dvvc Which I think it should be, then I'm fairly certain this n should be there.
| const Real ke = -robust::ratio( | ||
| psv + (sie - es) * rho * (gammav - gamma * rho) - gamma * rho * esv, rho); | ||
| const Real p = Ps(rho) + rho * gamma * (sie - es); | ||
| return ke + gamma * p; |
There was a problem hiding this comment.
Finally, with the fix to Fx and this putting it to the isentropic bulk modulus, this should be correct.
|
@buechlerm assuming tests are passing on re-git this is good to go from my perspective. Should I click merge? |
|
Yes, tests are all passing on re-git. |
Fix a couple of bugs in the Davis Eos's.
PR Summary
There were a few minor mistakes, but most notably, it was returning something like an isoenergy bulk modulus. It now returns the isentropic bulk modulus
PR Checklist
make formatcommand after configuring withcmake.plan_historiesfolder, with a filename the same as the MR number.If preparing for a new release, in addition please check the following: