Hi All. I have a depletion run which works correctly in v0.12.2 but doesn’t appear to work in v0.13.0. The only changes I have made to the input are to add lines to create the model object and then change the operator to the new format.
I’ve simplified the case down to the simplest possible example I can give which produces the error - which involves placing different types of fuel pin into a lattice. The error is ‘Could not find material 7 specified on cell 1’ but I also notice that the volume values given in the materials.xml are half in the v0.13 case. Any help toward resolving the issue would be appreciated.
import openmc
import openmc.lib
import openmc.deplete
fuel_1 = openmc.Material(name='fuel 1')
fuel_1.set_density('g/cm3', 10)
fuel_1.add_nuclide('O16', 1.19e-1, 'wo')
fuel_1.add_nuclide('U235', 3.60e-2, 'wo')
fuel_1.add_nuclide('U238', 8.45e-1, 'wo')
fuel_2 = openmc.Material(name='fuel 2')
fuel_2.set_density('g/cm3', 10)
fuel_2.add_nuclide('O16', 1.19e-1, 'wo')
fuel_2.add_nuclide('U235', 2.60e-2, 'wo')
fuel_2.add_nuclide('U238', 8.55e-1, 'wo')
clad = openmc.Material(name='clad')
clad.set_density('g/cm3', 6)
clad.add_nuclide('Zr90', 1, 'wo')
water = openmc.Material(name='water')
water.set_density('g/cm3', 0.70)
water.add_nuclide('H1', 2.0)
water.add_nuclide('O16', 1.0)
water.add_s_alpha_beta('c_H_in_H2O')
fuel_1.volume = 1.056
fuel_2.volume = 1.056
s1 = openmc.ZCylinder(r=0.41)
s2 = openmc.ZCylinder(r=0.475)
fuel_pin1 = openmc.model.pin([s1, s2], [fuel_1, clad, water], subdivisions={0: 2}, divide_vols = True)
fuel_pin2 = openmc.model.pin([s1, s2], [fuel_2, clad, water], subdivisions={0: 2}, divide_vols = True)
l201 = openmc.RectLattice(name='pin lattice', lattice_id=201)
l201.lower_left = (-1.24, -1.24)
l201.pitch = (1.24, 1.24)
l201.universes = [
[fuel_pin1] + [fuel_pin2],
[fuel_pin2] + [fuel_pin1]]
bound_box = openmc.rectangular_prism(2.48, 2.48, boundary_type="reflective")
root = openmc.Cell(fill=l201, region=bound_box)
geometry_file = openmc.Geometry([root])
geometry_file.export_to_xml()
materials_file = openmc.Materials(list(geometry_file.get_all_materials().values()))
materials_file.export_to_xml()
settings_file = openmc.Settings()
settings_file.particles = 1000
settings_file.inactive = 10
settings_file.batches = 20
settings_file.export_to_xml()
chain_file = './chain_simple.xml'
# model = openmc.Model(geometry=geometry_file, materials=materials_file, settings=settings_file)
op = openmc.deplete.Operator(geometry_file, settings_file, chain_file)
time_steps = [(1.0, 'MWd/kg'), (2.0, 'MWd/kg')]
power = 532
integrator = openmc.deplete.CECMIntegrator(op, time_steps, power, timestep_units='d')
integrator.integrate(final_step=True)