openmc.deplete.transfer_rates.ExternalSourceRates¶
- class openmc.deplete.transfer_rates.ExternalSourceRates(operator, materials, number_of_timesteps)[source]¶
Class for defining external source rates.
An instance of this class can be passed directly to an instance of one of the
openmc.deplete.Integrator
classes.New in version 0.15.3.
- Parameters
operator (openmc.TransportOperator) – Depletion operator
materials (openmc.Materials) – OpenMC materials.
number_of_timesteps (int) – Total number of depletion timesteps
- Variables
burnable_mats (list of str) – All burnable material IDs.
local_mats (list of str) – All burnable material IDs being managed by a single process
external_timesteps (list of int) – Container of all timesteps indeces with an external rate defined.
external_rates (dict of str to dict) – Container of timesteps external source rates, and components (elements and/or nuclides)
- reformat_nuclide_vectors(vectors)[source]¶
Remove last element of nuclide vector that was added for handling external source rates by the depletion solver.
- Parameters
vectors (list of array) – List of nuclides vector to reformat
- set_external_source_rate(material: str | int | openmc.material.Material, composition: dict[str, float], rate: float, rate_units: str = 'g/s', timesteps: Optional[Sequence[int]] = None)[source]¶
Set element and/or nuclide composition vector external source rates to a 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. Default to None, which means the external source rate is set for all timesteps.