Enable parent-nuclide tally breakdowns in R2S calculations#4013
Open
paulromano wants to merge 7 commits into
Open
Enable parent-nuclide tally breakdowns in R2S calculations#4013paulromano wants to merge 7 commits into
paulromano wants to merge 7 commits into
Conversation
This file contains hidden or 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
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.
Description
This PR extends
R2SManagerto support attributing photon tally results to the parent radionuclides that emitted the source photons. It also separates decay photon source preparation from photon transport and prevents R2S calculations from inadvertently running with OpenMC's default neutron source when no decay photon source exists.The R2S workflow is now organized into four explicit stages: neutron transport, activation, decay photon source creation, and photon transport.
step3_photon_sourcecreates each requested source list once and stores the lists inresults['photon_sources'].step4_photon_transportthen consumes those prepared sources. This separation makes the decay photon source creation a bit more explicit and recognizes it as its own step, which can be useful for profiling purposes.Passing
by_parent_nuclide=TruetoR2SManager.runorstep4_photon_transportautomatically adds aParentNuclideFilterto photon tallies that do not already contain one. Filter bins are determined from the union of radionuclides in the prepared decay photon sources, allowing any photon tally (e.g., a dose tally) to be broken down by its parent radionuclide. This puts R2S on equal footing with D1S in terms of the ease-of-use for getting dose tallies broken down by radionuclide.Checklist
I have run clang-format (version 18) on any C++ source files (if applicable)