Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion openmc/data/endf.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@
104: list(range(650, 700)),
105: list(range(700, 750)),
106: list(range(750, 800)),
107: list(range(800, 850))}
107: list(range(800, 850)),
501: [502, 504, 516, 522],
516: [515, 517],
522: list(range(534, 573)),
}

ENDF_FLOAT_RE = re.compile(r'([\s\-\+]?\d*\.\d+)([\+\-]) ?(\d+)')

Expand Down
26 changes: 25 additions & 1 deletion openmc/data/photon.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from . import HDF5_VERSION, HDF5_VERSION_MAJOR
from .ace import Table, get_metadata, get_table
from .data import ATOMIC_SYMBOL, EV_PER_MEV
from .endf import Evaluation, get_head_record, get_tab1_record, get_list_record
from .endf import SUM_RULES, Evaluation, get_head_record, get_tab1_record, get_list_record
from .function import Tabulated1D


Expand Down Expand Up @@ -487,6 +487,30 @@ def atomic_relaxation(self, atomic_relaxation):
def name(self):
return ATOMIC_SYMBOL[self.atomic_number]

def get_reaction_components(self, mt):
"""Determine what reactions make up redundant reaction.

Parameters
----------
mt : int
ENDF MT number of the reaction to find components of.

Returns
-------
mts : list of int
ENDF MT numbers of reactions that make up the redundant reaction and
have cross sections provided.

"""
mts = []
if mt in SUM_RULES:
for mt_i in SUM_RULES[mt]:
mts += self.get_reaction_components(mt_i)
if mts:
return mts
else:
return [mt] if mt in self else []

@classmethod
def from_ace(cls, ace_or_filename):
"""Generate incident photon data from an ACE table
Expand Down
Loading
Loading