openmc.deplete.Nuclide

class openmc.deplete.Nuclide(name=None)[source]

Decay modes, reactions, and fission yields for a single nuclide.

Parameters:

name (str, optional) – GND name of this nuclide, e.g. "He4", "Am242_m1"

Variables:
  • name (str or None) – Name of nuclide.
  • half_life (float or None) – Half life of nuclide in [s].
  • decay_energy (float) – Energy deposited from decay in [eV].
  • n_decay_modes (int) – Number of decay pathways.
  • decay_modes (list of openmc.deplete.DecayTuple) – Decay mode information. Each element of the list is a named tuple with attributes ‘type’, ‘target’, and ‘branching_ratio’.
  • n_reaction_paths (int) – Number of possible reaction pathways.
  • reactions (list of openmc.deplete.ReactionTuple) – Reaction information. Each element of the list is a named tuple with attribute ‘type’, ‘target’, ‘Q’, and ‘branching_ratio’.
  • yield_data (FissionYieldDistribution or None) – Fission product yields at tabulated energies for this nuclide. Can be treated as a nested dictionary {energy: {product: yield}}
  • yield_energies (tuple of float or None) – Energies at which fission product yields exist
classmethod from_xml(element, fission_q=None)[source]

Read nuclide from an XML element.

Parameters:
  • element (xml.etree.ElementTree.Element) – XML element to write nuclide data to
  • fission_q (None or float) – User-supplied fission Q value [eV]. Will be read from the element if not given
Returns:

nuc – Instance of a nuclide

Return type:

openmc.deplete.Nuclide

to_xml_element()[source]

Write nuclide to XML element.

Returns:elem – XML element to write nuclide data to
Return type:xml.etree.ElementTree.Element
validate(strict=True, quiet=False, tolerance=0.0001)[source]

Search for possible inconsistencies

The following checks are performed:

  1. for all non-fission reactions and decay modes, does the sum of branching ratios equal about one?
  2. for fission reactions, does the sum of fission yield fractions equal about two?
Parameters:
  • strict (bool, optional) – Raise exceptions at the first inconsistency if true. Otherwise mark a warning
  • quiet (bool, optional) – Flag to suppress warnings and return immediately at the first inconsistency. Used only if strict does not evaluate to True.
  • tolerance (float, optional) –

    Absolute tolerance for comparisons. Used to compare computed value x to intended value y as:

    valid = (y - tolerance <= x <= y + tolerance)
    
Returns:

valid – True if no inconsistencies were found

Return type:

bool

Raises:

ValueError – If strict evaluates to True and an inconistency was found