openmc.deplete.Nuclide¶
- class openmc.deplete.Nuclide(name=None)[source]¶
Decay modes, reactions, and fission yields for a single nuclide.
- Parameters
name (str, optional) – GNDS 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’.
sources (dict) – Dictionary mapping particle type as string to energy distribution of decay source represented as
openmc.stats.Univariate
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
- add_reaction(type, target, Q, branching_ratio)[source]¶
Add transmutation reaction to the nuclide
- Parameters
type (str) – Type of the reaction, e.g., ‘fission’
target (str or None) – Nuclide resulting from reaction. A value of
None
implies either no single target, e.g. from fission, or that the target nuclide is not considered in the current depletion chainQ (float) – Q value of the reaction in [eV]
branching_ratio (float) – Branching ratio of the reaction
- classmethod from_xml(element, root=None, fission_q=None)[source]¶
Read nuclide from an XML element.
- Parameters
element (lxml.etree._Element) – XML element to read nuclide data from
root (lxml.etree._Element, optional) – Root XML element for chain file (only used when fission product yields are borrowed from another parent)
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
- to_xml_element()[source]¶
Write nuclide to XML element.
- Returns
elem – XML element to write nuclide data to
- Return type
lxml.etree._Element
- validate(strict=True, quiet=False, tolerance=0.0001)[source]¶
Search for possible inconsistencies
The following checks are performed:
for all non-fission reactions and decay modes, does the sum of branching ratios equal about one?
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 toTrue
.tolerance (float, optional) –
Absolute tolerance for comparisons. Used to compare computed value
x
to intended valuey
as:valid = (y - tolerance <= x <= y + tolerance)
- Returns
valid – True if no inconsistencies were found
- Return type
- Raises
ValueError – If
strict
evaluates toTrue
and an inconistency was found
See also