diff --git a/openmc/deplete/operator.py b/openmc/deplete/operator.py index 0e28b7ed33..0e5cc9efa3 100644 --- a/openmc/deplete/operator.py +++ b/openmc/deplete/operator.py @@ -12,6 +12,7 @@ from collections import OrderedDict import os import xml.etree.ElementTree as ET from warnings import warn +from pathlib import Path import numpy as np from uncertainties import ufloat @@ -610,6 +611,14 @@ class Operator(TransportOperator): for mat in materials: mat._nuclides.sort(key=lambda x: nuclides.index(x[0])) + # Grab the cross sections tag from the existing file + mfile = Path("materials.xml") + if mfile.exists(): + tree = ET.parse(str(mfile)) + xs = tree.find('cross_sections') + if xs is not None: + materials.cross_sections = xs.text + materials.export_to_xml() def _get_tally_nuclides(self):