# RuntimeError: Could not find cell 0 specified on tally filter

**URL:** <https://openmc.discourse.group/t/runtimeerror-could-not-find-cell-0-specified-on-tally-filter/4656>\
**Category:** User Support\
**Created:** [August 5, 2024, 10:44am UTC](https://openmc.discourse.group/t/runtimeerror-could-not-find-cell-0-specified-on-tally-filter/4656 "2024-08-05T10:44:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nickmecheng](https://avatars.discourse-cdn.com/v4/letter/n/f0a364/32.png) [@nickmecheng](https://openmc.discourse.group/u/nickmecheng)\
**Post date:** [August 5, 2024, 10:44am UTC](https://openmc.discourse.group/t/runtimeerror-could-not-find-cell-0-specified-on-tally-filter/4656/1 "2024-08-05T10:44:41Z")

</div>

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](http://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?

---

<div class="post-metadata">

**Author:** ![wahidluthfi](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/wahidluthfi/32/3375_2.png) [@wahidluthfi](https://openmc.discourse.group/u/wahidluthfi)\
**Post date:** [August 5, 2024, 1:14pm UTC](https://openmc.discourse.group/t/runtimeerror-could-not-find-cell-0-specified-on-tally-filter/4656/2 "2024-08-05T13:14:10Z")

</div>

Hi Nick,  
Have you tried to run those scripts on a new working directory? I didn’t see any tally declaration in your input, so I think the problem is there is a tally.xml file in your current working directory that might have come from another openmc input script you have done before or it may come from another model.xml file exist in your current folder. Try those scripts in a clean fresh folder. I hope it can help you to localize the problem if it exists on your openmc input script.

---

<div class="post-metadata">

**Author:** ![nickmecheng](https://avatars.discourse-cdn.com/v4/letter/n/f0a364/32.png) [@nickmecheng](https://openmc.discourse.group/u/nickmecheng)\
**Post date:** [August 5, 2024, 1:25pm UTC](https://openmc.discourse.group/t/runtimeerror-could-not-find-cell-0-specified-on-tally-filter/4656/3 "2024-08-05T13:25:37Z")

</div>

You are right! I deleted some some junk tally files and other junk files from previous simulations from the container and now it works! Thank you wahidluthfi! Problem solved!
