Hello!! I’m using a model in which the volume of a cell is going to change, more specifically it’s going to decrease, leading to a theoretical major concentration of Uranium in the cell (as it’s made of an homogeneous material with several nuclides in it). The thing is the results are not satisfactory, and when I try to compare the densities of the nuclides changing the cell’s volume, it raises an error:
/openmc/universe.py", line 485, in get_nuclide_densities
raise RuntimeError(
RuntimeError: Volume information is needed to calculate microscopic cross sections for universe 1. This can be done by running a stochastic volume calculation via the openmc.VolumeCalculation object
So in the documentation is said that we can add the volume manually, without stochastic calculation ,but when I do it using the variable of a cell openmc.Cell.volume it shows the same error. I could use this method, but I think it can be computationally expensive, anyone have some advice over this??
poison = openmc.Material(name='Boron')
poison.add_element('B', 1, 'ao')
U_nopoison = openmc.Material(name = 'Uranium')
U_nopoison.add_element('U', 1, 'ao')
U = openmc.Material.mix_materials([U_nopoison, poison], [1-poison_core_moy/1000000, poison_core_moy/1000000], 'ao')
a = 10 # cm (base)
b = 10 # cm (height, we would variate this)
left = openmc.XPlane(x0 = -a/2, boundary_type = 'vacuum')
right = openm.XPlane(x0 = a/2, boundary_type = 'vacuum')
top = openmc.YPlane(y0 = -a/2, boundary_type = 'vacuum')
bot = openm.YPlane(y0 = a/2, boundary_type = 'vacuum')
z1 = openmc.ZPlane(z0 = -b/2, boundary_type = 'vacuum')
z2 = openm.ZPlane(z0 = b/2, boundary_type = 'vacuum')
core_region = +left & -right & +bot & -top & +z1 & -z2
core = openmc.Cell(name = 'core', fill = U, region = core_region)
core.volume = a**2 * b
rt_universe = openmc.Universe(cells = [core, moderator])
print(rt_universe.get_nuclide_densities())