-
Notifications
You must be signed in to change notification settings - Fork 14
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
Clean up code for single-group radiation #684
Conversation
for more information, see https://pre-commit.ci
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
We could createa new version of an existing test that uses the wavespeed correction in the Riemann solver to test this. I think that would help avoid this problem. |
The issue is, you can't turn it on for any specific problem. It's controlled by |
We could do this: AMReX-Codes/amrex#2954 |
That feature is interesting. Have you tried it? Is there any example in Quokka? I'm not sure how to set |
No, it's not currently used in Quokka. In the code below, you can set
|
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
@BenWibking Can you review this PR? |
…quokka-astro/quokka into chongchong/cleanup-single-group
for more information, see https://pre-commit.ci
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
src/RadMarshakAsymptoticCorr/test_radiation_marshak_asymptotic_corr.cpp
Outdated
Show resolved
Hide resolved
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.
I am confused. Can you explain more explicitly what opacity functions should be used by gray problems and what opacity functions should be used (and how) by multi-group problems?
src/RadhydroPulseMGconst/test_radhydro_pulse_MG_const_kappa.cpp
Outdated
Show resolved
Hide resolved
…quokka-astro/quokka into chongchong/cleanup-single-group
for more information, see https://pre-commit.ci
…quokka-astro/quokka into chongchong/cleanup-single-group
I updated the PR comments to better explain this. |
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
for more information, see https://pre-commit.ci
Description
This PR updates the code structure for single-group radiation so that functions like$\kappa_P$ and $\kappa_F$ with $\kappa_g$ . However, that method does not correctly describe multigroup radiation transport and should be removed, because it misses the important delta term in the flux equation. See Equation 16 of the multigroup paper and the discussion thereafter.
ComputePlanckOpacity
return adouble
. This change enforces the use of the correct opacity models (i.e.,piecewise_constant_opacity
orPPL_opacity_fixed_slope_spectrum
, orPPL_opacity_full_spectrum
) when dealing with multiple radiation groups. The previous code provides an option to naively extend the single-group formulation in the IMEX paper to the multigroup case, i.e. replacingIn summary, here's how you should define gas opacity in a problem:
ComputePlanckOpacity
and optionallyComputeFluxMeanOpacity
andComputeEnergyMeanOpacity
. By default, the latter two are set equal to the first.opacity_model
inRadSystem_Traits
to one of the following:piecewise_constant_opacity
,PPL_opacity_fixed_slope_spectrum
, orPPL_opacity_full_spectrum
DefineOpacityExponentsAndLowerValues
. See the example in RadhydroShockMultigroup.Bug fix:
ComputeCellOpticalDepth
. This function is only used when you turn on wave speed correction by hand and is not turned on by default. We can't have a regression test for this because it is controlled byuse_wavespeed_correction
insideradiation_system.hpp
and we don't have a way to turn it on for a specific problem. I tested it on my computer and it worked as expected.Checklist
Before this pull request can be reviewed, all of these tasks should be completed. Denote completed tasks with an
x
inside the square brackets[ ]
in the Markdown source below:/azp run
.