Hello. I am typing the following program for a very simple criticality calculation:
import openmc
import openmc.deplete
import matplotlib.pyplot as plt
fissile = openmc.Material(1,“fissile”)
fissile.add_element(‘U’, 1.0, enrichment=15.0)
fissile.add_element(‘O’, 2.0)
fissile.add_element(‘Na’,0.5)
fissile.set_density(‘g/cm3’,6.0)
fissile.temperature = 900
materials_file = openmc.Materials([fissile,])
materials_file.export_to_xml()
fissile_z0 = openmc.ZPlane(z0=-50, boundary_type = ‘vacuum’)
fissile_z1 = openmc.ZPlane(z0=50, boundary_type = ‘vacuum’)
fissile_r = openmc.ZCylinder(r=150, boundary_type = ‘vacuum’)
fissile_cell = openmc.Cell(fill= fissile)
fissile_cell.region = -fissile_r & -fissile_z1 & +fissile_z0
fissile_u = openmc.Universe(cells=[fissile_cell,])
geometry = openmc.Geometry(fissile_u)
geometry.export_to_xml()
OpenMC simulation parameters
lower_left = [-150, -150, -50]
upper_right = [150, 150, 50]
space = openmc.stats.Box(lower_left, upper_right)
source = openmc.IndependentSource(space=space, constraints={‘fissionable’: True})
settings = openmc.Settings()
settings.space= space
settings.source = source
settings.batches = 100
settings.inactive = 10
settings.particles = 1000
settings.temperature = {‘method’: ‘interpolation’}
model = openmc.Model(geometry=geometry, settings=settings)
settings.export_to_xml()
openmc.run()
However when I run it, it replies:
RuntimeError: Could not find cell 0 specified on tally filter.
Maybe it is something about the new edition of OpenMC, maybe it need a few additions. Can someone help me?