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.
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Pincell Depletion\n",
"This notebook is intended to introduce the reader to the depletion interface contained in OpenMC. It is recommended that you are moderately familiar with building models using the OpenMC Python API. The earlier examples are excellent starting points, as this notebook will not focus heavily on model building.\n",
"\n",
"If you have a real power reactor, the fuel composition is constantly changing as fission events produce energy, remove some fissile isotopes, and produce fission products. Other reactions, like $(n, \\alpha)$ and $(n, \\gamma)$ will alter the composition as well. Furthermore, some nuclides undergo spontaneous decay with widely ranging frequencies. Depletion is the process of modeling this behavior.\n",
"\n",
"In this notebook, we will model a simple fuel pin in an infinite lattice using the Python API. We will then build and examine some of the necessary components for performing depletion analysis. Then, we will use the depletion interface in OpenMC to simulate the fuel pin producing power over several months. Lastly, we will wrap up with some helpful tips to improve the fidelity of depletion simulations."
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
This file has been truncated. show original
1 Like