openmc.deplete.MicroXS

class openmc.deplete.MicroXS(data: ndarray, nuclides: List[str], reactions: List[str])[source]

Microscopic cross section data for use in transport-independent depletion.

New in version 0.13.1.

Changed in version 0.14.0: Class was heavily refactored and no longer subclasses pandas.DataFrame.

Parameters
  • data (numpy.ndarray of floats) – 3D array containing microscopic cross section values for each nuclide, reaction, and energy group. Cross section values are assumed to be in [b], and indexed by [nuclide, reaction, energy group]

  • nuclides (list of str) – List of nuclide symbols for that have data for at least one reaction.

  • reactions (list of str) – List of reactions. All reactions must match those in openmc.deplete.chain.REACTIONS

classmethod from_csv(csv_file, **kwargs)[source]

Load data from a comma-separated values (csv) file.

Parameters
  • csv_file (str) – Relative path to csv-file containing microscopic cross section data. Cross section values are assumed to be in [b]

  • **kwargs (dict) – Keyword arguments to pass to pandas.read_csv().

Return type

MicroXS

classmethod from_multigroup_flux(energies: Union[Sequence[float], str], multigroup_flux: Sequence[float], chain_file: Optional[Union[str, PathLike]] = None, temperature: float = 293.6, nuclides: Optional[Sequence[str]] = None, reactions: Optional[Sequence[str]] = None, **init_kwargs: dict) MicroXS[source]

Generated microscopic cross sections from a known flux.

The size of the MicroXS matrix depends on the chain file and cross sections available. MicroXS entry will be 0 if the nuclide cross section is not found.

New in version 0.15.0.

Parameters
  • energies (iterable of float or str) – Energy group boundaries in [eV] or the name of the group structure

  • multi_group_flux (iterable of float) – Energy-dependent multigroup flux values

  • chain_file (str, optional) – Path to the depletion chain XML file that will be used in depletion simulation. Defaults to openmc.config['chain_file'].

  • temperature (int, optional) – Temperature for cross section evaluation in [K].

  • nuclides (list of str, optional) – Nuclides to get cross sections for. If not specified, all burnable nuclides from the depletion chain file are used.

  • reactions (list of str, optional) – Reactions to get cross sections for. If not specified, all neutron reactions listed in the depletion chain file are used.

  • **init_kwargs (dict) – Keyword arguments passed to openmc.lib.init()

Return type

MicroXS

to_csv(*args, **kwargs)[source]

Write data to a comma-separated values (csv) file

Parameters