Skip to content

Conversation

@marco-de-pietri
Copy link
Contributor

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

  • I have performed a self-review of my own code
  • I have run clang-format (version 15) 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)

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
Copy link
Contributor

@GuySten GuySten left a 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.

Copy link
Contributor

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.

Copy link
Contributor

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?

return _PHOTON_DATA[nuclide]


def linear_attenuation_xs(element_input: str, temperature: float) -> Sum | None:
Copy link
Contributor

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.




def material_photon_mass_attenuation_dist(material) -> Sum | None:
Copy link
Contributor

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.


return combined

def get_photon_mass_attenuation(
Copy link
Contributor

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"

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.

2 participants