-
Notifications
You must be signed in to change notification settings - Fork 596
Gamma contact dose rate computation fispact style #3700
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
base: develop
Are you sure you want to change the base?
Gamma contact dose rate computation fispact style #3700
Conversation
Inclusion of the mass energy attenuation and mass energy-absorption coefficients for tabulated photon energies for various material compounds. The database includes material from the Table 4 of the NIST database 126 (https://dx.doi.org/10.18434/T4D01F). Currently only the materials (water, liquid) and (air, dry) is implemented. This data has been included as it is required for Contact Dose Rates computations
This reverts commit 0617952.
GuySten
left a comment
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.
In general this is a nice feature but you should clean this PR.
There is alot of unnecessary code so this PR should be cleaned up significantly.
I suggest you remove all pieces of code that are not related to the calculation of contact dose rate.
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.
I suggest storing only the mass energy absorbption coefficient because the mass attenuation coefficient is calculated from the photon cross sections.
You can store it directly in openmc/data/mass_energy_absorption.py so you won't need the mass_attenuation directory at all.
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.
Removed the mass attenuation_directory and stored the data in mass_energy_absorption.py, as suggested
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.
Why is this file needed?
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.
It was included just if someone wanted to use the data, I removed it as it unnecessary
openmc/data/photon_attenuation.py
Outdated
| return _PHOTON_DATA[nuclide] | ||
|
|
||
|
|
||
| def linear_attenuation_xs(element_input: str, temperature: float) -> Sum | None: |
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.
photo-atomic cross sections are not temperature dependent so this function should be simplified.
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.
Corrected
openmc/data/photon_attenuation.py
Outdated
|
|
||
|
|
||
|
|
||
| def material_photon_mass_attenuation_dist(material) -> Sum | None: |
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.
I think this function should be a method of material.
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.
See other reply
openmc/material.py
Outdated
|
|
||
| return combined | ||
|
|
||
| def get_photon_mass_attenuation( |
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.
This function is not used anywhere and you already have material_photon_mass_attenuation_dist which can be moved here. I suggest you drop this function and move material_photon_mass_attenuation_dist here. You can rename it to "get_photon_mass_attenuation" because it is clearly a better name than "material_photon_mass_attenuation_dist"
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.
According to the suggestion, i substituted the Material.get_photon_mass_attenuation with material_photon_mass_attenuation_dist(), keeping the former name.
The intention behind the original material method was to let the user evaluate the mass attenuation distribution for a material at any energy scalar or given a Tabular/Discrete distribution (like the mean_free_path method for neutrons). However, as the original method was not required for the CDR, it makes sense to remove it to keep the footprint of the PR smaller.
In addition, as the new version of the method returns a callable function, it can be easily evaluated by the user for scalar values
fix data import fix data import 2 fix data import 3
|
@GuySten thanks for the comments! I implemented the suggestions. I hope to get further comments/feedback on the CDR integration when Tabular radiation sources are involved and on how to proceed for the missing relevant features (approximate spectra when no source is present and bremsstrahlung correction). |
Description
Hello everyone, inspired by the discussion related to PR #3647 and the issue #3650, and as I think it is a major feature that could benefit openMC I tried to take a stab in implementing the gamma contact dose rate in the python API.
It is computed following the FISPACT-II methodology (see FISPACT manual appendix C.7.1 https://fispact.ukaea.uk/wp-content/uploads/2021/05/user_manual.pdf ).
In some way the implementation improves over that, as it is not constrained by the 22 energy groups of fispact. Instead, it sums the discrete contributions when the nuclide photon source is of the Discrete type and for Tabular sources it integrates their contribution.
To implement this feature It required the inclusion of methods for computing the material photon attenuation for discrete and tabular energy distributions and the tabulated data set of the photon mass-energy absorption factors in air. A set of test is included for most of the machinery required for the gamma contact dose rate method.
Some additional minor contributions to the gamma contact dose rates are not implemented as some underlying methods required to compute that are still missing. In particular:
computation of approximate gamma spectra for unstable nuclides with no photon source in the chain file: This could be implemented like in fispact if in chain file included the average energy of all light particles, and average energy of all electromagnetic radiation. This info is readily available in the ENDF file i believe?
computation of bremsstrahlung correction. This could be implemented if the python api included the analogous of data.decay_photon_energy for electron and positron source particle in the chain files.
In addition, the implementation of a method to compute the gamma dose rate from a point source as done in fispact (manual appendix C.7.2 ) is relatively straightforward.
Before including this missing things I think it makes sense to start a draft PR to get some feedback and see if there is interest for these features and also avoid huge PRs. Moreoveer at a certain point could be good to have methods for the 3 methods mentioned in the discussion (fispact style, from Gamma-Ray Dose Constants, or using photon-flux-to-dose coefficients )
Checklist