Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions openmc/deplete/chain.py
Original file line number Diff line number Diff line change
Expand Up @@ -1237,6 +1237,54 @@ def reduce(self, initial_isotopes, level=None):

return new_chain

def get_decay_daughters(self, nuclide, max_half_life=None):
"""Return all nuclides reachable via decay from a given nuclide.

Unlike :meth:`reduce`, this follows only decay paths (not
reactions such as neutron capture) and returns a set of nuclide
names rather than a new :class:`Chain`.

Parameters
----------
nuclide : str
Name of the parent nuclide.
max_half_life : float, optional
Maximum daughter half-life in seconds. Stops descending a
branch when a daughter's half-life exceeds this value. If
None, all radioactive daughters are returned regardless of
half-life.

Returns
-------
set of str
Names of all decay daughters reachable from the parent.

"""
daughters = set()
stack = [nuclide]
visited = set()
while stack:
name = stack.pop()
if name in visited:
continue
visited.add(name)
if name not in self.nuclide_dict:
continue
for mode in self[name].decay_modes:
target = mode.target
if target is None or target in visited:
continue
if target not in self.nuclide_dict:
continue
target_nuc = self[target]
if target_nuc.half_life is None or target_nuc.half_life <= 0:
continue
if max_half_life is not None and target_nuc.half_life >= max_half_life:
continue
daughters.add(target)
stack.append(target)
return daughters

def _follow(self, isotopes, level):
"""Return all isotopes present up to depth level"""
found = isotopes.copy()
Expand Down
39 changes: 38 additions & 1 deletion openmc/material.py
Original file line number Diff line number Diff line change
Expand Up @@ -1597,6 +1597,7 @@ def waste_disposal_rating(
limits: str | dict[str, float] = 'Fetter',
metal: bool = False,
by_nuclide: bool = False,
chain=None,
) -> float | dict[str, float]:
"""Return the waste disposal rating for the material.

Expand Down Expand Up @@ -1630,6 +1631,37 @@ def waste_disposal_rating(
short-lived radionuclides
- 'NRC_short_C': Uses the 10 CFR 61.55 class C limits for
short-lived radionuclides
The following options use clearance values from the German
Strahlenschutzverordnung (StrlSchV) 2018, Anlage 4, Tabelle 1.
These limits are in [Bq/g] and the material activity will be
compared using the same units.

- 'StrlSchV_unrestricted': Unrestricted clearance of solid and
liquid substances (column 3)
- 'StrlSchV_metal_recycling': Metal scrap recycling (column 14)
- 'StrlSchV_landfill_100': Landfill disposal for facilities
receiving ≤100 Mg/a (column 8)
- 'StrlSchV_landfill_1000': Landfill disposal for facilities
receiving ≤1000 Mg/a (column 10)
- 'StrlSchV_incineration_100': Incineration for facilities
receiving ≤100 Mg/a (column 9)
- 'StrlSchV_incineration_1000': Incineration for facilities
receiving ≤1000 Mg/a (column 11)
- 'StrlSchV_soil': Soil surface clearance (column 7)
- 'StrlSchV_rubble': Building rubble clearance for >1000 Mg/a
(column 6)

.. note::
Some nuclides in Anlage 4 are listed with a '+' suffix,
indicating that their clearance value includes daughter
nuclides in secular equilibrium. When a depletion chain is
provided via the ``chain`` parameter, daughters in secular
equilibrium are automatically excluded from the
sum-of-fractions to avoid double-counting. Without a
chain, all nuclides with clearance entries are counted
individually, which may overestimate the rating for some
decay chains.

metal : bool, optional
Whether or not the material is in metal form (only applicable for
NRC based limits)
Expand All @@ -1639,6 +1671,11 @@ def waste_disposal_rating(
nuclide names and the values are the waste disposal ratings for each
nuclide. If False, a single float value is returned that represents
the overall waste disposal rating for the material.
chain : openmc.deplete.Chain, optional
Depletion chain used to identify daughter nuclides in secular
equilibrium for StrlSchV limits. When provided, daughters
covered by a parent's '+' clearance value are excluded from
the sum-of-fractions to avoid double-counting.

Returns
-------
Expand All @@ -1651,7 +1688,7 @@ def waste_disposal_rating(
Material.waste_classification()

"""
return waste._waste_disposal_rating(self, limits, metal, by_nuclide)
return waste._waste_disposal_rating(self, limits, metal, by_nuclide, chain)

def clone(self, memo: dict | None = None) -> Material:
"""Create a copy of this material with a new unique ID.
Expand Down
Loading
Loading