openmc.deplete.openmc_operator.OpenMCOperator

class openmc.deplete.openmc_operator.OpenMCOperator(materials=None, cross_sections=None, chain_file=None, prev_results=None, diff_burnable_mats=False, fission_q=None, dilute_initial=0.0, helper_kwargs=None, reduce_chain=False, reduce_chain_level=None)[source]

Abstract class holding OpenMC-specific functions for running depletion calculations.

Specific classes for running transport-coupled or transport-independent depletion calculations are implemented as subclasses of OpenMCOperator.

Parameters
  • materials (openmc.Materials) – List of all materials in the model

  • cross_sections (str or pandas.DataFrame) – Path to continuous energy cross section library, or object containing one-group cross-sections.

  • chain_file (str, optional) – Path to the depletion chain XML file. Defaults to openmc.config[‘chain_file’].

  • prev_results (Results, optional) – Results from a previous depletion calculation. If this argument is specified, the depletion calculation will start from the latest state in the previous results.

  • diff_burnable_mats (bool, optional) – Whether to differentiate burnable materials with multiple instances. Volumes are divided equally from the original material volume.

  • fission_q (dict, optional) – Dictionary of nuclides and their fission Q values [eV].

  • 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 decay chain. Only done for nuclides with reaction rates.

  • helper_kwargs (dict) – Keyword arguments for helper classes

  • reduce_chain (bool, optional) – If True, use openmc.deplete.Chain.reduce() to reduce the depletion chain up to reduce_chain_level.

  • reduce_chain_level (int, optional) – Depth of the search when reducing the depletion chain. Only used if reduce_chain evaluates to true. The default value of None implies no limit on the depth.

Variables
  • materials (openmc.Materials) – All materials present in the model

  • cross_sections (str or MicroXS) – Path to continuous energy cross section library, or object containing one-group cross-sections.

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

  • output_dir (pathlib.Path) – Path to output directory to save results.

  • round_number (bool) – Whether or not to round output to OpenMC to 8 digits. Useful in testing, as OpenMC is incredibly sensitive to exact values.

  • number (openmc.deplete.AtomNumber) – Total number of atoms in simulation.

  • nuclides_with_data (set of str) – A set listing all unique nuclides available from cross_sections.xml.

  • chain (openmc.deplete.Chain) – The depletion chain information necessary to form matrices and tallies.

  • reaction_rates (openmc.deplete.ReactionRates) – Reaction rates from the last operator step.

  • burnable_mats (list of str) – All burnable material IDs

  • heavy_metal (float) – Initial heavy metal inventory [g]

  • local_mats (list of str) – All burnable material IDs being managed by a single process

  • prev_res (Results or None) – Results from a previous depletion calculation. None if no results are to be used.

get_results_info()[source]

Returns volume list, material lists, and nuc lists.

Returns

  • volume (dict of str float) – Volumes corresponding to materials in full_burn_dict

  • nuc_list (list of str) – A list of all nuclide names. Used for sorting the simulation.

  • burn_list (list of int) – A list of all material IDs to be burned. Used for sorting the simulation.

  • full_burn_list (list) – List of all burnable material IDs

initial_condition(materials)[source]

Performs final setup and returns initial condition.

Parameters

materials (list of str) – list of material IDs

Returns

Total density for initial conditions.

Return type

list of numpy.ndarray

write_bos_data(step)[source]

Document beginning of step data for a given step

Called at the beginning of a depletion step and at the final point in the simulation.

Parameters

step (int) – Current depletion step including restarts