Skip to content

Add mechanics to build fine energy group structures - #4176

Draft
yrrepy wants to merge 3 commits into
openmc-dev:developfrom
yrrepy:fine-group-structures
Draft

yrrepy wants to merge 3 commits into
openmc-dev:developfrom
yrrepy:fine-group-structures

Conversation

@yrrepy

@yrrepy yrrepy commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Description

This PR follows up #3564.
It was requested to not have the large energy structures in the Python file but rather in an .H5.

The implementation here one ups that, a generic method, build_fine_group_structure, that can be used to build these types of formulaic fine energy group structures.
These structures often follow similar styles, 1000 groups per decade between 1eV and 100 keV, etc.
The built method allows equal-lethargy or equal-width groups per interval.

FOMG-16000, VESTA-43000, VESTA-100000 are added as named groups that immediately leverage this functionality to populate their GROUP_STRUCTURES

N.B.

  • FOMG-16000 was built for and is recommended for fusion
  • VESTA-43000 was built for and is recommended for LWR (U-238 dominated systems)

These two energy structures are then explicitly included on tests/unit_tests/fine_group_structures_reference.npz
as the test of build_fine_group_structure.

These types of energy structure are needed for the multi-group binning (MGB) method of neutron activation.
Found in Aleph, VESTA, Shift and SMURE.

https://fispact.ukaea.uk/wp-content/uploads/2016/07/snamc2013_05203.pdf
https://etheses.whiterose.ac.uk/id/eprint/4427/1/PhD_Thesis_Corrected_FINAL_FINAL_3_9_13.pdf
https://www.osti.gov/etdeweb/servlets/purl/20902503 https://roma.sckcen.be/ws/portalfiles/portal/4558859/An_Optimum_Approach_to_Monte_Carlo_Burn_Up.pdf https://rsicc.ornl.gov/codes/ccc/ccc7/ccc-769.html
https://www.tandfonline.com/doi/abs/10.13182/NSE07-A2695

AI Assistance

  • Harness: Claude Code

  • Model: Claude Fable 5.1

  • Reasoning effort: max
    Planning, orchestration and final review of the diff.

  • Harness: Claude Code

  • Model: Claude Opus 5.5

  • Reasoning effort: high
    Implementation of the function, the three definitions, the tests and the
    npz fixture; applying the review fixes.

  • Harness: Claude Code

  • Model: Claude Opus 5.5

  • Reasoning effort: max
    Pre-PR code review.

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)

yrrepy added 3 commits October 7, 2026 00:56
The ultra-fine structures are generated from their published definitions
with the new build_fine_group_structure(), which builds any structure
defined as equal-lethargy or equal-width groups per macro-interval. The
FOMG and VESTA-43000 edges tabulated in openmc-dev#3564 serve as the test reference.

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