openmc.deplete.FissionYield

class openmc.deplete.FissionYield(products, yields)[source]

Mapping for fission yields of a parent at a specific energy

Separated to support nested dictionary-like behavior for FissionYieldDistribution, and allowing math operations on a single vector of yields. Can in turn be used like a dictionary to fetch fission yields. Supports multiplication of a scalar to scale the fission yields and addition of another set of yields.

Does not support resizing / inserting new products that do not exist.

Parameters:
  • products (tuple of str) – Products for this specific distribution
  • yields (numpy.ndarray) – Fission product yields for each product in products
Variables:
  • products (tuple of str) – Products for this specific distribution
  • yields (numpy.ndarray) – Fission product yields for each product in products

Examples

>>> import numpy
>>> fy_vector = FissionYield(
...     ("Xe135", "I129", "Sm149"),
...     numpy.array((0.002, 0.001, 0.0003)))
>>> fy_vector["Xe135"]
0.002
>>> new = fy_vector.copy()
>>> fy_vector *= 2
>>> fy_vector["Xe135"]
0.004
>>> new["Xe135"]
0.002
>>> (new + fy_vector)["Sm149"]
0.0009
>>> dict(new)
{"Xe135": 0.002, "I129": 0.001, "Sm149": 0.0003}
items()[source]

Return pairs of product, yield