diff --git a/docs/source/pythonapi/data.rst b/docs/source/pythonapi/data.rst index 95fdfeca9..6f5c006c2 100644 --- a/docs/source/pythonapi/data.rst +++ b/docs/source/pythonapi/data.rst @@ -63,6 +63,7 @@ Core Functions atomic_weight dose_coefficients gnd_name + half_life isotopes linearize thin diff --git a/openmc/material.py b/openmc/material.py index e49696706..70cfa7ade 100644 --- a/openmc/material.py +++ b/openmc/material.py @@ -152,9 +152,10 @@ class Material(IDManagerMixin): for key, value in atoms_per_barn_cm2.items(): half_life = openmc.data.half_life(key) if half_life: - atoms = value[1] * self.volume * 1e24 - activity = math.log(2) * atoms / half_life + atoms = value[1] * self.volume + activity = atoms / half_life total_activity += activity + total_activity = math.log(2) * total_activity * 1e24 return total_activity diff --git a/setup.py b/setup.py index b2e3f160a..477f29dec 100755 --- a/setup.py +++ b/setup.py @@ -32,7 +32,7 @@ kwargs = { # Data files and libraries 'package_data': { 'openmc.lib': ['libopenmc.{}'.format(suffix)], - 'openmc.data': ['mass16.txt', 'BREMX.DAT', '*.h5'], + 'openmc.data': ['mass16.txt', 'BREMX.DAT', 'half_life.json', '*.h5'], 'openmc.data.effective_dose': ['*.txt'] },