remove heavy_metal_mass as we already have material.fissionable_mass

This commit is contained in:
liangjg 2018-12-20 09:41:37 -05:00
parent 6e1114dcab
commit 2d613aab54
2 changed files with 6 additions and 26 deletions

View file

@ -247,7 +247,7 @@ class Operator(TransportOperator):
raise RuntimeError("Volume not specified for depletable "
"material with ID={}.".format(mat.id))
volume[str(mat.id)] = mat.volume
self.heavy_metal += mat.get_heavy_metal_mass()
self.heavy_metal += mat.fissionable_mass
# Make sure there are burnable materials
if not burnable_mats:

View file

@ -249,15 +249,11 @@ class Material(IDManagerMixin):
@property
def fissionable_mass(self):
if self.volume is None:
raise ValueError("Volume must be set in order to determine mass.")
density = 0.0
for nuc, atoms_per_cc in self.get_nuclide_atom_densities().values():
Z = openmc.data.zam(nuc)[0]
if Z >= 90:
density += 1e24 * atoms_per_cc * openmc.data.atomic_mass(nuc) \
/ openmc.data.AVOGADRO
return density*self.volume
mass = 0.0
for nuc, _, _ in self._nuclides:
if openmc.data.zam(nuc)[0] >= 90:
mass += self.get_mass(nuc)
return mass
@classmethod
def from_hdf5(cls, group):
@ -747,22 +743,6 @@ class Material(IDManagerMixin):
raise ValueError("Volume must be set in order to determine mass.")
return self.volume*self.get_mass_density(nuclide)
@property
def get_heavy_metal_mass(self):
"""Return mass of heavy metal nuclides.
Returns
-------
float
Mass in [g]
"""
mass = 0.0
for nuc, _, _ in self._nuclides:
if openmc.data.zam(nuc)[0] >= 90:
mass += self.get_mass(nuc)
return mass
def clone(self, memo=None):
"""Create a copy of this material with a new unique ID.