diff --git a/openmc/material.py b/openmc/material.py index 6edc372161..4b871b77d6 100644 --- a/openmc/material.py +++ b/openmc/material.py @@ -519,6 +519,7 @@ class Material(IDManagerMixin): cv.check_type('nuclide', nuclide, str) cv.check_type('percent', percent, Real) cv.check_value('percent type', percent_type, {'ao', 'wo'}) + cv.check_greater_than('percent', percent, 0, equality=True) if self._macroscopic is not None: msg = 'Unable to add a Nuclide to Material ID="{}" as a ' \ @@ -727,6 +728,7 @@ class Material(IDManagerMixin): cv.check_type('nuclide', element, str) cv.check_type('percent', percent, Real) + cv.check_greater_than('percent', percent, 0, equality=True) cv.check_value('percent type', percent_type, {'ao', 'wo'}) # Make sure element name is just that