Fix bug in nuclide density retrieval from volume calculation

This commit is contained in:
Paul Romano 2016-09-22 11:42:33 -05:00
parent b6a866f7b7
commit 7528eabeaf

View file

@ -427,9 +427,8 @@ class Cell(object):
else:
if self.volume_information is not None:
volume = self.volume_information['volume'][0]
for full_name, atoms in self.volume_information['atoms']:
name, xs = full_name.split('.')
nuclide = openmc.Nuclide(name, xs)
for name, atoms in self.volume_information['atoms']:
nuclide = openmc.Nuclide(name)
density = 1.0e-24 * atoms[0]/volume # density in atoms/b-cm
nuclides[name] = (nuclide, density)
else: