-
Notifications
You must be signed in to change notification settings - Fork 552
Photonuclear Physics part 1 #3439
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?
Conversation
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. |
@@ -20,6 +20,7 @@ class Library { | |||
enum class Type { | |||
neutron = 1, | |||
photon = 3, | |||
photonuclear = 6, |
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.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
@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. |
f55d2ed
to
6f8df6b
Compare
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.
Thanks for the excellent work! I have a few suggestions.
@@ -3,11 +3,11 @@ set -ex | |||
|
|||
# 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The photonuclear data for Pu239.h5 is currently unavailable from ANL, isn't it? Perhaps we should consider serving this from ANL.
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.
@paulromano, I leave the decision to you.
@pytest.fixture(scope='module') | ||
def pu239(): | ||
"""Pu239 HDF5 data.""" | ||
directory = os.path.dirname(os.environ['OPENMC_CROSS_SECTIONS']) |
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.
Should we consider using openmc.config
?
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.
Because ENDF location is not in openmc.config I think this way is more consistent.
I would change my opinion if openmc.config would include ENDF location.
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.
Feel free to suggest any feathers here PR #3461.
@ahnaf-tahmid-chowdhury Thanks for your review! You noticed some things that I missed. Currently the ci tests crash on the test: |
I fixed a bug and now all tests pass. |
26ad64b
to
8722e9b
Compare
8722e9b
to
a2fbdf5
Compare
Co-authored-by: Ahnaf Tahmid Chowdhury <[email protected]>
a2fbdf5
to
b802e4a
Compare
af9d98a
to
c13c6a2
Compare
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