Hello, happy Friday.
I found the following thread which proved to be very helpful: https://openmc.discourse.group/t/how-to-plot-all-nuclides-density-of-depletion-material/2762/2
This thread gives a way of using the depletions.h5 file to obtain all nuclides present. However, I didn’t see a way to specify which material I want to look at (I’m only concerned with one), and is there a way to get the corresponding number of atoms from this?
This is the code they used:
results = openmc.deplete.Results(‘depletion_results.h5’)
nuclides = list(results[0].index_nuc.keys())
But I would like to be able to specify which material I’m looking at, and also get atomic numbers.
I have tried following other techniques given on this forum, like obtaining the materials.xml file of the last time-step. However, as the cross-sections file does not include all isotopes, in particular very short lived isotopes, then this is not a complete list.
I can supply more information if required, I hope I’ve made my ask clear.
Thanks,
Harry
Hi Harry, welcome back to the community.
Sorry if I am wrong, but from what I understand to your question, you want to find the atomic density from one of your materials that you know its material ID right? Have you supplied the material ID to your get_atoms or get_mass input?
here are some examples if I want to extract the U-235 atomic density from my fuel material that has a material ID of 1
# read depletion results
depletion_results = openmc.deplete.Results('depletion_results.h5')
# read the atomic density of U235 from material ID 1
deptime, atom_U235 = depletion_results.get_atoms(mat='1', nuc='U235', nuc_units='atom/b-cm', time_units='d')
print(atom_U235) # print atomic density on each burnup steps
# len(atom_U235) # check data length = burnup steps + 1
# plot the atomic density if needed
plt.plot(deptime, atom_U235, label='U-235')
plt.xlabel('Time (d)')
plt.ylabel('Atomic density U-235 (atom/barn-cm)')
same thing if I want to plot the total Pu-239 mass from my fuel material @ ID 1
deptime, mass_Pu239 = depletion_results.get_mass(mat='1', nuc='Pu239', mass_units='g', time_units='d')
print(atom_Pu239)
# len(atom_Pu239) # check data length = burnup steps + 1
# plot
plt.plot(deptime, mass_Pu239, label='Pu-239')
plt.xlabel('Time (d)')
plt.ylabel('Pu-239 mass (gr)')
then regarding the short-lived isotopes, I think if those isotopes are produced during depletion calculation, then openmc will report it, i.e. Mo-99 with half life 66h and Xe- 135 with half life 9h will reported when produced from a fission reaction. but I don’t know if the isotopes interested you have a shorter half life.
hope it could help you
Hi, thankyou for the reply.
So the method you have outlined is very useful, and i have already been using it when depleting fuel. However, this particular depletion I am looking at, I don’t have a complete list of all transmutation products I will be expecting. Therefore I can’t use the ‘get_atoms’ function, as I’d have to include every single possible isotope. What I was looking for was a readout of all present isotopes and their associated abundance.
Cheers,
Harry
Hi Harry, sorry if I didn’t answer your question.
Did the isotopes exist on the burnup chain that you use during depletion calculation? If the isotopes exist, I think it will be reported on the calculation because from my experience, openmc will report atomic density of isotopes even if it is at the order or E-20. So it is more detailed than some other transport/lattice code that only report isotopes that has atomic density above E-10 by default.