Uh oh!
There was an error while loading. Please reload this page.
Photonuclear Physics part 1 - #3439
Conversation
shimwell
commented
Jun 11, 2025
Wow super to see work on this, it sounds like the PR would help fix a long standing issue of not being able to process TENDL gamma cross sections. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| enum class Type { | ||
| neutron = 1, | ||
| photon = 3, | ||
| photonuclear = 6, |
There was a problem hiding this comment.
@paulromano is this list out of order to test neurodivergents?
| projectile_mass = ev.projectile["mass"] | ||
| if ev.projectile['mass'] == 0.0: | ||
| projectile_za = 0 | ||
| elif np.isclose(ev.projectile['mass'], 1.0, atol=1.0e-12, rtol=0.): |
There was a problem hiding this comment.
are these tolerances set uniformly across the data module? Maybe this should be elevated to some constant somewhere that is globally accessible?
There was a problem hiding this comment.
Those tolerances were originaly from a check in openmc/data/kalbach_mann.py.
So the only thing I did was to move code around.
I do not think that setting global tolerance variables will improve code readability so I am against this suggested change.
GuySten
commented
Jun 11, 2025
@makeclean Thanks for your review and suggested changes, most of which I accepted. After including some tests I think this pr is ready for formal review. |
Uh oh!
There was an error while loading. Please reload this page.
f55d2ed to
6f8df6bCompare
ahnaf-tahmid-chowdhury
left a comment
There was a problem hiding this comment.
Thanks for the excellent work! I have a few suggestions.
Uh oh!
There was an error while loading. Please reload this page.
| # Download HDF5 data | ||
| if [[ ! -e $HOME/nndc_hdf5/cross_sections.xml ]]; then | ||
| wget -q -O - https://anl.box.com/shared/static/teaup95cqv8s9nn56hfn7ku8mmelr95p.xz | tar -C $HOME -xJ | ||
| wget -q -O - https://github.com/GuySten/data/releases/download/v1.0.0/nndc_hdf5_test.tar.xz | tar -C $HOME -xJ |
There was a problem hiding this comment.
The photonuclear data for Pu239.h5 is currently unavailable from ANL, isn't it? Perhaps we should consider serving this from ANL.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
GuySten
commented
Jun 14, 2025
@ahnaf-tahmid-chowdhury Thanks for your review! You noticed some things that I missed. Currently the ci tests crash on the test: |
GuySten
commented
Jun 14, 2025
I fixed a bug and now all tests pass. |
26ad64b to
8722e9bCompare8722e9b to
a2fbdf5CompareCo-authored-by: Ahnaf Tahmid Chowdhury <ahnaf-tahmid@outlook.com>
a2fbdf5 to
b802e4aCompareaf9d98a to
c13c6a2Compare2791541 to
44eb89cCompare44eb89c to
d4e55daCompare
Description
This pull request is the first step of implementing photonuclear physics in OpenMC.
This pull request handle definition and conversion of nuclear data from endf/ACE formatted libraries to hdf5 format.
Because photonuclear physics is relatively a big feature, I feel that breaking it into chunks is preferable.
I am open to constructive criticism regarding code structure, documentation, testing, etc.
Checklist