From 3c20b1e415e89b1b2b2b8e4953710f0b6851fb62 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Tue, 28 Jun 2022 08:00:16 -0500 Subject: [PATCH] Fix use of get_nuclide_atom_densities in Material.activity property --- openmc/material.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openmc/material.py b/openmc/material.py index ea42d64b16..1341746dc0 100644 --- a/openmc/material.py +++ b/openmc/material.py @@ -86,6 +86,9 @@ class Material(IDManagerMixin): fissionable_mass : float Mass of fissionable nuclides in the material in [g]. Requires that the :attr:`volume` attribute is set. + activity : float + Activity of the material in [Bq]. Requires that the :attr:`volume` + attribute is set. """ @@ -152,7 +155,7 @@ class Material(IDManagerMixin): for key, value in atoms_per_barn_cm.items(): half_life = openmc.data.half_life(key) if half_life: - total_activity += value[1] / half_life + total_activity += value / half_life total_activity *= math.log(2) * 1e24 * self.volume return total_activity