From cff1262624d18264c0253e4268e80c125f343b68 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Tue, 2 Jun 2020 07:05:37 -0500 Subject: [PATCH] Ensure that unstable nuclides with no listed decay modes still decay --- openmc/deplete/chain.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/openmc/deplete/chain.py b/openmc/deplete/chain.py index b89e04e70..6ba481504 100644 --- a/openmc/deplete/chain.py +++ b/openmc/deplete/chain.py @@ -490,16 +490,14 @@ class Chain: fission_yields = self.get_default_fission_yields() for i, nuc in enumerate(self.nuclides): - - if nuc.n_decay_modes != 0: - # Decay paths - # Loss + # Loss from radioactive decay + if nuc.half_life is not None: decay_constant = math.log(2) / nuc.half_life - if decay_constant != 0.0: matrix[i, i] -= decay_constant - # Gain + # Gain from radioactive decay + if nuc.n_decay_modes != 0: for _, target, branching_ratio in nuc.decay_modes: # Allow for total annihilation for debug purposes if target is not None: