openmc.deplete.SICELIIntegrator
- class openmc.deplete.SICELIIntegrator(operator: TransportOperator, timesteps: Sequence[float], power: float | Sequence[float] | None = None, power_density: float | Sequence[float] | None = None, source_rates: Sequence[float] | None = None, timestep_units: str = 's', n_steps: int = 10, solver: str = 'cram48', continue_timesteps: bool = False)[source]
Deplete using the SI-CE/LI CFQ4 algorithm.
Implements the stochastic implicit CE/LI predictor-corrector algorithm using the fourth order commutator-free integrator.
Detailed algorithm can be found in section 3.2 in Colin Josey’s thesis.
- Parameters:
operator (openmc.deplete.abc.TransportOperator) – Operator to perform transport simulations
timesteps (iterable of float or iterable of tuple) – Array of timesteps. Note that values are not cumulative. The units are specified by the timestep_units argument when timesteps is an iterable of float. Alternatively, units can be specified for each step by passing an iterable of (value, unit) tuples.
power (float or iterable of float, optional) – Power of the reactor in [W]. A single value indicates that the power is constant over all timesteps. An iterable indicates potentially different power levels for each timestep. For a 2D problem, the power can be given in [W/cm] as long as the “volume” assigned to a depletion material is actually an area in [cm^2]. Either
power,power_density, orsource_ratesmust be specified.power_density (float or iterable of float, optional) – Power density of the reactor in [W/gHM]. It is multiplied by initial heavy metal inventory to get total power if
poweris not specified.source_rates (float or iterable of float, optional) –
Source rate in [neutron/sec] or neutron flux in [neutron/s-cm^2] for each interval in
timestepsAdded in version 0.12.1.
timestep_units ({'s', 'min', 'h', 'd', 'MWd/kg'}) – Units for values specified in the timesteps argument. ‘s’ means seconds, ‘min’ means minutes, ‘h’ means hours, and ‘MWd/kg’ indicates that the values are given in burnup (MW-d of energy deposited per kilogram of initial heavy metal).
n_steps (int, optional) – Number of stochastic iterations per depletion interval. Must be greater than zero. Default : 10
solver (str or callable, optional) –
If a string, must be the name of the solver responsible for solving the Bateman equations. Current options are:
cram16- 16th order IPF CRAMcram48- 48th order IPF CRAM [default]
If a function or other callable, must adhere to the requirements in
solver.Added in version 0.12.
continue_timesteps (bool, optional) –
Whether or not to treat the current solve as a continuation of a previous simulation. Defaults to False. If False, all time steps and source rates will be run in an append fashion and will run after whatever time steps exist, if any. If True, the timesteps provided to the Integrator must match exactly those that exist in the prev_results passed to the Opereator. The power, power_density, or source_rates must match as well. The method of specifying power, power_density, or source_rates should be the same as the initial run.
Added in version 0.15.1.
- Variables:
operator (openmc.deplete.abc.TransportOperator) – Operator to perform transport simulations
chain (openmc.deplete.Chain) – Depletion chain
timesteps (iterable of float) – Size of each depletion interval in [s]
power (iterable of float) – Power of the reactor in [W] for each interval in
timestepsn_steps (int) – Number of stochastic iterations per depletion interval
solver (callable) –
Function that will solve the Bateman equations \(\frac{\partial}{\partial t}\vec{n} = A_i\vec{n}_i\) with a step size \(t_i\). Can be configured using the
solverargument. User-supplied functions are expected to have the following signature:solver(A, n0, t) -> n1whereAis ascipy.sparse.csc_matrixmaking up the depletion matrixn0is a 1-Dnumpy.ndarrayof initial compositions for a given material in atoms/cm3tis a float of the time step size in seconds, andn1is anumpy.ndarrayof compositions at the next time step. Expected to be of the same shape asn0
Added in version 0.12.
- __call__(n_bos, bos_rates, dt, source_rate, _i=None)[source]
Perform the integration across one time step
- Parameters:
n_bos (list of numpy.ndarray) – List of atom number arrays for each material. Each array in the list contains the number of [atom] of each nuclide.
bos_rates (openmc.deplete.ReactionRates) – Reaction rates from operator
dt (float) – Time in [s] for the entire depletion interval
source_rate (float) – Power in [W] or source rate in [neutron/sec]
_i (int, optional) – Current depletion step index. Not used
- Returns:
proc_time (float) – Time spent in CRAM routines for all materials in [s]
n_end (list of numpy.ndarray) – Concentrations at end of interval
op_result (openmc.deplete.OperatorResult) – Eigenvalue and reaction rates from intermediate transport simulations
- __iter__()
Return pair of time step in [s] and source rate in [W] or [neutron/sec]
- __len__()
Return integer number of depletion intervals
- add_external_source_rate(material: str | int | Material, composition: dict[str, float], rate: float, rate_units: str = 'g/s', timesteps: Sequence[int] | None = None)
Add external source rates to depletable material.
- Parameters:
material (openmc.Material or str or int) – Depletable material
composition (dict of str to float) – External source rate composition vector, where key can be an element or a nuclide and value the corresponding weight percent.
rate (float) – External source rate in units of mass per time. A positive or negative value corresponds to a feed or removal rate, respectively.
units ({'g/s', 'g/min', 'g/h', 'g/d', 'g/a'}) – Units for values specified in the rate argument. ‘s’ for seconds, ‘min’ for minutes, ‘h’ for hours, ‘a’ for Julian years.
timesteps (list of int, optional) – List of timestep indices where to set external source rates. Defaults to None, which means the external source rate is set for all timesteps.
- add_redox(material, buffer, oxidation_states, timesteps=None)
Add redox control to depletable material.
- Parameters:
material (openmc.Material or str or int) – Depletable material
buffer (dict) – Dictionary of buffer nuclides used to maintain redox balance. Keys are nuclide names (strings) and values are their respective fractions (float) that collectively sum to 1.
oxidation_states (dict) – User-defined oxidation states for elements. Keys are element symbols (e.g., ‘H’, ‘He’), and values are their corresponding oxidation states as integers (e.g., +1, 0).
timesteps (list of int, optional) – List of timestep indices where to set external source rates. Defaults to None, which means the external source rate is set for all timesteps.
- add_transfer_rate(material: str | int | Material, components: Sequence[str], transfer_rate: float, transfer_rate_units: str = '1/s', timesteps: Sequence[int] | None = None, destination_material: str | int | Material | None = None)
Add transfer rates to depletable material.
- Parameters:
material (openmc.Material or str or int) – Depletable material
components (list of str) – List of strings of elements and/or nuclides that share transfer rate. A transfer rate for a nuclide cannot be added to a material alongside a transfer rate for its element and vice versa.
transfer_rate (float) – Rate at which elements are transferred. A positive or negative values set removal of feed rates, respectively.
transfer_rate_units ({'1/s', '1/min', '1/h', '1/d', '1/a'}) – Units for values specified in the transfer_rate argument. ‘s’ means seconds, ‘min’ means minutes, ‘h’ means hours, ‘a’ means Julian years.
timesteps (list of int, optional) – List of timestep indices where to set external source rates. Defaults to None, which means the external source rate is set for all timesteps.
destination_material (openmc.Material or str or int, Optional) – Destination material to where nuclides get fed.
- integrate(output: bool = True, path: str | PathLike = 'depletion_results.h5', write_rates: bool = False)
Perform the entire depletion process across all steps
- Parameters:
output (bool, optional) – Indicate whether to display information about progress
path (PathLike) –
Path to file to write. Defaults to ‘depletion_results.h5’.
Added in version 0.15.0.
write_rates (bool, optional) –
Whether reaction rates should be written to the results file for each step. Defaults to
Falseto reduce file size.Added in version 0.15.3.