diff --git a/openmc/data/reaction.py b/openmc/data/reaction.py index 9360d05289..6da151e040 100644 --- a/openmc/data/reaction.py +++ b/openmc/data/reaction.py @@ -64,6 +64,8 @@ REACTION_NAME.update({i: '(n,3He{})'.format(i - 750) for i in range(750, 799)}) REACTION_NAME.update({i: '(n,a{})'.format(i - 800) for i in range(800, 849)}) REACTION_NAME.update({i: '(n,2n{})'.format(i - 875) for i in range(875, 891)}) +REACTION_NUMBER = dict(zip(REACTION_NAME.values(), REACTION_NAME.keys())) + FISSION_MTS = (18, 19, 20, 21, 38) diff --git a/openmc/deplete/helpers.py b/openmc/deplete/helpers.py index b275dc0a58..4ffcdb245a 100644 --- a/openmc/deplete/helpers.py +++ b/openmc/deplete/helpers.py @@ -11,7 +11,7 @@ from numpy import dot, zeros, newaxis, asarray from . import comm from openmc.checkvalue import check_type, check_greater_than -from openmc.data import JOULE_PER_EV, REACTION_NAME +from openmc.data import JOULE_PER_EV, REACTION_NUMBER from openmc.lib import ( Tally, MaterialFilter, EnergyFilter, EnergyFunctionFilter) import openmc.lib @@ -168,10 +168,9 @@ class FluxCollapseHelper(ReactionRateHelper): """ self._materials = materials - # Convert reactions to MT values (needed when collapsing) - mt_values = {v: k for k, v in REACTION_NAME.items()} - mt_values['fission'] = 18 - self._mts = [mt_values[x] for x in scores] + # adds an entry for fisson to the dictionary of reactions + REACTION_NUMBER['fission'] = 18 + self._mts = [REACTION_NUMBER[x] for x in scores] self._scores = scores # Create flux tally with material and energy filters