diff --git a/openmc/cell.py b/openmc/cell.py index 4b419e1c6..0cea73b32 100644 --- a/openmc/cell.py +++ b/openmc/cell.py @@ -634,6 +634,9 @@ class Cell(IDManagerMixin): if self.rotation is not None: element.set("rotation", ' '.join(map(str, self.rotation.ravel()))) + if self.volume is not None: + element.set("volume", str(self.volume)) + return element @classmethod @@ -687,6 +690,9 @@ class Cell(IDManagerMixin): c.temperature = [float(t_i) for t_i in t.split()] else: c.temperature = float(t) + v = get_text(elem, 'volume') + if v is not None: + c.volume = float(v) for key in ('temperature', 'rotation', 'translation'): value = get_text(elem, key) if value is not None: