To calculate the total atomic density (TOT_ADENS) in complex reactor geometries using OpenMC

How can I calculate the total atomic density after consumption in complex reactor geometries and how can I calculate it in the output file?u235 = results.get_atoms(“U235”) I think the results I got here with this script do not correspond to TOT_ADENS in Serpent. How can I calculate this or read the total atomic density in OpenMC output?

# Depletion Post-Processing
previous_results = openmc.deplete.Results('depletion_results.h5')
materials_dep = previous_results.export_to_materials(extract_step)
materials_dep.export_to_xml()  # extracts and replaces original materials.xml file

If this is what you mean. This will pull all of the materials after a depletion sim and any ‘depletable’ materials will be in units of atoms/barn-cm for you. You can look at just U235 or add all of the densities in a given material to get the total.

1 Like

TOT_ADENS (I + 2, N) Total averaged atomic densities. It is defined this way in Serpent. How can I read the corresponding data from the output file in OpenMC? depletion_results.h5 This is the output. How can I get this data?I think the data I get with this command get_atoms is not the same and should I do a different operation for total?

I second what @Daedalus said!

Get atoms refers to a single nuclide.

1 Like