Hi, im making a simple SFR model and have crash into this error.
When you run a depletion calculation, it is necessary to specify the volume of any material that is being depleted in order to properly normalize the reaction rates. By default, any material that has a fissionable nuclide in it is treated as depletable. To specify the volume of a material, set the volume
attribute of a Material
object, e.g.:
fuel = openmc.Material()
fuel.add_nuclide('U235', 1.0)
fuel.volume = 100.0 # <-- units are cm³
The message indicates that you are running out of memory. How many depletable materials do you have in your model? One thing you can try is to turn off the use of multiprocessing during depletion to prevent it from forking the executable (which is what is causing it to run out of memory). This is described here:
Hi, thanks for the reply. I’m new to this so was simply trying to do the hexagonal tutorial.
"%matplotlib inline
import openmc
import math
uel = openmc.Material(name=‘fuel’)
fuel.add_nuclide(‘U235’,1.0)
fuel.set_density(‘g/cm3’,100.0)
fuel2 = openmc.Material(name = ‘fuel2’)
fuel2.add_nuclide(‘U238’,1.0)
fuel2.set_density(‘g/cm3’,100.0)
water = openmc.Material(name=‘water’)
water.add_nuclide(‘H1’,2.0)
water.add_nuclide(‘O16’,10.0)
water.set_density(‘g/cm3’,10.0)
fuel.volume = 1 # ← units are cm³
fuel2.volume = 1 # ← units are cm³
mats = openmc.Materials((fuel,fuel2,water))
mats.export_to_xml()
r_pin = openmc.ZCylinder(r=0.25)
fuel_cell = openmc.Cell(fill=fuel, region = -r_pin)
water_cell = openmc.Cell(fill=water, region = +r_pin)
pin_universe = openmc.Universe(cells=(fuel_cell,water_cell))
r_big_pin = openmc.ZCylinder(r=0.5)
fuel2_cell = openmc.Cell(fill=fuel2, region = -r_big_pin)
water2_cell = openmc.Cell(fill=water,region=+r_big_pin)
big_pin_universe = openmc.Universe(cells=(fuel2_cell,water2_cell))
all_water_cell = openmc.Cell(fill=water)
outer_universe = openmc.Universe(cells=(all_water_cell,))
lat = openmc.HexLattice()
lat.center = (0.,0.)
lat.pitch = (1.25,)
lat.outer = outer_universe
uter_ring = [big_pin_universe] + [pin_universe]*11
middle_ring = [big_pin_universe] + [pin_universe]*5
inner_ring = [big_pin_universe]
lat.universes = [outer_ring,middle_ring,inner_ring]
outer_surface = openmc.ZCylinder(r=4.0,boundary_type=‘vacuum’)
main_cell = openmc.Cell(fill=lat,region=-outer_surface)
geom = openmc.Geometry([main_cell])
geom.export_to_xml()
settings = openmc.Settings()
settings.particles = 100
settings.inactive = 10
settings.batches = 20
settings.export_to_xml()
import openmc.deplete
chain = openmc.deplete.Chain.from_xml("./chain_endfb71_sfr.xml")
operator = openmc.deplete.Operator(geom,settings,"./chain_endfb71_sfr.xml")
power = 174
time_steps = [30 * 24 * 60 * 60] * 6
integrator = openmc.deplete.PredictorIntegrator(operator, time_steps, power)
integrator.integrate() "
How much memory do you have on the machine you are running on? Your problem is not terribly complicated, but if you don’t have a lot of a memory on your system, using the full depletion chain might be problematic. You can try using the simplified depletion chain from here, which will reduce the total number of nuclides needed for transport/depletion and thereby reduce the overall memory requirements.
Hi,
I have 8gb ram. I am able to run the sfr chains on a simple unit cell but anything else it won’t work. Thanks for the help.
Hello, paul.
I am facing the same error but on a different problem. It would be really helpful if you could give it a view.
The following is the link where I’ve stated my problem: "Volume not specified for material ID=2" even after assigning volume to mix material