mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 13:45:36 -04:00
added helpful dict with reaction names as keys
This commit is contained in:
parent
869d7205a3
commit
1c01fe751d
2 changed files with 6 additions and 5 deletions
|
|
@ -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)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue