-
Notifications
You must be signed in to change notification settings - Fork 98
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
Move power law opacity into its own module #725
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Conflicts: Source/radiation/Radiation.cpp
zingale
reviewed
Jan 4, 2020
# mechanism used to set kappa_r. (In an ideal code this floor would | ||
# be nondimensionalized using a characteristic length (domain size?). | ||
# In the present implementation the Marshak b.c. includes a factor of | ||
# delta x which can cause ill-conditioning if delta x is not O(1).) |
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.
There's some useful info in these comments that is getting deleted (not just this problem). Perhaps we can move them to a README?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR summary
This PR unifies the approach to opacities in the radiation code, so that ca_compute_planck, ca_compute_rosseland, and ca_compute_scattering are the only entry points to getting the opacities. These work for single-group or multi-group problems. To do this, we moved the power-law opacity to its own module in Castro/Microphysics,
rad_power_law
, replacing thepowerlaw-example
case, and now have the problems point to the new opacity directory rather thannull
. (Thenull
directory has been removed, to prevent people from accidentally trying to continue using the old setup.) All of the corresponding inputs parameters for the power law opacity have been moved to the probin file (in the extern namelist).We now always expect the user to pick a specific opacity implementation, so the parameter radiation.use_opacity_table_module has been removed.
The multigroup solver was previously forcing the Rosseland opacity to be equal to the Planck opacity if the latter was set but the former was not. There was similar unintuitive behavior for the behavior of the scattering parameter. Now you will get exactly what you ask for in the probin file, given the defaults in the _parameters file for the rad_power_law opacity. By default the constant coefficients for both are negative, which is invalid, so both must be set to a non-negative value for the code to work. Problems that were previously setting const_kappa_p but not const_kappa_r should set the latter equal to the former to maintain the same code behavior. The analogous thing should be done for the exponents (kappa_p_exp_m, kappa_p_exp_n, and kappa_p_exp_p).
PR checklist
CHANGES
file has been updated