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.