I am trying to generate multi-group cross sections for a simulated research reactor and need to run a depletion step first. I would like to be able to deplete each lattice element individually (they are all their own unique universes) to a desired U235 content to match real world test cases. I then need to feed the resulting fuel composition back into the simulation for each element’s fuel material and run the MGXS simulation. Is there a better way to do this than pulling the concentration for every fission product for every fuel element (thousands of lines of code)?
On a related note, I am getting this error when trying to pull the U235 content:
File “Core.py”, line 4739, in
_, n_U235 = dep_results.get_atoms(0, LEU_5, ‘U235’)
File “/home/rmclem/miniconda3/envs/openmc-py3.7/lib/python3.7/site-packages/openmc/deplete/results.py”, line 133, in get_atoms {“atoms”, “atom/b-cm”, “atom/cm3”})
File “/home/rmclem/miniconda3/envs/openmc-py3.7/lib/python3.7/site-packages/openmc/checkvalue.py”, line 191, in check_valueraise ValueError(msg)
ValueError: Unable to set “nuc_units” to “U235” since it is not in “{‘atoms’, ‘atom/cm3’, ‘atom/b-cm’}”
I suspect this error may have to do with how my materials are defined, so here’s an example of one of the fuel material definitions, where the weight percents are defined elsewhere:
LEU_5 = openmc.Material()
LEU_5.depletable = True
LEU_5.volume = 532.356 # all volumes in cm^3
LEU_5.add_nuclide(‘U235’, U235_frac_5, ‘wo’)
LEU_5.add_nuclide(‘U236’, U236_frac_5, ‘wo’)
LEU_5.add_nuclide(‘U238’, U238_frac_5, ‘wo’)
LEU_5.add_nuclide(‘Al27’, alum_frac_5, ‘wo’)
LEU_5.add_element(‘Fe’, iron_frac_5, ‘wo’)
LEU_5.set_density(‘g/cm3’, fuel_density)