-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compute pressure from microphysics eos #335
Conversation
I think it would make sense to move the new code to EOS.hpp, but make it a function that only needs scalar arguments (e.g., |
But, for primordial chem, we will need the mass scalars too |
for more information, see https://pre-commit.ci
Yeah, forgot about that for a sec :) The design you have now makes sense to me. |
Aha, encountered the first issue. Take the example of HydroHighMach test. For this test, the mean molecular weight is NAN. So, the gamma_law EOS in microphysics returns a NAN pressure, because it calculates the pressure using the temperature. The dependence on the mean molecular weight cancels out in the end ( The fix I can think of is to modify microphysics to use the internal energy directly in place of temperature to calculate the pressure. |
Aah, can't do that because gamma_law uses pressure to update the internal energy. |
You could do that. Another option is to just set the mean molecular weight to some arbitrary but non-zero and non-NAN value. |
Oh, if that's possible, then that's the easiest thing to do without changing stuff in microphysics. Okay, I will then set the mean molecular weight to 1.0 for this test (and tests like these that might fail too) |
Inelegant, but probably the easiest solution. |
…pressure from microp gamma_law
for more information, see https://pre-commit.ci
/azp run |
@BenWibking some tests fail when |
for more information, see https://pre-commit.ci
You can add an |
@BenWibking the remaining test (debug arm64 gcc) fails because What should be the pressure when gamma is isothermal? Its not zero right? Do you find it from the (finite, non-zero) isothermal sound speed, like here: Line 482 in aa288b5
|
Yes, it's |
/azp run |
all tests should pass now |
It looks like the SphericalCollapse test failed. |
/azp run |
all done @BenWibking |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor code style changes.
/azp run |
This is my idea of how we want to compute pressure from microphysics. But, it might be better to move this function to
EOS.hpp
so all the EOS functions are together?Anyway, first, need this to be approved: AMReX-Astro/Microphysics#1301