# openmc.deplete.Operator¶

class openmc.deplete.Operator(geometry, settings, chain_file=None, prev_results=None, diff_burnable_mats=False, normalization_mode='fission-q', fission_q=None, dilute_initial=1000.0, fission_yield_mode='constant', fission_yield_opts=None, reaction_rate_mode='direct', reaction_rate_opts=None, reduce_chain=False, reduce_chain_level=None)[source]

OpenMC transport operator for depletion.

Instances of this class can be used to perform depletion using OpenMC as the transport operator. Normally, a user needn’t call methods of this class directly. Instead, an instance of this class is passed to an integrator class, such as openmc.deplete.CECMIntegrator.

Parameters: geometry (openmc.Geometry) – OpenMC geometry object settings (openmc.Settings) – OpenMC Settings object chain_file (str, optional) – Path to the depletion chain XML file. Defaults to the file listed under depletion_chain in OPENMC_CROSS_SECTIONS environment variable. prev_results (ResultsList, 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. Default: False. normalization_mode ({"energy-deposition", "fission-q", "source-rate"}) – Indicate how tally results should be normalized. "energy-deposition" computes the total energy deposited in the system and uses the ratio of the power to the energy produced as a normalization factor. "fission-q" uses the fission Q values from the depletion chain to compute the total energy deposited. "source-rate" normalizes tallies based on the source rate (for fixed source calculations). fission_q (dict, optional) – Dictionary of nuclides and their fission Q values [eV]. If not given, values will be pulled from the chain_file. Only applicable if "normalization_mode" == "fission-q" 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. Defaults to 1.0e3. fission_yield_mode ({"constant", "cutoff", "average"}) – Key indicating what fission product yield scheme to use. The key determines what fission energy helper is used: ”constant”: ConstantFissionYieldHelper ”cutoff”: FissionYieldCutoffHelper ”average”: AveragedFissionYieldHelper The documentation on these classes describe their methodology and differences. Default: "constant" fission_yield_opts (dict of str to option, optional) – Optional arguments to pass to the helper determined by fission_yield_mode. Will be passed directly on to the helper. Passing a value of None will use the defaults for the associated helper. reaction_rate_mode ({"direct", "flux"}, optional) – Indicate how one-group reaction rates should be calculated. The “direct” method tallies transmutation reaction rates directly. The “flux” method tallies a multigroup flux spectrum and then collapses one-group reaction rates after a transport solve (with an option to tally some reaction rates directly). New in version 0.12.1. reaction_rate_opts (dict, optional) – Keyword arguments that are passed to the reaction rate helper class. When reaction_rate_mode is set to “flux”, energy group boundaries can be set using the “energies” key. See the FluxCollapseHelper class for all options. New in version 0.12.1. reduce_chain (bool, optional) – If True, use openmc.deplete.Chain.reduce() to reduce the depletion chain up to reduce_chain_level. Default is False. New in version 0.12. 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. New in version 0.12. geometry (openmc.Geometry) – OpenMC geometry object settings (openmc.Settings) – OpenMC settings object 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 (ResultsList or None) – Results from a previous depletion calculation. None if no results are to be used. diff_burnable_mats (bool) – Whether to differentiate burnable materials with multiple instances
__call__(vec, source_rate)[source]

Runs a simulation.

Simulation will abort under the following circumstances:

1. No energy is computed using OpenMC tallies.
Parameters: vec (list of numpy.ndarray) – Total atoms to be used in function. source_rate (float) – Power in [W] or source rate in [neutron/sec] Eigenvalue and reaction rates resulting from transport operator openmc.deplete.OperatorResult
finalize()[source]

Finalize a depletion simulation and release resources.

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()[source]

Performs final setup and returns initial condition.

Returns: Total density for initial conditions. list of numpy.ndarray
static write_bos_data(step)[source]

Write a state-point file with beginning of step data

Parameters: step (int) – Current depletion step including restarts