Merge pull request #1001 from nelsonag/mgxs_expansion_with_tests

Incorporation of Expansion filters in to MGXS
This commit is contained in:
Paul Romano 2018-05-08 14:58:41 -05:00 committed by GitHub
commit d5bc4dacae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
61 changed files with 5040 additions and 6862 deletions

2
.gitignore vendored
View file

@ -99,4 +99,4 @@ examples/jupyter/plots
.tox/
.python-version
.coverage
htmlcov
htmlcov

View file

@ -133,15 +133,8 @@ The current version of the statepoint file format is 17.0.
- **derivative** (*int*) -- ID of the derivative applied to the
tally.
- **n_score_bins** (*int*) -- Number of scoring bins for a single
nuclide. In general, this can be greater than the number of
user-specified scores since each score might have multiple scoring
bins, e.g., scatter-PN.
nuclide.
- **score_bins** (*char[][]*) -- Values of specified scores.
- **n_user_scores** (*int*) -- Number of scores without accounting
for those added by expansions, e.g. scatter-PN.
- **moment_orders** (*char[][]*) -- Tallying moment orders for
Legendre and spherical harmonic tally expansions (e.g., 'P2',
'Y1,2', etc.).
- **results** (*double[][][2]*) -- Accumulated sum and sum-of-squares
for each bin of the i-th tally. The first dimension represents
combinations of filter bins, the second dimensions represents

View file

@ -4,7 +4,7 @@
Summary File Format
===================
The current version of the summary file format is 5.0.
The current version of the summary file format is 6.0.
**/**
@ -104,8 +104,13 @@ The current version of the summary file format is 5.0.
- **atom_density** (*double[]*) -- Total atom density of the material
in atom/b-cm.
- **nuclides** (*char[][]*) -- Array of nuclides present in the
material, e.g., 'U235'.
material, e.g., 'U235'. This data set is only present if nuclides
are used.
- **nuclide_densities** (*double[]*) -- Atom density of each nuclide.
This data set is only present if 'nuclides' data set is present.
- **macroscopics** (*char[][]*) -- Array of macroscopic data sets
present in the material. This dataset is only present if
macroscopic data sets are used in multi-group mode.
- **sab_names** (*char[][]*) -- Names of
S(:math:`\alpha,\beta`) tables assigned to the material.
@ -116,6 +121,13 @@ The current version of the summary file format is 5.0.
:Datasets: - **names** (*char[][]*) -- Names of nuclides.
- **awrs** (*float[]*) -- Atomic weight ratio of each nuclide.
**/macroscopics/**
:Attributes: - **n_macroscopics** (*int*) -- Number of macroscopic data sets
in the problem.
:Datasets: - **names** (*char[][]*) -- Names of the macroscopic data sets.
**/tallies/tally <uid>/**
:Datasets: - **name** (*char[]*) -- Name of the tally.

View file

@ -21,7 +21,12 @@ region of phase space, as in:
Thus, to specify a tally, we need to specify what regions of phase space should
be included when deciding whether to score an event as well as what the scoring
function (:math:`f` in the above equation) should be used. The regions of phase
space are called *filters* and the scoring functions are simply called *scores*.
space are generally called *filters* and the scoring functions are simply
called *scores*.
The only cases when filters do not correspond directly with the regions of
phase space are when expansion functions are applied in the integrand, such as
for Legendre expansions of the scattering kernel.
-------
Filters
@ -69,10 +74,9 @@ Scores
------
To specify the scoring functions, a list of strings needs to be given to the
:attr:`Tally.scores` attribute. You can score the flux ('flux'), a reaction rate
('total', 'fission', etc.), or even scattering moments (e.g., 'scatter-P3'). For
example, to tally the elastic scattering rate and the fission neutron
production, you'd assign::
:attr:`Tally.scores` attribute. You can score the flux ('flux'), or a reaction
rate ('total', 'fission', etc.). For example, to tally the elastic scattering
rate and the fission neutron production, you'd assign::
tally.scores = ['elastic', 'nu-fission']
@ -98,12 +102,6 @@ The following tables show all valid scores:
+======================+===================================================+
|flux |Total flux. |
+----------------------+---------------------------------------------------+
|flux-YN |Spherical harmonic expansion of the direction of |
| |motion :math:`\left(\Omega\right)` of the total |
| |flux. This score will tally all of the harmonic |
| |moments of order 0 to N. N must be between 0 and |
| |10. |
+----------------------+---------------------------------------------------+
.. table:: **Reaction scores: units are reactions per source particle.**
@ -118,43 +116,10 @@ The following tables show all valid scores:
+----------------------+---------------------------------------------------+
|fission |Total fission reaction rate. |
+----------------------+---------------------------------------------------+
|scatter |Total scattering rate. Can also be identified with |
| |the "scatter-0" response type. |
+----------------------+---------------------------------------------------+
|scatter-N |Tally the N\ :sup:`th` \ scattering moment, where N|
| |is the Legendre expansion order of the change in |
| |particle angle :math:`\left(\mu\right)`. N must be |
| |between 0 and 10. As an example, tallying the 2\ |
| |:sup:`nd` \ scattering moment would be specified as|
| |``<scores>scatter-2</scores>``. |
+----------------------+---------------------------------------------------+
|scatter-PN |Tally all of the scattering moments from order 0 to|
| |N, where N is the Legendre expansion order of the |
| |change in particle angle |
| |:math:`\left(\mu\right)`. That is, "scatter-P1" is |
| |equivalent to requesting tallies of "scatter-0" and|
| |"scatter-1". Like for "scatter-N", N must be |
| |between 0 and 10. As an example, tallying up to the|
| |2\ :sup:`nd` \ scattering moment would be specified|
| |as ``<scores> scatter-P2 </scores>``. |
+----------------------+---------------------------------------------------+
|scatter-YN |"scatter-YN" is similar to "scatter-PN" except an |
| |additional expansion is performed for the incoming |
| |particle direction :math:`\left(\Omega\right)` |
| |using the real spherical harmonics. This is useful|
| |for performing angular flux moment weighting of the|
| |scattering moments. Like "scatter-PN", "scatter-YN"|
| |will tally all of the moments from order 0 to N; N |
| |again must be between 0 and 10. |
|scatter |Total scattering rate. |
+----------------------+---------------------------------------------------+
|total |Total reaction rate. |
+----------------------+---------------------------------------------------+
|total-YN |The total reaction rate expanded via spherical |
| |harmonics about the direction of motion of the |
| |neutron, :math:`\Omega`. This score will tally all |
| |of the harmonic moments of order 0 to N. N must be|
| |between 0 and 10. |
+----------------------+---------------------------------------------------+
|(n,2nd) |(n,2nd) reaction rate. |
+----------------------+---------------------------------------------------+
|(n,2n) |(n,2n) reaction rate. |
@ -248,10 +213,10 @@ The following tables show all valid scores:
+----------------------+---------------------------------------------------+
|nu-fission |Total production of neutrons due to fission. |
+----------------------+---------------------------------------------------+
|nu-scatter, |These scores are similar in functionality to their |
|nu-scatter-N, |``scatter*`` equivalents except the total |
|nu-scatter-PN, |production of neutrons due to scattering is scored |
|nu-scatter-YN |vice simply the scattering rate. This accounts for |
|nu-scatter, |This score is similar in functionality to the |
| |``scatter`` score except the total production of |
| |neutrons due to scattering is scored vice simply |
| |the scattering rate. This accounts for |
| |multiplicity from (n,2n), (n,3n), and (n,4n) |
| |reactions. |
+----------------------+---------------------------------------------------+

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -73,10 +73,10 @@ _dll.openmc_tally_set_type.errcheck = _error_handler
_SCORES = {
-1: 'flux', -2: 'total', -3: 'scatter', -4: 'nu-scatter',
-9: 'absorption', -10: 'fission', -11: 'nu-fission', -12: 'kappa-fission',
-13: 'current', -18: 'events', -19: 'delayed-nu-fission',
-20: 'prompt-nu-fission', -21: 'inverse-velocity', -22: 'fission-q-prompt',
-23: 'fission-q-recoverable', -24: 'decay-rate'
-5: 'absorption', -6: 'fission', -7: 'nu-fission', -8: 'kappa-fission',
-9: 'current', -10: 'events', -11: 'delayed-nu-fission',
-12: 'prompt-nu-fission', -13: 'inverse-velocity', -14: 'fission-q-prompt',
-15: 'fission-q-recoverable', -16: 'decay-rate'
}

View file

@ -104,10 +104,8 @@ class Filter(IDManagerMixin, metaclass=FilterMeta):
return False
elif len(self.bins) != len(other.bins):
return False
elif not np.allclose(self.bins, other.bins):
return False
else:
return True
return np.allclose(self.bins, other.bins)
def __ne__(self, other):
return not self == other

View file

@ -10,10 +10,17 @@ from . import Filter
class ExpansionFilter(Filter):
"""Abstract filter class for functional expansions."""
def __init__(self, order, filter_id=None):
self.order = order
self.id = filter_id
def __eq__(self, other):
if type(self) is not type(other):
return False
else:
return self.bins == other.bins
@property
def order(self):
return self._order

View file

@ -278,8 +278,8 @@ class Material(IDManagerMixin):
name = group['name'].value.decode() if 'name' in group else ''
density = group['atom_density'].value
nuc_densities = group['nuclide_densities'][...]
nuclides = group['nuclides'].value
if 'nuclide_densities' in group:
nuc_densities = group['nuclide_densities'][...]
# Create the Material
material = cls(mat_id, name)
@ -295,10 +295,18 @@ class Material(IDManagerMixin):
# Set the Material's density to atom/b-cm as used by OpenMC
material.set_density(density=density, units='atom/b-cm')
# Add all nuclides to the Material
for fullname, density in zip(nuclides, nuc_densities):
name = fullname.decode().strip()
material.add_nuclide(name, percent=density, percent_type='ao')
if 'nuclides' in group:
nuclides = group['nuclides'].value
# Add all nuclides to the Material
for fullname, density in zip(nuclides, nuc_densities):
name = fullname.decode().strip()
material.add_nuclide(name, percent=density, percent_type='ao')
if 'macroscopics' in group:
macroscopics = group['macroscopics'].value
# Add all macroscopics to the Material
for fullname in macroscopics:
name = fullname.decode().strip()
material.add_macroscopic(name)
return material

View file

@ -182,41 +182,6 @@ class Mesh(IDManagerMixin):
return mesh
def cell_generator(self):
"""Generator function to traverse through every [i,j,k] index of the
mesh
For example the following code:
.. code-block:: python
for mesh_index in mymesh.cell_generator():
print(mesh_index)
will produce the following output for a 3-D 2x2x2 mesh in mymesh::
[1, 1, 1]
[2, 1, 1]
[1, 2, 1]
[2, 2, 1]
...
"""
if len(self.dimension) == 1:
for x in range(self.dimension[0]):
yield [x + 1, 1, 1]
elif len(self.dimension) == 2:
for y in range(self.dimension[1]):
for x in range(self.dimension[0]):
yield [x + 1, y + 1, 1]
else:
for z in range(self.dimension[2]):
for y in range(self.dimension[1]):
for x in range(self.dimension[0]):
yield [x + 1, y + 1, z + 1]
def to_xml_element(self):
"""Return XML representation of the mesh
@ -280,12 +245,14 @@ class Mesh(IDManagerMixin):
cv.check_value('bc', entry, ['transmission', 'vacuum',
'reflective', 'periodic'])
n_dim = len(self.dimension)
# Build the cell which will contain the lattice
xplanes = [openmc.XPlane(x0=self.lower_left[0],
boundary_type=bc[0]),
openmc.XPlane(x0=self.upper_right[0],
boundary_type=bc[1])]
if len(self.dimension) == 1:
if n_dim == 1:
yplanes = [openmc.YPlane(y0=-1e10, boundary_type='reflective'),
openmc.YPlane(y0=1e10, boundary_type='reflective')]
else:
@ -294,7 +261,7 @@ class Mesh(IDManagerMixin):
openmc.YPlane(y0=self.upper_right[1],
boundary_type=bc[3])]
if len(self.dimension) <= 2:
if n_dim <= 2:
# Would prefer to have the z ranges be the max supported float, but
# these values are apparently different between python and Fortran.
# Choosing a safe and sane default.
@ -314,12 +281,12 @@ class Mesh(IDManagerMixin):
(+yplanes[0] & -yplanes[1]) &
(+zplanes[0] & -zplanes[1]))
# Build the universes which will be used for each of the [i,j,k]
# Build the universes which will be used for each of the (i,j,k)
# locations within the mesh.
# We will concurrently build cells to assign to these universes
cells = []
universes = []
for [i, j, k] in self.cell_generator():
for index in self.indices:
cells.append(openmc.Cell())
universes.append(openmc.Universe())
universes[-1].add_cell(cells[-1])
@ -329,7 +296,24 @@ class Mesh(IDManagerMixin):
# Assign the universe and rotate to match the indexing expected for
# the lattice
lattice.universes = np.rot90(np.reshape(universes, self.dimension))
if n_dim == 1:
universe_array = np.array([universes])
elif n_dim == 2:
universe_array = np.empty(self.dimension, dtype=openmc.Universe)
i = 0
for y in range(self.dimension[1] - 1, -1, -1):
for x in range(self.dimension[0]):
universe_array[y][x] = universes[i]
i += 1
else:
universe_array = np.empty(self.dimension, dtype=openmc.Universe)
i = 0
for z in range(self.dimension[2]):
for y in range(self.dimension[1] - 1, -1, -1):
for x in range(self.dimension[0]):
universe_array[z][y][x] = universes[i]
i += 1
lattice.universes = universe_array
if self.width is not None:
lattice.pitch = self.width
@ -337,9 +321,9 @@ class Mesh(IDManagerMixin):
dx = ((self.upper_right[0] - self.lower_left[0]) /
self.dimension[0])
if len(self.dimension) == 1:
if n_dim == 1:
lattice.pitch = [dx]
elif len(self.dimension) == 2:
elif n_dim == 2:
dy = ((self.upper_right[1] - self.lower_left[1]) /
self.dimension[1])
lattice.pitch = [dx, dy]

View file

@ -1220,9 +1220,8 @@ class Library(object):
xs_type = 'macro'
# Initialize file
mgxs_file = openmc.MGXSLibrary(self.energy_groups,
num_delayed_groups=\
self.num_delayed_groups)
mgxs_file = openmc.MGXSLibrary(
self.energy_groups, num_delayed_groups=self.num_delayed_groups)
if self.domain_type == 'mesh':
# Create the xsdata objects and add to the mgxs_file
@ -1231,7 +1230,7 @@ class Library(object):
if self.by_nuclide:
raise NotImplementedError("Mesh domains do not currently "
"support nuclidic tallies")
for subdomain in domain.cell_generator():
for subdomain in domain.indices:
# Build & add metadata to XSdata object
if xsdata_names is None:
xsdata_name = 'set' + str(i + 1)
@ -1346,7 +1345,7 @@ class Library(object):
geometry.root_universe = root
materials = openmc.Materials()
for i, subdomain in enumerate(self.domains[0].cell_generator()):
for i, subdomain in enumerate(self.domains[0].indices):
xsdata = mgxs_file.xsdatas[i]
# Build the macroscopic and assign it to the cell of
@ -1401,24 +1400,16 @@ class Library(object):
The rules to check include:
- Either total or transport should be present.
- Either total or transport must be present.
- Both can be available if one wants, but we should
use whatever corresponds to Library.correction (if P0: transport)
- Absorption and total (or transport) are required.
- Absorption is required.
- A nu-fission cross section and chi values are not required as a
fixed source problem could be the target.
- Fission and kappa-fission are not required as they are only
needed to support tallies the user may wish to request.
- A nu-scatter matrix is required.
- Having a multiplicity matrix is preferred.
- Having both nu-scatter (of any order) and scatter
(at least isotropic) matrices is the second choice.
- If only nu-scatter, need total (not transport), to
be used in adjusting absorption
(i.e., reduced_abs = tot - nuscatt)
See also
--------
@ -1428,36 +1419,51 @@ class Library(object):
"""
error_flag = False
# if correction is 'P0', then transport must be provided
# otherwise total must be provided
if self.correction == 'P0':
if ('transport' not in self.mgxs_types and
'nu-transport' not in self.mgxs_types):
error_flag = True
warn('If the "correction" parameter is "P0", then a '
'"transport" or "nu-transport" MGXS type is required.')
else:
if 'total' not in self.mgxs_types:
error_flag = True
warn('If the "correction" parameter is None, then a '
'"total" MGXS type is required.')
# Check consistency of "nu-transport" and "nu-scatter"
if 'nu-transport' in self.mgxs_types:
if not ('nu-scatter matrix' in self.mgxs_types or
'consistent nu-scatter matrix' in self.mgxs_types):
error_flag = True
warn('If a "nu-transport" MGXS type is used then a '
'"nu-scatter matrix" or "consistent nu-scatter matrix" '
'must also be used.')
elif 'transport' in self.mgxs_types:
if not ('scatter matrix' in self.mgxs_types or
'consistent scatter matrix' in self.mgxs_types):
error_flag = True
warn('If a "transport" MGXS type is used then a '
'"scatter matrix" or "consistent scatter matrix" '
'must also be used.')
# Make sure there is some kind of a scattering matrix data
if 'nu-scatter matrix' not in self.mgxs_types and \
'consistent nu-scatter matrix' not in self.mgxs_types and \
'scatter matrix' not in self.mgxs_types and \
'consistent scatter matrix' not in self.mgxs_types:
error_flag = True
warn('A "nu-scatter matrix", "consistent nu-scatter matrix", '
'"scatter matrix", or "consistent scatter matrix" MGXS '
'type is required.')
# Ensure absorption is present
if 'absorption' not in self.mgxs_types:
error_flag = True
warn('An "absorption" MGXS type is required but not provided.')
# Ensure nu-scattering matrix is required
if 'nu-scatter matrix' not in self.mgxs_types and \
'consistent nu-scatter matrix' not in self.mgxs_types:
error_flag = True
warn('A "nu-scatter matrix" MGXS type is required but not provided.')
else:
# Ok, now see the status of scatter and/or multiplicity
if 'scatter matrix' not in self.mgxs_types or \
'consistent scatter matrix' not in self.mgxs_types and \
'multiplicity matrix' not in self.mgxs_types:
# We dont have data needed for multiplicity matrix, therefore
# we need total, and not transport.
if 'total' not in self.mgxs_types:
error_flag = True
warn('A "total" MGXS type is required if a '
'scattering matrix is not provided.')
# Total or transport can be present, but if using
# self.correction=="P0", then we should use transport.
if self.correction == "P0" and 'nu-transport' not in self.mgxs_types:
error_flag = True
warn('A "nu-transport" MGXS type is required since a "P0" '
'correction is applied, but a "nu-transport" MGXS is '
'not provided.')
elif self.correction is None and 'total' not in self.mgxs_types:
error_flag = True
warn('A "total" MGXS type is required, but not provided.')
if error_flag:
raise ValueError('Invalid MGXS configuration encountered.')

View file

@ -2717,9 +2717,9 @@ class TransportXS(MGXS):
@property
def scores(self):
if not self.nu:
return ['flux', 'total', 'flux', 'scatter-1']
return ['flux', 'total', 'flux', 'scatter']
else:
return ['flux', 'total', 'flux', 'nu-scatter-1']
return ['flux', 'total', 'flux', 'nu-scatter']
@property
def tally_keys(self):
@ -2730,8 +2730,9 @@ class TransportXS(MGXS):
group_edges = self.energy_groups.group_edges
energy_filter = openmc.EnergyFilter(group_edges)
energyout_filter = openmc.EnergyoutFilter(group_edges)
p1_filter = openmc.LegendreFilter(1)
filters = [[energy_filter], [energy_filter],
[energy_filter], [energyout_filter]]
[energy_filter], [energyout_filter, p1_filter]]
return self._add_angle_filters(filters)
@ -2739,12 +2740,18 @@ class TransportXS(MGXS):
def rxn_rate_tally(self):
if self._rxn_rate_tally is None:
# Switch EnergyoutFilter to EnergyFilter.
old_filt = self.tallies['scatter-1'].filters[-1]
p1_tally = self.tallies['scatter-1']
old_filt = p1_tally.filters[-2]
new_filt = openmc.EnergyFilter(old_filt.values)
self.tallies['scatter-1'].filters[-1] = new_filt
p1_tally.filters[-2] = new_filt
self._rxn_rate_tally = \
self.tallies['total'] - self.tallies['scatter-1']
# Slice Legendre expansion filter and change name of score
p1_tally = p1_tally.get_slice(filters=[openmc.LegendreFilter],
filter_bins=[('P1',)],
squeeze=True)
p1_tally.scores = ['scatter-1']
self._rxn_rate_tally = self.tallies['total'] - p1_tally
self._rxn_rate_tally.sparse = self.sparse
return self._rxn_rate_tally
@ -2758,15 +2765,22 @@ class TransportXS(MGXS):
raise ValueError(msg)
# Switch EnergyoutFilter to EnergyFilter.
old_filt = self.tallies['scatter-1'].filters[-1]
p1_tally = self.tallies['scatter-1']
old_filt = p1_tally.filters[-2]
new_filt = openmc.EnergyFilter(old_filt.values)
self.tallies['scatter-1'].filters[-1] = new_filt
p1_tally.filters[-2] = new_filt
# Slice Legendre expansion filter and change name of score
p1_tally = p1_tally.get_slice(filters=[openmc.LegendreFilter],
filter_bins=[('P1',)],
squeeze=True)
p1_tally.scores = ['scatter-1']
# Compute total cross section
total_xs = self.tallies['total'] / self.tallies['flux (tracklength)']
# Compute transport correction term
trans_corr = self.tallies['scatter-1'] / self.tallies['flux (analog)']
trans_corr = p1_tally / self.tallies['flux (analog)']
# Compute the transport-corrected total cross section
self._xs_tally = total_xs - trans_corr
@ -3510,6 +3524,7 @@ class ScatterXS(MGXS):
self._estimator = 'analog'
self._valid_estimators = ['analog']
class ScatterMatrixXS(MatrixMGXS):
r"""A scattering matrix multi-group cross section with the cosine of the
change-in-angle represented as one or more Legendre moments or a histogram.
@ -3598,10 +3613,10 @@ class ScatterMatrixXS(MatrixMGXS):
name : str, optional
Name of the multi-group cross section. Used as a label to identify
tallies in OpenMC 'tallies.xml' file.
num_polar : Integral, optional
num_polar : int, optional
Number of equi-width polar angle bins for angle discretization;
defaults to one bin
num_azimuthal : Integral, optional
num_azimuthal : int, optional
Number of equi-width azimuthal angle bins for angle discretization;
defaults to one bin
nu : bool
@ -3647,9 +3662,9 @@ class ScatterMatrixXS(MatrixMGXS):
Domain type for spatial homogenization
energy_groups : openmc.mgxs.EnergyGroups
Energy group structure for energy condensation
num_polar : Integral
num_polar : int
Number of equi-width polar angle bins for angle discretization
num_azimuthal : Integral
num_azimuthal : int
Number of equi-width azimuthal angle bins for angle discretization
tally_trigger : openmc.Trigger
An (optional) tally precision trigger given to each tally used to
@ -3767,38 +3782,25 @@ class ScatterMatrixXS(MatrixMGXS):
def scores(self):
if self.formulation == 'simple':
scores = ['flux']
if self.scatter_format == 'legendre':
if self.legendre_order == 0:
scores.append('{}-0'.format(self.rxn_type))
if self.correction:
scores.append('{}-1'.format(self.rxn_type))
else:
scores.append('{}-P{}'.format(self.rxn_type, self.legendre_order))
elif self.scatter_format == 'histogram':
scores += [self.rxn_type]
scores = ['flux', self.rxn_type]
else:
# Add scores for groupwise scattering cross section
scores = ['flux', 'scatter']
# Add scores for group-to-group scattering probability matrix
if self.scatter_format == 'legendre':
if self.legendre_order == 0:
scores.append('scatter-0')
else:
scores.append('scatter-P{}'.format(self.legendre_order))
elif self.scatter_format == 'histogram':
scores.append('scatter-0')
# these scores also contain the angular information, whether it be
# Legendre expansion or histogram bins
scores.append('scatter')
# Add scores for multiplicity matrix
# Add scores for multiplicity matrix; scatter info for the
# denominator will come from the previous score
if self.nu:
scores.extend(['nu-scatter-0', 'scatter-0'])
scores.append('nu-scatter')
# Add scores for transport correction
if self.correction == 'P0' and self.legendre_order == 0:
scores.extend(['{}-1'.format(self.rxn_type), 'flux'])
scores.extend([self.rxn_type, 'flux'])
return scores
@ -3811,15 +3813,15 @@ class ScatterMatrixXS(MatrixMGXS):
tally_keys = ['flux (tracklength)', 'scatter']
# Add keys for group-to-group scattering probability matrix
tally_keys.append('scatter-P{}'.format(self.legendre_order))
tally_keys.append('scatter matrix')
# Add keys for multiplicity matrix
if self.nu:
tally_keys.extend(['nu-scatter-0', 'scatter-0'])
tally_keys.extend(['nu-scatter'])
# Add keys for transport correction
if self.correction == 'P0' and self.legendre_order == 0:
tally_keys.extend(['{}-1'.format(self.rxn_type), 'flux (analog)'])
tally_keys.extend(['correction', 'flux (analog)'])
return tally_keys
@ -3836,7 +3838,7 @@ class ScatterMatrixXS(MatrixMGXS):
# Add estimators for multiplicity matrix
if self.nu:
estimators.extend(['analog', 'analog'])
estimators.extend(['analog'])
# Add estimators for transport correction
if self.correction == 'P0' and self.legendre_order == 0:
@ -3853,13 +3855,15 @@ class ScatterMatrixXS(MatrixMGXS):
if self.scatter_format == 'legendre':
if self.correction == 'P0' and self.legendre_order == 0:
filters = [[energy], [energy, energyout], [energyout]]
angle_filter = openmc.LegendreFilter(order=1)
else:
filters = [[energy], [energy, energyout]]
angle_filter = \
openmc.LegendreFilter(order=self.legendre_order)
elif self.scatter_format == 'histogram':
bins = np.linspace(-1., 1., num=self.histogram_bins + 1,
endpoint=True)
filters = [[energy], [energy, energyout, openmc.MuFilter(bins)]]
angle_filter = openmc.MuFilter(bins)
filters = [[energy], [energy, energyout, angle_filter]]
else:
group_edges = self.energy_groups.group_edges
@ -3871,19 +3875,21 @@ class ScatterMatrixXS(MatrixMGXS):
# Group-to-group scattering probability matrix
if self.scatter_format == 'legendre':
filters.append([energy, energyout])
angle_filter = openmc.LegendreFilter(order=self.legendre_order)
elif self.scatter_format == 'histogram':
bins = np.linspace(-1., 1., num=self.histogram_bins + 1,
endpoint=True)
filters.append([energy, energyout, openmc.MuFilter(bins)])
angle_filter = openmc.MuFilter(bins)
filters.append([energy, energyout, angle_filter])
# Multiplicity matrix
if self.nu:
filters.extend([[energy, energyout], [energy, energyout]])
filters.extend([[energy, energyout]])
# Add filters for transport correction
if self.correction == 'P0' and self.legendre_order == 0:
filters.extend([[energyout], [energy]])
filters.extend([[energyout, openmc.LegendreFilter(1)],
[energy]])
return self._add_angle_filters(filters)
@ -3894,27 +3900,39 @@ class ScatterMatrixXS(MatrixMGXS):
if self.formulation == 'simple':
if self.scatter_format == 'legendre':
# If using P0 correction subtract scatter-1 from the diagonal
# If using P0 correction subtract P2 scatter from the diag.
if self.correction == 'P0' and self.legendre_order == 0:
scatter_p0 = self.tallies['{}-0'.format(self.rxn_type)]
scatter_p1 = self.tallies['{}-1'.format(self.rxn_type)]
energy_filter = scatter_p0.find_filter(openmc.EnergyFilter)
scatter_p0 = self.tallies[self.rxn_type].get_slice(
filters=[openmc.LegendreFilter],
filter_bins=[('P0',)])
scatter_p1 = self.tallies[self.rxn_type].get_slice(
filters=[openmc.LegendreFilter],
filter_bins=[('P1',)])
# Transform scatter-p1 tally into an energyin/out matrix
# Set the Legendre order of these tallies to be 0
# so they can be subtracted
legendre = openmc.LegendreFilter(order=0)
scatter_p0.filters[-1] = legendre
scatter_p1.filters[-1] = legendre
scatter_p1 = scatter_p1.summation(
filter_type=openmc.EnergyFilter,
remove_filter=True)
energy_filter = \
scatter_p0.find_filter(openmc.EnergyFilter)
# Transform scatter-p1 into an energyin/out matrix
# to match scattering matrix shape for tally arithmetic
energy_filter = copy.deepcopy(energy_filter)
scatter_p1 = scatter_p1.diagonalize_filter(energy_filter)
scatter_p1 = \
scatter_p1.diagonalize_filter(energy_filter)
self._rxn_rate_tally = scatter_p0 - scatter_p1
# Extract scattering moment reaction rate Tally
elif self.legendre_order == 0:
tally_key = '{}-{}'.format(self.rxn_type,
self.legendre_order)
self._rxn_rate_tally = self.tallies[tally_key]
# Otherwise, extract scattering moment reaction rate Tally
else:
tally_key = '{}-P{}'.format(self.rxn_type,
self.legendre_order)
self._rxn_rate_tally = self.tallies[tally_key]
self._rxn_rate_tally = self.tallies[self.rxn_type]
elif self.scatter_format == 'histogram':
# Extract scattering rate distribution tally
self._rxn_rate_tally = self.tallies[self.rxn_type]
@ -3941,35 +3959,24 @@ class ScatterMatrixXS(MatrixMGXS):
self._xs_tally = MGXS.xs_tally.fget(self)
else:
# Compute scattering probability matrix
energyout_bins = [self.energy_groups.get_group_bounds(i)
for i in range(self.num_groups, 0, -1)]
tally_key = 'scatter-P{}'.format(self.legendre_order)
# Compute scattering probability matrixS
tally_key = 'scatter matrix'
# Compute normalization factor summed across outgoing energies
norm = self.tallies[tally_key].get_slice(scores=['scatter-0'])
norm = norm.summation(
filter_type=openmc.EnergyoutFilter, filter_bins=energyout_bins)
# Remove the AggregateFilter summed across energyout bins
norm._filters = norm._filters[:2]
if self.scatter_format == 'legendre':
norm = self.tallies[tally_key].get_slice(
scores=['scatter'],
filters=[openmc.LegendreFilter],
filter_bins=[('P0',)], squeeze=True)
# Compute normalization factor summed across outgoing mu bins
if self.scatter_format == 'histogram':
# (Re-)append the MuFilter which was removed above
mu_bins = np.linspace(
-1., 1., num=self.histogram_bins + 1, endpoint=True)
norm._filters.append(openmc.MuFilter(mu_bins))
# Sum across all mu bins
mu_bins = [(mu_bins[i], mu_bins[i+1]) for
i in range(self.histogram_bins)]
elif self.scatter_format == 'histogram':
norm = self.tallies[tally_key].get_slice(
scores=['scatter'])
norm = norm.summation(
filter_type=openmc.MuFilter, filter_bins=mu_bins)
# Remove the AggregateFilter summed across mu bins
norm._filters = norm._filters[:2]
filter_type=openmc.MuFilter, remove_filter=True)
norm = norm.summation(filter_type=openmc.EnergyoutFilter,
remove_filter=True)
# Compute groupwise scattering cross section
self._xs_tally = self.tallies['scatter'] * \
@ -3981,15 +3988,36 @@ class ScatterMatrixXS(MatrixMGXS):
# Multiply by the multiplicity matrix
if self.nu:
numer = self.tallies['nu-scatter-0']
denom = self.tallies['scatter-0']
numer = self.tallies['nu-scatter']
# Get the denominator
if self.scatter_format == 'legendre':
denom = self.tallies[tally_key].get_slice(
scores=['scatter'],
filters=[openmc.LegendreFilter],
filter_bins=[('P0',)], squeeze=True)
# Compute normalization factor summed across mu bins
elif self.scatter_format == 'histogram':
denom = self.tallies[tally_key].get_slice(
scores=['scatter'])
# Sum across all mu bins
denom = denom.summation(
filter_type=openmc.MuFilter, remove_filter=True)
self._xs_tally *= (numer / denom)
# If using P0 correction subtract scatter-1 from the diagonal
if self.correction == 'P0' and self.legendre_order == 0:
scatter_p1 = self.tallies['{}-1'.format(self.rxn_type)]
scatter_p1 = self.tallies['correction'].get_slice(
filters=[openmc.LegendreFilter], filter_bins=[('P1',)])
flux = self.tallies['flux (analog)']
# Set the Legendre order of the P1 tally to be P0
# so it can be subtracted
legendre = openmc.LegendreFilter(order=0)
scatter_p1.filters[-1] = legendre
# Transform scatter-p1 tally into an energyin/out matrix
# to match scattering matrix shape for tally arithmetic
energy_filter = flux.find_filter(openmc.EnergyFilter)
@ -4001,10 +4029,34 @@ class ScatterMatrixXS(MatrixMGXS):
# Override the nuclides for tally arithmetic
correction.nuclides = scatter_p1.nuclides
# Set xs_tally to be itself with only P0 data
self._xs_tally = self._xs_tally.get_slice(
filters=[openmc.LegendreFilter], filter_bins=[('P0',)])
# Tell xs_tally that it is P0
legendre_xs_tally = \
self._xs_tally.find_filter(openmc.LegendreFilter)
legendre_xs_tally.order = 0
# And subtract the P1 correction from the P0 matrix
self._xs_tally -= correction
self._compute_xs()
# Force the angle filter to be the last filter
if self.scatter_format == 'histogram':
angle_filter = self._xs_tally.find_filter(openmc.MuFilter)
else:
angle_filter = \
self._xs_tally.find_filter(openmc.LegendreFilter)
angle_filter_index = self._xs_tally.filters.index(angle_filter)
# If the angle filter index is not last, then make it last
if angle_filter_index != len(self._xs_tally.filters) - 1:
energyout_filter = \
self._xs_tally.find_filter(openmc.EnergyoutFilter)
self._xs_tally._swap_filters(energyout_filter,
angle_filter)
return self._xs_tally
@nu.setter
@ -4125,16 +4177,6 @@ class ScatterMatrixXS(MatrixMGXS):
self._rxn_rate_tally = None
self._loaded_sp = False
if self.scatter_format == 'legendre':
# Expand scores to match the format in the statepoint
# e.g., "scatter-P2" -> "scatter-0", "scatter-1", "scatter-2"
for tally_key, tally in self.tallies.items():
if 'scatter-P' in tally.scores[0]:
score_prefix = tally.scores[0].split('P')[0]
self.tallies[tally_key].scores = \
[score_prefix + '{}'.format(i)
for i in range(self.legendre_order + 1)]
super().load_from_statepoint(statepoint)
def get_slice(self, nuclides=[], in_groups=[], out_groups=[],
@ -4187,12 +4229,11 @@ class ScatterMatrixXS(MatrixMGXS):
slice_xs.legendre_order = legendre_order
# Slice the scattering tally
tally_key = '{}-P{}'.format(self.rxn_type, self.legendre_order)
expand_scores = \
[self.rxn_type + '-{}'.format(i)
for i in range(self.legendre_order + 1)]
slice_xs.tallies[tally_key] = \
slice_xs.tallies[tally_key].get_slice(scores=expand_scores)
filter_bins = [tuple(['P{}'.format(i)
for i in range(self.legendre_order + 1)])]
slice_xs.tallies[self.rxn_type] = \
slice_xs.tallies[self.rxn_type].get_slice(
filters=[openmc.LegendreFilter], filter_bins=filter_bins)
# Slice outgoing energy groups if needed
if len(out_groups) != 0:
@ -4206,7 +4247,8 @@ class ScatterMatrixXS(MatrixMGXS):
for tally_type, tally in slice_xs.tallies.items():
if tally.contains_filter(openmc.EnergyoutFilter):
tally_slice = tally.get_slice(
filters=[openmc.EnergyoutFilter], filter_bins=filter_bins)
filters=[openmc.EnergyoutFilter],
filter_bins=filter_bins)
slice_xs.tallies[tally_type] = tally_slice
slice_xs.sparse = self.sparse
@ -4317,14 +4359,19 @@ class ScatterMatrixXS(MatrixMGXS):
filter_bins.append((self.energy_groups.get_group_bounds(group),))
# Construct CrossScore for requested scattering moment
if moment != 'all' and self.scatter_format == 'legendre':
cv.check_type('moment', moment, Integral)
cv.check_greater_than('moment', moment, 0, equality=True)
cv.check_less_than(
'moment', moment, self.legendre_order, equality=True)
scores = [self.xs_tally.scores[moment]]
if self.scatter_format == 'legendre':
if moment != 'all':
cv.check_type('moment', moment, Integral)
cv.check_greater_than('moment', moment, 0, equality=True)
cv.check_less_than(
'moment', moment, self.legendre_order, equality=True)
filters.append(openmc.LegendreFilter)
filter_bins.append(('P{}'.format(moment),))
num_angle_bins = 1
else:
num_angle_bins = self.legendre_order + 1
else:
scores = []
num_angle_bins = self.histogram_bins
# Construct a collection of the nuclides to retrieve from the xs tally
if self.by_nuclide:
@ -4336,6 +4383,7 @@ class ScatterMatrixXS(MatrixMGXS):
query_nuclides = ['total']
# Use tally summation if user requested the sum for all nuclides
scores = self.xs_tally.scores
if nuclides == 'sum' or nuclides == ['sum']:
xs_tally = self.xs_tally.summation(nuclides=query_nuclides)
xs = xs_tally.get_values(scores=scores, filters=filters,
@ -4367,24 +4415,15 @@ class ScatterMatrixXS(MatrixMGXS):
else:
num_out_groups = len(out_groups)
if self.scatter_format == 'histogram':
num_mu_bins = self.histogram_bins
else:
num_mu_bins = 1
# Reshape tally data array with separate axes for domain and energy
# Accomodate the polar and azimuthal bins if needed
num_subdomains = int(xs.shape[0] / (num_mu_bins * num_in_groups *
num_subdomains = int(xs.shape[0] / (num_angle_bins * num_in_groups *
num_out_groups * self.num_polar *
self.num_azimuthal))
if self.num_polar > 1 or self.num_azimuthal > 1:
if self.scatter_format == 'histogram':
new_shape = (self.num_polar, self.num_azimuthal,
num_subdomains, num_in_groups, num_out_groups,
num_mu_bins)
else:
new_shape = (self.num_polar, self.num_azimuthal,
num_subdomains, num_in_groups, num_out_groups)
new_shape = (self.num_polar, self.num_azimuthal,
num_subdomains, num_in_groups, num_out_groups,
num_angle_bins)
new_shape += xs.shape[1:]
xs = np.reshape(xs, new_shape)
@ -4397,11 +4436,9 @@ class ScatterMatrixXS(MatrixMGXS):
if order_groups == 'increasing':
xs = xs[:, :, :, ::-1, ::-1, ...]
else:
if self.scatter_format == 'histogram':
new_shape = (num_subdomains, num_in_groups, num_out_groups,
num_mu_bins)
else:
new_shape = (num_subdomains, num_in_groups, num_out_groups)
new_shape = (num_subdomains, num_in_groups, num_out_groups,
num_angle_bins)
new_shape += xs.shape[1:]
xs = np.reshape(xs, new_shape)
@ -4416,14 +4453,14 @@ class ScatterMatrixXS(MatrixMGXS):
if squeeze:
# We want to squeeze out everything but the angles, in_groups,
# out_groups, and, if needed, num_mu_bins dimension. These must
# out_groups, and, if needed, num_angle_bins dimension. These must
# not be squeezed so 1-group, 1-angle problems have the correct
# shape.
xs = self._squeeze_xs(xs)
return xs
def get_pandas_dataframe(self, groups='all', nuclides='all', moment='all',
xs_type='macro', paths=True):
def get_pandas_dataframe(self, groups='all', nuclides='all',
xs_type='macro', paths=False):
"""Build a Pandas DataFrame for the MGXS data.
This method leverages :meth:`openmc.Tally.get_pandas_dataframe`, but
@ -4438,19 +4475,15 @@ class ScatterMatrixXS(MatrixMGXS):
may be a list of nuclide name strings (e.g., ['U235', 'U238']).
The special string 'all' will include the cross sections for all
nuclides in the spatial domain. The special string 'sum' will
include the cross sections summed over all nuclides. Defaults
to 'all'.
moment : int or 'all'
The scattering matrix moment to return. All moments will be
returned if the moment is 'all' (default); otherwise, a specific
moment will be returned.
include the cross sections summed over all nuclides. Defaults to
'all'.
xs_type: {'macro', 'micro'}
Return macro or micro cross section in units of cm^-1 or barns.
Defaults to 'macro'.
paths : bool, optional
Construct columns for distribcell tally filters (default is True).
The geometric information in the Summary object is embedded into a
Multi-index column with a geometric "path" to each distribcell
The geometric information in the Summary object is embedded into
a Multi-index column with a geometric "path" to each distribcell
instance.
Returns
@ -4466,35 +4499,13 @@ class ScatterMatrixXS(MatrixMGXS):
"""
df = super().get_pandas_dataframe(groups, nuclides, xs_type, paths)
# Build the dataframe using the parent class method
df = super().get_pandas_dataframe(groups, nuclides, xs_type,
paths=paths)
if self.scatter_format == 'legendre':
# Add a moment column to dataframe
if self.legendre_order > 0:
# Insert a column corresponding to the Legendre moments
moments = ['P{}'.format(i)
for i in range(self.legendre_order + 1)]
moments = np.tile(moments, int(df.shape[0] / len(moments)))
df['moment'] = moments
# Place the moment column before the mean column
columns = df.columns.tolist()
mean_index \
= [i for i, s in enumerate(columns) if 'mean' in s][0]
if self.domain_type == 'mesh':
df = df[columns[:mean_index] + [('moment', '')] +
columns[mean_index:-1]]
else:
df = df[columns[:mean_index] + ['moment'] +
columns[mean_index:-1]]
# Select rows corresponding to requested scattering moment
if moment != 'all':
cv.check_type('moment', moment, Integral)
cv.check_greater_than('moment', moment, 0, equality=True)
cv.check_less_than(
'moment', moment, self.legendre_order, equality=True)
df = df[df['moment'] == 'P{}'.format(moment)]
# If the matrix is P0, remove the legendre column
if self.scatter_format == 'legendre' and self.legendre_order == 0:
df = df.drop(axis=1, labels=['legendre'])
return df
@ -4511,8 +4522,9 @@ class ScatterMatrixXS(MatrixMGXS):
The nuclides of the cross-sections to include in the report. This
may be a list of nuclide name strings (e.g., ['U235', 'U238']).
The special string 'all' will report the cross sections for all
nuclides in the spatial domain. The special string 'sum' will report
the cross sections summed over all nuclides. Defaults to 'all'.
nuclides in the spatial domain. The special string 'sum' will
report the cross sections summed over all nuclides. Defaults to
'all'.
xs_type: {'macro', 'micro'}
Return the macro or micro cross section in units of cm^-1 or barns.
Defaults to 'macro'.
@ -4986,14 +4998,9 @@ class ScatterProbabilityMatrix(MatrixMGXS):
def xs_tally(self):
if self._xs_tally is None:
energyout_bins = [self.energy_groups.get_group_bounds(i)
for i in range(self.num_groups, 0, -1)]
norm = self.rxn_rate_tally.get_slice(scores=[self.rxn_type])
norm = norm.summation(
filter_type=openmc.EnergyoutFilter, filter_bins=energyout_bins)
# Remove the AggregateFilter summed across energyout bins
norm._filters = norm._filters[:2]
filter_type=openmc.EnergyoutFilter, remove_filter=True)
# Compute the group-to-group probabilities
self._xs_tally = self.tallies[self.rxn_type] / norm

View file

@ -170,13 +170,13 @@ def plot_xs(this, types, divisor_types=None, temperature=294., data_type=None,
data = data_new
else:
# Calculate for MG cross sections
E, data = calculate_mgxs(this, types, orders, temperature,
E, data = calculate_mgxs(this, data_type, types, orders, temperature,
mg_cross_sections, ce_cross_sections,
enrichment)
if divisor_types:
cv.check_length('divisor types', divisor_types, len(types))
Ediv, data_div = calculate_mgxs(this, divisor_types,
Ediv, data_div = calculate_mgxs(this, data_type, divisor_types,
divisor_orders, temperature,
mg_cross_sections,
ce_cross_sections, enrichment)
@ -243,7 +243,7 @@ def calculate_cexs(this, data_type, types, temperature=294., sab_name=None,
Parameters
----------
this : str or openmc.Material
this : {str, openmc.Nuclide, openmc.Element, openmc.Material}
Object to source data from
data_type : {'nuclide', 'element', material'}
Type of object to plot
@ -280,7 +280,11 @@ def calculate_cexs(this, data_type, types, temperature=294., sab_name=None,
cv.check_type('enrichment', enrichment, Real)
if data_type == 'nuclide':
energy_grid, xs = _calculate_cexs_nuclide(this, types, temperature,
if isinstance(this, str):
nuc = openmc.Nuclide(this)
else:
nuc = this
energy_grid, xs = _calculate_cexs_nuclide(nuc, types, temperature,
sab_name, cross_sections)
# Convert xs (Iterable of Callable) to a grid of cross section values
# calculated on @ the points in energy_grid for consistency with the
@ -289,10 +293,15 @@ def calculate_cexs(this, data_type, types, temperature=294., sab_name=None,
for line in range(len(types)):
data[line, :] = xs[line](energy_grid)
elif data_type == 'element':
energy_grid, data = _calculate_cexs_elem_mat(this, types, temperature,
if isinstance(this, str):
elem = openmc.Element(this)
else:
elem = this
energy_grid, data = _calculate_cexs_elem_mat(elem, types, temperature,
cross_sections, sab_name,
enrichment)
elif data_type == 'material':
cv.check_type('this', this, openmc.Material)
energy_grid, data = _calculate_cexs_elem_mat(this, types, temperature,
cross_sections)
else:
@ -518,10 +527,8 @@ def _calculate_cexs_elem_mat(this, types, temperature=294.,
T = this.temperature
else:
T = temperature
data_type = 'material'
else:
T = temperature
data_type = 'element'
# Load the library
library = openmc.data.DataLibrary.from_xml(cross_sections)
@ -571,7 +578,7 @@ def _calculate_cexs_elem_mat(this, types, temperature=294.,
name = nuclide[0]
nuc = nuclide[1]
sab_tab = sabs[name]
temp_E, temp_xs = calculate_cexs(nuc, data_type, types, T, sab_tab,
temp_E, temp_xs = calculate_cexs(nuc, 'nuclide', types, T, sab_tab,
cross_sections)
E.append(temp_E)
# Since the energy grids are different, store the cross sections as

View file

@ -407,17 +407,10 @@ class StatePoint(object):
scores = group['score_bins'].value
n_score_bins = group['n_score_bins'].value
# Read scattering moment order strings (e.g., P3, Y1,2, etc.)
moments = group['moment_orders'].value
# Add the scores to the Tally
for j, score in enumerate(scores):
score = score.decode()
# If this is a moment, use generic moment order
pattern = r'-n$|-pn$|-yn$'
score = re.sub(pattern, '-' + moments[j].decode(), score)
tally.scores.append(score)
# Add Tally to the global dictionary of all Tallies

View file

@ -9,7 +9,7 @@ import openmc
import openmc.checkvalue as cv
from openmc.region import Region
_VERSION_SUMMARY = 5
_VERSION_SUMMARY = 6
class Summary(object):
@ -26,6 +26,8 @@ class Summary(object):
nuclides : dict
Dictionary whose keys are nuclide names and values are atomic weight
ratios.
macroscopics : list
Names of macroscopic data sets
version: tuple of int
Version of OpenMC
@ -44,13 +46,15 @@ class Summary(object):
self._fast_materials = {}
self._fast_surfaces = {}
self._fast_cells = {}
self._fast_universes = {}
self._fast_universes = {}
self._fast_lattices = {}
self._materials = openmc.Materials()
self._nuclides = {}
self._macroscopics = []
self._read_nuclides()
self._read_macroscopics()
with warnings.catch_warnings():
warnings.simplefilter("ignore", openmc.IDWarning)
self._read_geometry()
@ -71,15 +75,26 @@ class Summary(object):
def nuclides(self):
return self._nuclides
@property
def macroscopics(self):
return self._macroscopics
@property
def version(self):
return tuple(self._f.attrs['openmc_version'])
def _read_nuclides(self):
names = self._f['nuclides/names'].value
awrs = self._f['nuclides/awrs'].value
for name, awr in zip(names, awrs):
self._nuclides[name.decode()] = awr
if 'nuclides/names' in self._f:
names = self._f['nuclides/names'].value
awrs = self._f['nuclides/awrs'].value
for name, awr in zip(names, awrs):
self._nuclides[name.decode()] = awr
def _read_macroscopics(self):
if 'macroscopics/names' in self._f:
names = self._f['macroscopics/names'].value
for name in names:
self._macroscopics = name.decode()
def _read_geometry(self):
# Read in and initialize the Materials and Geometry

View file

@ -65,9 +65,7 @@ class Tally(IDManagerMixin):
triggers : list of openmc.Trigger
List of tally triggers
num_scores : int
Total number of scores, accounting for the fact that a single
user-specified score, e.g. scatter-P3 or flux-Y2,2, might have multiple
bins
Total number of scores
num_filter_bins : int
Total number of filter bins accounting for all filters
num_bins : int
@ -388,6 +386,13 @@ class Tally(IDManagerMixin):
# If score is a string, strip whitespace
if isinstance(score, str):
# Check to see if scores are deprecated before storing
for deprecated in ['scatter-', 'nu-scatter-', 'scatter-p',
'nu-scatter-p', 'scatter-y', 'nu-scatter-y',
'flux-y', 'total-y']:
if score.startswith(deprecated):
msg = score.strip() + ' is no longer supported.'
raise ValueError(msg)
scores[i] = score.strip()
self._scores = cv.CheckedList(_SCORE_CLASSES, 'tally scores', scores)
@ -827,51 +832,8 @@ class Tally(IDManagerMixin):
# Sparsify merged tally if both tallies are sparse
merged_tally.sparse = self.sparse and other.sparse
# Consolidate scatter and flux Legendre moment scores
merged_tally._consolidate_moment_scores()
return merged_tally
def _consolidate_moment_scores(self):
"""Remove redundant scattering and flux moment scores from a Tally."""
# Define regex for scatter, nu-scatter and flux moment scores
regex = [(r'^((?!nu-)scatter-\d)', r'^((?!nu-)scatter-(P|p)\d)'),
(r'nu-scatter-\d', r'nu-scatter-(P|p)\d'),
(r'flux-\d', r'flux-(P|p)\d')]
# Find all non-scattering and non-flux moment scores
scores = [x for x in self.scores if
re.search(r'^((?!scatter-).)*$', x)]
scores = [x for x in scores if
re.search(r'^((?!flux-).)*$', x)]
for regex_n, regex_pn in regex:
# Use regex to find score-(P)n scores
score_n = [x for x in self.scores if re.search(regex_n, x)]
score_pn = [x for x in self.scores if re.search(regex_pn, x)]
# Consolidate moment scores
if len(score_pn) > 0:
# Only keep the highest score-PN score
high_pn = sorted([x.lower() for x in score_pn])[-1]
pn = int(high_pn.split('-')[-1].replace('p', ''))
# Only keep the score-N scores with N > PN
score_n = sorted([x.lower() for x in score_n])
score_n = [x for x in score_n if (int(x.split('-')[1]) > pn)]
# Append highest score-PN and any higher score-N scores
scores.extend([high_pn] + score_n)
else:
scores.extend(score_n)
# Override Tally's scores with consolidated list of scores
self.scores = scores
def to_xml_element(self):
"""Return XML representation of the tally
@ -1180,7 +1142,7 @@ class Tally(IDManagerMixin):
# Determine the score indices from any of the requested scores
if nuclides:
nuclide_indices = np.zeros(len(nuclides), dtype=np.int)
nuclide_indices = np.zeros(len(nuclides), dtype=int)
for i, nuclide in enumerate(nuclides):
nuclide_indices[i] = self.get_nuclide_index(nuclide)
@ -1219,7 +1181,7 @@ class Tally(IDManagerMixin):
# Determine the score indices from any of the requested scores
if scores:
score_indices = np.zeros(len(scores), dtype=np.int)
score_indices = np.zeros(len(scores), dtype=int)
for i, score in enumerate(scores):
score_indices[i] = self.get_score_index(score)
@ -1491,11 +1453,8 @@ class Tally(IDManagerMixin):
data = self.get_values(value=value)
# Build a new array shape with one dimension per filter
new_shape = ()
for self_filter in self.filters:
new_shape += (self_filter.num_bins, )
new_shape += (self.num_nuclides,)
new_shape += (self.num_scores,)
new_shape = tuple(f.num_bins for f in self.filters)
new_shape += (self.num_nuclides, self.num_scores)
# Reshape the data with one dimension for each filter
data = np.reshape(data, new_shape)
@ -2772,7 +2731,7 @@ class Tally(IDManagerMixin):
# Sum across the bins in the user-specified filter
for i, self_filter in enumerate(self.filters):
if isinstance(self_filter, filter_type):
if type(self_filter) == filter_type:
shape = mean.shape
mean = np.take(mean, indices=bin_indices, axis=i)
std_dev = np.take(std_dev, indices=bin_indices, axis=i)
@ -3012,7 +2971,7 @@ class Tally(IDManagerMixin):
The data in the derived tally arrays is "diagonalized" along the bins in
the new filter. This functionality is used by the openmc.mgxs module; to
transport-correct scattering matrices by subtracting a 'scatter-P1'
reaction rate tally with an energy filter from an 'scatter' reaction
reaction rate tally with an energy filter from a 'scatter' reaction
rate tally with both energy and energyout filters.
Parameters
@ -3031,7 +2990,7 @@ class Tally(IDManagerMixin):
if new_filter in self.filters:
msg = 'Unable to diagonalize Tally ID="{0}" which already ' \
'contains a "{1}" filter'.format(self.id, new_filter.type)
'contains a "{1}" filter'.format(self.id, type(new_filter))
raise ValueError(msg)
# Add the new filter to a copy of this Tally
@ -3042,8 +3001,8 @@ class Tally(IDManagerMixin):
# by which the "base" indices should be repeated to account for all
# other filter bins in the diagonalized tally
indices = np.arange(0, new_filter.num_bins**2, new_filter.num_bins+1)
diag_factor = int(self.num_filter_bins / new_filter.num_bins)
diag_indices = np.zeros(self.num_filter_bins, dtype=np.int)
diag_factor = self.num_filter_bins // new_filter.num_bins
diag_indices = np.zeros(self.num_filter_bins, dtype=int)
# Determine the filter indices along the new "diagonal"
for i in range(diag_factor):

View file

@ -76,6 +76,7 @@ contains
integer :: i_filter_mesh ! index for mesh filter
integer :: i_filter_ein ! index for incoming energy filter
integer :: i_filter_eout ! index for outgoing energy filter
integer :: i_filter_legendre ! index for Legendre filter
integer :: i_mesh ! flattend index for mesh
logical :: energy_filters! energy filters present
real(8) :: flux ! temp variable for flux
@ -116,8 +117,11 @@ contains
if (ital < 3) then
i_filter_mesh = t % filter(t % find_filter(FILTER_MESH))
else
else if (ital == 3) then
i_filter_mesh = t % filter(t % find_filter(FILTER_MESHSURFACE))
else if (ital == 4) then
i_filter_mesh = t % filter(t % find_filter(FILTER_MESH))
i_filter_legendre = t % filter(t % find_filter(FILTER_LEGENDRE))
end if
! Check for energy filters
@ -187,13 +191,6 @@ contains
! Get total rr and convert to total xs
cmfd % totalxs(h,i,j,k) = t % results(RESULT_SUM,2,score_index) / flux
! Get p1 scatter rr and convert to p1 scatter xs
cmfd % p1scattxs(h,i,j,k) = t % results(RESULT_SUM,3,score_index) / flux
! Calculate diffusion coefficient
cmfd % diffcof(h,i,j,k) = ONE/(3.0_8*(cmfd % totalxs(h,i,j,k) - &
cmfd % p1scattxs(h,i,j,k)))
else if (ital == 2) then
! Begin loop to get energy out tallies
@ -301,6 +298,46 @@ contains
score_index + IN_TOP)
cmfd % current(12,h,i,j,k) = t % results(RESULT_SUM, 1, &
score_index + OUT_TOP)
else if (ital == 4) then
! Reset all bins to 1
do l = 1, size(t % filter)
call filter_matches(t % filter(l)) % bins % clear()
call filter_matches(t % filter(l)) % bins % push_back(1)
end do
! Set ijk as mesh indices
ijk = (/ i, j, k /)
! Get bin number for mesh indices
filter_matches(i_filter_mesh) % bins % data(1) = &
m % get_bin_from_indices(ijk)
! Apply energy in filter
if (energy_filters) then
filter_matches(i_filter_ein) % bins % data(1) = ng - h + 1
end if
! Apply Legendre filter
filter_matches(i_filter_legendre) % bins % data(1) = 2
! Calculate score index from bins
score_index = 1
do l = 1, size(t % filter)
score_index = score_index + (filter_matches(t % filter(l)) &
% bins % data(1) - 1) * t % stride(l)
end do
! Get p1 scatter rr and convert to p1 scatter xs
cmfd % p1scattxs(h,i,j,k) = &
t % results(RESULT_SUM,1,score_index) / &
cmfd % flux(h,i,j,k)
! Calculate diffusion coefficient
cmfd % diffcof(h,i,j,k) = &
ONE/(3.0_8*(cmfd % totalxs(h,i,j,k) - &
cmfd % p1scattxs(h,i,j,k)))
end if TALLY
end do OUTGROUP

View file

@ -373,7 +373,7 @@ contains
! Determine number of filters
energy_filters = check_for_node(node_mesh, "energy")
n = merge(4, 2, energy_filters)
n = merge(5, 3, energy_filters)
! Extend filters array so we can add CMFD filters
err = openmc_extend_filters(n, i_filt_start, i_filt_end)
@ -414,6 +414,12 @@ contains
err = openmc_filter_set_id(i_filt, filt_id)
err = openmc_meshsurface_filter_set_mesh(i_filt, i_start)
! Add in legendre filter for the P1 tally
i_filt = i_filt + 1
err = openmc_filter_set_type(i_filt, C_CHAR_'legendre' // C_NULL_CHAR)
call openmc_get_filter_next_id(filt_id)
err = openmc_filter_set_id(i_filt, filt_id)
err = openmc_legendre_filter_set_order(i_filt, 1)
! Initialize filters
do i = i_filt_start, i_filt_end
@ -421,7 +427,7 @@ contains
end do
! Allocate tallies
err = openmc_extend_tallies(3, i_start, i_end)
err = openmc_extend_tallies(4, i_start, i_end)
cmfd_tallies => tallies(i_start:i_end)
! Begin loop around tallies
@ -455,7 +461,7 @@ contains
if (i == 1) then
! Set name
t % name = "CMFD flux, total, scatter-1"
t % name = "CMFD flux, total"
! Set tally estimator to analog
t % estimator = ESTIMATOR_ANALOG
@ -473,19 +479,12 @@ contains
deallocate(filter_indices)
! Allocate scoring bins
allocate(t % score_bins(3))
t % n_score_bins = 3
t % n_user_score_bins = 3
! Allocate scattering order data
allocate(t % moment_order(3))
t % moment_order = 0
allocate(t % score_bins(2))
t % n_score_bins = 2
! Set macro_bins
t % score_bins(1) = SCORE_FLUX
t % score_bins(2) = SCORE_TOTAL
t % score_bins(3) = SCORE_SCATTER_N
t % moment_order(3) = 1
else if (i == 2) then
@ -517,11 +516,6 @@ contains
! Allocate macro reactions
allocate(t % score_bins(2))
t % n_score_bins = 2
t % n_user_score_bins = 2
! Allocate scattering order data
allocate(t % moment_order(2))
t % moment_order = 0
! Set macro_bins
t % score_bins(1) = SCORE_NU_SCATTER
@ -537,7 +531,7 @@ contains
! Allocate and set filters
allocate(filter_indices(n_filter))
filter_indices(1) = i_filt_end
filter_indices(1) = i_filt_end - 1
if (energy_filters) then
filter_indices(2) = i_filt_start + 1
end if
@ -547,15 +541,41 @@ contains
! Allocate macro reactions
allocate(t % score_bins(1))
t % n_score_bins = 1
t % n_user_score_bins = 1
! Allocate scattering order data
allocate(t % moment_order(1))
t % moment_order = 0
! Set macro bins
t % score_bins(1) = SCORE_CURRENT
t % type = TALLY_MESH_SURFACE
else if (i == 4) then
! Set name
t % name = "CMFD P1 scatter"
! Set tally estimator to analog
t % estimator = ESTIMATOR_ANALOG
! Set tally type to volume
t % type = TALLY_VOLUME
! Allocate and set filters
n_filter = 2
if (energy_filters) then
n_filter = n_filter + 1
end if
allocate(filter_indices(n_filter))
filter_indices(1) = i_filt_start
filter_indices(2) = i_filt_end
if (energy_filters) then
filter_indices(3) = i_filt_start + 1
end if
err = openmc_tally_set_filters(i_start + i - 1, n_filter, filter_indices)
deallocate(filter_indices)
! Allocate scoring bins
allocate(t % score_bins(1))
t % n_score_bins = 1
! Set macro_bins
t % score_bins(1) = SCORE_SCATTER
end if
! Make CMFD tallies active from the start

View file

@ -21,7 +21,7 @@ module constants
integer, parameter :: VERSION_STATEPOINT(2) = [17, 0]
integer, parameter :: VERSION_PARTICLE_RESTART(2) = [2, 0]
integer, parameter :: VERSION_TRACK(2) = [2, 0]
integer, parameter :: VERSION_SUMMARY(2) = [5, 0]
integer, parameter :: VERSION_SUMMARY(2) = [6, 0]
integer, parameter :: VERSION_VOLUME(2) = [1, 0]
integer, parameter :: VERSION_VOXEL(2) = [1, 0]
integer, parameter :: VERSION_MGXS_LIBRARY(2) = [1, 0]
@ -232,6 +232,10 @@ module constants
MGXS_ISOTROPIC = 1, & ! Isotropically Weighted Data
MGXS_ANGLE = 2 ! Data by Angular Bins
! Flag to denote this was a macroscopic data object
real(8), parameter :: &
MACROSCOPIC_AWR = -TWO
! Fission neutron emission (nu) type
integer, parameter :: &
NU_NONE = 0, & ! No nu values (non-fissionable)
@ -310,50 +314,28 @@ module constants
! Tally score type -- if you change these, make sure you also update the
! _SCORES dictionary in openmc/capi/tally.py
integer, parameter :: N_SCORE_TYPES = 24
integer, parameter :: N_SCORE_TYPES = 16
integer, parameter :: &
SCORE_FLUX = -1, & ! flux
SCORE_TOTAL = -2, & ! total reaction rate
SCORE_SCATTER = -3, & ! scattering rate
SCORE_NU_SCATTER = -4, & ! scattering production rate
SCORE_SCATTER_N = -5, & ! arbitrary scattering moment
SCORE_SCATTER_PN = -6, & ! system for scoring 0th through nth moment
SCORE_NU_SCATTER_N = -7, & ! arbitrary nu-scattering moment
SCORE_NU_SCATTER_PN = -8, & ! system for scoring 0th through nth nu-scatter moment
SCORE_ABSORPTION = -9, & ! absorption rate
SCORE_FISSION = -10, & ! fission rate
SCORE_NU_FISSION = -11, & ! neutron production rate
SCORE_KAPPA_FISSION = -12, & ! fission energy production rate
SCORE_CURRENT = -13, & ! current
SCORE_FLUX_YN = -14, & ! angular moment of flux
SCORE_TOTAL_YN = -15, & ! angular moment of total reaction rate
SCORE_SCATTER_YN = -16, & ! angular flux-weighted scattering moment (0:N)
SCORE_NU_SCATTER_YN = -17, & ! angular flux-weighted nu-scattering moment (0:N)
SCORE_EVENTS = -18, & ! number of events
SCORE_DELAYED_NU_FISSION = -19, & ! delayed neutron production rate
SCORE_PROMPT_NU_FISSION = -20, & ! prompt neutron production rate
SCORE_INVERSE_VELOCITY = -21, & ! flux-weighted inverse velocity
SCORE_FISS_Q_PROMPT = -22, & ! prompt fission Q-value
SCORE_FISS_Q_RECOV = -23, & ! recoverable fission Q-value
SCORE_DECAY_RATE = -24 ! delayed neutron precursor decay rate
SCORE_ABSORPTION = -5, & ! absorption rate
SCORE_FISSION = -6, & ! fission rate
SCORE_NU_FISSION = -7, & ! neutron production rate
SCORE_KAPPA_FISSION = -8, & ! fission energy production rate
SCORE_CURRENT = -9, & ! current
SCORE_EVENTS = -10, & ! number of events
SCORE_DELAYED_NU_FISSION = -11, & ! delayed neutron production rate
SCORE_PROMPT_NU_FISSION = -12, & ! prompt neutron production rate
SCORE_INVERSE_VELOCITY = -13, & ! flux-weighted inverse velocity
SCORE_FISS_Q_PROMPT = -14, & ! prompt fission Q-value
SCORE_FISS_Q_RECOV = -15, & ! recoverable fission Q-value
SCORE_DECAY_RATE = -16 ! delayed neutron precursor decay rate
! Maximum scattering order supported
integer, parameter :: MAX_ANG_ORDER = 10
! Names of *-PN & *-YN scores (MOMENT_STRS) and *-N moment scores
character(*), parameter :: &
MOMENT_STRS(6) = (/ "scatter-p ", &
"nu-scatter-p", &
"flux-y ", &
"total-y ", &
"scatter-y ", &
"nu-scatter-y"/), &
MOMENT_N_STRS(2) = (/ "scatter- ", &
"nu-scatter- "/)
! Location in MOMENT_STRS where the YN data begins
integer, parameter :: YN_LOC = 3
! Tally map bin finding
integer, parameter :: NO_BIN_FOUND = -1

View file

@ -26,14 +26,6 @@ contains
string = "scatter"
case (SCORE_NU_SCATTER)
string = "nu-scatter"
case (SCORE_SCATTER_N)
string = "scatter-n"
case (SCORE_SCATTER_PN)
string = "scatter-pn"
case (SCORE_NU_SCATTER_N)
string = "nu-scatter-n"
case (SCORE_NU_SCATTER_PN)
string = "nu-scatter-pn"
case (SCORE_ABSORPTION)
string = "absorption"
case (SCORE_FISSION)
@ -50,14 +42,6 @@ contains
string = "kappa-fission"
case (SCORE_CURRENT)
string = "current"
case (SCORE_FLUX_YN)
string = "flux-yn"
case (SCORE_TOTAL_YN)
string = "total-yn"
case (SCORE_SCATTER_YN)
string = "scatter-yn"
case (SCORE_NU_SCATTER_YN)
string = "nu-scatter-yn"
case (SCORE_EVENTS)
string = "events"
case (SCORE_INVERSE_VELOCITY)

View file

@ -2194,26 +2194,20 @@ contains
integer :: i ! loop over user-specified tallies
integer :: j ! loop over words
integer :: k ! another loop index
integer :: l ! another loop index
integer :: filter_id ! user-specified identifier for filter
integer :: i_filt ! index in filters array
integer :: i_elem ! index of entry in dictionary
integer :: n ! size of arrays in mesh specification
integer :: n_words ! number of words read
integer :: n_filter ! number of filters
integer :: n_new ! number of new scores to add based on Yn/Pn tally
integer :: n_scores ! number of tot scores after adjusting for Yn/Pn tally
integer :: n_bins ! total new bins for this score
integer :: n_scores ! number of scores
integer :: n_user_trig ! number of user-specified tally triggers
integer :: trig_ind ! index of triggers array for each tally
integer :: user_trig_ind ! index of user-specified triggers for each tally
integer :: i_start, i_end
integer(C_INT) :: err
real(8) :: threshold ! trigger convergence threshold
integer :: n_order ! moment order requested
integer :: n_order_pos ! oosition of Scattering order in score name string
integer :: MT ! user-specified MT for score
integer :: imomstr ! Index of MOMENT_STRS & MOMENT_N_STRS
logical :: file_exists ! does tallies.xml file exist?
integer, allocatable :: temp_filter(:) ! temporary filter indices
character(MAX_LINE_LEN) :: filename
@ -2541,107 +2535,22 @@ contains
allocate(sarray(n_words))
call get_node_array(node_tal, "scores", sarray)
! Before we can allocate storage for scores, we must determine the
! number of additional scores required due to the moment scores
! (i.e., scatter-p#, flux-y#)
n_new = 0
! Append the score to the list of possible trigger scores
do j = 1, n_words
sarray(j) = to_lower(sarray(j))
! Find if scores(j) is of the form 'moment-p' or 'moment-y' present in
! MOMENT_STRS(:)
! If so, check the order, store if OK, then reset the number to 'n'
score_name = trim(sarray(j))
! Append the score to the list of possible trigger scores
if (trigger_on) call trigger_scores % set(trim(score_name), j)
do imomstr = 1, size(MOMENT_STRS)
if (starts_with(score_name,trim(MOMENT_STRS(imomstr)))) then
n_order_pos = scan(score_name,'0123456789')
n_order = int(str_to_int( &
score_name(n_order_pos:(len_trim(score_name)))),4)
if (n_order > MAX_ANG_ORDER) then
! User requested too many orders; throw a warning and set to the
! maximum order.
! The above scheme will essentially take the absolute value
if (master) call warning("Invalid scattering order of " &
// trim(to_str(n_order)) // " requested. Setting to the &
&maximum permissible value, " &
// trim(to_str(MAX_ANG_ORDER)))
n_order = MAX_ANG_ORDER
sarray(j) = trim(MOMENT_STRS(imomstr)) &
// trim(to_str(MAX_ANG_ORDER))
end if
! Find total number of bins for this case
if (imomstr >= YN_LOC) then
n_bins = (n_order + 1)**2
else
n_bins = n_order + 1
end if
! We subtract one since n_words already included
n_new = n_new + n_bins - 1
exit
end if
end do
end do
n_scores = n_words + n_new
n_scores = n_words
! Allocate score storage accordingly
allocate(t % score_bins(n_scores))
allocate(t % moment_order(n_scores))
t % moment_order = 0
j = 0
do l = 1, n_words
j = j + 1
! Get the input string in scores(l) but if score is one of the moment
! scores then strip off the n and store it as an integer to be used
! later. Then perform the select case on this modified (number
! removed) string
n_order = -1
score_name = sarray(l)
do imomstr = 1, size(MOMENT_STRS)
if (starts_with(score_name,trim(MOMENT_STRS(imomstr)))) then
n_order_pos = scan(score_name,'0123456789')
n_order = int(str_to_int( &
score_name(n_order_pos:(len_trim(score_name)))),4)
if (n_order > MAX_ANG_ORDER) then
! User requested too many orders; throw a warning and set to the
! maximum order.
! The above scheme will essentially take the absolute value
n_order = MAX_ANG_ORDER
end if
score_name = trim(MOMENT_STRS(imomstr)) // "n"
! Find total number of bins for this case
if (imomstr >= YN_LOC) then
n_bins = (n_order + 1)**2
else
n_bins = n_order + 1
end if
exit
end if
end do
! Now check the Moment_N_Strs, but only if we werent successful above
if (imomstr > size(MOMENT_STRS)) then
do imomstr = 1, size(MOMENT_N_STRS)
if (starts_with(score_name,trim(MOMENT_N_STRS(imomstr)))) then
n_order_pos = scan(score_name,'0123456789')
n_order = int(str_to_int( &
score_name(n_order_pos:(len_trim(score_name)))),4)
if (n_order > MAX_ANG_ORDER) then
! User requested too many orders; throw a warning and set to the
! maximum order.
! The above scheme will essentially take the absolute value
if (master) call warning("Invalid scattering order of " &
// trim(to_str(n_order)) // " requested. Setting to &
&the maximum permissible value, " &
// trim(to_str(MAX_ANG_ORDER)))
n_order = MAX_ANG_ORDER
end if
score_name = trim(MOMENT_N_STRS(imomstr)) // "n"
exit
end if
end do
end if
! Check the validity of the scores and their filters
do j = 1, n_scores
score_name = sarray(j)
! Check if delayed group filter is used with any score besides
! delayed-nu-fission or decay-rate
@ -2652,23 +2561,6 @@ contains
&delayedgroup filter.")
end if
! Check to see if the mu filter is applied and if that makes sense.
if ((.not. starts_with(score_name,'scatter')) .and. &
(.not. starts_with(score_name,'nu-scatter'))) then
if (t % find_filter(FILTER_MU) > 0) then
call fatal_error("Cannot tally " // trim(score_name) //" with a &
&change of angle (mu) filter.")
end if
! Also check to see if this is a legendre expansion or not.
! If so, we can accept this score and filter combo for p0, but not
! elsewhere.
else if (n_order > 0) then
if (t % find_filter(FILTER_MU) > 0) then
call fatal_error("Cannot tally " // trim(score_name) //" with a &
&change of angle (mu) filter unless order is 0.")
end if
end if
select case (trim(score_name))
case ('flux')
! Prohibit user from tallying flux for an individual nuclide
@ -2683,22 +2575,6 @@ contains
&filter.")
end if
case ('flux-yn')
! Prohibit user from tallying flux for an individual nuclide
if (.not. (t % n_nuclide_bins == 1 .and. &
t % nuclide_bins(1) == -1)) then
call fatal_error("Cannot tally flux for an individual nuclide.")
end if
if (t % find_filter(FILTER_ENERGYOUT) > 0) then
call fatal_error("Cannot tally flux with an outgoing energy &
&filter.")
end if
t % score_bins(j : j + n_bins - 1) = SCORE_FLUX_YN
t % moment_order(j : j + n_bins - 1) = n_order
j = j + n_bins - 1
case ('total', '(n,total)')
t % score_bins(j) = SCORE_TOTAL
if (t % find_filter(FILTER_ENERGYOUT) > 0) then
@ -2706,18 +2582,13 @@ contains
&outgoing energy filter.")
end if
case ('total-yn')
if (t % find_filter(FILTER_ENERGYOUT) > 0) then
call fatal_error("Cannot tally total reaction rate with an &
&outgoing energy filter.")
end if
t % score_bins(j : j + n_bins - 1) = SCORE_TOTAL_YN
t % moment_order(j : j + n_bins - 1) = n_order
j = j + n_bins - 1
case ('scatter')
t % score_bins(j) = SCORE_SCATTER
if (t % find_filter(FILTER_ENERGYOUT) > 0 .or. &
t % find_filter(FILTER_LEGENDRE) > 0) then
! Set tally estimator to analog
t % estimator = ESTIMATOR_ANALOG
end if
case ('nu-scatter')
t % score_bins(j) = SCORE_NU_SCATTER
@ -2727,53 +2598,14 @@ contains
! necessary)
if (run_CE) then
t % estimator = ESTIMATOR_ANALOG
else
if (t % find_filter(FILTER_ENERGYOUT) > 0 .or. &
t % find_filter(FILTER_LEGENDRE) > 0) then
! Set tally estimator to analog
t % estimator = ESTIMATOR_ANALOG
end if
end if
case ('scatter-n')
t % score_bins(j) = SCORE_SCATTER_N
t % moment_order(j) = n_order
t % estimator = ESTIMATOR_ANALOG
case ('nu-scatter-n')
t % score_bins(j) = SCORE_NU_SCATTER_N
t % moment_order(j) = n_order
t % estimator = ESTIMATOR_ANALOG
case ('scatter-pn')
t % estimator = ESTIMATOR_ANALOG
! Setup P0:Pn
t % score_bins(j : j + n_bins - 1) = SCORE_SCATTER_PN
t % moment_order(j : j + n_bins - 1) = n_order
j = j + n_bins - 1
case ('nu-scatter-pn')
t % estimator = ESTIMATOR_ANALOG
! Setup P0:Pn
t % score_bins(j : j + n_bins - 1) = SCORE_NU_SCATTER_PN
t % moment_order(j : j + n_bins - 1) = n_order
j = j + n_bins - 1
case ('scatter-yn')
t % estimator = ESTIMATOR_ANALOG
! Setup P0:Pn
t % score_bins(j : j + n_bins - 1) = SCORE_SCATTER_YN
t % moment_order(j : j + n_bins - 1) = n_order
j = j + n_bins - 1
case ('nu-scatter-yn')
t % estimator = ESTIMATOR_ANALOG
! Setup P0:Pn
t % score_bins(j : j + n_bins - 1) = SCORE_NU_SCATTER_YN
t % moment_order(j : j + n_bins - 1) = n_order
j = j + n_bins - 1
case('transport')
call fatal_error("Transport score no longer supported for tallies, &
&please remove")
case ('n1n')
call fatal_error("n1n score no longer supported for tallies, &
&please remove")
case ('n2n', '(n,2n)')
t % score_bins(j) = N_2N
t % depletion_rx = .true.
@ -2937,6 +2769,14 @@ contains
t % score_bins(j) = N_DA
case default
! First look for deprecated scores
if (starts_with(trim(score_name), 'scatter-') .or. &
starts_with(trim(score_name), 'nu-scatter-') .or. &
starts_with(trim(score_name), 'total-y') .or. &
starts_with(trim(score_name), 'flux-y')) then
call fatal_error(trim(score_name) // " is no longer available.")
end if
! Assume that user has specified an MT number
MT = int(str_to_int(score_name))
@ -2945,14 +2785,12 @@ contains
if (MT > 1) then
t % score_bins(j) = MT
else
call fatal_error("Invalid MT on <scores>: " &
// trim(sarray(l)))
call fatal_error("Invalid MT on <scores>: " // trim(score_name))
end if
else
! Specified score was not an integer
call fatal_error("Unknown scoring function: " &
// trim(sarray(l)))
call fatal_error("Unknown scoring function: " // trim(score_name))
end if
end select
@ -2967,35 +2805,19 @@ contains
end do
t % n_score_bins = n_scores
t % n_user_score_bins = n_words
! Deallocate temporary string array of scores
deallocate(sarray)
! Check that no duplicate scores exist
j = 1
do while (j < n_scores)
! Determine number of bins for scores with expansions
n_order = t % moment_order(j)
select case (t % score_bins(j))
case (SCORE_SCATTER_PN, SCORE_NU_SCATTER_PN)
n_bins = n_order + 1
case (SCORE_FLUX_YN, SCORE_TOTAL_YN, SCORE_SCATTER_YN, &
SCORE_NU_SCATTER_YN)
n_bins = (n_order + 1)**2
case default
n_bins = 1
end select
do k = j + n_bins, n_scores
if (t % score_bins(j) == t % score_bins(k) .and. &
t % moment_order(j) == t % moment_order(k)) then
do j = 1, n_scores - 1
do k = j + 1, n_scores
if (t % score_bins(j) == t % score_bins(k)) then
call fatal_error("Duplicate score of type '" // trim(&
reaction_name(t % score_bins(j))) // "' found in tally " &
// trim(to_str(t % id)))
end if
end do
j = j + n_bins
end do
else
call fatal_error("No <scores> specified on tally " &

View file

@ -4,7 +4,7 @@ module mgxs_header
use, intrinsic :: ISO_C_BINDING
use algorithm, only: find, sort
use constants, only: MAX_WORD_LEN, ZERO, ONE, TWO, PI
use constants, only: MAX_WORD_LEN, ZERO, ONE, TWO, PI, MACROSCOPIC_AWR
use error, only: fatal_error
use hdf5_interface
use material_header, only: material
@ -264,7 +264,7 @@ contains
if (attribute_exists(xs_id, "atomic_weight_ratio")) then
call read_attribute(this % awr, xs_id, "atomic_weight_ratio")
else
this % awr = -ONE
this % awr = MACROSCOPIC_AWR
end if
! Determine temperatures available
@ -392,9 +392,9 @@ contains
! Store the dimensionality of the data in order_dim.
! For Legendre data, we usually refer to it as Pn where n is the order.
! However Pn has n+1 sets of points (since you need to
! the count the P0 moment). Adjust for that. Histogram and Tabular
! formats dont need this adjustment.
! However Pn has n+1 sets of points (since you need to count the P0
! moment). Adjust for that. Histogram and Tabular formats dont need this
! adjustment.
if (this % scatter_format == ANGLE_LEGENDRE) then
order_dim = order_dim + 1
else

View file

@ -665,14 +665,11 @@ contains
integer :: j ! level in tally hierarchy
integer :: k ! loop index for scoring bins
integer :: n ! loop index for nuclides
integer :: l ! loop index for user scores
integer :: h ! loop index for tally filters
integer :: indent ! number of spaces to preceed output
integer :: filter_index ! index in results array for filters
integer :: score_index ! scoring bin index
integer :: i_nuclide ! index in nuclides array
integer :: n_order ! loop index for moment orders
integer :: nm_order ! loop index for Ynm moment orders
integer :: unit_tally ! tallies.out file unit
integer :: nr ! number of realizations
real(8) :: t_value ! t-values for confidence intervals
@ -699,14 +696,6 @@ contains
score_names(abs(SCORE_NU_FISSION)) = "Nu-Fission Rate"
score_names(abs(SCORE_KAPPA_FISSION)) = "Kappa-Fission Rate"
score_names(abs(SCORE_EVENTS)) = "Events"
score_names(abs(SCORE_FLUX_YN)) = "Flux Moment"
score_names(abs(SCORE_TOTAL_YN)) = "Total Reaction Rate Moment"
score_names(abs(SCORE_SCATTER_N)) = "Scattering Rate Moment"
score_names(abs(SCORE_SCATTER_PN)) = "Scattering Rate Moment"
score_names(abs(SCORE_SCATTER_YN)) = "Scattering Rate Moment"
score_names(abs(SCORE_NU_SCATTER_N)) = "Scattering Prod. Rate Moment"
score_names(abs(SCORE_NU_SCATTER_PN)) = "Scattering Prod. Rate Moment"
score_names(abs(SCORE_NU_SCATTER_YN)) = "Scattering Prod. Rate Moment"
score_names(abs(SCORE_DECAY_RATE)) = "Decay Rate"
score_names(abs(SCORE_DELAYED_NU_FISSION)) = "Delayed-Nu-Fission Rate"
score_names(abs(SCORE_PROMPT_NU_FISSION)) = "Prompt-Nu-Fission Rate"
@ -860,60 +849,20 @@ contains
end if
indent = indent + 2
k = 0
do l = 1, t % n_user_score_bins
k = k + 1
do k = 1, t % n_score_bins
score_index = score_index + 1
associate(r => t % results(RESULT_SUM:RESULT_SUM_SQ, :, :))
select case(t % score_bins(k))
case (SCORE_SCATTER_N, SCORE_NU_SCATTER_N)
score_name = 'P' // trim(to_str(t % moment_order(k))) // " " // &
score_names(abs(t % score_bins(k)))
x(:) = mean_stdev(r(:, score_index, filter_index), nr)
write(UNIT=unit_tally, FMT='(1X,2A,1X,A,"+/- ",A)') &
repeat(" ", indent), score_name, to_str(x(1)), &
trim(to_str(t_value * x(2)))
case (SCORE_SCATTER_PN, SCORE_NU_SCATTER_PN)
score_index = score_index - 1
do n_order = 0, t % moment_order(k)
score_index = score_index + 1
score_name = 'P' // trim(to_str(n_order)) // " " //&
score_names(abs(t % score_bins(k)))
x(:) = mean_stdev(r(:, score_index, filter_index), nr)
write(UNIT=unit_tally, FMT='(1X,2A,1X,A,"+/- ",A)') &
repeat(" ", indent), score_name, &
to_str(x(1)), trim(to_str(t_value * x(2)))
end do
k = k + t % moment_order(k)
case (SCORE_SCATTER_YN, SCORE_NU_SCATTER_YN, SCORE_FLUX_YN, &
SCORE_TOTAL_YN)
score_index = score_index - 1
do n_order = 0, t % moment_order(k)
do nm_order = -n_order, n_order
score_index = score_index + 1
score_name = 'Y' // trim(to_str(n_order)) // ',' // &
trim(to_str(nm_order)) // " " &
// score_names(abs(t % score_bins(k)))
x(:) = mean_stdev(r(:, score_index, filter_index), nr)
write(UNIT=unit_tally, FMT='(1X,2A,1X,A,"+/- ",A)') &
repeat(" ", indent), score_name, &
to_str(x(1)), trim(to_str(t_value * x(2)))
end do
end do
k = k + (t % moment_order(k) + 1)**2 - 1
case default
if (t % score_bins(k) > 0) then
score_name = reaction_name(t % score_bins(k))
else
score_name = score_names(abs(t % score_bins(k)))
end if
x(:) = mean_stdev(r(:, score_index, filter_index), nr)
write(UNIT=unit_tally, FMT='(1X,2A,1X,A,"+/- ",A)') &
repeat(" ", indent), score_name, &
to_str(x(1)), trim(to_str(t_value * x(2)))
end select
if (t % score_bins(k) > 0) then
score_name = reaction_name(t % score_bins(k))
else
score_name = score_names(abs(t % score_bins(k)))
end if
x(:) = mean_stdev(r(:, score_index, filter_index), nr)
write(UNIT=unit_tally, FMT='(1X,2A,1X,A,"+/- ",A)') &
repeat(" ", indent), score_name, &
to_str(x(1)), trim(to_str(t_value * x(2)))
end associate
end do
indent = indent - 2

View file

@ -64,8 +64,6 @@ contains
integer :: i, j, k
integer :: i_xs
integer :: n_order ! loop index for moment orders
integer :: nm_order ! loop index for Ynm moment orders
integer, allocatable :: id_array(:)
integer(HID_T) :: file_id
integer(HID_T) :: cmfd_group, tallies_group, tally_group, meshes_group, &
@ -336,42 +334,9 @@ contains
str_array(j) = reaction_name(tally % score_bins(j))
end do
call write_dataset(tally_group, "score_bins", str_array)
call write_dataset(tally_group, "n_user_score_bins", &
tally % n_user_score_bins)
deallocate(str_array)
! Write explicit moment order strings for each score bin
k = 1
allocate(str_array(tally % n_score_bins))
MOMENT_LOOP: do j = 1, tally % n_user_score_bins
select case(tally % score_bins(k))
case (SCORE_SCATTER_N, SCORE_NU_SCATTER_N)
str_array(k) = trim(to_str(tally % moment_order(k)))
k = k + 1
case (SCORE_SCATTER_PN, SCORE_NU_SCATTER_PN)
do n_order = 0, tally % moment_order(k)
str_array(k) = trim(to_str(n_order))
k = k + 1
end do
case (SCORE_SCATTER_YN, SCORE_NU_SCATTER_YN, SCORE_FLUX_YN, &
SCORE_TOTAL_YN)
do n_order = 0, tally % moment_order(k)
do nm_order = -n_order, n_order
str_array(k) = 'Y' // trim(to_str(n_order)) // ',' // &
trim(to_str(nm_order))
k = k + 1
end do
end do
case default
str_array(k) = ''
k = k + 1
end select
end do MOMENT_LOOP
call write_dataset(tally_group, "moment_orders", str_array)
deallocate(str_array)
call close_group(tally_group)
end associate
end do TALLY_METADATA

View file

@ -75,34 +75,81 @@ contains
subroutine write_nuclides(file_id)
integer(HID_T), intent(in) :: file_id
integer(HID_T) :: nuclide_group
integer(HID_T) :: macro_group
integer :: i
character(12), allocatable :: nucnames(:)
character(12), allocatable :: nuc_names(:)
character(12), allocatable :: macro_names(:)
real(8), allocatable :: awrs(:)
integer :: num_nuclides
integer :: num_macros
integer :: j
integer :: k
! Write useful data from nuclide objects
nuclide_group = create_group(file_id, "nuclides")
call write_attribute(nuclide_group, "n_nuclides", n_nuclides)
! Find how many of these nuclides are macroscopic objects
if (run_CE) then
! Then none are macroscopic
num_nuclides = n_nuclides
num_macros = 0
else
num_nuclides = 0
num_macros = 0
do i = 1, n_nuclides
if (nuclides_MG(i) % obj % awr /= MACROSCOPIC_AWR) then
num_nuclides = num_nuclides + 1
else
num_macros = num_macros + 1
end if
end do
end if
! Build array of nuclide names and awrs
allocate(nucnames(n_nuclides))
allocate(awrs(n_nuclides))
! Build array of nuclide names and awrs while only sorting nuclides from
! macroscopics
if (num_nuclides > 0) then
allocate(nuc_names(num_nuclides))
allocate(awrs(num_nuclides))
end if
if (num_macros > 0) then
allocate(macro_names(num_macros))
end if
j = 1
k = 1
do i = 1, n_nuclides
if (run_CE) then
nucnames(i) = nuclides(i) % name
nuc_names(i) = nuclides(i) % name
awrs(i) = nuclides(i) % awr
else
nucnames(i) = nuclides_MG(i) % obj % name
awrs(i) = nuclides_MG(i) % obj % awr
if (nuclides_MG(i) % obj % awr /= MACROSCOPIC_AWR) then
nuc_names(j) = nuclides_MG(i) % obj % name
awrs(j) = nuclides_MG(i) % obj % awr
j = j + 1
else
macro_names(k) = nuclides_MG(i) % obj % name
k = k + 1
end if
end if
end do
nuclide_group = create_group(file_id, "nuclides")
call write_attribute(nuclide_group, "n_nuclides", num_nuclides)
macro_group = create_group(file_id, "macroscopics")
call write_attribute(macro_group, "n_macroscopics", num_macros)
! Write nuclide names and awrs
call write_dataset(nuclide_group, "names", nucnames)
call write_dataset(nuclide_group, "awrs", awrs)
if (num_nuclides > 0) then
! Write useful data from nuclide objects
call write_dataset(nuclide_group, "names", nuc_names)
call write_dataset(nuclide_group, "awrs", awrs)
end if
if (num_macros > 0) then
! Write useful data from macroscopic objects
call write_dataset(macro_group, "names", macro_names)
end if
call close_group(nuclide_group)
call close_group(macro_group)
deallocate(nucnames, awrs)
if (allocated(nuc_names)) deallocate(nuc_names, awrs)
if (allocated(macro_names)) deallocate(macro_names)
end subroutine write_nuclides
@ -369,7 +416,13 @@ contains
integer :: i
integer :: j
character(20), allocatable :: nucnames(:)
integer :: k
integer :: n
character(20), allocatable :: nuc_names(:)
character(20), allocatable :: macro_names(:)
real(8), allocatable :: nuc_densities(:)
integer :: num_nuclides
integer :: num_macros
integer(HID_T) :: materials_group
integer(HID_T) :: material_group
type(Material), pointer :: m
@ -397,24 +450,67 @@ contains
! Write atom density with units
call write_dataset(material_group, "atom_density", m % density)
! Copy ZAID for each nuclide to temporary array
allocate(nucnames(m%n_nuclides))
do j = 1, m%n_nuclides
if (run_CE) then
nucnames(j) = nuclides(m%nuclide(j))%name
else
nucnames(j) = nuclides_MG(m%nuclide(j))%obj%name
if (run_CE) then
num_nuclides = m % n_nuclides
num_macros = 0
else
! Find the number of macroscopic and nuclide data in this material
num_nuclides = 0
num_macros = 0
do j = 1, m % n_nuclides
if (nuclides_MG(m % nuclide(j)) % obj % awr /= MACROSCOPIC_AWR) then
num_nuclides = num_nuclides + 1
else
num_macros = num_macros + 1
end if
end do
end if
! Copy ZAID or macro name for each nuclide to temporary array
if (num_nuclides > 0) then
allocate(nuc_names(num_nuclides))
allocate(nuc_densities(num_nuclides))
end if
if (run_CE) then
do j = 1, m % n_nuclides
nuc_names(j) = nuclides(m%nuclide(j))%name
nuc_densities(j) = m % atom_density(j)
end do
else
if (num_macros > 0) then
allocate(macro_names(num_macros))
end if
end do
k = 1
n = 1
do j = 1, m % n_nuclides
if (nuclides_MG(m % nuclide(j)) % obj % awr /= MACROSCOPIC_AWR) then
nuc_names(k) = nuclides_MG(m % nuclide(j)) % obj % name
nuc_densities(k) = m % atom_density(j)
k = k + 1
else
macro_names(n) = nuclides_MG(m % nuclide(j)) % obj % name
n = n + 1
end if
end do
end if
! Write temporary array to 'nuclides'
call write_dataset(material_group, "nuclides", nucnames)
if (num_nuclides > 0) then
call write_dataset(material_group, "nuclides", nuc_names)
! Deallocate temporary array
deallocate(nuc_names)
! Write atom densities
call write_dataset(material_group, "nuclide_densities", nuc_densities)
deallocate(nuc_densities)
end if
! Deallocate temporary array
deallocate(nucnames)
! Write atom densities
call write_dataset(material_group, "nuclide_densities", m%atom_density)
! Write temporary array to 'macroscopics'
if (num_macros > 0) then
call write_dataset(material_group, "macroscopics", macro_names)
! Deallocate temporary array
deallocate(macro_names)
end if
if (m%n_sab > 0) then
call write_dataset(material_group, "sab_names", m%sab_names)

View file

@ -84,7 +84,6 @@ contains
integer :: i ! loop index for scoring bins
integer :: l ! loop index for nuclides in material
integer :: m ! loop index for reactions
integer :: q ! loop index for scoring bins
integer :: i_temp ! temperature index
integer :: i_nuc ! index in nuclides array (from material)
integer :: i_energy ! index in nuclide energy grid
@ -104,9 +103,7 @@ contains
! Pre-collision energy of particle
E = p % last_E
i = 0
SCORE_LOOP: do q = 1, t % n_user_score_bins
i = i + 1
SCORE_LOOP: do i = 1, t % n_score_bins
! determine what type of score bin
score_bin = t % score_bins(i)
@ -120,7 +117,7 @@ contains
select case(score_bin)
case (SCORE_FLUX, SCORE_FLUX_YN)
case (SCORE_FLUX)
if (t % estimator == ESTIMATOR_ANALOG) then
! All events score to a flux bin. We actually use a collision
! estimator in place of an analog one since there is no way to count
@ -140,7 +137,7 @@ contains
end if
case (SCORE_TOTAL, SCORE_TOTAL_YN)
case (SCORE_TOTAL)
if (t % estimator == ESTIMATOR_ANALOG) then
! All events will score to the total reaction rate. We can just
! use the weight of the particle entering the collision as the
@ -187,7 +184,7 @@ contains
end if
case (SCORE_SCATTER, SCORE_SCATTER_N)
case (SCORE_SCATTER)
if (t % estimator == ESTIMATOR_ANALOG) then
! Skip any event where the particle didn't scatter
if (p % event /= EVENT_SCATTER) cycle SCORE_LOOP
@ -197,7 +194,6 @@ contains
score = p % last_wgt * flux
else
! Note SCORE_SCATTER_N not available for tracklength/collision.
if (i_nuclide > 0) then
score = (micro_xs(i_nuclide) % total &
- micro_xs(i_nuclide) % absorption) * atom_density * flux
@ -207,33 +203,7 @@ contains
end if
case (SCORE_SCATTER_PN)
! Only analog estimators are available.
! Skip any event where the particle didn't scatter
if (p % event /= EVENT_SCATTER) then
i = i + t % moment_order(i)
cycle SCORE_LOOP
end if
! Since only scattering events make it here, again we can use
! the weight entering the collision as the estimator for the
! reaction rate
score = p % last_wgt * flux
case (SCORE_SCATTER_YN)
! Only analog estimators are available.
! Skip any event where the particle didn't scatter
if (p % event /= EVENT_SCATTER) then
i = i + (t % moment_order(i) + 1)**2 - 1
cycle SCORE_LOOP
end if
! Since only scattering events make it here, again we can use
! the weight entering the collision as the estimator for the
! reaction rate
score = p % last_wgt * flux
case (SCORE_NU_SCATTER, SCORE_NU_SCATTER_N)
case (SCORE_NU_SCATTER)
! Only analog estimators are available.
! Skip any event where the particle didn't scatter
if (p % event /= EVENT_SCATTER) cycle SCORE_LOOP
@ -256,58 +226,6 @@ contains
end if
case (SCORE_NU_SCATTER_PN)
! Only analog estimators are available.
! Skip any event where the particle didn't scatter
if (p % event /= EVENT_SCATTER) then
i = i + t % moment_order(i)
cycle SCORE_LOOP
end if
! For scattering production, we need to use the pre-collision
! weight times the yield as the estimate for the number of
! neutrons exiting a reaction with neutrons in the exit channel
if (p % event_MT == ELASTIC .or. p % event_MT == N_LEVEL .or. &
(p % event_MT >= N_N1 .and. p % event_MT <= N_NC)) then
! Don't waste time on very common reactions we know have
! multiplicities of one.
score = p % last_wgt * flux
else
m = nuclides(p % event_nuclide) % reaction_index(p % event_MT)
! Get yield and apply to score
associate (rxn => nuclides(p % event_nuclide) % reactions(m))
score = p % last_wgt * flux &
* rxn % products(1) % yield % evaluate(E)
end associate
end if
case (SCORE_NU_SCATTER_YN)
! Only analog estimators are available.
! Skip any event where the particle didn't scatter
if (p % event /= EVENT_SCATTER) then
i = i + (t % moment_order(i) + 1)**2 - 1
cycle SCORE_LOOP
end if
! For scattering production, we need to use the pre-collision
! weight times the yield as the estimate for the number of
! neutrons exiting a reaction with neutrons in the exit channel
if (p % event_MT == ELASTIC .or. p % event_MT == N_LEVEL .or. &
(p % event_MT >= N_N1 .and. p % event_MT <= N_NC)) then
! Don't waste time on very common reactions we know have
! multiplicities of one.
score = p % last_wgt * flux
else
m = nuclides(p % event_nuclide) % reaction_index(p % event_MT)
! Get yield and apply to score
associate (rxn => nuclides(p%event_nuclide)%reactions(m))
score = p % last_wgt * flux &
* rxn % products(1) % yield % evaluate(E)
end associate
end if
case (SCORE_ABSORPTION)
if (t % estimator == ESTIMATOR_ANALOG) then
if (survival_biasing) then
@ -1281,8 +1199,9 @@ contains
!#########################################################################
! Expand score if necessary and add to tally results.
call expand_and_score(p, t, score_index, filter_index, score_bin, &
score, i)
!$omp atomic
t % results(RESULT_VALUE, score_index, filter_index) = &
t % results(RESULT_VALUE, score_index, filter_index) + score
end do SCORE_LOOP
end subroutine score_general_ce
@ -1359,7 +1278,7 @@ contains
end if
i = 0
SCORE_LOOP: do q = 1, t % n_user_score_bins
SCORE_LOOP: do q = 1, t % n_score_bins
i = i + 1
! determine what type of score bin
@ -1374,7 +1293,7 @@ contains
select case(score_bin)
case (SCORE_FLUX, SCORE_FLUX_YN)
case (SCORE_FLUX)
if (t % estimator == ESTIMATOR_ANALOG) then
! All events score to a flux bin. We actually use a collision
! estimator in place of an analog one since there is no way to count
@ -1395,7 +1314,7 @@ contains
end if
case (SCORE_TOTAL, SCORE_TOTAL_YN)
case (SCORE_TOTAL)
if (t % estimator == ESTIMATOR_ANALOG) then
! All events will score to the total reaction rate. We can just
! use the weight of the particle entering the collision as the
@ -1456,15 +1375,10 @@ contains
end if
case (SCORE_SCATTER, SCORE_SCATTER_N, SCORE_SCATTER_PN, SCORE_SCATTER_YN)
case (SCORE_SCATTER)
if (t % estimator == ESTIMATOR_ANALOG) then
! Skip any event where the particle didn't scatter
if (p % event /= EVENT_SCATTER) then
if (score_bin == SCORE_SCATTER_PN) then
i = i + t % moment_order(i)
else if (score_bin == SCORE_SCATTER_YN) then
i = i + (t % moment_order(i) + 1)**2 - 1
end if
cycle SCORE_LOOP
end if
@ -1485,7 +1399,6 @@ contains
end if
else
! Note SCORE_SCATTER_*N not available for tracklength/collision.
if (i_nuclide > 0) then
score = atom_density * flux * &
nucxs % get_xs('scatter/mult', p_g, UVW=p_uvw)
@ -1498,16 +1411,10 @@ contains
end if
case (SCORE_NU_SCATTER, SCORE_NU_SCATTER_N, SCORE_NU_SCATTER_PN, &
SCORE_NU_SCATTER_YN)
case (SCORE_NU_SCATTER)
if (t % estimator == ESTIMATOR_ANALOG) then
! Skip any event where the particle didn't scatter
if (p % event /= EVENT_SCATTER) then
if (score_bin == SCORE_NU_SCATTER_PN) then
i = i + t % moment_order(i)
else if (score_bin == SCORE_NU_SCATTER_YN) then
i = i + (t % moment_order(i) + 1)**2 - 1
end if
cycle SCORE_LOOP
end if
@ -1528,7 +1435,6 @@ contains
end if
else
! Note SCORE_NU_SCATTER_*N not available for tracklength/collision.
if (i_nuclide > 0) then
score = nucxs % get_xs('scatter', p_g, UVW=p_uvw) * &
atom_density * flux
@ -2077,124 +1983,15 @@ contains
!#########################################################################
! Expand score if necessary and add to tally results.
call expand_and_score(p, t, score_index, filter_index, score_bin, &
score, i)
!$omp atomic
t % results(RESULT_VALUE, score_index, filter_index) = &
t % results(RESULT_VALUE, score_index, filter_index) + score
end do SCORE_LOOP
nullify(matxs, nucxs)
end subroutine score_general_mg
!===============================================================================
! EXPAND_AND_SCORE takes a previously determined score value and adjusts it
! if necessary (for functional expansion weighting), and then adds the resultant
! value to the tally results array.
!===============================================================================
subroutine expand_and_score(p, t, score_index, filter_index, score_bin, &
score, i)
type(Particle), intent(in) :: p
type(TallyObject), intent(inout) :: t
integer, intent(inout) :: score_index
integer, intent(in) :: filter_index ! for % results
integer, intent(in) :: score_bin ! score of concern
real(8), intent(inout) :: score ! data to score
integer, intent(inout) :: i ! Working index
integer :: num_nm ! Number of N,M orders in harmonic
integer :: n ! Moment loop index
real(8) :: uvw(3)
select case(score_bin)
case (SCORE_SCATTER_N, SCORE_NU_SCATTER_N)
! Find the scattering order for a singly requested moment, and
! store its moment contribution.
if (t % moment_order(i) == 1) then
score = score * p % mu ! avoid function call overhead
else
score = score * calc_pn(t % moment_order(i), p % mu)
endif
!$omp atomic
t % results(RESULT_VALUE, score_index, filter_index) = &
t % results(RESULT_VALUE, score_index, filter_index) + score
case(SCORE_SCATTER_YN, SCORE_NU_SCATTER_YN)
score_index = score_index - 1
num_nm = 1
! Find the order for a collection of requested moments
! and store the moment contribution of each
do n = 0, t % moment_order(i)
! determine scoring bin index
score_index = score_index + num_nm
! Update number of total n,m bins for this n (m = [-n: n])
num_nm = 2 * n + 1
! multiply score by the angular flux moments and store
!$omp critical (score_general_scatt_yn)
t % results(RESULT_VALUE, score_index: score_index + num_nm - 1, &
filter_index) = t % results(RESULT_VALUE, &
score_index: score_index + num_nm - 1, filter_index) &
+ score * calc_pn(n, p % mu) * calc_rn(n, p % last_uvw)
!$omp end critical (score_general_scatt_yn)
end do
i = i + (t % moment_order(i) + 1)**2 - 1
case(SCORE_FLUX_YN, SCORE_TOTAL_YN)
score_index = score_index - 1
num_nm = 1
if (t % estimator == ESTIMATOR_ANALOG .or. &
t % estimator == ESTIMATOR_COLLISION) then
uvw = p % last_uvw
else if (t % estimator == ESTIMATOR_TRACKLENGTH) then
uvw = p % coord(1) % uvw
end if
! Find the order for a collection of requested moments
! and store the moment contribution of each
do n = 0, t % moment_order(i)
! determine scoring bin index
score_index = score_index + num_nm
! Update number of total n,m bins for this n (m = [-n: n])
num_nm = 2 * n + 1
! multiply score by the angular flux moments and store
!$omp critical (score_general_flux_tot_yn)
t % results(RESULT_VALUE, score_index: score_index + num_nm - 1, &
filter_index) = t % results(RESULT_VALUE, &
score_index: score_index + num_nm - 1, filter_index) &
+ score * calc_rn(n, uvw)
!$omp end critical (score_general_flux_tot_yn)
end do
i = i + (t % moment_order(i) + 1)**2 - 1
case (SCORE_SCATTER_PN, SCORE_NU_SCATTER_PN)
score_index = score_index - 1
! Find the scattering order for a collection of requested moments
! and store the moment contribution of each
do n = 0, t % moment_order(i)
! determine scoring bin index
score_index = score_index + 1
! get the score and tally it
!$omp atomic
t % results(RESULT_VALUE, score_index, filter_index) = &
t % results(RESULT_VALUE, score_index, filter_index) &
+ score * calc_pn(n, p % mu)
end do
i = i + t % moment_order(i)
case default
!$omp atomic
t % results(RESULT_VALUE, score_index, filter_index) = &
t % results(RESULT_VALUE, score_index, filter_index) + score
end select
end subroutine expand_and_score
!===============================================================================
! SCORE_ALL_NUCLIDES tallies individual nuclide reaction rates specifically when
! the user requests <nuclides>all</nuclides>.
@ -3134,7 +2931,7 @@ contains
! Currently only one score type
k = 0
SCORE_LOOP: do q = 1, t % n_user_score_bins
SCORE_LOOP: do q = 1, t % n_score_bins
k = k + 1
! determine what type of score bin
@ -3144,8 +2941,10 @@ contains
score_index = q
! Expand score if necessary and add to tally results.
call expand_and_score(p, t, score_index, filter_index, score_bin, &
score, k)
!$omp atomic
t % results(RESULT_VALUE, score_index, filter_index) = &
t % results(RESULT_VALUE, score_index, filter_index) + score
end do SCORE_LOOP
! ======================================================================

View file

@ -73,13 +73,8 @@ module tally_header
logical :: all_nuclides = .false.
! Values to score, e.g. flux, absorption, etc.
! scat_order is the scattering order for each score.
! It is to be 0 if the scattering order is 0, or if the score is not a
! scattering response.
integer :: n_score_bins = 0
integer, allocatable :: score_bins(:)
integer, allocatable :: moment_order(:)
integer :: n_user_score_bins = 0
! Results for each bin -- the first dimension of the array is for scores
! (e.g. flux, total reaction rate, fission reaction rate, etc.) and the
@ -769,7 +764,6 @@ contains
associate (t => tallies(index) % obj)
if (allocated(t % score_bins)) deallocate(t % score_bins)
allocate(t % score_bins(n))
t % n_user_score_bins = n
t % n_score_bins = n
do i = 1, n

View file

@ -104,8 +104,6 @@ contains
integer :: s ! loop index for triggers
integer :: filter_index ! index in results array for filters
integer :: score_index ! scoring bin index
integer :: n_order ! loop index for moment orders
integer :: nm_order ! loop index for Ynm moment orders
integer(C_INT) :: err
real(8) :: uncertainty ! trigger uncertainty
real(8) :: std_dev = ZERO ! trigger standard deviation
@ -187,70 +185,18 @@ contains
! Initialize score bin index
NUCLIDE_LOOP: do n = 1, t % n_nuclide_bins
select case(t % score_bins(trigger % score_index))
call get_trigger_uncertainty(std_dev, rel_err, &
score_index, filter_index, t)
case (SCORE_SCATTER_PN, SCORE_NU_SCATTER_PN)
score_index = score_index - 1
do n_order = 0, t % moment_order(trigger % score_index)
score_index = score_index + 1
call get_trigger_uncertainty(std_dev, rel_err, &
score_index, filter_index, t)
if (trigger % variance < variance) then
trigger % variance = std_dev ** 2
end if
if (trigger % std_dev < std_dev) then
trigger % std_dev = std_dev
end if
if (trigger % rel_err < rel_err) then
trigger % rel_err = rel_err
end if
end do
case (SCORE_SCATTER_YN, SCORE_NU_SCATTER_YN, SCORE_FLUX_YN, &
SCORE_TOTAL_YN)
score_index = score_index - 1
do n_order = 0, t % moment_order(trigger % score_index)
do nm_order = -n_order, n_order
score_index = score_index + 1
call get_trigger_uncertainty(std_dev, rel_err, &
score_index, filter_index, t)
if (trigger % variance < variance) then
trigger % variance = std_dev ** 2
end if
if (trigger % std_dev < std_dev) then
trigger % std_dev = std_dev
end if
if (trigger % rel_err < rel_err) then
trigger % rel_err = rel_err
end if
end do
end do
case default
call get_trigger_uncertainty(std_dev, rel_err, &
score_index, filter_index, t)
if (trigger % variance < variance) then
trigger % variance = std_dev ** 2
end if
if (trigger % std_dev < std_dev) then
trigger % std_dev = std_dev
end if
if (trigger % rel_err < rel_err) then
trigger % rel_err = rel_err
end if
end select
if (trigger % variance < variance) then
trigger % variance = std_dev ** 2
end if
if (trigger % std_dev < std_dev) then
trigger % std_dev = std_dev
end if
if (trigger % rel_err < rel_err) then
trigger % rel_err = rel_err
end if
select case (t % triggers(s) % type)
case(VARIANCE)

View file

@ -26,62 +26,42 @@ tally 2:
2.667071E+01
1.600292E+01
1.293670E+01
2.252427E+00
2.605738E-01
4.268506E+01
9.161216E+01
3.022909E+01
4.598915E+01
3.873926E+00
7.615035E-01
5.680399E+01
1.623879E+02
4.033805E+01
8.196263E+01
5.280610E+00
1.414008E+00
6.814742E+01
2.331778E+02
4.851618E+01
1.182330E+02
6.261805E+00
1.983205E+00
7.392923E+01
2.740255E+02
5.253586E+01
1.384152E+02
6.733810E+00
2.278242E+00
7.332860E+01
2.698608E+02
5.227405E+01
1.371810E+02
6.714658E+00
2.273652E+00
6.830172E+01
2.340687E+02
4.867159E+01
1.188724E+02
6.215002E+00
1.956978E+00
5.885634E+01
1.736180E+02
4.170434E+01
8.719622E+01
5.253064E+00
1.396224E+00
4.371848E+01
9.592893E+01
3.106403E+01
4.844308E+01
3.818076E+00
7.509442E-01
2.338413E+01
2.752467E+01
1.636713E+01
1.347770E+01
2.219928E+00
2.515492E-01
tally 3:
1.538752E+01
1.196478E+01
@ -364,6 +344,47 @@ tally 4:
0.000000E+00
0.000000E+00
0.000000E+00
tally 5:
1.538652E+01
1.196332E+01
2.252427E+00
2.605738E-01
2.911344E+01
4.267319E+01
3.873926E+00
7.615035E-01
3.884516E+01
7.604619E+01
5.280610E+00
1.414008E+00
4.672391E+01
1.096625E+02
6.261805E+00
1.983205E+00
5.058447E+01
1.283588E+02
6.733810E+00
2.278242E+00
5.033589E+01
1.271898E+02
6.714658E+00
2.273652E+00
4.687563E+01
1.102719E+02
6.215002E+00
1.956978E+00
4.013134E+01
8.075062E+01
5.253064E+00
1.396224E+00
2.996497E+01
4.508840E+01
3.818076E+00
7.509442E-01
1.574994E+01
1.248291E+01
2.219928E+00
2.515492E-01
cmfd indices
1.000000E+01
1.000000E+00

View file

@ -26,62 +26,42 @@ tally 2:
2.726751E+01
1.624000E+01
1.334217E+01
2.239367E+00
2.607315E-01
4.184801E+01
8.813954E+01
2.955600E+01
4.401685E+01
3.937924E+00
7.877545E-01
5.620224E+01
1.589242E+02
3.981400E+01
7.983679E+01
5.183337E+00
1.367303E+00
6.834724E+01
2.342245E+02
4.869600E+01
1.189597E+02
6.288549E+00
1.997858E+00
7.481522E+01
2.802998E+02
5.346500E+01
1.431835E+02
6.691123E+00
2.252645E+00
7.381412E+01
2.733775E+02
5.269700E+01
1.393729E+02
6.846095E+00
2.360683E+00
6.907776E+01
2.396752E+02
4.918500E+01
1.215909E+02
6.400076E+00
2.073871E+00
5.783261E+01
1.680814E+02
4.107800E+01
8.480751E+01
5.269220E+00
1.404986E+00
4.120212E+01
8.516647E+01
2.930300E+01
4.310295E+01
3.730803E+00
7.015777E-01
2.228419E+01
2.504034E+01
1.554100E+01
1.217931E+01
2.126451E+00
2.315275E-01
tally 3:
1.561100E+01
1.233967E+01
@ -364,6 +344,47 @@ tally 4:
0.000000E+00
0.000000E+00
0.000000E+00
tally 5:
1.560800E+01
1.233482E+01
2.239367E+00
2.607315E-01
2.847600E+01
4.087518E+01
3.937924E+00
7.877545E-01
3.833600E+01
7.405661E+01
5.183337E+00
1.367303E+00
4.686600E+01
1.101919E+02
6.288549E+00
1.997858E+00
5.154500E+01
1.331141E+02
6.691123E+00
2.252645E+00
5.067000E+01
1.288871E+02
6.846095E+00
2.360683E+00
4.737700E+01
1.128379E+02
6.400076E+00
2.073871E+00
3.952800E+01
7.854943E+01
5.269220E+00
1.404986E+00
2.818600E+01
3.989536E+01
3.730803E+00
7.015777E-01
1.497300E+01
1.131008E+01
2.126451E+00
2.315275E-01
cmfd indices
1.000000E+01
1.000000E+00

View file

@ -59,10 +59,13 @@
<filter id="7" type="energyout">
<bins>0.0 0.625 20000000.0</bins>
</filter>
<filter id="14" type="material">
<filter id="11" type="legendre">
<order>3</order>
</filter>
<filter id="15" type="material">
<bins>2</bins>
</filter>
<filter id="27" type="material">
<filter id="29" type="material">
<bins>3</bins>
</filter>
<tally id="1">
@ -108,9 +111,9 @@
<estimator>analog</estimator>
</tally>
<tally id="8">
<filters>1 2 7</filters>
<filters>1 2 7 11</filters>
<nuclides>total</nuclides>
<scores>nu-scatter-P3</scores>
<scores>nu-scatter</scores>
<estimator>analog</estimator>
</tally>
<tally id="9">
@ -126,121 +129,121 @@
<estimator>analog</estimator>
</tally>
<tally id="11">
<filters>14 2</filters>
<filters>15 2</filters>
<nuclides>total</nuclides>
<scores>flux</scores>
<estimator>tracklength</estimator>
</tally>
<tally id="12">
<filters>14 2</filters>
<filters>15 2</filters>
<nuclides>total</nuclides>
<scores>total</scores>
<estimator>tracklength</estimator>
</tally>
<tally id="13">
<filters>14 2</filters>
<filters>15 2</filters>
<nuclides>total</nuclides>
<scores>flux</scores>
<estimator>tracklength</estimator>
</tally>
<tally id="14">
<filters>14 2</filters>
<filters>15 2</filters>
<nuclides>total</nuclides>
<scores>absorption</scores>
<estimator>tracklength</estimator>
</tally>
<tally id="15">
<filters>14 2</filters>
<filters>15 2</filters>
<nuclides>total</nuclides>
<scores>flux</scores>
<estimator>analog</estimator>
</tally>
<tally id="16">
<filters>14 2 7</filters>
<filters>15 2 7</filters>
<nuclides>total</nuclides>
<scores>nu-fission</scores>
<estimator>analog</estimator>
</tally>
<tally id="17">
<filters>14 2</filters>
<filters>15 2</filters>
<nuclides>total</nuclides>
<scores>flux</scores>
<estimator>analog</estimator>
</tally>
<tally id="18">
<filters>14 2 7</filters>
<filters>15 2 7 11</filters>
<nuclides>total</nuclides>
<scores>nu-scatter-P3</scores>
<scores>nu-scatter</scores>
<estimator>analog</estimator>
</tally>
<tally id="19">
<filters>14 2 7</filters>
<filters>15 2 7</filters>
<nuclides>total</nuclides>
<scores>nu-scatter</scores>
<estimator>analog</estimator>
</tally>
<tally id="20">
<filters>14 2 7</filters>
<filters>15 2 7</filters>
<nuclides>total</nuclides>
<scores>scatter</scores>
<estimator>analog</estimator>
</tally>
<tally id="21">
<filters>27 2</filters>
<filters>29 2</filters>
<nuclides>total</nuclides>
<scores>flux</scores>
<estimator>tracklength</estimator>
</tally>
<tally id="22">
<filters>27 2</filters>
<filters>29 2</filters>
<nuclides>total</nuclides>
<scores>total</scores>
<estimator>tracklength</estimator>
</tally>
<tally id="23">
<filters>27 2</filters>
<filters>29 2</filters>
<nuclides>total</nuclides>
<scores>flux</scores>
<estimator>tracklength</estimator>
</tally>
<tally id="24">
<filters>27 2</filters>
<filters>29 2</filters>
<nuclides>total</nuclides>
<scores>absorption</scores>
<estimator>tracklength</estimator>
</tally>
<tally id="25">
<filters>27 2</filters>
<filters>29 2</filters>
<nuclides>total</nuclides>
<scores>flux</scores>
<estimator>analog</estimator>
</tally>
<tally id="26">
<filters>27 2 7</filters>
<filters>29 2 7</filters>
<nuclides>total</nuclides>
<scores>nu-fission</scores>
<estimator>analog</estimator>
</tally>
<tally id="27">
<filters>27 2</filters>
<filters>29 2</filters>
<nuclides>total</nuclides>
<scores>flux</scores>
<estimator>analog</estimator>
</tally>
<tally id="28">
<filters>27 2 7</filters>
<filters>29 2 7 11</filters>
<nuclides>total</nuclides>
<scores>nu-scatter-P3</scores>
<scores>nu-scatter</scores>
<estimator>analog</estimator>
</tally>
<tally id="29">
<filters>27 2 7</filters>
<filters>29 2 7</filters>
<nuclides>total</nuclides>
<scores>nu-scatter</scores>
<estimator>analog</estimator>
</tally>
<tally id="30">
<filters>27 2 7</filters>
<filters>29 2 7</filters>
<nuclides>total</nuclides>
<scores>scatter</scores>
<estimator>analog</estimator>

File diff suppressed because it is too large Load diff

View file

@ -18,32 +18,32 @@
0 1 1 total 0.388721 0.01783
material group in nuclide mean std. dev.
0 1 1 total 0.389304 0.023076
material group in group out nuclide moment mean std. dev.
0 1 1 1 total P0 0.389304 0.023146
1 1 1 1 total P1 0.046224 0.005907
2 1 1 1 total P2 0.017984 0.002883
3 1 1 1 total P3 0.006628 0.002457
material group in group out nuclide moment mean std. dev.
0 1 1 1 total P0 0.389304 0.023146
1 1 1 1 total P1 0.046224 0.005907
2 1 1 1 total P2 0.017984 0.002883
3 1 1 1 total P3 0.006628 0.002457
material group in group out legendre nuclide mean std. dev.
0 1 1 1 P0 total 0.389304 0.023146
1 1 1 1 P1 total 0.046224 0.005907
2 1 1 1 P2 total 0.017984 0.002883
3 1 1 1 P3 total 0.006628 0.002457
material group in group out legendre nuclide mean std. dev.
0 1 1 1 P0 total 0.389304 0.023146
1 1 1 1 P1 total 0.046224 0.005907
2 1 1 1 P2 total 0.017984 0.002883
3 1 1 1 P3 total 0.006628 0.002457
material group in group out nuclide mean std. dev.
0 1 1 1 total 1.0 0.066111
material group in group out nuclide mean std. dev.
0 1 1 1 total 0.085835 0.005592
material group in group out nuclide mean std. dev.
0 1 1 1 total 1.0 0.066111
material group in group out nuclide moment mean std. dev.
0 1 1 1 total P0 0.388721 0.031279
1 1 1 1 total P1 0.046155 0.006407
2 1 1 1 total P2 0.017957 0.003039
3 1 1 1 total P3 0.006618 0.002480
material group in group out nuclide moment mean std. dev.
0 1 1 1 total P0 0.388721 0.040482
1 1 1 1 total P1 0.046155 0.007097
2 1 1 1 total P2 0.017957 0.003262
3 1 1 1 total P3 0.006618 0.002518
material group in group out legendre nuclide mean std. dev.
0 1 1 1 P0 total 0.388721 0.031279
1 1 1 1 P1 total 0.046155 0.006407
2 1 1 1 P2 total 0.017957 0.003039
3 1 1 1 P3 total 0.006618 0.002480
material group in group out legendre nuclide mean std. dev.
0 1 1 1 P0 total 0.388721 0.040482
1 1 1 1 P1 total 0.046155 0.007097
2 1 1 1 P2 total 0.017957 0.003262
3 1 1 1 P3 total 0.006618 0.002518
material group out nuclide mean std. dev.
0 1 1 total 1.0 0.046071
material group out nuclide mean std. dev.
@ -109,32 +109,32 @@
0 2 1 total 0.309384 0.013551
material group in nuclide mean std. dev.
0 2 1 total 0.307987 0.029308
material group in group out nuclide moment mean std. dev.
0 2 1 1 total P0 0.307987 0.029308
1 2 1 1 total P1 0.030617 0.007464
2 2 1 1 total P2 0.018911 0.004323
3 2 1 1 total P3 0.006235 0.003338
material group in group out nuclide moment mean std. dev.
0 2 1 1 total P0 0.307987 0.029308
1 2 1 1 total P1 0.030617 0.007464
2 2 1 1 total P2 0.018911 0.004323
3 2 1 1 total P3 0.006235 0.003338
material group in group out legendre nuclide mean std. dev.
0 2 1 1 P0 total 0.307987 0.029308
1 2 1 1 P1 total 0.030617 0.007464
2 2 1 1 P2 total 0.018911 0.004323
3 2 1 1 P3 total 0.006235 0.003338
material group in group out legendre nuclide mean std. dev.
0 2 1 1 P0 total 0.307987 0.029308
1 2 1 1 P1 total 0.030617 0.007464
2 2 1 1 P2 total 0.018911 0.004323
3 2 1 1 P3 total 0.006235 0.003338
material group in group out nuclide mean std. dev.
0 2 1 1 total 1.0 0.095039
material group in group out nuclide mean std. dev.
0 2 1 1 total 0.0 0.0
material group in group out nuclide mean std. dev.
0 2 1 1 total 1.0 0.095039
material group in group out nuclide moment mean std. dev.
0 2 1 1 total P0 0.309384 0.032376
1 2 1 1 total P1 0.030756 0.007617
2 2 1 1 total P2 0.018997 0.004420
3 2 1 1 total P3 0.006263 0.003364
material group in group out nuclide moment mean std. dev.
0 2 1 1 total P0 0.309384 0.043735
1 2 1 1 total P1 0.030756 0.008159
2 2 1 1 total P2 0.018997 0.004775
3 2 1 1 total P3 0.006263 0.003417
material group in group out legendre nuclide mean std. dev.
0 2 1 1 P0 total 0.309384 0.032376
1 2 1 1 P1 total 0.030756 0.007617
2 2 1 1 P2 total 0.018997 0.004420
3 2 1 1 P3 total 0.006263 0.003364
material group in group out legendre nuclide mean std. dev.
0 2 1 1 P0 total 0.309384 0.043735
1 2 1 1 P1 total 0.030756 0.008159
2 2 1 1 P2 total 0.018997 0.004775
3 2 1 1 P3 total 0.006263 0.003417
material group out nuclide mean std. dev.
0 2 1 total 0.0 0.0
material group out nuclide mean std. dev.
@ -200,32 +200,32 @@
0 3 1 total 0.898938 0.043493
material group in nuclide mean std. dev.
0 3 1 total 0.903415 0.043959
material group in group out nuclide moment mean std. dev.
0 3 1 1 total P0 0.903415 0.043586
1 3 1 1 total P1 0.410417 0.015877
2 3 1 1 total P2 0.143301 0.007187
3 3 1 1 total P3 0.008739 0.003571
material group in group out nuclide moment mean std. dev.
0 3 1 1 total P0 0.903415 0.043586
1 3 1 1 total P1 0.410417 0.015877
2 3 1 1 total P2 0.143301 0.007187
3 3 1 1 total P3 0.008739 0.003571
material group in group out legendre nuclide mean std. dev.
0 3 1 1 P0 total 0.903415 0.043586
1 3 1 1 P1 total 0.410417 0.015877
2 3 1 1 P2 total 0.143301 0.007187
3 3 1 1 P3 total 0.008739 0.003571
material group in group out legendre nuclide mean std. dev.
0 3 1 1 P0 total 0.903415 0.043586
1 3 1 1 P1 total 0.410417 0.015877
2 3 1 1 P2 total 0.143301 0.007187
3 3 1 1 P3 total 0.008739 0.003571
material group in group out nuclide mean std. dev.
0 3 1 1 total 1.0 0.056867
material group in group out nuclide mean std. dev.
0 3 1 1 total 0.0 0.0
material group in group out nuclide mean std. dev.
0 3 1 1 total 1.0 0.056867
material group in group out nuclide moment mean std. dev.
0 3 1 1 total P0 0.898938 0.067118
1 3 1 1 total P1 0.408384 0.028127
2 3 1 1 total P2 0.142591 0.010824
3 3 1 1 total P3 0.008696 0.003588
material group in group out nuclide moment mean std. dev.
0 3 1 1 total P0 0.898938 0.084369
1 3 1 1 total P1 0.408384 0.036475
2 3 1 1 total P2 0.142591 0.013525
3 3 1 1 total P3 0.008696 0.003622
material group in group out legendre nuclide mean std. dev.
0 3 1 1 P0 total 0.898938 0.067118
1 3 1 1 P1 total 0.408384 0.028127
2 3 1 1 P2 total 0.142591 0.010824
3 3 1 1 P3 total 0.008696 0.003588
material group in group out legendre nuclide mean std. dev.
0 3 1 1 P0 total 0.898938 0.084369
1 3 1 1 P1 total 0.408384 0.036475
2 3 1 1 P2 total 0.142591 0.013525
3 3 1 1 P3 total 0.008696 0.003622
material group out nuclide mean std. dev.
0 3 1 total 0.0 0.0
material group out nuclide mean std. dev.

View file

@ -0,0 +1,344 @@
<?xml version='1.0' encoding='utf-8'?>
<geometry>
<cell id="1" material="1" name="Fuel" region="-1" universe="0" />
<cell id="2" material="2" name="Cladding" region="1 -2" universe="0" />
<cell id="3" material="3" name="Water" region="2 3 -4 5 -6" universe="0" />
<surface coeffs="0 0 0.39218" id="1" name="Fuel OR" type="z-cylinder" />
<surface coeffs="0 0 0.4572" id="2" name="Clad OR" type="z-cylinder" />
<surface boundary="reflective" coeffs="-0.63" id="3" name="left" type="x-plane" />
<surface boundary="reflective" coeffs="0.63" id="4" name="right" type="x-plane" />
<surface boundary="reflective" coeffs="-0.63" id="5" name="bottom" type="y-plane" />
<surface boundary="reflective" coeffs="0.63" id="6" name="top" type="y-plane" />
</geometry>
<?xml version='1.0' encoding='utf-8'?>
<materials>
<material depletable="true" id="1" name="UO2 (2.4%)">
<density units="g/cm3" value="10.29769" />
<nuclide ao="4.4843e-06" name="U234" />
<nuclide ao="0.00055815" name="U235" />
<nuclide ao="0.022408" name="U238" />
<nuclide ao="0.045829" name="O16" />
</material>
<material id="2" name="Zircaloy">
<density units="g/cm3" value="6.55" />
<nuclide ao="0.021827" name="Zr90" />
<nuclide ao="0.00476" name="Zr91" />
<nuclide ao="0.0072758" name="Zr92" />
<nuclide ao="0.0073734" name="Zr94" />
<nuclide ao="0.0011879" name="Zr96" />
</material>
<material id="3" name="Hot borated water">
<density units="g/cm3" value="0.740582" />
<nuclide ao="0.049457" name="H1" />
<nuclide ao="0.024672" name="O16" />
<nuclide ao="8.0042e-06" name="B10" />
<nuclide ao="3.2218e-05" name="B11" />
<sab name="c_H_in_H2O" />
</material>
</materials>
<?xml version='1.0' encoding='utf-8'?>
<settings>
<run_mode>eigenvalue</run_mode>
<particles>100</particles>
<batches>10</batches>
<inactive>5</inactive>
<source strength="1.0">
<space type="fission">
<parameters>-0.63 -0.63 -1 0.63 0.63 1</parameters>
</space>
</source>
</settings>
<?xml version='1.0' encoding='utf-8'?>
<tallies>
<filter id="1" type="material">
<bins>1</bins>
</filter>
<filter id="2" type="energy">
<bins>0.0 0.625 20000000.0</bins>
</filter>
<filter id="3" type="energyout">
<bins>0.0 0.625 20000000.0</bins>
</filter>
<filter id="4" type="legendre">
<order>1</order>
</filter>
<filter id="12" type="legendre">
<order>0</order>
</filter>
<filter id="19" type="material">
<bins>2</bins>
</filter>
<filter id="37" type="material">
<bins>3</bins>
</filter>
<tally id="1">
<filters>1 2</filters>
<nuclides>total</nuclides>
<scores>flux</scores>
<estimator>analog</estimator>
</tally>
<tally id="2">
<filters>1 2 3 4</filters>
<nuclides>total</nuclides>
<scores>scatter</scores>
<estimator>analog</estimator>
</tally>
<tally id="3">
<filters>1 2</filters>
<nuclides>total</nuclides>
<scores>flux</scores>
<estimator>analog</estimator>
</tally>
<tally id="4">
<filters>1 2 3 4</filters>
<nuclides>total</nuclides>
<scores>nu-scatter</scores>
<estimator>analog</estimator>
</tally>
<tally id="5">
<filters>1 2</filters>
<nuclides>total</nuclides>
<scores>flux</scores>
<estimator>tracklength</estimator>
</tally>
<tally id="6">
<filters>1 2</filters>
<nuclides>total</nuclides>
<scores>scatter</scores>
<estimator>tracklength</estimator>
</tally>
<tally id="7">
<filters>1 2 3 12</filters>
<nuclides>total</nuclides>
<scores>scatter</scores>
<estimator>analog</estimator>
</tally>
<tally id="8">
<filters>1 3 4</filters>
<nuclides>total</nuclides>
<scores>scatter</scores>
<estimator>analog</estimator>
</tally>
<tally id="9">
<filters>1 2</filters>
<nuclides>total</nuclides>
<scores>flux</scores>
<estimator>analog</estimator>
</tally>
<tally id="10">
<filters>1 2</filters>
<nuclides>total</nuclides>
<scores>flux</scores>
<estimator>tracklength</estimator>
</tally>
<tally id="11">
<filters>1 2</filters>
<nuclides>total</nuclides>
<scores>scatter</scores>
<estimator>tracklength</estimator>
</tally>
<tally id="12">
<filters>1 2 3 12</filters>
<nuclides>total</nuclides>
<scores>scatter</scores>
<estimator>analog</estimator>
</tally>
<tally id="13">
<filters>1 2 3</filters>
<nuclides>total</nuclides>
<scores>nu-scatter</scores>
<estimator>analog</estimator>
</tally>
<tally id="14">
<filters>1 3 4</filters>
<nuclides>total</nuclides>
<scores>nu-scatter</scores>
<estimator>analog</estimator>
</tally>
<tally id="15">
<filters>1 2</filters>
<nuclides>total</nuclides>
<scores>flux</scores>
<estimator>analog</estimator>
</tally>
<tally id="16">
<filters>19 2</filters>
<nuclides>total</nuclides>
<scores>flux</scores>
<estimator>analog</estimator>
</tally>
<tally id="17">
<filters>19 2 3 4</filters>
<nuclides>total</nuclides>
<scores>scatter</scores>
<estimator>analog</estimator>
</tally>
<tally id="18">
<filters>19 2</filters>
<nuclides>total</nuclides>
<scores>flux</scores>
<estimator>analog</estimator>
</tally>
<tally id="19">
<filters>19 2 3 4</filters>
<nuclides>total</nuclides>
<scores>nu-scatter</scores>
<estimator>analog</estimator>
</tally>
<tally id="20">
<filters>19 2</filters>
<nuclides>total</nuclides>
<scores>flux</scores>
<estimator>tracklength</estimator>
</tally>
<tally id="21">
<filters>19 2</filters>
<nuclides>total</nuclides>
<scores>scatter</scores>
<estimator>tracklength</estimator>
</tally>
<tally id="22">
<filters>19 2 3 12</filters>
<nuclides>total</nuclides>
<scores>scatter</scores>
<estimator>analog</estimator>
</tally>
<tally id="23">
<filters>19 3 4</filters>
<nuclides>total</nuclides>
<scores>scatter</scores>
<estimator>analog</estimator>
</tally>
<tally id="24">
<filters>19 2</filters>
<nuclides>total</nuclides>
<scores>flux</scores>
<estimator>analog</estimator>
</tally>
<tally id="25">
<filters>19 2</filters>
<nuclides>total</nuclides>
<scores>flux</scores>
<estimator>tracklength</estimator>
</tally>
<tally id="26">
<filters>19 2</filters>
<nuclides>total</nuclides>
<scores>scatter</scores>
<estimator>tracklength</estimator>
</tally>
<tally id="27">
<filters>19 2 3 12</filters>
<nuclides>total</nuclides>
<scores>scatter</scores>
<estimator>analog</estimator>
</tally>
<tally id="28">
<filters>19 2 3</filters>
<nuclides>total</nuclides>
<scores>nu-scatter</scores>
<estimator>analog</estimator>
</tally>
<tally id="29">
<filters>19 3 4</filters>
<nuclides>total</nuclides>
<scores>nu-scatter</scores>
<estimator>analog</estimator>
</tally>
<tally id="30">
<filters>19 2</filters>
<nuclides>total</nuclides>
<scores>flux</scores>
<estimator>analog</estimator>
</tally>
<tally id="31">
<filters>37 2</filters>
<nuclides>total</nuclides>
<scores>flux</scores>
<estimator>analog</estimator>
</tally>
<tally id="32">
<filters>37 2 3 4</filters>
<nuclides>total</nuclides>
<scores>scatter</scores>
<estimator>analog</estimator>
</tally>
<tally id="33">
<filters>37 2</filters>
<nuclides>total</nuclides>
<scores>flux</scores>
<estimator>analog</estimator>
</tally>
<tally id="34">
<filters>37 2 3 4</filters>
<nuclides>total</nuclides>
<scores>nu-scatter</scores>
<estimator>analog</estimator>
</tally>
<tally id="35">
<filters>37 2</filters>
<nuclides>total</nuclides>
<scores>flux</scores>
<estimator>tracklength</estimator>
</tally>
<tally id="36">
<filters>37 2</filters>
<nuclides>total</nuclides>
<scores>scatter</scores>
<estimator>tracklength</estimator>
</tally>
<tally id="37">
<filters>37 2 3 12</filters>
<nuclides>total</nuclides>
<scores>scatter</scores>
<estimator>analog</estimator>
</tally>
<tally id="38">
<filters>37 3 4</filters>
<nuclides>total</nuclides>
<scores>scatter</scores>
<estimator>analog</estimator>
</tally>
<tally id="39">
<filters>37 2</filters>
<nuclides>total</nuclides>
<scores>flux</scores>
<estimator>analog</estimator>
</tally>
<tally id="40">
<filters>37 2</filters>
<nuclides>total</nuclides>
<scores>flux</scores>
<estimator>tracklength</estimator>
</tally>
<tally id="41">
<filters>37 2</filters>
<nuclides>total</nuclides>
<scores>scatter</scores>
<estimator>tracklength</estimator>
</tally>
<tally id="42">
<filters>37 2 3 12</filters>
<nuclides>total</nuclides>
<scores>scatter</scores>
<estimator>analog</estimator>
</tally>
<tally id="43">
<filters>37 2 3</filters>
<nuclides>total</nuclides>
<scores>nu-scatter</scores>
<estimator>analog</estimator>
</tally>
<tally id="44">
<filters>37 3 4</filters>
<nuclides>total</nuclides>
<scores>nu-scatter</scores>
<estimator>analog</estimator>
</tally>
<tally id="45">
<filters>37 2</filters>
<nuclides>total</nuclides>
<scores>flux</scores>
<estimator>analog</estimator>
</tally>
</tallies>

View file

@ -0,0 +1,60 @@
material group in group out nuclide mean std. dev.
3 1 1 1 total 0.332466 0.026533
2 1 1 2 total 0.000989 0.000482
1 1 2 1 total 0.000925 0.000925
0 1 2 2 total 0.396146 0.015707
material group in group out nuclide mean std. dev.
3 1 1 1 total 0.332466 0.026533
2 1 1 2 total 0.000989 0.000482
1 1 2 1 total 0.000925 0.000925
0 1 2 2 total 0.396146 0.015707
material group in group out nuclide mean std. dev.
3 1 1 1 total 0.334690 0.037288
2 1 1 2 total 0.000995 0.000489
1 1 2 1 total 0.000887 0.000889
0 1 2 2 total 0.379453 0.030118
material group in group out nuclide mean std. dev.
3 1 1 1 total 0.334690 0.048073
2 1 1 2 total 0.000995 0.000841
1 1 2 1 total 0.000887 0.001538
0 1 2 2 total 0.379453 0.034216
material group in group out nuclide mean std. dev.
3 2 1 1 total 0.271891 0.032748
2 2 1 2 total 0.000000 0.000000
1 2 2 1 total 0.000000 0.000000
0 2 2 2 total 0.307478 0.047512
material group in group out nuclide mean std. dev.
3 2 1 1 total 0.271891 0.032748
2 2 1 2 total 0.000000 0.000000
1 2 2 1 total 0.000000 0.000000
0 2 2 2 total 0.307478 0.047512
material group in group out nuclide mean std. dev.
3 2 1 1 total 0.273933 0.038207
2 2 1 2 total 0.000000 0.000000
1 2 2 1 total 0.000000 0.000000
0 2 2 2 total 0.306635 0.052777
material group in group out nuclide mean std. dev.
3 2 1 1 total 0.273933 0.051116
2 2 1 2 total 0.000000 0.000000
1 2 2 1 total 0.000000 0.000000
0 2 2 2 total 0.306635 0.067497
material group in group out nuclide mean std. dev.
3 3 1 1 total 0.258652 0.022596
2 3 1 2 total 0.031368 0.001728
1 3 2 1 total 0.000443 0.000445
0 3 2 2 total 1.482300 0.232582
material group in group out nuclide mean std. dev.
3 3 1 1 total 0.258652 0.022596
2 3 1 2 total 0.031368 0.001728
1 3 2 1 total 0.000443 0.000445
0 3 2 2 total 1.482300 0.232582
material group in group out nuclide mean std. dev.
3 3 1 1 total 0.251610 0.041472
2 3 1 2 total 0.031023 0.002232
1 3 2 1 total 0.000440 0.000445
0 3 2 2 total 1.467612 0.356408
material group in group out nuclide mean std. dev.
3 3 1 1 total 0.251610 0.048135
2 3 1 2 total 0.031023 0.003064
1 3 2 1 total 0.000440 0.000765
0 3 2 2 total 1.467612 0.449931

View file

@ -0,0 +1,63 @@
import hashlib
import openmc
import openmc.mgxs
from openmc.examples import pwr_pin_cell
from tests.testing_harness import PyAPITestHarness
class MGXSTestHarness(PyAPITestHarness):
def __init__(self, *args, **kwargs):
# Generate inputs using parent class routine
super().__init__(*args, **kwargs)
# Initialize a two-group structure
energy_groups = openmc.mgxs.EnergyGroups(group_edges=[0, 0.625, 20.e6])
# Initialize MGXS Library for a few cross section types
self.mgxs_lib = openmc.mgxs.Library(self._model.geometry)
self.mgxs_lib.by_nuclide = False
# Test all MGXS types
self.mgxs_lib.mgxs_types = ['scatter matrix', 'nu-scatter matrix',
'consistent scatter matrix',
'consistent nu-scatter matrix']
self.mgxs_lib.energy_groups = energy_groups
self.mgxs_lib.correction = 'P0'
self.mgxs_lib.domain_type = 'material'
self.mgxs_lib.build_library()
# Add tallies
self.mgxs_lib.add_to_tallies_file(self._model.tallies, merge=False)
def _get_results(self, hash_output=False):
"""Digest info in the statepoint and return as a string."""
# Read the statepoint file.
sp = openmc.StatePoint(self._sp_name)
# Load the MGXS library from the statepoint
self.mgxs_lib.load_from_statepoint(sp)
# Build a string from Pandas Dataframe for each MGXS
outstr = ''
for domain in self.mgxs_lib.domains:
for mgxs_type in self.mgxs_lib.mgxs_types:
mgxs = self.mgxs_lib.get_mgxs(domain, mgxs_type)
df = mgxs.get_pandas_dataframe()
outstr += df.to_string() + '\n'
# Hash the results if necessary
if hash_output:
sha512 = hashlib.sha512()
sha512.update(outstr.encode('utf-8'))
outstr = sha512.hexdigest()
return outstr
def test_mgxs_library_correction():
model = pwr_pin_cell()
harness = MGXSTestHarness('statepoint.10.h5', model)
harness.main()

View file

@ -86,7 +86,13 @@
<filter id="5" type="energyout">
<bins>0.0 20000000.0</bins>
</filter>
<filter id="59" type="delayedgroup">
<filter id="6" type="legendre">
<order>1</order>
</filter>
<filter id="28" type="legendre">
<order>3</order>
</filter>
<filter id="65" type="delayedgroup">
<bins>1 2 3 4 5 6</bins>
</filter>
<tally id="1">
@ -120,9 +126,9 @@
<estimator>analog</estimator>
</tally>
<tally id="6">
<filters>1 5</filters>
<filters>1 5 6</filters>
<nuclides>total</nuclides>
<scores>scatter-1</scores>
<scores>scatter</scores>
<estimator>analog</estimator>
</tally>
<tally id="7">
@ -144,9 +150,9 @@
<estimator>analog</estimator>
</tally>
<tally id="10">
<filters>1 5</filters>
<filters>1 5 6</filters>
<nuclides>total</nuclides>
<scores>nu-scatter-1</scores>
<scores>nu-scatter</scores>
<estimator>analog</estimator>
</tally>
<tally id="11">
@ -246,9 +252,9 @@
<estimator>analog</estimator>
</tally>
<tally id="27">
<filters>1 2 5</filters>
<filters>1 2 5 28</filters>
<nuclides>total</nuclides>
<scores>scatter-P3</scores>
<scores>scatter</scores>
<estimator>analog</estimator>
</tally>
<tally id="28">
@ -258,9 +264,9 @@
<estimator>analog</estimator>
</tally>
<tally id="29">
<filters>1 2 5</filters>
<filters>1 2 5 28</filters>
<nuclides>total</nuclides>
<scores>nu-scatter-P3</scores>
<scores>nu-scatter</scores>
<estimator>analog</estimator>
</tally>
<tally id="30">
@ -306,9 +312,9 @@
<estimator>tracklength</estimator>
</tally>
<tally id="37">
<filters>1 2 5</filters>
<filters>1 2 5 28</filters>
<nuclides>total</nuclides>
<scores>scatter-P3</scores>
<scores>scatter</scores>
<estimator>analog</estimator>
</tally>
<tally id="38">
@ -324,139 +330,133 @@
<estimator>tracklength</estimator>
</tally>
<tally id="40">
<filters>1 2 5</filters>
<filters>1 2 5 28</filters>
<nuclides>total</nuclides>
<scores>scatter-P3</scores>
<scores>scatter</scores>
<estimator>analog</estimator>
</tally>
<tally id="41">
<filters>1 2 5</filters>
<nuclides>total</nuclides>
<scores>nu-scatter-0</scores>
<scores>nu-scatter</scores>
<estimator>analog</estimator>
</tally>
<tally id="42">
<filters>1 2 5</filters>
<filters>1 2</filters>
<nuclides>total</nuclides>
<scores>scatter-0</scores>
<scores>nu-fission</scores>
<estimator>analog</estimator>
</tally>
<tally id="43">
<filters>1 2</filters>
<filters>1 5</filters>
<nuclides>total</nuclides>
<scores>nu-fission</scores>
<estimator>analog</estimator>
</tally>
<tally id="44">
<filters>1 5</filters>
<filters>1 2</filters>
<nuclides>total</nuclides>
<scores>nu-fission</scores>
<scores>prompt-nu-fission</scores>
<estimator>analog</estimator>
</tally>
<tally id="45">
<filters>1 2</filters>
<filters>1 5</filters>
<nuclides>total</nuclides>
<scores>prompt-nu-fission</scores>
<estimator>analog</estimator>
</tally>
<tally id="46">
<filters>1 5</filters>
<nuclides>total</nuclides>
<scores>prompt-nu-fission</scores>
<estimator>analog</estimator>
</tally>
<tally id="47">
<filters>1 2</filters>
<nuclides>total</nuclides>
<scores>flux</scores>
<estimator>tracklength</estimator>
</tally>
<tally id="48">
<tally id="47">
<filters>1 2</filters>
<nuclides>total</nuclides>
<scores>inverse-velocity</scores>
<estimator>tracklength</estimator>
</tally>
<tally id="49">
<tally id="48">
<filters>1 2</filters>
<nuclides>total</nuclides>
<scores>flux</scores>
<estimator>tracklength</estimator>
</tally>
<tally id="49">
<filters>1 2</filters>
<nuclides>total</nuclides>
<scores>prompt-nu-fission</scores>
<estimator>tracklength</estimator>
</tally>
<tally id="50">
<filters>1 2</filters>
<nuclides>total</nuclides>
<scores>prompt-nu-fission</scores>
<estimator>tracklength</estimator>
</tally>
<tally id="51">
<filters>1 2</filters>
<nuclides>total</nuclides>
<scores>flux</scores>
<estimator>analog</estimator>
</tally>
<tally id="52">
<tally id="51">
<filters>1 2 5</filters>
<nuclides>total</nuclides>
<scores>prompt-nu-fission</scores>
<estimator>analog</estimator>
</tally>
<tally id="53">
<tally id="52">
<filters>1 2</filters>
<nuclides>total</nuclides>
<scores>flux</scores>
<estimator>tracklength</estimator>
</tally>
<tally id="54">
<filters>1 59 2</filters>
<tally id="53">
<filters>1 65 2</filters>
<nuclides>total</nuclides>
<scores>delayed-nu-fission</scores>
<estimator>tracklength</estimator>
</tally>
<tally id="54">
<filters>1 65 2</filters>
<nuclides>total</nuclides>
<scores>delayed-nu-fission</scores>
<estimator>analog</estimator>
</tally>
<tally id="55">
<filters>1 59 2</filters>
<filters>1 65 5</filters>
<nuclides>total</nuclides>
<scores>delayed-nu-fission</scores>
<estimator>analog</estimator>
</tally>
<tally id="56">
<filters>1 59 5</filters>
<nuclides>total</nuclides>
<scores>delayed-nu-fission</scores>
<estimator>analog</estimator>
</tally>
<tally id="57">
<filters>1 2</filters>
<nuclides>total</nuclides>
<scores>nu-fission</scores>
<estimator>tracklength</estimator>
</tally>
<tally id="57">
<filters>1 65 2</filters>
<nuclides>total</nuclides>
<scores>delayed-nu-fission</scores>
<estimator>tracklength</estimator>
</tally>
<tally id="58">
<filters>1 59 2</filters>
<filters>1 65 2</filters>
<nuclides>total</nuclides>
<scores>delayed-nu-fission</scores>
<estimator>tracklength</estimator>
</tally>
<tally id="59">
<filters>1 59 2</filters>
<nuclides>total</nuclides>
<scores>delayed-nu-fission</scores>
<estimator>tracklength</estimator>
</tally>
<tally id="60">
<filters>1 59 2</filters>
<filters>1 65 2</filters>
<nuclides>total</nuclides>
<scores>decay-rate</scores>
<estimator>tracklength</estimator>
</tally>
<tally id="61">
<tally id="60">
<filters>1 2</filters>
<nuclides>total</nuclides>
<scores>flux</scores>
<estimator>analog</estimator>
</tally>
<tally id="62">
<filters>1 59 2 5</filters>
<tally id="61">
<filters>1 65 2 5</filters>
<nuclides>total</nuclides>
<scores>delayed-nu-fission</scores>
<estimator>analog</estimator>

View file

@ -18,32 +18,32 @@
0 ((0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13... 1 total 0.390797 0.008717
sum(distribcell) group in nuclide mean std. dev.
0 ((0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13... 1 total 0.387332 0.014241
sum(distribcell) group in group out nuclide moment mean std. dev.
0 ((0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13... 1 1 total P0 0.387009 0.014230
1 ((0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13... 1 1 total P1 0.047179 0.004923
2 ((0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13... 1 1 total P2 0.015713 0.003654
3 ((0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13... 1 1 total P3 0.005378 0.003137
sum(distribcell) group in group out nuclide moment mean std. dev.
0 ((0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13... 1 1 total P0 0.387332 0.014241
1 ((0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13... 1 1 total P1 0.047187 0.004933
2 ((0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13... 1 1 total P2 0.015727 0.003654
3 ((0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13... 1 1 total P3 0.005387 0.003141
sum(distribcell) group in group out legendre nuclide mean std. dev.
0 ((0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13... 1 1 P0 total 0.387009 0.014230
1 ((0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13... 1 1 P1 total 0.047179 0.004923
2 ((0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13... 1 1 P2 total 0.015713 0.003654
3 ((0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13... 1 1 P3 total 0.005378 0.003137
sum(distribcell) group in group out legendre nuclide mean std. dev.
0 ((0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13... 1 1 P0 total 0.387332 0.014241
1 ((0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13... 1 1 P1 total 0.047187 0.004933
2 ((0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13... 1 1 P2 total 0.015727 0.003654
3 ((0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13... 1 1 P3 total 0.005387 0.003141
sum(distribcell) group in group out nuclide mean std. dev.
0 ((0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13... 1 1 total 1.000834 0.037242
sum(distribcell) group in group out nuclide mean std. dev.
0 ((0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13... 1 1 total 0.094516 0.0059
sum(distribcell) group in group out nuclide mean std. dev.
0 ((0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13... 1 1 total 1.0 0.037213
sum(distribcell) group in group out nuclide moment mean std. dev.
0 ((0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13... 1 1 total P0 0.390797 0.016955
1 ((0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13... 1 1 total P1 0.047641 0.005091
2 ((0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13... 1 1 total P2 0.015866 0.003708
3 ((0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13... 1 1 total P3 0.005430 0.003170
sum(distribcell) group in group out nuclide moment mean std. dev.
0 ((0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13... 1 1 total P0 0.391123 0.022356
1 ((0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13... 1 1 total P1 0.047680 0.005395
2 ((0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13... 1 1 total P2 0.015880 0.003758
3 ((0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13... 1 1 total P3 0.005435 0.003179
sum(distribcell) group in group out legendre nuclide mean std. dev.
0 ((0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13... 1 1 P0 total 0.390797 0.016955
1 ((0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13... 1 1 P1 total 0.047641 0.005091
2 ((0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13... 1 1 P2 total 0.015866 0.003708
3 ((0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13... 1 1 P3 total 0.005430 0.003170
sum(distribcell) group in group out legendre nuclide mean std. dev.
0 ((0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13... 1 1 P0 total 0.391123 0.022356
1 ((0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13... 1 1 P1 total 0.047680 0.005395
2 ((0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13... 1 1 P2 total 0.015880 0.003758
3 ((0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13... 1 1 P3 total 0.005435 0.003179
sum(distribcell) group out nuclide mean std. dev.
0 ((0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13... 1 total 1.0 0.080455
sum(distribcell) group out nuclide mean std. dev.

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,269 @@
<?xml version='1.0' encoding='utf-8'?>
<geometry>
<cell id="1" material="1" name="Fuel" region="-1" universe="0" />
<cell id="2" material="2" name="Cladding" region="1 -2" universe="0" />
<cell id="3" material="3" name="Water" region="2 3 -4 5 -6" universe="0" />
<surface coeffs="0 0 0.39218" id="1" name="Fuel OR" type="z-cylinder" />
<surface coeffs="0 0 0.4572" id="2" name="Clad OR" type="z-cylinder" />
<surface boundary="reflective" coeffs="-0.63" id="3" name="left" type="x-plane" />
<surface boundary="reflective" coeffs="0.63" id="4" name="right" type="x-plane" />
<surface boundary="reflective" coeffs="-0.63" id="5" name="bottom" type="y-plane" />
<surface boundary="reflective" coeffs="0.63" id="6" name="top" type="y-plane" />
</geometry>
<?xml version='1.0' encoding='utf-8'?>
<materials>
<material depletable="true" id="1" name="UO2 (2.4%)">
<density units="g/cm3" value="10.29769" />
<nuclide ao="4.4843e-06" name="U234" />
<nuclide ao="0.00055815" name="U235" />
<nuclide ao="0.022408" name="U238" />
<nuclide ao="0.045829" name="O16" />
</material>
<material id="2" name="Zircaloy">
<density units="g/cm3" value="6.55" />
<nuclide ao="0.021827" name="Zr90" />
<nuclide ao="0.00476" name="Zr91" />
<nuclide ao="0.0072758" name="Zr92" />
<nuclide ao="0.0073734" name="Zr94" />
<nuclide ao="0.0011879" name="Zr96" />
</material>
<material id="3" name="Hot borated water">
<density units="g/cm3" value="0.740582" />
<nuclide ao="0.049457" name="H1" />
<nuclide ao="0.024672" name="O16" />
<nuclide ao="8.0042e-06" name="B10" />
<nuclide ao="3.2218e-05" name="B11" />
<sab name="c_H_in_H2O" />
</material>
</materials>
<?xml version='1.0' encoding='utf-8'?>
<settings>
<run_mode>eigenvalue</run_mode>
<particles>100</particles>
<batches>10</batches>
<inactive>5</inactive>
<source strength="1.0">
<space type="fission">
<parameters>-0.63 -0.63 -1 0.63 0.63 1</parameters>
</space>
</source>
</settings>
<?xml version='1.0' encoding='utf-8'?>
<tallies>
<filter id="1" type="material">
<bins>1</bins>
</filter>
<filter id="2" type="energy">
<bins>0.0 0.625 20000000.0</bins>
</filter>
<filter id="3" type="energyout">
<bins>0.0 0.625 20000000.0</bins>
</filter>
<filter id="4" type="mu">
<bins>-1.0 -0.818181818182 -0.636363636364 -0.454545454545 -0.272727272727 -0.0909090909091 0.0909090909091 0.272727272727 0.454545454545 0.636363636364 0.818181818182 1.0</bins>
</filter>
<filter id="17" type="material">
<bins>2</bins>
</filter>
<filter id="33" type="material">
<bins>3</bins>
</filter>
<tally id="1">
<filters>1 2</filters>
<nuclides>total</nuclides>
<scores>flux</scores>
<estimator>analog</estimator>
</tally>
<tally id="2">
<filters>1 2 3 4</filters>
<nuclides>total</nuclides>
<scores>scatter</scores>
<estimator>analog</estimator>
</tally>
<tally id="3">
<filters>1 2</filters>
<nuclides>total</nuclides>
<scores>flux</scores>
<estimator>analog</estimator>
</tally>
<tally id="4">
<filters>1 2 3 4</filters>
<nuclides>total</nuclides>
<scores>nu-scatter</scores>
<estimator>analog</estimator>
</tally>
<tally id="5">
<filters>1 2</filters>
<nuclides>total</nuclides>
<scores>flux</scores>
<estimator>tracklength</estimator>
</tally>
<tally id="6">
<filters>1 2</filters>
<nuclides>total</nuclides>
<scores>scatter</scores>
<estimator>tracklength</estimator>
</tally>
<tally id="7">
<filters>1 2 3 4</filters>
<nuclides>total</nuclides>
<scores>scatter</scores>
<estimator>analog</estimator>
</tally>
<tally id="8">
<filters>1 2</filters>
<nuclides>total</nuclides>
<scores>flux</scores>
<estimator>tracklength</estimator>
</tally>
<tally id="9">
<filters>1 2</filters>
<nuclides>total</nuclides>
<scores>scatter</scores>
<estimator>tracklength</estimator>
</tally>
<tally id="10">
<filters>1 2 3 4</filters>
<nuclides>total</nuclides>
<scores>scatter</scores>
<estimator>analog</estimator>
</tally>
<tally id="11">
<filters>1 2 3</filters>
<nuclides>total</nuclides>
<scores>nu-scatter</scores>
<estimator>analog</estimator>
</tally>
<tally id="12">
<filters>17 2</filters>
<nuclides>total</nuclides>
<scores>flux</scores>
<estimator>analog</estimator>
</tally>
<tally id="13">
<filters>17 2 3 4</filters>
<nuclides>total</nuclides>
<scores>scatter</scores>
<estimator>analog</estimator>
</tally>
<tally id="14">
<filters>17 2</filters>
<nuclides>total</nuclides>
<scores>flux</scores>
<estimator>analog</estimator>
</tally>
<tally id="15">
<filters>17 2 3 4</filters>
<nuclides>total</nuclides>
<scores>nu-scatter</scores>
<estimator>analog</estimator>
</tally>
<tally id="16">
<filters>17 2</filters>
<nuclides>total</nuclides>
<scores>flux</scores>
<estimator>tracklength</estimator>
</tally>
<tally id="17">
<filters>17 2</filters>
<nuclides>total</nuclides>
<scores>scatter</scores>
<estimator>tracklength</estimator>
</tally>
<tally id="18">
<filters>17 2 3 4</filters>
<nuclides>total</nuclides>
<scores>scatter</scores>
<estimator>analog</estimator>
</tally>
<tally id="19">
<filters>17 2</filters>
<nuclides>total</nuclides>
<scores>flux</scores>
<estimator>tracklength</estimator>
</tally>
<tally id="20">
<filters>17 2</filters>
<nuclides>total</nuclides>
<scores>scatter</scores>
<estimator>tracklength</estimator>
</tally>
<tally id="21">
<filters>17 2 3 4</filters>
<nuclides>total</nuclides>
<scores>scatter</scores>
<estimator>analog</estimator>
</tally>
<tally id="22">
<filters>17 2 3</filters>
<nuclides>total</nuclides>
<scores>nu-scatter</scores>
<estimator>analog</estimator>
</tally>
<tally id="23">
<filters>33 2</filters>
<nuclides>total</nuclides>
<scores>flux</scores>
<estimator>analog</estimator>
</tally>
<tally id="24">
<filters>33 2 3 4</filters>
<nuclides>total</nuclides>
<scores>scatter</scores>
<estimator>analog</estimator>
</tally>
<tally id="25">
<filters>33 2</filters>
<nuclides>total</nuclides>
<scores>flux</scores>
<estimator>analog</estimator>
</tally>
<tally id="26">
<filters>33 2 3 4</filters>
<nuclides>total</nuclides>
<scores>nu-scatter</scores>
<estimator>analog</estimator>
</tally>
<tally id="27">
<filters>33 2</filters>
<nuclides>total</nuclides>
<scores>flux</scores>
<estimator>tracklength</estimator>
</tally>
<tally id="28">
<filters>33 2</filters>
<nuclides>total</nuclides>
<scores>scatter</scores>
<estimator>tracklength</estimator>
</tally>
<tally id="29">
<filters>33 2 3 4</filters>
<nuclides>total</nuclides>
<scores>scatter</scores>
<estimator>analog</estimator>
</tally>
<tally id="30">
<filters>33 2</filters>
<nuclides>total</nuclides>
<scores>flux</scores>
<estimator>tracklength</estimator>
</tally>
<tally id="31">
<filters>33 2</filters>
<nuclides>total</nuclides>
<scores>scatter</scores>
<estimator>tracklength</estimator>
</tally>
<tally id="32">
<filters>33 2 3 4</filters>
<nuclides>total</nuclides>
<scores>scatter</scores>
<estimator>analog</estimator>
</tally>
<tally id="33">
<filters>33 2 3</filters>
<nuclides>total</nuclides>
<scores>nu-scatter</scores>
<estimator>analog</estimator>
</tally>
</tallies>

View file

@ -0,0 +1,540 @@
material group in group out mu bin nuclide mean std. dev.
33 1 1 1 1 total 0.025383 0.001933
34 1 1 1 2 total 0.027855 0.001701
35 1 1 1 3 total 0.031646 0.002913
36 1 1 1 4 total 0.028185 0.001430
37 1 1 1 5 total 0.030162 0.002739
38 1 1 1 6 total 0.029009 0.002713
39 1 1 1 7 total 0.030492 0.002907
40 1 1 1 8 total 0.035272 0.003860
41 1 1 1 9 total 0.043678 0.006074
42 1 1 1 10 total 0.044502 0.003030
43 1 1 1 11 total 0.058017 0.004319
22 1 1 2 1 total 0.000000 0.000000
23 1 1 2 2 total 0.000165 0.000165
24 1 1 2 3 total 0.000330 0.000202
25 1 1 2 4 total 0.000165 0.000165
26 1 1 2 5 total 0.000000 0.000000
27 1 1 2 6 total 0.000165 0.000165
28 1 1 2 7 total 0.000000 0.000000
29 1 1 2 8 total 0.000000 0.000000
30 1 1 2 9 total 0.000000 0.000000
31 1 1 2 10 total 0.000165 0.000165
32 1 1 2 11 total 0.000000 0.000000
11 1 2 1 1 total 0.000925 0.000925
12 1 2 1 2 total 0.000000 0.000000
13 1 2 1 3 total 0.000000 0.000000
14 1 2 1 4 total 0.000000 0.000000
15 1 2 1 5 total 0.000000 0.000000
16 1 2 1 6 total 0.000000 0.000000
17 1 2 1 7 total 0.000000 0.000000
18 1 2 1 8 total 0.000000 0.000000
19 1 2 1 9 total 0.000000 0.000000
20 1 2 1 10 total 0.000000 0.000000
21 1 2 1 11 total 0.000000 0.000000
0 1 2 2 1 total 0.037910 0.006498
1 1 2 2 2 total 0.031438 0.002377
2 1 2 2 3 total 0.036986 0.006429
3 1 2 2 4 total 0.029588 0.005627
4 1 2 2 5 total 0.036986 0.007359
5 1 2 2 6 total 0.035136 0.004110
6 1 2 2 7 total 0.037910 0.003188
7 1 2 2 8 total 0.041609 0.004489
8 1 2 2 9 total 0.040684 0.007710
9 1 2 2 10 total 0.043458 0.004638
10 1 2 2 11 total 0.039760 0.002920
material group in group out mu bin nuclide mean std. dev.
33 1 1 1 1 total 0.025383 0.001933
34 1 1 1 2 total 0.027855 0.001701
35 1 1 1 3 total 0.031646 0.002913
36 1 1 1 4 total 0.028185 0.001430
37 1 1 1 5 total 0.030162 0.002739
38 1 1 1 6 total 0.029009 0.002713
39 1 1 1 7 total 0.030492 0.002907
40 1 1 1 8 total 0.035272 0.003860
41 1 1 1 9 total 0.043678 0.006074
42 1 1 1 10 total 0.044502 0.003030
43 1 1 1 11 total 0.058017 0.004319
22 1 1 2 1 total 0.000000 0.000000
23 1 1 2 2 total 0.000165 0.000165
24 1 1 2 3 total 0.000330 0.000202
25 1 1 2 4 total 0.000165 0.000165
26 1 1 2 5 total 0.000000 0.000000
27 1 1 2 6 total 0.000165 0.000165
28 1 1 2 7 total 0.000000 0.000000
29 1 1 2 8 total 0.000000 0.000000
30 1 1 2 9 total 0.000000 0.000000
31 1 1 2 10 total 0.000165 0.000165
32 1 1 2 11 total 0.000000 0.000000
11 1 2 1 1 total 0.000925 0.000925
12 1 2 1 2 total 0.000000 0.000000
13 1 2 1 3 total 0.000000 0.000000
14 1 2 1 4 total 0.000000 0.000000
15 1 2 1 5 total 0.000000 0.000000
16 1 2 1 6 total 0.000000 0.000000
17 1 2 1 7 total 0.000000 0.000000
18 1 2 1 8 total 0.000000 0.000000
19 1 2 1 9 total 0.000000 0.000000
20 1 2 1 10 total 0.000000 0.000000
21 1 2 1 11 total 0.000000 0.000000
0 1 2 2 1 total 0.037910 0.006498
1 1 2 2 2 total 0.031438 0.002377
2 1 2 2 3 total 0.036986 0.006429
3 1 2 2 4 total 0.029588 0.005627
4 1 2 2 5 total 0.036986 0.007359
5 1 2 2 6 total 0.035136 0.004110
6 1 2 2 7 total 0.037910 0.003188
7 1 2 2 8 total 0.041609 0.004489
8 1 2 2 9 total 0.040684 0.007710
9 1 2 2 10 total 0.043458 0.004638
10 1 2 2 11 total 0.039760 0.002920
material group in group out mu bin nuclide mean std. dev.
33 1 1 1 1 total 0.025529 0.002197
34 1 1 1 2 total 0.028016 0.002047
35 1 1 1 3 total 0.031829 0.003196
36 1 1 1 4 total 0.028348 0.001833
37 1 1 1 5 total 0.030337 0.003012
38 1 1 1 6 total 0.029177 0.002969
39 1 1 1 7 total 0.030668 0.003172
40 1 1 1 8 total 0.035476 0.004135
41 1 1 1 9 total 0.043931 0.006358
42 1 1 1 10 total 0.044759 0.003536
43 1 1 1 11 total 0.058353 0.004934
22 1 1 2 1 total 0.000000 0.000000
23 1 1 2 2 total 0.000166 0.000166
24 1 1 2 3 total 0.000332 0.000204
25 1 1 2 4 total 0.000166 0.000166
26 1 1 2 5 total 0.000000 0.000000
27 1 1 2 6 total 0.000166 0.000166
28 1 1 2 7 total 0.000000 0.000000
29 1 1 2 8 total 0.000000 0.000000
30 1 1 2 9 total 0.000000 0.000000
31 1 1 2 10 total 0.000166 0.000166
32 1 1 2 11 total 0.000000 0.000000
11 1 2 1 1 total 0.000887 0.000890
12 1 2 1 2 total 0.000000 0.000000
13 1 2 1 3 total 0.000000 0.000000
14 1 2 1 4 total 0.000000 0.000000
15 1 2 1 5 total 0.000000 0.000000
16 1 2 1 6 total 0.000000 0.000000
17 1 2 1 7 total 0.000000 0.000000
18 1 2 1 8 total 0.000000 0.000000
19 1 2 1 9 total 0.000000 0.000000
20 1 2 1 10 total 0.000000 0.000000
21 1 2 1 11 total 0.000000 0.000000
0 1 2 2 1 total 0.036372 0.006773
1 1 2 2 2 total 0.030162 0.003165
2 1 2 2 3 total 0.035485 0.006687
3 1 2 2 4 total 0.028388 0.005781
4 1 2 2 5 total 0.035485 0.007518
5 1 2 2 6 total 0.033711 0.004644
6 1 2 2 7 total 0.036372 0.004045
7 1 2 2 8 total 0.039921 0.005195
8 1 2 2 9 total 0.039034 0.007923
9 1 2 2 10 total 0.041695 0.005386
10 1 2 2 11 total 0.038147 0.003944
material group in group out mu bin nuclide mean std. dev.
33 1 1 1 1 total 0.025529 0.002692
34 1 1 1 2 total 0.028016 0.002666
35 1 1 1 3 total 0.031829 0.003739
36 1 1 1 4 total 0.028348 0.002519
37 1 1 1 5 total 0.030337 0.003534
38 1 1 1 6 total 0.029177 0.003461
39 1 1 1 7 total 0.030668 0.003682
40 1 1 1 8 total 0.035476 0.004666
41 1 1 1 9 total 0.043931 0.006899
42 1 1 1 10 total 0.044759 0.004466
43 1 1 1 11 total 0.058353 0.006082
22 1 1 2 1 total 0.000000 0.000000
23 1 1 2 2 total 0.000166 0.000196
24 1 1 2 3 total 0.000332 0.000290
25 1 1 2 4 total 0.000166 0.000196
26 1 1 2 5 total 0.000000 0.000000
27 1 1 2 6 total 0.000166 0.000196
28 1 1 2 7 total 0.000000 0.000000
29 1 1 2 8 total 0.000000 0.000000
30 1 1 2 9 total 0.000000 0.000000
31 1 1 2 10 total 0.000166 0.000196
32 1 1 2 11 total 0.000000 0.000000
11 1 2 1 1 total 0.000887 0.001538
12 1 2 1 2 total 0.000000 0.000000
13 1 2 1 3 total 0.000000 0.000000
14 1 2 1 4 total 0.000000 0.000000
15 1 2 1 5 total 0.000000 0.000000
16 1 2 1 6 total 0.000000 0.000000
17 1 2 1 7 total 0.000000 0.000000
18 1 2 1 8 total 0.000000 0.000000
19 1 2 1 9 total 0.000000 0.000000
20 1 2 1 10 total 0.000000 0.000000
21 1 2 1 11 total 0.000000 0.000000
0 1 2 2 1 total 0.036372 0.007026
1 1 2 2 2 total 0.030162 0.003524
2 1 2 2 3 total 0.035485 0.006931
3 1 2 2 4 total 0.028388 0.005962
4 1 2 2 5 total 0.035485 0.007736
5 1 2 2 6 total 0.033711 0.004957
6 1 2 2 7 total 0.036372 0.004455
7 1 2 2 8 total 0.039921 0.005585
8 1 2 2 9 total 0.039034 0.008173
9 1 2 2 10 total 0.041695 0.005796
10 1 2 2 11 total 0.038147 0.004404
material group in group out mu bin nuclide mean std. dev.
33 2 1 1 1 total 0.026289 0.004089
34 2 1 1 2 total 0.018269 0.002939
35 2 1 1 3 total 0.025398 0.002153
36 2 1 1 4 total 0.024061 0.005097
37 2 1 1 5 total 0.022279 0.003375
38 2 1 1 6 total 0.027626 0.004817
39 2 1 1 7 total 0.025843 0.003039
40 2 1 1 8 total 0.026735 0.006742
41 2 1 1 9 total 0.027626 0.005213
42 2 1 1 10 total 0.036537 0.005920
43 2 1 1 11 total 0.049459 0.004153
22 2 1 2 1 total 0.000000 0.000000
23 2 1 2 2 total 0.000000 0.000000
24 2 1 2 3 total 0.000000 0.000000
25 2 1 2 4 total 0.000000 0.000000
26 2 1 2 5 total 0.000000 0.000000
27 2 1 2 6 total 0.000000 0.000000
28 2 1 2 7 total 0.000000 0.000000
29 2 1 2 8 total 0.000000 0.000000
30 2 1 2 9 total 0.000000 0.000000
31 2 1 2 10 total 0.000000 0.000000
32 2 1 2 11 total 0.000000 0.000000
11 2 2 1 1 total 0.000000 0.000000
12 2 2 1 2 total 0.000000 0.000000
13 2 2 1 3 total 0.000000 0.000000
14 2 2 1 4 total 0.000000 0.000000
15 2 2 1 5 total 0.000000 0.000000
16 2 2 1 6 total 0.000000 0.000000
17 2 2 1 7 total 0.000000 0.000000
18 2 2 1 8 total 0.000000 0.000000
19 2 2 1 9 total 0.000000 0.000000
20 2 2 1 10 total 0.000000 0.000000
21 2 2 1 11 total 0.000000 0.000000
0 2 2 2 1 total 0.024485 0.007210
1 2 2 2 2 total 0.036727 0.005548
2 2 2 2 3 total 0.041624 0.010918
3 2 2 2 4 total 0.019588 0.008569
4 2 2 2 5 total 0.022036 0.007526
5 2 2 2 6 total 0.019588 0.011549
6 2 2 2 7 total 0.022036 0.006454
7 2 2 2 8 total 0.036727 0.010282
8 2 2 2 9 total 0.022036 0.005164
9 2 2 2 10 total 0.031830 0.011864
10 2 2 2 11 total 0.019588 0.005336
material group in group out mu bin nuclide mean std. dev.
33 2 1 1 1 total 0.026289 0.004089
34 2 1 1 2 total 0.018269 0.002939
35 2 1 1 3 total 0.025398 0.002153
36 2 1 1 4 total 0.024061 0.005097
37 2 1 1 5 total 0.022279 0.003375
38 2 1 1 6 total 0.027626 0.004817
39 2 1 1 7 total 0.025843 0.003039
40 2 1 1 8 total 0.026735 0.006742
41 2 1 1 9 total 0.027626 0.005213
42 2 1 1 10 total 0.036537 0.005920
43 2 1 1 11 total 0.049459 0.004153
22 2 1 2 1 total 0.000000 0.000000
23 2 1 2 2 total 0.000000 0.000000
24 2 1 2 3 total 0.000000 0.000000
25 2 1 2 4 total 0.000000 0.000000
26 2 1 2 5 total 0.000000 0.000000
27 2 1 2 6 total 0.000000 0.000000
28 2 1 2 7 total 0.000000 0.000000
29 2 1 2 8 total 0.000000 0.000000
30 2 1 2 9 total 0.000000 0.000000
31 2 1 2 10 total 0.000000 0.000000
32 2 1 2 11 total 0.000000 0.000000
11 2 2 1 1 total 0.000000 0.000000
12 2 2 1 2 total 0.000000 0.000000
13 2 2 1 3 total 0.000000 0.000000
14 2 2 1 4 total 0.000000 0.000000
15 2 2 1 5 total 0.000000 0.000000
16 2 2 1 6 total 0.000000 0.000000
17 2 2 1 7 total 0.000000 0.000000
18 2 2 1 8 total 0.000000 0.000000
19 2 2 1 9 total 0.000000 0.000000
20 2 2 1 10 total 0.000000 0.000000
21 2 2 1 11 total 0.000000 0.000000
0 2 2 2 1 total 0.024485 0.007210
1 2 2 2 2 total 0.036727 0.005548
2 2 2 2 3 total 0.041624 0.010918
3 2 2 2 4 total 0.019588 0.008569
4 2 2 2 5 total 0.022036 0.007526
5 2 2 2 6 total 0.019588 0.011549
6 2 2 2 7 total 0.022036 0.006454
7 2 2 2 8 total 0.036727 0.010282
8 2 2 2 9 total 0.022036 0.005164
9 2 2 2 10 total 0.031830 0.011864
10 2 2 2 11 total 0.019588 0.005336
material group in group out mu bin nuclide mean std. dev.
33 2 1 1 1 total 0.026462 0.003961
34 2 1 1 2 total 0.018389 0.002854
35 2 1 1 3 total 0.025565 0.001877
36 2 1 1 4 total 0.024220 0.005027
37 2 1 1 5 total 0.022425 0.003262
38 2 1 1 6 total 0.027808 0.004704
39 2 1 1 7 total 0.026014 0.002854
40 2 1 1 8 total 0.026911 0.006690
41 2 1 1 9 total 0.027808 0.005114
42 2 1 1 10 total 0.036778 0.005752
43 2 1 1 11 total 0.049785 0.003610
22 2 1 2 1 total 0.000000 0.000000
23 2 1 2 2 total 0.000000 0.000000
24 2 1 2 3 total 0.000000 0.000000
25 2 1 2 4 total 0.000000 0.000000
26 2 1 2 5 total 0.000000 0.000000
27 2 1 2 6 total 0.000000 0.000000
28 2 1 2 7 total 0.000000 0.000000
29 2 1 2 8 total 0.000000 0.000000
30 2 1 2 9 total 0.000000 0.000000
31 2 1 2 10 total 0.000000 0.000000
32 2 1 2 11 total 0.000000 0.000000
11 2 2 1 1 total 0.000000 0.000000
12 2 2 1 2 total 0.000000 0.000000
13 2 2 1 3 total 0.000000 0.000000
14 2 2 1 4 total 0.000000 0.000000
15 2 2 1 5 total 0.000000 0.000000
16 2 2 1 6 total 0.000000 0.000000
17 2 2 1 7 total 0.000000 0.000000
18 2 2 1 8 total 0.000000 0.000000
19 2 2 1 9 total 0.000000 0.000000
20 2 2 1 10 total 0.000000 0.000000
21 2 2 1 11 total 0.000000 0.000000
0 2 2 2 1 total 0.024415 0.007393
1 2 2 2 2 total 0.036622 0.006106
2 2 2 2 3 total 0.041505 0.011274
3 2 2 2 4 total 0.019532 0.008656
4 2 2 2 5 total 0.021973 0.007663
5 2 2 2 6 total 0.019532 0.011599
6 2 2 2 7 total 0.021973 0.006620
7 2 2 2 8 total 0.036622 0.010574
8 2 2 2 9 total 0.021973 0.005378
9 2 2 2 10 total 0.031739 0.012040
10 2 2 2 11 total 0.019532 0.005496
material group in group out mu bin nuclide mean std. dev.
33 2 1 1 1 total 0.026462 0.004589
34 2 1 1 2 total 0.018389 0.003277
35 2 1 1 3 total 0.025565 0.002922
36 2 1 1 4 total 0.024220 0.005456
37 2 1 1 5 total 0.022425 0.003808
38 2 1 1 6 total 0.027808 0.005297
39 2 1 1 7 total 0.026014 0.003652
40 2 1 1 8 total 0.026911 0.007093
41 2 1 1 9 total 0.027808 0.005664
42 2 1 1 10 total 0.036778 0.006592
43 2 1 1 11 total 0.049785 0.005660
22 2 1 2 1 total 0.000000 0.000000
23 2 1 2 2 total 0.000000 0.000000
24 2 1 2 3 total 0.000000 0.000000
25 2 1 2 4 total 0.000000 0.000000
26 2 1 2 5 total 0.000000 0.000000
27 2 1 2 6 total 0.000000 0.000000
28 2 1 2 7 total 0.000000 0.000000
29 2 1 2 8 total 0.000000 0.000000
30 2 1 2 9 total 0.000000 0.000000
31 2 1 2 10 total 0.000000 0.000000
32 2 1 2 11 total 0.000000 0.000000
11 2 2 1 1 total 0.000000 0.000000
12 2 2 1 2 total 0.000000 0.000000
13 2 2 1 3 total 0.000000 0.000000
14 2 2 1 4 total 0.000000 0.000000
15 2 2 1 5 total 0.000000 0.000000
16 2 2 1 6 total 0.000000 0.000000
17 2 2 1 7 total 0.000000 0.000000
18 2 2 1 8 total 0.000000 0.000000
19 2 2 1 9 total 0.000000 0.000000
20 2 2 1 10 total 0.000000 0.000000
21 2 2 1 11 total 0.000000 0.000000
0 2 2 2 1 total 0.024415 0.008094
1 2 2 2 2 total 0.036622 0.007855
2 2 2 2 3 total 0.041505 0.012588
3 2 2 2 4 total 0.019532 0.009048
4 2 2 2 5 total 0.021973 0.008217
5 2 2 2 6 total 0.019532 0.011894
6 2 2 2 7 total 0.021973 0.007253
7 2 2 2 8 total 0.036622 0.011671
8 2 2 2 9 total 0.021973 0.006141
9 2 2 2 10 total 0.031739 0.012779
10 2 2 2 11 total 0.019532 0.006096
material group in group out mu bin nuclide mean std. dev.
33 3 1 1 1 total 0.007001 0.000582
34 3 1 1 2 total 0.007728 0.001008
35 3 1 1 3 total 0.006819 0.001120
36 3 1 1 4 total 0.006092 0.000787
37 3 1 1 5 total 0.007183 0.000663
38 3 1 1 6 total 0.011274 0.000704
39 3 1 1 7 total 0.042642 0.002093
40 3 1 1 8 total 0.074464 0.002664
41 3 1 1 9 total 0.119015 0.006892
42 3 1 1 10 total 0.153293 0.006049
43 3 1 1 11 total 0.204390 0.010619
22 3 1 2 1 total 0.000818 0.000302
23 3 1 2 2 total 0.000818 0.000094
24 3 1 2 3 total 0.001091 0.000234
25 3 1 2 4 total 0.001091 0.000310
26 3 1 2 5 total 0.002546 0.000607
27 3 1 2 6 total 0.002364 0.000340
28 3 1 2 7 total 0.004546 0.000835
29 3 1 2 8 total 0.004819 0.000831
30 3 1 2 9 total 0.006092 0.001113
31 3 1 2 10 total 0.004546 0.000757
32 3 1 2 11 total 0.002637 0.000371
11 3 2 1 1 total 0.000000 0.000000
12 3 2 1 2 total 0.000000 0.000000
13 3 2 1 3 total 0.000000 0.000000
14 3 2 1 4 total 0.000000 0.000000
15 3 2 1 5 total 0.000000 0.000000
16 3 2 1 6 total 0.000000 0.000000
17 3 2 1 7 total 0.000000 0.000000
18 3 2 1 8 total 0.000000 0.000000
19 3 2 1 9 total 0.000000 0.000000
20 3 2 1 10 total 0.000000 0.000000
21 3 2 1 11 total 0.000443 0.000445
0 3 2 2 1 total 0.088669 0.015373
1 3 2 2 2 total 0.098422 0.016029
2 3 2 2 3 total 0.126796 0.022922
3 3 2 2 4 total 0.118373 0.018371
4 3 2 2 5 total 0.131230 0.014538
5 3 2 2 6 total 0.167584 0.027220
6 3 2 2 7 total 0.180441 0.023605
7 3 2 2 8 total 0.213691 0.028779
8 3 2 2 9 total 0.236745 0.024777
9 3 2 2 10 total 0.333394 0.041247
10 3 2 2 11 total 0.339601 0.037814
material group in group out mu bin nuclide mean std. dev.
33 3 1 1 1 total 0.007001 0.000582
34 3 1 1 2 total 0.007728 0.001008
35 3 1 1 3 total 0.006819 0.001120
36 3 1 1 4 total 0.006092 0.000787
37 3 1 1 5 total 0.007183 0.000663
38 3 1 1 6 total 0.011274 0.000704
39 3 1 1 7 total 0.042642 0.002093
40 3 1 1 8 total 0.074464 0.002664
41 3 1 1 9 total 0.119015 0.006892
42 3 1 1 10 total 0.153293 0.006049
43 3 1 1 11 total 0.204390 0.010619
22 3 1 2 1 total 0.000818 0.000302
23 3 1 2 2 total 0.000818 0.000094
24 3 1 2 3 total 0.001091 0.000234
25 3 1 2 4 total 0.001091 0.000310
26 3 1 2 5 total 0.002546 0.000607
27 3 1 2 6 total 0.002364 0.000340
28 3 1 2 7 total 0.004546 0.000835
29 3 1 2 8 total 0.004819 0.000831
30 3 1 2 9 total 0.006092 0.001113
31 3 1 2 10 total 0.004546 0.000757
32 3 1 2 11 total 0.002637 0.000371
11 3 2 1 1 total 0.000000 0.000000
12 3 2 1 2 total 0.000000 0.000000
13 3 2 1 3 total 0.000000 0.000000
14 3 2 1 4 total 0.000000 0.000000
15 3 2 1 5 total 0.000000 0.000000
16 3 2 1 6 total 0.000000 0.000000
17 3 2 1 7 total 0.000000 0.000000
18 3 2 1 8 total 0.000000 0.000000
19 3 2 1 9 total 0.000000 0.000000
20 3 2 1 10 total 0.000000 0.000000
21 3 2 1 11 total 0.000443 0.000445
0 3 2 2 1 total 0.088669 0.015373
1 3 2 2 2 total 0.098422 0.016029
2 3 2 2 3 total 0.126796 0.022922
3 3 2 2 4 total 0.118373 0.018371
4 3 2 2 5 total 0.131230 0.014538
5 3 2 2 6 total 0.167584 0.027220
6 3 2 2 7 total 0.180441 0.023605
7 3 2 2 8 total 0.213691 0.028779
8 3 2 2 9 total 0.236745 0.024777
9 3 2 2 10 total 0.333394 0.041247
10 3 2 2 11 total 0.339601 0.037814
material group in group out mu bin nuclide mean std. dev.
33 3 1 1 1 total 0.006924 0.000646
34 3 1 1 2 total 0.007643 0.001048
35 3 1 1 3 total 0.006744 0.001144
36 3 1 1 4 total 0.006025 0.000819
37 3 1 1 5 total 0.007104 0.000721
38 3 1 1 6 total 0.011150 0.000841
39 3 1 1 7 total 0.042173 0.002735
40 3 1 1 8 total 0.073645 0.004084
41 3 1 1 9 total 0.117706 0.008446
42 3 1 1 10 total 0.151606 0.008778
43 3 1 1 11 total 0.202141 0.013551
22 3 1 2 1 total 0.000809 0.000301
23 3 1 2 2 total 0.000809 0.000099
24 3 1 2 3 total 0.001079 0.000236
25 3 1 2 4 total 0.001079 0.000310
26 3 1 2 5 total 0.002518 0.000610
27 3 1 2 6 total 0.002338 0.000351
28 3 1 2 7 total 0.004496 0.000848
29 3 1 2 8 total 0.004766 0.000847
30 3 1 2 9 total 0.006025 0.001130
31 3 1 2 10 total 0.004496 0.000773
32 3 1 2 11 total 0.002608 0.000383
11 3 2 1 1 total 0.000000 0.000000
12 3 2 1 2 total 0.000000 0.000000
13 3 2 1 3 total 0.000000 0.000000
14 3 2 1 4 total 0.000000 0.000000
15 3 2 1 5 total 0.000000 0.000000
16 3 2 1 6 total 0.000000 0.000000
17 3 2 1 7 total 0.000000 0.000000
18 3 2 1 8 total 0.000000 0.000000
19 3 2 1 9 total 0.000000 0.000000
20 3 2 1 10 total 0.000000 0.000000
21 3 2 1 11 total 0.000440 0.000443
0 3 2 2 1 total 0.088029 0.016753
1 3 2 2 2 total 0.097712 0.017664
2 3 2 2 3 total 0.125881 0.024808
3 3 2 2 4 total 0.117518 0.020437
4 3 2 2 5 total 0.130282 0.017687
5 3 2 2 6 total 0.166374 0.030012
6 3 2 2 7 total 0.179138 0.027327
7 3 2 2 8 total 0.212149 0.033068
8 3 2 2 9 total 0.235036 0.030744
9 3 2 2 10 total 0.330988 0.048491
10 3 2 2 11 total 0.337150 0.045927
material group in group out mu bin nuclide mean std. dev.
33 3 1 1 1 total 0.006924 0.000686
34 3 1 1 2 total 0.007643 0.001078
35 3 1 1 3 total 0.006744 0.001166
36 3 1 1 4 total 0.006025 0.000843
37 3 1 1 5 total 0.007104 0.000759
38 3 1 1 6 total 0.011150 0.000920
39 3 1 1 7 total 0.042173 0.003073
40 3 1 1 8 total 0.073645 0.004762
41 3 1 1 9 total 0.117706 0.009309
42 3 1 1 10 total 0.151606 0.010122
43 3 1 1 11 total 0.202141 0.015127
22 3 1 2 1 total 0.000809 0.000308
23 3 1 2 2 total 0.000809 0.000118
24 3 1 2 3 total 0.001079 0.000251
25 3 1 2 4 total 0.001079 0.000321
26 3 1 2 5 total 0.002518 0.000642
27 3 1 2 6 total 0.002338 0.000397
28 3 1 2 7 total 0.004496 0.000920
29 3 1 2 8 total 0.004766 0.000928
30 3 1 2 9 total 0.006025 0.001227
31 3 1 2 10 total 0.004496 0.000852
32 3 1 2 11 total 0.002608 0.000436
11 3 2 1 1 total 0.000000 0.000000
12 3 2 1 2 total 0.000000 0.000000
13 3 2 1 3 total 0.000000 0.000000
14 3 2 1 4 total 0.000000 0.000000
15 3 2 1 5 total 0.000000 0.000000
16 3 2 1 6 total 0.000000 0.000000
17 3 2 1 7 total 0.000000 0.000000
18 3 2 1 8 total 0.000000 0.000000
19 3 2 1 9 total 0.000000 0.000000
20 3 2 1 10 total 0.000000 0.000000
21 3 2 1 11 total 0.000440 0.000764
0 3 2 2 1 total 0.088029 0.018984
1 3 2 2 2 total 0.097712 0.020255
2 3 2 2 3 total 0.125881 0.027901
3 3 2 2 4 total 0.117518 0.023659
4 3 2 2 5 total 0.130282 0.022078
5 3 2 2 6 total 0.166374 0.034431
6 3 2 2 7 total 0.179138 0.032816
7 3 2 2 8 total 0.212149 0.039453
8 3 2 2 9 total 0.235036 0.038904
9 3 2 2 10 total 0.330988 0.058979
10 3 2 2 11 total 0.337150 0.057260

View file

@ -0,0 +1,64 @@
import hashlib
import openmc
import openmc.mgxs
from openmc.examples import pwr_pin_cell
from tests.testing_harness import PyAPITestHarness
class MGXSTestHarness(PyAPITestHarness):
def __init__(self, *args, **kwargs):
# Generate inputs using parent class routine
super().__init__(*args, **kwargs)
# Initialize a two-group structure
energy_groups = openmc.mgxs.EnergyGroups(group_edges=[0, 0.625, 20.e6])
# Initialize MGXS Library for a few cross section types
self.mgxs_lib = openmc.mgxs.Library(self._model.geometry)
self.mgxs_lib.by_nuclide = False
# Test all MGXS types
self.mgxs_lib.mgxs_types = ['scatter matrix', 'nu-scatter matrix',
'consistent scatter matrix',
'consistent nu-scatter matrix']
self.mgxs_lib.energy_groups = energy_groups
self.mgxs_lib.scatter_format = 'histogram'
self.mgxs_lib.histogram_bins = 11
self.mgxs_lib.domain_type = 'material'
self.mgxs_lib.build_library()
# Add tallies
self.mgxs_lib.add_to_tallies_file(self._model.tallies, merge=False)
def _get_results(self, hash_output=False):
"""Digest info in the statepoint and return as a string."""
# Read the statepoint file.
sp = openmc.StatePoint(self._sp_name)
# Load the MGXS library from the statepoint
self.mgxs_lib.load_from_statepoint(sp)
# Build a string from Pandas Dataframe for each MGXS
outstr = ''
for domain in self.mgxs_lib.domains:
for mgxs_type in self.mgxs_lib.mgxs_types:
mgxs = self.mgxs_lib.get_mgxs(domain, mgxs_type)
df = mgxs.get_pandas_dataframe()
outstr += df.to_string() + '\n'
# Hash the results if necessary
if hash_output:
sha512 = hashlib.sha512()
sha512.update(outstr.encode('utf-8'))
outstr = sha512.hexdigest()
return outstr
def test_mgxs_library_histogram():
model = pwr_pin_cell()
harness = MGXSTestHarness('statepoint.10.h5', model)
harness.main()

View file

@ -323,7 +323,13 @@
<filter id="5" type="energyout">
<bins>0.0 20000000.0</bins>
</filter>
<filter id="59" type="delayedgroup">
<filter id="6" type="legendre">
<order>1</order>
</filter>
<filter id="28" type="legendre">
<order>3</order>
</filter>
<filter id="65" type="delayedgroup">
<bins>1 2 3 4 5 6</bins>
</filter>
<tally id="1">
@ -357,9 +363,9 @@
<estimator>analog</estimator>
</tally>
<tally id="6">
<filters>1 5</filters>
<filters>1 5 6</filters>
<nuclides>total</nuclides>
<scores>scatter-1</scores>
<scores>scatter</scores>
<estimator>analog</estimator>
</tally>
<tally id="7">
@ -381,9 +387,9 @@
<estimator>analog</estimator>
</tally>
<tally id="10">
<filters>1 5</filters>
<filters>1 5 6</filters>
<nuclides>total</nuclides>
<scores>nu-scatter-1</scores>
<scores>nu-scatter</scores>
<estimator>analog</estimator>
</tally>
<tally id="11">
@ -483,9 +489,9 @@
<estimator>analog</estimator>
</tally>
<tally id="27">
<filters>1 2 5</filters>
<filters>1 2 5 28</filters>
<nuclides>total</nuclides>
<scores>scatter-P3</scores>
<scores>scatter</scores>
<estimator>analog</estimator>
</tally>
<tally id="28">
@ -495,9 +501,9 @@
<estimator>analog</estimator>
</tally>
<tally id="29">
<filters>1 2 5</filters>
<filters>1 2 5 28</filters>
<nuclides>total</nuclides>
<scores>nu-scatter-P3</scores>
<scores>nu-scatter</scores>
<estimator>analog</estimator>
</tally>
<tally id="30">
@ -543,9 +549,9 @@
<estimator>tracklength</estimator>
</tally>
<tally id="37">
<filters>1 2 5</filters>
<filters>1 2 5 28</filters>
<nuclides>total</nuclides>
<scores>scatter-P3</scores>
<scores>scatter</scores>
<estimator>analog</estimator>
</tally>
<tally id="38">
@ -561,139 +567,133 @@
<estimator>tracklength</estimator>
</tally>
<tally id="40">
<filters>1 2 5</filters>
<filters>1 2 5 28</filters>
<nuclides>total</nuclides>
<scores>scatter-P3</scores>
<scores>scatter</scores>
<estimator>analog</estimator>
</tally>
<tally id="41">
<filters>1 2 5</filters>
<nuclides>total</nuclides>
<scores>nu-scatter-0</scores>
<scores>nu-scatter</scores>
<estimator>analog</estimator>
</tally>
<tally id="42">
<filters>1 2 5</filters>
<filters>1 2</filters>
<nuclides>total</nuclides>
<scores>scatter-0</scores>
<scores>nu-fission</scores>
<estimator>analog</estimator>
</tally>
<tally id="43">
<filters>1 2</filters>
<filters>1 5</filters>
<nuclides>total</nuclides>
<scores>nu-fission</scores>
<estimator>analog</estimator>
</tally>
<tally id="44">
<filters>1 5</filters>
<filters>1 2</filters>
<nuclides>total</nuclides>
<scores>nu-fission</scores>
<scores>prompt-nu-fission</scores>
<estimator>analog</estimator>
</tally>
<tally id="45">
<filters>1 2</filters>
<filters>1 5</filters>
<nuclides>total</nuclides>
<scores>prompt-nu-fission</scores>
<estimator>analog</estimator>
</tally>
<tally id="46">
<filters>1 5</filters>
<nuclides>total</nuclides>
<scores>prompt-nu-fission</scores>
<estimator>analog</estimator>
</tally>
<tally id="47">
<filters>1 2</filters>
<nuclides>total</nuclides>
<scores>flux</scores>
<estimator>tracklength</estimator>
</tally>
<tally id="48">
<tally id="47">
<filters>1 2</filters>
<nuclides>total</nuclides>
<scores>inverse-velocity</scores>
<estimator>tracklength</estimator>
</tally>
<tally id="49">
<tally id="48">
<filters>1 2</filters>
<nuclides>total</nuclides>
<scores>flux</scores>
<estimator>tracklength</estimator>
</tally>
<tally id="49">
<filters>1 2</filters>
<nuclides>total</nuclides>
<scores>prompt-nu-fission</scores>
<estimator>tracklength</estimator>
</tally>
<tally id="50">
<filters>1 2</filters>
<nuclides>total</nuclides>
<scores>prompt-nu-fission</scores>
<estimator>tracklength</estimator>
</tally>
<tally id="51">
<filters>1 2</filters>
<nuclides>total</nuclides>
<scores>flux</scores>
<estimator>analog</estimator>
</tally>
<tally id="52">
<tally id="51">
<filters>1 2 5</filters>
<nuclides>total</nuclides>
<scores>prompt-nu-fission</scores>
<estimator>analog</estimator>
</tally>
<tally id="53">
<tally id="52">
<filters>1 2</filters>
<nuclides>total</nuclides>
<scores>flux</scores>
<estimator>tracklength</estimator>
</tally>
<tally id="54">
<filters>1 59 2</filters>
<tally id="53">
<filters>1 65 2</filters>
<nuclides>total</nuclides>
<scores>delayed-nu-fission</scores>
<estimator>tracklength</estimator>
</tally>
<tally id="54">
<filters>1 65 2</filters>
<nuclides>total</nuclides>
<scores>delayed-nu-fission</scores>
<estimator>analog</estimator>
</tally>
<tally id="55">
<filters>1 59 2</filters>
<filters>1 65 5</filters>
<nuclides>total</nuclides>
<scores>delayed-nu-fission</scores>
<estimator>analog</estimator>
</tally>
<tally id="56">
<filters>1 59 5</filters>
<nuclides>total</nuclides>
<scores>delayed-nu-fission</scores>
<estimator>analog</estimator>
</tally>
<tally id="57">
<filters>1 2</filters>
<nuclides>total</nuclides>
<scores>nu-fission</scores>
<estimator>tracklength</estimator>
</tally>
<tally id="57">
<filters>1 65 2</filters>
<nuclides>total</nuclides>
<scores>delayed-nu-fission</scores>
<estimator>tracklength</estimator>
</tally>
<tally id="58">
<filters>1 59 2</filters>
<filters>1 65 2</filters>
<nuclides>total</nuclides>
<scores>delayed-nu-fission</scores>
<estimator>tracklength</estimator>
</tally>
<tally id="59">
<filters>1 59 2</filters>
<nuclides>total</nuclides>
<scores>delayed-nu-fission</scores>
<estimator>tracklength</estimator>
</tally>
<tally id="60">
<filters>1 59 2</filters>
<filters>1 65 2</filters>
<nuclides>total</nuclides>
<scores>decay-rate</scores>
<estimator>tracklength</estimator>
</tally>
<tally id="61">
<tally id="60">
<filters>1 2</filters>
<nuclides>total</nuclides>
<scores>flux</scores>
<estimator>analog</estimator>
</tally>
<tally id="62">
<filters>1 59 2 5</filters>
<tally id="61">
<filters>1 65 2 5</filters>
<nuclides>total</nuclides>
<scores>delayed-nu-fission</scores>
<estimator>analog</estimator>

View file

@ -58,42 +58,42 @@
2 1 2 1 1 total 0.628158 0.064356
1 2 1 1 1 total 0.640809 0.158369
3 2 2 1 1 total 0.645171 0.080467
mesh 1 group in group out nuclide moment mean std. dev.
x y z
0 1 1 1 1 1 total P0 0.763779 0.070696
1 1 1 1 1 1 total P1 0.288556 0.024446
2 1 1 1 1 1 total P2 0.082441 0.011443
3 1 1 1 1 1 total P3 -0.005627 0.012638
8 1 2 1 1 1 total P0 0.628158 0.064356
9 1 2 1 1 1 total P1 0.245583 0.022676
10 1 2 1 1 1 total P2 0.086370 0.007833
11 1 2 1 1 1 total P3 0.019590 0.005345
4 2 1 1 1 1 total P0 0.640809 0.158369
5 2 1 1 1 1 total P1 0.273553 0.066437
6 2 1 1 1 1 total P2 0.108446 0.024435
7 2 1 1 1 1 total P3 0.012229 0.003785
12 2 2 1 1 1 total P0 0.645171 0.080467
13 2 2 1 1 1 total P1 0.252215 0.032154
14 2 2 1 1 1 total P2 0.089251 0.009734
15 2 2 1 1 1 total P3 0.004748 0.002987
mesh 1 group in group out nuclide moment mean std. dev.
x y z
0 1 1 1 1 1 total P0 0.763779 0.070696
1 1 1 1 1 1 total P1 0.288556 0.024446
2 1 1 1 1 1 total P2 0.082441 0.011443
3 1 1 1 1 1 total P3 -0.005627 0.012638
8 1 2 1 1 1 total P0 0.628158 0.064356
9 1 2 1 1 1 total P1 0.245583 0.022676
10 1 2 1 1 1 total P2 0.086370 0.007833
11 1 2 1 1 1 total P3 0.019590 0.005345
4 2 1 1 1 1 total P0 0.640809 0.158369
5 2 1 1 1 1 total P1 0.273553 0.066437
6 2 1 1 1 1 total P2 0.108446 0.024435
7 2 1 1 1 1 total P3 0.012229 0.003785
12 2 2 1 1 1 total P0 0.645171 0.080467
13 2 2 1 1 1 total P1 0.252215 0.032154
14 2 2 1 1 1 total P2 0.089251 0.009734
15 2 2 1 1 1 total P3 0.004748 0.002987
mesh 1 group in group out legendre nuclide mean std. dev.
x y z
0 1 1 1 1 1 P0 total 0.763779 0.070696
1 1 1 1 1 1 P1 total 0.288556 0.024446
2 1 1 1 1 1 P2 total 0.082441 0.011443
3 1 1 1 1 1 P3 total -0.005627 0.012638
8 1 2 1 1 1 P0 total 0.628158 0.064356
9 1 2 1 1 1 P1 total 0.245583 0.022676
10 1 2 1 1 1 P2 total 0.086370 0.007833
11 1 2 1 1 1 P3 total 0.019590 0.005345
4 2 1 1 1 1 P0 total 0.640809 0.158369
5 2 1 1 1 1 P1 total 0.273553 0.066437
6 2 1 1 1 1 P2 total 0.108446 0.024435
7 2 1 1 1 1 P3 total 0.012229 0.003785
12 2 2 1 1 1 P0 total 0.645171 0.080467
13 2 2 1 1 1 P1 total 0.252215 0.032154
14 2 2 1 1 1 P2 total 0.089251 0.009734
15 2 2 1 1 1 P3 total 0.004748 0.002987
mesh 1 group in group out legendre nuclide mean std. dev.
x y z
0 1 1 1 1 1 P0 total 0.763779 0.070696
1 1 1 1 1 1 P1 total 0.288556 0.024446
2 1 1 1 1 1 P2 total 0.082441 0.011443
3 1 1 1 1 1 P3 total -0.005627 0.012638
8 1 2 1 1 1 P0 total 0.628158 0.064356
9 1 2 1 1 1 P1 total 0.245583 0.022676
10 1 2 1 1 1 P2 total 0.086370 0.007833
11 1 2 1 1 1 P3 total 0.019590 0.005345
4 2 1 1 1 1 P0 total 0.640809 0.158369
5 2 1 1 1 1 P1 total 0.273553 0.066437
6 2 1 1 1 1 P2 total 0.108446 0.024435
7 2 1 1 1 1 P3 total 0.012229 0.003785
12 2 2 1 1 1 P0 total 0.645171 0.080467
13 2 2 1 1 1 P1 total 0.252215 0.032154
14 2 2 1 1 1 P2 total 0.089251 0.009734
15 2 2 1 1 1 P3 total 0.004748 0.002987
mesh 1 group in group out nuclide mean std. dev.
x y z
0 1 1 1 1 1 total 1.0 0.108337
@ -112,42 +112,42 @@
2 1 2 1 1 1 total 1.0 0.113128
1 2 1 1 1 1 total 1.0 0.238517
3 2 2 1 1 1 total 1.0 0.132597
mesh 1 group in group out nuclide moment mean std. dev.
x y z
0 1 1 1 1 1 total P0 0.735256 0.113047
1 1 1 1 1 1 total P1 0.277780 0.041434
2 1 1 1 1 1 total P2 0.079362 0.014706
3 1 1 1 1 1 total P3 -0.005417 0.012184
8 1 2 1 1 1 total P0 0.624575 0.110512
9 1 2 1 1 1 total P1 0.244182 0.041824
10 1 2 1 1 1 total P2 0.085877 0.014634
11 1 2 1 1 1 total P3 0.019478 0.006012
4 2 1 1 1 1 total P0 0.633925 0.212349
5 2 1 1 1 1 total P1 0.270615 0.089799
6 2 1 1 1 1 total P2 0.107281 0.034246
7 2 1 1 1 1 total P3 0.012098 0.004637
12 2 2 1 1 1 total P0 0.655214 0.126119
13 2 2 1 1 1 total P1 0.256141 0.049765
14 2 2 1 1 1 total P2 0.090641 0.016563
15 2 2 1 1 1 total P3 0.004822 0.003115
mesh 1 group in group out nuclide moment mean std. dev.
x y z
0 1 1 1 1 1 total P0 0.735256 0.138292
1 1 1 1 1 1 total P1 0.277780 0.051210
2 1 1 1 1 1 total P2 0.079362 0.017035
3 1 1 1 1 1 total P3 -0.005417 0.012198
8 1 2 1 1 1 total P0 0.624575 0.131169
9 1 2 1 1 1 total P1 0.244182 0.050123
10 1 2 1 1 1 total P2 0.085877 0.017565
11 1 2 1 1 1 total P3 0.019478 0.006403
4 2 1 1 1 1 total P0 0.633925 0.260681
5 2 1 1 1 1 total P1 0.270615 0.110590
6 2 1 1 1 1 total P2 0.107281 0.042750
7 2 1 1 1 1 total P3 0.012098 0.005462
12 2 2 1 1 1 total P0 0.655214 0.153147
13 2 2 1 1 1 total P1 0.256141 0.060250
14 2 2 1 1 1 total P2 0.090641 0.020464
15 2 2 1 1 1 total P3 0.004822 0.003180
mesh 1 group in group out legendre nuclide mean std. dev.
x y z
0 1 1 1 1 1 P0 total 0.735256 0.113047
1 1 1 1 1 1 P1 total 0.277780 0.041434
2 1 1 1 1 1 P2 total 0.079362 0.014706
3 1 1 1 1 1 P3 total -0.005417 0.012184
8 1 2 1 1 1 P0 total 0.624575 0.110512
9 1 2 1 1 1 P1 total 0.244182 0.041824
10 1 2 1 1 1 P2 total 0.085877 0.014634
11 1 2 1 1 1 P3 total 0.019478 0.006012
4 2 1 1 1 1 P0 total 0.633925 0.212349
5 2 1 1 1 1 P1 total 0.270615 0.089799
6 2 1 1 1 1 P2 total 0.107281 0.034246
7 2 1 1 1 1 P3 total 0.012098 0.004637
12 2 2 1 1 1 P0 total 0.655214 0.126119
13 2 2 1 1 1 P1 total 0.256141 0.049765
14 2 2 1 1 1 P2 total 0.090641 0.016563
15 2 2 1 1 1 P3 total 0.004822 0.003115
mesh 1 group in group out legendre nuclide mean std. dev.
x y z
0 1 1 1 1 1 P0 total 0.735256 0.138292
1 1 1 1 1 1 P1 total 0.277780 0.051210
2 1 1 1 1 1 P2 total 0.079362 0.017035
3 1 1 1 1 1 P3 total -0.005417 0.012198
8 1 2 1 1 1 P0 total 0.624575 0.131169
9 1 2 1 1 1 P1 total 0.244182 0.050123
10 1 2 1 1 1 P2 total 0.085877 0.017565
11 1 2 1 1 1 P3 total 0.019478 0.006403
4 2 1 1 1 1 P0 total 0.633925 0.260681
5 2 1 1 1 1 P1 total 0.270615 0.110590
6 2 1 1 1 1 P2 total 0.107281 0.042750
7 2 1 1 1 1 P3 total 0.012098 0.005462
12 2 2 1 1 1 P0 total 0.655214 0.153147
13 2 2 1 1 1 P1 total 0.256141 0.060250
14 2 2 1 1 1 P2 total 0.090641 0.020464
15 2 2 1 1 1 P3 total 0.004822 0.003180
mesh 1 group out nuclide mean std. dev.
x y z
0 1 1 1 1 total 1.0 0.300047

View file

@ -28,40 +28,40 @@
material group in nuclide mean std. dev.
1 1 1 total 0.385188 0.026946
0 1 2 total 0.412389 0.015425
material group in group out nuclide moment mean std. dev.
12 1 1 1 total P0 0.384199 0.027001
13 1 1 1 total P1 0.051870 0.006983
14 1 1 1 total P2 0.020069 0.002846
15 1 1 1 total P3 0.009478 0.002234
8 1 1 2 total P0 0.000989 0.000482
9 1 1 2 total P1 -0.000207 0.000149
10 1 1 2 total P2 -0.000103 0.000184
11 1 1 2 total P3 0.000234 0.000128
4 1 2 1 total P0 0.000925 0.000925
5 1 2 1 total P1 -0.000768 0.000768
6 1 2 1 total P2 0.000494 0.000494
7 1 2 1 total P3 -0.000171 0.000172
0 1 2 2 total P0 0.411465 0.015245
1 1 2 2 total P1 0.016482 0.004502
2 1 2 2 total P2 0.006371 0.010551
3 1 2 2 total P3 -0.010499 0.010438
material group in group out nuclide moment mean std. dev.
12 1 1 1 total P0 0.384199 0.027001
13 1 1 1 total P1 0.051870 0.006983
14 1 1 1 total P2 0.020069 0.002846
15 1 1 1 total P3 0.009478 0.002234
8 1 1 2 total P0 0.000989 0.000482
9 1 1 2 total P1 -0.000207 0.000149
10 1 1 2 total P2 -0.000103 0.000184
11 1 1 2 total P3 0.000234 0.000128
4 1 2 1 total P0 0.000925 0.000925
5 1 2 1 total P1 -0.000768 0.000768
6 1 2 1 total P2 0.000494 0.000494
7 1 2 1 total P3 -0.000171 0.000172
0 1 2 2 total P0 0.411465 0.015245
1 1 2 2 total P1 0.016482 0.004502
2 1 2 2 total P2 0.006371 0.010551
3 1 2 2 total P3 -0.010499 0.010438
material group in group out legendre nuclide mean std. dev.
12 1 1 1 P0 total 0.384199 0.027001
13 1 1 1 P1 total 0.051870 0.006983
14 1 1 1 P2 total 0.020069 0.002846
15 1 1 1 P3 total 0.009478 0.002234
8 1 1 2 P0 total 0.000989 0.000482
9 1 1 2 P1 total -0.000207 0.000149
10 1 1 2 P2 total -0.000103 0.000184
11 1 1 2 P3 total 0.000234 0.000128
4 1 2 1 P0 total 0.000925 0.000925
5 1 2 1 P1 total -0.000768 0.000768
6 1 2 1 P2 total 0.000494 0.000494
7 1 2 1 P3 total -0.000171 0.000172
0 1 2 2 P0 total 0.411465 0.015245
1 1 2 2 P1 total 0.016482 0.004502
2 1 2 2 P2 total 0.006371 0.010551
3 1 2 2 P3 total -0.010499 0.010438
material group in group out legendre nuclide mean std. dev.
12 1 1 1 P0 total 0.384199 0.027001
13 1 1 1 P1 total 0.051870 0.006983
14 1 1 1 P2 total 0.020069 0.002846
15 1 1 1 P3 total 0.009478 0.002234
8 1 1 2 P0 total 0.000989 0.000482
9 1 1 2 P1 total -0.000207 0.000149
10 1 1 2 P2 total -0.000103 0.000184
11 1 1 2 P3 total 0.000234 0.000128
4 1 2 1 P0 total 0.000925 0.000925
5 1 2 1 P1 total -0.000768 0.000768
6 1 2 1 P2 total 0.000494 0.000494
7 1 2 1 P3 total -0.000171 0.000172
0 1 2 2 P0 total 0.411465 0.015245
1 1 2 2 P1 total 0.016482 0.004502
2 1 2 2 P2 total 0.006371 0.010551
3 1 2 2 P3 total -0.010499 0.010438
material group in group out nuclide mean std. dev.
3 1 1 1 total 1.0 0.078516
2 1 1 2 total 1.0 0.687184
@ -77,40 +77,40 @@
2 1 1 2 total 0.002567 0.001256
1 1 2 1 total 0.002242 0.002243
0 1 2 2 total 0.997758 0.041053
material group in group out nuclide moment mean std. dev.
12 1 1 1 total P0 0.386423 0.036629
13 1 1 1 total P1 0.052170 0.007767
14 1 1 1 total P2 0.020185 0.003138
15 1 1 1 total P3 0.009533 0.002327
8 1 1 2 total P0 0.000995 0.000489
9 1 1 2 total P1 -0.000208 0.000150
10 1 1 2 total P2 -0.000104 0.000186
11 1 1 2 total P3 0.000236 0.000130
4 1 2 1 total P0 0.000887 0.000889
5 1 2 1 total P1 -0.000737 0.000738
6 1 2 1 total P2 0.000474 0.000475
7 1 2 1 total P3 -0.000165 0.000165
0 1 2 2 total P0 0.394772 0.029871
1 1 2 2 total P1 0.015813 0.004443
2 1 2 2 total P2 0.006113 0.010131
3 1 2 2 total P3 -0.010073 0.010037
material group in group out nuclide moment mean std. dev.
12 1 1 1 total P0 0.386423 0.047563
13 1 1 1 total P1 0.052170 0.008781
14 1 1 1 total P2 0.020185 0.003515
15 1 1 1 total P3 0.009533 0.002444
8 1 1 2 total P0 0.000995 0.000841
9 1 1 2 total P1 -0.000208 0.000208
10 1 1 2 total P2 -0.000104 0.000199
11 1 1 2 total P3 0.000236 0.000208
4 1 2 1 total P0 0.000887 0.001538
5 1 2 1 total P1 -0.000737 0.001277
6 1 2 1 total P2 0.000474 0.000821
7 1 2 1 total P3 -0.000165 0.000285
0 1 2 2 total P0 0.394772 0.033999
1 1 2 2 total P1 0.015813 0.004491
2 1 2 2 total P2 0.006113 0.010134
3 1 2 2 total P3 -0.010073 0.010045
material group in group out legendre nuclide mean std. dev.
12 1 1 1 P0 total 0.386423 0.036629
13 1 1 1 P1 total 0.052170 0.007767
14 1 1 1 P2 total 0.020185 0.003138
15 1 1 1 P3 total 0.009533 0.002327
8 1 1 2 P0 total 0.000995 0.000489
9 1 1 2 P1 total -0.000208 0.000150
10 1 1 2 P2 total -0.000104 0.000186
11 1 1 2 P3 total 0.000236 0.000130
4 1 2 1 P0 total 0.000887 0.000889
5 1 2 1 P1 total -0.000737 0.000738
6 1 2 1 P2 total 0.000474 0.000475
7 1 2 1 P3 total -0.000165 0.000165
0 1 2 2 P0 total 0.394772 0.029871
1 1 2 2 P1 total 0.015813 0.004443
2 1 2 2 P2 total 0.006113 0.010131
3 1 2 2 P3 total -0.010073 0.010037
material group in group out legendre nuclide mean std. dev.
12 1 1 1 P0 total 0.386423 0.047563
13 1 1 1 P1 total 0.052170 0.008781
14 1 1 1 P2 total 0.020185 0.003515
15 1 1 1 P3 total 0.009533 0.002444
8 1 1 2 P0 total 0.000995 0.000841
9 1 1 2 P1 total -0.000208 0.000208
10 1 1 2 P2 total -0.000104 0.000199
11 1 1 2 P3 total 0.000236 0.000208
4 1 2 1 P0 total 0.000887 0.001538
5 1 2 1 P1 total -0.000737 0.001277
6 1 2 1 P2 total 0.000474 0.000821
7 1 2 1 P3 total -0.000165 0.000285
0 1 2 2 P0 total 0.394772 0.033999
1 1 2 2 P1 total 0.015813 0.004491
2 1 2 2 P2 total 0.006113 0.010134
3 1 2 2 P3 total -0.010073 0.010045
material group out nuclide mean std. dev.
1 1 1 total 1.0 0.046071
0 1 2 total 0.0 0.000000
@ -235,40 +235,40 @@
material group in nuclide mean std. dev.
1 2 1 total 0.310121 0.033788
0 2 2 total 0.296264 0.043792
material group in group out nuclide moment mean std. dev.
12 2 1 1 total P0 0.310121 0.033788
13 2 1 1 total P1 0.038230 0.008484
14 2 1 1 total P2 0.020745 0.004696
15 2 1 1 total P3 0.007964 0.003732
8 2 1 2 total P0 0.000000 0.000000
9 2 1 2 total P1 0.000000 0.000000
10 2 1 2 total P2 0.000000 0.000000
11 2 1 2 total P3 0.000000 0.000000
4 2 2 1 total P0 0.000000 0.000000
5 2 2 1 total P1 0.000000 0.000000
6 2 2 1 total P2 0.000000 0.000000
7 2 2 1 total P3 0.000000 0.000000
0 2 2 2 total P0 0.296264 0.043792
1 2 2 2 total P1 -0.011214 0.016180
2 2 2 2 total P2 0.008837 0.011504
3 2 2 2 total P3 -0.003270 0.007329
material group in group out nuclide moment mean std. dev.
12 2 1 1 total P0 0.310121 0.033788
13 2 1 1 total P1 0.038230 0.008484
14 2 1 1 total P2 0.020745 0.004696
15 2 1 1 total P3 0.007964 0.003732
8 2 1 2 total P0 0.000000 0.000000
9 2 1 2 total P1 0.000000 0.000000
10 2 1 2 total P2 0.000000 0.000000
11 2 1 2 total P3 0.000000 0.000000
4 2 2 1 total P0 0.000000 0.000000
5 2 2 1 total P1 0.000000 0.000000
6 2 2 1 total P2 0.000000 0.000000
7 2 2 1 total P3 0.000000 0.000000
0 2 2 2 total P0 0.296264 0.043792
1 2 2 2 total P1 -0.011214 0.016180
2 2 2 2 total P2 0.008837 0.011504
3 2 2 2 total P3 -0.003270 0.007329
material group in group out legendre nuclide mean std. dev.
12 2 1 1 P0 total 0.310121 0.033788
13 2 1 1 P1 total 0.038230 0.008484
14 2 1 1 P2 total 0.020745 0.004696
15 2 1 1 P3 total 0.007964 0.003732
8 2 1 2 P0 total 0.000000 0.000000
9 2 1 2 P1 total 0.000000 0.000000
10 2 1 2 P2 total 0.000000 0.000000
11 2 1 2 P3 total 0.000000 0.000000
4 2 2 1 P0 total 0.000000 0.000000
5 2 2 1 P1 total 0.000000 0.000000
6 2 2 1 P2 total 0.000000 0.000000
7 2 2 1 P3 total 0.000000 0.000000
0 2 2 2 P0 total 0.296264 0.043792
1 2 2 2 P1 total -0.011214 0.016180
2 2 2 2 P2 total 0.008837 0.011504
3 2 2 2 P3 total -0.003270 0.007329
material group in group out legendre nuclide mean std. dev.
12 2 1 1 P0 total 0.310121 0.033788
13 2 1 1 P1 total 0.038230 0.008484
14 2 1 1 P2 total 0.020745 0.004696
15 2 1 1 P3 total 0.007964 0.003732
8 2 1 2 P0 total 0.000000 0.000000
9 2 1 2 P1 total 0.000000 0.000000
10 2 1 2 P2 total 0.000000 0.000000
11 2 1 2 P3 total 0.000000 0.000000
4 2 2 1 P0 total 0.000000 0.000000
5 2 2 1 P1 total 0.000000 0.000000
6 2 2 1 P2 total 0.000000 0.000000
7 2 2 1 P3 total 0.000000 0.000000
0 2 2 2 P0 total 0.296264 0.043792
1 2 2 2 P1 total -0.011214 0.016180
2 2 2 2 P2 total 0.008837 0.011504
3 2 2 2 P3 total -0.003270 0.007329
material group in group out nuclide mean std. dev.
3 2 1 1 total 1.0 0.108779
2 2 1 2 total 0.0 0.000000
@ -284,40 +284,40 @@
2 2 1 2 total 0.0 0.000000
1 2 2 1 total 0.0 0.000000
0 2 2 2 total 1.0 0.142427
material group in group out nuclide moment mean std. dev.
12 2 1 1 total P0 0.312163 0.037253
13 2 1 1 total P1 0.038481 0.008743
14 2 1 1 total P2 0.020882 0.004835
15 2 1 1 total P3 0.008017 0.003776
8 2 1 2 total P0 0.000000 0.000000
9 2 1 2 total P1 0.000000 0.000000
10 2 1 2 total P2 0.000000 0.000000
11 2 1 2 total P3 0.000000 0.000000
4 2 2 1 total P0 0.000000 0.000000
5 2 2 1 total P1 0.000000 0.000000
6 2 2 1 total P2 0.000000 0.000000
7 2 2 1 total P3 0.000000 0.000000
0 2 2 2 total P0 0.295421 0.050236
1 2 2 2 total P1 -0.011182 0.016162
2 2 2 2 total P2 0.008811 0.011495
3 2 2 2 total P3 -0.003261 0.007313
material group in group out nuclide moment mean std. dev.
12 2 1 1 total P0 0.312163 0.050407
13 2 1 1 total P1 0.038481 0.009693
14 2 1 1 total P2 0.020882 0.005342
15 2 1 1 total P3 0.008017 0.003876
8 2 1 2 total P0 0.000000 0.000000
9 2 1 2 total P1 0.000000 0.000000
10 2 1 2 total P2 0.000000 0.000000
11 2 1 2 total P3 0.000000 0.000000
4 2 2 1 total P0 0.000000 0.000000
5 2 2 1 total P1 0.000000 0.000000
6 2 2 1 total P2 0.000000 0.000000
7 2 2 1 total P3 0.000000 0.000000
0 2 2 2 total P0 0.295421 0.065529
1 2 2 2 total P1 -0.011182 0.016240
2 2 2 2 total P2 0.008811 0.011563
3 2 2 2 total P3 -0.003261 0.007328
material group in group out legendre nuclide mean std. dev.
12 2 1 1 P0 total 0.312163 0.037253
13 2 1 1 P1 total 0.038481 0.008743
14 2 1 1 P2 total 0.020882 0.004835
15 2 1 1 P3 total 0.008017 0.003776
8 2 1 2 P0 total 0.000000 0.000000
9 2 1 2 P1 total 0.000000 0.000000
10 2 1 2 P2 total 0.000000 0.000000
11 2 1 2 P3 total 0.000000 0.000000
4 2 2 1 P0 total 0.000000 0.000000
5 2 2 1 P1 total 0.000000 0.000000
6 2 2 1 P2 total 0.000000 0.000000
7 2 2 1 P3 total 0.000000 0.000000
0 2 2 2 P0 total 0.295421 0.050236
1 2 2 2 P1 total -0.011182 0.016162
2 2 2 2 P2 total 0.008811 0.011495
3 2 2 2 P3 total -0.003261 0.007313
material group in group out legendre nuclide mean std. dev.
12 2 1 1 P0 total 0.312163 0.050407
13 2 1 1 P1 total 0.038481 0.009693
14 2 1 1 P2 total 0.020882 0.005342
15 2 1 1 P3 total 0.008017 0.003876
8 2 1 2 P0 total 0.000000 0.000000
9 2 1 2 P1 total 0.000000 0.000000
10 2 1 2 P2 total 0.000000 0.000000
11 2 1 2 P3 total 0.000000 0.000000
4 2 2 1 P0 total 0.000000 0.000000
5 2 2 1 P1 total 0.000000 0.000000
6 2 2 1 P2 total 0.000000 0.000000
7 2 2 1 P3 total 0.000000 0.000000
0 2 2 2 P0 total 0.295421 0.065529
1 2 2 2 P1 total -0.011182 0.016240
2 2 2 2 P2 total 0.008811 0.011563
3 2 2 2 P3 total -0.003261 0.007328
material group out nuclide mean std. dev.
1 2 1 total 0.0 0.0
0 2 2 total 0.0 0.0
@ -442,40 +442,40 @@
material group in nuclide mean std. dev.
1 3 1 total 0.671269 0.026186
0 3 2 total 2.035388 0.258060
material group in group out nuclide moment mean std. dev.
12 3 1 1 total P0 0.639901 0.024709
13 3 1 1 total P1 0.381167 0.016243
14 3 1 1 total P2 0.152392 0.008156
15 3 1 1 total P3 0.009148 0.003889
8 3 1 2 total P0 0.031368 0.001728
9 3 1 2 total P1 0.008758 0.000926
10 3 1 2 total P2 -0.002568 0.001014
11 3 1 2 total P3 -0.003785 0.000817
4 3 2 1 total P0 0.000443 0.000445
5 3 2 1 total P1 0.000400 0.000401
6 3 2 1 total P2 0.000320 0.000321
7 3 2 1 total P3 0.000214 0.000215
0 3 2 2 total P0 2.034945 0.257800
1 3 2 2 total P1 0.509940 0.051236
2 3 2 2 total P2 0.111175 0.013020
3 3 2 2 total P3 0.024988 0.008312
material group in group out nuclide moment mean std. dev.
12 3 1 1 total P0 0.639901 0.024709
13 3 1 1 total P1 0.381167 0.016243
14 3 1 1 total P2 0.152392 0.008156
15 3 1 1 total P3 0.009148 0.003889
8 3 1 2 total P0 0.031368 0.001728
9 3 1 2 total P1 0.008758 0.000926
10 3 1 2 total P2 -0.002568 0.001014
11 3 1 2 total P3 -0.003785 0.000817
4 3 2 1 total P0 0.000443 0.000445
5 3 2 1 total P1 0.000400 0.000401
6 3 2 1 total P2 0.000320 0.000321
7 3 2 1 total P3 0.000214 0.000215
0 3 2 2 total P0 2.034945 0.257800
1 3 2 2 total P1 0.509940 0.051236
2 3 2 2 total P2 0.111175 0.013020
3 3 2 2 total P3 0.024988 0.008312
material group in group out legendre nuclide mean std. dev.
12 3 1 1 P0 total 0.639901 0.024709
13 3 1 1 P1 total 0.381167 0.016243
14 3 1 1 P2 total 0.152392 0.008156
15 3 1 1 P3 total 0.009148 0.003889
8 3 1 2 P0 total 0.031368 0.001728
9 3 1 2 P1 total 0.008758 0.000926
10 3 1 2 P2 total -0.002568 0.001014
11 3 1 2 P3 total -0.003785 0.000817
4 3 2 1 P0 total 0.000443 0.000445
5 3 2 1 P1 total 0.000400 0.000401
6 3 2 1 P2 total 0.000320 0.000321
7 3 2 1 P3 total 0.000214 0.000215
0 3 2 2 P0 total 2.034945 0.257800
1 3 2 2 P1 total 0.509940 0.051236
2 3 2 2 P2 total 0.111175 0.013020
3 3 2 2 P3 total 0.024988 0.008312
material group in group out legendre nuclide mean std. dev.
12 3 1 1 P0 total 0.639901 0.024709
13 3 1 1 P1 total 0.381167 0.016243
14 3 1 1 P2 total 0.152392 0.008156
15 3 1 1 P3 total 0.009148 0.003889
8 3 1 2 P0 total 0.031368 0.001728
9 3 1 2 P1 total 0.008758 0.000926
10 3 1 2 P2 total -0.002568 0.001014
11 3 1 2 P3 total -0.003785 0.000817
4 3 2 1 P0 total 0.000443 0.000445
5 3 2 1 P1 total 0.000400 0.000401
6 3 2 1 P2 total 0.000320 0.000321
7 3 2 1 P3 total 0.000214 0.000215
0 3 2 2 P0 total 2.034945 0.257800
1 3 2 2 P1 total 0.509940 0.051236
2 3 2 2 P2 total 0.111175 0.013020
3 3 2 2 P3 total 0.024988 0.008312
material group in group out nuclide mean std. dev.
3 3 1 1 total 1.0 0.038609
2 3 1 2 total 1.0 0.067667
@ -491,40 +491,40 @@
2 3 1 2 total 0.046729 0.002547
1 3 2 1 total 0.000218 0.000219
0 3 2 2 total 0.999782 0.135885
material group in group out nuclide moment mean std. dev.
12 3 1 1 total P0 0.632859 0.038142
13 3 1 1 total P1 0.376973 0.023715
14 3 1 1 total P2 0.150715 0.010664
15 3 1 1 total P3 0.009047 0.003868
8 3 1 2 total P0 0.031023 0.002232
9 3 1 2 total P1 0.008661 0.000999
10 3 1 2 total P2 -0.002540 0.001010
11 3 1 2 total P3 -0.003743 0.000826
4 3 2 1 total P0 0.000440 0.000445
5 3 2 1 total P1 0.000397 0.000401
6 3 2 1 total P2 0.000317 0.000321
7 3 2 1 total P3 0.000212 0.000215
0 3 2 2 total P0 2.020256 0.352194
1 3 2 2 total P1 0.506260 0.079140
2 3 2 2 total P2 0.110372 0.018488
3 3 2 2 total P3 0.024808 0.008771
material group in group out nuclide moment mean std. dev.
12 3 1 1 total P0 0.632859 0.045297
13 3 1 1 total P1 0.376973 0.027825
14 3 1 1 total P2 0.150715 0.012148
15 3 1 1 total P3 0.009047 0.003884
8 3 1 2 total P0 0.031023 0.003064
9 3 1 2 total P1 0.008661 0.001159
10 3 1 2 total P2 -0.002540 0.001024
11 3 1 2 total P3 -0.003743 0.000864
4 3 2 1 total P0 0.000440 0.000765
5 3 2 1 total P1 0.000397 0.000690
6 3 2 1 total P2 0.000317 0.000551
7 3 2 1 total P3 0.000212 0.000369
0 3 2 2 total P0 2.020256 0.446601
1 3 2 2 total P1 0.506260 0.104875
2 3 2 2 total P2 0.110372 0.023809
3 3 2 2 total P3 0.024808 0.009397
material group in group out legendre nuclide mean std. dev.
12 3 1 1 P0 total 0.632859 0.038142
13 3 1 1 P1 total 0.376973 0.023715
14 3 1 1 P2 total 0.150715 0.010664
15 3 1 1 P3 total 0.009047 0.003868
8 3 1 2 P0 total 0.031023 0.002232
9 3 1 2 P1 total 0.008661 0.000999
10 3 1 2 P2 total -0.002540 0.001010
11 3 1 2 P3 total -0.003743 0.000826
4 3 2 1 P0 total 0.000440 0.000445
5 3 2 1 P1 total 0.000397 0.000401
6 3 2 1 P2 total 0.000317 0.000321
7 3 2 1 P3 total 0.000212 0.000215
0 3 2 2 P0 total 2.020256 0.352194
1 3 2 2 P1 total 0.506260 0.079140
2 3 2 2 P2 total 0.110372 0.018488
3 3 2 2 P3 total 0.024808 0.008771
material group in group out legendre nuclide mean std. dev.
12 3 1 1 P0 total 0.632859 0.045297
13 3 1 1 P1 total 0.376973 0.027825
14 3 1 1 P2 total 0.150715 0.012148
15 3 1 1 P3 total 0.009047 0.003884
8 3 1 2 P0 total 0.031023 0.003064
9 3 1 2 P1 total 0.008661 0.001159
10 3 1 2 P2 total -0.002540 0.001024
11 3 1 2 P3 total -0.003743 0.000864
4 3 2 1 P0 total 0.000440 0.000765
5 3 2 1 P1 total 0.000397 0.000690
6 3 2 1 P2 total 0.000317 0.000551
7 3 2 1 P3 total 0.000212 0.000369
0 3 2 2 P0 total 2.020256 0.446601
1 3 2 2 P1 total 0.506260 0.104875
2 3 2 2 P2 total 0.110372 0.023809
3 3 2 2 P3 total 0.024808 0.009397
material group out nuclide mean std. dev.
1 3 1 total 0.0 0.0
0 3 2 total 0.0 0.0

File diff suppressed because it is too large Load diff

View file

@ -1 +1 @@
174d1593a15de41e2aba88cc4c48fc3a400314b400571a0328dfdf7482df111b3ac9701dbd196d06668b49d3acaa67d766702db0942c03140e9e004942f7bdfd
0edd3036c0b5b1eebad90dc8fba25006f14745ceb51dd109e70d0c610d66071f32128facdbc6d4e5077534fe96fff9a8e0ddeefb4a18d6c578f8e805bab7aa22

File diff suppressed because it is too large Load diff

View file

@ -30,7 +30,7 @@
<tally id="10">
<filters>1 2 3</filters>
<scores>scatter-P3 nu-fission</scores>
<scores>scatter nu-fission</scores>
</tally>
<tally id="5">

File diff suppressed because it is too large Load diff

View file

@ -30,7 +30,7 @@
<tally id="10">
<filters>1 2 3</filters>
<scores>scatter-P3 nu-fission</scores>
<scores>scatter nu-scatter nu-fission</scores>
</tally>
<tally id="5">

View file

@ -341,13 +341,19 @@
<filter id="9" type="polar">
<bins>0.0 0.6283 1.2566 1.885 2.5132 3.14159</bins>
</filter>
<filter id="10" type="universe">
<filter id="10" type="legendre">
<order>4</order>
</filter>
<filter cosine="particle" id="11" type="sphericalharmonics">
<order>4</order>
</filter>
<filter id="12" type="universe">
<bins>1 2 3 4 6 8</bins>
</filter>
<filter id="11" type="cell">
<filter id="13" type="cell">
<bins>10 21 22 23 60</bins>
</filter>
<filter id="12" type="cell">
<filter id="14" type="cell">
<bins>21 22 23 27 28 29 60</bins>
</filter>
<tally id="1">
@ -414,80 +420,80 @@
</tally>
<tally id="15">
<filters>10</filters>
<scores>total</scores>
<scores>scatter nu-scatter</scores>
</tally>
<tally id="16">
<filters>11</filters>
<scores>absorption delayed-nu-fission events fission inverse-velocity kappa-fission (n,2n) (n,n1) (n,gamma) nu-fission scatter elastic total prompt-nu-fission fission-q-prompt fission-q-recoverable</scores>
<estimator>tracklength</estimator>
<scores>scatter nu-scatter flux total</scores>
</tally>
<tally id="17">
<filters>11</filters>
<scores>absorption delayed-nu-fission events fission inverse-velocity kappa-fission (n,2n) (n,n1) (n,gamma) nu-fission scatter elastic total prompt-nu-fission fission-q-prompt fission-q-recoverable</scores>
<estimator>analog</estimator>
<scores>flux total</scores>
</tally>
<tally id="18">
<filters>11</filters>
<scores>absorption delayed-nu-fission events fission inverse-velocity kappa-fission (n,2n) (n,n1) (n,gamma) nu-fission scatter elastic total prompt-nu-fission fission-q-prompt fission-q-recoverable</scores>
<estimator>collision</estimator>
<scores>flux total</scores>
</tally>
<tally id="19">
<filters>12</filters>
<scores>flux</scores>
<scores>total</scores>
</tally>
<tally id="20">
<filters>12</filters>
<scores>flux-y5</scores>
<filters>13</filters>
<scores>absorption delayed-nu-fission events fission inverse-velocity kappa-fission (n,2n) (n,n1) (n,gamma) nu-fission scatter elastic total prompt-nu-fission fission-q-prompt fission-q-recoverable</scores>
<estimator>tracklength</estimator>
</tally>
<tally id="21">
<filters>12</filters>
<scores>flux-y5</scores>
<filters>13</filters>
<scores>absorption delayed-nu-fission events fission inverse-velocity kappa-fission (n,2n) (n,n1) (n,gamma) nu-fission scatter elastic total prompt-nu-fission fission-q-prompt fission-q-recoverable</scores>
<estimator>analog</estimator>
</tally>
<tally id="22">
<filters>12</filters>
<scores>flux-y5</scores>
<filters>13</filters>
<scores>absorption delayed-nu-fission events fission inverse-velocity kappa-fission (n,2n) (n,n1) (n,gamma) nu-fission scatter elastic total prompt-nu-fission fission-q-prompt fission-q-recoverable</scores>
<estimator>collision</estimator>
</tally>
<tally id="23">
<filters>11</filters>
<scores>scatter scatter-1 scatter-2 scatter-3 scatter-4 nu-scatter nu-scatter-1 nu-scatter-2 nu-scatter-3 nu-scatter-4</scores>
<filters>14</filters>
<scores>flux</scores>
<estimator>tracklength</estimator>
</tally>
<tally id="24">
<filters>11</filters>
<scores>scatter-p4 scatter-y4 nu-scatter-p4 nu-scatter-y3</scores>
<filters>14</filters>
<scores>flux</scores>
<estimator>analog</estimator>
</tally>
<tally id="25">
<filters>11</filters>
<scores>total</scores>
<filters>14</filters>
<scores>flux</scores>
<estimator>collision</estimator>
</tally>
<tally id="26">
<filters>11</filters>
<filters>13</filters>
<nuclides>U235 total</nuclides>
<scores>total-y4</scores>
<scores>total</scores>
<estimator>tracklength</estimator>
</tally>
<tally id="27">
<filters>11</filters>
<filters>13</filters>
<nuclides>U235 total</nuclides>
<scores>total-y4</scores>
<scores>total</scores>
<estimator>analog</estimator>
</tally>
<tally id="28">
<filters>11</filters>
<filters>13</filters>
<nuclides>U235 total</nuclides>
<scores>total-y4</scores>
<scores>total</scores>
<estimator>collision</estimator>
</tally>
<tally id="29">
<filters>11</filters>
<filters>13</filters>
<nuclides>all</nuclides>
<scores>total</scores>
<estimator>tracklength</estimator>
</tally>
<tally id="30">
<filters>11</filters>
<filters>13</filters>
<nuclides>all</nuclides>
<scores>total</scores>
<estimator>collision</estimator>

View file

@ -1 +1 @@
13014f42dea87bf6c1fc0d41361cdba8a7e32a8f809d348567dfce638c849f58a0c0f17065c199946db81a264ef72db850aea93b0e11adf4f70ec969e30529cd
8cf1936c565c6a09bffe2f7a0623ded1405bae37c1de8159551e64b86ca4f6bce82890a630b9428bcf8353f6de8e5cfc1f1a4263fd51a1c6b5cddb0a9c2ff368

View file

@ -1,5 +1,6 @@
from openmc.filter import *
from openmc import Mesh, Tally, Tallies
from openmc.filter_expansion import *
from openmc import Mesh, Tally
from tests.testing_harness import HashedPyAPITestHarness
@ -28,8 +29,8 @@ def test_tallies():
azimuthal_tally2.estimator = 'analog'
mesh_2x2 = Mesh(mesh_id=1)
mesh_2x2.lower_left = [-182.07, -182.07]
mesh_2x2.upper_right = [182.07, 182.07]
mesh_2x2.lower_left = [-182.07, -182.07]
mesh_2x2.upper_right = [182.07, 182.07]
mesh_2x2.dimension = [2, 2]
mesh_filter = MeshFilter(mesh_2x2)
azimuthal_tally3 = Tally()
@ -97,6 +98,28 @@ def test_tallies():
polar_tally3.scores = ['flux']
polar_tally3.estimator = 'tracklength'
legendre_filter = LegendreFilter(order=4)
legendre_tally = Tally()
legendre_tally.filters = [legendre_filter]
legendre_tally.scores = ['scatter', 'nu-scatter']
legendre_tally.estimatir = 'analog'
harmonics_filter = SphericalHarmonicsFilter(order=4)
harmonics_tally = Tally()
harmonics_tally.filters = [harmonics_filter]
harmonics_tally.scores = ['scatter', 'nu-scatter', 'flux', 'total']
harmonics_tally.estimatir = 'analog'
harmonics_tally2 = Tally()
harmonics_tally2.filters = [harmonics_filter]
harmonics_tally2.scores = ['flux', 'total']
harmonics_tally2.estimatir = 'collision'
harmonics_tally3 = Tally()
harmonics_tally3.filters = [harmonics_filter]
harmonics_tally3.scores = ['flux', 'total']
harmonics_tally3.estimatir = 'tracklength'
universe_tally = Tally()
universe_tally.filters = [
UniverseFilter((model.geometry.get_all_universes()[1],
@ -120,37 +143,22 @@ def test_tallies():
score_tallies[2].estimator = 'collision'
cell_filter2 = CellFilter((21, 22, 23, 27, 28, 29, 60))
flux_tallies = [Tally() for i in range(4)]
flux_tallies = [Tally() for i in range(3)]
for t in flux_tallies:
t.filters = [cell_filter2]
flux_tallies[0].scores = ['flux']
for t in flux_tallies[1:]:
t.scores = ['flux-y5']
flux_tallies[1].estimator = 'tracklength'
flux_tallies[2].estimator = 'analog'
flux_tallies[3].estimator = 'collision'
t.scores = ['flux']
flux_tallies[0].estimator = 'tracklength'
flux_tallies[1].estimator = 'analog'
flux_tallies[2].estimator = 'collision'
scatter_tally1 = Tally()
scatter_tally1.filters = [cell_filter]
scatter_tally1.scores = ['scatter', 'scatter-1', 'scatter-2', 'scatter-3',
'scatter-4', 'nu-scatter', 'nu-scatter-1',
'nu-scatter-2', 'nu-scatter-3', 'nu-scatter-4']
scatter_tally2 = Tally()
scatter_tally2.filters = [cell_filter]
scatter_tally2.scores = ['scatter-p4', 'scatter-y4', 'nu-scatter-p4',
'nu-scatter-y3']
total_tallies = [Tally() for i in range(4)]
total_tallies = [Tally() for i in range(3)]
for t in total_tallies:
t.filters = [cell_filter]
total_tallies[0].scores = ['total']
for t in total_tallies[1:]:
t.scores = ['total-y4']
t.scores = ['total']
t.nuclides = ['U235', 'total']
total_tallies[1].estimator = 'tracklength'
total_tallies[2].estimator = 'analog'
total_tallies[3].estimator = 'collision'
total_tallies[0].estimator = 'tracklength'
total_tallies[1].estimator = 'analog'
total_tallies[2].estimator = 'collision'
all_nuclide_tallies = [Tally() for i in range(4)]
for t in all_nuclide_tallies:
@ -167,10 +175,10 @@ def test_tallies():
azimuthal_tally1, azimuthal_tally2, azimuthal_tally3,
cellborn_tally, dg_tally, energy_tally, energyout_tally,
transfer_tally, material_tally, mu_tally1, mu_tally2,
polar_tally1, polar_tally2, polar_tally3, universe_tally]
polar_tally1, polar_tally2, polar_tally3, legendre_tally,
harmonics_tally, harmonics_tally2, harmonics_tally3, universe_tally]
model.tallies += score_tallies
model.tallies += flux_tallies
model.tallies += (scatter_tally1, scatter_tally2)
model.tallies += total_tallies
model.tallies += all_nuclide_tallies

View file

@ -19,7 +19,7 @@ class TrackTestHarness(TestHarness):
def _get_results(self):
"""Digest info in the statepoint and return as a string."""
# Run the track-to-vtk conversion script.
call(['../../scripts/openmc-track-to-vtk', '-o', 'poly'] +
call(['../../../scripts/openmc-track-to-vtk', '-o', 'poly'] +
glob.glob('track_1_1_*.h5'))
# Make sure the vtk file was created then return it's contents.

View file

@ -345,10 +345,10 @@ def test_nbody(tmpdir, h2):
assert nbody1.q_value == nbody2.q_value
def test_ace_convert(tmpdir):
def test_ace_convert(run_in_tmpdir):
filename = os.path.join(_ENDF_DATA, 'neutrons', 'n-001_H_001.endf')
ace_ascii = str(tmpdir.join('ace_ascii'))
ace_binary = str(tmpdir.join('ace_binary'))
ace_ascii = 'ace_ascii'
ace_binary = 'ace_binary'
openmc.data.njoy.make_ace(filename, ace=ace_ascii)
# Convert to binary