Depletion Calculation Performance Issue

Hi,
Recently, I’m working on refining my fuel analysis by dividing it into multiple layers for more accurate calculations. However, I have encountered a significant decrease in calculation speed during the depletion phase.
When I perform the calculations without importing openmc.deplete, it takes only two minutes for the initial moment. However, generating simulation_n0 takes several hours
I would appreciate it if you could take a moment to review the code snippet below to see if there are any apparent issues causing the drastic difference in calculation speeds :grinning::

layer_info = {1:[0.0000,0.2048,Temps_input[0]],2:[0.2048,0.2867,Temps_input[1]],3:[0.2867,0.3072,Temps_input[2]],
4:[0.3072,0.3481,Temps_input[3]],5:[0.3481,0.3604,Temps_input[4]],6:[0.3604,0.3842,Temps_input[5]],
7:[0.3842,0.3969,Temps_input[6]],8:[0.3969,0.4038,Temps_input[7]],9:[0.4038,0.4096,Temps_input[8]],}

fuel_1 = openmc.Material(name=‘Fuel_1’,material_id=1)
fuel_2 = openmc.Material(name=‘Fuel_2’,material_id=2)
fuel_3 = openmc.Material(name=‘Fuel_3’,material_id=3)
fuel_4 = openmc.Material(name=‘Fuel_4’,material_id=4)
fuel_5 = openmc.Material(name=‘Fuel_5’,material_id=5)
fuel_6 = openmc.Material(name=‘Fuel_6’,material_id=6)
fuel_7 = openmc.Material(name=‘Fuel_7’,material_id=7)
fuel_8 = openmc.Material(name=‘Fuel_8’,material_id=8)
fuel_9 = openmc.Material(name=‘Fuel_9’,material_id=9)

fuels = [fuel_1, fuel_2, fuel_3, fuel_4, fuel_5,
fuel_6, fuel_7, fuel_8, fuel_9]

for k, fuel in enumerate(fuels, start=1):
fuel.set_density(‘g/cm3’, 10.42)
fuel.add_element(‘U’, 1., enrichment=4.45)
fuel.add_element(‘O’, 2.)
fuel.temperature = round(layer_info[k][2],2) # k
fuel.volume = pi*(layer_info[k][1]**2-layer_info[k][0]**2)*h
fuel.depletable = True

clad = openmc.Material(name=‘Cladding’,material_id=22)
clad.set_density(‘g/cm3’, 6.55)
clad.add_element(‘S’, 0.0005, ‘wo’)
clad.add_element(‘Fe’, 0.0005, ‘wo’)
clad.add_element(‘Cr’, 0.001, ‘wo’)
clad.add_element(‘O’, 0.009, ‘wo’)
clad.add_element(‘Nb’, 0.009, ‘wo’)
clad.add_element(‘Zr’, 0.98, ‘wo’)
clad.temperature = 318.52 + 273.15

hot_water = openmc.Material(name=‘Hot borated water’,material_id=23)
hot_water.set_density(‘g/cm3’, 0.685511) #0.7119
hot_water.add_element(‘B’, 4.0e-5)
hot_water.add_element(‘H’, 5.0e-2)
hot_water.add_element(‘O’, 2.4e-2)
hot_water.add_s_alpha_beta(‘c_H_in_H2O’)
hot_water.temperature = 318.52 + 273.15

Helium = openmc.Material(name=“Helium”,material_id=24)
Helium.set_density(‘g/cm3’, 0.001598)
Helium.add_element(‘He’, 2.4044e-4)
Helium.temperature = 318.52 + 273.15
materials = openmc.Materials([fuel_1,fuel_2,fuel_3,fuel_4,fuel_5,fuel_6,fuel_7,fuel_8,fuel_9
,clad,hot_water,Helium])
materials.cross_sections = “/data/NuData/OpenMC/endfb71_hdf5/cross_sections.xml”

surf1 = openmc.ZCylinder(r=0.4096)
surf2 = openmc.ZCylinder(r=0.418)
surf3 = openmc.ZCylinder(r=0.4750)
surf4 = openmc.XPlane(x0=-0.63, boundary_type=‘reflective’)
surf5 = openmc.XPlane(x0=0.63, boundary_type=‘reflective’)
surf6 = openmc.YPlane(y0=-0.63, boundary_type=‘reflective’)
surf7 = openmc.YPlane(y0=0.63, boundary_type=‘reflective’)
surf8 = openmc.ZPlane(z0=-201.96, boundary_type=‘reflective’)
surf9 = openmc.ZPlane(z0=201.96, boundary_type=‘reflective’)

surf19 = openmc.ZPlane(z0=-182.88)
surf20 = openmc.ZPlane(z0=182.88)

Cell_1 = openmc.Cell(fill=fuel_1, region = -openmc.ZCylinder(r=layer_info[1][1]) & +surf19 & -surf20)
Cell_2 = openmc.Cell(fill=fuel_2, region = +openmc.ZCylinder(r=layer_info[2][0]) & -openmc.ZCylinder(r=layer_info[2][1]) & +surf19 & -surf20)
Cell_3 = openmc.Cell(fill=fuel_3, region = +openmc.ZCylinder(r=layer_info[3][0]) & -openmc.ZCylinder(r=layer_info[3][1]) & +surf19 & -surf20)
Cell_4 = openmc.Cell(fill=fuel_4, region = +openmc.ZCylinder(r=layer_info[4][0]) & -openmc.ZCylinder(r=layer_info[4][1]) & +surf19 & -surf20)
Cell_5 = openmc.Cell(fill=fuel_5, region = +openmc.ZCylinder(r=layer_info[5][0]) & -openmc.ZCylinder(r=layer_info[5][1]) & +surf19 & -surf20)
Cell_6 = openmc.Cell(fill=fuel_6, region = +openmc.ZCylinder(r=layer_info[6][0]) & -openmc.ZCylinder(r=layer_info[6][1]) & +surf19 & -surf20)
Cell_7 = openmc.Cell(fill=fuel_7, region = +openmc.ZCylinder(r=layer_info[7][0]) & -openmc.ZCylinder(r=layer_info[7][1]) & +surf19 & -surf20)
Cell_8 = openmc.Cell(fill=fuel_8, region = +openmc.ZCylinder(r=layer_info[8][0]) & -openmc.ZCylinder(r=layer_info[8][1]) & +surf19 & -surf20)
Cell_9 = openmc.Cell(fill=fuel_9, region = +openmc.ZCylinder(r=layer_info[9][0]) & -openmc.ZCylinder(r=layer_info[9][1]) & +surf19 & -surf20)

Cell_Helium = openmc.Cell(fill=Helium, region = +surf1 & -surf2 & +surf19 & -surf20)
Cell_Clad = openmc.Cell(fill=clad, region = +surf2 & -surf3 & +surf19 & -surf20)
Cell_water = openmc.Cell(fill=hot_water,region=((+surf4 & -surf5 & +surf6 & -surf7 & +surf8 & -surf9) & (~(-surf3 & +surf19 & -surf20))))

Universe = openmc.Universe(cells=[Cell_1, Cell_2, Cell_3, Cell_4, Cell_5, Cell_6, Cell_7, Cell_8, Cell_9,
Cell_Helium, Cell_Clad, Cell_water])
Geo = openmc.Geometry(root=Universe)

settings = openmc.Settings()
settings.source = openmc.Source(space=openmc.stats.Point((0,0,0)))
settings.batches = 900
settings.inactive = 100
settings.particles = 100000
settings.temperature = {“method”:“interpolation”,“range”:(294,1144.75+274)}

model = openmc.model.Model()
model.materials = materials
model.geometry = Geo
model.settings = settings

model.export_to_xml()

#openmc.run(geometry_debug=True)

#time_step = [0.1,1,2.6]

time_step1 = [0.1, 0.5, 1, 1]
time_step2 = [14.75, 156.16]+5*[173.51]
time_step = time_step1+time_step2
chain = openmc.deplete.Chain.from_xml(“/data/NuData/OpenMC/Depletion/chain_endfb71_pwr.xml”)
op = openmc.deplete.CoupledOperator(model,chain_file=“/data/NuData/OpenMC/Depletion/chain_endfb71_pwr.xml”,
diff_burnable_mats=True)
power = 27.91e3h*1e-2 #w
integrator = openmc.deplete.CECMIntegrator(op,time_step,power,timestep_units=“d”)
integrator.integrate()

Hello, to reduce the computation time you can reduce the chain with (reduce_chain) in the operator. You can also perform activation calculations via Independent operator which does not perform transport simulations between each time_step. See the workshop by @Shimwell.
neutronics-workshop