mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 05:35:49 -04:00
making error message more helpful with material name
This commit is contained in:
parent
6218becb17
commit
ecebe25f36
1 changed files with 3 additions and 3 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue