From ecbc05ce14fc4a0499ead169d03ef8fa0ca13e69 Mon Sep 17 00:00:00 2001 From: Alec Golas Date: Thu, 31 Oct 2019 16:46:49 -0400 Subject: [PATCH 1/2] Update operator.py Changed burnable material volume to volume of material instance --- openmc/deplete/operator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openmc/deplete/operator.py b/openmc/deplete/operator.py index e3a767e574..d8aeb33fd2 100644 --- a/openmc/deplete/operator.py +++ b/openmc/deplete/operator.py @@ -341,7 +341,7 @@ class Operator(TransportOperator): if mat.volume is None: raise RuntimeError("Volume not specified for depletable " "material with ID={}.".format(mat.id)) - volume[str(mat.id)] = mat.volume + volume[str(mat.id)] = mat.volume/mat.num_instances self.heavy_metal += mat.fissionable_mass # Make sure there are burnable materials From b23488325d605fae7a1d4bb63bfaf929e081b95b Mon Sep 17 00:00:00 2001 From: Alec Golas <43121733+awgolas@users.noreply.github.com> Date: Sun, 3 Nov 2019 19:07:29 -0500 Subject: [PATCH 2/2] Update operator.py --- openmc/deplete/operator.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/openmc/deplete/operator.py b/openmc/deplete/operator.py index d8aeb33fd2..5ce725a67b 100644 --- a/openmc/deplete/operator.py +++ b/openmc/deplete/operator.py @@ -309,7 +309,12 @@ class Operator(TransportOperator): # Assign distribmats to cells for cell in self.geometry.get_all_material_cells().values(): if cell.fill in distribmats and cell.num_instances > 1: - cell.fill = [cell.fill.clone() + mat = cell.fill + if mat.volume is None: + raise RuntimeError("Volume not specified for depletable " + "material with ID={}.".format(mat.id)) + mat.volume /= mat.num_instances + cell.fill = [mat.clone() for i in range(cell.num_instances)] def _get_burnable_mats(self): @@ -341,7 +346,7 @@ class Operator(TransportOperator): if mat.volume is None: raise RuntimeError("Volume not specified for depletable " "material with ID={}.".format(mat.id)) - volume[str(mat.id)] = mat.volume/mat.num_instances + volume[str(mat.id)] = mat.volume self.heavy_metal += mat.fissionable_mass # Make sure there are burnable materials