openmc.XSdata

class openmc.XSdata(name, energy_groups, representation='isotropic')[source]

A multi-group cross section data set providing all the multi-group data necessary for a multi-group OpenMC calculation.

Parameters:
  • name (str, optional) – Name of the mgxs data set.
  • energy_groups (openmc.mgxs.EnergyGroups) – Energygroup structure
  • representation ({'isotropic', 'angle'}, optional) – Method used in generating the MGXS (isotropic or angle-dependent flux weighting). Defaults to ‘isotropic’
Variables:
  • name (str) – Unique identifier for the xsdata object
  • alias (str) – Separate unique identifier for the xsdata object
  • zaid (int) – 1000*(atomic number) + mass number. As an example, the zaid of U-235 would be 92235.
  • awr (float) – Atomic weight ratio of an isotope. That is, the ratio of the mass of the isotope to the mass of a single neutron.
  • kT (float) – Temperature (in units of MeV).
  • energy_groups (openmc.mgxs.EnergyGroups) – Energy group structure
  • fissionable (bool) – Whether or not this is a fissionable data set.
  • scatt_type ({'legendre', 'histogram', or 'tabular'}) – Angular distribution representation (legendre, histogram, or tabular)
  • order (int) – Either the Legendre order, number of bins, or number of points used to describe the angular distribution associated with each group-to-group transfer probability.
  • tabular_legendre (dict) – Set how to treat the Legendre scattering kernel (tabular or leave in Legendre polynomial form). Dict contains two keys: ‘enable’ and ‘num_points’. ‘enable’ is a boolean and ‘num_points’ is the number of points to use, if ‘enable’ is True.
  • representation ({'isotropic', 'angle'}) – Method used in generating the MGXS (isotropic or angle-dependent flux weighting).
  • num_azimuthal (int) – Number of equal width angular bins that the azimuthal angular domain is subdivided into. This only applies when representation is “angle”.
  • num_polar (int) – Number of equal width angular bins that the polar angular domain is subdivided into. This only applies when representation is “angle”.
  • use_chi (bool) – Whether or not a chi vector or nu-fission matrix was used.
  • vector_shape (iterable of int) – Dimensionality of vector multi-group cross sections (e.g., the total cross section). The return result depends on the value of representation.
  • matrix_shape (iterable of int) – Dimensionality of matrix multi-group cross sections (e.g., the fission matrix cross section). The return result depends on the value of representation.
  • pn_matrix_shape (iterable of int) – Dimensionality of scattering matrix data (e.g., the scattering matrix cross section). The return result depends on the value of representation.
  • total (numpy.ndarray) – Group-wise total cross section ordered by increasing group index (i.e., fast to thermal). If representation is “isotropic”, then the length of this list should equal the number of groups described in the groups element. If representation is “angle”, then the length of this list should equal the number of groups times the number of azimuthal angles times the number of polar angles, with the inner-dimension being groups, intermediate-dimension being azimuthal angles and outer-dimension being the polar angles.
  • absorption (numpy.ndarray) – Group-wise absorption cross section ordered by increasing group index (i.e., fast to thermal). If representation is “isotropic”, then the length of this list should equal the number of groups described in the groups attribute. If representation is “angle”, then the length of this list should equal the number of groups times the number of azimuthal angles times the number of polar angles, with the inner-dimension being groups, intermediate-dimension being azimuthal angles and outer-dimension being the polar angles.
  • scatter (numpy.ndarray) – Scattering moment matrices presented with the columns representing incoming group and rows representing the outgoing group. That is, down-scatter will be above the diagonal of the resultant matrix. This matrix is repeated for every Legendre order (in order of increasing orders) if scatt_type is “legendre”; otherwise, this matrix is repeated for every bin of the histogram or tabular representation. Finally, if representation is “angle”, the above is repeated for every azimuthal angle and every polar angle, in that order.
  • multiplicity (numpy.ndarray) – Ratio of neutrons produced in scattering collisions to the neutrons which undergo scattering collisions; that is, the multiplicity provides the code with a scaling factor to account for neutrons produced in (n,xn) reactions. This information is assumed isotropic and therefore does not need to be repeated for every Legendre moment or histogram/tabular bin. This matrix follows the same arrangement as described for the scatter attribute, with the exception of the data needed to provide the scattering type information.
  • fission (numpy.ndarray) – Group-wise fission cross section ordered by increasing group index (i.e., fast to thermal). If representation is “isotropic”, then the length of this list should equal the number of groups described in the groups attribute. If representation is “angle”, then the length of this list should equal the number of groups times the number of azimuthal angles times the number of polar angles, with the inner-dimension being groups, intermediate-dimension being azimuthal angles and outer-dimension being the polar angles.
  • kappa_fission (numpy.ndarray) – Group-wise kappa-fission cross section ordered by increasing group index (i.e., fast to thermal). If representation is “isotropic”, then the length of this list should equal the number of groups in the groups attribute. If representation is “angle”, then the length of this list should equal the number of groups times the number of azimuthal angles times the number of polar angles, with the inner-dimension being groups, intermediate-dimension being azimuthal angles and outer-dimension being the polar angles.
  • chi (numpy.ndarray) – Group-wise fission spectra ordered by increasing group index (i.e., fast to thermal). This attribute should be used if making the common approximation that the fission spectra does not depend on incoming energy. If the user does not wish to make this approximation, then this should not be provided and this information included in the nu_fission element instead. If representation is “isotropic”, then the length of this list should equal the number of groups in the groups element. If representation is “angle”, then the length of this list should equal the number of groups times the number of azimuthal angles times the number of polar angles, with the inner-dimension being groups, intermediate-dimension being azimuthal angles and outer-dimension being the polar angles.
  • nu_fission (numpy.ndarray) – Group-wise fission production cross section vector (i.e., if chi is provided), or is the group-wise fission production matrix. If providing the vector, it should be ordered the same as the fission data. If providing the matrix, it should be ordered the same as the multiplicity matrix.
set_absorption_mgxs(absorption, nuclide='total', xs_type='macro')[source]

This method allows for an openmc.mgxs.AbsorptionXS to be used to set the absorption cross section for this XSdata object.

Parameters:
  • absorption (openmc.mgxs.AbsorptionXS) – MGXS Object containing the absorption cross section for the domain of interest.
  • nuclide (str) – Individual nuclide (or ‘total’ if obtaining material-wise data) to gather data for. Defaults to ‘total’.
  • xs_type ({'macro', 'micro'}) – Provide the macro or micro cross section in units of cm^-1 or barns. Defaults to ‘macro’.
set_chi_mgxs(chi, nuclide='total', xs_type='macro')[source]

This method allows for an openmc.mgxs.Chi to be used to set chi for this XSdata object.

Parameters:
  • chi (openmc.mgxs.Chi) – MGXS Object containing chi for the domain of interest.
  • nuclide (str) – Individual nuclide (or ‘total’ if obtaining material-wise data) to gather data for. Defaults to ‘total’.
  • xs_type ({'macro', 'micro'}) – Provide the macro or micro cross section in units of cm^-1 or barns. Defaults to ‘macro’.
set_fission_mgxs(fission, nuclide='total', xs_type='macro')[source]

This method allows for an openmc.mgxs.FissionXS to be used to set the fission cross section for this XSdata object.

Parameters:
  • fission (openmc.mgxs.FissionXS) – MGXS Object containing the fission cross section for the domain of interest.
  • nuclide (str) – Individual nuclide (or ‘total’ if obtaining material-wise data) to gather data for. Defaults to ‘total’.
  • xs_type ({'macro', 'micro'}) – Provide the macro or micro cross section in units of cm^-1 or barns. Defaults to ‘macro’.
set_kappa_fission_mgxs(k_fission, nuclide='total', xs_type='macro')[source]

This method allows for an openmc.mgxs.KappaFissionXS to be used to set the kappa-fission cross section for this XSdata object.

Parameters:
  • kappa_fission (openmc.mgxs.KappaFissionXS) – MGXS Object containing the kappa-fission cross section for the domain of interest.
  • nuclide (str) – Individual nuclide (or ‘total’ if obtaining material-wise data) to gather data for. Defaults to ‘total’.
  • xs_type ({'macro', 'micro'}) – Provide the macro or micro cross section in units of cm^-1 or barns. Defaults to ‘macro’.
set_multiplicity_mgxs(nuscatter, scatter=None, nuclide='total', xs_type='macro')[source]

This method allows for either the direct use of only an openmc.mgxs.MultiplicityMatrixXS OR an openmc.mgxs.NuScatterMatrixXS and openmc.mgxs.ScatterMatrixXS to be used to set the scattering multiplicity for this XSdata object. Multiplicity, in OpenMC parlance, is a factor used to account for the production of neutrons introduced by scattering multiplication reactions, i.e., (n,xn) events. In this sense, the multiplication matrix is simply defined as the ratio of the nu-scatter and scatter matrices.

Parameters:
  • nuscatter ({openmc.mgxs.NuScatterMatrixXS,) – openmc.mgxs.MultiplicityMatrixXS} MGXS Object containing the matrix cross section for the domain of interest.
  • scatter (openmc.mgxs.ScatterMatrixXS) – MGXS Object containing the scattering matrix cross section for the domain of interest.
  • nuclide (str) – Individual nuclide (or ‘total’ if obtaining material-wise data) to gather data for. Defaults to ‘total’.
  • xs_type ({'macro', 'micro'}) – Provide the macro or micro cross section in units of cm^-1 or barns. Defaults to ‘macro’.
set_nu_fission_mgxs(nu_fission, nuclide='total', xs_type='macro')[source]

This method allows for an openmc.mgxs.NuFissionXS to be used to set the nu-fission cross section for this XSdata object.

Parameters:
  • nu_fission (openmc.mgxs.NuFissionXS) – MGXS Object containing the nu-fission cross section for the domain of interest.
  • nuclide (str) – Individual nuclide (or ‘total’ if obtaining material-wise data) to gather data for. Defaults to ‘total’.
  • xs_type ({'macro', 'micro'}) – Provide the macro or micro cross section in units of cm^-1 or barns. Defaults to ‘macro’.
set_scatter_mgxs(scatter, nuclide='total', xs_type='macro')[source]

This method allows for an openmc.mgxs.ScatterMatrixXS to be used to set the scatter matrix cross section for this XSdata object. If the XSdata.order attribute has not yet been set, then it will be set based on the properties of scatter.

Parameters:
  • scatter (openmc.mgxs.ScatterMatrixXS) – MGXS Object containing the scatter matrix cross section for the domain of interest.
  • nuclide (str) – Individual nuclide (or ‘total’ if obtaining material-wise data) to gather data for. Defaults to ‘total’.
  • xs_type ({'macro', 'micro'}) – Provide the macro or micro cross section in units of cm^-1 or barns. Defaults to ‘macro’.
set_total_mgxs(total, nuclide='total', xs_type='macro')[source]

This method allows for an openmc.mgxs.TotalXS or openmc.mgxs.TransportXS to be used to set the total cross section for this XSdata object.

Parameters:
  • total (openmc.mgxs.TotalXS or openmc.mgxs.TransportXS) – MGXS Object containing the total or transport cross section for the domain of interest.
  • nuclide (str) – Individual nuclide (or ‘total’ if obtaining material-wise data) to gather data for. Defaults to ‘total’.
  • xs_type ({'macro', 'micro'}) – Provide the macro or micro cross section in units of cm^-1 or barns. Defaults to ‘macro’.