Implement DecaySpectrum distribution type and utilize in R2S#3930
Implement DecaySpectrum distribution type and utilize in R2S#3930paulromano wants to merge 37 commits intoopenmc-dev:developfrom
Conversation
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
pshriwise
left a comment
There was a problem hiding this comment.
Excited about this @paulromano! Opens some very nice analysis doors for activation problems. Design looks very good overall to me.
Some initial thoughts here. I can take a crack at some of the lower hanging fruit if you're okay with that.
| domain = cell | ||
|
|
||
| activated_mat = step_result.get_material(str(original_mat.id)) | ||
| nuclides = activated_mat.get_nuclide_atom_densities() |
There was a problem hiding this comment.
Similar to Material.decay_photon_energy, it seems like it might be useful to provide a Material.decay_spectrum method?
Though now that I write it out those two methods could seem misleadingly similar. Open to discussion here.
There was a problem hiding this comment.
Could also be marked for a follow-on PR.
There was a problem hiding this comment.
If we do go this route, it might be good to switch Material.decay_photon_energy to generate a DecaySpectrum object and return the result of a call to DecaySpectrum.to_distribution (with the requisite bells and whistles of decay_photon_energy) to consolidate some similar functionality between those two areas of code.
There was a problem hiding this comment.
Interesting point! I'd say we should leave this for a follow-on PR though
| openmc.stats.Legendre | ||
| openmc.stats.Mixture | ||
| openmc.stats.Normal | ||
| openmc.stats.DecaySpectrum |
There was a problem hiding this comment.
We'll want to make appropriate changes to the types that appear under the univariate distributions in the XML I/O section as well.
There was a problem hiding this comment.
Thanks for the reminder! I ended up changing the XML representation to make it more compact/consistent while I was at it
There was a problem hiding this comment.
Ah, nice! Yeah I think that's good update.
|
@pshriwise Thanks for the review! All your comments have been addressed |
Description
This branch adds a new
openmc.stats.DecaySpectrumdistribution for decay photon sources. Instead of expanding each activated material into a fully combined photon energy distribution in Python,DecaySpectrumstores nuclide atom densities and region volume, writes them to XML, and lets the C++ solver resolve the corresponding decay photon spectra from the depletion chain at runtime. This improves R2S photon source generation performance and enables decay photon source particles to carry their parent nuclide, allowing tallies withParentNuclideFilterto compute photon transport results decomposed by radionuclide.I've done some tests using this feature on the FNG dose benchmark and confirm that I get results that match our previous mesh-based R2S results. Additionally, I've tested out the new radionuclide breakdown, which matches our previous D1S results very well. Here are the R2S based results for FNG dose showing the dominant radionuclides that contribute to the dose:

Checklist