Merge pull request #1705 from nelsonag/mt_mgxs

MGXS API Changes for Arbitrary Reaction Channels and for Accurate Chi Computation
This commit is contained in:
Paul Romano 2020-11-10 07:37:00 -06:00 committed by GitHub
commit 7a505613d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 2838 additions and 1002 deletions

View file

@ -30,6 +30,7 @@ Multi-group Cross Sections
:template: myclassinherit.rst
openmc.mgxs.MGXS
openmc.mgxs.MatrixMGXS
openmc.mgxs.AbsorptionXS
openmc.mgxs.CaptureXS
openmc.mgxs.Chi
@ -45,6 +46,9 @@ Multi-group Cross Sections
openmc.mgxs.ScatterProbabilityMatrix
openmc.mgxs.TotalXS
openmc.mgxs.TransportXS
openmc.mgxs.ArbitraryXS
openmc.mgxs.ArbitraryMatrixXS
openmc.mgxs.MeshSurfaceMGXS
Multi-delayed-group Cross Sections
----------------------------------
@ -55,6 +59,7 @@ Multi-delayed-group Cross Sections
:template: myclassinherit.rst
openmc.mgxs.MDGXS
openmc.mgxs.MatrixMDGXS
openmc.mgxs.ChiDelayed
openmc.mgxs.DelayedNuFissionXS
openmc.mgxs.DelayedNuFissionMatrixXS

View file

@ -199,7 +199,7 @@ enum ReactionType {
N_3N3HE = 177,
N_4N3HE = 178,
N_3N2P = 179,
N_3N3A = 180,
N_3N2A = 180,
N_3NPA = 181,
N_DT = 182,
N_NPD = 183,

View file

@ -56,7 +56,7 @@ REACTION_NAME = {1: '(n,total)', 2: '(n,elastic)', 4: '(n,level)',
301: 'heating', 444: 'damage-energy',
649: '(n,pc)', 699: '(n,dc)', 749: '(n,tc)', 799: '(n,3Hec)',
849: '(n,ac)', 891: '(n,2nc)', 901: 'heating-local'}
REACTION_NAME.update({i: '(n,n{})'.format(i - 50) for i in range(50, 91)})
REACTION_NAME.update({i: '(n,n{})'.format(i - 50) for i in range(51, 91)})
REACTION_NAME.update({i: '(n,p{})'.format(i - 600) for i in range(600, 649)})
REACTION_NAME.update({i: '(n,d{})'.format(i - 650) for i in range(650, 699)})
REACTION_NAME.update({i: '(n,t{})'.format(i - 700) for i in range(700, 749)})

View file

@ -277,7 +277,9 @@ class Library:
@mgxs_types.setter
def mgxs_types(self, mgxs_types):
all_mgxs_types = openmc.mgxs.MGXS_TYPES + openmc.mgxs.MDGXS_TYPES
all_mgxs_types = openmc.mgxs.MGXS_TYPES + openmc.mgxs.MDGXS_TYPES + \
openmc.mgxs.ARBITRARY_VECTOR_TYPES + \
openmc.mgxs.ARBITRARY_MATRIX_TYPES
if mgxs_types == 'all':
self._mgxs_types = all_mgxs_types
else:
@ -612,8 +614,10 @@ class Library:
----------
domain : openmc.Material or openmc.Cell or openmc.Universe or openmc.RegularMesh or Integral
The material, cell, or universe object of interest (or its ID)
mgxs_type : {'total', 'transport', 'nu-transport', 'absorption', 'capture', 'fission', 'nu-fission', 'kappa-fission', 'scatter', 'nu-scatter', 'scatter matrix', 'nu-scatter matrix', 'multiplicity matrix', 'nu-fission matrix', chi', 'chi-prompt', 'inverse-velocity', 'prompt-nu-fission', 'prompt-nu-fission matrix', 'delayed-nu-fission', 'delayed-nu-fission matrix', 'chi-delayed', 'beta'}
The type of multi-group cross section object to return
mgxs_type : str
The type of multi-group cross section object to return; allowable
values are those MGXS to the Library and present in the
mgxs_types attribute.
Returns
-------
@ -912,7 +916,7 @@ class Library:
return pickle.load(f)
def get_xsdata(self, domain, xsdata_name, nuclide='total', xs_type='macro',
subdomain=None):
subdomain=None, apply_domain_chi=False):
"""Generates an openmc.XSdata object describing a multi-group cross section
dataset for writing to an openmc.MGXSLibrary object.
@ -939,6 +943,15 @@ class Library:
mesh cell of interest in the openmc.RegularMesh object. Note:
this parameter currently only supports subdomains within a mesh,
and not the subdomains of a distribcell.
apply_domain_chi : bool
This parameter sets whether (True) or not (False) the
domain-averaged values of chi, chi-prompt, and chi-delayed are to
be applied to each of the nuclide-dependent fission energy spectra
of a domain. In effect, if this is True, then every nuclide in the
domain receives the same flux-weighted Chi. This is useful for
downstream multigroup solvers that precompute a material-specific
chi before the transport solve provides group-wise fluxes. Defaults
to False.
Returns
-------
@ -1046,18 +1059,30 @@ class Library:
if 'chi' in self.mgxs_types:
mymgxs = self.get_mgxs(domain, 'chi')
xsdata.set_chi_mgxs(mymgxs, xs_type=xs_type, nuclide=[nuclide],
if apply_domain_chi and nuclide != "total":
nuc = "sum"
else:
nuc = nuclide
xsdata.set_chi_mgxs(mymgxs, xs_type=xs_type, nuclide=[nuc],
subdomain=subdomain)
if 'chi-prompt' in self.mgxs_types:
mymgxs = self.get_mgxs(domain, 'chi-prompt')
if apply_domain_chi and nuclide != "total":
nuc = "sum"
else:
nuc = nuclide
xsdata.set_chi_prompt_mgxs(mymgxs, xs_type=xs_type,
nuclide=[nuclide], subdomain=subdomain)
nuclide=[nuc], subdomain=subdomain)
if 'chi-delayed' in self.mgxs_types:
mymgxs = self.get_mgxs(domain, 'chi-delayed')
if apply_domain_chi and nuclide != "total":
nuc = "sum"
else:
nuc = nuclide
xsdata.set_chi_delayed_mgxs(mymgxs, xs_type=xs_type,
nuclide=[nuclide], subdomain=subdomain)
nuclide=[nuc], subdomain=subdomain)
if 'nu-fission' in self.mgxs_types:
mymgxs = self.get_mgxs(domain, 'nu-fission')
@ -1196,7 +1221,8 @@ class Library:
return xsdata
def create_mg_library(self, xs_type='macro', xsdata_names=None):
def create_mg_library(self, xs_type='macro', xsdata_names=None,
apply_domain_chi=False):
"""Creates an openmc.MGXSLibrary object to contain the MGXS data for the
Multi-Group mode of OpenMC.
@ -1213,6 +1239,15 @@ class Library:
xsdata_names : Iterable of str
List of names to apply to the "xsdata" entries in the
resultant mgxs data file. Defaults to 'set1', 'set2', ...
apply_domain_chi : bool
This parameter sets whether (True) or not (False) the
domain-averaged values of chi, chi-prompt, and chi-delayed are to
be applied to each of the nuclide-dependent fission energy spectra
of a domain. In effect, if this is True, then every nuclide in the
domain receives the same flux-weighted Chi. This is useful for
downstream multigroup solvers that precompute a material-specific
chi before the transport solve provides group-wise fluxes. Defaults
to False.
Returns
-------
@ -1284,13 +1319,15 @@ class Library:
xsdata_name = xsdata_names[i]
xsdata = self.get_xsdata(domain, xsdata_name,
nuclide=nuclide, xs_type=xs_type)
nuclide=nuclide, xs_type=xs_type,
apply_domain_chi=apply_domain_chi)
mgxs_file.add_xsdata(xsdata)
return mgxs_file
def create_mg_mode(self, xsdata_names=None, bc=['reflective'] * 6):
def create_mg_mode(self, xsdata_names=None, bc=['reflective'] * 6,
apply_domain_chi=False):
"""Creates an openmc.MGXSLibrary object to contain the MGXS data for the
Multi-Group mode of OpenMC as well as the associated openmc.Materials
and openmc.Geometry objects.
@ -1314,6 +1351,15 @@ class Library:
(if applying to a 3D mesh) provided in the following order:
[x min, x max, y min, y max, z min, z max]. 2-D cells do not
contain the z min and z max entries.
apply_domain_chi : bool
This parameter sets whether (True) or not (False) the
domain-averaged values of chi, chi-prompt, and chi-delayed are to
be applied to each of the nuclide-dependent fission energy spectra
of a domain. In effect, if this is True, then every nuclide in the
domain receives the same flux-weighted Chi. This is useful for
downstream multigroup solvers that precompute a material-specific
chi before the transport solve provides group-wise fluxes. Defaults
to False.
Returns
-------
@ -1354,7 +1400,8 @@ class Library:
cv.check_length("domains", self.domains, 1, 1)
# Get the MGXS File Data
mgxs_file = self.create_mg_library('macro', xsdata_names)
mgxs_file = self.create_mg_library('macro', xsdata_names,
apply_domain_chi=apply_domain_chi)
# Now move on the creating the geometry and assigning materials
if self.domain_type == 'mesh':
@ -1415,7 +1462,7 @@ class Library:
if not isinstance(cell.fill, openmc.Material):
warn('If the library domain includes a lattice or universe cell '
'in conjunction with a consituent cell of that lattice/universe, '
'the multi-group simulation will fail')
'the multi-group simulation will fail')
if cell.id == domain.id:
cell.fill = material

View file

@ -8,6 +8,7 @@ import h5py
import numpy as np
import openmc
from openmc.data import REACTION_MT, REACTION_NAME, FISSION_MTS
import openmc.checkvalue as cv
from ..tallies import ESTIMATOR_TYPES
from . import EnergyGroups
@ -42,6 +43,22 @@ MGXS_TYPES = (
'nu-diffusion-coefficient'
)
# Some scores from REACTION_MT are not supported, or are simply overkill to
# support and test (like inelastic levels), remoev those from consideration
_BAD_SCORES = ["(n,misc)", "(n,absorption)", "(n,total)", "fission"]
_BAD_SCORES += [REACTION_NAME[mt] for mt in FISSION_MTS]
ARBITRARY_VECTOR_TYPES = tuple(k for k in REACTION_MT.keys()
if k not in _BAD_SCORES)
ARBITRARY_MATRIX_TYPES = []
for rxn in ARBITRARY_VECTOR_TYPES:
# Preclude the fission channels from being treated as a matrix
if rxn not in [REACTION_NAME[mt] for mt in FISSION_MTS]:
split_rxn = rxn.strip("()").split(",")
if len(split_rxn) > 1 and "n" in split_rxn[1]:
# Then there is a neutron product, so it can also be a matrix
ARBITRARY_MATRIX_TYPES.append(rxn + " matrix")
ARBITRARY_MATRIX_TYPES = tuple(ARBITRARY_MATRIX_TYPES)
# Supported domain types
DOMAIN_TYPES = (
'cell',
@ -698,8 +715,13 @@ class MGXS:
Parameters
----------
mgxs_type : {'total', 'transport', 'nu-transport', 'absorption', 'capture', 'fission', 'nu-fission', 'kappa-fission', 'scatter', 'nu-scatter', 'scatter matrix', 'nu-scatter matrix', 'multiplicity matrix', 'nu-fission matrix', 'chi', 'chi-prompt', 'inverse-velocity', 'prompt-nu-fission', 'prompt-nu-fission matrix', 'current', 'diffusion-coefficient', 'nu-diffusion-coefficient'}
The type of multi-group cross section object to return
mgxs_type : str or Integral
The type of multi-group cross section object to return; valid
values are members of MGXS_TYPES, or the reaction types that are
the keys of REACTION_MT. Note that if a reaction type from
REACTION_MT is used, it can be appended with ' matrix' to obtain
a multigroup matrix (from incoming to outgoing energy groups) for
reactions with a neutron in an outgoing channel.
domain : openmc.Material or openmc.Cell or openmc.Universe or openmc.RegularMesh
The domain for spatial homogenization
domain_type : {'material', 'cell', 'distribcell', 'universe', 'mesh'}
@ -727,7 +749,9 @@ class MGXS:
"""
cv.check_value('mgxs_type', mgxs_type, MGXS_TYPES)
cv.check_value(
"mgxs_type", mgxs_type,
MGXS_TYPES + ARBITRARY_VECTOR_TYPES + ARBITRARY_MATRIX_TYPES)
if mgxs_type == 'total':
mgxs = TotalXS(domain, domain_type, energy_groups)
@ -782,6 +806,13 @@ class MGXS:
mgxs = DiffusionCoefficient(domain, domain_type, energy_groups)
elif mgxs_type == 'nu-diffusion-coefficient':
mgxs = DiffusionCoefficient(domain, domain_type, energy_groups, nu=True)
elif mgxs_type in ARBITRARY_VECTOR_TYPES:
# Then it is a reaction not covered by the above that is
# supported by the ArbitraryXS Class
mgxs = ArbitraryXS(mgxs_type, domain, domain_type, energy_groups)
elif mgxs_type in ARBITRARY_MATRIX_TYPES:
mgxs = ArbitraryMatrixXS(mgxs_type, domain, domain_type,
energy_groups)
mgxs.by_nuclide = by_nuclide
mgxs.name = name
@ -1139,6 +1170,119 @@ class MGXS:
return xs
def get_flux(self, groups='all', subdomains='all',
order_groups='increasing', value='mean',
squeeze=True, **kwargs):
r"""Returns an array of the fluxes used to weight the MGXS.
This method constructs a 2D NumPy array for the requested
weighting flux for one or more subdomains (1st dimension), and
energy groups (2nd dimension).
Parameters
----------
groups : Iterable of Integral or 'all'
Energy groups of interest. Defaults to 'all'.
subdomains : Iterable of Integral or 'all'
Subdomain IDs of interest. Defaults to 'all'.
order_groups: {'increasing', 'decreasing'}
Return the cross section indexed according to increasing or
decreasing energy groups (decreasing or increasing energies).
Defaults to 'increasing'.
value : {'mean', 'std_dev', 'rel_err'}
A string for the type of value to return. Defaults to 'mean'.
squeeze : bool
A boolean representing whether to eliminate the extra dimensions
of the multi-dimensional array to be returned. Defaults to True.
Returns
-------
numpy.ndarray
A NumPy array of the flux indexed in the order
each group and subdomain is listed in the parameters.
Raises
------
ValueError
When this method is called before the data is available from tally
data, or, when this is used on an MGXS type without a flux score.
"""
cv.check_value('value', value, ['mean', 'std_dev', 'rel_err'])
filters = []
filter_bins = []
# Construct a collection of the domain filter bins
if not isinstance(subdomains, str):
cv.check_iterable_type('subdomains', subdomains, Integral,
max_depth=3)
filters.append(_DOMAIN_TO_FILTER[self.domain_type])
subdomain_bins = []
for subdomain in subdomains:
subdomain_bins.append(subdomain)
filter_bins.append(tuple(subdomain_bins))
# Construct list of energy group bounds tuples for all requested groups
if not isinstance(groups, str):
cv.check_iterable_type('groups', groups, Integral)
filters.append(openmc.EnergyFilter)
energy_bins = []
for group in groups:
energy_bins.append(
(self.energy_groups.get_group_bounds(group),))
filter_bins.append(tuple(energy_bins))
# Determine which flux to obtain
# Step through in order of usefulness
for key in ['flux', 'flux (tracklength)', 'flux (analog)']:
if key in self.tally_keys:
tally = self.tallies[key]
break
else:
msg = "MGXS of Type {} do not have an explicit weighting flux!"
raise ValueError(msg.format(self.__name__))
flux = tally.get_values(filters=filters, filter_bins=filter_bins,
nuclides=['total'], value=value)
# Eliminate the trivial score dimension
flux = np.squeeze(flux, axis=len(flux.shape) - 1)
# Eliminate the trivial nuclide dimension
flux = np.squeeze(flux, axis=len(flux.shape) - 1)
flux = np.nan_to_num(flux)
if groups == 'all':
num_groups = self.num_groups
else:
num_groups = len(groups)
# Reshape tally data array with separate axes for domain and energy
# Accomodate the polar and azimuthal bins if needed
num_subdomains = int(flux.shape[0] / (num_groups * self.num_polar *
self.num_azimuthal))
if self.num_polar > 1 or self.num_azimuthal > 1:
new_shape = (self.num_polar, self.num_azimuthal, num_subdomains,
num_groups)
else:
new_shape = (num_subdomains, num_groups)
new_shape += flux.shape[1:]
flux = np.reshape(flux, new_shape)
# Reverse data if user requested increasing energy groups since
# tally data is stored in order of increasing energies
if order_groups == 'increasing':
flux = flux[..., ::-1]
if squeeze:
# We want to squeeze out everything but the polar, azimuthal,
# and energy group data.
flux = self._squeeze_xs(flux)
return flux
def get_condensed_xs(self, coarse_groups):
"""Construct an energy-condensed version of this cross section.
@ -3850,6 +3994,265 @@ class ScatterXS(MGXS):
self._valid_estimators = ['analog']
class ArbitraryXS(MGXS):
r"""A multi-group cross section for an arbitrary reaction type.
This class can be used for both OpenMC input generation and tally data
post-processing to compute spatially-homogenized and energy-integrated
multi-group total cross sections for multi-group neutronics calculations.
At a minimum, one needs to set the :attr:`ArbitraryXS.energy_groups` and
:attr:`ArbitraryXS.domain` properties. Tallies for the flux and appropriate
reaction rates over the specified domain are generated automatically via the
:attr:`ArbitraryXS.tallies` property, which can then be appended to a
:class:`openmc.Tallies` instance.
For post-processing, the :meth:`MGXS.load_from_statepoint` will pull in the
necessary data to compute multi-group cross sections from a
:class:`openmc.StatePoint` instance. The derived multi-group cross section
can then be obtained from the :attr:`ArbitraryXS.xs_tally` property.
For a spatial domain :math:`V` and energy group :math:`[E_g,E_{g-1}]`, the
requested cross section is calculated as:
.. math::
\frac{\int_{r \in V} dr \int_{4\pi} d\Omega \int_{E_g}^{E_{g-1}} dE \;
\sigma_X (r, E) \psi (r, E, \Omega)}{\int_{r \in V} dr \int_{4\pi}
d\Omega \int_{E_g}^{E_{g-1}} dE \; \psi (r, E, \Omega)}
where :math:`\sigma_X` is the requested reaction type of interest.
Parameters
----------
rxn_type : str
Reaction type (e.g., '(n,2n)', '(n,Xt)', etc.)
domain : openmc.Material or openmc.Cell or openmc.Universe or openmc.RegularMesh
The domain for spatial homogenization
domain_type : {'material', 'cell', 'distribcell', 'universe', 'mesh'}
The domain type for spatial homogenization
groups : openmc.mgxs.EnergyGroups
The energy group structure for energy condensation
by_nuclide : bool
If true, computes cross sections for each nuclide in domain
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
Number of equi-width polar angle bins for angle discretization;
defaults to one bin
num_azimuthal : Integral, optional
Number of equi-width azimuthal angle bins for angle discretization;
defaults to one bin
Attributes
----------
name : str, optional
Name of the multi-group cross section
rxn_type : str
Reaction type (e.g., '(n,2n)', '(n,Xt)', etc.)
by_nuclide : bool
If true, computes cross sections for each nuclide in domain
domain : openmc.Material or openmc.Cell or openmc.Universe or openmc.RegularMesh
Domain for spatial homogenization
domain_type : {'material', 'cell', 'distribcell', 'universe', 'mesh'}
Domain type for spatial homogenization
energy_groups : openmc.mgxs.EnergyGroups
Energy group structure for energy condensation
num_polar : Integral
Number of equi-width polar angle bins for angle discretization
num_azimuthal : Integral
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
compute the cross section
scores : list of str
The scores in each tally used to compute the multi-group cross section
filters : list of openmc.Filter
The filters in each tally used to compute the multi-group cross section
tally_keys : list of str
The keys into the tallies dictionary for each tally used to compute
the multi-group cross section
estimator : {'tracklength', 'collision', 'analog'}
The tally estimator used to compute the multi-group cross section
tallies : collections.OrderedDict
OpenMC tallies needed to compute the multi-group cross section. The keys
are strings listed in the :attr:`TotalXS.tally_keys` property and values
are instances of :class:`openmc.Tally`.
rxn_rate_tally : openmc.Tally
Derived tally for the reaction rate tally used in the numerator to
compute the multi-group cross section. This attribute is None
unless the multi-group cross section has been computed.
xs_tally : openmc.Tally
Derived tally for the multi-group cross section. This attribute
is None unless the multi-group cross section has been computed.
num_subdomains : int
The number of subdomains is unity for 'material', 'cell' and 'universe'
domain types. This is equal to the number of cell instances
for 'distribcell' domain types (it is equal to unity prior to loading
tally data from a statepoint file).
num_nuclides : int
The number of nuclides for which the multi-group cross section is
being tracked. This is unity if the by_nuclide attribute is False.
nuclides : Iterable of str or 'sum'
The optional user-specified nuclides for which to compute cross
sections (e.g., 'U238', 'O16'). If by_nuclide is True but nuclides
are not specified by the user, all nuclides in the spatial domain
are included. This attribute is 'sum' if by_nuclide is false.
sparse : bool
Whether or not the MGXS' tallies use SciPy's LIL sparse matrix format
for compressed data storage
loaded_sp : bool
Whether or not a statepoint file has been loaded with tally data
derived : bool
Whether or not the MGXS is merged from one or more other MGXS
hdf5_key : str
The key used to index multi-group cross sections in an HDF5 data store
"""
def __init__(self, rxn_type, domain=None, domain_type=None, groups=None,
by_nuclide=False, name='', num_polar=1, num_azimuthal=1):
cv.check_value("rxn_type", rxn_type, ARBITRARY_VECTOR_TYPES)
super().__init__(domain, domain_type, groups, by_nuclide, name,
num_polar, num_azimuthal)
self._rxn_type = rxn_type
class ArbitraryMatrixXS(MatrixMGXS):
r"""A multi-group matrix cross section for an arbitrary reaction type.
This class can be used for both OpenMC input generation and tally data
post-processing to compute spatially-homogenized and energy-integrated
multi-group cross sections for multi-group neutronics calculations. At a
minimum, one needs to set the :attr:`ArbitraryMatrixXS.energy_groups` and
:attr:`ArbitraryMatrixXS.domain` properties. Tallies for the flux and
appropriate reaction rates over the specified domain are generated
automatically via the :attr:`ArbitraryMatrixXS.tallies` property, which can
then be appended to a :class:`openmc.Tallies` instance.
For post-processing, the :meth:`MGXS.load_from_statepoint` will pull in the
necessary data to compute multi-group cross sections from a
:class:`openmc.StatePoint` instance. The derived multi-group cross section
can then be obtained from the :attr:`ArbitraryMatrixXS.xs_tally` property.
For a spatial domain :math:`V`, incoming energy group
:math:`[E_{g'},E_{g'-1}]`, and outgoing energy group :math:`[E_g,E_{g-1}]`,
the fission production is calculated as:
.. math::
\begin{aligned}
\langle \sigma_{X,g'\rightarrow g} \phi \rangle &= \int_{r \in V} dr
\int_{4\pi} d\Omega' \int_{E_{g'}}^{E_{g'-1}} dE' \int_{E_g}^{E_{g-1}} dE
\; \chi(E) \sigma_X (r, E') \psi(r, E', \Omega')\\
\langle \phi \rangle &= \int_{r \in V} dr \int_{4\pi} d\Omega
\int_{E_g}^{E_{g-1}} dE \; \psi (r, E, \Omega) \\
\sigma_{X,g'\rightarrow g} &= \frac{\langle \sigma_{X,g'\rightarrow
g} \phi \rangle}{\langle \phi \rangle}
\end{aligned}
where :math:`\sigma_X` is the requested reaction type of interest.
Parameters
----------
rxn_type : str
Reaction type (e.g., '(n,2n)', '(n,nta)', etc.). Valid names have
neutrons as a product.
domain : openmc.Material or openmc.Cell or openmc.Universe or openmc.RegularMesh
The domain for spatial homogenization
domain_type : {'material', 'cell', 'distribcell', 'universe', 'mesh'}
The domain type for spatial homogenization
groups : openmc.mgxs.EnergyGroups
The energy group structure for energy condensation
by_nuclide : bool
If true, computes cross sections for each nuclide in domain
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
Number of equi-width polar angle bins for angle discretization;
defaults to one bin
num_azimuthal : Integral, optional
Number of equi-width azimuthal angle bins for angle discretization;
defaults to one bin
Attributes
----------
name : str, optional
Name of the multi-group cross section
rxn_type : str
Reaction type (e.g., 'total', 'nu-fission', etc.)
by_nuclide : bool
If true, computes cross sections for each nuclide in domain
domain : openmc.Material or openmc.Cell or openmc.Universe or openmc.RegularMesh
Domain for spatial homogenization
domain_type : {'material', 'cell', 'distribcell', 'universe', 'mesh'}
Domain type for spatial homogenization
energy_groups : openmc.mgxs.EnergyGroups
Energy group structure for energy condensation
num_polar : Integral
Number of equi-width polar angle bins for angle discretization
num_azimuthal : Integral
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
compute the cross section
scores : list of str
The scores in each tally used to compute the multi-group cross section
filters : list of openmc.Filter
The filters in each tally used to compute the multi-group cross section
tally_keys : list of str
The keys into the tallies dictionary for each tally used to compute
the multi-group cross section
estimator : 'analog'
The tally estimator used to compute the multi-group cross section
tallies : collections.OrderedDict
OpenMC tallies needed to compute the multi-group cross section. The keys
are strings listed in the :attr:`NuFissionMatrixXS.tally_keys`
property and values are instances of :class:`openmc.Tally`.
rxn_rate_tally : openmc.Tally
Derived tally for the reaction rate tally used in the numerator to
compute the multi-group cross section. This attribute is None
unless the multi-group cross section has been computed.
xs_tally : openmc.Tally
Derived tally for the multi-group cross section. This attribute
is None unless the multi-group cross section has been computed.
num_subdomains : int
The number of subdomains is unity for 'material', 'cell' and 'universe'
domain types. This is equal to the number of cell instances
for 'distribcell' domain types (it is equal to unity prior to loading
tally data from a statepoint file).
num_nuclides : int
The number of nuclides for which the multi-group cross section is
being tracked. This is unity if the by_nuclide attribute is False.
nuclides : Iterable of str or 'sum'
The optional user-specified nuclides for which to compute cross
sections (e.g., 'U238', 'O16'). If by_nuclide is True but nuclides
are not specified by the user, all nuclides in the spatial domain
are included. This attribute is 'sum' if by_nuclide is false.
sparse : bool
Whether or not the MGXS' tallies use SciPy's LIL sparse matrix format
for compressed data storage
loaded_sp : bool
Whether or not a statepoint file has been loaded with tally data
derived : bool
Whether or not the MGXS is merged from one or more other MGXS
hdf5_key : str
The key used to index multi-group cross sections in an HDF5 data store
"""
def __init__(self, rxn_type, domain=None, domain_type=None, groups=None,
by_nuclide=False, name='', num_polar=1,
num_azimuthal=1):
cv.check_value("rxn_type", rxn_type, ARBITRARY_MATRIX_TYPES)
super().__init__(domain, domain_type, groups, by_nuclide, name,
num_polar, num_azimuthal)
self._rxn_type = rxn_type.split(" ")[0]
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.

View file

@ -243,7 +243,7 @@ std::unordered_map<int, std::string> REACTION_NAME_MAP {
{N_3N3HE, "(n,3n3He)"},
{N_4N3HE, "(n,4n3He)"},
{N_3N2P, "(n,3n2p)"},
{N_3N3A, "(n,3n3a)"},
{N_3N2A, "(n,3n2a)"},
{N_3NPA, "(n,3npa)"},
{N_DT, "(n,dt)"},
{N_NPD, "(n,npd)"},

File diff suppressed because it is too large Load diff

View file

@ -1,33 +1,44 @@
total
material group in nuclide mean std. dev.
1 1 1 total 0.414825 0.022793
0 1 2 total 0.660170 0.047519
transport
material group in nuclide mean std. dev.
1 1 1 total 0.363092 0.023838
0 1 2 total 0.644851 0.047675
nu-transport
material group in nuclide mean std. dev.
1 1 1 total 0.363092 0.023838
0 1 2 total 0.644851 0.047675
absorption
material group in nuclide mean std. dev.
1 1 1 total 0.027408 0.002692
0 1 2 total 0.264511 0.023367
capture
material group in nuclide mean std. dev.
1 1 1 total 0.019845 0.002643
0 1 2 total 0.071719 0.025208
fission
material group in nuclide mean std. dev.
1 1 1 total 0.007563 0.000508
0 1 2 total 0.192791 0.017106
nu-fission
material group in nuclide mean std. dev.
1 1 1 total 0.019432 0.001323
0 1 2 total 0.469775 0.041682
kappa-fission
material group in nuclide mean std. dev.
1 1 1 total 1.474570e+06 9.923536e+04
0 1 2 total 3.728689e+07 3.308375e+06
scatter
material group in nuclide mean std. dev.
1 1 1 total 0.387418 0.020626
0 1 2 total 0.395659 0.025125
nu-scatter
material group in nuclide mean std. dev.
1 1 1 total 0.385188 0.026946
0 1 2 total 0.412389 0.015425
scatter matrix
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
@ -45,6 +56,7 @@
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
nu-scatter matrix
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
@ -62,21 +74,25 @@
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
multiplicity matrix
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
1 1 2 1 total 1.0 1.414214
0 1 2 2 total 1.0 0.041130
nu-fission matrix
material group in group out nuclide mean std. dev.
3 1 1 1 total 0.020142 0.003149
2 1 1 2 total 0.000000 0.000000
1 1 2 1 total 0.454366 0.027426
0 1 2 2 total 0.000000 0.000000
scatter probability matrix
material group in group out nuclide mean std. dev.
3 1 1 1 total 0.997433 0.078224
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
consistent scatter matrix
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
@ -94,6 +110,7 @@
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
consistent nu-scatter matrix
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
@ -111,33 +128,107 @@
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
chi
material group out nuclide mean std. dev.
1 1 1 total 1.0 0.046071
0 1 2 total 0.0 0.000000
chi-prompt
material group out nuclide mean std. dev.
1 1 1 total 1.0 0.051471
0 1 2 total 0.0 0.000000
inverse-velocity
material group in nuclide mean std. dev.
1 1 1 total 5.709324e-08 4.687938e-09
0 1 2 total 2.855739e-06 2.442164e-07
prompt-nu-fission
material group in nuclide mean std. dev.
1 1 1 total 0.019239 0.001310
0 1 2 total 0.466719 0.041411
prompt-nu-fission matrix
material group in group out nuclide mean std. dev.
3 1 1 1 total 0.020142 0.003149
2 1 1 2 total 0.000000 0.000000
1 1 2 1 total 0.445819 0.028675
0 1 2 2 total 0.000000 0.000000
diffusion-coefficient
material group in legendre nuclide mean std. dev.
2 1 1 P0 total 10.942878 12.704137
3 1 1 P1 total 0.918041 0.075837
0 1 2 P0 total 1.370855 0.292448
1 1 2 P1 total 0.516916 0.050251
nu-diffusion-coefficient
material group in legendre nuclide mean std. dev.
2 1 1 P0 total 10.942878 12.704137
3 1 1 P1 total 0.918041 0.075837
0 1 2 P0 total 1.370855 0.292448
1 1 2 P1 total 0.516916 0.050251
(n,elastic)
material group in nuclide mean std. dev.
1 1 1 total 0.358207 0.019662
0 1 2 total 0.395659 0.025125
(n,level)
material group in nuclide mean std. dev.
1 1 1 total 0.000619 0.000049
0 1 2 total 0.000000 0.000000
(n,2n)
material group in nuclide mean std. dev.
1 1 1 total 0.000121 0.000054
0 1 2 total 0.000000 0.000000
(n,na)
material group in nuclide mean std. dev.
1 1 1 total 9.209364e-11 9.154237e-11
0 1 2 total 0.000000e+00 0.000000e+00
(n,nc)
material group in nuclide mean std. dev.
1 1 1 total 0.009458 0.000768
0 1 2 total 0.000000 0.000000
(n,gamma)
material group in nuclide mean std. dev.
1 1 1 total 0.019727 0.002262
0 1 2 total 0.071719 0.006262
(n,a)
material group in nuclide mean std. dev.
1 1 1 total 0.000124 0.000023
0 1 2 total 0.000000 0.000000
(n,Xa)
material group in nuclide mean std. dev.
1 1 1 total 0.000124 0.000023
0 1 2 total 0.000000 0.000000
heating
material group in nuclide mean std. dev.
1 1 1 total 1.287977e+06 8.806399e+04
0 1 2 total 3.222710e+07 2.903396e+06
damage-energy
material group in nuclide mean std. dev.
1 1 1 total 2471.829371 114.012620
0 1 2 total 1357.269536 120.427363
(n,n1)
material group in nuclide mean std. dev.
1 1 1 total 0.011877 0.000507
0 1 2 total 0.000000 0.000000
(n,a0)
material group in nuclide mean std. dev.
1 1 1 total 0.000115 0.000024
0 1 2 total 0.000000 0.000000
(n,nc) matrix
material group in group out nuclide mean std. dev.
3 1 1 1 total 0.010878 0.001184
2 1 1 2 total 0.000000 0.000000
1 1 2 1 total 0.000000 0.000000
0 1 2 2 total 0.000000 0.000000
(n,n1) matrix
material group in group out nuclide mean std. dev.
3 1 1 1 total 0.011043 0.000937
2 1 1 2 total 0.000000 0.000000
1 1 2 1 total 0.000000 0.000000
0 1 2 2 total 0.000000 0.000000
(n,2n) matrix
material group in group out nuclide mean std. dev.
3 1 1 1 total 0.0 0.0
2 1 1 2 total 0.0 0.0
1 1 2 1 total 0.0 0.0
0 1 2 2 total 0.0 0.0
delayed-nu-fission
material delayedgroup group in nuclide mean std. dev.
1 1 1 1 total 0.000004 2.897486e-07
3 1 2 1 total 0.000027 1.850037e-06
@ -151,6 +242,7 @@
6 1 4 2 total 0.001182 1.048679e-04
8 1 5 2 total 0.000485 4.299445e-05
10 1 6 2 total 0.000203 1.801022e-05
chi-delayed
material delayedgroup group out nuclide mean std. dev.
1 1 1 1 total 0.0 0.000000
3 1 2 1 total 1.0 0.869128
@ -164,6 +256,7 @@
6 1 4 2 total 0.0 0.000000
8 1 5 2 total 0.0 0.000000
10 1 6 2 total 0.0 0.000000
beta
material delayedgroup group in nuclide mean std. dev.
1 1 1 1 total 0.000222 0.000018
3 1 2 1 total 0.001388 0.000115
@ -177,6 +270,7 @@
6 1 4 2 total 0.002516 0.000273
8 1 5 2 total 0.001031 0.000112
10 1 6 2 total 0.000432 0.000047
decay-rate
material delayedgroup nuclide mean std. dev.
0 1 1 total 0.013355 0.001272
1 1 2 total 0.032600 0.003048
@ -184,6 +278,7 @@
3 1 4 total 0.305910 0.027728
4 1 5 total 0.861934 0.075425
5 1 6 total 2.895065 0.253942
delayed-nu-fission matrix
material delayedgroup group in group out nuclide mean std. dev.
3 1 1 1 1 total 0.000000 0.000000
7 1 2 1 1 total 0.000000 0.000000
@ -209,36 +304,47 @@
12 1 4 2 2 total 0.000000 0.000000
16 1 5 2 2 total 0.000000 0.000000
20 1 6 2 2 total 0.000000 0.000000
total
material group in nuclide mean std. dev.
1 2 1 total 0.313738 0.015582
0 2 2 total 0.300821 0.028052
transport
material group in nuclide mean std. dev.
1 2 1 total 0.275508 0.017742
0 2 2 total 0.312035 0.032384
nu-transport
material group in nuclide mean std. dev.
1 2 1 total 0.275508 0.017742
0 2 2 total 0.312035 0.032384
absorption
material group in nuclide mean std. dev.
1 2 1 total 0.001575 0.000323
0 2 2 total 0.005400 0.000618
capture
material group in nuclide mean std. dev.
1 2 1 total 0.001575 0.000323
0 2 2 total 0.005400 0.000618
fission
material group in nuclide mean std. dev.
1 2 1 total 0.0 0.0
0 2 2 total 0.0 0.0
nu-fission
material group in nuclide mean std. dev.
1 2 1 total 0.0 0.0
0 2 2 total 0.0 0.0
kappa-fission
material group in nuclide mean std. dev.
1 2 1 total 0.0 0.0
0 2 2 total 0.0 0.0
scatter
material group in nuclide mean std. dev.
1 2 1 total 0.312163 0.015322
0 2 2 total 0.295421 0.027446
nu-scatter
material group in nuclide mean std. dev.
1 2 1 total 0.310121 0.033788
0 2 2 total 0.296264 0.043792
scatter matrix
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
@ -256,6 +362,7 @@
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
nu-scatter matrix
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
@ -273,21 +380,25 @@
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
multiplicity matrix
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
1 2 2 1 total 0.0 0.000000
0 2 2 2 total 1.0 0.142427
nu-fission matrix
material group in group out nuclide mean std. dev.
3 2 1 1 total 0.0 0.0
2 2 1 2 total 0.0 0.0
1 2 2 1 total 0.0 0.0
0 2 2 2 total 0.0 0.0
scatter probability matrix
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
1 2 2 1 total 0.0 0.000000
0 2 2 2 total 1.0 0.142427
consistent scatter matrix
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
@ -305,6 +416,7 @@
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
consistent nu-scatter matrix
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
@ -322,33 +434,107 @@
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
chi
material group out nuclide mean std. dev.
1 2 1 total 0.0 0.0
0 2 2 total 0.0 0.0
chi-prompt
material group out nuclide mean std. dev.
1 2 1 total 0.0 0.0
0 2 2 total 0.0 0.0
inverse-velocity
material group in nuclide mean std. dev.
1 2 1 total 5.995979e-08 4.553085e-09
0 2 2 total 2.985490e-06 3.417020e-07
prompt-nu-fission
material group in nuclide mean std. dev.
1 2 1 total 0.0 0.0
0 2 2 total 0.0 0.0
prompt-nu-fission matrix
material group in group out nuclide mean std. dev.
3 2 1 1 total 0.0 0.0
2 2 1 2 total 0.0 0.0
1 2 2 1 total 0.0 0.0
0 2 2 2 total 0.0 0.0
diffusion-coefficient
material group in legendre nuclide mean std. dev.
2 2 1 P0 total 92.158584 948.055013
3 2 1 P1 total 1.209886 0.097583
0 2 2 P0 total 73.145434 834.775399
1 2 2 P1 total 1.068256 0.148711
nu-diffusion-coefficient
material group in legendre nuclide mean std. dev.
2 2 1 P0 total 92.158584 948.055013
3 2 1 P1 total 1.209886 0.097583
0 2 2 P0 total 73.145434 834.775399
1 2 2 P1 total 1.068256 0.148711
(n,elastic)
material group in nuclide mean std. dev.
1 2 1 total 0.301031 0.014977
0 2 2 total 0.295421 0.027446
(n,level)
material group in nuclide mean std. dev.
1 2 1 total 0.0 0.0
0 2 2 total 0.0 0.0
(n,2n)
material group in nuclide mean std. dev.
1 2 1 total 0.000005 0.000005
0 2 2 total 0.000000 0.000000
(n,na)
material group in nuclide mean std. dev.
1 2 1 total 1.259778e-09 1.152715e-09
0 2 2 total 0.000000e+00 0.000000e+00
(n,nc)
material group in nuclide mean std. dev.
1 2 1 total 0.002607 0.000356
0 2 2 total 0.000000 0.000000
(n,gamma)
material group in nuclide mean std. dev.
1 2 1 total 0.001569 0.000322
0 2 2 total 0.005400 0.000618
(n,a)
material group in nuclide mean std. dev.
1 2 1 total 1.032353e-06 1.308817e-07
0 2 2 total 2.735898e-07 2.541726e-08
(n,Xa)
material group in nuclide mean std. dev.
1 2 1 total 1.033613e-06 1.318182e-07
0 2 2 total 2.735898e-07 2.541726e-08
heating
material group in nuclide mean std. dev.
1 2 1 total 2819.023866 149.123603
0 2 2 total 2.414215 0.196172
damage-energy
material group in nuclide mean std. dev.
1 2 1 total 1712.186983 87.224250
0 2 2 total 0.294202 0.032716
(n,n1)
material group in nuclide mean std. dev.
1 2 1 total 0.003108 0.000252
0 2 2 total 0.000000 0.000000
(n,a0)
material group in nuclide mean std. dev.
1 2 1 total 8.426133e-07 7.088213e-08
0 2 2 total 2.733143e-07 2.539166e-08
(n,nc) matrix
material group in group out nuclide mean std. dev.
3 2 1 1 total 0.001782 0.000845
2 2 1 2 total 0.000000 0.000000
1 2 2 1 total 0.000000 0.000000
0 2 2 2 total 0.000000 0.000000
(n,n1) matrix
material group in group out nuclide mean std. dev.
3 2 1 1 total 0.002228 0.000725
2 2 1 2 total 0.000000 0.000000
1 2 2 1 total 0.000000 0.000000
0 2 2 2 total 0.000000 0.000000
(n,2n) matrix
material group in group out nuclide mean std. dev.
3 2 1 1 total 0.0 0.0
2 2 1 2 total 0.0 0.0
1 2 2 1 total 0.0 0.0
0 2 2 2 total 0.0 0.0
delayed-nu-fission
material delayedgroup group in nuclide mean std. dev.
1 2 1 1 total 0.0 0.0
3 2 2 1 total 0.0 0.0
@ -362,6 +548,7 @@
6 2 4 2 total 0.0 0.0
8 2 5 2 total 0.0 0.0
10 2 6 2 total 0.0 0.0
chi-delayed
material delayedgroup group out nuclide mean std. dev.
1 2 1 1 total 0.0 0.0
3 2 2 1 total 0.0 0.0
@ -375,6 +562,7 @@
6 2 4 2 total 0.0 0.0
8 2 5 2 total 0.0 0.0
10 2 6 2 total 0.0 0.0
beta
material delayedgroup group in nuclide mean std. dev.
1 2 1 1 total 0.0 0.0
3 2 2 1 total 0.0 0.0
@ -388,6 +576,7 @@
6 2 4 2 total 0.0 0.0
8 2 5 2 total 0.0 0.0
10 2 6 2 total 0.0 0.0
decay-rate
material delayedgroup nuclide mean std. dev.
0 2 1 total 0.0 0.0
1 2 2 total 0.0 0.0
@ -395,6 +584,7 @@
3 2 4 total 0.0 0.0
4 2 5 total 0.0 0.0
5 2 6 total 0.0 0.0
delayed-nu-fission matrix
material delayedgroup group in group out nuclide mean std. dev.
3 2 1 1 1 total 0.0 0.0
7 2 2 1 1 total 0.0 0.0
@ -420,36 +610,47 @@
12 2 4 2 2 total 0.0 0.0
16 2 5 2 2 total 0.0 0.0
20 2 6 2 2 total 0.0 0.0
total
material group in nuclide mean std. dev.
1 3 1 total 0.664572 0.031215
0 3 2 total 2.052384 0.224343
transport
material group in nuclide mean std. dev.
1 3 1 total 0.283323 0.035206
0 3 2 total 1.499740 0.230902
nu-transport
material group in nuclide mean std. dev.
1 3 1 total 0.283323 0.035206
0 3 2 total 1.499740 0.230902
absorption
material group in nuclide mean std. dev.
1 3 1 total 0.000690 0.000044
0 3 2 total 0.031687 0.003747
capture
material group in nuclide mean std. dev.
1 3 1 total 0.000690 0.000044
0 3 2 total 0.031687 0.003747
fission
material group in nuclide mean std. dev.
1 3 1 total 0.0 0.0
0 3 2 total 0.0 0.0
nu-fission
material group in nuclide mean std. dev.
1 3 1 total 0.0 0.0
0 3 2 total 0.0 0.0
kappa-fission
material group in nuclide mean std. dev.
1 3 1 total 0.0 0.0
0 3 2 total 0.0 0.0
scatter
material group in nuclide mean std. dev.
1 3 1 total 0.663882 0.031173
0 3 2 total 2.020697 0.220604
nu-scatter
material group in nuclide mean std. dev.
1 3 1 total 0.671269 0.026186
0 3 2 total 2.035388 0.258060
scatter matrix
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
@ -467,6 +668,7 @@
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
nu-scatter matrix
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
@ -484,21 +686,25 @@
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
multiplicity matrix
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
1 3 2 1 total 1.0 1.414214
0 3 2 2 total 1.0 0.135929
nu-fission matrix
material group in group out nuclide mean std. dev.
3 3 1 1 total 0.0 0.0
2 3 1 2 total 0.0 0.0
1 3 2 1 total 0.0 0.0
0 3 2 2 total 0.0 0.0
scatter probability matrix
material group in group out nuclide mean std. dev.
3 3 1 1 total 0.953271 0.036018
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
consistent scatter matrix
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
@ -516,6 +722,7 @@
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
consistent nu-scatter matrix
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
@ -533,33 +740,107 @@
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
chi
material group out nuclide mean std. dev.
1 3 1 total 0.0 0.0
0 3 2 total 0.0 0.0
chi-prompt
material group out nuclide mean std. dev.
1 3 1 total 0.0 0.0
0 3 2 total 0.0 0.0
inverse-velocity
material group in nuclide mean std. dev.
1 3 1 total 6.022078e-08 3.780437e-09
0 3 2 total 3.044955e-06 3.600077e-07
prompt-nu-fission
material group in nuclide mean std. dev.
1 3 1 total 0.0 0.0
0 3 2 total 0.0 0.0
prompt-nu-fission matrix
material group in group out nuclide mean std. dev.
3 3 1 1 total 0.0 0.0
2 3 1 2 total 0.0 0.0
1 3 2 1 total 0.0 0.0
0 3 2 2 total 0.0 0.0
diffusion-coefficient
material group in legendre nuclide mean std. dev.
2 3 1 P0 total 13.561252 21.988396
3 3 1 P1 total 1.176515 0.154807
0 3 2 P0 total -2.459765 6.393743
1 3 2 P1 total 0.222261 0.040518
nu-diffusion-coefficient
material group in legendre nuclide mean std. dev.
2 3 1 P0 total 13.561252 21.988396
3 3 1 P1 total 1.176515 0.154807
0 3 2 P0 total -2.459765 6.393743
1 3 2 P1 total 0.222261 0.040518
(n,elastic)
material group in nuclide mean std. dev.
1 3 1 total 0.663837 0.031175
0 3 2 total 2.020697 0.220604
(n,level)
material group in nuclide mean std. dev.
1 3 1 total 0.000045 0.000027
0 3 2 total 0.000000 0.000000
(n,2n)
material group in nuclide mean std. dev.
1 3 1 total 0.0 0.0
0 3 2 total 0.0 0.0
(n,na)
material group in nuclide mean std. dev.
1 3 1 total 6.743945e-11 6.604830e-11
0 3 2 total 0.000000e+00 0.000000e+00
(n,nc)
material group in nuclide mean std. dev.
1 3 1 total 0.0 0.0
0 3 2 total 0.0 0.0
(n,gamma)
material group in nuclide mean std. dev.
1 3 1 total 0.000219 0.000014
0 3 2 total 0.011034 0.001305
(n,a)
material group in nuclide mean std. dev.
1 3 1 total 0.000471 0.000031
0 3 2 total 0.020653 0.002442
(n,Xa)
material group in nuclide mean std. dev.
1 3 1 total 0.000472 0.000031
0 3 2 total 0.020653 0.002442
heating
material group in nuclide mean std. dev.
1 3 1 total 86854.045343 3785.266424
0 3 2 total 61907.411870 6000.898789
damage-energy
material group in nuclide mean std. dev.
1 3 1 total 1186.090822 44.862980
0 3 2 total 337.187426 39.868517
(n,n1)
material group in nuclide mean std. dev.
1 3 1 total 0.000001 6.118682e-07
0 3 2 total 0.000000 0.000000e+00
(n,a0)
material group in nuclide mean std. dev.
1 3 1 total 0.000084 0.000012
0 3 2 total 0.001299 0.000154
(n,nc) matrix
material group in group out nuclide mean std. dev.
3 3 1 1 total 0.0 0.0
2 3 1 2 total 0.0 0.0
1 3 2 1 total 0.0 0.0
0 3 2 2 total 0.0 0.0
(n,n1) matrix
material group in group out nuclide mean std. dev.
3 3 1 1 total 0.0 0.0
2 3 1 2 total 0.0 0.0
1 3 2 1 total 0.0 0.0
0 3 2 2 total 0.0 0.0
(n,2n) matrix
material group in group out nuclide mean std. dev.
3 3 1 1 total 0.0 0.0
2 3 1 2 total 0.0 0.0
1 3 2 1 total 0.0 0.0
0 3 2 2 total 0.0 0.0
delayed-nu-fission
material delayedgroup group in nuclide mean std. dev.
1 3 1 1 total 0.0 0.0
3 3 2 1 total 0.0 0.0
@ -573,6 +854,7 @@
6 3 4 2 total 0.0 0.0
8 3 5 2 total 0.0 0.0
10 3 6 2 total 0.0 0.0
chi-delayed
material delayedgroup group out nuclide mean std. dev.
1 3 1 1 total 0.0 0.0
3 3 2 1 total 0.0 0.0
@ -586,6 +868,7 @@
6 3 4 2 total 0.0 0.0
8 3 5 2 total 0.0 0.0
10 3 6 2 total 0.0 0.0
beta
material delayedgroup group in nuclide mean std. dev.
1 3 1 1 total 0.0 0.0
3 3 2 1 total 0.0 0.0
@ -599,6 +882,7 @@
6 3 4 2 total 0.0 0.0
8 3 5 2 total 0.0 0.0
10 3 6 2 total 0.0 0.0
decay-rate
material delayedgroup nuclide mean std. dev.
0 3 1 total 0.0 0.0
1 3 2 total 0.0 0.0
@ -606,6 +890,7 @@
3 3 4 total 0.0 0.0
4 3 5 total 0.0 0.0
5 3 6 total 0.0 0.0
delayed-nu-fission matrix
material delayedgroup group in group out nuclide mean std. dev.
3 3 1 1 1 total 0.0 0.0
7 3 2 1 1 total 0.0 0.0

View file

@ -19,9 +19,17 @@ class MGXSTestHarness(PyAPITestHarness):
self.mgxs_lib = openmc.mgxs.Library(self._model.geometry)
self.mgxs_lib.by_nuclide = False
# Test all relevant MGXS types
# Test relevant MGXS types
relevant_MGXS_TYPES = [item for item in openmc.mgxs.MGXS_TYPES
if item != 'current']
# Add in a subset of openmc.mgxs.ARBITRARY_VECTOR_TYPES and
# openmc.mgxs.ARBITRARY_MATRIX_TYPES so we can see the code works,
# but not use too much resources
relevant_MGXS_TYPES += [
"(n,elastic)", "(n,level)", "(n,2n)", "(n,na)", "(n,nc)",
"(n,gamma)", "(n,a)", "(n,Xa)", "heating", "damage-energy",
"(n,n1)", "(n,a0)", "(n,nc) matrix", "(n,n1) matrix",
"(n,2n) matrix"]
self.mgxs_lib.mgxs_types = tuple(relevant_MGXS_TYPES) + \
openmc.mgxs.MDGXS_TYPES
self.mgxs_lib.energy_groups = energy_groups
@ -48,7 +56,7 @@ class MGXSTestHarness(PyAPITestHarness):
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'
outstr += mgxs_type + '\n' + df.to_string() + '\n'
# Hash the results if necessary
if hash_output:

File diff suppressed because it is too large Load diff

View file

@ -1 +1 @@
14f7fb2e399a4ad124b25b88dda5104d43cca9192aa1c17261da40bcc0e4394e56781f42f79c90107d0ff6b3e901f034bed09b037670e60b9ac4009b3805e17d
a9999488e2aa2ad0f1d694afedb71fbb56f1d0c8e8abdb6616698505a9d85302bf90586866fdb58eac96f76712a2dfbc884cc03087df7b5d148fb29d14dd2bbb

View file

@ -18,9 +18,17 @@ class MGXSTestHarness(PyAPITestHarness):
self.mgxs_lib = openmc.mgxs.Library(self._model.geometry)
self.mgxs_lib.by_nuclide = True
# Test relevant all MGXS types
# Test relevant MGXS types
relevant_MGXS_TYPES = [item for item in openmc.mgxs.MGXS_TYPES
if item != 'current']
# Add in a subset of openmc.mgxs.ARBITRARY_VECTOR_TYPES and
# openmc.mgxs.ARBITRARY_MATRIX_TYPES so we can see the code works,
# but not use too much resources
relevant_MGXS_TYPES += [
"(n,elastic)", "(n,level)", "(n,2n)", "(n,na)", "(n,nc)",
"(n,gamma)", "(n,a)", "(n,Xa)", "heating", "damage-energy",
"(n,n1)", "(n,a0)", "(n,nc) matrix", "(n,n1) matrix",
"(n,2n) matrix"]
self.mgxs_lib.mgxs_types = tuple(relevant_MGXS_TYPES)
self.mgxs_lib.energy_groups = energy_groups
self.mgxs_lib.legendre_order = 3