Depletion execution

Running OpenMC Version 0.13.1 under Ubuntu 20.04.

I would like to be able to run a depletion, adjust the material file to “sweeten” the fuel, and then run another depletion on that revised material file. The issue I am running into can be shown as follows (Sorry for the length, but want to provide enough detail for someone to actually be able to help…):

#Generate Geometry, materials, settings (note external calls exports to xml files)

settings = DefineSetting()
Mats, materials = DefineMaterials()
geometry = DefineVesselGeometry(VesselRad,Cyl_H,VesselWall,HemiModThickness,CoolPipeRad,HexPitch,FuelBox,RodRadius,RodHeight)

import openmc.deplete

#using simple chain until I can get the system to respond properly

chain = openmc.deplete.Chain.from_xml(“/home/brian/OpenMC_data/chain_simple.xml”)

model = openmc.Model(geometry=geometry,materials=materials, settings=settings)
operator = openmc.deplete.Operator(model,“/home/brian/OpenMC_data/chain_simple.xml”)
#power is in watts - 1e6 = 1 MW - try 200 Megawatts
power = 200e6
time_steps = [60 * 60] * 5 #deplete for 5 hours
integrator = openmc.deplete.PredictorIntegrator(operator, time_steps, power)
integrator.integrate()

#This all works… I get everything I expect for the 5 hour depletion

results = openmc.deplete.ResultsList.from_hdf5(“./depletion_results.h5”)
#Save the intermediate materials files for review
for i in range(5):
mf=results.export_to_materials(i)
fn=“./materials”+str(i)+“.xml”
mf.export_to_xml(fn)
print(mf[0].get_mass(“U235”))

#Output of above is:
6587.592943820452
6578.547441670925
6569.501987610248
6560.456546983021
6551.411128389608

#showing expected depletion of U235. All good.
#Now take that last “materials4.xml” file and make it the default
#materials.xml file and run openmc.run() to get Keff:

import shutil
fn=“./materials4.xml”
shutil.copyfile(fn,‘./materials.xml’)
openmc.run()

#results from this show greatly depleted fuel:

k-effective (Collision) = 0.45918 +/- 0.00118
k-effective (Track-length) = 0.45920 +/- 0.00118
k-effective (Absorption) = 0.45804 +/- 0.00205
Combined k-effective = 0.45900 +/- 0.00114
Leakage Fraction = 0.01333 +/- 0.00047

#My expectation is that this Keff should be the same as the last iteration of keff:

time, k = results.get_eigenvalue()
time /= (60 * 60) # convert back to hours from seconds
k

array([[1.11036474, 0.00243176],
[1.11429175, 0.00236096],
[1.10776158, 0.00240418],
[1.10337545, 0.00222762],
[1.10350493, 0.00225666],
[1.10449178, 0.00228493]])

Can someone explain where I am going wrong here? Thank you.

OK, some additional information. It appears to me the “materials.xml” file is setup differently when the depletion models are used. Here is FuelSalt xml listing for a Keff determination (matches initiating code exactly):

cross_sections.xml</cross_sections>








Here is material file from the “zero” index of a depletion run. Note addition of the chain file isotopes, and the change in the U235/U238 values. Those were the ONLY concentrations that were changed:

So I guess my answer is, unless someone can tell me otherwise, is that the material files are not compatible between Keff determination and a depletion run.

  • <density units="g/cm3" value="2.3" />
    
  • <nuclide ao="0.65" name="Li7" />
    
  • <nuclide ao="0.29" name="Be9" />
    
  • <nuclide ao="0.05" name="Zr91" />
    
  • <nuclide ao="0.002" name="U235" />
    
  • <nuclide ao="0.008" name="U238" />
    
  • <nuclide ao="1.51" name="F19" />
    
  • <density units="sum" />
    
  • <nuclide ao="0.29" name="Be9" />
    
  • <nuclide ao="1.51" name="F19" />
    
  • <nuclide ao="0.65" name="Li7" />
    
  • <nuclide ao="0.05" name="Zr91" />
    
  • <nuclide ao="1e-21" name="Cs135" />
    
  • <nuclide ao="1e-21" name="Gd156" />
    
  • <nuclide ao="1e-21" name="Gd157" />
    
  • <nuclide ao="1e-21" name="I135" />
    
  • <nuclide ao="1e-21" name="U234" />
    
  • <nuclide ao="6.475223363030086e-05" name="U235" />
    
  • <nuclide ao="0.00025900893452120345" name="U238" />
    
  • <nuclide ao="1e-21" name="Xe135" />
    
  • <nuclide ao="1e-21" name="Xe136" />
    

For some reason, xml didn’t paste properly in my email.