From ecebe25f367e9482b8c475f9484c32cddd2be338 Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Tue, 7 Feb 2023 10:23:28 +0000 Subject: [PATCH] making error message more helpful with material name --- openmc/deplete/openmc_operator.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openmc/deplete/openmc_operator.py b/openmc/deplete/openmc_operator.py index b00d83127..6233322ab 100644 --- a/openmc/deplete/openmc_operator.py +++ b/openmc/deplete/openmc_operator.py @@ -223,8 +223,9 @@ class OpenMCOperator(TransportOperator): if mat.depletable: burnable_mats.add(str(mat.id)) if mat.volume is None: - raise RuntimeError("Volume not specified for depletable " - "material with ID={}.".format(mat.id)) + msh = ("Volume not specified for depletable material with " + f"ID={mat.id}. Name={mat.name}") + raise RuntimeError(msh) volume[str(mat.id)] = mat.volume self.heavy_metal += mat.fissionable_mass @@ -242,7 +243,6 @@ class OpenMCOperator(TransportOperator): for nuc in model_nuclides: if nuc not in nuclides: nuclides.append(nuc) - return burnable_mats, volume, nuclides def _load_previous_results(self):