Fix use of get_nuclide_atom_densities in Material.activity property

This commit is contained in:
Paul Romano 2022-06-28 08:00:16 -05:00
parent 19494cccd0
commit 3c20b1e415

View file

@ -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