mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Merge pull request #692 from paulromano/ace-hdf5-fixes
A few fixes to ensure smooth MCNP6 ACE library conversion
This commit is contained in:
commit
4edede450e
5 changed files with 35 additions and 17 deletions
|
|
@ -282,7 +282,7 @@ class Library(object):
|
|||
|
||||
lines = [ace_file.readline() for i in range(13)]
|
||||
|
||||
while len(lines) != 0 and lines[0] != '':
|
||||
while len(lines) != 0 and lines[0].strip() != '':
|
||||
# Read name of table, atomic mass ratio, and temperature. If first
|
||||
# line is empty, we are at end of file
|
||||
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ class Tabulated1D(object):
|
|||
|
||||
if self.interpolation[k] == 1:
|
||||
# Histogram
|
||||
y[contined] = yi
|
||||
y[contained] = yi
|
||||
|
||||
elif self.interpolation[k] == 2:
|
||||
# Linear-linear
|
||||
|
|
|
|||
|
|
@ -178,7 +178,7 @@ class IncidentNeutron(object):
|
|||
@temperature.setter
|
||||
def temperature(self, temperature):
|
||||
cv.check_type('temperature', temperature, Real)
|
||||
cv.check_greater_than('temperature', temperature, 0.0)
|
||||
cv.check_greater_than('temperature', temperature, 0.0, True)
|
||||
self._temperature = temperature
|
||||
|
||||
@energy.setter
|
||||
|
|
@ -448,6 +448,10 @@ class IncidentNeutron(object):
|
|||
# Create summed reaction with appropriate cross section
|
||||
rx = Reaction(mt)
|
||||
mts = data.get_reaction_components(mt)
|
||||
if len(mts) == 0:
|
||||
warn('Photon production is present for MT={} but no '
|
||||
'reaction components exist.'.format(mt))
|
||||
continue
|
||||
rx.xs = Sum([data.reactions[mt_i].xs for mt_i in mts])
|
||||
|
||||
# Determine summed cross section
|
||||
|
|
|
|||
|
|
@ -16,7 +16,8 @@ from openmc.stats import Discrete, Tabular
|
|||
|
||||
_THERMAL_NAMES = {'al': 'c_Al27', 'al27': 'c_Al27',
|
||||
'be': 'c_Be',
|
||||
'bebeo': 'c_Be_in_BeO', 'be-o': 'c_Be_in_BeO',
|
||||
'beo': 'c_BeO',
|
||||
'bebeo': 'c_Be_in_BeO', 'be-o': 'c_Be_in_BeO', 'be/o': 'c_Be_in_BeO',
|
||||
'benz': 'c_Benzine',
|
||||
'cah': 'c_Ca_in_CaH2',
|
||||
'dd2o': 'c_D_in_D2O', 'hwtr': 'c_D_in_D2O',
|
||||
|
|
@ -25,18 +26,18 @@ _THERMAL_NAMES = {'al': 'c_Al27', 'al27': 'c_Al27',
|
|||
'hca': 'c_H_in_CaH2',
|
||||
'hch2': 'c_H_in_CH2', 'poly': 'c_H_in_CH2',
|
||||
'hh2o': 'c_H_in_H2O', 'lwtr': 'c_H_in_H2O',
|
||||
'hzrh': 'c_H_in_ZrH', 'h-zr': 'c_H_in_ZrH',
|
||||
'hzrh': 'c_H_in_ZrH', 'h-zr': 'c_H_in_ZrH', 'h/zr': 'c_H_in_ZrH',
|
||||
'lch4': 'c_liquid_CH4', 'lmeth': 'c_liquid_CH4',
|
||||
'mg': 'c_Mg24',
|
||||
'obeo': 'c_O_in_BeO', 'o-be': 'c_O_in_BeO',
|
||||
'obeo': 'c_O_in_BeO', 'o-be': 'c_O_in_BeO', 'o/be': 'c_O_in_BeO',
|
||||
'orthod': 'c_ortho_D', 'dortho': 'c_ortho_D',
|
||||
'orthoh': 'c_ortho_H', 'hortho': 'c_ortho_H',
|
||||
'ouo2': 'c_O_in_UO2', 'o2-u': 'c_O_in_UO2',
|
||||
'ouo2': 'c_O_in_UO2', 'o2-u': 'c_O_in_UO2', 'o2/u': 'c_O_in_UO2',
|
||||
'parad': 'c_para_D', 'dpara': 'c_para_D',
|
||||
'parah': 'c_para_H', 'hpara': 'c_para_H',
|
||||
'sch4': 'c_solid_CH4', 'smeth': 'c_solid_CH4',
|
||||
'uuo2': 'c_U_in_UO2', 'u-o2': 'c_U_in_UO2',
|
||||
'zrzrh': 'c_Zr_in_ZrH', 'zr-h': 'c_Zr_in_ZrH'}
|
||||
'uuo2': 'c_U_in_UO2', 'u-o2': 'c_U_in_UO2', 'u/o2': 'c_U_in_UO2',
|
||||
'zrzrh': 'c_Zr_in_ZrH', 'zr-h': 'c_Zr_in_ZrH', 'zr/h': 'c_Zr_in_ZrH'}
|
||||
|
||||
|
||||
class CoherentElastic(object):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue