-
Notifications
You must be signed in to change notification settings - Fork 514
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Decay photon source functionality #2234
Conversation
Fantastic, really interesting feature. I'm looking forward to working through all of this. Thanks Paul |
b8253d9
to
1833707
Compare
I see My main concern is that users will assume it is an |
@shimwell Thanks for the thorough review and suggestions. All comments should be addressed — let me know if you have further requests. |
All looks good to me @paulromano I can take another look just to be sure. If you could ping me when doing that material refactoring on a future PR I would be interested in seeing how it is done |
@shimwell will do! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice feature. Would be great to get this merged in.
The only last thought I had was do we need to add anything to the docstrings to let the user know that the probabilities are in units of [decays per second]
@shimwell Good suggestion -- I've just updated that. |
I'm already making use of this gamma energy feature over here |
Just wondering if @pshriwise wanted to take a peak before we merge this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great @paulromano. Really nice feature to have for our FES work 😄 A few small thoughts from me.
Co-authored-by: Patrick Shriwise <[email protected]>
This is a fantastic feature! |
I think the plan is too follow up this PR with a PR to the Data repo which will contain the data processing script that extracts the gamma energy from the ENDF files. It would be great to get your input on that future PR @cfichtlscherer |
@cfichtlscherer I'm curious about your comment:
Can you elaborate on this a bit? Are there particular nuclides for which ENDF/B-VII.1 is lacking accurate photon spectra relative to ENSDF? |
Hi Paul, I would be happy if I could help a little bit and hope I haven't understood things wrong. I believe the ENSDF data is more comprehensive than ENDF/B-VII.1 data concerning the information of gamma emissions. ENSDF data can be obtained via different sources. For example:
(strangely, these two sources differ for several isotopes and gamma lines.) By comparing the
Please don't take this as criticism. It is incredible work to dig through this data, and the ENDFB-VII chain already enables a lot and is a great new feature. It is instead to be seen as an idea and a suggestion. |
As a follow up on @cfichtlscherer comment, to add, ORIGEN uses data from ENSDF for gamma source intensity and spectra calculations. It then supplements with ENDF/B data for nuclides with no ENSDF data. Another thought on the comment on unit by @shimwell, for the decay photon source, I was wondering the unit should be in photons per second? |
This PR adds the ability to calculate decay photon sources for 1) a single unstable nuclide, 2) a material, and 3) indirectly, the results of a depletion calculation. It works as follows:
openmc.data.decay_photon_soure(nuc)
is a new function that relies on the existingDecay.sources
property that was added in Add ability to get sources fromDecay
class #2135. It relies on getting data from the depletion chain file, which has been enhanced to store decay sources. Note that this will increase the size of our depletion chain files, but they are still manageable. For example, a full ENDF/B-VII.1 chain will be about 27 MB (currently it's about ~2 MB).Material
class now has adecay_photon_source
attribute that will loop over the nuclides and accumulate a photon source from the individual nuclide sources.StepResult
class now has aget_material
method, so to get a photon source corresponding to a depleted/activated material, you would run something like:If and when this is merged, I'll go ahead and update our existing depletion chain files available on https://openmc.org with the necessary data so that this new functionality can be used without users needing to generate their own chain files. For now, if you want to play around with an ENDF/B-VII.1 chain with sources, you can get it here.