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

Replace do_real_eos = 0 with an actual EOS #722

Merged
merged 11 commits into from
Jan 3, 2020
Merged

Conversation

maxpkatz
Copy link
Member

@maxpkatz maxpkatz commented Jan 2, 2020

PR summary

This PR adds an EOS, rad_power_law, which replaces the functionality previously provided by radiation.do_real_eos = 0. The EOS defines c_v as before, and can only be called in (rho, T) and (rho, e) modes. It does not define hydrodynamic variables like pressure, so it cannot be used in conjunction with castro.do_hydro = 1. This sets us up for merging the radiation and non-radiation EOS interfaces.

PR checklist

  • test suite needs to be run on this PR
  • this PR will change answers in the test suite
  • all functions have docstrings as per the coding conventions
  • the CHANGES file has been updated
  • if appropriate, this change is described in the docs

@zingale
Copy link
Member

zingale commented Jan 2, 2020

tests are here:

http://groot.astro.sunysb.edu/Castro/test-suite/gfortran/2020-01-02-003/index.html

note that RadSuOlsen crashes with negative rho e

@zingale
Copy link
Member

zingale commented Jan 3, 2020

answers change a lot in the current RadSuOlson test

http://groot.astro.sunysb.edu/Castro/test-suite/gfortran/2020-01-02-004/rad-SuOlson.html

@maxpkatz
Copy link
Member Author

maxpkatz commented Jan 3, 2020

I looked at the old code. We were previously setting T and e to 0 in ca_initdata. What was happening in the computeTemp call after ca_initdata is that the old EOS's approach of flooring the data by adding 1e-50 meant that it was treating rho*e as 1.e-50, and then calculating T from there. So the original data was completely arbitrarily determined by that floor.

Since the initial values don't really matter, I've set these to be the same as they effectively were before (1.e-50) so that results don't change much.

@zingale zingale merged commit eca769c into development Jan 3, 2020
@zingale zingale deleted the rad_power_law branch January 3, 2020 14:45
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.

2 participants