mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-26 21:25:36 -04:00
Corrections to activity calcs
Co-authored-by: Ethan Peterson <ethan.peterson@mit.edu>
This commit is contained in:
parent
98c707ea07
commit
c900e4784e
1 changed files with 8 additions and 16 deletions
|
|
@ -927,23 +927,15 @@ class Material(IDManagerMixin):
|
|||
cv.check_value('normalization', normalization, {'total', 'mass', 'volume'})
|
||||
cv.check_type('by_nuclide', by_nuclide, bool)
|
||||
|
||||
if normalization=='total':
|
||||
activity = {}
|
||||
for nuclide, atoms in self.get_nuclide_atoms().items():
|
||||
inv_seconds = openmc.data.decay_constant(nuclide)
|
||||
activity[nuclide] = inv_seconds * atoms
|
||||
|
||||
elif normalization=='mass':
|
||||
activity = {}
|
||||
for nuclide, atoms in self.get_nuclide_atom_densities().items():
|
||||
inv_seconds = openmc.data.decay_constant(nuclide)
|
||||
activity[nuclide] = (inv_seconds * atoms * 1.0e24) / self.density
|
||||
# normalization must be volume by this stage so else can be used
|
||||
if normalization == 'total':
|
||||
multiplier = self.volume
|
||||
else:
|
||||
activity = {}
|
||||
for nuclide, atoms in self.get_nuclide_atom_densities().items():
|
||||
inv_seconds = openmc.data.decay_constant(nuclide)
|
||||
activity[nuclide] = (inv_seconds * atoms * 1.0e24) / self.volume
|
||||
multiplier = 1 if normalization == 'volume' else 1.0 / self.get_mass_density()
|
||||
|
||||
activity = {}
|
||||
for nuclide, atoms_per_bcm in self.get_nuclide_atom_densities().items():
|
||||
inv_seconds = openmc.data.decay_constant(nuclide)
|
||||
activity[nuclide] = inv_seconds * 1e24 * atoms_per_bcm * multiplier
|
||||
|
||||
if by_nuclide:
|
||||
return activity
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue