K-eff time plot

Hello, everyone!
I created a fuel assembly of a PWR and I calculated the k-eff value every 5 days for 12 times. Is there a way in OpenMC to create a plot with time on the x-axis and k-eff on the y-axis?

This is the part of the code i used for the depletion:
sim_settings = openmc.Settings()
sim_settings.run_mode = ‘eigenvalue’
sim_settings.particles = 5000
sim_settings.inactive = 10
sim_settings.batches = 30
sim_settings.source = source1

chain = openmc.deplete.Chain.from_xml(‘/home/student/Desktop/chain_endfb80_pwr.xml’)
model = openmc.Model(geometry=bundle_geometry, settings=sim_settings)
operator = openmc.deplete.CoupledOperator(model, “/home/student/Desktop/chain_endfb80_pwr.xml”, diff_burnable_mats=“True”)
operator.finalize()
power = 19e6
timesteps = [60 * 60 * 24 * 5] * 12
integrator = openmc.deplete.PredictorIntegrator(operator, timesteps, power)
integrator.integrate()

You should have a depletion.h5 file after integrator does it’s job. You can get the eigenvalue from that. Ig should look something like this.

results = openmc.deplete.ResultsList.from_hdf5("./depletion_results.h5")
time, k = results.get_eigenvalue()

time and k are just normal python list. Hope it answers your question.

1 Like

Hi giiiuseppe, welcome to the openmc community.
I think this jupyter notebook depletion example can help you in post processing the depletion results with methods being mentioned by magnoxemo.

1 Like