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

Handle zero photon cross sections in IncidentPhoton.from_ace #2433

Merged
merged 1 commit into from
Mar 24, 2023

Conversation

paulromano
Copy link
Contributor

This PR fixes the issue described in #2421 (see my comment there on the root cause). In other places (e.g., from_hdf5 and the C++ side), we use a hack where zero cross sections are set to exp(-500), which makes them effectively zero but you can still log-log interpolate. This PR adopts that approach for from_ace for consistency. I also noticed that the MT value being assigned to pair production when reading data from ACE files was incorrect. It was assigning MT=515 (pair production in electron field, aka triplet production) rather than MT=517 (pair production in nuclear field); I've also fixed that here.

@paulromano paulromano requested a review from amandalund as a code owner March 21, 2023 18:25
@paulromano paulromano linked an issue Mar 21, 2023 that may be closed by this pull request
Copy link
Contributor

@eepeterson eepeterson left a comment

Choose a reason for hiding this comment

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

LGTM!

@eepeterson eepeterson merged commit 7200d42 into openmc-dev:develop Mar 24, 2023
@paulromano paulromano deleted the photon-from-ace-fix branch March 24, 2023 17:27
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.

IncidentPhoton from_ace class broken
2 participants