Skip to content
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

Fix for depletion with photon transport turned on #1595

Merged
merged 13 commits into from
Jun 24, 2020

Conversation

paulromano
Copy link
Contributor

This PR fixes #1585. Depletion relies on the openmc_load_nuclide C API call, and currently this function only loads incident neutron data. I've changed it so that it will now load photoatomic data as well. I've also refactored things a bit to improve the structure:

  • cross_sections.cpp now uses openmc_load_nuclide as well to reduce redundant code
  • Adding entries in nuclide_map and element_map is handled inside of the Nuclide and PhotonInteraction constructors
  • Determining the min/max energies for neutron/photon transport and setting up the log grid for energy searches is determined during simulation_init rather than when cross sections are loaded
  • data::element was set up as a vector of PhotonInteraction objects rather than pointers. This means that a push_back could result in all the photon data being copied. I've changed it to a vector of unique_ptr so that only pointers need to be copy upon a vector resize.

@paulromano paulromano requested a review from amandalund as a code owner June 19, 2020 12:29
Copy link
Contributor

@amandalund amandalund left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a small documentation fix, otherwise everything works as expected! Thanks @paulromano.

- Ilham Variansyah, Benjamin R. Betzler, and William R. Martin, "`Multigroup
Constant Calculation with Static :math:`\alpha`\ -Eigenvalue Monte Carlo for
Time-Dependent Neutron Transport Simulation
<https://doi.org/10.1080/00295639.2020.1743578>`_", *Nucl. Sci. Eng.*, 2020.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This link won't render correctly because of the nested backquotes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pointing that out! Just fixed it

@paulromano paulromano requested a review from drewejohnson as a code owner June 24, 2020 03:18
@paulromano paulromano removed the request for review from drewejohnson June 24, 2020 03:19
@amandalund amandalund merged commit ba2563f into openmc-dev:develop Jun 24, 2020
@paulromano paulromano deleted the depletion-photon-fix branch June 24, 2020 12:32
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.

Depletion and photon transport don't work together
2 participants