Skip to content

Preserve ENDF target excitation and reaction metadata in HDF5 - #4146

Open
paulromano wants to merge 3 commits into
openmc-dev:developfrom
paulromano:reaction-data-hdf5
Open

paulromano wants to merge 3 commits into
openmc-dev:developfrom
paulromano:reaction-data-hdf5

Conversation

@paulromano

Copy link
Copy Markdown
Contributor

Description

I'm currently working on a capability in OpenMC for reconstructing recoil nuclei from neutron reactions. To properly identify the set of reaction products and energy available to them, it would be helpful to have a few pieces of data from the underlying ENDF evaluation that we don't currently store in our HDF5 files. Namely, the target excitation energy (ELIS), which accounts for energy stored in metastable targets; the mass-difference Q value (QM), which supplies the evaluated mass-difference energy release; and the breakup flag (LR), which identifies additional particles that the MT number alone does not specify. This PR simply pulls those pieces of data from the ENDF file when running IncidentNeutron.from_njoy and stores it in our HDF5 files. While they are loaded in C++, they aren't currently used yet.

To avoid confusion, I renamed the existing q_value attribute to q_reaction since ENDF files hold two different definitions of the Q value (QI and QM; see ENDF-6 formats manual for details). q_value still works on the Python side but is deprecated.

The change here is backwards compatible, so older produced HDF5 files will still work fine. I do plan on updating our data libraries but also have some other things in mind that I want to address while doing that (e.g., provenance metadata as proposed by #4117).

Checklist

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

Add FP_UNSET as a named quiet NaN and use it for unavailable target
excitation energies and mass-difference Q values. Document that callers
must check the sentinel with std::isnan rather than equality.

This branch has not been deployed

No deployments
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.

1 participant