Skip to content
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

fixed bug in initialization of T_c for dimensional anelastic #445

Closed
wants to merge 1 commit into from

Conversation

illorenzo7
Copy link
Contributor

This is similar in spirit from my #212 from a few years ago.

There was a bug in the definition of T_c for reference_type = 2 (dimensional anelastic mode). I believe T_c was being calculated from the ideal gas law assuming

gas_constant = c_p / (n + 1)

That is only true, however, for adiabatic gases (n = 1.5), not for other n's. In general it is

gas_constant = (gamma - 1) * c_p / gamma

where gamma = 5/3.

@illorenzo7
Copy link
Contributor Author

Update: @feathern realized that as it stands, this pull request would break the non-dimensional form of the Jones benchmark, which uses n = 2. Effectively Jones et al. (2011) treat the non-ideal Jovian atmosphere as ideal, with n = 2 and gamma = 3/2, which is conventional practice to approximate the molecular gas phases near the surface and the metallic hydrogen deeper down.

For the future, a version of this pull request may make sense, as long as gamma is an input parameter to the code (it will be after #450 is implemented). In that case, the non-dimensional Jones Benchmark could then set gamma = 3/2 and should pass.

@illorenzo7 illorenzo7 closed this Apr 10, 2023
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