diff --git a/openmc/mgxs/mgxs.py b/openmc/mgxs/mgxs.py index 4b08cfb8fa..68cbbbe8fd 100644 --- a/openmc/mgxs/mgxs.py +++ b/openmc/mgxs/mgxs.py @@ -33,7 +33,6 @@ MGXS_TYPES = ['total', 'multiplicity matrix', 'nu-fission matrix', 'scatter probability matrix', - 'nu-scatter probability matrix', 'consistent scatter matrix', 'consistent nu-scatter matrix', 'chi', @@ -737,9 +736,6 @@ class MGXS(object): mgxs = MultiplicityMatrixXS(domain, domain_type, energy_groups) elif mgxs_type == 'scatter probability matrix': mgxs = ScatterProbabilityMatrix(domain, domain_type, energy_groups) - elif mgxs_type == 'nu-scatter probability matrix': - mgxs = ScatterProbabilityMatrix( - domain, domain_type, energy_groups, nu=True) elif mgxs_type == 'consistent scatter matrix': mgxs = ScatterMatrixXS(domain, domain_type, energy_groups) mgxs.formulation = 'consistent' @@ -3559,7 +3555,7 @@ class ScatterMatrixXS(MatrixMGXS): group-to-group scattering probabilities. Unlike the default 'simple' formulation, the 'consistent' formulation - is computed from the groupwise cattering cross section which uses a + is computed from the groupwise scattering cross section which uses a tracklength estimator. This ensures that reaction rate balance is exactly preserved with a :class:`TotalXS` computed using a tracklength estimator. @@ -4800,21 +4796,17 @@ class ScatterProbabilityMatrix(MatrixMGXS): .. math:: - \langle \sigma_{s,\ell,g'\rightarrow g} \phi \rangle &= \int_{r \in V} dr + \langle \sigma_{s,g'\rightarrow g} \phi \rangle &= \int_{r \in V} dr \int_{4\pi} d\Omega' \int_{E_{g'}}^{E_{g'-1}} dE' \int_{4\pi} d\Omega - \int_{E_g}^{E_{g-1}} dE \; P_\ell (\Omega \cdot \Omega') - \sigma_{s} (r, E' \rightarrow E, \Omega' \cdot \Omega) \psi(r, E', - \Omega')\\ + \int_{E_g}^{E_{g-1}} dE \; \sigma_{s} (r, E' \rightarrow E, \Omega' + \cdot \Omega) \psi(r, E', \Omega')\\ \langle \sigma_{s,0,g'} \phi \rangle &= \int_{r \in V} dr \int_{4\pi} d\Omega' \int_{E_{g'}}^{E_{g'-1}} dE' \int_{4\pi} d\Omega \int_{0}^{\infty} dE \; \sigma_s (r, E' \rightarrow E, \Omega' \cdot \Omega) \psi(r, E', \Omega')\\ - P_{s,\ell,g'\rightarrow g} &= \frac{\langle - \sigma_{s,\ell,g'\rightarrow g} \phi \rangle}{\langle - \sigma_{s,0,g'} \phi \rangle} - - To incorporate the effect of neutron multiplication from (n,xn) reactions - in the above probability matrix, the `nu` parameter can be set to `True`. + P_{s,g'\rightarrow g} &= \frac{\langle + \sigma_{s,g'\rightarrow g} \phi \rangle}{\langle + \sigma_{s,g'} \phi \rangle} Parameters ---------- @@ -4835,30 +4827,13 @@ class ScatterProbabilityMatrix(MatrixMGXS): num_azimuthal : Integral, optional Number of equi-width azimuthal angle bins for angle discretization; defaults to one bin - nu : bool - If True, the cross section data will include neutron multiplication; - defaults to False Attributes ---------- - scatter_format : {'legendre', or 'histogram'} - Representation of the angular scattering distribution (default is - 'legendre') - legendre_order : int - The highest Legendre moment in the scattering matrix; this is used if - :attr:`ScatterProbabilityMatrix.scatter_format` is 'legendre'. - (default is 0) - histogram_bins : int - The number of equally-spaced bins for the histogram representation of - the angular scattering distribution; this is used if - :attr:`ScatterProbabilityMatrix.scatter_format` is 'histogram'. - (default is 16) name : str, optional Name of the multi-group cross section rxn_type : str Reaction type (e.g., 'total', 'nu-fission', etc.) - nu : bool - If True, the cross section data will include neutron multiplication by_nuclide : bool If true, computes cross sections for each nuclide in domain domain : Material or Cell or Universe or Mesh @@ -4920,65 +4895,18 @@ class ScatterProbabilityMatrix(MatrixMGXS): """ def __init__(self, domain=None, domain_type=None, groups=None, - by_nuclide=False, name='', num_polar=1, - num_azimuthal=1, nu=False): + by_nuclide=False, name='', num_polar=1, num_azimuthal=1): super(ScatterProbabilityMatrix, self).__init__( domain, domain_type, groups, by_nuclide, name, num_polar, num_azimuthal) - self._scatter_format = 'legendre' - self._legendre_order = 0 - self._histogram_bins = 16 + self._rxn_type = 'scatter' self._estimator = 'analog' self._valid_estimators = ['analog'] - self.nu = nu - - def __deepcopy__(self, memo): - clone = super(ScatterProbabilityMatrix, self).__deepcopy__(memo) - clone._scatter_format = self.scatter_format - clone._legendre_order = self.legendre_order - clone._histogram_bins = self.histogram_bins - clone._nu = self.nu - return clone - - @property - def _dont_squeeze(self): - """Create a tuple of axes which should not be removed during the get_xs - process - """ - if self.num_polar > 1 or self.num_azimuthal > 1: - if self.scatter_format == 'histogram': - return (0, 1, 3, 4, 5) - else: - return (0, 1, 3, 4) - else: - if self.scatter_format == 'histogram': - return (1, 2, 3) - else: - return (1, 2) - - @property - def scatter_format(self): - return self._scatter_format - - @property - def legendre_order(self): - return self._legendre_order - - @property - def histogram_bins(self): - return self._histogram_bins - - @property - def nu(self): - return self._nu @property def scores(self): - if self.scatter_format == 'legendre': - return ['{}-P{}'.format(self.rxn_type, self.legendre_order)] - elif self.scatter_format == 'histogram': - return [self.rxn_type] + return [self.rxn_type] @property def filters(self): @@ -4991,17 +4919,9 @@ class ScatterProbabilityMatrix(MatrixMGXS): @property def rxn_rate_tally(self): - if self._rxn_rate_tally is None: - if self.scatter_format == 'legendre': - tally_key = '{}-P{}'.format(self.rxn_type, - self.legendre_order) - self._rxn_rate_tally = self.tallies[tally_key] - elif self.scatter_format == 'histogram': - self._rxn_rate_tally = self.tallies[self.rxn_type] - + self._rxn_rate_tally = self.tallies[self.rxn_type] self._rxn_rate_tally.sparse = self.sparse - return self._rxn_rate_tally @property @@ -5010,8 +4930,7 @@ class ScatterProbabilityMatrix(MatrixMGXS): if self._xs_tally is None: energyout_bins = [self.energy_groups.get_group_bounds(i) for i in range(self.num_groups, 0, -1)] - norm = self.rxn_rate_tally.get_slice( - scores=['{}-0'.format(self.rxn_type)]) + norm = self.rxn_rate_tally.get_slice(scores=[self.rxn_type]) norm = norm.summation( filter_type=openmc.EnergyoutFilter, filter_bins=energyout_bins) @@ -5019,595 +4938,11 @@ class ScatterProbabilityMatrix(MatrixMGXS): norm._filters = norm._filters[:2] # Compute the group-to-group probabilities - tally_key = '{}-P{}'.format(self.rxn_type, self.legendre_order) - self._xs_tally = self.tallies[tally_key] / norm + self._xs_tally = self.tallies[self.rxn_type] / norm super(ScatterProbabilityMatrix, self)._compute_xs() return self._xs_tally - @scatter_format.setter - def scatter_format(self, scatter_format): - cv.check_value('scatter_format', scatter_format, MU_TREATMENTS) - self._scatter_format = scatter_format - - @legendre_order.setter - def legendre_order(self, legendre_order): - cv.check_type('legendre_order', legendre_order, Integral) - cv.check_greater_than('legendre_order', legendre_order, 0, - equality=True) - cv.check_less_than('legendre_order', legendre_order, _MAX_LEGENDRE, - equality=True) - - if self.scatter_format == 'histogram': - msg = 'The legendre order will be ignored since the ' \ - 'scatter format is set to histogram' - warnings.warn(msg) - - self._legendre_order = legendre_order - - @histogram_bins.setter - def histogram_bins(self, histogram_bins): - cv.check_type('histogram_bins', histogram_bins, Integral) - cv.check_greater_than('histogram_bins', histogram_bins, 0) - self._histogram_bins = histogram_bins - - @nu.setter - def nu(self, nu): - cv.check_type('nu', nu, bool) - self._nu = nu - if not nu: - self._rxn_type = 'scatter' - self._hdf5_key = 'scatter probability matrix' - else: - self._rxn_type = 'nu-scatter' - self._hdf5_key = 'nu-scatter probability matrix' - - 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 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. - - """ - - # 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 - - if self.scatter_format == 'legendre': - # Expand scores to match the format in the statepoint - # e.g., "scatter-P2" -> "scatter-0", "scatter-1", "scatter-2" - tally_key = '{}-P{}'.format(self.rxn_type, self.legendre_order) - self.tallies[tally_key].scores = \ - [self.rxn_type + '-{}'.format(i) - for i in range(self.legendre_order + 1)] - elif self.scatter_format == 'histogram': - self.tallies[self.rxn_type].scores = [self.rxn_type] - - super(ScatterProbabilityMatrix, self).load_from_statepoint(statepoint) - - def get_slice(self, nuclides=[], in_groups=[], out_groups=[], - legendre_order='same'): - """Build a sliced ScatterProbabilityMatrix for the specified nuclides - and energy groups. - - This method constructs a new MGXS to encapsulate a subset of the data - represented by this MGXS. The subset of data to include in the tally - slice is determined by the nuclides and energy groups specified in - the input parameters. - - Parameters - ---------- - nuclides : list of str - A list of nuclide name strings - (e.g., ['U235', 'U238']; default is []) - in_groups : list of int - A list of incoming energy group indices starting at 1 for the high - energies (e.g., [1, 2, 3]; default is []) - out_groups : list of int - A list of outgoing energy group indices starting at 1 for the high - energies (e.g., [1, 2, 3]; default is []) - legendre_order : int or 'same' - The highest Legendre moment in the sliced MGXS. If order is 'same' - then the sliced MGXS will have the same Legendre moments as the - original MGXS (default). If order is an integer less than the - original MGXS' order, then only those Legendre moments up to that - order will be included in the sliced MGXS. - - Returns - ------- - openmc.mgxs.MatrixMGXS - A new MatrixMGXS which encapsulates the subset of data requested - for the nuclide(s) and/or energy group(s) requested in the - parameters. - - """ - - # Call super class method and null out derived tallies - slice_xs = \ - super(ScatterProbabilityMatrix, self).get_slice(nuclides, in_groups) - slice_xs._rxn_rate_tally = None - slice_xs._xs_tally = None - - # Slice the Legendre order if needed - if legendre_order != 'same' and self.scatter_format == 'legendre': - cv.check_type('legendre_order', legendre_order, Integral) - cv.check_less_than('legendre_order', legendre_order, - self.legendre_order, equality=True) - slice_xs.legendre_order = legendre_order - - # Slice the scattering tally - tally_key = '{}-P{}'.format(self.rxn_type, self.legendre_order) - expand_scores = \ - [self.rxn_type + '-{}'.format(i) - for i in range(self.legendre_order + 1)] - slice_xs.tallies[tally_key] = \ - slice_xs.tallies[tally_key].get_slice(scores=expand_scores) - - # Slice outgoing energy groups if needed - if len(out_groups) != 0: - filter_bins = [] - for group in out_groups: - group_bounds = self.energy_groups.get_group_bounds(group) - filter_bins.append(group_bounds) - filter_bins = [tuple(filter_bins)] - - # Slice each of the tallies across energyout groups - for tally_type, tally in slice_xs.tallies.items(): - if tally.contains_filter(openmc.EnergyoutFilter): - tally_slice = tally.get_slice( - filters=[openmc.EnergyoutFilter], filter_bins=filter_bins) - slice_xs.tallies[tally_type] = tally_slice - - slice_xs.sparse = self.sparse - return slice_xs - - def get_xs(self, in_groups='all', out_groups='all', - subdomains='all', nuclides='all', moment='all', - xs_type='macro', order_groups='increasing', - row_column='inout', value='mean', squeeze=True): - r"""Returns an array of multi-group cross sections. - - This method constructs a 5D NumPy array for the requested - multi-group cross section data for one or more subdomains - (1st dimension), energy groups in (2nd dimension), energy groups out - (3rd dimension), nuclides (4th dimension), and moments/histograms - (5th dimension). - - Parameters - ---------- - in_groups : Iterable of Integral or 'all' - Incoming energy groups of interest. Defaults to 'all'. - out_groups : Iterable of Integral or 'all' - Outgoing 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'. - moment : int or 'all' - The scattering matrix moment to return. All moments will be - returned if the moment is 'all' (default); otherwise, a specific - moment will be returned. - 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'. - row_column: {'inout', 'outin'} - Return the cross section indexed first by incoming group and - second by outgoing group ('inout'), or vice versa ('outin'). - Defaults to 'inout'. - 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 and subdomain 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(in_groups, string_types): - cv.check_iterable_type('groups', in_groups, Integral) - filters.append(openmc.EnergyFilter) - energy_bins = [] - for group in in_groups: - energy_bins.append( - (self.energy_groups.get_group_bounds(group),)) - filter_bins.append(tuple(energy_bins)) - - # Construct list of energy group bounds tuples for all requested groups - if not isinstance(out_groups, string_types): - cv.check_iterable_type('groups', out_groups, Integral) - for group in out_groups: - filters.append(openmc.EnergyoutFilter) - filter_bins.append((self.energy_groups.get_group_bounds(group),)) - - # Construct CrossScore for requested scattering moment - if moment != 'all' and self.scatter_format == 'legendre': - cv.check_type('moment', moment, Integral) - cv.check_greater_than('moment', moment, 0, equality=True) - cv.check_less_than( - 'moment', moment, self.legendre_order, equality=True) - scores = [self.xs_tally.scores[moment]] - else: - scores = [] - - # 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'] - - # Use tally summation if user requested the sum for all nuclides - if nuclides == 'sum' or nuclides == ['sum']: - xs_tally = self.xs_tally.summation(nuclides=query_nuclides) - xs = xs_tally.get_values(scores=scores, filters=filters, - filter_bins=filter_bins, value=value) - else: - xs = self.xs_tally.get_values(scores=scores, filters=filters, - filter_bins=filter_bins, - nuclides=query_nuclides, value=value) - - # Divide by atom number densities for microscopic cross sections - if xs_type == 'micro': - 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] - - # Convert and nans to zero - xs = np.nan_to_num(xs) - - if in_groups == 'all': - num_in_groups = self.num_groups - else: - num_in_groups = len(in_groups) - - if out_groups == 'all': - num_out_groups = self.num_groups - else: - num_out_groups = len(out_groups) - - if self.scatter_format == 'histogram': - num_mu_bins = self.histogram_bins - else: - num_mu_bins = 1 - - # Reshape tally data array with separate axes for domain and energy - # Accomodate the polar and azimuthal bins if needed - num_subdomains = int(xs.shape[0] / (num_mu_bins * num_in_groups * - num_out_groups * self.num_polar * - self.num_azimuthal)) - if self.num_polar > 1 or self.num_azimuthal > 1: - if self.scatter_format == 'histogram': - new_shape = (self.num_polar, self.num_azimuthal, - num_subdomains, num_in_groups, num_out_groups, - num_mu_bins) - else: - new_shape = (self.num_polar, self.num_azimuthal, - num_subdomains, num_in_groups, num_out_groups) - new_shape += xs.shape[1:] - xs = np.reshape(xs, new_shape) - - # Transpose the scattering matrix if requested by user - if row_column == 'outin': - xs = np.swapaxes(xs, 3, 4) - - # 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, ::-1, ...] - else: - if self.scatter_format == 'histogram': - new_shape = (num_subdomains, num_in_groups, num_out_groups, - num_mu_bins) - else: - new_shape = (num_subdomains, num_in_groups, num_out_groups) - new_shape += xs.shape[1:] - xs = np.reshape(xs, new_shape) - - # Transpose the scattering matrix if requested by user - if row_column == 'outin': - xs = np.swapaxes(xs, 1, 2) - - # 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, ::-1, ...] - - if squeeze: - # We want to squeeze out everything but the angles, in_groups, - # out_groups, and, if needed, num_mu_bins dimension. These must - # not be squeezed so 1-group, 1-angle problems have the correct - # shape. - xs = self._squeeze_xs(xs) - return xs - - def get_pandas_dataframe(self, groups='all', nuclides='all', moment='all', - xs_type='macro', distribcell_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'. - moment : int or 'all' - The scattering matrix moment to return. All moments will be - returned if the moment is 'all' (default); otherwise, a specific - moment will be returned. - xs_type: {'macro', 'micro'} - Return macro or micro cross section in units of cm^-1 or barns. - Defaults to 'macro'. - distribcell_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. - - """ - - df = super(ScatterProbabilityMatrix, self).get_pandas_dataframe( - groups, nuclides, xs_type, distribcell_paths) - - if self.scatter_format == 'legendre': - # Add a moment column to dataframe - if self.legendre_order > 0: - # Insert a column corresponding to the Legendre moments - moments = ['P{}'.format(i) - for i in range(self.legendre_order + 1)] - moments = np.tile(moments, int(df.shape[0] / len(moments))) - df['moment'] = moments - - # Place the moment column before the mean column - columns = df.columns.tolist() - mean_index \ - = [i for i, s in enumerate(columns) if 'mean' in s][0] - if self.domain_type == 'mesh': - df = df[columns[:mean_index] + [('moment', '')] + - columns[mean_index:-1]] - else: - df = df[columns[:mean_index] + ['moment'] + - columns[mean_index:-1]] - - # Select rows corresponding to requested scattering moment - if moment != 'all': - cv.check_type('moment', moment, Integral) - cv.check_greater_than('moment', moment, 0, equality=True) - cv.check_less_than( - 'moment', moment, self.legendre_order, equality=True) - df = df[df['moment'] == 'P{}'.format(moment)] - - return df - - def print_xs(self, subdomains='all', nuclides='all', - xs_type='macro', moment=0): - """Prints a string representation for the multi-group cross section. - - Parameters - ---------- - subdomains : Iterable of Integral or 'all' - The subdomain IDs of the cross sections to include in the report. - Defaults to 'all'. - nuclides : Iterable of str or 'all' or 'sum' - The nuclides of the cross-sections to include in the report. This - may be a list of nuclide name strings (e.g., ['U235', 'U238']). - The special string 'all' will report the cross sections for all - nuclides in the spatial domain. The special string 'sum' will report - the cross sections summed over all nuclides. Defaults to 'all'. - xs_type: {'macro', 'micro'} - Return the macro or micro cross section in units of cm^-1 or barns. - Defaults to 'macro'. - moment : int - The scattering moment to print (default is 0) - - """ - - # Construct a collection of the subdomains to report - if not isinstance(subdomains, string_types): - cv.check_iterable_type('subdomains', subdomains, Integral) - elif self.domain_type == 'distribcell': - subdomains = np.arange(self.num_subdomains, dtype=np.int) - elif self.domain_type == 'mesh': - xyz = [range(1, x + 1) for x in self.domain.dimension] - subdomains = list(itertools.product(*xyz)) - else: - subdomains = [self.domain.id] - - # Construct a collection of the nuclides to report - if self.by_nuclide: - if nuclides == 'all': - nuclides = self.get_nuclides() - if nuclides == 'sum': - nuclides = ['sum'] - else: - cv.check_iterable_type('nuclides', nuclides, string_types) - else: - nuclides = ['sum'] - - cv.check_value('xs_type', xs_type, ['macro', 'micro']) - - if self.scatter_format == 'legendre': - rxn_type = '{0} (P{1})'.format(self.rxn_type, moment) - else: - rxn_type = self.rxn_type - - # Build header for string with type and domain info - string = 'Multi-Group XS\n' - string += '{0: <16}=\t{1}\n'.format('\tReaction Type', rxn_type) - string += '{0: <16}=\t{1}\n'.format('\tDomain Type', self.domain_type) - string += '{0: <16}=\t{1}\n'.format('\tDomain ID', self.domain.id) - - # Generate the header for an individual XS - xs_header = '\tCross Sections [{0}]:'.format(self.get_units(xs_type)) - - # If cross section data has not been computed, only print string header - if self.tallies is None: - print(string) - return - - string += '{0: <16}\n'.format('\tEnergy Groups:') - template = '{0: <12}Group {1} [{2: <10} - {3: <10}eV]\n' - - # Loop over energy groups ranges - for group in range(1, self.num_groups + 1): - bounds = self.energy_groups.get_group_bounds(group) - string += template.format('', group, bounds[0], bounds[1]) - - # Set polar and azimuthal bins if necessary - if self.num_polar > 1 or self.num_azimuthal > 1: - pol_bins = np.linspace(0., np.pi, num=self.num_polar + 1, - endpoint=True) - azi_bins = np.linspace(-np.pi, np.pi, num=self.num_azimuthal + 1, - endpoint=True) - - # Loop over all subdomains - for subdomain in subdomains: - - if self.domain_type == 'distribcell' or self.domain_type == 'mesh': - string += '{0: <16}=\t{1}\n'.format('\tSubdomain', subdomain) - - # Loop over all Nuclides - for nuclide in nuclides: - - # Build header for nuclide type - if xs_type != 'sum': - string += '{0: <16}=\t{1}\n'.format('\tNuclide', nuclide) - - # Build header for cross section type - string += '{0: <16}\n'.format(xs_header) - template = '{0: <12}Group {1} -> Group {2}:\t\t' - - average_xs = self.get_xs(nuclides=[nuclide], - subdomains=[subdomain], - xs_type=xs_type, value='mean', - moment=moment) - rel_err_xs = self.get_xs(nuclides=[nuclide], - subdomains=[subdomain], - xs_type=xs_type, value='rel_err', - moment=moment) - rel_err_xs = rel_err_xs * 100. - - if self.num_polar > 1 or self.num_azimuthal > 1: - # Loop over polar, azi, and in/out energy group ranges - for pol in range(len(pol_bins) - 1): - pol_low, pol_high = pol_bins[pol: pol + 2] - for azi in range(len(azi_bins) - 1): - azi_low, azi_high = azi_bins[azi: azi + 2] - string += '\t\tPolar Angle: [{0:5f} - {1:5f}]'.format( - pol_low, pol_high) + \ - '\tAzimuthal Angle: [{0:5f} - {1:5f}]'.format( - azi_low, azi_high) + '\n' - for in_group in range(1, self.num_groups + 1): - for out_group in range(1, self.num_groups + 1): - string += '\t' + template.format('', - in_group, - out_group) - string += '{0:.2e} +/- {1:.2e}%'.format( - average_xs[pol, azi, in_group - 1, - out_group - 1], - rel_err_xs[pol, azi, in_group - 1, - out_group - 1]) - string += '\n' - string += '\n' - string += '\n' - else: - # Loop over incoming/outgoing energy groups ranges - for in_group in range(1, self.num_groups + 1): - for out_group in range(1, self.num_groups + 1): - string += template.format('', in_group, out_group) - string += '{0:.2e} +/- {1:.2e}%'.format( - average_xs[in_group - 1, out_group - 1], - rel_err_xs[in_group - 1, out_group - 1]) - string += '\n' - string += '\n' - string += '\n' - string += '\n' - string += '\n' - - print(string) - class NuFissionMatrixXS(MatrixMGXS): r"""A fission production matrix multi-group cross section. diff --git a/tests/test_mgxs_library_condense/inputs_true.dat b/tests/test_mgxs_library_condense/inputs_true.dat index b4498e9d8d..f2a7c90259 100644 --- a/tests/test_mgxs_library_condense/inputs_true.dat +++ b/tests/test_mgxs_library_condense/inputs_true.dat @@ -277,32 +277,24 @@ total - scatter-P0 + scatter analog - total - nu-scatter-P0 - analog + flux + tracklength total - flux + scatter tracklength - - - total - scatter - tracklength - - @@ -310,21 +302,21 @@ scatter-P3 analog - + total flux tracklength - + total scatter tracklength - + @@ -332,7 +324,7 @@ scatter-P3 analog - + @@ -340,7 +332,7 @@ nu-scatter-0 analog - + @@ -348,70 +340,70 @@ scatter-0 analog - + total nu-fission analog + + + + total + nu-fission + analog + - + total - nu-fission + prompt-nu-fission analog - + total prompt-nu-fission analog - - - total - prompt-nu-fission - analog - - total flux tracklength - + total inverse-velocity tracklength - + total flux tracklength - + total prompt-nu-fission tracklength - + total flux analog - + @@ -419,14 +411,14 @@ prompt-nu-fission analog - + total flux tracklength - + @@ -434,7 +426,7 @@ delayed-nu-fission tracklength - + @@ -442,7 +434,7 @@ delayed-nu-fission analog - + @@ -450,13 +442,21 @@ delayed-nu-fission analog - + total nu-fission tracklength + + + + + total + delayed-nu-fission + tracklength + @@ -466,14 +466,6 @@ tracklength - - - - total - delayed-nu-fission - tracklength - - @@ -481,14 +473,14 @@ decay-rate tracklength - + total flux analog - + @@ -497,175 +489,175 @@ delayed-nu-fission analog - + total flux tracklength + + + + total + total + tracklength + total - total - tracklength + flux + analog - - - total - flux - analog - - total total analog - + total scatter-1 analog - + total flux analog - + total total analog - + total nu-scatter-1 analog - + total flux tracklength + + + + total + absorption + tracklength + total - absorption + flux tracklength total - flux + absorption tracklength total - absorption + fission tracklength total - fission + flux tracklength total - flux + fission tracklength total - fission + flux tracklength total - flux + nu-fission tracklength total - nu-fission + flux tracklength total - flux + kappa-fission tracklength total - kappa-fission + flux tracklength total - flux + scatter tracklength - - - total - scatter - tracklength - - total flux analog - + total nu-scatter analog - + total flux analog - + @@ -673,14 +665,14 @@ scatter-P3 analog - + total flux analog - + @@ -688,7 +680,7 @@ nu-scatter-P3 analog - + @@ -696,7 +688,7 @@ nu-scatter analog - + @@ -704,74 +696,66 @@ scatter analog - + total flux analog + + + + + total + nu-fission + analog + total - nu-fission + scatter analog - total - scatter-P0 - analog + flux + tracklength - total - nu-scatter-P0 - analog + scatter + tracklength + total - flux - tracklength + scatter-P3 + analog total - scatter + flux tracklength - - - - total - scatter-P3 - analog - - - - - total - flux - tracklength - - total scatter tracklength - + @@ -779,7 +763,7 @@ scatter-P3 analog - + @@ -787,7 +771,7 @@ nu-scatter-0 analog - + @@ -795,33 +779,47 @@ scatter-0 analog - + total nu-fission analog + + + + total + nu-fission + analog + + + + + total + prompt-nu-fission + analog + total - nu-fission + prompt-nu-fission analog - + total - prompt-nu-fission - analog + flux + tracklength - + total - prompt-nu-fission - analog + inverse-velocity + tracklength @@ -834,31 +832,17 @@ total - inverse-velocity + prompt-nu-fission tracklength - - - total - flux - tracklength - - - - - total - prompt-nu-fission - tracklength - - total flux analog - + @@ -866,14 +850,14 @@ prompt-nu-fission analog - + total flux tracklength - + @@ -881,7 +865,7 @@ delayed-nu-fission tracklength - + @@ -889,7 +873,7 @@ delayed-nu-fission analog - + @@ -897,30 +881,30 @@ delayed-nu-fission analog - + total nu-fission tracklength + + + + + total + delayed-nu-fission + tracklength + + + + + + total + delayed-nu-fission + tracklength + - - - - total - delayed-nu-fission - tracklength - - - - - - total - delayed-nu-fission - tracklength - - @@ -928,14 +912,14 @@ decay-rate tracklength - + total flux analog - + @@ -944,62 +928,76 @@ delayed-nu-fission analog + + + + total + flux + tracklength + + + + + total + total + tracklength + total flux - tracklength + analog total total - tracklength + analog - - - total - flux - analog - - - - - total - total - analog - - total scatter-1 analog - + total flux analog - + total total analog - + total nu-scatter-1 analog + + + + total + flux + tracklength + + + + + total + absorption + tracklength + @@ -1018,14 +1016,14 @@ total - flux + fission tracklength total - absorption + flux tracklength @@ -1046,7 +1044,7 @@ total - fission + nu-fission tracklength @@ -1060,7 +1058,7 @@ total - nu-fission + kappa-fission tracklength @@ -1074,7 +1072,7 @@ total - kappa-fission + scatter tracklength @@ -1082,14 +1080,14 @@ total flux - tracklength + analog total - scatter - tracklength + nu-scatter + analog @@ -1101,8 +1099,9 @@ + total - nu-scatter + scatter-P3 analog @@ -1113,21 +1112,6 @@ analog - - - - total - scatter-P3 - analog - - - - - total - flux - analog - - @@ -1135,7 +1119,7 @@ nu-scatter-P3 analog - + @@ -1143,7 +1127,7 @@ nu-scatter analog - + @@ -1151,14 +1135,14 @@ scatter analog - + total flux analog - + @@ -1166,20 +1150,34 @@ nu-fission analog - + total - scatter-P0 + scatter analog + + + + total + flux + tracklength + + + + + total + scatter + tracklength + total - nu-scatter-P0 + scatter-P3 analog @@ -1205,28 +1203,6 @@ analog - - - total - flux - tracklength - - - - - total - scatter - tracklength - - - - - - total - scatter-P3 - analog - - @@ -1234,7 +1210,7 @@ nu-scatter-0 analog - + @@ -1242,70 +1218,70 @@ scatter-0 analog - + total nu-fission analog + + + + total + nu-fission + analog + + + + + total + prompt-nu-fission + analog + + + + + total + prompt-nu-fission + analog + - - - total - nu-fission - analog - - - - - total - prompt-nu-fission - analog - - - - - total - prompt-nu-fission - analog - - total flux tracklength - + total inverse-velocity tracklength - + total flux tracklength - + total prompt-nu-fission tracklength - + total flux analog - + @@ -1313,14 +1289,14 @@ prompt-nu-fission analog - + total flux tracklength - + @@ -1328,7 +1304,7 @@ delayed-nu-fission tracklength - + @@ -1336,7 +1312,7 @@ delayed-nu-fission analog - + @@ -1344,14 +1320,14 @@ delayed-nu-fission analog - + total nu-fission tracklength - + @@ -1359,7 +1335,7 @@ delayed-nu-fission tracklength - + @@ -1367,7 +1343,7 @@ delayed-nu-fission tracklength - + @@ -1375,14 +1351,14 @@ decay-rate tracklength - + total flux analog - + diff --git a/tests/test_mgxs_library_condense/results_true.dat b/tests/test_mgxs_library_condense/results_true.dat index d20a5ba0c8..1892a17f27 100644 --- a/tests/test_mgxs_library_condense/results_true.dat +++ b/tests/test_mgxs_library_condense/results_true.dat @@ -33,8 +33,6 @@ material group in group out nuclide mean std. dev. 0 10000 1 1 total 0.085835 0.005592 material group in group out nuclide mean std. dev. -0 10000 1 1 total 1.0 0.066111 - material group in group out nuclide mean std. dev. 0 10000 1 1 total 1.0 0.066111 material group in group out nuclide moment mean std. dev. 0 10000 1 1 total P0 0.388721 0.031279 @@ -126,8 +124,6 @@ material group in group out nuclide mean std. dev. 0 10001 1 1 total 0.0 0.0 material group in group out nuclide mean std. dev. -0 10001 1 1 total 1.0 0.095039 - material group in group out nuclide mean std. dev. 0 10001 1 1 total 1.0 0.095039 material group in group out nuclide moment mean std. dev. 0 10001 1 1 total P0 0.309384 0.032376 @@ -219,8 +215,6 @@ material group in group out nuclide mean std. dev. 0 10002 1 1 total 0.0 0.0 material group in group out nuclide mean std. dev. -0 10002 1 1 total 1.0 0.056867 - material group in group out nuclide mean std. dev. 0 10002 1 1 total 1.0 0.056867 material group in group out nuclide moment mean std. dev. 0 10002 1 1 total P0 0.898938 0.067118 diff --git a/tests/test_mgxs_library_distribcell/inputs_true.dat b/tests/test_mgxs_library_distribcell/inputs_true.dat index d2d3387082..8e68ca8f01 100644 --- a/tests/test_mgxs_library_distribcell/inputs_true.dat +++ b/tests/test_mgxs_library_distribcell/inputs_true.dat @@ -304,32 +304,24 @@ total - scatter-P0 + scatter analog - total - nu-scatter-P0 - analog + flux + tracklength total - flux + scatter tracklength - - - total - scatter - tracklength - - @@ -337,21 +329,21 @@ scatter-P3 analog - + total flux tracklength - + total scatter tracklength - + @@ -359,7 +351,7 @@ scatter-P3 analog - + @@ -367,7 +359,7 @@ nu-scatter-0 analog - + @@ -375,70 +367,70 @@ scatter-0 analog - + total nu-fission analog + + + + total + nu-fission + analog + - + total - nu-fission + prompt-nu-fission analog - + total prompt-nu-fission analog - - - total - prompt-nu-fission - analog - - total flux tracklength - + total inverse-velocity tracklength - + total flux tracklength - + total prompt-nu-fission tracklength - + total flux analog - + @@ -446,22 +438,22 @@ prompt-nu-fission analog - + total flux tracklength + + + + + total + delayed-nu-fission + tracklength + - - - - total - delayed-nu-fission - tracklength - - @@ -469,7 +461,7 @@ delayed-nu-fission analog - + @@ -477,13 +469,21 @@ delayed-nu-fission analog - + total nu-fission tracklength + + + + + total + delayed-nu-fission + tracklength + @@ -493,14 +493,6 @@ tracklength - - - - total - delayed-nu-fission - tracklength - - @@ -508,14 +500,14 @@ decay-rate tracklength - + total flux analog - + diff --git a/tests/test_mgxs_library_distribcell/results_true.dat b/tests/test_mgxs_library_distribcell/results_true.dat index 36e3203ba7..e6ec539e60 100644 --- a/tests/test_mgxs_library_distribcell/results_true.dat +++ b/tests/test_mgxs_library_distribcell/results_true.dat @@ -34,8 +34,6 @@ 0 ((0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13... 1 1 total 0.094516 0.0059 sum(distribcell) group in group out nuclide mean std. dev. 0 ((0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13... 1 1 total 1.0 0.037213 - sum(distribcell) group in group out nuclide mean std. dev. -0 ((0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13... 1 1 total 1.0 0.037208 sum(distribcell) group in group out nuclide moment mean std. dev. 0 ((0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13... 1 1 total P0 0.390797 0.016955 1 ((0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13... 1 1 total P1 0.047641 0.005091 diff --git a/tests/test_mgxs_library_hdf5/inputs_true.dat b/tests/test_mgxs_library_hdf5/inputs_true.dat index b4498e9d8d..f2a7c90259 100644 --- a/tests/test_mgxs_library_hdf5/inputs_true.dat +++ b/tests/test_mgxs_library_hdf5/inputs_true.dat @@ -277,32 +277,24 @@ total - scatter-P0 + scatter analog - total - nu-scatter-P0 - analog + flux + tracklength total - flux + scatter tracklength - - - total - scatter - tracklength - - @@ -310,21 +302,21 @@ scatter-P3 analog - + total flux tracklength - + total scatter tracklength - + @@ -332,7 +324,7 @@ scatter-P3 analog - + @@ -340,7 +332,7 @@ nu-scatter-0 analog - + @@ -348,70 +340,70 @@ scatter-0 analog - + total nu-fission analog + + + + total + nu-fission + analog + - + total - nu-fission + prompt-nu-fission analog - + total prompt-nu-fission analog - - - total - prompt-nu-fission - analog - - total flux tracklength - + total inverse-velocity tracklength - + total flux tracklength - + total prompt-nu-fission tracklength - + total flux analog - + @@ -419,14 +411,14 @@ prompt-nu-fission analog - + total flux tracklength - + @@ -434,7 +426,7 @@ delayed-nu-fission tracklength - + @@ -442,7 +434,7 @@ delayed-nu-fission analog - + @@ -450,13 +442,21 @@ delayed-nu-fission analog - + total nu-fission tracklength + + + + + total + delayed-nu-fission + tracklength + @@ -466,14 +466,6 @@ tracklength - - - - total - delayed-nu-fission - tracklength - - @@ -481,14 +473,14 @@ decay-rate tracklength - + total flux analog - + @@ -497,175 +489,175 @@ delayed-nu-fission analog - + total flux tracklength + + + + total + total + tracklength + total - total - tracklength + flux + analog - - - total - flux - analog - - total total analog - + total scatter-1 analog - + total flux analog - + total total analog - + total nu-scatter-1 analog - + total flux tracklength + + + + total + absorption + tracklength + total - absorption + flux tracklength total - flux + absorption tracklength total - absorption + fission tracklength total - fission + flux tracklength total - flux + fission tracklength total - fission + flux tracklength total - flux + nu-fission tracklength total - nu-fission + flux tracklength total - flux + kappa-fission tracklength total - kappa-fission + flux tracklength total - flux + scatter tracklength - - - total - scatter - tracklength - - total flux analog - + total nu-scatter analog - + total flux analog - + @@ -673,14 +665,14 @@ scatter-P3 analog - + total flux analog - + @@ -688,7 +680,7 @@ nu-scatter-P3 analog - + @@ -696,7 +688,7 @@ nu-scatter analog - + @@ -704,74 +696,66 @@ scatter analog - + total flux analog + + + + + total + nu-fission + analog + total - nu-fission + scatter analog - total - scatter-P0 - analog + flux + tracklength - total - nu-scatter-P0 - analog + scatter + tracklength + total - flux - tracklength + scatter-P3 + analog total - scatter + flux tracklength - - - - total - scatter-P3 - analog - - - - - total - flux - tracklength - - total scatter tracklength - + @@ -779,7 +763,7 @@ scatter-P3 analog - + @@ -787,7 +771,7 @@ nu-scatter-0 analog - + @@ -795,33 +779,47 @@ scatter-0 analog - + total nu-fission analog + + + + total + nu-fission + analog + + + + + total + prompt-nu-fission + analog + total - nu-fission + prompt-nu-fission analog - + total - prompt-nu-fission - analog + flux + tracklength - + total - prompt-nu-fission - analog + inverse-velocity + tracklength @@ -834,31 +832,17 @@ total - inverse-velocity + prompt-nu-fission tracklength - - - total - flux - tracklength - - - - - total - prompt-nu-fission - tracklength - - total flux analog - + @@ -866,14 +850,14 @@ prompt-nu-fission analog - + total flux tracklength - + @@ -881,7 +865,7 @@ delayed-nu-fission tracklength - + @@ -889,7 +873,7 @@ delayed-nu-fission analog - + @@ -897,30 +881,30 @@ delayed-nu-fission analog - + total nu-fission tracklength + + + + + total + delayed-nu-fission + tracklength + + + + + + total + delayed-nu-fission + tracklength + - - - - total - delayed-nu-fission - tracklength - - - - - - total - delayed-nu-fission - tracklength - - @@ -928,14 +912,14 @@ decay-rate tracklength - + total flux analog - + @@ -944,62 +928,76 @@ delayed-nu-fission analog + + + + total + flux + tracklength + + + + + total + total + tracklength + total flux - tracklength + analog total total - tracklength + analog - - - total - flux - analog - - - - - total - total - analog - - total scatter-1 analog - + total flux analog - + total total analog - + total nu-scatter-1 analog + + + + total + flux + tracklength + + + + + total + absorption + tracklength + @@ -1018,14 +1016,14 @@ total - flux + fission tracklength total - absorption + flux tracklength @@ -1046,7 +1044,7 @@ total - fission + nu-fission tracklength @@ -1060,7 +1058,7 @@ total - nu-fission + kappa-fission tracklength @@ -1074,7 +1072,7 @@ total - kappa-fission + scatter tracklength @@ -1082,14 +1080,14 @@ total flux - tracklength + analog total - scatter - tracklength + nu-scatter + analog @@ -1101,8 +1099,9 @@ + total - nu-scatter + scatter-P3 analog @@ -1113,21 +1112,6 @@ analog - - - - total - scatter-P3 - analog - - - - - total - flux - analog - - @@ -1135,7 +1119,7 @@ nu-scatter-P3 analog - + @@ -1143,7 +1127,7 @@ nu-scatter analog - + @@ -1151,14 +1135,14 @@ scatter analog - + total flux analog - + @@ -1166,20 +1150,34 @@ nu-fission analog - + total - scatter-P0 + scatter analog + + + + total + flux + tracklength + + + + + total + scatter + tracklength + total - nu-scatter-P0 + scatter-P3 analog @@ -1205,28 +1203,6 @@ analog - - - total - flux - tracklength - - - - - total - scatter - tracklength - - - - - - total - scatter-P3 - analog - - @@ -1234,7 +1210,7 @@ nu-scatter-0 analog - + @@ -1242,70 +1218,70 @@ scatter-0 analog - + total nu-fission analog + + + + total + nu-fission + analog + + + + + total + prompt-nu-fission + analog + + + + + total + prompt-nu-fission + analog + - - - total - nu-fission - analog - - - - - total - prompt-nu-fission - analog - - - - - total - prompt-nu-fission - analog - - total flux tracklength - + total inverse-velocity tracklength - + total flux tracklength - + total prompt-nu-fission tracklength - + total flux analog - + @@ -1313,14 +1289,14 @@ prompt-nu-fission analog - + total flux tracklength - + @@ -1328,7 +1304,7 @@ delayed-nu-fission tracklength - + @@ -1336,7 +1312,7 @@ delayed-nu-fission analog - + @@ -1344,14 +1320,14 @@ delayed-nu-fission analog - + total nu-fission tracklength - + @@ -1359,7 +1335,7 @@ delayed-nu-fission tracklength - + @@ -1367,7 +1343,7 @@ delayed-nu-fission tracklength - + @@ -1375,14 +1351,14 @@ decay-rate tracklength - + total flux analog - + diff --git a/tests/test_mgxs_library_mesh/inputs_true.dat b/tests/test_mgxs_library_mesh/inputs_true.dat index fe38ef89db..b806bec914 100644 --- a/tests/test_mgxs_library_mesh/inputs_true.dat +++ b/tests/test_mgxs_library_mesh/inputs_true.dat @@ -541,32 +541,24 @@ total - scatter-P0 + scatter analog - total - nu-scatter-P0 - analog + flux + tracklength total - flux + scatter tracklength - - - total - scatter - tracklength - - @@ -574,21 +566,21 @@ scatter-P3 analog - + total flux tracklength - + total scatter tracklength - + @@ -596,7 +588,7 @@ scatter-P3 analog - + @@ -604,7 +596,7 @@ nu-scatter-0 analog - + @@ -612,70 +604,70 @@ scatter-0 analog - + total nu-fission analog + + + + total + nu-fission + analog + - + total - nu-fission + prompt-nu-fission analog - + total prompt-nu-fission analog - - - total - prompt-nu-fission - analog - - total flux tracklength - + total inverse-velocity tracklength - + total flux tracklength - + total prompt-nu-fission tracklength - + total flux analog - + @@ -683,22 +675,22 @@ prompt-nu-fission analog - + total flux tracklength + + + + + total + delayed-nu-fission + tracklength + - - - - total - delayed-nu-fission - tracklength - - @@ -706,7 +698,7 @@ delayed-nu-fission analog - + @@ -714,13 +706,21 @@ delayed-nu-fission analog - + total nu-fission tracklength + + + + + total + delayed-nu-fission + tracklength + @@ -730,14 +730,6 @@ tracklength - - - - total - delayed-nu-fission - tracklength - - @@ -745,14 +737,14 @@ decay-rate tracklength - + total flux analog - + diff --git a/tests/test_mgxs_library_mesh/results_true.dat b/tests/test_mgxs_library_mesh/results_true.dat index f6c7a5718b..28203268a7 100644 --- a/tests/test_mgxs_library_mesh/results_true.dat +++ b/tests/test_mgxs_library_mesh/results_true.dat @@ -111,12 +111,6 @@ 0 1 1 1 1 1 total 1.0 0.153265 1 1 2 1 1 1 total 1.0 0.454973 2 2 1 1 1 1 total 1.0 0.146747 -3 2 2 1 1 1 total 1.0 0.141824 - mesh 1 group in group out nuclide mean std. dev. - x y z -0 1 1 1 1 1 total 1.0 0.153265 -1 1 2 1 1 1 total 1.0 0.454973 -2 2 1 1 1 1 total 1.0 0.146747 3 2 2 1 1 1 total 1.0 0.141824 mesh 1 group in group out nuclide moment mean std. dev. x y z diff --git a/tests/test_mgxs_library_no_nuclides/inputs_true.dat b/tests/test_mgxs_library_no_nuclides/inputs_true.dat index b4498e9d8d..f2a7c90259 100644 --- a/tests/test_mgxs_library_no_nuclides/inputs_true.dat +++ b/tests/test_mgxs_library_no_nuclides/inputs_true.dat @@ -277,32 +277,24 @@ total - scatter-P0 + scatter analog - total - nu-scatter-P0 - analog + flux + tracklength total - flux + scatter tracklength - - - total - scatter - tracklength - - @@ -310,21 +302,21 @@ scatter-P3 analog - + total flux tracklength - + total scatter tracklength - + @@ -332,7 +324,7 @@ scatter-P3 analog - + @@ -340,7 +332,7 @@ nu-scatter-0 analog - + @@ -348,70 +340,70 @@ scatter-0 analog - + total nu-fission analog + + + + total + nu-fission + analog + - + total - nu-fission + prompt-nu-fission analog - + total prompt-nu-fission analog - - - total - prompt-nu-fission - analog - - total flux tracklength - + total inverse-velocity tracklength - + total flux tracklength - + total prompt-nu-fission tracklength - + total flux analog - + @@ -419,14 +411,14 @@ prompt-nu-fission analog - + total flux tracklength - + @@ -434,7 +426,7 @@ delayed-nu-fission tracklength - + @@ -442,7 +434,7 @@ delayed-nu-fission analog - + @@ -450,13 +442,21 @@ delayed-nu-fission analog - + total nu-fission tracklength + + + + + total + delayed-nu-fission + tracklength + @@ -466,14 +466,6 @@ tracklength - - - - total - delayed-nu-fission - tracklength - - @@ -481,14 +473,14 @@ decay-rate tracklength - + total flux analog - + @@ -497,175 +489,175 @@ delayed-nu-fission analog - + total flux tracklength + + + + total + total + tracklength + total - total - tracklength + flux + analog - - - total - flux - analog - - total total analog - + total scatter-1 analog - + total flux analog - + total total analog - + total nu-scatter-1 analog - + total flux tracklength + + + + total + absorption + tracklength + total - absorption + flux tracklength total - flux + absorption tracklength total - absorption + fission tracklength total - fission + flux tracklength total - flux + fission tracklength total - fission + flux tracklength total - flux + nu-fission tracklength total - nu-fission + flux tracklength total - flux + kappa-fission tracklength total - kappa-fission + flux tracklength total - flux + scatter tracklength - - - total - scatter - tracklength - - total flux analog - + total nu-scatter analog - + total flux analog - + @@ -673,14 +665,14 @@ scatter-P3 analog - + total flux analog - + @@ -688,7 +680,7 @@ nu-scatter-P3 analog - + @@ -696,7 +688,7 @@ nu-scatter analog - + @@ -704,74 +696,66 @@ scatter analog - + total flux analog + + + + + total + nu-fission + analog + total - nu-fission + scatter analog - total - scatter-P0 - analog + flux + tracklength - total - nu-scatter-P0 - analog + scatter + tracklength + total - flux - tracklength + scatter-P3 + analog total - scatter + flux tracklength - - - - total - scatter-P3 - analog - - - - - total - flux - tracklength - - total scatter tracklength - + @@ -779,7 +763,7 @@ scatter-P3 analog - + @@ -787,7 +771,7 @@ nu-scatter-0 analog - + @@ -795,33 +779,47 @@ scatter-0 analog - + total nu-fission analog + + + + total + nu-fission + analog + + + + + total + prompt-nu-fission + analog + total - nu-fission + prompt-nu-fission analog - + total - prompt-nu-fission - analog + flux + tracklength - + total - prompt-nu-fission - analog + inverse-velocity + tracklength @@ -834,31 +832,17 @@ total - inverse-velocity + prompt-nu-fission tracklength - - - total - flux - tracklength - - - - - total - prompt-nu-fission - tracklength - - total flux analog - + @@ -866,14 +850,14 @@ prompt-nu-fission analog - + total flux tracklength - + @@ -881,7 +865,7 @@ delayed-nu-fission tracklength - + @@ -889,7 +873,7 @@ delayed-nu-fission analog - + @@ -897,30 +881,30 @@ delayed-nu-fission analog - + total nu-fission tracklength + + + + + total + delayed-nu-fission + tracklength + + + + + + total + delayed-nu-fission + tracklength + - - - - total - delayed-nu-fission - tracklength - - - - - - total - delayed-nu-fission - tracklength - - @@ -928,14 +912,14 @@ decay-rate tracklength - + total flux analog - + @@ -944,62 +928,76 @@ delayed-nu-fission analog + + + + total + flux + tracklength + + + + + total + total + tracklength + total flux - tracklength + analog total total - tracklength + analog - - - total - flux - analog - - - - - total - total - analog - - total scatter-1 analog - + total flux analog - + total total analog - + total nu-scatter-1 analog + + + + total + flux + tracklength + + + + + total + absorption + tracklength + @@ -1018,14 +1016,14 @@ total - flux + fission tracklength total - absorption + flux tracklength @@ -1046,7 +1044,7 @@ total - fission + nu-fission tracklength @@ -1060,7 +1058,7 @@ total - nu-fission + kappa-fission tracklength @@ -1074,7 +1072,7 @@ total - kappa-fission + scatter tracklength @@ -1082,14 +1080,14 @@ total flux - tracklength + analog total - scatter - tracklength + nu-scatter + analog @@ -1101,8 +1099,9 @@ + total - nu-scatter + scatter-P3 analog @@ -1113,21 +1112,6 @@ analog - - - - total - scatter-P3 - analog - - - - - total - flux - analog - - @@ -1135,7 +1119,7 @@ nu-scatter-P3 analog - + @@ -1143,7 +1127,7 @@ nu-scatter analog - + @@ -1151,14 +1135,14 @@ scatter analog - + total flux analog - + @@ -1166,20 +1150,34 @@ nu-fission analog - + total - scatter-P0 + scatter analog + + + + total + flux + tracklength + + + + + total + scatter + tracklength + total - nu-scatter-P0 + scatter-P3 analog @@ -1205,28 +1203,6 @@ analog - - - total - flux - tracklength - - - - - total - scatter - tracklength - - - - - - total - scatter-P3 - analog - - @@ -1234,7 +1210,7 @@ nu-scatter-0 analog - + @@ -1242,70 +1218,70 @@ scatter-0 analog - + total nu-fission analog + + + + total + nu-fission + analog + + + + + total + prompt-nu-fission + analog + + + + + total + prompt-nu-fission + analog + - - - total - nu-fission - analog - - - - - total - prompt-nu-fission - analog - - - - - total - prompt-nu-fission - analog - - total flux tracklength - + total inverse-velocity tracklength - + total flux tracklength - + total prompt-nu-fission tracklength - + total flux analog - + @@ -1313,14 +1289,14 @@ prompt-nu-fission analog - + total flux tracklength - + @@ -1328,7 +1304,7 @@ delayed-nu-fission tracklength - + @@ -1336,7 +1312,7 @@ delayed-nu-fission analog - + @@ -1344,14 +1320,14 @@ delayed-nu-fission analog - + total nu-fission tracklength - + @@ -1359,7 +1335,7 @@ delayed-nu-fission tracklength - + @@ -1367,7 +1343,7 @@ delayed-nu-fission tracklength - + @@ -1375,14 +1351,14 @@ decay-rate tracklength - + total flux analog - + diff --git a/tests/test_mgxs_library_no_nuclides/results_true.dat b/tests/test_mgxs_library_no_nuclides/results_true.dat index 0cec56a256..85dc933771 100644 --- a/tests/test_mgxs_library_no_nuclides/results_true.dat +++ b/tests/test_mgxs_library_no_nuclides/results_true.dat @@ -76,11 +76,6 @@ 3 10000 1 1 total 0.997433 0.078224 2 10000 1 2 total 0.002567 0.001256 1 10000 2 1 total 0.002242 0.002243 -0 10000 2 2 total 0.997758 0.041053 - material group in group out nuclide mean std. dev. -3 10000 1 1 total 0.997433 0.078224 -2 10000 1 2 total 0.002567 0.001256 -1 10000 2 1 total 0.002242 0.002243 0 10000 2 2 total 0.997758 0.041053 material group in group out nuclide moment mean std. dev. 12 10000 1 1 total P0 0.386423 0.036629 @@ -288,11 +283,6 @@ 3 10001 1 1 total 1.0 0.108779 2 10001 1 2 total 0.0 0.000000 1 10001 2 1 total 0.0 0.000000 -0 10001 2 2 total 1.0 0.142427 - material group in group out nuclide mean std. dev. -3 10001 1 1 total 1.0 0.108779 -2 10001 1 2 total 0.0 0.000000 -1 10001 2 1 total 0.0 0.000000 0 10001 2 2 total 1.0 0.142427 material group in group out nuclide moment mean std. dev. 12 10001 1 1 total P0 0.312163 0.037253 @@ -500,11 +490,6 @@ 3 10002 1 1 total 0.953271 0.036018 2 10002 1 2 total 0.046729 0.002547 1 10002 2 1 total 0.000218 0.000219 -0 10002 2 2 total 0.999782 0.135885 - material group in group out nuclide mean std. dev. -3 10002 1 1 total 0.953271 0.036018 -2 10002 1 2 total 0.046729 0.002547 -1 10002 2 1 total 0.000218 0.000219 0 10002 2 2 total 0.999782 0.135885 material group in group out nuclide moment mean std. dev. 12 10002 1 1 total P0 0.632859 0.038142 diff --git a/tests/test_mgxs_library_nuclides/inputs_true.dat b/tests/test_mgxs_library_nuclides/inputs_true.dat index 3083ef903b..8d7cf5fb8c 100644 --- a/tests/test_mgxs_library_nuclides/inputs_true.dat +++ b/tests/test_mgxs_library_nuclides/inputs_true.dat @@ -277,32 +277,24 @@ U234 U235 U238 O16 - scatter-P0 + scatter analog - - - - U234 U235 U238 O16 - nu-scatter-P0 - analog - - total flux tracklength - + U234 U235 U238 O16 scatter tracklength - + @@ -310,26 +302,34 @@ scatter-P3 analog - + total flux tracklength - + U234 U235 U238 O16 scatter tracklength + + + + + U234 U235 U238 O16 + scatter-P3 + analog + U234 U235 U238 O16 - scatter-P3 + nu-scatter-0 analog @@ -337,81 +337,73 @@ U234 U235 U238 O16 - nu-scatter-0 + scatter-0 analog - - + U234 U235 U238 O16 - scatter-0 + nu-fission analog - + U234 U235 U238 O16 nu-fission analog - + U234 U235 U238 O16 - nu-fission + prompt-nu-fission analog - + U234 U235 U238 O16 prompt-nu-fission analog - - - U234 U235 U238 O16 - prompt-nu-fission - analog - - total flux tracklength - + U234 U235 U238 O16 inverse-velocity tracklength - + total flux tracklength - + U234 U235 U238 O16 prompt-nu-fission tracklength - + total flux analog - + @@ -419,175 +411,175 @@ prompt-nu-fission analog - + total flux tracklength + + + + Zr90 Zr91 Zr92 Zr94 Zr96 + total + tracklength + - - - Zr90 Zr91 Zr92 Zr94 Zr96 - total - tracklength - - total flux analog - + Zr90 Zr91 Zr92 Zr94 Zr96 total analog - + Zr90 Zr91 Zr92 Zr94 Zr96 scatter-1 analog - + total flux analog - + Zr90 Zr91 Zr92 Zr94 Zr96 total analog - + Zr90 Zr91 Zr92 Zr94 Zr96 nu-scatter-1 analog - + total flux tracklength - + Zr90 Zr91 Zr92 Zr94 Zr96 absorption tracklength - + total flux tracklength + + + + Zr90 Zr91 Zr92 Zr94 Zr96 + absorption + tracklength + Zr90 Zr91 Zr92 Zr94 Zr96 - absorption + fission tracklength - Zr90 Zr91 Zr92 Zr94 Zr96 - fission + total + flux tracklength - total - flux + Zr90 Zr91 Zr92 Zr94 Zr96 + fission tracklength - - - Zr90 Zr91 Zr92 Zr94 Zr96 - fission - tracklength - - total flux tracklength - + Zr90 Zr91 Zr92 Zr94 Zr96 nu-fission tracklength - + total flux tracklength - + Zr90 Zr91 Zr92 Zr94 Zr96 kappa-fission tracklength - + total flux tracklength - + Zr90 Zr91 Zr92 Zr94 Zr96 scatter tracklength - + total flux analog - + Zr90 Zr91 Zr92 Zr94 Zr96 nu-scatter analog - + total flux analog - + @@ -595,14 +587,14 @@ scatter-P3 analog - + total flux analog - + @@ -610,7 +602,7 @@ nu-scatter-P3 analog - + @@ -618,7 +610,7 @@ nu-scatter analog - + @@ -626,74 +618,66 @@ scatter analog - + total flux analog + + + + + Zr90 Zr91 Zr92 Zr94 Zr96 + nu-fission + analog + Zr90 Zr91 Zr92 Zr94 Zr96 - nu-fission + scatter analog - - - - Zr90 Zr91 Zr92 Zr94 Zr96 - scatter-P0 - analog - - - - - - Zr90 Zr91 Zr92 Zr94 Zr96 - nu-scatter-P0 - analog - - total flux tracklength - + Zr90 Zr91 Zr92 Zr94 Zr96 scatter tracklength + + + + + Zr90 Zr91 Zr92 Zr94 Zr96 + scatter-P3 + analog + + + + + total + flux + tracklength + - - - - Zr90 Zr91 Zr92 Zr94 Zr96 - scatter-P3 - analog - - - - - total - flux - tracklength - - Zr90 Zr91 Zr92 Zr94 Zr96 scatter tracklength - + @@ -701,7 +685,7 @@ scatter-P3 analog - + @@ -709,7 +693,7 @@ nu-scatter-0 analog - + @@ -717,33 +701,47 @@ scatter-0 analog - + Zr90 Zr91 Zr92 Zr94 Zr96 nu-fission analog + + + + Zr90 Zr91 Zr92 Zr94 Zr96 + nu-fission + analog + + + + + Zr90 Zr91 Zr92 Zr94 Zr96 + prompt-nu-fission + analog + Zr90 Zr91 Zr92 Zr94 Zr96 - nu-fission + prompt-nu-fission analog - - Zr90 Zr91 Zr92 Zr94 Zr96 - prompt-nu-fission - analog + + total + flux + tracklength - + Zr90 Zr91 Zr92 Zr94 Zr96 - prompt-nu-fission - analog + inverse-velocity + tracklength @@ -756,31 +754,17 @@ Zr90 Zr91 Zr92 Zr94 Zr96 - inverse-velocity + prompt-nu-fission tracklength - - - total - flux - tracklength - - - - - Zr90 Zr91 Zr92 Zr94 Zr96 - prompt-nu-fission - tracklength - - total flux analog - + @@ -788,62 +772,76 @@ prompt-nu-fission analog + + + + total + flux + tracklength + + + + + H1 O16 B10 B11 + total + tracklength + total flux - tracklength + analog H1 O16 B10 B11 total - tracklength + analog - - - total - flux - analog - - - - - H1 O16 B10 B11 - total - analog - - H1 O16 B10 B11 scatter-1 analog - + total flux analog - + H1 O16 B10 B11 total analog - + H1 O16 B10 B11 nu-scatter-1 analog + + + + total + flux + tracklength + + + + + H1 O16 B10 B11 + absorption + tracklength + @@ -861,15 +859,15 @@ - total - flux + H1 O16 B10 B11 + fission tracklength - H1 O16 B10 B11 - absorption + total + flux tracklength @@ -890,7 +888,7 @@ H1 O16 B10 B11 - fission + nu-fission tracklength @@ -904,7 +902,7 @@ H1 O16 B10 B11 - nu-fission + kappa-fission tracklength @@ -918,7 +916,7 @@ H1 O16 B10 B11 - kappa-fission + scatter tracklength @@ -926,14 +924,14 @@ total flux - tracklength + analog H1 O16 B10 B11 - scatter - tracklength + nu-scatter + analog @@ -945,8 +943,9 @@ + H1 O16 B10 B11 - nu-scatter + scatter-P3 analog @@ -957,21 +956,6 @@ analog - - - - H1 O16 B10 B11 - scatter-P3 - analog - - - - - total - flux - analog - - @@ -979,7 +963,7 @@ nu-scatter-P3 analog - + @@ -987,7 +971,7 @@ nu-scatter analog - + @@ -995,14 +979,14 @@ scatter analog - + total flux analog - + @@ -1010,20 +994,34 @@ nu-fission analog - + H1 O16 B10 B11 - scatter-P0 + scatter analog + + + + total + flux + tracklength + + + + + H1 O16 B10 B11 + scatter + tracklength + H1 O16 B10 B11 - nu-scatter-P0 + scatter-P3 analog @@ -1049,28 +1047,6 @@ analog - - - total - flux - tracklength - - - - - H1 O16 B10 B11 - scatter - tracklength - - - - - - H1 O16 B10 B11 - scatter-P3 - analog - - @@ -1078,7 +1054,7 @@ nu-scatter-0 analog - + @@ -1086,70 +1062,70 @@ scatter-0 analog - + H1 O16 B10 B11 nu-fission analog + + + + H1 O16 B10 B11 + nu-fission + analog + + + + + H1 O16 B10 B11 + prompt-nu-fission + analog + + + + + H1 O16 B10 B11 + prompt-nu-fission + analog + - - - H1 O16 B10 B11 - nu-fission - analog - - - - - H1 O16 B10 B11 - prompt-nu-fission - analog - - - - - H1 O16 B10 B11 - prompt-nu-fission - analog - - total flux tracklength - + H1 O16 B10 B11 inverse-velocity tracklength - + total flux tracklength - + H1 O16 B10 B11 prompt-nu-fission tracklength - + total flux analog - + diff --git a/tests/test_mgxs_library_nuclides/results_true.dat b/tests/test_mgxs_library_nuclides/results_true.dat index 7b12791922..243adc368c 100644 --- a/tests/test_mgxs_library_nuclides/results_true.dat +++ b/tests/test_mgxs_library_nuclides/results_true.dat @@ -1 +1 @@ -bd5c4c64a77f8df58fc6753bc5d43de9d7b80c47097cfbafa37f52f10f661997caec72acdfa31dd1af246314447bd5781e950181814cbc77435ebbf029e9f6d7 \ No newline at end of file +5df54054ab37cd69b7096b9f785be57a83a8c3872d3e065ff605aa6de5688640a5551f99313a3e60a9ab8f902c1d4927630e1838db26a2a09d41e29338634b43 \ No newline at end of file