openmc.deplete – Depletion

Primary API

The two primary requirements to perform depletion with openmc.deplete are:

  1. A transport operator
  2. A time-integration scheme

The former is responsible for executing a transport code, like OpenMC, and retaining important information required for depletion. The most common examples are reaction rates and power normalization data. The latter is responsible for projecting reaction rates and compositions forward in calendar time across some step size \(\Delta t\), and obtaining new compositions given a power or power density. The Operator is provided to handle communicating with OpenMC. Several classes are provided that implement different time-integration algorithms for depletion calculations, which are described in detail in Colin Josey’s thesis, Development and analysis of high order neutron transport-depletion coupling algorithms.

PredictorIntegrator Deplete using a first-order predictor algorithm.
CECMIntegrator Deplete using the CE/CM algorithm.
CELIIntegrator Deplete using the CE/LI CFQ4 algorithm.
CF4Integrator Deplete using the CF4 algorithm.
EPCRK4Integrator Deplete using the EPC-RK4 algorithm.
LEQIIntegrator Deplete using the LE/QI CFQ4 algorithm.
SICELIIntegrator Deplete using the SI-CE/LI CFQ4 algorithm.
SILEQIIntegrator Deplete using the SI-LE/QI CFQ4 algorithm.

Each of these classes expects a “transport operator” to be passed. An operator specific to OpenMC is available using the following class:

Operator OpenMC transport operator for depletion.

The Operator must also have some knowledge of how nuclides transmute and decay. This is handled by the Chain.

Minimal Example

A minimal example for performing depletion would be:

>>> import openmc
>>> import openmc.deplete
>>> geometry = openmc.Geometry.from_xml()
>>> settings = openmc.Settings.from_xml()

# Representation of a depletion chain
>>> chain_file = "chain_casl.xml"
>>> operator = openmc.deplete.Operator(
...     geometry, settings, chain_file)

# Set up 5 time steps of one day each
>>> dt = [24 * 60 * 60] * 5
>>> power = 1e6  # constant power of 1 MW

# Deplete using mid-point predictor-corrector
>>> cecm = openmc.deplete.CECMIntegrator(
...     operator, dt, power)
>>> cecm.integrate()

Internal Classes and Functions

When running in parallel using mpi4py, the MPI intercommunicator used can be changed by modifying the following module variable. If it is not explicitly modified, it defaults to mpi4py.MPI.COMM_WORLD.


MPI intercommunicator used to call OpenMC library


During a depletion calculation, the depletion chain, reaction rates, and number densities are managed through a series of internal classes that are not normally visible to a user. However, should you find yourself wondering about these classes (e.g., if you want to know what decay modes or reactions are present in a depletion chain), they are documented here. The following classes store data for a depletion chain:

Chain Full representation of a depletion chain.
DecayTuple Decay mode information
Nuclide Decay modes, reactions, and fission yields for a single nuclide.
ReactionTuple Transmutation reaction information
FissionYieldDistribution Energy-dependent fission product yields for a single nuclide
FissionYield Mapping for fission yields of a parent at a specific energy

The Chain class uses information from the following module variable:


Dictionary that maps transmutation reaction names to information needed when a chain is being generated: MT values, the change in atomic/mass numbers resulting from the reaction, and what secondaries are produced.


The following classes are used during a depletion simulation and store auxiliary data, such as number densities and reaction rates for each material.

AtomNumber Stores local material compositions (atoms of each nuclide).
OperatorResult Result of applying transport operator
ReactionRates Reaction rates resulting from a transport operator call
Results Output of a depletion run
ResultsList A list of openmc.deplete.Results objects

The following class and functions are used to solve the depletion equations, with cram.CRAM48() being the default.

cram.IPFCramSolver CRAM depletion solver that uses incomplete partial factorization
cram.CRAM16 Solve depletion equations using IPF CRAM
cram.CRAM48 Solve depletion equations using IPF CRAM
pool.deplete Deplete materials using given reaction rates for a specified time

Boolean switch to enable or disable the use of multiprocessing when solving the Bateman equations. The default is to use multiprocessing, but can cause the simulation to hang in some computing environments, namely due to MPI and networking restrictions. Disabling this option will result in only a single CPU core being used for depletion.


The following classes are used to help the openmc.deplete.Operator compute quantities like effective fission yields, reaction rates, and total system energy.

helpers.AveragedFissionYieldHelper Class that computes fission yields based on average fission energy
helpers.ChainFissionHelper Computes normalization using fission Q values from depletion chain
helpers.ConstantFissionYieldHelper Class that uses a single set of fission yields on each isotope
helpers.DirectReactionRateHelper Class for generating one-group reaction rates with direct tallies
helpers.EnergyScoreHelper Class responsible for obtaining system energy via a tally score
helpers.FissionYieldCutoffHelper Helper that computes fission yields based on a cutoff energy
helpers.FluxCollapseHelper Class that generates one-group reaction rates using multigroup flux

Abstract Base Classes

A good starting point for extending capabilities in openmc.deplete is to examine the following abstract base classes. Custom classes can inherit from abc.TransportOperator to implement alternative schemes for collecting reaction rates and other data from a transport code prior to depleting materials

abc.TransportOperator Abstract class defining a transport operator

The following classes are abstract classes used to pass information from OpenMC simulations back on to the abc.TransportOperator

abc.NormalizationHelper Abstract class for obtaining normalization factor on tallies
abc.FissionYieldHelper Abstract class for processing energy dependent fission yields
abc.ReactionRateHelper Abstract class for generating reaction rates for operators
abc.TalliedFissionYieldHelper Abstract class for computing fission yields with tallies

Custom integrators or depletion solvers can be developed by subclassing from the following abstract base classes:

abc.Integrator Abstract class for solving the time-integration for depletion
abc.SIIntegrator Abstract class for the Stochastic Implicit Euler integrators
abc.DepSystemSolver Abstract class for solving depletion equations