From 5f2e900222bac780fe2b3ff4244bc6f661950a5f Mon Sep 17 00:00:00 2001 From: Miriam Date: Fri, 10 Jul 2020 20:10:39 +0000 Subject: [PATCH 01/42] Added imports. Added current to list of MGXS_TYPES --- openmc/mgxs/mgxs.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openmc/mgxs/mgxs.py b/openmc/mgxs/mgxs.py index 78828c9de..9ad5e1c38 100644 --- a/openmc/mgxs/mgxs.py +++ b/openmc/mgxs/mgxs.py @@ -1,3 +1,4 @@ +from abc import ABCMeta from collections import OrderedDict import copy from numbers import Integral @@ -6,6 +7,7 @@ import warnings import h5py import numpy as np +from six import string_types import openmc import openmc.checkvalue as cv @@ -36,7 +38,8 @@ MGXS_TYPES = ( 'chi-prompt', 'inverse-velocity', 'prompt-nu-fission', - 'prompt-nu-fission matrix' + 'prompt-nu-fission matrix', + 'current' ) # Supported domain types From 860b494f14a0e3300368f26ccd999c290324a426 Mon Sep 17 00:00:00 2001 From: Miriam Date: Fri, 10 Jul 2020 21:14:35 +0000 Subject: [PATCH 02/42] Added SurfaceMGXS and Current classes to mgxs.py Sam Shaner wrote classes to include current in the mgxs file. Since that code was never merged, it fell severely out of date with the OpenMC develop branch. I have restored compatibility of the code and tested the current mgxs class. I would like someone to confirm whether _divide_by_density should be True for the SurfaceMGXS class. --- openmc/mgxs/mgxs.py | 470 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 468 insertions(+), 2 deletions(-) diff --git a/openmc/mgxs/mgxs.py b/openmc/mgxs/mgxs.py index 9ad5e1c38..443f2b904 100644 --- a/openmc/mgxs/mgxs.py +++ b/openmc/mgxs/mgxs.py @@ -510,7 +510,8 @@ class MGXS: self._tallies[key] = openmc.Tally(name=self.name) self._tallies[key].scores = [score] self._tallies[key].estimator = estimator - self._tallies[key].filters = [domain_filter] + if score != 'current': + self._tallies[key].filters = [domain_filter] # If a tally trigger was specified, add it to each tally if self.tally_trigger: @@ -694,7 +695,7 @@ 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'} + 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'} The type of multi-group cross section object to return domain : openmc.Material or openmc.Cell or openmc.Universe or openmc.RegularMesh The domain for spatial homogenization @@ -772,6 +773,8 @@ class MGXS: elif mgxs_type == 'prompt-nu-fission matrix': mgxs = NuFissionMatrixXS(domain, domain_type, energy_groups, prompt=True) + elif mgxs_type == 'current': + mgxs = Current(domain, domain_type, energy_groups) mgxs.by_nuclide = by_nuclide mgxs.name = name @@ -5894,3 +5897,466 @@ class InverseVelocity(MGXS): else: raise ValueError('Unable to return the units of InverseVelocity' ' for xs_type other than "macro"') + +class SurfaceMGXS(MGXS,metaclass=ABCMeta): + """An abstract multi-group cross section for some energy group structure + on the surfaces of a mesh domain. + This class can be used for both OpenMC input generation and tally data + post-processing to compute surface- and energy-integrated multi-group cross + section for multi-group neutronics calculations. + NOTE: Users should instantiate the subclasses of this abstract class. + Parameters + ---------- + domain : openmc.RegularMesh + The domain for spatial homogenization + domain_type : {'mesh'} + The domain type for spatial homogenization + energy_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. + 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 : Mesh + Domain for spatial homogenization + domain_type : {'mesh'} + Domain type for spatial homogenization + energy_groups : openmc.mgxs.EnergyGroups + Energy group structure for energy condensation + 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', '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 + 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 equal to the number of mesh surfaces times + two to account for both the incoming and outgoing current from the + mesh cell surfaces. + 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 + """ + + # Store whether or not the number density should be removed for microscopic + # values of this data + _divide_by_density = True + + def __init__(self, domain=None, domain_type=None, energy_groups=None, + by_nuclide=False, name=''): + super(SurfaceMGXS, self).__init__(domain, domain_type, energy_groups, + by_nuclide, name) + + + @property + def scores(self): + return [self.rxn_type] + + @property + def domain(self): + return self._domain + + @property + def domain_type(self): + return self._domain_type + + @domain.setter + def domain(self, domain): + cv.check_type('domain', domain, openmc.RegularMesh) + self._domain = domain + + # Assign a domain type + if self.domain_type is None: + self._domain_type = 'mesh' + + @domain_type.setter + def domain_type(self, domain_type): + cv.check_value('domain type', domain_type, 'mesh') + self._domain_type = domain_type + + @property + def filters(self): + group_edges = self.energy_groups.group_edges + energy_filter = openmc.EnergyFilter(group_edges) + mesh = _DOMAIN_TO_FILTER[self.domain_type](self.domain).mesh + meshsurface_filter = openmc.MeshSurfaceFilter(mesh) + filters = [[meshsurface_filter, energy_filter]] + + return self._add_angle_filters(filters) + + + @property + def xs_tally(self): + if self._xs_tally is None: + if self.tallies is None: + msg = 'Unable to get xs_tally since tallies have ' \ + 'not been loaded from a statepoint' + raise ValueError(msg) + + self._xs_tally = self.rxn_rate_tally + self._compute_xs() + + return self._xs_tally + + def load_from_statepoint(self, statepoint): + """Extracts tallies in an OpenMC StatePoint with the data needed to + compute multi-group cross sections. + This method is needed to compute cross section data from tallies + in an OpenMC StatePoint object. + NOTE: The statepoint must first be linked with an OpenMC Summary object. + Parameters + ---------- + statepoint : openmc.StatePoint + An OpenMC StatePoint object with tally data + Raises + ------ + ValueError + When this method is called with a statepoint that has not been + linked with a summary object. + """ + + cv.check_type('statepoint', statepoint, openmc.statepoint.StatePoint) + + if statepoint.summary is None: + msg = 'Unable to load data from a statepoint which has not been ' \ + 'linked with a summary file' + raise ValueError(msg) + + # Override the domain object that loaded from an OpenMC summary file + # NOTE: This is necessary for micro cross-sections which require + # the isotopic number densities as computed by OpenMC + geom = statepoint.summary.geometry + if self.domain_type in ('cell', 'distribcell'): + self.domain = geom.get_all_cells()[self.domain.id] + elif self.domain_type == 'universe': + self.domain = geom.get_all_universes()[self.domain.id] + elif self.domain_type == 'material': + self.domain = geom.get_all_materials()[self.domain.id] + elif self.domain_type == 'mesh': + self.domain = statepoint.meshes[self.domain.id] + else: + msg = 'Unable to load data from a statepoint for domain type {0} ' \ + 'which is not yet supported'.format(self.domain_type) + raise ValueError(msg) + + # Use tally "slicing" to ensure that tallies correspond to our domain + # NOTE: This is important if tally merging was used + if self.domain_type == 'mesh': + filters = [] + filter_bins = [] + elif self.domain_type != 'distribcell': + filters = [_DOMAIN_TO_FILTER[self.domain_type]] + filter_bins = [(self.domain.id,)] + # Distribcell filters only accept single cell - neglect it when slicing + else: + filters = [] + filter_bins = [] + + # Clear any tallies previously loaded from a statepoint + if self.loaded_sp: + self._tallies = None + self._xs_tally = None + self._rxn_rate_tally = None + self._loaded_sp = False + + # Make a list of the surface bins + #surface_bins = list(range(1, 4 * self.domain.n_dimension + 1)) + + # Find, slice and store Tallies from StatePoint + # The tally slicing is needed if tally merging was used + for tally_type, tally in self.tallies.items(): + #surface_filter = openmc.SurfaceFilter(surface_bins) + #tally.filters.append(surface_filter) + sp_tally = statepoint.get_tally( + tally.scores, tally.filters, tally.nuclides, + estimator=tally.estimator, exact_filters=True) + sp_tally = sp_tally.get_slice( + tally.scores, filters, filter_bins, tally.nuclides) + sp_tally.sparse = self.sparse + self.tallies[tally_type] = sp_tally + + self._loaded_sp = True + + def get_xs(self, groups='all', subdomains='all', nuclides='all', + xs_type='macro', order_groups='increasing', + value='mean', squeeze=True, **kwargs): + r"""Returns an array of multi-group cross sections. + This method constructs a 3D NumPy array for the requested + multi-group cross section data for one or more subdomains + (1st dimension), energy groups (2nd dimension), and nuclides + (3rd 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'. + nuclides : Iterable of str or 'all' or 'sum' + A list of nuclide name strings (e.g., ['U235', 'U238']). The + special string 'all' will return the cross sections for all nuclides + in the spatial domain. The special string 'sum' will return the + cross section 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'. + 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 multi-group cross section indexed in the order + each group, subdomain and nuclide is listed in the parameters. + Raises + ------ + ValueError + When this method is called before the multi-group cross section is + computed from tally data. + """ + + cv.check_value('value', value, ['mean', 'std_dev', 'rel_err']) + cv.check_value('xs_type', xs_type, ['macro', 'micro']) + + # FIXME: Unable to get microscopic xs for mesh domain because the mesh + # cells do not know the nuclide densities in each mesh cell. + if self.domain_type == 'mesh' and xs_type == 'micro': + msg = 'Unable to get micro xs for mesh domain since the mesh ' \ + 'cells do not know the nuclide densities in each mesh cell.' + raise ValueError(msg) + + filters = [] + filter_bins = [] + + # Construct a collection of the domain filter bins + if not isinstance(subdomains, string_types): + 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, string_types): + 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)) + + # Construct a collection of the nuclides to retrieve from the xs tally + if self.by_nuclide: + if nuclides == 'all' or nuclides == 'sum' or nuclides == ['sum']: + query_nuclides = self.get_nuclides() + else: + query_nuclides = nuclides + else: + query_nuclides = ['total'] + + # If user requested the sum for all nuclides, use tally summation + if nuclides == 'sum' or nuclides == ['sum']: + xs_tally = self.xs_tally.summation(nuclides=query_nuclides) + xs = xs_tally.get_values(filters=filters, + filter_bins=filter_bins, value=value) + else: + xs = self.xs_tally.get_values(filters=filters, + filter_bins=filter_bins, + nuclides=query_nuclides, value=value) + + # Divide by atom number densities for microscopic cross sections + if xs_type == 'micro' and self._divide_by_density: + if self.by_nuclide: + densities = self.get_nuclide_densities(nuclides) + else: + densities = self.get_nuclide_densities('sum') + if value == 'mean' or value == 'std_dev': + xs /= densities[np.newaxis, :, np.newaxis] + + # Eliminate the trivial score dimension + xs = np.squeeze(xs, axis=len(xs.shape) - 1) + xs = np.nan_to_num(xs) + + 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_surfaces = 4 * self.domain.n_dimension + num_subdomains = int(xs.shape[0] / (num_groups * self.num_polar * + self.num_azimuthal * num_surfaces)) + if self.num_polar > 1 or self.num_azimuthal > 1: + new_shape = (self.num_polar, self.num_azimuthal, num_subdomains, + num_groups, num_surfaces) + else: + new_shape = (num_subdomains, num_groups, num_surfaces) + new_shape += xs.shape[1:] + new_xs = np.zeros(new_shape) + for cell in range(num_subdomains): + for g in range(num_groups): + for s in range(num_surfaces): + new_xs[cell,g,s] = \ + xs[cell*num_surfaces*num_groups+s*num_groups+g] + xs = new_xs + + # Reverse data if user requested increasing energy groups since + # tally data is stored in order of increasing energies + if order_groups == 'increasing': + xs = xs[..., ::-1, :, :] + + if squeeze: + # We want to squeeze out everything but the polar, azimuthal, + # and energy group data. + xs = self._squeeze_xs(xs) + + return xs + + +class Current(SurfaceMGXS): + r"""A current multi-group cross section. + 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:`TotalXS.energy_groups` and + :attr:`TotalXS.domain` properties. Tallies for the flux and appropriate + reaction rates over the specified domain are generated automatically via the + :attr:`TotalXS.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:`TotalXS.xs_tally` property. + For a spatial domain :math:`V` and energy group :math:`[E_g,E_{g-1}]`, the + total 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_t (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)}. + Parameters + ---------- + 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. + 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 : Material or Cell or Universe or Mesh + 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 + 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', '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, domain=None, domain_type=None, + groups=None, by_nuclide=False, name=''): + super(Current, self).__init__(domain, domain_type, + groups, by_nuclide, name) + self._rxn_type = 'current' From 69778fde51d403bc350623c0db4cbe326740ac29 Mon Sep 17 00:00:00 2001 From: "Miriam (Rathbun) Kreher" Date: Tue, 14 Jul 2020 11:22:28 -0600 Subject: [PATCH 03/42] Update openmc/mgxs/mgxs.py Co-authored-by: Paul Romano --- openmc/mgxs/mgxs.py | 1 - 1 file changed, 1 deletion(-) diff --git a/openmc/mgxs/mgxs.py b/openmc/mgxs/mgxs.py index 443f2b904..c9e09c4b1 100644 --- a/openmc/mgxs/mgxs.py +++ b/openmc/mgxs/mgxs.py @@ -6022,7 +6022,6 @@ class SurfaceMGXS(MGXS,metaclass=ABCMeta): return self._add_angle_filters(filters) - @property def xs_tally(self): if self._xs_tally is None: From d5cebe407803f86ca70b7c48129f0066da63ca70 Mon Sep 17 00:00:00 2001 From: "Miriam (Rathbun) Kreher" Date: Tue, 14 Jul 2020 11:22:54 -0600 Subject: [PATCH 04/42] Update openmc/mgxs/mgxs.py Co-authored-by: Paul Romano --- openmc/mgxs/mgxs.py | 1 + 1 file changed, 1 insertion(+) diff --git a/openmc/mgxs/mgxs.py b/openmc/mgxs/mgxs.py index c9e09c4b1..f163335e9 100644 --- a/openmc/mgxs/mgxs.py +++ b/openmc/mgxs/mgxs.py @@ -5905,6 +5905,7 @@ class SurfaceMGXS(MGXS,metaclass=ABCMeta): post-processing to compute surface- and energy-integrated multi-group cross section for multi-group neutronics calculations. NOTE: Users should instantiate the subclasses of this abstract class. + Parameters ---------- domain : openmc.RegularMesh From f584c95d748463ec6e4baa587e9ede8fc344dc62 Mon Sep 17 00:00:00 2001 From: "Miriam (Rathbun) Kreher" Date: Tue, 14 Jul 2020 11:23:03 -0600 Subject: [PATCH 05/42] Update openmc/mgxs/mgxs.py Co-authored-by: Paul Romano --- openmc/mgxs/mgxs.py | 1 + 1 file changed, 1 insertion(+) diff --git a/openmc/mgxs/mgxs.py b/openmc/mgxs/mgxs.py index f163335e9..39020f710 100644 --- a/openmc/mgxs/mgxs.py +++ b/openmc/mgxs/mgxs.py @@ -5919,6 +5919,7 @@ class SurfaceMGXS(MGXS,metaclass=ABCMeta): name : str, optional Name of the multi-group cross section. Used as a label to identify tallies in OpenMC 'tallies.xml' file. + Attributes ---------- name : str, optional From b860d7af9cbcfe325555879d4f790ef7186e57d7 Mon Sep 17 00:00:00 2001 From: "Miriam (Rathbun) Kreher" Date: Tue, 14 Jul 2020 11:23:13 -0600 Subject: [PATCH 06/42] Update openmc/mgxs/mgxs.py Co-authored-by: Paul Romano --- openmc/mgxs/mgxs.py | 1 + 1 file changed, 1 insertion(+) diff --git a/openmc/mgxs/mgxs.py b/openmc/mgxs/mgxs.py index 39020f710..e5e72a923 100644 --- a/openmc/mgxs/mgxs.py +++ b/openmc/mgxs/mgxs.py @@ -6282,6 +6282,7 @@ class Current(SurfaceMGXS): \frac{\int_{r \in V} dr \int_{4\pi} d\Omega \int_{E_g}^{E_{g-1}} dE \; \sigma_t (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)}. + Parameters ---------- domain : openmc.Material or openmc.Cell or openmc.Universe or openmc.RegularMesh From 69715c7a15e5eb7006376b163d5c8e100a4ceb79 Mon Sep 17 00:00:00 2001 From: "Miriam (Rathbun) Kreher" Date: Tue, 14 Jul 2020 11:23:46 -0600 Subject: [PATCH 07/42] Update openmc/mgxs/mgxs.py Co-authored-by: Paul Romano --- openmc/mgxs/mgxs.py | 1 + 1 file changed, 1 insertion(+) diff --git a/openmc/mgxs/mgxs.py b/openmc/mgxs/mgxs.py index e5e72a923..70db0bf7f 100644 --- a/openmc/mgxs/mgxs.py +++ b/openmc/mgxs/mgxs.py @@ -6296,6 +6296,7 @@ class Current(SurfaceMGXS): name : str, optional Name of the multi-group cross section. Used as a label to identify tallies in OpenMC 'tallies.xml' file. + Attributes ---------- name : str, optional From 47241b334d1705b9bb072556accbb20c7c1a5bf1 Mon Sep 17 00:00:00 2001 From: "Miriam (Rathbun) Kreher" Date: Tue, 14 Jul 2020 11:46:25 -0600 Subject: [PATCH 08/42] Update openmc/mgxs/mgxs.py Co-authored-by: Giud --- openmc/mgxs/mgxs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openmc/mgxs/mgxs.py b/openmc/mgxs/mgxs.py index 70db0bf7f..98a4eea8c 100644 --- a/openmc/mgxs/mgxs.py +++ b/openmc/mgxs/mgxs.py @@ -5898,7 +5898,7 @@ class InverseVelocity(MGXS): raise ValueError('Unable to return the units of InverseVelocity' ' for xs_type other than "macro"') -class SurfaceMGXS(MGXS,metaclass=ABCMeta): +class SurfaceMGXS(MGXS): """An abstract multi-group cross section for some energy group structure on the surfaces of a mesh domain. This class can be used for both OpenMC input generation and tally data From 66224aaf4c1aa03e7ee717896ec534c46929c931 Mon Sep 17 00:00:00 2001 From: "Miriam (Rathbun) Kreher" Date: Tue, 14 Jul 2020 11:50:12 -0600 Subject: [PATCH 09/42] Update openmc/mgxs/mgxs.py Co-authored-by: Paul Romano --- openmc/mgxs/mgxs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openmc/mgxs/mgxs.py b/openmc/mgxs/mgxs.py index 98a4eea8c..5b28b806c 100644 --- a/openmc/mgxs/mgxs.py +++ b/openmc/mgxs/mgxs.py @@ -6173,7 +6173,7 @@ class SurfaceMGXS(MGXS): filter_bins = [] # Construct a collection of the domain filter bins - if not isinstance(subdomains, string_types): + if not isinstance(subdomains, str): cv.check_iterable_type('subdomains', subdomains, Integral, max_depth=3) From 27d002e0d42eff4653927d5fd58fdb3b041f0cde Mon Sep 17 00:00:00 2001 From: "Miriam (Rathbun) Kreher" Date: Tue, 14 Jul 2020 11:51:33 -0600 Subject: [PATCH 10/42] Update openmc/mgxs/mgxs.py Co-authored-by: Giud --- openmc/mgxs/mgxs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openmc/mgxs/mgxs.py b/openmc/mgxs/mgxs.py index 5b28b806c..90b5df5dc 100644 --- a/openmc/mgxs/mgxs.py +++ b/openmc/mgxs/mgxs.py @@ -5944,7 +5944,7 @@ class SurfaceMGXS(MGXS): tally_keys : list of str The keys into the tallies dictionary for each tally used to compute the multi-group cross section - estimator : {'tracklength', 'analog'} + 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 From 488ff739bcfc0794cad344f48e64860c04d4af4b Mon Sep 17 00:00:00 2001 From: Miriam Date: Tue, 14 Jul 2020 18:13:25 +0000 Subject: [PATCH 11/42] Making updates based on comments from pull request Set _divide_by_density = False Removed some imports Added lines Changed some wording, variable names --- openmc/mgxs/mgxs.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/openmc/mgxs/mgxs.py b/openmc/mgxs/mgxs.py index 70db0bf7f..de70d46a6 100644 --- a/openmc/mgxs/mgxs.py +++ b/openmc/mgxs/mgxs.py @@ -1,4 +1,3 @@ -from abc import ABCMeta from collections import OrderedDict import copy from numbers import Integral @@ -7,7 +6,6 @@ import warnings import h5py import numpy as np -from six import string_types import openmc import openmc.checkvalue as cv @@ -5898,7 +5896,8 @@ class InverseVelocity(MGXS): raise ValueError('Unable to return the units of InverseVelocity' ' for xs_type other than "macro"') -class SurfaceMGXS(MGXS,metaclass=ABCMeta): + +class SurfaceMGXS(MGXS): """An abstract multi-group cross section for some energy group structure on the surfaces of a mesh domain. This class can be used for both OpenMC input generation and tally data @@ -5980,7 +5979,7 @@ class SurfaceMGXS(MGXS,metaclass=ABCMeta): # Store whether or not the number density should be removed for microscopic # values of this data - _divide_by_density = True + _divide_by_density = False def __init__(self, domain=None, domain_type=None, energy_groups=None, by_nuclide=False, name=''): @@ -6173,7 +6172,7 @@ class SurfaceMGXS(MGXS,metaclass=ABCMeta): filter_bins = [] # Construct a collection of the domain filter bins - if not isinstance(subdomains, string_types): + if not isinstance(subdomains, str): cv.check_iterable_type('subdomains', subdomains, Integral, max_depth=3) From e3835aa5822c5687e390e7c234ad429c321a2351 Mon Sep 17 00:00:00 2001 From: Miriam Date: Tue, 14 Jul 2020 20:49:53 +0000 Subject: [PATCH 12/42] Updating based on pull request comments Removed domain & domain_type since those are inherited from MGXS --- openmc/mgxs/mgxs.py | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/openmc/mgxs/mgxs.py b/openmc/mgxs/mgxs.py index b8a370898..26b429052 100644 --- a/openmc/mgxs/mgxs.py +++ b/openmc/mgxs/mgxs.py @@ -5991,28 +5991,6 @@ class SurfaceMGXS(MGXS): def scores(self): return [self.rxn_type] - @property - def domain(self): - return self._domain - - @property - def domain_type(self): - return self._domain_type - - @domain.setter - def domain(self, domain): - cv.check_type('domain', domain, openmc.RegularMesh) - self._domain = domain - - # Assign a domain type - if self.domain_type is None: - self._domain_type = 'mesh' - - @domain_type.setter - def domain_type(self, domain_type): - cv.check_value('domain type', domain_type, 'mesh') - self._domain_type = domain_type - @property def filters(self): group_edges = self.energy_groups.group_edges From 7b149cf6cc165a18c7f8f70a06c8a3ca53c9f398 Mon Sep 17 00:00:00 2001 From: Miriam Date: Tue, 14 Jul 2020 22:29:43 +0000 Subject: [PATCH 13/42] Updates based on comments in pull request Changed a type --- openmc/mgxs/mgxs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openmc/mgxs/mgxs.py b/openmc/mgxs/mgxs.py index 26b429052..2c2ea8d65 100644 --- a/openmc/mgxs/mgxs.py +++ b/openmc/mgxs/mgxs.py @@ -6161,7 +6161,7 @@ class SurfaceMGXS(MGXS): filter_bins.append(tuple(subdomain_bins)) # Construct list of energy group bounds tuples for all requested groups - if not isinstance(groups, string_types): + if not isinstance(groups, str): cv.check_iterable_type('groups', groups, Integral) filters.append(openmc.EnergyFilter) energy_bins = [] From 62309029c3525fcbb9fdc29d7cdb457856a650e6 Mon Sep 17 00:00:00 2001 From: "Miriam (Rathbun) Kreher" Date: Tue, 14 Jul 2020 20:09:14 -0600 Subject: [PATCH 14/42] Update openmc/mgxs/mgxs.py Co-authored-by: Giud --- openmc/mgxs/mgxs.py | 1 - 1 file changed, 1 deletion(-) diff --git a/openmc/mgxs/mgxs.py b/openmc/mgxs/mgxs.py index 2c2ea8d65..59777af71 100644 --- a/openmc/mgxs/mgxs.py +++ b/openmc/mgxs/mgxs.py @@ -5986,7 +5986,6 @@ class SurfaceMGXS(MGXS): super(SurfaceMGXS, self).__init__(domain, domain_type, energy_groups, by_nuclide, name) - @property def scores(self): return [self.rxn_type] From c9dece6eb2e1c23f1172f47c44849ba736f9e10a Mon Sep 17 00:00:00 2001 From: Miriam Date: Thu, 16 Jul 2020 03:02:48 +0000 Subject: [PATCH 15/42] Removed a comment that is outdated. --- openmc/mgxs/mgxs.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/openmc/mgxs/mgxs.py b/openmc/mgxs/mgxs.py index 2c2ea8d65..20b641225 100644 --- a/openmc/mgxs/mgxs.py +++ b/openmc/mgxs/mgxs.py @@ -6075,9 +6075,6 @@ class SurfaceMGXS(MGXS): self._rxn_rate_tally = None self._loaded_sp = False - # Make a list of the surface bins - #surface_bins = list(range(1, 4 * self.domain.n_dimension + 1)) - # Find, slice and store Tallies from StatePoint # The tally slicing is needed if tally merging was used for tally_type, tally in self.tallies.items(): From 33358fed96aec4578f83383f3aece33ff2e1429a Mon Sep 17 00:00:00 2001 From: Miriam Date: Thu, 16 Jul 2020 15:54:17 +0000 Subject: [PATCH 16/42] Removed oudated comments. --- openmc/mgxs/mgxs.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/openmc/mgxs/mgxs.py b/openmc/mgxs/mgxs.py index 1a79d6591..c1fb2827b 100644 --- a/openmc/mgxs/mgxs.py +++ b/openmc/mgxs/mgxs.py @@ -6077,8 +6077,6 @@ class SurfaceMGXS(MGXS): # Find, slice and store Tallies from StatePoint # The tally slicing is needed if tally merging was used for tally_type, tally in self.tallies.items(): - #surface_filter = openmc.SurfaceFilter(surface_bins) - #tally.filters.append(surface_filter) sp_tally = statepoint.get_tally( tally.scores, tally.filters, tally.nuclides, estimator=tally.estimator, exact_filters=True) From 69e9884a027424062de7ea225b5742be5b767c5d Mon Sep 17 00:00:00 2001 From: Miriam Date: Fri, 17 Jul 2020 00:08:14 +0000 Subject: [PATCH 17/42] Updated docstring for current --- openmc/mgxs/mgxs.py | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/openmc/mgxs/mgxs.py b/openmc/mgxs/mgxs.py index c1fb2827b..e99e8a611 100644 --- a/openmc/mgxs/mgxs.py +++ b/openmc/mgxs/mgxs.py @@ -5902,7 +5902,7 @@ class SurfaceMGXS(MGXS): on the surfaces of a mesh domain. This class can be used for both OpenMC input generation and tally data post-processing to compute surface- and energy-integrated multi-group cross - section for multi-group neutronics calculations. + sections for multi-group neutronics calculations. NOTE: Users should instantiate the subclasses of this abstract class. Parameters @@ -6236,23 +6236,22 @@ class SurfaceMGXS(MGXS): class Current(SurfaceMGXS): r"""A current multi-group cross section. 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:`TotalXS.energy_groups` and - :attr:`TotalXS.domain` properties. Tallies for the flux and appropriate + post-processing to compute surface- and energy-integrated + multi-group current cross sections for multi-group neutronics calculations. At + a minimum, one needs to set the :attr:`Current.energy_groups` and + :attr:`Current.domain` properties. Tallies for the appropriate reaction rates over the specified domain are generated automatically via the - :attr:`TotalXS.tallies` property, which can then be appended to a + :attr:`Current.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:`TotalXS.xs_tally` property. - For a spatial domain :math:`V` and energy group :math:`[E_g,E_{g-1}]`, the + can then be obtained from the :attr:`Current.xs_tally` property. + For a spatial domain :math:`S` and energy group :math:`[E_g,E_{g-1}]`, the total 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_t (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)}. + \frac{\int_{r \in S} dS \int_{E_g}^{E_{g-1}} dE \; + J(r, E)}{\int_{r \in S} dS \int_{E_g}^{E_{g-1}} dE}. Parameters ---------- From 2e706e5088f3fc1ab266fe45b837b0a0a517bc44 Mon Sep 17 00:00:00 2001 From: Miriam Date: Fri, 17 Jul 2020 03:37:59 +0000 Subject: [PATCH 18/42] Updated certain tests to circumvent current MGXS when calling all MGXS_TYPES These tests had to skip 'current' because current operates only with a mesh domain. However, these tests impose a material domain. Therefore, they should not be run with current. --- tests/regression_tests/mgxs_library_condense/test.py | 2 +- tests/regression_tests/mgxs_library_hdf5/test.py | 2 +- tests/regression_tests/mgxs_library_no_nuclides/test.py | 2 +- tests/regression_tests/mgxs_library_nuclides/test.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/regression_tests/mgxs_library_condense/test.py b/tests/regression_tests/mgxs_library_condense/test.py index 167772e2f..15a4ff827 100644 --- a/tests/regression_tests/mgxs_library_condense/test.py +++ b/tests/regression_tests/mgxs_library_condense/test.py @@ -19,7 +19,7 @@ class MGXSTestHarness(PyAPITestHarness): self.mgxs_lib.by_nuclide = False # Test all MGXS types - self.mgxs_lib.mgxs_types = openmc.mgxs.MGXS_TYPES + \ + self.mgxs_lib.mgxs_types = openmc.mgxs.MGXS_TYPES[:-1] + \ openmc.mgxs.MDGXS_TYPES self.mgxs_lib.energy_groups = energy_groups self.mgxs_lib.num_delayed_groups = 6 diff --git a/tests/regression_tests/mgxs_library_hdf5/test.py b/tests/regression_tests/mgxs_library_hdf5/test.py index 9811ab215..37d30516f 100644 --- a/tests/regression_tests/mgxs_library_hdf5/test.py +++ b/tests/regression_tests/mgxs_library_hdf5/test.py @@ -23,7 +23,7 @@ class MGXSTestHarness(PyAPITestHarness): self.mgxs_lib.by_nuclide = False # Test all MGXS types - self.mgxs_lib.mgxs_types = openmc.mgxs.MGXS_TYPES + \ + self.mgxs_lib.mgxs_types = openmc.mgxs.MGXS_TYPES[:-1] + \ openmc.mgxs.MDGXS_TYPES self.mgxs_lib.energy_groups = energy_groups self.mgxs_lib.num_delayed_groups = 6 diff --git a/tests/regression_tests/mgxs_library_no_nuclides/test.py b/tests/regression_tests/mgxs_library_no_nuclides/test.py index 506ac238f..65b24d78f 100644 --- a/tests/regression_tests/mgxs_library_no_nuclides/test.py +++ b/tests/regression_tests/mgxs_library_no_nuclides/test.py @@ -20,7 +20,7 @@ class MGXSTestHarness(PyAPITestHarness): self.mgxs_lib.by_nuclide = False # Test all MGXS types - self.mgxs_lib.mgxs_types = openmc.mgxs.MGXS_TYPES + \ + self.mgxs_lib.mgxs_types = openmc.mgxs.MGXS_TYPES[:-1] + \ openmc.mgxs.MDGXS_TYPES self.mgxs_lib.energy_groups = energy_groups self.mgxs_lib.num_delayed_groups = 6 diff --git a/tests/regression_tests/mgxs_library_nuclides/test.py b/tests/regression_tests/mgxs_library_nuclides/test.py index c64c27709..521373eb7 100644 --- a/tests/regression_tests/mgxs_library_nuclides/test.py +++ b/tests/regression_tests/mgxs_library_nuclides/test.py @@ -18,7 +18,7 @@ class MGXSTestHarness(PyAPITestHarness): self.mgxs_lib = openmc.mgxs.Library(self._model.geometry) self.mgxs_lib.by_nuclide = True # Test all MGXS types - self.mgxs_lib.mgxs_types = openmc.mgxs.MGXS_TYPES + self.mgxs_lib.mgxs_types = openmc.mgxs.MGXS_TYPES[:-1] self.mgxs_lib.energy_groups = energy_groups self.mgxs_lib.legendre_order = 3 self.mgxs_lib.domain_type = 'material' From 43456ea2d66c0b690d2b735e6f85937a165606ac Mon Sep 17 00:00:00 2001 From: Miriam Date: Fri, 17 Jul 2020 22:07:15 +0000 Subject: [PATCH 19/42] Made Current class consistent with mesh domain type 1) Kept by_nuclide, num_nuclides, and nuclides in the docstrings because when building a mgxs library for all mgxs_types, the variables should be the same accross all classes. However, I noted that they were unused for a SurfaceMGXS. 2) Removed all code related to nuclides and micro xs since they were unused anyway. 3) Removed the possibility of computing a Current with any domain other than mesh. Included an error message if a current mgxs object is instantiated with any domain other than mesh. Since mesh domains and by_nuclide features are uncompatible, an existing message is already raised when mesh and by_nuclide are used together. 4) Changed estimator type to analog. --- openmc/mgxs/mgxs.py | 113 ++++-------------- .../mgxs_library_distribcell/test.py | 2 +- 2 files changed, 27 insertions(+), 88 deletions(-) diff --git a/openmc/mgxs/mgxs.py b/openmc/mgxs/mgxs.py index e99e8a611..a29c0e2a4 100644 --- a/openmc/mgxs/mgxs.py +++ b/openmc/mgxs/mgxs.py @@ -5914,7 +5914,7 @@ class SurfaceMGXS(MGXS): energy_groups : openmc.mgxs.EnergyGroups The energy group structure for energy condensation by_nuclide : bool - If true, computes cross sections for each nuclide in domain + Unused for SurfacMGXS name : str, optional Name of the multi-group cross section. Used as a label to identify tallies in OpenMC 'tallies.xml' file. @@ -5926,7 +5926,7 @@ class SurfaceMGXS(MGXS): rxn_type : str Reaction type (e.g., 'total', 'nu-fission', etc.) by_nuclide : bool - If true, computes cross sections for each nuclide in domain + Unused for SurfaceMGXS domain : Mesh Domain for spatial homogenization domain_type : {'mesh'} @@ -5959,13 +5959,9 @@ class SurfaceMGXS(MGXS): two to account for both the incoming and outgoing current from the mesh cell surfaces. 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. + Unused n SurfaceMGXS 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. + Unused in SurfaceMGXS sparse : bool Whether or not the MGXS' tallies use SciPy's LIL sparse matrix format for compressed data storage @@ -5977,14 +5973,17 @@ class SurfaceMGXS(MGXS): The key used to index multi-group cross sections in an HDF5 data store """ - # Store whether or not the number density should be removed for microscopic - # values of this data - _divide_by_density = False - def __init__(self, domain=None, domain_type=None, energy_groups=None, by_nuclide=False, name=''): super(SurfaceMGXS, self).__init__(domain, domain_type, energy_groups, by_nuclide, name) + self._estimator = ['analog'] + self._valid_estimators = ['analog'] + if domain_type != 'mesh': + msg = 'Unable to compute a SurfaceMGXS for domain type {0} ' \ + 'which is not a mesh type'.format(domain_type) + raise ValueError(msg) + @property def scores(self): @@ -6037,23 +6036,6 @@ class SurfaceMGXS(MGXS): 'linked with a summary file' raise ValueError(msg) - # Override the domain object that loaded from an OpenMC summary file - # NOTE: This is necessary for micro cross-sections which require - # the isotopic number densities as computed by OpenMC - geom = statepoint.summary.geometry - if self.domain_type in ('cell', 'distribcell'): - self.domain = geom.get_all_cells()[self.domain.id] - elif self.domain_type == 'universe': - self.domain = geom.get_all_universes()[self.domain.id] - elif self.domain_type == 'material': - self.domain = geom.get_all_materials()[self.domain.id] - elif self.domain_type == 'mesh': - self.domain = statepoint.meshes[self.domain.id] - else: - msg = 'Unable to load data from a statepoint for domain type {0} ' \ - 'which is not yet supported'.format(self.domain_type) - raise ValueError(msg) - # Use tally "slicing" to ensure that tallies correspond to our domain # NOTE: This is important if tally merging was used if self.domain_type == 'mesh': @@ -6102,13 +6084,10 @@ class SurfaceMGXS(MGXS): subdomains : Iterable of Integral or 'all' Subdomain IDs of interest. Defaults to 'all'. nuclides : Iterable of str or 'all' or 'sum' - A list of nuclide name strings (e.g., ['U235', 'U238']). The - special string 'all' will return the cross sections for all nuclides - in the spatial domain. The special string 'sum' will return the - cross section 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'. + Unused in SurfaceMGXS + xs_type: {'macro'} + The 'macro'/'micro' distinction does not apply to SurfaceMGXS. + The calculation of a 'micro' xs_type is omited in this class. order_groups: {'increasing', 'decreasing'} Return the cross section indexed according to increasing or decreasing energy groups (decreasing or increasing energies). @@ -6131,14 +6110,7 @@ class SurfaceMGXS(MGXS): """ cv.check_value('value', value, ['mean', 'std_dev', 'rel_err']) - cv.check_value('xs_type', xs_type, ['macro', 'micro']) - - # FIXME: Unable to get microscopic xs for mesh domain because the mesh - # cells do not know the nuclide densities in each mesh cell. - if self.domain_type == 'mesh' and xs_type == 'micro': - msg = 'Unable to get micro xs for mesh domain since the mesh ' \ - 'cells do not know the nuclide densities in each mesh cell.' - raise ValueError(msg) + cv.check_value('xs_type', xs_type, ['macro']) filters = [] filter_bins = [] @@ -6164,34 +6136,6 @@ class SurfaceMGXS(MGXS): (self.energy_groups.get_group_bounds(group),)) filter_bins.append(tuple(energy_bins)) - # Construct a collection of the nuclides to retrieve from the xs tally - if self.by_nuclide: - if nuclides == 'all' or nuclides == 'sum' or nuclides == ['sum']: - query_nuclides = self.get_nuclides() - else: - query_nuclides = nuclides - else: - query_nuclides = ['total'] - - # If user requested the sum for all nuclides, use tally summation - if nuclides == 'sum' or nuclides == ['sum']: - xs_tally = self.xs_tally.summation(nuclides=query_nuclides) - xs = xs_tally.get_values(filters=filters, - filter_bins=filter_bins, value=value) - else: - xs = self.xs_tally.get_values(filters=filters, - filter_bins=filter_bins, - nuclides=query_nuclides, value=value) - - # Divide by atom number densities for microscopic cross sections - if xs_type == 'micro' and self._divide_by_density: - if self.by_nuclide: - densities = self.get_nuclide_densities(nuclides) - else: - densities = self.get_nuclide_densities('sum') - if value == 'mean' or value == 'std_dev': - xs /= densities[np.newaxis, :, np.newaxis] - # Eliminate the trivial score dimension xs = np.squeeze(xs, axis=len(xs.shape) - 1) xs = np.nan_to_num(xs) @@ -6262,7 +6206,7 @@ class Current(SurfaceMGXS): groups : openmc.mgxs.EnergyGroups The energy group structure for energy condensation by_nuclide : bool - If true, computes cross sections for each nuclide in domain + Unused in SurfaceMGXS name : str, optional Name of the multi-group cross section. Used as a label to identify tallies in OpenMC 'tallies.xml' file. @@ -6274,10 +6218,10 @@ class Current(SurfaceMGXS): 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 : Material or Cell or Universe or Mesh + Unused for SurfaceMGXS + domain : Mesh Domain for spatial homogenization - domain_type : {'material', 'cell', 'distribcell', 'universe', 'mesh'} + domain_type : {'mesh'} Domain type for spatial homogenization energy_groups : openmc.mgxs.EnergyGroups Energy group structure for energy condensation @@ -6291,7 +6235,7 @@ class Current(SurfaceMGXS): tally_keys : list of str The keys into the tallies dictionary for each tally used to compute the multi-group cross section - estimator : {'tracklength', 'analog'} + 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 @@ -6305,18 +6249,13 @@ class Current(SurfaceMGXS): 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). + The number of subdomains is equal to the number of mesh surfaces times + two to account for both the incoming and outgoing current from the + mesh cell surfaces. 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. + Unused in SurfaceMGXS 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. + Unused in SurfaceMGXS sparse : bool Whether or not the MGXS' tallies use SciPy's LIL sparse matrix format for compressed data storage diff --git a/tests/regression_tests/mgxs_library_distribcell/test.py b/tests/regression_tests/mgxs_library_distribcell/test.py index 9fe567388..d6e0a6de0 100644 --- a/tests/regression_tests/mgxs_library_distribcell/test.py +++ b/tests/regression_tests/mgxs_library_distribcell/test.py @@ -23,7 +23,7 @@ class MGXSTestHarness(PyAPITestHarness): self.mgxs_lib.by_nuclide = False # Test all MGXS types - self.mgxs_lib.mgxs_types = openmc.mgxs.MGXS_TYPES + \ + self.mgxs_lib.mgxs_types = openmc.mgxs.MGXS_TYPES[:-1] + \ openmc.mgxs.MDGXS_TYPES self.mgxs_lib.energy_groups = energy_groups self.mgxs_lib.num_delayed_groups = 6 From 676bcefb1e9551562beec4643cccc62fb3965406 Mon Sep 17 00:00:00 2001 From: Miriam Date: Sun, 19 Jul 2020 04:40:31 +0000 Subject: [PATCH 20/42] Finalized check for mesh & made progress on regression test I had to put domain properties back into the SurfaceMGXS class to perform a checktype on the domain_type. I updated the regression test mgxs_library_mesh to expect the correct input. However, now the test fails for a 2-dimensional mesh. In 3D, the Current MGXS fails because it does not contain a 'z' dimension. Meanwhile, all the other classes contain a 'z' dimension, equal to 1. I need to figure out why the mesh used by SurfaceMGXS doesn't contain the same information as the other classes, even though it is the same mesh used in all. --- openmc/mgxs/mgxs.py | 45 +++++++++------- .../mgxs_library_mesh/inputs_true.dat | 51 +++++++++++-------- 2 files changed, 58 insertions(+), 38 deletions(-) diff --git a/openmc/mgxs/mgxs.py b/openmc/mgxs/mgxs.py index a29c0e2a4..1b3e107f8 100644 --- a/openmc/mgxs/mgxs.py +++ b/openmc/mgxs/mgxs.py @@ -1964,6 +1964,7 @@ class MGXS: # energy groups such that data is from fast to thermal if self.domain_type == 'mesh': mesh_str = 'mesh {0}'.format(self.domain.id) + print("HELLO WORLD", mesh_str) df.sort_values(by=[(mesh_str, 'x'), (mesh_str, 'y'), (mesh_str, 'z')] + columns, inplace=True) else: @@ -5979,16 +5980,33 @@ class SurfaceMGXS(MGXS): by_nuclide, name) self._estimator = ['analog'] self._valid_estimators = ['analog'] - if domain_type != 'mesh': - msg = 'Unable to compute a SurfaceMGXS for domain type {0} ' \ - 'which is not a mesh type'.format(domain_type) - raise ValueError(msg) - @property def scores(self): return [self.rxn_type] + @property + def domain(self): + return self._domain + + @property + def domain_type(self): + return self._domain_type + + @domain.setter + def domain(self, domain): + cv.check_type('domain', domain, openmc.RegularMesh) + self._domain = domain + + # Assign a domain type + if self.domain_type is None: + self._domain_type = 'mesh' + + @domain_type.setter + def domain_type(self, domain_type): + cv.check_value('domain type', domain_type, 'mesh') + self._domain_type = domain_type + @property def filters(self): group_edges = self.energy_groups.group_edges @@ -6036,18 +6054,8 @@ class SurfaceMGXS(MGXS): 'linked with a summary file' raise ValueError(msg) - # Use tally "slicing" to ensure that tallies correspond to our domain - # NOTE: This is important if tally merging was used - if self.domain_type == 'mesh': - filters = [] - filter_bins = [] - elif self.domain_type != 'distribcell': - filters = [_DOMAIN_TO_FILTER[self.domain_type]] - filter_bins = [(self.domain.id,)] - # Distribcell filters only accept single cell - neglect it when slicing - else: - filters = [] - filter_bins = [] + filters= [] + filter_bins = [] # Clear any tallies previously loaded from a statepoint if self.loaded_sp: @@ -6126,6 +6134,9 @@ class SurfaceMGXS(MGXS): subdomain_bins.append(subdomain) filter_bins.append(tuple(subdomain_bins)) + xs = self.xs_tally.get_values(filters=filters, + filter_bins=filter_bins, value=value) + # Construct list of energy group bounds tuples for all requested groups if not isinstance(groups, str): cv.check_iterable_type('groups', groups, Integral) diff --git a/tests/regression_tests/mgxs_library_mesh/inputs_true.dat b/tests/regression_tests/mgxs_library_mesh/inputs_true.dat index f0f93d43c..1f3c1ff6e 100644 --- a/tests/regression_tests/mgxs_library_mesh/inputs_true.dat +++ b/tests/regression_tests/mgxs_library_mesh/inputs_true.dat @@ -53,7 +53,10 @@ 3 - + + 1 + + 1 2 3 4 5 6 @@ -363,61 +366,67 @@ analog + 66 2 + total + current + analog + + 1 2 total flux tracklength - - 1 65 2 + + 1 69 2 total delayed-nu-fission tracklength - - 1 65 2 - total - delayed-nu-fission - analog - - 1 65 5 + 1 69 2 total delayed-nu-fission analog + 1 69 5 + total + delayed-nu-fission + analog + + 1 2 total nu-fission tracklength - - 1 65 2 - total - delayed-nu-fission - tracklength - - 1 65 2 + 1 69 2 total delayed-nu-fission tracklength - 1 65 2 + 1 69 2 + total + delayed-nu-fission + tracklength + + + 1 69 2 total decay-rate tracklength - + 1 2 total flux analog - - 1 65 2 5 + + 1 69 2 5 total delayed-nu-fission analog From 1c7e7fe3f16ba9b1f0cc5ec3ee5af6f68794e49a Mon Sep 17 00:00:00 2001 From: Miriam Date: Sun, 19 Jul 2020 14:00:21 +0000 Subject: [PATCH 21/42] Test passes after modifying get_pandas_dataframe Since the inherted get_pandas_dataframe sorted values by x, y, z, and the current has a different labelling system (doesn't include z if only 2 dimensional, and then also includes x-in, x-out, y-in, y-out, z-in z-out...) I had to redefine get_pandas_dataframe in the SurfaceMGXS class and remove the sorting. --- openmc/mgxs/mgxs.py | 98 ++++++++++++++++++- .../mgxs_library_mesh/results_true.dat | 34 +++++++ 2 files changed, 131 insertions(+), 1 deletion(-) diff --git a/openmc/mgxs/mgxs.py b/openmc/mgxs/mgxs.py index 1b3e107f8..95dc749c3 100644 --- a/openmc/mgxs/mgxs.py +++ b/openmc/mgxs/mgxs.py @@ -1964,7 +1964,6 @@ class MGXS: # energy groups such that data is from fast to thermal if self.domain_type == 'mesh': mesh_str = 'mesh {0}'.format(self.domain.id) - print("HELLO WORLD", mesh_str) df.sort_values(by=[(mesh_str, 'x'), (mesh_str, 'y'), (mesh_str, 'z')] + columns, inplace=True) else: @@ -6187,6 +6186,103 @@ class SurfaceMGXS(MGXS): return xs + def get_pandas_dataframe(self, groups='all', nuclides='all', + xs_type='macro', paths=True): + """Build a Pandas DataFrame for the MGXS data. + This method leverages :meth:`openmc.Tally.get_pandas_dataframe`, but + renames the columns with terminology appropriate for cross section data. + Parameters + ---------- + groups : Iterable of Integral or 'all' + Energy groups of interest. Defaults to 'all'. + nuclides : Iterable of str or 'all' or 'sum' + The nuclides of the cross-sections to include in the dataframe. This + 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'. + 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 + instance. + Returns + ------- + pandas.DataFrame + A Pandas DataFrame for the cross section data. + Raises + ------ + ValueError + When this method is called before the multi-group cross section is + computed from tally data. + """ + + if not isinstance(groups, str): + cv.check_iterable_type('groups', groups, Integral) + if nuclides != 'all' and nuclides != 'sum': + cv.check_iterable_type('nuclides', nuclides, str) + cv.check_value('xs_type', xs_type, ['macro', 'micro']) + + # Get a Pandas DataFrame from the derived xs tally + if self.by_nuclide and nuclides == 'sum': + + # Use tally summation to sum across all nuclides + xs_tally = self.xs_tally.summation(nuclides=self.get_nuclides()) + df = xs_tally.get_pandas_dataframe(paths=paths) + + # Remove nuclide column since it is homogeneous and redundant + if self.domain_type == 'mesh': + df.drop('sum(nuclide)', axis=1, level=0, inplace=True) + else: + df.drop('sum(nuclide)', axis=1, inplace=True) + + # If the user requested a specific set of nuclides + elif self.by_nuclide and nuclides != 'all': + xs_tally = self.xs_tally.get_slice(nuclides=nuclides) + df = xs_tally.get_pandas_dataframe(paths=paths) + + # If the user requested all nuclides, keep nuclide column in dataframe + else: + df = self.xs_tally.get_pandas_dataframe(paths=paths) + + # Remove the score column since it is homogeneous and redundant + if self.domain_type == 'mesh': + df = df.drop('score', axis=1, level=0) + else: + df = df.drop('score', axis=1) + + # Convert azimuthal, polar, energy in and energy out bin values in to + # bin indices + columns = self._df_convert_columns_to_bins(df) + + # Select out those groups the user requested + if not isinstance(groups, str): + if 'group in' in df: + df = df[df['group in'].isin(groups)] + if 'group out' in df: + df = df[df['group out'].isin(groups)] + + # If user requested micro cross sections, divide out the atom densities + if xs_type == 'micro' and self._divide_by_density: + if self.by_nuclide: + densities = self.get_nuclide_densities(nuclides) + else: + densities = self.get_nuclide_densities('sum') + densities = np.repeat(densities, len(self.rxn_rate_tally.scores)) + tile_factor = int(df.shape[0] / len(densities)) + df['mean'] /= np.tile(densities, tile_factor) + df['std. dev.'] /= np.tile(densities, tile_factor) + + # Replace NaNs by zeros (happens if nuclide density is zero) + df['mean'].replace(np.nan, 0.0, inplace=True) + df['std. dev.'].replace(np.nan, 0.0, inplace=True) + + return df + class Current(SurfaceMGXS): r"""A current multi-group cross section. diff --git a/tests/regression_tests/mgxs_library_mesh/results_true.dat b/tests/regression_tests/mgxs_library_mesh/results_true.dat index f1ff29d6c..40ea8c215 100644 --- a/tests/regression_tests/mgxs_library_mesh/results_true.dat +++ b/tests/regression_tests/mgxs_library_mesh/results_true.dat @@ -178,6 +178,40 @@ 2 1 2 1 1 1 total 0.032188 0.002420 1 2 1 1 1 1 total 0.032304 0.002073 3 2 2 1 1 1 total 0.031336 0.001614 + mesh 1 group in nuclide mean std. dev. + x y surf +0 1 1 x-min out 1 total 0.0000 0.000000 +1 1 1 x-min in 1 total 0.0000 0.000000 +2 1 1 x-max out 1 total 0.2738 0.093735 +3 1 1 x-max in 1 total 0.1892 0.011302 +4 1 1 y-min out 1 total 0.0000 0.000000 +5 1 1 y-min in 1 total 0.0000 0.000000 +6 1 1 y-max out 1 total 0.2358 0.041204 +7 1 1 y-max in 1 total 0.1724 0.009114 +8 2 1 x-min out 1 total 0.1892 0.011302 +9 2 1 x-min in 1 total 0.2738 0.093735 +10 2 1 x-max out 1 total 0.0000 0.000000 +11 2 1 x-max in 1 total 0.0000 0.000000 +12 2 1 y-min out 1 total 0.0000 0.000000 +13 2 1 y-min in 1 total 0.0000 0.000000 +14 2 1 y-max out 1 total 0.2290 0.038756 +15 2 1 y-max in 1 total 0.1894 0.012331 +16 1 2 x-min out 1 total 0.0000 0.000000 +17 1 2 x-min in 1 total 0.0000 0.000000 +18 1 2 x-max out 1 total 0.1778 0.010514 +19 1 2 x-max in 1 total 0.1822 0.011922 +20 1 2 y-min out 1 total 0.1724 0.009114 +21 1 2 y-min in 1 total 0.2358 0.041204 +22 1 2 y-max out 1 total 0.0000 0.000000 +23 1 2 y-max in 1 total 0.0000 0.000000 +24 2 2 x-min out 1 total 0.1822 0.011922 +25 2 2 x-min in 1 total 0.1778 0.010514 +26 2 2 x-max out 1 total 0.0244 0.024400 +27 2 2 x-max in 1 total 0.0000 0.000000 +28 2 2 y-min out 1 total 0.1894 0.012331 +29 2 2 y-min in 1 total 0.2290 0.038756 +30 2 2 y-max out 1 total 0.0236 0.023600 +31 2 2 y-max in 1 total 0.0000 0.000000 mesh 1 delayedgroup group in nuclide mean std. dev. x y z 0 1 1 1 1 1 total 0.000007 4.734745e-07 From b903775c466bdf9c5721efacf139c91aa10caa9d Mon Sep 17 00:00:00 2001 From: Miriam Date: Sun, 19 Jul 2020 18:10:23 +0000 Subject: [PATCH 22/42] Ordered the pandas dataframe In the get_pandas_dataframe function of SurfaceMGXS, I removed all by_nuclide and micro options. I also ordered the dataframe so that results would be ordered reliably. This was necessary for tests to pass. Since the domain object is a little different for current than for the other classes, I had to treat the reorder uniquely for the SurfaceMGXS class because of the presence of the mesh surface filter. While other classes assume all meshes have a x, y, and z component, regardless of the dimension, this is not true in SurfaceMGXS. Therefore, I added an if statement for each dimension. --- openmc/mgxs/mgxs.py | 61 +++++-------------- .../mgxs_library_mesh/results_true.dat | 16 ++--- 2 files changed, 22 insertions(+), 55 deletions(-) diff --git a/openmc/mgxs/mgxs.py b/openmc/mgxs/mgxs.py index 95dc749c3..9081fcc9e 100644 --- a/openmc/mgxs/mgxs.py +++ b/openmc/mgxs/mgxs.py @@ -6196,15 +6196,9 @@ class SurfaceMGXS(MGXS): groups : Iterable of Integral or 'all' Energy groups of interest. Defaults to 'all'. nuclides : Iterable of str or 'all' or 'sum' - The nuclides of the cross-sections to include in the dataframe. This - 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'. - xs_type: {'macro', 'micro'} - Return macro or micro cross section in units of cm^-1 or barns. - Defaults to 'macro'. + Unused in SurfaceMGXS + xs_type: {'macro'} + 'micro' unused in SurfaceMGXS. paths : bool, optional Construct columns for distribcell tally filters (default is True). The geometric information in the Summary object is embedded into @@ -6223,31 +6217,9 @@ class SurfaceMGXS(MGXS): if not isinstance(groups, str): cv.check_iterable_type('groups', groups, Integral) - if nuclides != 'all' and nuclides != 'sum': - cv.check_iterable_type('nuclides', nuclides, str) - cv.check_value('xs_type', xs_type, ['macro', 'micro']) + cv.check_value('xs_type', xs_type, ['macro']) - # Get a Pandas DataFrame from the derived xs tally - if self.by_nuclide and nuclides == 'sum': - - # Use tally summation to sum across all nuclides - xs_tally = self.xs_tally.summation(nuclides=self.get_nuclides()) - df = xs_tally.get_pandas_dataframe(paths=paths) - - # Remove nuclide column since it is homogeneous and redundant - if self.domain_type == 'mesh': - df.drop('sum(nuclide)', axis=1, level=0, inplace=True) - else: - df.drop('sum(nuclide)', axis=1, inplace=True) - - # If the user requested a specific set of nuclides - elif self.by_nuclide and nuclides != 'all': - xs_tally = self.xs_tally.get_slice(nuclides=nuclides) - df = xs_tally.get_pandas_dataframe(paths=paths) - - # If the user requested all nuclides, keep nuclide column in dataframe - else: - df = self.xs_tally.get_pandas_dataframe(paths=paths) + df = self.xs_tally.get_pandas_dataframe(paths=paths) # Remove the score column since it is homogeneous and redundant if self.domain_type == 'mesh': @@ -6266,20 +6238,15 @@ class SurfaceMGXS(MGXS): if 'group out' in df: df = df[df['group out'].isin(groups)] - # If user requested micro cross sections, divide out the atom densities - if xs_type == 'micro' and self._divide_by_density: - if self.by_nuclide: - densities = self.get_nuclide_densities(nuclides) - else: - densities = self.get_nuclide_densities('sum') - densities = np.repeat(densities, len(self.rxn_rate_tally.scores)) - tile_factor = int(df.shape[0] / len(densities)) - df['mean'] /= np.tile(densities, tile_factor) - df['std. dev.'] /= np.tile(densities, tile_factor) - - # Replace NaNs by zeros (happens if nuclide density is zero) - df['mean'].replace(np.nan, 0.0, inplace=True) - df['std. dev.'].replace(np.nan, 0.0, inplace=True) + mesh_str = 'mesh {0}'.format(self.domain.id) + if len(self.domain.dimension) == 1: + df.sort_values(by=[(mesh_str, 'x')] + columns, inplace=True) + elif len(self.domain.dimension) == 2: + df.sort_values(by=[(mesh_str, 'x'), + (mesh_str, 'y')] + columns, inplace=True) + elif len(self.domain.dimension) == 3: + df.sort_values(by=[(mesh_str, 'x'), + (mesh_str, 'y'), (mesh_str, 'z')] + columns, inplace=True) return df diff --git a/tests/regression_tests/mgxs_library_mesh/results_true.dat b/tests/regression_tests/mgxs_library_mesh/results_true.dat index 40ea8c215..1af47cf76 100644 --- a/tests/regression_tests/mgxs_library_mesh/results_true.dat +++ b/tests/regression_tests/mgxs_library_mesh/results_true.dat @@ -188,14 +188,6 @@ 5 1 1 y-min in 1 total 0.0000 0.000000 6 1 1 y-max out 1 total 0.2358 0.041204 7 1 1 y-max in 1 total 0.1724 0.009114 -8 2 1 x-min out 1 total 0.1892 0.011302 -9 2 1 x-min in 1 total 0.2738 0.093735 -10 2 1 x-max out 1 total 0.0000 0.000000 -11 2 1 x-max in 1 total 0.0000 0.000000 -12 2 1 y-min out 1 total 0.0000 0.000000 -13 2 1 y-min in 1 total 0.0000 0.000000 -14 2 1 y-max out 1 total 0.2290 0.038756 -15 2 1 y-max in 1 total 0.1894 0.012331 16 1 2 x-min out 1 total 0.0000 0.000000 17 1 2 x-min in 1 total 0.0000 0.000000 18 1 2 x-max out 1 total 0.1778 0.010514 @@ -204,6 +196,14 @@ 21 1 2 y-min in 1 total 0.2358 0.041204 22 1 2 y-max out 1 total 0.0000 0.000000 23 1 2 y-max in 1 total 0.0000 0.000000 +8 2 1 x-min out 1 total 0.1892 0.011302 +9 2 1 x-min in 1 total 0.2738 0.093735 +10 2 1 x-max out 1 total 0.0000 0.000000 +11 2 1 x-max in 1 total 0.0000 0.000000 +12 2 1 y-min out 1 total 0.0000 0.000000 +13 2 1 y-min in 1 total 0.0000 0.000000 +14 2 1 y-max out 1 total 0.2290 0.038756 +15 2 1 y-max in 1 total 0.1894 0.012331 24 2 2 x-min out 1 total 0.1822 0.011922 25 2 2 x-min in 1 total 0.1778 0.010514 26 2 2 x-max out 1 total 0.0244 0.024400 From 979317f6145f56ea95e3d76f81077b81a8a9cd6b Mon Sep 17 00:00:00 2001 From: Miriam Date: Sun, 19 Jul 2020 20:52:25 +0000 Subject: [PATCH 23/42] Added surfaces to the reordering of pandas dataframe --- openmc/mgxs/mgxs.py | 11 +++-- .../mgxs_library_mesh/results_true.dat | 48 +++++++++---------- 2 files changed, 30 insertions(+), 29 deletions(-) diff --git a/openmc/mgxs/mgxs.py b/openmc/mgxs/mgxs.py index 9081fcc9e..fb72cc9fc 100644 --- a/openmc/mgxs/mgxs.py +++ b/openmc/mgxs/mgxs.py @@ -6240,13 +6240,14 @@ class SurfaceMGXS(MGXS): mesh_str = 'mesh {0}'.format(self.domain.id) if len(self.domain.dimension) == 1: - df.sort_values(by=[(mesh_str, 'x')] + columns, inplace=True) + df.sort_values(by=[(mesh_str, 'x'), (mesh_str, 'surf')] + + columns, inplace=True) elif len(self.domain.dimension) == 2: - df.sort_values(by=[(mesh_str, 'x'), - (mesh_str, 'y')] + columns, inplace=True) + df.sort_values(by=[(mesh_str, 'x'), (mesh_str, 'y'), + (mesh_str, 'surf')] + columns, inplace=True) elif len(self.domain.dimension) == 3: - df.sort_values(by=[(mesh_str, 'x'), - (mesh_str, 'y'), (mesh_str, 'z')] + columns, inplace=True) + df.sort_values(by=[(mesh_str, 'x'), (mesh_str, 'y'), + (mesh_str, 'z'), (mesh_str, 'surf')] + columns, inplace=True) return df diff --git a/tests/regression_tests/mgxs_library_mesh/results_true.dat b/tests/regression_tests/mgxs_library_mesh/results_true.dat index 1af47cf76..cbcbcb239 100644 --- a/tests/regression_tests/mgxs_library_mesh/results_true.dat +++ b/tests/regression_tests/mgxs_library_mesh/results_true.dat @@ -180,38 +180,38 @@ 3 2 2 1 1 1 total 0.031336 0.001614 mesh 1 group in nuclide mean std. dev. x y surf -0 1 1 x-min out 1 total 0.0000 0.000000 -1 1 1 x-min in 1 total 0.0000 0.000000 -2 1 1 x-max out 1 total 0.2738 0.093735 3 1 1 x-max in 1 total 0.1892 0.011302 -4 1 1 y-min out 1 total 0.0000 0.000000 -5 1 1 y-min in 1 total 0.0000 0.000000 -6 1 1 y-max out 1 total 0.2358 0.041204 +2 1 1 x-max out 1 total 0.2738 0.093735 +1 1 1 x-min in 1 total 0.0000 0.000000 +0 1 1 x-min out 1 total 0.0000 0.000000 7 1 1 y-max in 1 total 0.1724 0.009114 -16 1 2 x-min out 1 total 0.0000 0.000000 -17 1 2 x-min in 1 total 0.0000 0.000000 -18 1 2 x-max out 1 total 0.1778 0.010514 +6 1 1 y-max out 1 total 0.2358 0.041204 +5 1 1 y-min in 1 total 0.0000 0.000000 +4 1 1 y-min out 1 total 0.0000 0.000000 19 1 2 x-max in 1 total 0.1822 0.011922 -20 1 2 y-min out 1 total 0.1724 0.009114 -21 1 2 y-min in 1 total 0.2358 0.041204 -22 1 2 y-max out 1 total 0.0000 0.000000 +18 1 2 x-max out 1 total 0.1778 0.010514 +17 1 2 x-min in 1 total 0.0000 0.000000 +16 1 2 x-min out 1 total 0.0000 0.000000 23 1 2 y-max in 1 total 0.0000 0.000000 -8 2 1 x-min out 1 total 0.1892 0.011302 -9 2 1 x-min in 1 total 0.2738 0.093735 -10 2 1 x-max out 1 total 0.0000 0.000000 +22 1 2 y-max out 1 total 0.0000 0.000000 +21 1 2 y-min in 1 total 0.2358 0.041204 +20 1 2 y-min out 1 total 0.1724 0.009114 11 2 1 x-max in 1 total 0.0000 0.000000 -12 2 1 y-min out 1 total 0.0000 0.000000 -13 2 1 y-min in 1 total 0.0000 0.000000 -14 2 1 y-max out 1 total 0.2290 0.038756 +10 2 1 x-max out 1 total 0.0000 0.000000 +9 2 1 x-min in 1 total 0.2738 0.093735 +8 2 1 x-min out 1 total 0.1892 0.011302 15 2 1 y-max in 1 total 0.1894 0.012331 -24 2 2 x-min out 1 total 0.1822 0.011922 -25 2 2 x-min in 1 total 0.1778 0.010514 -26 2 2 x-max out 1 total 0.0244 0.024400 +14 2 1 y-max out 1 total 0.2290 0.038756 +13 2 1 y-min in 1 total 0.0000 0.000000 +12 2 1 y-min out 1 total 0.0000 0.000000 27 2 2 x-max in 1 total 0.0000 0.000000 -28 2 2 y-min out 1 total 0.1894 0.012331 -29 2 2 y-min in 1 total 0.2290 0.038756 -30 2 2 y-max out 1 total 0.0236 0.023600 +26 2 2 x-max out 1 total 0.0244 0.024400 +25 2 2 x-min in 1 total 0.1778 0.010514 +24 2 2 x-min out 1 total 0.1822 0.011922 31 2 2 y-max in 1 total 0.0000 0.000000 +30 2 2 y-max out 1 total 0.0236 0.023600 +29 2 2 y-min in 1 total 0.2290 0.038756 +28 2 2 y-min out 1 total 0.1894 0.012331 mesh 1 delayedgroup group in nuclide mean std. dev. x y z 0 1 1 1 1 1 total 0.000007 4.734745e-07 From 4aa478f17b27880070a3be3e4cd4f300bb4938f7 Mon Sep 17 00:00:00 2001 From: Miriam Date: Mon, 20 Jul 2020 00:54:20 +0000 Subject: [PATCH 24/42] Imposed order on pandas dataframe The Travis CI test on Python 3.5 kept reordering the dataframe so that the results wouldn't match. For that reason, I had to impose the order of the columns with a clunky process: -drop the column of surfaces from whatever location it's in -reinsert the column of surfaces where I want it to be --- openmc/mgxs/mgxs.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/openmc/mgxs/mgxs.py b/openmc/mgxs/mgxs.py index fb72cc9fc..80a858073 100644 --- a/openmc/mgxs/mgxs.py +++ b/openmc/mgxs/mgxs.py @@ -6239,14 +6239,17 @@ class SurfaceMGXS(MGXS): df = df[df['group out'].isin(groups)] mesh_str = 'mesh {0}'.format(self.domain.id) + surfaces = df[(mesh_str,'surf')] + df.drop(columns=[(mesh_str,'surf')],inplace=True) + df.insert(len(self.domain.dimension),(mesh_str,'surf'),surfaces) if len(self.domain.dimension) == 1: df.sort_values(by=[(mesh_str, 'x'), (mesh_str, 'surf')] + columns, inplace=True) elif len(self.domain.dimension) == 2: - df.sort_values(by=[(mesh_str, 'x'), (mesh_str, 'y'), + df.sort_values(by=[(mesh_str, 'x'), (mesh_str, 'y'), (mesh_str, 'surf')] + columns, inplace=True) elif len(self.domain.dimension) == 3: - df.sort_values(by=[(mesh_str, 'x'), (mesh_str, 'y'), + df.sort_values(by=[(mesh_str, 'x'), (mesh_str, 'y'), (mesh_str, 'z'), (mesh_str, 'surf')] + columns, inplace=True) return df From 187ef2edcca6119ded2c186ce866f9294794205a Mon Sep 17 00:00:00 2001 From: Miriam Date: Tue, 21 Jul 2020 20:01:50 +0000 Subject: [PATCH 25/42] Renamed SurfaceMGXS class to MeshSurfaceMGXS --- openmc/mgxs/mgxs.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/openmc/mgxs/mgxs.py b/openmc/mgxs/mgxs.py index 80a858073..7c6da1af7 100644 --- a/openmc/mgxs/mgxs.py +++ b/openmc/mgxs/mgxs.py @@ -5897,7 +5897,7 @@ class InverseVelocity(MGXS): ' for xs_type other than "macro"') -class SurfaceMGXS(MGXS): +class MeshSurfaceMGXS(MGXS): """An abstract multi-group cross section for some energy group structure on the surfaces of a mesh domain. This class can be used for both OpenMC input generation and tally data @@ -5926,7 +5926,7 @@ class SurfaceMGXS(MGXS): rxn_type : str Reaction type (e.g., 'total', 'nu-fission', etc.) by_nuclide : bool - Unused for SurfaceMGXS + Unused for MeshSurfaceMGXS domain : Mesh Domain for spatial homogenization domain_type : {'mesh'} @@ -5959,9 +5959,9 @@ class SurfaceMGXS(MGXS): two to account for both the incoming and outgoing current from the mesh cell surfaces. num_nuclides : int - Unused n SurfaceMGXS + Unused in MeshSurfaceMGXS nuclides : Iterable of str or 'sum' - Unused in SurfaceMGXS + Unused in MeshSurfaceMGXS sparse : bool Whether or not the MGXS' tallies use SciPy's LIL sparse matrix format for compressed data storage @@ -5975,7 +5975,7 @@ class SurfaceMGXS(MGXS): def __init__(self, domain=None, domain_type=None, energy_groups=None, by_nuclide=False, name=''): - super(SurfaceMGXS, self).__init__(domain, domain_type, energy_groups, + super(MeshSurfaceMGXS, self).__init__(domain, domain_type, energy_groups, by_nuclide, name) self._estimator = ['analog'] self._valid_estimators = ['analog'] @@ -6091,9 +6091,9 @@ class SurfaceMGXS(MGXS): subdomains : Iterable of Integral or 'all' Subdomain IDs of interest. Defaults to 'all'. nuclides : Iterable of str or 'all' or 'sum' - Unused in SurfaceMGXS + Unused in MeshSurfaceMGXS xs_type: {'macro'} - The 'macro'/'micro' distinction does not apply to SurfaceMGXS. + The 'macro'/'micro' distinction does not apply to MeshSurfaceMGXS. The calculation of a 'micro' xs_type is omited in this class. order_groups: {'increasing', 'decreasing'} Return the cross section indexed according to increasing or @@ -6196,9 +6196,9 @@ class SurfaceMGXS(MGXS): groups : Iterable of Integral or 'all' Energy groups of interest. Defaults to 'all'. nuclides : Iterable of str or 'all' or 'sum' - Unused in SurfaceMGXS + Unused in MeshSurfaceMGXS xs_type: {'macro'} - 'micro' unused in SurfaceMGXS. + 'micro' unused in MeshSurfaceMGXS. paths : bool, optional Construct columns for distribcell tally filters (default is True). The geometric information in the Summary object is embedded into @@ -6255,7 +6255,7 @@ class SurfaceMGXS(MGXS): return df -class Current(SurfaceMGXS): +class Current(MeshSurfaceMGXS): r"""A current multi-group cross section. This class can be used for both OpenMC input generation and tally data post-processing to compute surface- and energy-integrated @@ -6284,7 +6284,7 @@ class Current(SurfaceMGXS): groups : openmc.mgxs.EnergyGroups The energy group structure for energy condensation by_nuclide : bool - Unused in SurfaceMGXS + Unused in MeshSurfaceMGXS name : str, optional Name of the multi-group cross section. Used as a label to identify tallies in OpenMC 'tallies.xml' file. @@ -6296,7 +6296,7 @@ class Current(SurfaceMGXS): rxn_type : str Reaction type (e.g., 'total', 'nu-fission', etc.) by_nuclide : bool - Unused for SurfaceMGXS + Unused for MeshSurfaceMGXS domain : Mesh Domain for spatial homogenization domain_type : {'mesh'} @@ -6331,9 +6331,9 @@ class Current(SurfaceMGXS): two to account for both the incoming and outgoing current from the mesh cell surfaces. num_nuclides : int - Unused in SurfaceMGXS + Unused in MeshSurfaceMGXS nuclides : Iterable of str or 'sum' - Unused in SurfaceMGXS + Unused in MeshSurfaceMGXS sparse : bool Whether or not the MGXS' tallies use SciPy's LIL sparse matrix format for compressed data storage From 4e896ae06ffe6bc6f0153565cbefa9e175ff3afd Mon Sep 17 00:00:00 2001 From: "Miriam (Rathbun) Kreher" Date: Fri, 31 Jul 2020 08:22:00 -0600 Subject: [PATCH 26/42] Update openmc/mgxs/mgxs.py Co-authored-by: Giud --- openmc/mgxs/mgxs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openmc/mgxs/mgxs.py b/openmc/mgxs/mgxs.py index 7c6da1af7..dfe3fecaf 100644 --- a/openmc/mgxs/mgxs.py +++ b/openmc/mgxs/mgxs.py @@ -6239,7 +6239,7 @@ class MeshSurfaceMGXS(MGXS): df = df[df['group out'].isin(groups)] mesh_str = 'mesh {0}'.format(self.domain.id) - surfaces = df[(mesh_str,'surf')] + surfaces = df[(mesh_str, 'surf')] df.drop(columns=[(mesh_str,'surf')],inplace=True) df.insert(len(self.domain.dimension),(mesh_str,'surf'),surfaces) if len(self.domain.dimension) == 1: From 4e4c5596165d9cee483ebe52f8f4bd915e4fd3ad Mon Sep 17 00:00:00 2001 From: Miriam Date: Wed, 5 Aug 2020 22:57:02 +0000 Subject: [PATCH 27/42] Updated documentation Added current to mgxs.rst and cleaned up descriptions in Current & MeshSurfaceCurrent class --- docs/source/pythonapi/mgxs.rst | 1 + openmc/mgxs/mgxs.py | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/source/pythonapi/mgxs.rst b/docs/source/pythonapi/mgxs.rst index f890bb469..6dc35e66d 100644 --- a/docs/source/pythonapi/mgxs.rst +++ b/docs/source/pythonapi/mgxs.rst @@ -33,6 +33,7 @@ Multi-group Cross Sections openmc.mgxs.AbsorptionXS openmc.mgxs.CaptureXS openmc.mgxs.Chi + openmc.mgxs.Current openmc.mgxs.FissionXS openmc.mgxs.InverseVelocity openmc.mgxs.KappaFissionXS diff --git a/openmc/mgxs/mgxs.py b/openmc/mgxs/mgxs.py index dfe3fecaf..bd9ff91dc 100644 --- a/openmc/mgxs/mgxs.py +++ b/openmc/mgxs/mgxs.py @@ -5914,7 +5914,7 @@ class MeshSurfaceMGXS(MGXS): energy_groups : openmc.mgxs.EnergyGroups The energy group structure for energy condensation by_nuclide : bool - Unused for SurfacMGXS + Unused in MeshSurfacMGXS name : str, optional Name of the multi-group cross section. Used as a label to identify tallies in OpenMC 'tallies.xml' file. @@ -5926,7 +5926,7 @@ class MeshSurfaceMGXS(MGXS): rxn_type : str Reaction type (e.g., 'total', 'nu-fission', etc.) by_nuclide : bool - Unused for MeshSurfaceMGXS + Unused in MeshSurfaceMGXS domain : Mesh Domain for spatial homogenization domain_type : {'mesh'} @@ -6296,7 +6296,7 @@ class Current(MeshSurfaceMGXS): rxn_type : str Reaction type (e.g., 'total', 'nu-fission', etc.) by_nuclide : bool - Unused for MeshSurfaceMGXS + Unused in MeshSurfaceMGXS domain : Mesh Domain for spatial homogenization domain_type : {'mesh'} From 45e2808207921a225d7ea962910d0283590b53e4 Mon Sep 17 00:00:00 2001 From: Miriam Date: Fri, 7 Aug 2020 00:38:59 +0000 Subject: [PATCH 28/42] Exception for current in domain_to_filter build_hdf5_store fails for current unless domain_to_filter is circumvented. Because current is a 'mesh' domain, domain_to_filter would assign a mesh filter. However, current uses a meshsurface filter instead, so domain_to_filter must allow for that exception. --- openmc/mgxs/mgxs.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openmc/mgxs/mgxs.py b/openmc/mgxs/mgxs.py index bd9ff91dc..1552067e7 100644 --- a/openmc/mgxs/mgxs.py +++ b/openmc/mgxs/mgxs.py @@ -560,7 +560,10 @@ class MGXS: domain_type = self.domain_type[4:-1] else: domain_type = self.domain_type - filter_type = _DOMAIN_TO_FILTER[domain_type] + if self._rxn_type == 'current': + filter_type = openmc.MeshSurfaceFilter + else: + filter_type = _DOMAIN_TO_FILTER[domain_type] domain_filter = self.xs_tally.find_filter(filter_type) return domain_filter.num_bins From f673ae605282286b3048c0bb2798361280b7c3d4 Mon Sep 17 00:00:00 2001 From: Miriam Date: Fri, 7 Aug 2020 16:56:54 +0000 Subject: [PATCH 29/42] Extended tests to include current Changed the domain from 'material' to 'mesh' in mgxs_library_condense and mgxs_library_hdf5. This way, current can be tested for those functionalities. The other tests were not relevant to current. The test mgxs_library_mesh was already includes current. --- .../mgxs_library_condense/inputs_true.dat | 794 +----------------- .../mgxs_library_condense/results_true.dat | 617 ++++++++------ .../mgxs_library_condense/test.py | 12 +- .../mgxs_library_hdf5/inputs_true.dat | 794 +----------------- .../mgxs_library_hdf5/results_true.dat | 655 ++++----------- .../mgxs_library_hdf5/test.py | 16 +- 6 files changed, 590 insertions(+), 2298 deletions(-) diff --git a/tests/regression_tests/mgxs_library_condense/inputs_true.dat b/tests/regression_tests/mgxs_library_condense/inputs_true.dat index 5aedd383d..8e649ea82 100644 --- a/tests/regression_tests/mgxs_library_condense/inputs_true.dat +++ b/tests/regression_tests/mgxs_library_condense/inputs_true.dat @@ -50,7 +50,12 @@ - + + 2 2 + -100.0 -100.0 + 100.0 100.0 + + 1 @@ -68,15 +73,12 @@ 0.0 20000000.0 - + + 1 + + 1 2 3 4 5 6 - - 2 - - - 3 - 1 2 total @@ -384,793 +386,67 @@ analog + 66 2 + total + current + analog + + 1 2 total flux tracklength - - 1 65 2 + + 1 69 2 total delayed-nu-fission tracklength - - 1 65 52 - total - delayed-nu-fission - analog - - 1 65 5 + 1 69 52 total delayed-nu-fission analog + 1 69 5 + total + delayed-nu-fission + analog + + 1 2 total nu-fission tracklength - - 1 65 2 - total - delayed-nu-fission - tracklength - - 1 65 2 + 1 69 2 total delayed-nu-fission tracklength - 1 65 2 + 1 69 2 + total + delayed-nu-fission + tracklength + + + 1 69 2 total decay-rate tracklength - + 1 2 total flux analog - - 1 65 2 5 - total - delayed-nu-fission - analog - - 80 2 - total - flux - tracklength - - - 80 2 - total - total - tracklength - - - 80 2 - total - flux - tracklength - - - 80 2 - total - total - tracklength - - - 80 2 - total - flux - analog - - - 80 5 6 - total - scatter - analog - - - 80 2 - total - flux - tracklength - - - 80 2 - total - total - tracklength - - - 80 2 - total - flux - analog - - - 80 5 6 - total - nu-scatter - analog - - - 80 2 - total - flux - tracklength - - - 80 2 - total - absorption - tracklength - - - 80 2 - total - flux - tracklength - - - 80 2 - total - absorption - tracklength - - - 80 2 - total - fission - tracklength - - - 80 2 - total - flux - tracklength - - - 80 2 - total - fission - tracklength - - - 80 2 - total - flux - tracklength - - - 80 2 - total - nu-fission - tracklength - - - 80 2 - total - flux - tracklength - - - 80 2 - total - kappa-fission - tracklength - - - 80 2 - total - flux - tracklength - - - 80 2 - total - scatter - tracklength - - - 80 2 - total - flux - analog - - - 80 2 - total - nu-scatter - analog - - - 80 2 - total - flux - analog - - - 80 2 5 28 - total - scatter - analog - - - 80 2 - total - flux - analog - - - 80 2 5 28 - total - nu-scatter - analog - - - 80 2 5 - total - nu-scatter - analog - - - 80 2 5 - total - scatter - analog - - - 80 2 - total - flux - analog - - - 80 2 5 - total - nu-fission - analog - - - 80 2 5 - total - scatter - analog - - - 80 2 - total - flux - tracklength - - - 80 2 - total - scatter - tracklength - - - 80 2 5 28 - total - scatter - analog - - - 80 2 - total - flux - tracklength - - - 80 2 - total - scatter - tracklength - - - 80 2 5 28 - total - scatter - analog - - - 80 2 5 - total - nu-scatter - analog - - - 80 52 - total - nu-fission - analog - - - 80 5 - total - nu-fission - analog - - - 80 52 - total - prompt-nu-fission - analog - - - 80 5 - total - prompt-nu-fission - analog - - - 80 2 - total - flux - tracklength - - - 80 2 - total - inverse-velocity - tracklength - - - 80 2 - total - flux - tracklength - - - 80 2 - total - prompt-nu-fission - tracklength - - - 80 2 - total - flux - analog - - - 80 2 5 - total - prompt-nu-fission - analog - - - 80 2 - total - flux - tracklength - - - 80 65 2 - total - delayed-nu-fission - tracklength - - - 80 65 52 - total - delayed-nu-fission - analog - - - 80 65 5 - total - delayed-nu-fission - analog - - - 80 2 - total - nu-fission - tracklength - - - 80 65 2 - total - delayed-nu-fission - tracklength - - - 80 65 2 - total - delayed-nu-fission - tracklength - - - 80 65 2 - total - decay-rate - tracklength - - - 80 2 - total - flux - analog - - - 80 65 2 5 - total - delayed-nu-fission - analog - - - 159 2 - total - flux - tracklength - - - 159 2 - total - total - tracklength - - - 159 2 - total - flux - tracklength - - - 159 2 - total - total - tracklength - - - 159 2 - total - flux - analog - - - 159 5 6 - total - scatter - analog - - - 159 2 - total - flux - tracklength - - - 159 2 - total - total - tracklength - - - 159 2 - total - flux - analog - - - 159 5 6 - total - nu-scatter - analog - - - 159 2 - total - flux - tracklength - - - 159 2 - total - absorption - tracklength - - - 159 2 - total - flux - tracklength - - - 159 2 - total - absorption - tracklength - - - 159 2 - total - fission - tracklength - - - 159 2 - total - flux - tracklength - - - 159 2 - total - fission - tracklength - - - 159 2 - total - flux - tracklength - - - 159 2 - total - nu-fission - tracklength - - - 159 2 - total - flux - tracklength - - - 159 2 - total - kappa-fission - tracklength - - - 159 2 - total - flux - tracklength - - - 159 2 - total - scatter - tracklength - - - 159 2 - total - flux - analog - - - 159 2 - total - nu-scatter - analog - - - 159 2 - total - flux - analog - - - 159 2 5 28 - total - scatter - analog - - - 159 2 - total - flux - analog - - - 159 2 5 28 - total - nu-scatter - analog - - - 159 2 5 - total - nu-scatter - analog - - - 159 2 5 - total - scatter - analog - - - 159 2 - total - flux - analog - - - 159 2 5 - total - nu-fission - analog - - - 159 2 5 - total - scatter - analog - - - 159 2 - total - flux - tracklength - - - 159 2 - total - scatter - tracklength - - - 159 2 5 28 - total - scatter - analog - - - 159 2 - total - flux - tracklength - - - 159 2 - total - scatter - tracklength - - - 159 2 5 28 - total - scatter - analog - - - 159 2 5 - total - nu-scatter - analog - - - 159 52 - total - nu-fission - analog - - - 159 5 - total - nu-fission - analog - - - 159 52 - total - prompt-nu-fission - analog - - - 159 5 - total - prompt-nu-fission - analog - - - 159 2 - total - flux - tracklength - - - 159 2 - total - inverse-velocity - tracklength - - - 159 2 - total - flux - tracklength - - - 159 2 - total - prompt-nu-fission - tracklength - - - 159 2 - total - flux - analog - - - 159 2 5 - total - prompt-nu-fission - analog - - - 159 2 - total - flux - tracklength - - - 159 65 2 - total - delayed-nu-fission - tracklength - - - 159 65 52 - total - delayed-nu-fission - analog - - - 159 65 5 - total - delayed-nu-fission - analog - - - 159 2 - total - nu-fission - tracklength - - - 159 65 2 - total - delayed-nu-fission - tracklength - - - 159 65 2 - total - delayed-nu-fission - tracklength - - - 159 65 2 - total - decay-rate - tracklength - - - 159 2 - total - flux - analog - - - 159 65 2 5 + 1 69 2 5 total delayed-nu-fission analog diff --git a/tests/regression_tests/mgxs_library_condense/results_true.dat b/tests/regression_tests/mgxs_library_condense/results_true.dat index d4aa6b811..55c8c834a 100644 --- a/tests/regression_tests/mgxs_library_condense/results_true.dat +++ b/tests/regression_tests/mgxs_library_condense/results_true.dat @@ -1,273 +1,344 @@ - material group in nuclide mean std. dev. -0 1 1 total 0.453624 0.021053 - material group in nuclide mean std. dev. -0 1 1 total 0.4074 0.021863 - material group in nuclide mean std. dev. -0 1 1 total 0.4074 0.021863 - material group in nuclide mean std. dev. -0 1 1 total 0.064903 0.004313 - material group in nuclide mean std. dev. -0 1 1 total 0.028048 0.00458 - material group in nuclide mean std. dev. -0 1 1 total 0.036855 0.002622 - material group in nuclide mean std. dev. -0 1 1 total 0.090649 0.00641 - material group in nuclide mean std. dev. -0 1 1 total 7.137954e+06 507363.467231 - material group in nuclide mean std. dev. -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 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 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. -0 1 1 total 1.0 0.051471 - material group in nuclide mean std. dev. -0 1 1 total 4.996730e-07 3.650633e-08 - material group in nuclide mean std. dev. -0 1 1 total 0.090004 0.006367 - material group in group out nuclide mean std. dev. -0 1 1 1 total 0.084542 0.005716 - material delayedgroup group in nuclide mean std. dev. -0 1 1 1 total 0.000021 0.000001 -1 1 2 1 total 0.000110 0.000008 -2 1 3 1 total 0.000107 0.000007 -3 1 4 1 total 0.000249 0.000017 -4 1 5 1 total 0.000112 0.000007 -5 1 6 1 total 0.000046 0.000003 - material delayedgroup group out nuclide mean std. dev. -0 1 1 1 total 0.0 0.000000 -1 1 2 1 total 1.0 0.869128 -2 1 3 1 total 1.0 1.414214 -3 1 4 1 total 1.0 0.360359 -4 1 5 1 total 0.0 0.000000 -5 1 6 1 total 0.0 0.000000 - material delayedgroup group in nuclide mean std. dev. -0 1 1 1 total 0.000227 0.000020 -1 1 2 1 total 0.001214 0.000108 -2 1 3 1 total 0.001184 0.000104 -3 1 4 1 total 0.002752 0.000240 -4 1 5 1 total 0.001231 0.000105 -5 1 6 1 total 0.000512 0.000044 - material delayedgroup group in nuclide mean std. dev. -0 1 1 1 total 0.013355 0.001207 -1 1 2 1 total 0.032600 0.002866 -2 1 3 1 total 0.121083 0.010442 -3 1 4 1 total 0.305910 0.025627 -4 1 5 1 total 0.861934 0.068281 -5 1 6 1 total 2.895065 0.230223 - material delayedgroup group in group out nuclide mean std. dev. -0 1 1 1 1 total 0.000000 0.000000 -1 1 2 1 1 total 0.000384 0.000236 -2 1 3 1 1 total 0.000179 0.000180 -3 1 4 1 1 total 0.000730 0.000188 -4 1 5 1 1 total 0.000000 0.000000 -5 1 6 1 1 total 0.000000 0.000000 - material group in nuclide mean std. dev. -0 2 1 total 0.311594 0.013793 - material group in nuclide mean std. dev. -0 2 1 total 0.280977 0.015683 - material group in nuclide mean std. dev. -0 2 1 total 0.280977 0.015683 - material group in nuclide mean std. dev. -0 2 1 total 0.00221 0.000286 - material group in nuclide mean std. dev. -0 2 1 total 0.00221 0.000286 - material group in nuclide mean std. dev. -0 2 1 total 0.0 0.0 - material group in nuclide mean std. dev. -0 2 1 total 0.0 0.0 - material group in nuclide mean std. dev. -0 2 1 total 0.0 0.0 - material group in nuclide mean std. dev. -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 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 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. -0 2 1 total 0.0 0.0 - material group in nuclide mean std. dev. -0 2 1 total 5.454762e-07 4.949807e-08 - material group in nuclide mean std. dev. -0 2 1 total 0.0 0.0 - material group in group out nuclide mean std. dev. -0 2 1 1 total 0.0 0.0 - material delayedgroup group in nuclide mean std. dev. -0 2 1 1 total 0.0 0.0 -1 2 2 1 total 0.0 0.0 -2 2 3 1 total 0.0 0.0 -3 2 4 1 total 0.0 0.0 -4 2 5 1 total 0.0 0.0 -5 2 6 1 total 0.0 0.0 - material delayedgroup group out nuclide mean std. dev. -0 2 1 1 total 0.0 0.0 -1 2 2 1 total 0.0 0.0 -2 2 3 1 total 0.0 0.0 -3 2 4 1 total 0.0 0.0 -4 2 5 1 total 0.0 0.0 -5 2 6 1 total 0.0 0.0 - material delayedgroup group in nuclide mean std. dev. -0 2 1 1 total 0.0 0.0 -1 2 2 1 total 0.0 0.0 -2 2 3 1 total 0.0 0.0 -3 2 4 1 total 0.0 0.0 -4 2 5 1 total 0.0 0.0 -5 2 6 1 total 0.0 0.0 - material delayedgroup group in nuclide mean std. dev. -0 2 1 1 total 0.0 0.0 -1 2 2 1 total 0.0 0.0 -2 2 3 1 total 0.0 0.0 -3 2 4 1 total 0.0 0.0 -4 2 5 1 total 0.0 0.0 -5 2 6 1 total 0.0 0.0 - material delayedgroup group in group out nuclide mean std. dev. -0 2 1 1 1 total 0.0 0.0 -1 2 2 1 1 total 0.0 0.0 -2 2 3 1 1 total 0.0 0.0 -3 2 4 1 1 total 0.0 0.0 -4 2 5 1 1 total 0.0 0.0 -5 2 6 1 1 total 0.0 0.0 - material group in nuclide mean std. dev. -0 3 1 total 0.904999 0.043964 - material group in nuclide mean std. dev. -0 3 1 total 0.494581 0.046763 - material group in nuclide mean std. dev. -0 3 1 total 0.494581 0.046763 - material group in nuclide mean std. dev. -0 3 1 total 0.00606 0.000555 - material group in nuclide mean std. dev. -0 3 1 total 0.00606 0.000555 - material group in nuclide mean std. dev. -0 3 1 total 0.0 0.0 - material group in nuclide mean std. dev. -0 3 1 total 0.0 0.0 - material group in nuclide mean std. dev. -0 3 1 total 0.0 0.0 - material group in nuclide mean std. dev. -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 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 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. -0 3 1 total 0.0 0.0 - material group in nuclide mean std. dev. -0 3 1 total 5.773007e-07 5.322133e-08 - material group in nuclide mean std. dev. -0 3 1 total 0.0 0.0 - material group in group out nuclide mean std. dev. -0 3 1 1 total 0.0 0.0 - material delayedgroup group in nuclide mean std. dev. -0 3 1 1 total 0.0 0.0 -1 3 2 1 total 0.0 0.0 -2 3 3 1 total 0.0 0.0 -3 3 4 1 total 0.0 0.0 -4 3 5 1 total 0.0 0.0 -5 3 6 1 total 0.0 0.0 - material delayedgroup group out nuclide mean std. dev. -0 3 1 1 total 0.0 0.0 -1 3 2 1 total 0.0 0.0 -2 3 3 1 total 0.0 0.0 -3 3 4 1 total 0.0 0.0 -4 3 5 1 total 0.0 0.0 -5 3 6 1 total 0.0 0.0 - material delayedgroup group in nuclide mean std. dev. -0 3 1 1 total 0.0 0.0 -1 3 2 1 total 0.0 0.0 -2 3 3 1 total 0.0 0.0 -3 3 4 1 total 0.0 0.0 -4 3 5 1 total 0.0 0.0 -5 3 6 1 total 0.0 0.0 - material delayedgroup group in nuclide mean std. dev. -0 3 1 1 total 0.0 0.0 -1 3 2 1 total 0.0 0.0 -2 3 3 1 total 0.0 0.0 -3 3 4 1 total 0.0 0.0 -4 3 5 1 total 0.0 0.0 -5 3 6 1 total 0.0 0.0 - material delayedgroup group in group out nuclide mean std. dev. -0 3 1 1 1 total 0.0 0.0 -1 3 2 1 1 total 0.0 0.0 -2 3 3 1 1 total 0.0 0.0 -3 3 4 1 1 total 0.0 0.0 -4 3 5 1 1 total 0.0 0.0 -5 3 6 1 1 total 0.0 0.0 + mesh 1 group in nuclide mean std. dev. + x y z +0 1 1 1 1 total 0.689569 0.031419 +2 1 2 1 1 total 0.699649 0.037450 +1 2 1 1 1 total 0.714582 0.039410 +3 2 2 1 1 total 0.703950 0.032472 + mesh 1 group in nuclide mean std. dev. + x y z +0 1 1 1 1 total 0.439891 0.034895 +2 1 2 1 1 total 0.439954 0.039793 +1 2 1 1 1 total 0.464255 0.041680 +3 2 2 1 1 total 0.448543 0.035418 + mesh 1 group in nuclide mean std. dev. + x y z +0 1 1 1 1 total 0.439891 0.034895 +2 1 2 1 1 total 0.439954 0.039793 +1 2 1 1 1 total 0.464255 0.041680 +3 2 2 1 1 total 0.448543 0.035418 + mesh 1 group in nuclide mean std. dev. + x y z +0 1 1 1 1 total 0.022628 0.001277 +2 1 2 1 1 total 0.023156 0.001846 +1 2 1 1 1 total 0.025056 0.002068 +3 2 2 1 1 total 0.023894 0.001806 + mesh 1 group in nuclide mean std. dev. + x y z +0 1 1 1 1 total 0.011639 0.001313 +2 1 2 1 1 total 0.011902 0.001887 +1 2 1 1 1 total 0.013610 0.002138 +3 2 2 1 1 total 0.012379 0.001964 + mesh 1 group in nuclide mean std. dev. + x y z +0 1 1 1 1 total 0.010989 0.000600 +2 1 2 1 1 total 0.011254 0.000888 +1 2 1 1 1 total 0.011446 0.000917 +3 2 2 1 1 total 0.011515 0.001091 + mesh 1 group in nuclide mean std. dev. + x y z +0 1 1 1 1 total 0.027048 0.001467 +2 1 2 1 1 total 0.027679 0.002173 +1 2 1 1 1 total 0.028152 0.002239 +3 2 2 1 1 total 0.028305 0.002664 + mesh 1 group in nuclide mean std. dev. + x y z +0 1 1 1 1 total 2.128551e+06 116174.136443 +2 1 2 1 1 total 2.179625e+06 171863.153028 +1 2 1 1 1 total 2.216815e+06 177355.380518 +3 2 2 1 1 total 2.229909e+06 211056.365380 + mesh 1 group in nuclide mean std. dev. + x y z +0 1 1 1 1 total 0.666941 0.030331 +2 1 2 1 1 total 0.676493 0.035733 +1 2 1 1 1 total 0.689526 0.037499 +3 2 2 1 1 total 0.680056 0.031192 + mesh 1 group in nuclide mean std. dev. + x y z +0 1 1 1 1 total 0.666776 0.041465 +2 1 2 1 1 total 0.681119 0.037897 +1 2 1 1 1 total 0.680135 0.040329 +3 2 2 1 1 total 0.673685 0.034317 + mesh 1 group in group out legendre nuclide mean std. dev. + x y z +0 1 1 1 1 1 P0 total 0.666776 0.040502 +1 1 1 1 1 1 P1 total 0.249678 0.015165 +2 1 1 1 1 1 P2 total 0.084904 0.007439 +3 1 1 1 1 1 P3 total 0.004671 0.003362 +8 1 2 1 1 1 P0 total 0.681119 0.037746 +9 1 2 1 1 1 P1 total 0.259694 0.013458 +10 1 2 1 1 1 P2 total 0.093376 0.006988 +11 1 2 1 1 1 P3 total 0.009055 0.004266 +4 2 1 1 1 1 P0 total 0.680135 0.039913 +5 2 1 1 1 1 P1 total 0.250326 0.013593 +6 2 1 1 1 1 P2 total 0.094891 0.008015 +7 2 1 1 1 1 P3 total 0.012214 0.002309 +12 2 2 1 1 1 P0 total 0.673685 0.034716 +13 2 2 1 1 1 P1 total 0.255408 0.014000 +14 2 2 1 1 1 P2 total 0.087139 0.006220 +15 2 2 1 1 1 P3 total 0.005092 0.005661 + mesh 1 group in group out legendre nuclide mean std. dev. + x y z +0 1 1 1 1 1 P0 total 0.666776 0.040502 +1 1 1 1 1 1 P1 total 0.249678 0.015165 +2 1 1 1 1 1 P2 total 0.084904 0.007439 +3 1 1 1 1 1 P3 total 0.004671 0.003362 +8 1 2 1 1 1 P0 total 0.681119 0.037746 +9 1 2 1 1 1 P1 total 0.259694 0.013458 +10 1 2 1 1 1 P2 total 0.093376 0.006988 +11 1 2 1 1 1 P3 total 0.009055 0.004266 +4 2 1 1 1 1 P0 total 0.680135 0.039913 +5 2 1 1 1 1 P1 total 0.250326 0.013593 +6 2 1 1 1 1 P2 total 0.094891 0.008015 +7 2 1 1 1 1 P3 total 0.012214 0.002309 +12 2 2 1 1 1 P0 total 0.673685 0.034716 +13 2 2 1 1 1 P1 total 0.255408 0.014000 +14 2 2 1 1 1 P2 total 0.087139 0.006220 +15 2 2 1 1 1 P3 total 0.005092 0.005661 + mesh 1 group in group out nuclide mean std. dev. + x y z +0 1 1 1 1 1 total 1.0 0.070099 +2 1 2 1 1 1 total 1.0 0.062344 +1 2 1 1 1 1 total 1.0 0.062771 +3 2 2 1 1 1 total 1.0 0.049705 + mesh 1 group in group out nuclide mean std. dev. + x y z +0 1 1 1 1 1 total 0.028673 0.004228 +2 1 2 1 1 1 total 0.026964 0.003732 +1 2 1 1 1 1 total 0.026070 0.003550 +3 2 2 1 1 1 total 0.024753 0.003145 + mesh 1 group in group out nuclide mean std. dev. + x y z +0 1 1 1 1 1 total 1.0 0.070099 +2 1 2 1 1 1 total 1.0 0.062344 +1 2 1 1 1 1 total 1.0 0.062771 +3 2 2 1 1 1 total 1.0 0.049705 + mesh 1 group in group out legendre nuclide mean std. dev. + x y z +0 1 1 1 1 1 P0 total 0.666941 0.055729 +1 1 1 1 1 1 P1 total 0.249740 0.020867 +2 1 1 1 1 1 P2 total 0.084925 0.008895 +3 1 1 1 1 1 P3 total 0.004673 0.003374 +8 1 2 1 1 1 P0 total 0.676493 0.055277 +9 1 2 1 1 1 P1 total 0.257931 0.020458 +10 1 2 1 1 1 P2 total 0.092742 0.008898 +11 1 2 1 1 1 P3 total 0.008994 0.004272 +4 2 1 1 1 1 P0 total 0.689526 0.057267 +5 2 1 1 1 1 P1 total 0.253783 0.020306 +6 2 1 1 1 1 P2 total 0.096202 0.009899 +7 2 1 1 1 1 P3 total 0.012383 0.002451 +12 2 2 1 1 1 P0 total 0.680056 0.045995 +13 2 2 1 1 1 P1 total 0.257823 0.018090 +14 2 2 1 1 1 P2 total 0.087963 0.007367 +15 2 2 1 1 1 P3 total 0.005140 0.005719 + mesh 1 group in group out legendre nuclide mean std. dev. + x y z +0 1 1 1 1 1 P0 total 0.666941 0.072742 +1 1 1 1 1 1 P1 total 0.249740 0.027238 +2 1 1 1 1 1 P2 total 0.084925 0.010703 +3 1 1 1 1 1 P3 total 0.004673 0.003390 +8 1 2 1 1 1 P0 total 0.676493 0.069529 +9 1 2 1 1 1 P1 total 0.257931 0.026022 +10 1 2 1 1 1 P2 total 0.092742 0.010612 +11 1 2 1 1 1 P3 total 0.008994 0.004308 +4 2 1 1 1 1 P0 total 0.689526 0.071784 +5 2 1 1 1 1 P1 total 0.253783 0.025809 +6 2 1 1 1 1 P2 total 0.096202 0.011596 +7 2 1 1 1 1 P3 total 0.012383 0.002571 +12 2 2 1 1 1 P0 total 0.680056 0.057080 +13 2 2 1 1 1 P1 total 0.257823 0.022170 +14 2 2 1 1 1 P2 total 0.087963 0.008567 +15 2 2 1 1 1 P3 total 0.005140 0.005725 + mesh 1 group out nuclide mean std. dev. + x y z +0 1 1 1 1 total 1.0 0.121554 +2 1 2 1 1 total 1.0 0.216579 +1 2 1 1 1 total 1.0 0.183339 +3 2 2 1 1 total 1.0 0.153219 + mesh 1 group out nuclide mean std. dev. + x y z +0 1 1 1 1 total 1.0 0.115075 +2 1 2 1 1 total 1.0 0.214629 +1 2 1 1 1 total 1.0 0.193610 +3 2 2 1 1 total 1.0 0.149674 + mesh 1 group in nuclide mean std. dev. + x y z +0 1 1 1 1 total 5.326584e-07 4.351904e-08 +2 1 2 1 1 total 5.450392e-07 5.612731e-08 +1 2 1 1 1 total 5.715661e-07 6.214803e-08 +3 2 2 1 1 total 5.509404e-07 4.361226e-08 + mesh 1 group in nuclide mean std. dev. + x y z +0 1 1 1 1 total 0.026854 0.001457 +2 1 2 1 1 total 0.027482 0.002158 +1 2 1 1 1 total 0.027951 0.002224 +3 2 2 1 1 total 0.028105 0.002647 + mesh 1 group in group out nuclide mean std. dev. + x y z +0 1 1 1 1 1 total 0.028472 0.004077 +2 1 2 1 1 1 total 0.026236 0.003570 +1 2 1 1 1 1 total 0.025851 0.003683 +3 2 2 1 1 1 total 0.024301 0.002974 + mesh 1 group in nuclide mean std. dev. + x y surf +3 1 1 x-max in 1 total 4.570 0.073566 +2 1 1 x-max out 1 total 4.566 0.097365 +1 1 1 x-min in 1 total 0.000 0.000000 +0 1 1 x-min out 1 total 0.000 0.000000 +7 1 1 y-max in 1 total 4.544 0.163303 +6 1 1 y-max out 1 total 4.524 0.143457 +5 1 1 y-min in 1 total 0.000 0.000000 +4 1 1 y-min out 1 total 0.000 0.000000 +19 1 2 x-max in 1 total 4.446 0.192083 +18 1 2 x-max out 1 total 4.448 0.134907 +17 1 2 x-min in 1 total 0.000 0.000000 +16 1 2 x-min out 1 total 0.000 0.000000 +23 1 2 y-max in 1 total 0.000 0.000000 +22 1 2 y-max out 1 total 0.000 0.000000 +21 1 2 y-min in 1 total 4.524 0.143457 +20 1 2 y-min out 1 total 4.544 0.163303 +11 2 1 x-max in 1 total 0.000 0.000000 +10 2 1 x-max out 1 total 0.000 0.000000 +9 2 1 x-min in 1 total 4.566 0.097365 +8 2 1 x-min out 1 total 4.570 0.073566 +15 2 1 y-max in 1 total 4.422 0.100270 +14 2 1 y-max out 1 total 4.424 0.145141 +13 2 1 y-min in 1 total 0.000 0.000000 +12 2 1 y-min out 1 total 0.000 0.000000 +27 2 2 x-max in 1 total 0.000 0.000000 +26 2 2 x-max out 1 total 0.000 0.000000 +25 2 2 x-min in 1 total 4.448 0.134907 +24 2 2 x-min out 1 total 4.446 0.192083 +31 2 2 y-max in 1 total 0.000 0.000000 +30 2 2 y-max out 1 total 0.000 0.000000 +29 2 2 y-min in 1 total 4.424 0.145141 +28 2 2 y-min out 1 total 4.422 0.100270 + mesh 1 delayedgroup group in nuclide mean std. dev. + x y z +0 1 1 1 1 1 total 0.000006 3.337014e-07 +1 1 1 1 2 1 total 0.000033 1.744448e-06 +2 1 1 1 3 1 total 0.000032 1.680053e-06 +3 1 1 1 4 1 total 0.000075 3.832256e-06 +4 1 1 1 5 1 total 0.000034 1.657860e-06 +5 1 1 1 6 1 total 0.000014 6.911218e-07 +12 1 2 1 1 1 total 0.000006 4.935854e-07 +13 1 2 1 2 1 total 0.000034 2.586377e-06 +14 1 2 1 3 1 total 0.000033 2.493442e-06 +15 1 2 1 4 1 total 0.000076 5.693867e-06 +16 1 2 1 5 1 total 0.000034 2.461606e-06 +17 1 2 1 6 1 total 0.000014 1.026406e-06 +6 2 1 1 1 1 total 0.000006 5.092712e-07 +7 2 1 1 2 1 total 0.000034 2.652677e-06 +8 2 1 1 3 1 total 0.000033 2.547698e-06 +9 2 1 1 4 1 total 0.000077 5.777683e-06 +10 2 1 1 5 1 total 0.000035 2.451184e-06 +11 2 1 1 6 1 total 0.000014 1.023674e-06 +18 2 2 1 1 1 total 0.000006 6.058589e-07 +19 2 2 1 2 1 total 0.000034 3.154428e-06 +20 2 2 1 3 1 total 0.000033 3.028038e-06 +21 2 2 1 4 1 total 0.000077 6.857868e-06 +22 2 2 1 5 1 total 0.000034 2.893043e-06 +23 2 2 1 6 1 total 0.000014 1.208895e-06 + mesh 1 delayedgroup group out nuclide mean std. dev. + x y z +0 1 1 1 1 1 total 0.0 0.000000 +1 1 1 1 2 1 total 0.0 0.000000 +2 1 1 1 3 1 total 0.0 0.000000 +3 1 1 1 4 1 total 1.0 1.414214 +4 1 1 1 5 1 total 0.0 0.000000 +5 1 1 1 6 1 total 0.0 0.000000 +12 1 2 1 1 1 total 0.0 0.000000 +13 1 2 1 2 1 total 1.0 1.414214 +14 1 2 1 3 1 total 0.0 0.000000 +15 1 2 1 4 1 total 1.0 0.867638 +16 1 2 1 5 1 total 0.0 0.000000 +17 1 2 1 6 1 total 0.0 0.000000 +6 2 1 1 1 1 total 0.0 0.000000 +7 2 1 1 2 1 total 0.0 0.000000 +8 2 1 1 3 1 total 1.0 1.414214 +9 2 1 1 4 1 total 0.0 0.000000 +10 2 1 1 5 1 total 0.0 0.000000 +11 2 1 1 6 1 total 0.0 0.000000 +18 2 2 1 1 1 total 0.0 0.000000 +19 2 2 1 2 1 total 1.0 1.414214 +20 2 2 1 3 1 total 0.0 0.000000 +21 2 2 1 4 1 total 1.0 1.414214 +22 2 2 1 5 1 total 0.0 0.000000 +23 2 2 1 6 1 total 0.0 0.000000 + mesh 1 delayedgroup group in nuclide mean std. dev. + x y z +0 1 1 1 1 1 total 0.000227 0.000016 +1 1 1 1 2 1 total 0.001217 0.000083 +2 1 1 1 3 1 total 0.001189 0.000081 +3 1 1 1 4 1 total 0.002771 0.000185 +4 1 1 1 5 1 total 0.001247 0.000082 +5 1 1 1 6 1 total 0.000518 0.000034 +12 1 2 1 1 1 total 0.000227 0.000023 +13 1 2 1 2 1 total 0.001215 0.000119 +14 1 2 1 3 1 total 0.001185 0.000115 +15 1 2 1 4 1 total 0.002755 0.000266 +16 1 2 1 5 1 total 0.001234 0.000117 +17 1 2 1 6 1 total 0.000513 0.000049 +6 2 1 1 1 1 total 0.000227 0.000024 +7 2 1 1 2 1 total 0.001213 0.000124 +8 2 1 1 3 1 total 0.001183 0.000120 +9 2 1 1 4 1 total 0.002748 0.000275 +10 2 1 1 5 1 total 0.001228 0.000119 +11 2 1 1 6 1 total 0.000511 0.000050 +18 2 2 1 1 1 total 0.000227 0.000028 +19 2 2 1 2 1 total 0.001210 0.000149 +20 2 2 1 3 1 total 0.001179 0.000144 +21 2 2 1 4 1 total 0.002732 0.000330 +22 2 2 1 5 1 total 0.001214 0.000143 +23 2 2 1 6 1 total 0.000505 0.000059 + mesh 1 delayedgroup group in nuclide mean std. dev. + x y z +0 1 1 1 1 1 total 0.013357 0.000929 +1 1 1 1 2 1 total 0.032589 0.002199 +2 1 1 1 3 1 total 0.121106 0.008007 +3 1 1 1 4 1 total 0.306140 0.019650 +4 1 1 1 5 1 total 0.862764 0.052685 +5 1 1 1 6 1 total 2.897892 0.177498 +12 1 2 1 1 1 total 0.013356 0.001330 +13 1 2 1 2 1 total 0.032598 0.003165 +14 1 2 1 3 1 total 0.121086 0.011554 +15 1 2 1 4 1 total 0.305948 0.028460 +16 1 2 1 5 1 total 0.862070 0.076649 +17 1 2 1 6 1 total 2.895530 0.258195 +6 2 1 1 1 1 total 0.013355 0.001389 +7 2 1 1 2 1 total 0.032601 0.003293 +8 2 1 1 3 1 total 0.121079 0.011980 +9 2 1 1 4 1 total 0.305874 0.029310 +10 2 1 1 5 1 total 0.861802 0.077464 +11 2 1 1 6 1 total 2.894617 0.261360 +18 2 2 1 1 1 total 0.013354 0.001670 +19 2 2 1 2 1 total 0.032610 0.003972 +20 2 2 1 3 1 total 0.121059 0.014468 +21 2 2 1 4 1 total 0.305680 0.035462 +22 2 2 1 5 1 total 0.861087 0.093863 +23 2 2 1 6 1 total 2.892185 0.316700 + mesh 1 delayedgroup group in group out nuclide mean std. dev. + x y z +0 1 1 1 1 1 1 total 0.000000 0.000000 +1 1 1 1 2 1 1 total 0.000000 0.000000 +2 1 1 1 3 1 1 total 0.000000 0.000000 +3 1 1 1 4 1 1 total 0.000201 0.000201 +4 1 1 1 5 1 1 total 0.000000 0.000000 +5 1 1 1 6 1 1 total 0.000000 0.000000 +12 1 2 1 1 1 1 total 0.000000 0.000000 +13 1 2 1 2 1 1 total 0.000250 0.000250 +14 1 2 1 3 1 1 total 0.000000 0.000000 +15 1 2 1 4 1 1 total 0.000477 0.000293 +16 1 2 1 5 1 1 total 0.000000 0.000000 +17 1 2 1 6 1 1 total 0.000000 0.000000 +6 2 1 1 1 1 1 total 0.000000 0.000000 +7 2 1 1 2 1 1 total 0.000000 0.000000 +8 2 1 1 3 1 1 total 0.000220 0.000220 +9 2 1 1 4 1 1 total 0.000000 0.000000 +10 2 1 1 5 1 1 total 0.000000 0.000000 +11 2 1 1 6 1 1 total 0.000000 0.000000 +18 2 2 1 1 1 1 total 0.000000 0.000000 +19 2 2 1 2 1 1 total 0.000226 0.000226 +20 2 2 1 3 1 1 total 0.000000 0.000000 +21 2 2 1 4 1 1 total 0.000226 0.000226 +22 2 2 1 5 1 1 total 0.000000 0.000000 +23 2 2 1 6 1 1 total 0.000000 0.000000 diff --git a/tests/regression_tests/mgxs_library_condense/test.py b/tests/regression_tests/mgxs_library_condense/test.py index 15a4ff827..a7e60617f 100644 --- a/tests/regression_tests/mgxs_library_condense/test.py +++ b/tests/regression_tests/mgxs_library_condense/test.py @@ -19,12 +19,20 @@ class MGXSTestHarness(PyAPITestHarness): self.mgxs_lib.by_nuclide = False # Test all MGXS types - self.mgxs_lib.mgxs_types = openmc.mgxs.MGXS_TYPES[:-1] + \ + self.mgxs_lib.mgxs_types = openmc.mgxs.MGXS_TYPES + \ openmc.mgxs.MDGXS_TYPES self.mgxs_lib.energy_groups = energy_groups self.mgxs_lib.num_delayed_groups = 6 self.mgxs_lib.legendre_order = 3 - self.mgxs_lib.domain_type = 'material' + self.mgxs_lib.domain_type = 'mesh' + + # Instantiate a tally mesh + mesh = openmc.RegularMesh(mesh_id=1) + mesh.dimension = [2, 2] + mesh.lower_left = [-100., -100.] + mesh.width = [100., 100.] + + self.mgxs_lib.domains = [mesh] self.mgxs_lib.build_library() # Add tallies diff --git a/tests/regression_tests/mgxs_library_hdf5/inputs_true.dat b/tests/regression_tests/mgxs_library_hdf5/inputs_true.dat index 5aedd383d..8e649ea82 100644 --- a/tests/regression_tests/mgxs_library_hdf5/inputs_true.dat +++ b/tests/regression_tests/mgxs_library_hdf5/inputs_true.dat @@ -50,7 +50,12 @@ - + + 2 2 + -100.0 -100.0 + 100.0 100.0 + + 1 @@ -68,15 +73,12 @@ 0.0 20000000.0 - + + 1 + + 1 2 3 4 5 6 - - 2 - - - 3 - 1 2 total @@ -384,793 +386,67 @@ analog + 66 2 + total + current + analog + + 1 2 total flux tracklength - - 1 65 2 + + 1 69 2 total delayed-nu-fission tracklength - - 1 65 52 - total - delayed-nu-fission - analog - - 1 65 5 + 1 69 52 total delayed-nu-fission analog + 1 69 5 + total + delayed-nu-fission + analog + + 1 2 total nu-fission tracklength - - 1 65 2 - total - delayed-nu-fission - tracklength - - 1 65 2 + 1 69 2 total delayed-nu-fission tracklength - 1 65 2 + 1 69 2 + total + delayed-nu-fission + tracklength + + + 1 69 2 total decay-rate tracklength - + 1 2 total flux analog - - 1 65 2 5 - total - delayed-nu-fission - analog - - 80 2 - total - flux - tracklength - - - 80 2 - total - total - tracklength - - - 80 2 - total - flux - tracklength - - - 80 2 - total - total - tracklength - - - 80 2 - total - flux - analog - - - 80 5 6 - total - scatter - analog - - - 80 2 - total - flux - tracklength - - - 80 2 - total - total - tracklength - - - 80 2 - total - flux - analog - - - 80 5 6 - total - nu-scatter - analog - - - 80 2 - total - flux - tracklength - - - 80 2 - total - absorption - tracklength - - - 80 2 - total - flux - tracklength - - - 80 2 - total - absorption - tracklength - - - 80 2 - total - fission - tracklength - - - 80 2 - total - flux - tracklength - - - 80 2 - total - fission - tracklength - - - 80 2 - total - flux - tracklength - - - 80 2 - total - nu-fission - tracklength - - - 80 2 - total - flux - tracklength - - - 80 2 - total - kappa-fission - tracklength - - - 80 2 - total - flux - tracklength - - - 80 2 - total - scatter - tracklength - - - 80 2 - total - flux - analog - - - 80 2 - total - nu-scatter - analog - - - 80 2 - total - flux - analog - - - 80 2 5 28 - total - scatter - analog - - - 80 2 - total - flux - analog - - - 80 2 5 28 - total - nu-scatter - analog - - - 80 2 5 - total - nu-scatter - analog - - - 80 2 5 - total - scatter - analog - - - 80 2 - total - flux - analog - - - 80 2 5 - total - nu-fission - analog - - - 80 2 5 - total - scatter - analog - - - 80 2 - total - flux - tracklength - - - 80 2 - total - scatter - tracklength - - - 80 2 5 28 - total - scatter - analog - - - 80 2 - total - flux - tracklength - - - 80 2 - total - scatter - tracklength - - - 80 2 5 28 - total - scatter - analog - - - 80 2 5 - total - nu-scatter - analog - - - 80 52 - total - nu-fission - analog - - - 80 5 - total - nu-fission - analog - - - 80 52 - total - prompt-nu-fission - analog - - - 80 5 - total - prompt-nu-fission - analog - - - 80 2 - total - flux - tracklength - - - 80 2 - total - inverse-velocity - tracklength - - - 80 2 - total - flux - tracklength - - - 80 2 - total - prompt-nu-fission - tracklength - - - 80 2 - total - flux - analog - - - 80 2 5 - total - prompt-nu-fission - analog - - - 80 2 - total - flux - tracklength - - - 80 65 2 - total - delayed-nu-fission - tracklength - - - 80 65 52 - total - delayed-nu-fission - analog - - - 80 65 5 - total - delayed-nu-fission - analog - - - 80 2 - total - nu-fission - tracklength - - - 80 65 2 - total - delayed-nu-fission - tracklength - - - 80 65 2 - total - delayed-nu-fission - tracklength - - - 80 65 2 - total - decay-rate - tracklength - - - 80 2 - total - flux - analog - - - 80 65 2 5 - total - delayed-nu-fission - analog - - - 159 2 - total - flux - tracklength - - - 159 2 - total - total - tracklength - - - 159 2 - total - flux - tracklength - - - 159 2 - total - total - tracklength - - - 159 2 - total - flux - analog - - - 159 5 6 - total - scatter - analog - - - 159 2 - total - flux - tracklength - - - 159 2 - total - total - tracklength - - - 159 2 - total - flux - analog - - - 159 5 6 - total - nu-scatter - analog - - - 159 2 - total - flux - tracklength - - - 159 2 - total - absorption - tracklength - - - 159 2 - total - flux - tracklength - - - 159 2 - total - absorption - tracklength - - - 159 2 - total - fission - tracklength - - - 159 2 - total - flux - tracklength - - - 159 2 - total - fission - tracklength - - - 159 2 - total - flux - tracklength - - - 159 2 - total - nu-fission - tracklength - - - 159 2 - total - flux - tracklength - - - 159 2 - total - kappa-fission - tracklength - - - 159 2 - total - flux - tracklength - - - 159 2 - total - scatter - tracklength - - - 159 2 - total - flux - analog - - - 159 2 - total - nu-scatter - analog - - - 159 2 - total - flux - analog - - - 159 2 5 28 - total - scatter - analog - - - 159 2 - total - flux - analog - - - 159 2 5 28 - total - nu-scatter - analog - - - 159 2 5 - total - nu-scatter - analog - - - 159 2 5 - total - scatter - analog - - - 159 2 - total - flux - analog - - - 159 2 5 - total - nu-fission - analog - - - 159 2 5 - total - scatter - analog - - - 159 2 - total - flux - tracklength - - - 159 2 - total - scatter - tracklength - - - 159 2 5 28 - total - scatter - analog - - - 159 2 - total - flux - tracklength - - - 159 2 - total - scatter - tracklength - - - 159 2 5 28 - total - scatter - analog - - - 159 2 5 - total - nu-scatter - analog - - - 159 52 - total - nu-fission - analog - - - 159 5 - total - nu-fission - analog - - - 159 52 - total - prompt-nu-fission - analog - - - 159 5 - total - prompt-nu-fission - analog - - - 159 2 - total - flux - tracklength - - - 159 2 - total - inverse-velocity - tracklength - - - 159 2 - total - flux - tracklength - - - 159 2 - total - prompt-nu-fission - tracklength - - - 159 2 - total - flux - analog - - - 159 2 5 - total - prompt-nu-fission - analog - - - 159 2 - total - flux - tracklength - - - 159 65 2 - total - delayed-nu-fission - tracklength - - - 159 65 52 - total - delayed-nu-fission - analog - - - 159 65 5 - total - delayed-nu-fission - analog - - - 159 2 - total - nu-fission - tracklength - - - 159 65 2 - total - delayed-nu-fission - tracklength - - - 159 65 2 - total - delayed-nu-fission - tracklength - - - 159 65 2 - total - decay-rate - tracklength - - - 159 2 - total - flux - analog - - - 159 65 2 5 + 1 69 2 5 total delayed-nu-fission analog diff --git a/tests/regression_tests/mgxs_library_hdf5/results_true.dat b/tests/regression_tests/mgxs_library_hdf5/results_true.dat index 7ef172574..b479c139a 100644 --- a/tests/regression_tests/mgxs_library_hdf5/results_true.dat +++ b/tests/regression_tests/mgxs_library_hdf5/results_true.dat @@ -1,366 +1,212 @@ domain=1 type=total -[4.14825464e-01 6.60169863e-01] -[2.27929104e-02 4.75189000e-02] +[5.38564635e-01 1.45554552e+00] +[2.15102394e-02 1.74671506e-01] domain=1 type=transport -[3.63092031e-01 6.44850709e-01] -[2.38384842e-02 4.76746410e-02] +[3.10133076e-01 1.09725336e+00] +[2.65671384e-02 1.80883943e-01] domain=1 type=nu-transport -[3.63092031e-01 6.44850709e-01] -[2.38384842e-02 4.76746410e-02] +[3.10133076e-01 1.09725336e+00] +[2.65671384e-02 1.80883943e-01] domain=1 type=absorption -[2.74078431e-02 2.64510714e-01] -[2.69249666e-03 2.33670618e-02] +[8.45377250e-03 9.45269817e-02] +[7.33458615e-04 9.19713128e-03] domain=1 type=capture -[1.98445482e-02 7.17193458e-02] -[2.64330389e-03 2.52078411e-02] +[6.06155218e-03 3.99297631e-02] +[7.22875857e-04 7.50886804e-03] domain=1 type=fission -[7.56329484e-03 1.92791369e-01] -[5.08483893e-04 1.71059103e-02] +[2.39222032e-03 5.45972186e-02] +[8.69881114e-05 5.15800900e-03] domain=1 type=nu-fission -[1.94317397e-02 4.69774728e-01] -[1.32297610e-03 4.16819717e-02] +[6.15310797e-03 1.33037043e-01] +[2.31371327e-04 1.25685205e-02] domain=1 type=kappa-fission -[1.47456979e+06 3.72868925e+07] -[9.92353624e+04 3.30837549e+06] +[4.66497048e+05 1.05593971e+07] +[1.70456489e+04 9.97586814e+05] domain=1 type=scatter -[3.87417621e-01 3.95659148e-01] -[2.06257342e-02 2.51250448e-02] +[5.30110862e-01 1.36101853e+00] +[2.09707684e-02 1.66399963e-01] domain=1 type=nu-scatter -[3.85188361e-01 4.12389370e-01] -[2.69456191e-02 1.54252759e-02] +[5.26423506e-01 1.38428396e+00] +[3.53738379e-02 1.81243556e-01] domain=1 type=scatter matrix -[[[3.84199430e-01 5.18702806e-02 2.00688439e-02 9.47771502e-03] - [9.88930322e-04 -2.07234582e-04 -1.03366173e-04 2.34290606e-04]] +[[[5.09394630e-01 2.28431559e-01 8.87144474e-02 9.90358757e-03] + [1.70288754e-02 5.08756263e-03 -1.29619140e-03 -2.29397464e-03]] - [[9.24639842e-04 -7.67704913e-04 4.93788836e-04 -1.71497217e-04] - [4.11464730e-01 1.64817268e-02 6.37149004e-03 -1.04991213e-02]]] -[[[2.70010116e-02 6.98254837e-03 2.84649498e-03 2.23351961e-03] - [4.82419410e-04 1.49010765e-04 1.84316299e-04 1.28173102e-04]] + [[0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00] + [1.38428396e+00 3.32283490e-01 7.20522379e-02 -1.03495292e-02]]] +[[[3.32592286e-02 1.55923841e-02 8.46899584e-03 3.36789772e-03] + [2.33802794e-03 1.01739476e-03 6.77938532e-04 7.77067821e-04]] - [[9.24883397e-04 7.67907131e-04 4.93918903e-04 1.71542390e-04] - [1.52449343e-02 4.50172764e-03 1.05507486e-02 1.04381870e-02]]] + [[0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00] + [1.81243556e-01 4.54455205e-02 1.40301767e-02 1.06726205e-02]]] domain=1 type=nu-scatter matrix -[[[3.84199430e-01 5.18702806e-02 2.00688439e-02 9.47771502e-03] - [9.88930322e-04 -2.07234582e-04 -1.03366173e-04 2.34290606e-04]] +[[[5.09394630e-01 2.28431559e-01 8.87144474e-02 9.90358757e-03] + [1.70288754e-02 5.08756263e-03 -1.29619140e-03 -2.29397464e-03]] - [[9.24639842e-04 -7.67704913e-04 4.93788836e-04 -1.71497217e-04] - [4.11464730e-01 1.64817268e-02 6.37149004e-03 -1.04991213e-02]]] -[[[2.70010116e-02 6.98254837e-03 2.84649498e-03 2.23351961e-03] - [4.82419410e-04 1.49010765e-04 1.84316299e-04 1.28173102e-04]] + [[0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00] + [1.38428396e+00 3.32283490e-01 7.20522379e-02 -1.03495292e-02]]] +[[[3.32592286e-02 1.55923841e-02 8.46899584e-03 3.36789772e-03] + [2.33802794e-03 1.01739476e-03 6.77938532e-04 7.77067821e-04]] - [[9.24883397e-04 7.67907131e-04 4.93918903e-04 1.71542390e-04] - [1.52449343e-02 4.50172764e-03 1.05507486e-02 1.04381870e-02]]] + [[0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00] + [1.81243556e-01 4.54455205e-02 1.40301767e-02 1.06726205e-02]]] domain=1 type=multiplicity matrix [[1.00000000e+00 1.00000000e+00] - [1.00000000e+00 1.00000000e+00]] -[[7.85164550e-02 6.87184271e-01] - [1.41421356e+00 4.11303488e-02]] + [0.00000000e+00 1.00000000e+00]] +[[7.36409657e-02 1.86006410e-01] + [0.00000000e+00 1.52524077e-01]] domain=1 type=nu-fission matrix -[[2.01424221e-02 0.00000000e+00] - [4.54366342e-01 0.00000000e+00]] -[[3.14909051e-03 0.00000000e+00] - [2.74255160e-02 0.00000000e+00]] +[[6.38661278e-03 0.00000000e+00] + [1.42604897e-01 0.00000000e+00]] +[[1.95163368e-03 0.00000000e+00] + [2.53807844e-02 0.00000000e+00]] domain=1 type=scatter probability matrix -[[9.97432606e-01 2.56739409e-03] - [2.24215247e-03 9.97757848e-01]] -[[7.82243018e-02 1.25560869e-03] - [2.24310192e-03 4.10531468e-02]] +[[9.67651757e-01 3.23482428e-02] + [0.00000000e+00 1.00000000e+00]] +[[7.02365009e-02 4.55825691e-03] + [0.00000000e+00 1.52524077e-01]] domain=1 type=consistent scatter matrix -[[[3.86422967e-01 5.21704775e-02 2.01849914e-02 9.53256688e-03] - [9.94653712e-04 -2.08433942e-04 -1.03964400e-04 2.35646553e-04]] +[[[5.12962708e-01 2.30031618e-01 8.93358517e-02 9.97295769e-03] + [1.71481549e-02 5.12319869e-03 -1.30527063e-03 -2.31004289e-03]] - [[8.87128136e-04 -7.36559899e-04 4.73756321e-04 -1.64539748e-04] - [3.94772020e-01 1.58130798e-02 6.11300510e-03 -1.00731826e-02]]] -[[[3.66286904e-02 7.76748967e-03 3.13767805e-03 2.32683668e-03] - [4.89318749e-04 1.50458419e-04 1.85500930e-04 1.29783343e-04]] + [[0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00] + [1.36101853e+00 3.26698857e-01 7.08412681e-02 -1.01755864e-02]]] +[[[4.24038637e-02 1.95589805e-02 9.65642635e-03 3.42897188e-03] + [2.50979721e-03 1.05693435e-03 6.85887105e-04 7.91226772e-04]] - [[8.89289900e-04 7.38354757e-04 4.74910776e-04 1.64940700e-04] - [2.98710065e-02 4.44330993e-03 1.01307463e-02 1.00367467e-02]]] + [[0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00] + [2.66048427e-01 6.51550937e-02 1.72051955e-02 1.05966869e-02]]] domain=1 type=consistent nu-scatter matrix -[[[3.86422967e-01 5.21704775e-02 2.01849914e-02 9.53256688e-03] - [9.94653712e-04 -2.08433942e-04 -1.03964400e-04 2.35646553e-04]] +[[[5.12962708e-01 2.30031618e-01 8.93358517e-02 9.97295769e-03] + [1.71481549e-02 5.12319869e-03 -1.30527063e-03 -2.31004289e-03]] - [[8.87128136e-04 -7.36559899e-04 4.73756321e-04 -1.64539748e-04] - [3.94772020e-01 1.58130798e-02 6.11300510e-03 -1.00731826e-02]]] -[[[4.75627021e-02 8.78140568e-03 3.51522199e-03 2.44425169e-03] - [8.40606499e-04 2.07733706e-04 1.98782933e-04 2.07523215e-04]] + [[0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00] + [1.36101853e+00 3.26698857e-01 7.08412681e-02 -1.01755864e-02]]] +[[[5.67894665e-02 2.58748694e-02 1.16844724e-02 3.50673899e-03] + [4.05870125e-03 1.42310215e-03 7.27590183e-04 9.00370534e-04]] - [[1.53780011e-03 1.27679627e-03 8.21237084e-04 2.85222881e-04] - [3.39988353e-02 4.49065920e-03 1.01338659e-02 1.00452944e-02]]] + [[0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00] + [3.37453083e-01 8.20253589e-02 2.03166620e-02 1.07097407e-02]]] domain=1 type=chi [1.00000000e+00 0.00000000e+00] -[4.60705491e-02 0.00000000e+00] +[1.21553680e-01 0.00000000e+00] domain=1 type=chi-prompt [1.00000000e+00 0.00000000e+00] -[5.14714842e-02 0.00000000e+00] +[1.15074880e-01 0.00000000e+00] domain=1 type=inverse-velocity -[5.70932437e-08 2.85573948e-06] -[4.68793809e-09 2.44216369e-07] +[5.82407705e-08 2.93916338e-06] +[3.57468034e-09 3.31327050e-07] domain=1 type=prompt-nu-fission -[1.92392209e-02 4.66718979e-01] -[1.30950644e-03 4.14108425e-02] +[6.09158918e-03 1.32171675e-01] +[2.28563531e-04 1.24867659e-02] domain=1 type=prompt-nu-fission matrix -[[2.01424221e-02 0.00000000e+00] - [4.45819054e-01 0.00000000e+00]] -[[3.14909051e-03 0.00000000e+00] - [2.86750876e-02 0.00000000e+00]] +[[6.38661278e-03 0.00000000e+00] + [1.41378615e-01 0.00000000e+00]] +[[1.95163368e-03 0.00000000e+00] + [2.44103846e-02 0.00000000e+00]] +domain=1 type=current +[[[0.00000000e+00 0.00000000e+00 3.85400000e+00 3.80400000e+00 + 0.00000000e+00 0.00000000e+00 3.74600000e+00 3.80200000e+00] + [0.00000000e+00 0.00000000e+00 7.12000000e-01 7.66000000e-01 + 0.00000000e+00 0.00000000e+00 7.78000000e-01 7.42000000e-01]] + + [[3.80400000e+00 3.85400000e+00 0.00000000e+00 0.00000000e+00 + 0.00000000e+00 0.00000000e+00 3.70400000e+00 3.65000000e+00] + [7.66000000e-01 7.12000000e-01 0.00000000e+00 0.00000000e+00 + 0.00000000e+00 0.00000000e+00 7.20000000e-01 7.72000000e-01]] + + [[0.00000000e+00 0.00000000e+00 3.70600000e+00 3.74600000e+00 + 3.80200000e+00 3.74600000e+00 0.00000000e+00 0.00000000e+00] + [0.00000000e+00 0.00000000e+00 7.42000000e-01 7.00000000e-01 + 7.42000000e-01 7.78000000e-01 0.00000000e+00 0.00000000e+00]] + + [[3.74600000e+00 3.70600000e+00 0.00000000e+00 0.00000000e+00 + 3.65000000e+00 3.70400000e+00 0.00000000e+00 0.00000000e+00] + [7.00000000e-01 7.42000000e-01 0.00000000e+00 0.00000000e+00 + 7.72000000e-01 7.20000000e-01 0.00000000e+00 0.00000000e+00]]] +[[[0.00000000e+00 0.00000000e+00 8.57088093e-02 5.04579032e-02 + 0.00000000e+00 0.00000000e+00 1.33551488e-01 1.58789168e-01] + [0.00000000e+00 0.00000000e+00 4.61952378e-02 5.35350353e-02 + 0.00000000e+00 0.00000000e+00 5.23832034e-02 3.81313519e-02]] + + [[5.04579032e-02 8.57088093e-02 0.00000000e+00 0.00000000e+00 + 0.00000000e+00 0.00000000e+00 1.39089899e-01 8.87693641e-02] + [5.35350353e-02 4.61952378e-02 0.00000000e+00 0.00000000e+00 + 0.00000000e+00 0.00000000e+00 4.14728827e-02 4.66261729e-02]] + + [[0.00000000e+00 0.00000000e+00 1.32838248e-01 1.90383823e-01 + 1.58789168e-01 1.33551488e-01 0.00000000e+00 0.00000000e+00] + [0.00000000e+00 0.00000000e+00 2.35372046e-02 2.54950976e-02 + 3.81313519e-02 5.23832034e-02 0.00000000e+00 0.00000000e+00]] + + [[1.90383823e-01 1.32838248e-01 0.00000000e+00 0.00000000e+00 + 8.87693641e-02 1.39089899e-01 0.00000000e+00 0.00000000e+00] + [2.54950976e-02 2.35372046e-02 0.00000000e+00 0.00000000e+00 + 4.66261729e-02 4.14728827e-02 0.00000000e+00 0.00000000e+00]]] domain=1 type=delayed-nu-fission -[[4.31687649e-06 1.06974147e-04] - [2.69760050e-05 5.52167849e-04] - [2.84366794e-05 5.27147626e-04] - [7.42603126e-05 1.18190938e-03] - [4.14908415e-05 4.84567103e-04] - [1.70015984e-05 2.02983424e-04]] -[[2.89748551e-07 9.49155602e-06] - [1.85003750e-06 4.89925096e-05] - [1.97097929e-06 4.67725252e-05] - [5.22610328e-06 1.04867938e-04] - [2.99830754e-06 4.29944540e-05] - [1.22654681e-06 1.80102229e-05]] +[[1.36657452e-06 3.02943589e-05] + [8.57921019e-06 1.56370222e-04] + [9.06240193e-06 1.49284664e-04] + [2.37319215e-05 3.34708794e-04] + [1.33192402e-05 1.37226149e-04] + [5.45629246e-06 5.74835423e-05]] +[[5.09659449e-08 2.86202444e-06] + [3.58145203e-07 1.47728954e-05] + [3.99793526e-07 1.41034954e-05] + [1.12997191e-06 3.16212248e-05] + [7.16321720e-07 1.29642809e-05] + [2.91301483e-07 5.43069083e-06]] domain=1 type=chi-delayed [[0.00000000e+00 0.00000000e+00] - [1.00000000e+00 0.00000000e+00] - [1.00000000e+00 0.00000000e+00] + [0.00000000e+00 0.00000000e+00] + [0.00000000e+00 0.00000000e+00] [1.00000000e+00 0.00000000e+00] [0.00000000e+00 0.00000000e+00] [0.00000000e+00 0.00000000e+00]] [[0.00000000e+00 0.00000000e+00] - [8.69127748e-01 0.00000000e+00] + [0.00000000e+00 0.00000000e+00] + [0.00000000e+00 0.00000000e+00] [1.41421356e+00 0.00000000e+00] - [3.60359016e-01 0.00000000e+00] [0.00000000e+00 0.00000000e+00] [0.00000000e+00 0.00000000e+00]] domain=1 type=beta -[[2.22155945e-04 2.27713711e-04] - [1.38824446e-03 1.17538858e-03] - [1.46341397e-03 1.12212853e-03] - [3.82159878e-03 2.51590670e-03] - [2.13520982e-03 1.03148823e-03] - [8.74939592e-04 4.32086725e-04]] -[[1.80847601e-05 2.46946655e-05] - [1.14688936e-04 1.27466313e-04] - [1.21787671e-04 1.21690467e-04] - [3.21434951e-04 2.72840272e-04] - [1.82980530e-04 1.11860871e-04] - [7.48900063e-05 4.68581181e-05]] +[[2.22095001e-04 2.27713713e-04] + [1.39428891e-03 1.17538859e-03] + [1.47281699e-03 1.12212855e-03] + [3.85689990e-03 2.51590676e-03] + [2.16463619e-03 1.03148827e-03] + [8.86753895e-04 4.32086742e-04]] +[[9.07215649e-06 1.93631017e-05] + [6.26713584e-05 9.99464126e-05] + [6.94548765e-05 9.54175694e-05] + [1.94563984e-04 2.13934228e-04] + [1.21876271e-04 8.77101834e-05] + [4.95946084e-05 3.67414816e-05]] domain=1 type=decay-rate -[[1.34450193e-02 1.33360001e-02] - [3.20638663e-02 3.27389978e-02] - [1.22136025e-01 1.20780007e-01] - [3.15269336e-01 3.02780066e-01] - [8.89232587e-01 8.49490287e-01] - [2.98940409e+00 2.85300088e+00]] -[[1.08439455e-03 1.44623725e-03] - [2.65795038e-03 3.55041661e-03] - [1.02955036e-02 1.30981202e-02] - [2.71748571e-02 3.28353145e-02] - [7.93682889e-02 9.21238900e-02] - [2.66253283e-01 3.09396760e-01]] +[[1.34479215e-02 1.33360001e-02] + [3.20491028e-02 3.27389978e-02] + [1.22162808e-01 1.20780007e-01] + [3.15480592e-01 3.02780066e-01] + [8.89723658e-01 8.49490289e-01] + [2.99112795e+00 2.85300089e+00]] +[[5.47700122e-04 1.13399549e-03] + [1.53954980e-03 2.78388383e-03] + [6.44048392e-03 1.02702443e-02] + [1.86178714e-02 2.57461915e-02] + [6.12200714e-02 7.22344077e-02] + [2.04036637e-01 2.42598218e-01]] domain=1 type=delayed-nu-fission matrix [[[0.00000000e+00 0.00000000e+00] [0.00000000e+00 0.00000000e+00]] [[0.00000000e+00 0.00000000e+00] - [2.53814444e-03 0.00000000e+00]] - - [[0.00000000e+00 0.00000000e+00] - [1.18579136e-03 0.00000000e+00]] - - [[0.00000000e+00 0.00000000e+00] - [4.82335163e-03 0.00000000e+00]] - - [[0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00]] - - [[0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00]]] -[[[0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00]] - - [[0.00000000e+00 0.00000000e+00] - [1.56094521e-03 0.00000000e+00]] - - [[0.00000000e+00 0.00000000e+00] - [1.18610370e-03 0.00000000e+00]] - - [[0.00000000e+00 0.00000000e+00] - [1.23402593e-03 0.00000000e+00]] - - [[0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00]] - - [[0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00]]] -domain=2 type=total -[3.13737667e-01 3.00821380e-01] -[1.55819228e-02 2.80524816e-02] -domain=2 type=transport -[2.75508079e-01 3.12035015e-01] -[1.77418859e-02 3.23843473e-02] -domain=2 type=nu-transport -[2.75508079e-01 3.12035015e-01] -[1.77418859e-02 3.23843473e-02] -domain=2 type=absorption -[1.57499139e-03 5.40037825e-03] -[3.22547917e-04 6.18139027e-04] -domain=2 type=capture -[1.57499139e-03 5.40037825e-03] -[3.22547917e-04 6.18139027e-04] -domain=2 type=fission -[0.00000000e+00 0.00000000e+00] -[0.00000000e+00 0.00000000e+00] -domain=2 type=nu-fission -[0.00000000e+00 0.00000000e+00] -[0.00000000e+00 0.00000000e+00] -domain=2 type=kappa-fission -[0.00000000e+00 0.00000000e+00] -[0.00000000e+00 0.00000000e+00] -domain=2 type=scatter -[3.12162675e-01 2.95421002e-01] -[1.53219435e-02 2.74455213e-02] -domain=2 type=nu-scatter -[3.10120713e-01 2.96264249e-01] -[3.37881037e-02 4.37922226e-02] -domain=2 type=scatter matrix -[[[3.10120713e-01 3.82295876e-02 2.07449405e-02 7.96429620e-03] - [0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00]] - - [[0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00] - [2.96264249e-01 -1.12136353e-02 8.83656566e-03 -3.27006707e-03]]] -[[[3.37881037e-02 8.48399649e-03 4.69561034e-03 3.73162234e-03] - [0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00]] - - [[0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00] - [4.37922226e-02 1.61803653e-02 1.15039636e-02 7.32884528e-03]]] -domain=2 type=nu-scatter matrix -[[[3.10120713e-01 3.82295876e-02 2.07449405e-02 7.96429620e-03] - [0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00]] - - [[0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00] - [2.96264249e-01 -1.12136353e-02 8.83656566e-03 -3.27006707e-03]]] -[[[3.37881037e-02 8.48399649e-03 4.69561034e-03 3.73162234e-03] - [0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00]] - - [[0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00] - [4.37922226e-02 1.61803653e-02 1.15039636e-02 7.32884528e-03]]] -domain=2 type=multiplicity matrix -[[1.00000000e+00 0.00000000e+00] - [0.00000000e+00 1.00000000e+00]] -[[1.08778697e-01 0.00000000e+00] - [0.00000000e+00 1.42427173e-01]] -domain=2 type=nu-fission matrix -[[0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00]] -[[0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00]] -domain=2 type=scatter probability matrix -[[1.00000000e+00 0.00000000e+00] - [0.00000000e+00 1.00000000e+00]] -[[1.08778697e-01 0.00000000e+00] - [0.00000000e+00 1.42427173e-01]] -domain=2 type=consistent scatter matrix -[[[3.12162675e-01 3.84813069e-02 2.08815337e-02 8.01673640e-03] - [0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00]] - - [[0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00] - [2.95421002e-01 -1.11817183e-02 8.81141444e-03 -3.26075959e-03]]] -[[[3.72534020e-02 8.74305414e-03 4.83468236e-03 3.77642683e-03] - [0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00]] - - [[0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00] - [5.02358893e-02 1.61616720e-02 1.14951123e-02 7.31312479e-03]]] -domain=2 type=consistent nu-scatter matrix -[[[3.12162675e-01 3.84813069e-02 2.08815337e-02 8.01673640e-03] - [0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00]] - - [[0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00] - [2.95421002e-01 -1.11817183e-02 8.81141444e-03 -3.26075959e-03]]] -[[[5.04070429e-02 9.69345878e-03 5.34169556e-03 3.87580585e-03] - [0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00]] - - [[0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00] - [6.55288678e-02 1.62399493e-02 1.15634161e-02 7.32785650e-03]]] -domain=2 type=chi -[0.00000000e+00 0.00000000e+00] -[0.00000000e+00 0.00000000e+00] -domain=2 type=chi-prompt -[0.00000000e+00 0.00000000e+00] -[0.00000000e+00 0.00000000e+00] -domain=2 type=inverse-velocity -[5.99597928e-08 2.98549016e-06] -[4.55308451e-09 3.41701982e-07] -domain=2 type=prompt-nu-fission -[0.00000000e+00 0.00000000e+00] -[0.00000000e+00 0.00000000e+00] -domain=2 type=prompt-nu-fission matrix -[[0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00]] -[[0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00]] -domain=2 type=delayed-nu-fission -[[0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00]] -[[0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00]] -domain=2 type=chi-delayed -[[0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00]] -[[0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00]] -domain=2 type=beta -[[0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00]] -[[0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00]] -domain=2 type=decay-rate -[[0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00]] -[[0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00]] -domain=2 type=delayed-nu-fission matrix -[[[0.00000000e+00 0.00000000e+00] [0.00000000e+00 0.00000000e+00]] [[0.00000000e+00 0.00000000e+00] [0.00000000e+00 0.00000000e+00]] [[0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00]] - - [[0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00]] + [1.22628106e-03 0.00000000e+00]] [[0.00000000e+00 0.00000000e+00] [0.00000000e+00 0.00000000e+00]] @@ -377,200 +223,7 @@ domain=2 type=delayed-nu-fission matrix [0.00000000e+00 0.00000000e+00]] [[0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00]] - - [[0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00]] - - [[0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00]]] -domain=3 type=total -[6.64572194e-01 2.05238389e+00] -[3.12147473e-02 2.24342890e-01] -domain=3 type=transport -[2.83322749e-01 1.49973953e+00] -[3.52061127e-02 2.30902118e-01] -domain=3 type=nu-transport -[2.83322749e-01 1.49973953e+00] -[3.52061127e-02 2.30902118e-01] -domain=3 type=absorption -[6.90399488e-04 3.16872537e-02] -[4.41475703e-05 3.74655812e-03] -domain=3 type=capture -[6.90399488e-04 3.16872537e-02] -[4.41475703e-05 3.74655812e-03] -domain=3 type=fission -[0.00000000e+00 0.00000000e+00] -[0.00000000e+00 0.00000000e+00] -domain=3 type=nu-fission -[0.00000000e+00 0.00000000e+00] -[0.00000000e+00 0.00000000e+00] -domain=3 type=kappa-fission -[0.00000000e+00 0.00000000e+00] -[0.00000000e+00 0.00000000e+00] -domain=3 type=scatter -[6.63881795e-01 2.02069663e+00] -[3.11726794e-02 2.20604438e-01] -domain=3 type=nu-scatter -[6.71269157e-01 2.03538818e+00] -[2.61863693e-02 2.58060310e-01] -domain=3 type=scatter matrix -[[[6.39901439e-01 3.81167422e-01 1.52391887e-01 9.14802163e-03] - [3.13677176e-02 8.75772258e-03 -2.56790088e-03 -3.78480261e-03]] - - [[4.43343102e-04 3.99960385e-04 3.19562684e-04 2.13846954e-04] - [2.03494484e+00 5.09940476e-01 1.11174601e-01 2.49884339e-02]]] -[[[2.47091210e-02 1.62432637e-02 8.15627711e-03 3.88856186e-03] - [1.72811278e-03 9.25670435e-04 1.01398468e-03 8.17075512e-04]] - - [[4.44850361e-04 4.01320154e-04 3.20649120e-04 2.14573982e-04] - [2.57799870e-01 5.12359026e-02 1.30198161e-02 8.31235196e-03]]] -domain=3 type=nu-scatter matrix -[[[6.39901439e-01 3.81167422e-01 1.52391887e-01 9.14802163e-03] - [3.13677176e-02 8.75772258e-03 -2.56790088e-03 -3.78480261e-03]] - - [[4.43343102e-04 3.99960385e-04 3.19562684e-04 2.13846954e-04] - [2.03494484e+00 5.09940476e-01 1.11174601e-01 2.49884339e-02]]] -[[[2.47091210e-02 1.62432637e-02 8.15627711e-03 3.88856186e-03] - [1.72811278e-03 9.25670435e-04 1.01398468e-03 8.17075512e-04]] - - [[4.44850361e-04 4.01320154e-04 3.20649120e-04 2.14573982e-04] - [2.57799870e-01 5.12359026e-02 1.30198161e-02 8.31235196e-03]]] -domain=3 type=multiplicity matrix -[[1.00000000e+00 1.00000000e+00] - [1.00000000e+00 1.00000000e+00]] -[[3.86091908e-02 6.76673480e-02] - [1.41421356e+00 1.35929207e-01]] -domain=3 type=nu-fission matrix -[[0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00]] -[[0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00]] -domain=3 type=scatter probability matrix -[[9.53271028e-01 4.67289720e-02] - [2.17817469e-04 9.99782183e-01]] -[[3.60184962e-02 2.54736726e-03] - [2.18820864e-04 1.35884974e-01]] -domain=3 type=consistent scatter matrix -[[[6.32859281e-01 3.76972649e-01 1.50714804e-01 9.04734705e-03] - [3.10225138e-02 8.66134326e-03 -2.53964096e-03 -3.74315061e-03]] - - [[4.40143026e-04 3.97073448e-04 3.17256062e-04 2.12303394e-04] - [2.02025649e+00 5.06259696e-01 1.10372136e-01 2.48080660e-02]]] -[[[3.81421848e-02 2.37145043e-02 1.06635009e-02 3.86848985e-03] - [2.23201039e-03 9.99377011e-04 1.00968851e-03 8.26439590e-04]] - - [[4.44773843e-04 4.01251123e-04 3.20593966e-04 2.14537073e-04] - [3.52193929e-01 7.91402819e-02 1.84875925e-02 8.77085752e-03]]] -domain=3 type=consistent nu-scatter matrix -[[[6.32859281e-01 3.76972649e-01 1.50714804e-01 9.04734705e-03] - [3.10225138e-02 8.66134326e-03 -2.53964096e-03 -3.74315061e-03]] - - [[4.40143026e-04 3.97073448e-04 3.17256062e-04 2.12303394e-04] - [2.02025649e+00 5.06259696e-01 1.10372136e-01 2.48080660e-02]]] -[[[4.52974133e-02 2.78247077e-02 1.21478698e-02 3.88422859e-03] - [3.06407542e-03 1.15855774e-03 1.02420876e-03 8.64382873e-04]] - - [[7.65033031e-04 6.90171798e-04 5.51437493e-04 3.69014387e-04] - [4.46600759e-01 1.04874946e-01 2.38091367e-02 9.39676938e-03]]] -domain=3 type=chi -[0.00000000e+00 0.00000000e+00] -[0.00000000e+00 0.00000000e+00] -domain=3 type=chi-prompt -[0.00000000e+00 0.00000000e+00] -[0.00000000e+00 0.00000000e+00] -domain=3 type=inverse-velocity -[6.02207835e-08 3.04495548e-06] -[3.78043705e-09 3.60007679e-07] -domain=3 type=prompt-nu-fission -[0.00000000e+00 0.00000000e+00] -[0.00000000e+00 0.00000000e+00] -domain=3 type=prompt-nu-fission matrix -[[0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00]] -[[0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00]] -domain=3 type=delayed-nu-fission -[[0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00]] -[[0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00]] -domain=3 type=chi-delayed -[[0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00]] -[[0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00]] -domain=3 type=beta -[[0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00]] -[[0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00]] -domain=3 type=decay-rate -[[0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00]] -[[0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00]] -domain=3 type=delayed-nu-fission matrix -[[[0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00]] - - [[0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00]] - - [[0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00]] - - [[0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00]] - - [[0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00]] - - [[0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00]]] -[[[0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00]] - - [[0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00]] - - [[0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00]] - - [[0.00000000e+00 0.00000000e+00] - [0.00000000e+00 0.00000000e+00]] + [1.22965527e-03 0.00000000e+00]] [[0.00000000e+00 0.00000000e+00] [0.00000000e+00 0.00000000e+00]] diff --git a/tests/regression_tests/mgxs_library_hdf5/test.py b/tests/regression_tests/mgxs_library_hdf5/test.py index 37d30516f..418cdcc83 100644 --- a/tests/regression_tests/mgxs_library_hdf5/test.py +++ b/tests/regression_tests/mgxs_library_hdf5/test.py @@ -23,12 +23,20 @@ class MGXSTestHarness(PyAPITestHarness): self.mgxs_lib.by_nuclide = False # Test all MGXS types - self.mgxs_lib.mgxs_types = openmc.mgxs.MGXS_TYPES[:-1] + \ + self.mgxs_lib.mgxs_types = openmc.mgxs.MGXS_TYPES + \ openmc.mgxs.MDGXS_TYPES self.mgxs_lib.energy_groups = energy_groups self.mgxs_lib.num_delayed_groups = 6 self.mgxs_lib.legendre_order = 3 - self.mgxs_lib.domain_type = 'material' + self.mgxs_lib.domain_type = 'mesh' + + # Instantiate a tally mesh + mesh = openmc.RegularMesh(mesh_id=1) + mesh.dimension = [2, 2] + mesh.lower_left = [-100., -100.] + mesh.width = [100., 100.] + + self.mgxs_lib.domains = [mesh] self.mgxs_lib.build_library() # Add tallies @@ -54,8 +62,8 @@ class MGXSTestHarness(PyAPITestHarness): for domain in self.mgxs_lib.domains: for mgxs_type in self.mgxs_lib.mgxs_types: outstr += 'domain={0} type={1}\n'.format(domain.id, mgxs_type) - avg_key = 'material/{0}/{1}/average'.format(domain.id, mgxs_type) - std_key = 'material/{0}/{1}/std. dev.'.format(domain.id, mgxs_type) + avg_key = 'mesh/{0}/{1}/average'.format(domain.id, mgxs_type) + std_key = 'mesh/{0}/{1}/std. dev.'.format(domain.id, mgxs_type) outstr += '{}\n{}\n'.format(f[avg_key][...], f[std_key][...]) # Hash the results if necessary From 8def35f300e8187a7b56fbbe583d32ea57d687c4 Mon Sep 17 00:00:00 2001 From: Miriam Date: Fri, 7 Aug 2020 20:05:27 +0000 Subject: [PATCH 30/42] Made explicit loop to exclude current from certain mgxs tests Previously used MGXS_TYPES[:-1] but to be explicit, I instead looped over all MGXS_TYPES and excluded current. These tests cannot run with current because: -distribcell is not a valid domain for current -nuclide/no_nuclides option is not relevant for current --- tests/regression_tests/mgxs_library_distribcell/test.py | 8 ++++++-- tests/regression_tests/mgxs_library_no_nuclides/test.py | 8 ++++++-- tests/regression_tests/mgxs_library_nuclides/test.py | 9 +++++++-- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/tests/regression_tests/mgxs_library_distribcell/test.py b/tests/regression_tests/mgxs_library_distribcell/test.py index d6e0a6de0..a4fd63f27 100644 --- a/tests/regression_tests/mgxs_library_distribcell/test.py +++ b/tests/regression_tests/mgxs_library_distribcell/test.py @@ -22,8 +22,12 @@ class MGXSTestHarness(PyAPITestHarness): self.mgxs_lib = openmc.mgxs.Library(self._model.geometry) self.mgxs_lib.by_nuclide = False - # Test all MGXS types - self.mgxs_lib.mgxs_types = openmc.mgxs.MGXS_TYPES[:-1] + \ + # Test all relevant MGXS types + relevant_MGXS_TYPES = [] + for item in openmc.mgxs.MGXS_TYPES: + if item != 'current': + relevant_MGXS_TYPES = relevant_MGXS_TYPES + [item] + self.mgxs_lib.mgxs_types = tuple(relevant_MGXS_TYPES) + \ openmc.mgxs.MDGXS_TYPES self.mgxs_lib.energy_groups = energy_groups self.mgxs_lib.num_delayed_groups = 6 diff --git a/tests/regression_tests/mgxs_library_no_nuclides/test.py b/tests/regression_tests/mgxs_library_no_nuclides/test.py index 65b24d78f..d06c5954c 100644 --- a/tests/regression_tests/mgxs_library_no_nuclides/test.py +++ b/tests/regression_tests/mgxs_library_no_nuclides/test.py @@ -19,8 +19,12 @@ class MGXSTestHarness(PyAPITestHarness): self.mgxs_lib = openmc.mgxs.Library(self._model.geometry) self.mgxs_lib.by_nuclide = False - # Test all MGXS types - self.mgxs_lib.mgxs_types = openmc.mgxs.MGXS_TYPES[:-1] + \ + # Test all relevant MGXS types + relevant_MGXS_TYPES = [] + for item in openmc.mgxs.MGXS_TYPES: + if item != 'current': + relevant_MGXS_TYPES = relevant_MGXS_TYPES + [item] + self.mgxs_lib.mgxs_types = tuple(relevant_MGXS_TYPES) + \ openmc.mgxs.MDGXS_TYPES self.mgxs_lib.energy_groups = energy_groups self.mgxs_lib.num_delayed_groups = 6 diff --git a/tests/regression_tests/mgxs_library_nuclides/test.py b/tests/regression_tests/mgxs_library_nuclides/test.py index 521373eb7..a08cb826d 100644 --- a/tests/regression_tests/mgxs_library_nuclides/test.py +++ b/tests/regression_tests/mgxs_library_nuclides/test.py @@ -17,8 +17,13 @@ class MGXSTestHarness(PyAPITestHarness): # Initialize MGXS Library for a few cross section types self.mgxs_lib = openmc.mgxs.Library(self._model.geometry) self.mgxs_lib.by_nuclide = True - # Test all MGXS types - self.mgxs_lib.mgxs_types = openmc.mgxs.MGXS_TYPES[:-1] + + # Test relevant all MGXS types + relevant_MGXS_TYPES = [] + for item in openmc.mgxs.MGXS_TYPES: + if item != 'current': + relevant_MGXS_TYPES = relevant_MGXS_TYPES + [item] + self.mgxs_lib.mgxs_types = tuple(relevant_MGXS_TYPES) self.mgxs_lib.energy_groups = energy_groups self.mgxs_lib.legendre_order = 3 self.mgxs_lib.domain_type = 'material' From b83558e631d997e0ef0fddae1dec37753230c630 Mon Sep 17 00:00:00 2001 From: "Miriam (Rathbun) Kreher" Date: Sat, 15 Aug 2020 22:25:19 -0600 Subject: [PATCH 31/42] Update test mgxs_library_nuclides Co-authored-by: Paul Romano --- tests/regression_tests/mgxs_library_nuclides/test.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/regression_tests/mgxs_library_nuclides/test.py b/tests/regression_tests/mgxs_library_nuclides/test.py index a08cb826d..87a65723c 100644 --- a/tests/regression_tests/mgxs_library_nuclides/test.py +++ b/tests/regression_tests/mgxs_library_nuclides/test.py @@ -19,10 +19,8 @@ class MGXSTestHarness(PyAPITestHarness): self.mgxs_lib.by_nuclide = True # Test relevant all MGXS types - relevant_MGXS_TYPES = [] - for item in openmc.mgxs.MGXS_TYPES: - if item != 'current': - relevant_MGXS_TYPES = relevant_MGXS_TYPES + [item] + relevant_MGXS_TYPES = [item for item in openmc.mgxs.MGXS_TYPES + if item != 'current'] self.mgxs_lib.mgxs_types = tuple(relevant_MGXS_TYPES) self.mgxs_lib.energy_groups = energy_groups self.mgxs_lib.legendre_order = 3 From a71056548a602364890db4c878efba7cbcb51b5f Mon Sep 17 00:00:00 2001 From: "Miriam (Rathbun) Kreher" Date: Sat, 15 Aug 2020 22:25:43 -0600 Subject: [PATCH 32/42] Update test mgxs_library_no_nuclides Co-authored-by: Paul Romano --- tests/regression_tests/mgxs_library_no_nuclides/test.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/regression_tests/mgxs_library_no_nuclides/test.py b/tests/regression_tests/mgxs_library_no_nuclides/test.py index d06c5954c..f005c095e 100644 --- a/tests/regression_tests/mgxs_library_no_nuclides/test.py +++ b/tests/regression_tests/mgxs_library_no_nuclides/test.py @@ -20,10 +20,8 @@ class MGXSTestHarness(PyAPITestHarness): self.mgxs_lib.by_nuclide = False # Test all relevant MGXS types - relevant_MGXS_TYPES = [] - for item in openmc.mgxs.MGXS_TYPES: - if item != 'current': - relevant_MGXS_TYPES = relevant_MGXS_TYPES + [item] + relevant_MGXS_TYPES = [item for item in openmc.mgxs.MGXS_TYPES + if item != 'current'] self.mgxs_lib.mgxs_types = tuple(relevant_MGXS_TYPES) + \ openmc.mgxs.MDGXS_TYPES self.mgxs_lib.energy_groups = energy_groups From 77f88db72ea1ae6998fbcfc0a2fcbb3073e17130 Mon Sep 17 00:00:00 2001 From: "Miriam (Rathbun) Kreher" Date: Sat, 15 Aug 2020 22:26:09 -0600 Subject: [PATCH 33/42] Update test mgxs_library_distribcell/ Co-authored-by: Paul Romano --- tests/regression_tests/mgxs_library_distribcell/test.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/regression_tests/mgxs_library_distribcell/test.py b/tests/regression_tests/mgxs_library_distribcell/test.py index a4fd63f27..3b601161a 100644 --- a/tests/regression_tests/mgxs_library_distribcell/test.py +++ b/tests/regression_tests/mgxs_library_distribcell/test.py @@ -23,10 +23,8 @@ class MGXSTestHarness(PyAPITestHarness): self.mgxs_lib.by_nuclide = False # Test all relevant MGXS types - relevant_MGXS_TYPES = [] - for item in openmc.mgxs.MGXS_TYPES: - if item != 'current': - relevant_MGXS_TYPES = relevant_MGXS_TYPES + [item] + relevant_MGXS_TYPES = [item for item in openmc.mgxs.MGXS_TYPES + if item != 'current'] self.mgxs_lib.mgxs_types = tuple(relevant_MGXS_TYPES) + \ openmc.mgxs.MDGXS_TYPES self.mgxs_lib.energy_groups = energy_groups From f9072d1e96dfadee63a97f5fa9a5b8d3980851d6 Mon Sep 17 00:00:00 2001 From: "Miriam (Rathbun) Kreher" Date: Sat, 15 Aug 2020 22:28:44 -0600 Subject: [PATCH 34/42] Update openmc/mgxs/mgxs.py Co-authored-by: Paul Romano --- openmc/mgxs/mgxs.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/openmc/mgxs/mgxs.py b/openmc/mgxs/mgxs.py index 1552067e7..d3d39605a 100644 --- a/openmc/mgxs/mgxs.py +++ b/openmc/mgxs/mgxs.py @@ -6260,6 +6260,7 @@ class MeshSurfaceMGXS(MGXS): class Current(MeshSurfaceMGXS): r"""A current multi-group cross section. + This class can be used for both OpenMC input generation and tally data post-processing to compute surface- and energy-integrated multi-group current cross sections for multi-group neutronics calculations. At @@ -6268,12 +6269,14 @@ class Current(MeshSurfaceMGXS): reaction rates over the specified domain are generated automatically via the :attr:`Current.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:`Current.xs_tally` property. For a spatial domain :math:`S` and energy group :math:`[E_g,E_{g-1}]`, the total cross section is calculated as: + .. math:: \frac{\int_{r \in S} dS \int_{E_g}^{E_{g-1}} dE \; J(r, E)}{\int_{r \in S} dS \int_{E_g}^{E_{g-1}} dE}. From 7ad63241d794a205a3bc932d28b3ffb6b5ccd1cc Mon Sep 17 00:00:00 2001 From: "Miriam (Rathbun) Kreher" Date: Sat, 15 Aug 2020 22:29:05 -0600 Subject: [PATCH 35/42] Update openmc/mgxs/mgxs.py Co-authored-by: Paul Romano --- openmc/mgxs/mgxs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openmc/mgxs/mgxs.py b/openmc/mgxs/mgxs.py index d3d39605a..e74c2ab42 100644 --- a/openmc/mgxs/mgxs.py +++ b/openmc/mgxs/mgxs.py @@ -5917,7 +5917,7 @@ class MeshSurfaceMGXS(MGXS): energy_groups : openmc.mgxs.EnergyGroups The energy group structure for energy condensation by_nuclide : bool - Unused in MeshSurfacMGXS + Unused in MeshSurfaceMGXS name : str, optional Name of the multi-group cross section. Used as a label to identify tallies in OpenMC 'tallies.xml' file. From 160f5f07e3401e59e0dff39510680543e7a58497 Mon Sep 17 00:00:00 2001 From: "Miriam (Rathbun) Kreher" Date: Sat, 15 Aug 2020 22:29:34 -0600 Subject: [PATCH 36/42] Update openmc/mgxs/mgxs.py Co-authored-by: Paul Romano --- openmc/mgxs/mgxs.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/openmc/mgxs/mgxs.py b/openmc/mgxs/mgxs.py index e74c2ab42..9d02a2195 100644 --- a/openmc/mgxs/mgxs.py +++ b/openmc/mgxs/mgxs.py @@ -6035,9 +6035,13 @@ class MeshSurfaceMGXS(MGXS): def load_from_statepoint(self, statepoint): """Extracts tallies in an OpenMC StatePoint with the data needed to compute multi-group cross sections. + This method is needed to compute cross section data from tallies in an OpenMC StatePoint object. - NOTE: The statepoint must first be linked with an OpenMC Summary object. + + .. note:: The statepoint must first be linked with a :class:`openmc.Summary` + object. + Parameters ---------- statepoint : openmc.StatePoint From 9d28cc9b8e24d08e5c6bc042cb8021a8411643dd Mon Sep 17 00:00:00 2001 From: "Miriam (Rathbun) Kreher" Date: Sat, 15 Aug 2020 22:31:02 -0600 Subject: [PATCH 37/42] Update openmc/mgxs/mgxs.py Co-authored-by: Paul Romano --- openmc/mgxs/mgxs.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openmc/mgxs/mgxs.py b/openmc/mgxs/mgxs.py index 9d02a2195..cbda0c94d 100644 --- a/openmc/mgxs/mgxs.py +++ b/openmc/mgxs/mgxs.py @@ -6087,10 +6087,12 @@ class MeshSurfaceMGXS(MGXS): xs_type='macro', order_groups='increasing', value='mean', squeeze=True, **kwargs): r"""Returns an array of multi-group cross sections. + This method constructs a 3D NumPy array for the requested multi-group cross section data for one or more subdomains (1st dimension), energy groups (2nd dimension), and nuclides (3rd dimension). + Parameters ---------- groups : Iterable of Integral or 'all' From 4c0b6282f65c025c95c76d2ceb9c2ac037db697f Mon Sep 17 00:00:00 2001 From: "Miriam (Rathbun) Kreher" Date: Sat, 15 Aug 2020 22:31:23 -0600 Subject: [PATCH 38/42] Update openmc/mgxs/mgxs.py Co-authored-by: Paul Romano --- openmc/mgxs/mgxs.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/openmc/mgxs/mgxs.py b/openmc/mgxs/mgxs.py index cbda0c94d..62b9d11d3 100644 --- a/openmc/mgxs/mgxs.py +++ b/openmc/mgxs/mgxs.py @@ -5903,10 +5903,12 @@ class InverseVelocity(MGXS): class MeshSurfaceMGXS(MGXS): """An abstract multi-group cross section for some energy group structure on the surfaces of a mesh domain. + This class can be used for both OpenMC input generation and tally data post-processing to compute surface- and energy-integrated multi-group cross sections for multi-group neutronics calculations. - NOTE: Users should instantiate the subclasses of this abstract class. + + .. note:: Users should instantiate the subclasses of this abstract class. Parameters ---------- From 5665b4a90bd22e1f7715a2b1130fb951e604ed09 Mon Sep 17 00:00:00 2001 From: "Miriam (Rathbun) Kreher" Date: Sat, 15 Aug 2020 22:32:35 -0600 Subject: [PATCH 39/42] Update openmc/mgxs/mgxs.py Co-authored-by: Paul Romano --- openmc/mgxs/mgxs.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openmc/mgxs/mgxs.py b/openmc/mgxs/mgxs.py index 62b9d11d3..abeec20eb 100644 --- a/openmc/mgxs/mgxs.py +++ b/openmc/mgxs/mgxs.py @@ -6200,8 +6200,10 @@ class MeshSurfaceMGXS(MGXS): def get_pandas_dataframe(self, groups='all', nuclides='all', xs_type='macro', paths=True): """Build a Pandas DataFrame for the MGXS data. + This method leverages :meth:`openmc.Tally.get_pandas_dataframe`, but renames the columns with terminology appropriate for cross section data. + Parameters ---------- groups : Iterable of Integral or 'all' From eaa266e6d766b6a572d08de6965cf20952ed2899 Mon Sep 17 00:00:00 2001 From: "Miriam (Rathbun) Kreher" Date: Sat, 15 Aug 2020 22:33:18 -0600 Subject: [PATCH 40/42] Update openmc/mgxs/mgxs.py Co-authored-by: Paul Romano --- openmc/mgxs/mgxs.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openmc/mgxs/mgxs.py b/openmc/mgxs/mgxs.py index abeec20eb..04bebe7e4 100644 --- a/openmc/mgxs/mgxs.py +++ b/openmc/mgxs/mgxs.py @@ -6217,10 +6217,12 @@ class MeshSurfaceMGXS(MGXS): The geometric information in the Summary object is embedded into a Multi-index column with a geometric "path" to each distribcell instance. + Returns ------- pandas.DataFrame A Pandas DataFrame for the cross section data. + Raises ------ ValueError From 8f3dc3b8c223717ca434cb7b2d455b2a5c0d52f6 Mon Sep 17 00:00:00 2001 From: Miriam Date: Mon, 17 Aug 2020 16:25:32 +0000 Subject: [PATCH 41/42] Updated mgxs and tests Doc string updates to exclusively list openmc.RegularMesh as a domain type. I removed an if-statement related to domain == mesh, since mesh is the only allowable domain. Other minor edits. --- openmc/mgxs/mgxs.py | 17 +++++++---------- .../regression_tests/mgxs_library_hdf5/test.py | 4 ++-- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/openmc/mgxs/mgxs.py b/openmc/mgxs/mgxs.py index 04bebe7e4..3951f6d78 100644 --- a/openmc/mgxs/mgxs.py +++ b/openmc/mgxs/mgxs.py @@ -6237,10 +6237,7 @@ class MeshSurfaceMGXS(MGXS): df = self.xs_tally.get_pandas_dataframe(paths=paths) # Remove the score column since it is homogeneous and redundant - if self.domain_type == 'mesh': - df = df.drop('score', axis=1, level=0) - else: - df = df.drop('score', axis=1) + df = df.drop('score', axis=1, level=0) # Convert azimuthal, polar, energy in and energy out bin values in to # bin indices @@ -6254,9 +6251,9 @@ class MeshSurfaceMGXS(MGXS): df = df[df['group out'].isin(groups)] mesh_str = 'mesh {0}'.format(self.domain.id) - surfaces = df[(mesh_str, 'surf')] - df.drop(columns=[(mesh_str,'surf')],inplace=True) - df.insert(len(self.domain.dimension),(mesh_str,'surf'),surfaces) + col_key = (mesh_str, 'surf') + surfaces = df.pop(col_key) + df.insert(len(self.domain.dimension), col_key, surfaces) if len(self.domain.dimension) == 1: df.sort_values(by=[(mesh_str, 'x'), (mesh_str, 'surf')] + columns, inplace=True) @@ -6295,9 +6292,9 @@ class Current(MeshSurfaceMGXS): Parameters ---------- - domain : openmc.Material or openmc.Cell or openmc.Universe or openmc.RegularMesh + domain : openmc.RegularMesh The domain for spatial homogenization - domain_type : {'material', 'cell', 'distribcell', 'universe', 'mesh'} + domain_type : ('mesh'} The domain type for spatial homogenization groups : openmc.mgxs.EnergyGroups The energy group structure for energy condensation @@ -6315,7 +6312,7 @@ class Current(MeshSurfaceMGXS): Reaction type (e.g., 'total', 'nu-fission', etc.) by_nuclide : bool Unused in MeshSurfaceMGXS - domain : Mesh + domain : openmc.RegularMesh Domain for spatial homogenization domain_type : {'mesh'} Domain type for spatial homogenization diff --git a/tests/regression_tests/mgxs_library_hdf5/test.py b/tests/regression_tests/mgxs_library_hdf5/test.py index 418cdcc83..2f3c9d149 100644 --- a/tests/regression_tests/mgxs_library_hdf5/test.py +++ b/tests/regression_tests/mgxs_library_hdf5/test.py @@ -62,8 +62,8 @@ class MGXSTestHarness(PyAPITestHarness): for domain in self.mgxs_lib.domains: for mgxs_type in self.mgxs_lib.mgxs_types: outstr += 'domain={0} type={1}\n'.format(domain.id, mgxs_type) - avg_key = 'mesh/{0}/{1}/average'.format(domain.id, mgxs_type) - std_key = 'mesh/{0}/{1}/std. dev.'.format(domain.id, mgxs_type) + avg_key = 'mesh/{}/{}/average'.format(domain.id, mgxs_type) + std_key = 'mesh/{}/{}/std. dev.'.format(domain.id, mgxs_type) outstr += '{}\n{}\n'.format(f[avg_key][...], f[std_key][...]) # Hash the results if necessary From 739af93a9afa1766b10a9fa87cabf7640b9e8604 Mon Sep 17 00:00:00 2001 From: Miriam Date: Fri, 21 Aug 2020 15:48:07 +0000 Subject: [PATCH 42/42] Modified doc strings related to 'nuclides' in get_xs and get_pandas_dataframe --- openmc/mgxs/mgxs.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/openmc/mgxs/mgxs.py b/openmc/mgxs/mgxs.py index 3951f6d78..c336cb50d 100644 --- a/openmc/mgxs/mgxs.py +++ b/openmc/mgxs/mgxs.py @@ -6102,7 +6102,8 @@ class MeshSurfaceMGXS(MGXS): subdomains : Iterable of Integral or 'all' Subdomain IDs of interest. Defaults to 'all'. nuclides : Iterable of str or 'all' or 'sum' - Unused in MeshSurfaceMGXS + Unused in MeshSurfaceMGXS, its value will be ignored. The nuclides + dimension of the resultant array will always have a length of 1. xs_type: {'macro'} The 'macro'/'micro' distinction does not apply to MeshSurfaceMGXS. The calculation of a 'micro' xs_type is omited in this class. @@ -6209,7 +6210,8 @@ class MeshSurfaceMGXS(MGXS): groups : Iterable of Integral or 'all' Energy groups of interest. Defaults to 'all'. nuclides : Iterable of str or 'all' or 'sum' - Unused in MeshSurfaceMGXS + Unused in MeshSurfaceMGXS, its value will be ignored. The nuclides + dimension of the resultant array will always have a length of 1. xs_type: {'macro'} 'micro' unused in MeshSurfaceMGXS. paths : bool, optional