openmc.deplete.MicroXS

class openmc.deplete.MicroXS(data=None, index: Axes | None = None, columns: Axes | None = None, dtype: Dtype | None = None, copy: bool | None = None)[source]

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

New in version 0.13.1.

classmethod from_array(nuclides, reactions, data)[source]

Creates a MicroXS object from arrays.

Parameters
  • 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

  • data (ndarray of floats) – Array containing one-group microscopic cross section values for each nuclide and reaction. Cross section values are assumed to be in [b].

Return type

MicroXS

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

Load a MicroXS object from a .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_model(model, reaction_domain, chain_file=None, dilute_initial=1000.0, energy_bounds=(0, 20000000.0), run_kwargs=None)[source]

Generate a one-group cross-section dataframe using OpenMC. Note that the openmc executable must be compiled.

Parameters
  • model (openmc.Model) – OpenMC model object. Must contain geometry, materials, and settings.

  • reaction_domain (openmc.Material or openmc.Cell or openmc.Universe or openmc.RegularMesh) – Domain in which to tally reaction rates.

  • chain_file (str, optional) – Path to the depletion chain XML file that will be used in depletion simulation. Used to determine cross sections for materials not present in the inital composition. Defaults to openmc.config['chain_file'].

  • dilute_initial (float, optional) – Initial atom density [atoms/cm^3] to add for nuclides that are zero in initial condition to ensure they exist in the cross section data. Only done for nuclides with reaction rates.

  • reactions (list of str, optional) – Reaction names to tally

  • energy_bound (2-tuple of float, optional) – Bounds for the energy group.

  • run_kwargs (dict, optional) – Keyword arguments passed to openmc.model.Model.run()

Returns

Cross section data in [b]

Return type

MicroXS