Skip to content

Add photon multigroup cross section generation - #4073

Open
paulromano wants to merge 6 commits into
openmc-dev:developfrom
paulromano:photon-mgxs
Open

Add photon multigroup cross section generation#4073
paulromano wants to merge 6 commits into
openmc-dev:developfrom
paulromano:photon-mgxs

Conversation

@paulromano

Copy link
Copy Markdown
Contributor

Description

In anticipation of supporting photon random-ray workflows, this PR makes two important updates to multigroup cross section generation: 1) it makes multigroup cross section libraries particle-aware through a particle_type argument, and 2) it adds a PhotonProductionMatrixMGXS class for representing the photon production cross section needed for deterministic photon transport.

For photon libraries, the existing "nu-scatter matrix" quantity represents the expected outgoing photon production matrix. It combines the coherent or incoherent surviving primary photon with secondary photons from atomic relaxation, thick-target bremsstrahlung, and positron annihilation. Photon yield is folded directly into the matrix because a multiplicity defined by dividing production by physical scattering is undefined for reactions that remove the incident photon while producing secondaries.

Checklist

  • I have performed a self-review of my own code
  • I have run clang-format (version 18) on any C++ source files (if applicable)
  • I have followed the style guidelines for Python source files (if applicable)
  • I have made corresponding changes to the documentation (if applicable)
  • I have added tests that prove my fix is effective or that my feature works (if applicable)

@paulromano
paulromano requested a review from nelsonag as a code owner August 23, 2026 15:29
@GuySten

GuySten commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

How is this feature used with delayed gamma scaling?
What about keff scaling for consistent energy balance?

By using only one PhotonProductionMatrixMGXS we cannot use keff scaling and we need to keep track of if delayed gammas were used in the library.

We might want to separate PhotonProductionMatrixMGXS into PhotonProductionMatrixMGXS, PromptFissionPhotonProductionMatrixMGXS and DelayedFissionPhotonProductionMatrixMGXS to support the two use cases.

Alternatively, if we only care about generating weight windows the consistent energy balance and delayed gamma scaling should not be that important.

@shimwell

Copy link
Copy Markdown
Member

Linking to this issue #3489

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.

3 participants