Skip to content

Use of MeanOpacity in multigroup mode. - #38

Open
RyanWollaeger wants to merge 6 commits into
developfrom
mg_with_mgopac
Open

Use of MeanOpacity in multigroup mode.#38
RyanWollaeger wants to merge 6 commits into
developfrom
mg_with_mgopac

Conversation

@RyanWollaeger

@RyanWollaeger RyanWollaeger commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Background

  • Recently the MeanOpacity class in singularity-opac was extended to multigroup, where the opacity is discretized in frequency.
    • Monochromatic opacity can be treated in the new multigroup API through frequency-based accessors, which for a future MeanOpacity object could prescribe a sub-group frequency distribution to evaluate the opacity.
  • It is worthwhile to have a true multigroup treatment for the multigroup mode in jaybenne, and make simplification where possible by removing the direct use of monochromatic singularity-opac variants.

Description of Changes

  • Remove direct use of monochromatic singularity opacity objects.
  • Employ MeanOpacity in frequency_type=multigroup.
  • Add option use_opac_grps which currently resets the transport groups to the opacity groups, and also sets the scattering groups to the tabular absorption groups if absorption is pre-tabulated and scattering is analytic.

Note: scattering is currently always analytic; we will need an option similar to absorption to parse pre-tabulated opacity. In this scenario, if both absorption and scattering are tabular and use_opac_grps=true, the user would have to ensure the loaded tables have consistent group bounds, barring a remap step. If use_opac_grps=false and both opacities are tabular, the current changeset will use the particle frequencies to find a possibly different group through each opacity object (which should be okay).

TODO

  • Use transport groups to set non-tabular opacity frequency array and number of groups.
  • Reset to transport group structure to parsed tabular opacity group structure when using opacity tables (or not?)
  • Use gmode in multigroup DDMC evaluations (see commented out gmode in struct).

Checklist

  • New features are documented
  • Tests added for bug fixes and new features
  • (@lanl.gov employees) Update copyright on changed files

+ Remove use of monochromatic singularity opacity objects.
+ Employ Mean opacity in frequency_type=multigroup.
+ Update singularity-opac (to bring in ngroup accessor).
+ Use *FromNu API for MeanOpacity and MeanScattering in MG.
+ Parse jaybenne nu-grid in mcblock prior to setting opacity model.

Note: the FromNu functions require a binary group search, so it may
worth storing group (with or instead of frequency) in the particles.
+ Add good temperature bounds for step_diff_mg_plaw_ddmc.in test.
+ Force scattering bounds to absorption table bounds if true.
+ Force transport groups to be log centers of absorption bounds if true.

Note: as of this changeset some issues remain:
- Still assumes log group spacing in table opacity.
- There's not yet an option for parsing table scattering opacity.
@RyanWollaeger
RyanWollaeger marked this pull request as ready for review August 14, 2026 16:57
@RyanWollaeger

Copy link
Copy Markdown
Collaborator Author

This puts some jaybenne input accesses into the mcblock Initialization - thought this might be okay since mcblock as a package of course is only active when jaybenne is, and only uses input with jaybenne as the node label.

@RyanWollaeger

Copy link
Copy Markdown
Collaborator Author

Sort of interesting: switching from point evaluation to Rosseland group evaluation in the power-law scattering test seems to still pass (still match with the semi-analytic unit test at the tolerance), without any modification except for ensuring the MeanScattering gets physical temperature bounds.

@RyanWollaeger RyanWollaeger changed the title Prepare for use of MeanOpacity in multigroup mode. Use of MeanOpacity in multigroup mode. Aug 14, 2026
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