Skip to content

Prepare for multigroup radiation (starting with jaybenne) in artemis. - #135

Open
RyanWollaeger wants to merge 8 commits into
developfrom
up_jbn_mgddmc
Open

Prepare for multigroup radiation (starting with jaybenne) in artemis.#135
RyanWollaeger wants to merge 8 commits into
developfrom
up_jbn_mgddmc

Conversation

@RyanWollaeger

@RyanWollaeger RyanWollaeger commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Background

  • Frequency dependence will be important to capture in high-fidelity PPD simulations.

Description of Changes

  • Move gas opacity initialization inside radiation initialization.
  • Update jaybenne, singularity submodules.
  • Add scattering powerlaw to artemis opacity variants.
  • Add enum for artemis multigroup mode, frequency_type.
  • Add frequency-dependent opacity to radiation package when frequency_type == multigroup.

Checklist

  • New features are documented
  • Tests added for bug fixes and new features
  • (@lanl.gov employees) Update copyright on changed files
  • Any contribution that was created or modified with the assistance of generative AI must have a comment disclosing this such as // This file was created in part or in whole by generative AI

+ Move gas opacity initialization inside radiation initialization.
+ Update jaybenne, singularity submodules.
+ Add scattering powerlaw to artemis opacity variants.
+ Add frequency_type to radiation/imc input nodes.
@RyanWollaeger
RyanWollaeger marked this pull request as ready for review August 1, 2026 00:17
+ Bump singularity-opac.
+ Use AbsorptionCoefficient and ScatteringCoefficient indexed at 0.
+ Hard-code frequency bounds for gray singularity-opac models.
cutoff = 1.0e-6 # default is 1.0e-6
emit_temp_threshold = 1.2e4 # from ryan, 1.1e4 is background
#min_swarm_occupancy = 0.5
frequency_type = gray No newline at end of file

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

newline

e = eos_d.InternalEnergyFromDensityTemperature(dens, T) * dens;
const Real Cv = dens * eos_d.SpecificHeatFromDensityTemperature(dens, T);
const Real a = chat * dt * opac_d.PlanckMeanAbsorptionCoefficient(dens, T);
const Real a = chat * dt * opac_d.PlanckGroupAbsorptionCoefficient(dens, T, 0);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought we provided an overload in singularity-opac to onlly pass rho, T and it does this identical thing under the hood, but with a PARTHENON_REQUIRE that ngroups==1 (i.e., gray).

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will double-check this - might've over-applied the addition of the group index - think for AbsorptionCoefficient it was required (or the overload might've not been there - but could be wrong).

Real a = chat * dt *
(opac_d.RosselandMeanAbsorptionCoefficient(dens, T) +
scat_d.RosselandMeanTotalScatteringCoefficient(dens, T));
(opac_d.AbsorptionCoefficient(dens, T, 0) +

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comments as above.

@@ -0,0 +1,163 @@
//========================================================================================

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious as to the why the move outside of the gas package? If we eventually add dust opacity, I also would think that belongs in dust package. But I could be convinced otherwise 😸

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a fair question - originally moved this here so that frequency grid information under either radiation package input node would be able to affect the construction of the opacity models. Also, figured it might be worth avoiding opacity construction altogether (e.g. in gas) if radiation is not getting used. All in all, guessing there is a better (parthenon-ic) way to design this notion of "opacity" being dependent on the existance of two other packages (e.g. radiation+dust or radiation+gas)...

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