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
Fix missing mu in temperature calculation RAMSES #4817
base: main
Are you sure you want to change the base?
Conversation
Hi! Welcome, and thanks for opening this pull request. We have some guidelines for new pull requests, and soon you'll hear back about the results of our tests and continuous integration checks. Thank you for your contribution! |
Thanks for the PR @V-Nathir! I made some modifications to ensure that we are backwards compatible with old code versions. If we cannot read the cooling tables, we assume that T = T/µ (it is wrong, but we can't easily get µ) and we raise a warning when the user tries to access the temperature. For recent code versions, we interpolate µ from the cooling tables, T/µ and nH. For reviewers: this is a breaking change but also a bug. I don't really see a way forward to fixing it that would satisfy these two constrains:
|
Failure on the build on py3.12 is unrelated :) |
How about we just ship it in our next feature release instead of a bugfix release ? |
Either way is fine by me. |
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.
This looks good to me, but I'd like a second pair of eyes with someone from astro (@brittonsmith?)
Then I should leave this choice to reviewers. Please remember to set a milestone before you merge this. Thanks ! |
The failing tests are unrelated and fixed in #4819. |
c9f92ab
to
e88d310
Compare
PR Summary
The YT´s output for Temperature was not exactly the temperature, it was temperature over mu. This mu is required since P/rho = kb/mu * T/m_p; where p=pressure, rho=density, T=Temperature, m_p=proton mass, kb=Boltzmann Cte., and mu is the dimensionless average particle weight. Yt used to do P/rho * mp/kb = T, this T is now T_over_mu, and the temperature is now T_over_mu * mu. Also, the dimension of mu has been changed.
PR Checklist