# WARNING: After particle 1878 crossed surface 66 it could not be located in cell and it did not leak

**URL:** <https://openmc.discourse.group/t/warning-after-particle-1878-crossed-surface-66-it-could-not-be-located-in-cell-and-it-did-not-leak/6271>\
**Category:** User Support\
**Created:** [April 1, 2026, 8:11am UTC](https://openmc.discourse.group/t/warning-after-particle-1878-crossed-surface-66-it-could-not-be-located-in-cell-and-it-did-not-leak/6271 "2026-04-01T08:11:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pras\_3136](https://avatars.discourse-cdn.com/v4/letter/p/e19adc/32.png) [@pras\_3136](https://openmc.discourse.group/u/pras_3136)\
**Post date:** [April 1, 2026, 8:11am UTC](https://openmc.discourse.group/t/warning-after-particle-1878-crossed-surface-66-it-could-not-be-located-in-cell-and-it-did-not-leak/6271/1 "2026-04-01T08:11:36Z")

</div>

Hi,  
I recently started learning and using OpenMC. I tried to create a test pincell by following the example provided on GitHub. However, I encountered the following issue:  
WARNING: After particle 1878 crossed surface 66 it could not be located in cell and it did not leak.

# Material Definition

#Moderator  
water = openmc.Material(name=‘Water’)  
water.set\_density(‘g/cm3’, .99659)  
water.add\_nuclide(‘H1’, 2.0)  
water.add\_nuclide(‘O16’, 1.0)  
water.add\_s\_alpha\_beta(‘c\_H\_in\_H2O’)

#UZrH  
uzrh = openmc.Material(name=‘UZrH’)  
uzrh.set\_density(‘g/cm3’, 5.79875)  
uzrh.add\_nuclide(‘U235’, 38.0, ‘wo’)  
uzrh.add\_nuclide(‘U238’, 152.0, ‘wo’)  
uzrh.add\_element(‘Zr’, 2009.76191, ‘wo’)  
uzrh.add\_element(‘H’, 35.5322, ‘wo’)

#graphite  
graphite = openmc.Material(name=‘Graphite’)  
graphite.set\_density(‘g/cm3’, 1.67)  
graphite.add\_element(‘C’, 1.0)  
graphite.add\_s\_alpha\_beta(‘c\_Graphite’)

#Stainless steel  
ss304 = openmc.Material(name=‘Stainless Steel 304’)  
ss304.set\_density(‘g/cm3’, 7.82)  
ss304.add\_element(‘Mn’,0.0175,‘wo’)  
ss304.add\_element(‘Cr’,.115,‘wo’)  
ss304.add\_element(‘Fe’,0.70,‘wo’)  
ss304.add\_element(‘Ni’,0.0925,‘wo’)

#B4C  
b4c = openmc.Material(name=‘Boron Carbide’)  
b4c.set\_density(‘g/cm3’, 2.4)  
b4c.add\_element(‘B’, 4)  
b4c.add\_element(‘C’, 1)

#Zirconium  
zirconium = openmc.Material(name=‘Zirconium’)  
zirconium.set\_density(‘g/cm3’, 6.500)  
zirconium.add\_element(‘Zr’, 1.0)

#Void  
void = openmc.Material(name=‘Void’)  
void.set\_density(‘g/cm3’, 0.001205)  
void.add\_element(‘Ni’, 0.755268, ‘wo’)  
void.add\_element(‘C’, 0.000124, ‘wo’)  
void.add\_element(‘O’, 0.231781, ‘wo’)  
void.add\_element(‘Ar’, 0.012827, ‘wo’)

#Aluminium  
aluminum = openmc.Material(name=‘Aluminum’)  
aluminum.set\_density(‘g/cm3’, 2.7)  
aluminum.add\_element(‘Al’, 1.0)

#Instantiate a Materials collection and export to xml  
materials\_file = openmc.Materials([aluminum, void, zirconium, b4c, ss304, graphite, uzrh, water])  
materials\_file.export\_to\_xml()

# Fuel Rod Definition

#diameter Zr rod  
rod\_outer\_radius = openmc.ZCylinder(r=0.31750)  
#diameter end fitting  
end\_fitting\_outer\_1\_radius = openmc.ZCylinder(r=0.93663)  
#diameter UZrH  
uzrh\_outer\_radius = openmc.ZCylinder(r=1.82245)  
#diameter graphite plug  
graphite\_outer\_radius = openmc.ZCylinder(r=1.82245)  
#diameter ss304  
ss304\_outer\_radius = openmc.ZCylinder(r=1.82245)  
#diameter cladding (pembungkus)  
clad\_outer\_radius = openmc.ZCylinder(r=1.87325)

#end fitting upper (4.953 cm)  
end\_fitting\_upper\_min = openmc.ZPlane(z0=-4.953)  
end\_fitting\_upper\_max = openmc.ZPlane(z0=+0)  
#ss304 upper (1.27 cm)  
ss304\_upper\_min = openmc.ZPlane(z0=-6.223)  
ss304\_upper\_max = openmc.ZPlane(z0=-4.953)  
#graphite upper (6.604 cm)  
graphite\_upper\_min = openmc.ZPlane(z0=-12.827)  
graphite\_upper\_max = openmc.ZPlane(z0=-6.223)  
#Zirconium (38.1 cm)  
rod\_min = openmc.ZPlane(z0=-50.927)  
rod\_max = openmc.ZPlane(z0=-12.827)  
#UZrH (38.1 cm)  
uzrh\_min = openmc.ZPlane(z0=-50.927)  
uzrh\_max = openmc.ZPlane(z0=-12.827)  
#graphite lower (9.398 cm)  
graphite\_lower\_min = openmc.ZPlane(z0=-60.325)  
graphite\_lower\_max = openmc.ZPlane(z0=-50.927)  
#ss304 lower (1.27 cm)  
ss304\_lower\_min = openmc.ZPlane(z0=-61.595)  
ss304\_lower\_max = openmc.ZPlane(z0=-60.325)  
#cladding  
clad\_min = openmc.ZPlane(z0=-4.953)  
clad\_max = openmc.ZPlane(z0=-61.595)  
#end fitting lower 1 (5.08 cm)  
end\_fitting\_lower\_1\_min = openmc.ZPlane(z0=-66.675)  
end\_fitting\_lower\_1\_max = openmc.ZPlane(z0=-61.595)  
#empty space lower (48.26 cm)  
empty\_space\_lower\_min = openmc.ZPlane(z0=-109.855)  
empty\_space\_lower\_max = openmc.ZPlane(z0=-66.675)

# universe fuel rod

fuel\_universe = openmc.Universe(name=‘UZrH Fuel Universe’)

#buat sel end fitting upper  
end\_fitting\_upper\_cell = openmc.Cell(name=‘Upper End Fitting’)  
end\_fitting\_upper\_cell.fill = ss304  
end\_fitting\_upper\_cell.region = -end\_fitting\_outer\_1\_radius & +end\_fitting\_upper\_min & -end\_fitting\_upper\_max  
fuel\_universe.add\_cell(end\_fitting\_upper\_cell)

#buat sel ss304 upper  
ss304\_upper\_cell = openmc.Cell(name=‘Upper Stainless Steel 304’)  
ss304\_upper\_cell.fill = ss304  
ss304\_upper\_cell.region = -ss304\_outer\_radius & +ss304\_upper\_min & -ss304\_upper\_max  
fuel\_universe.add\_cell(ss304\_upper\_cell)

#buat sel graphite upper  
graphite\_upper\_cell = openmc.Cell(name=‘Upper Graphite’)  
graphite\_upper\_cell.fill = graphite  
graphite\_upper\_cell.region = -graphite\_outer\_radius & +graphite\_upper\_min & -graphite\_upper\_max  
fuel\_universe.add\_cell(graphite\_upper\_cell)

#buat sel Zr rod  
rod\_cell = openmc.Cell(name=‘Zr Rod’)  
rod\_cell.fill = zirconium  
rod\_cell.region = -rod\_outer\_radius & +rod\_min & -rod\_max  
fuel\_universe.add\_cell(rod\_cell)

#buat sel uzrh  
uzrh\_cell = openmc.Cell(name=‘UZrH’)  
uzrh\_cell.fill = uzrh  
uzrh\_cell.region = +rod\_outer\_radius & -uzrh\_outer\_radius & +uzrh\_min & -uzrh\_max  
fuel\_universe.add\_cell(uzrh\_cell)

#buat sel graphite lower  
graphite\_lower\_cell = openmc.Cell(name=‘Lower Graphite’)  
graphite\_lower\_cell.fill = graphite  
graphite\_lower\_cell.region = -graphite\_outer\_radius & +graphite\_lower\_min & -graphite\_lower\_max  
fuel\_universe.add\_cell(graphite\_lower\_cell)

#buat sel lower ss304  
ss304\_lower\_cell = openmc.Cell(name=‘Lower Stainless Steel 304’)  
ss304\_lower\_cell.fill = ss304  
ss304\_lower\_cell.region = -ss304\_outer\_radius & +ss304\_lower\_min & -ss304\_lower\_max  
fuel\_universe.add\_cell(ss304\_lower\_cell)

#buat sel cladding  
clad\_cell = openmc.Cell(name=‘Stainless Steel 304 Cladding’)  
clad\_cell.fill = ss304  
clad\_cell.region = -clad\_outer\_radius & +ss304\_outer\_radius & +clad\_min & -clad\_max  
fuel\_universe.add\_cell(clad\_cell)

#buat sel end fitting lower 1  
end\_fitting\_lower\_1\_cell = openmc.Cell(name=‘Lower End Fitting 1’)  
end\_fitting\_lower\_1\_cell.fill = ss304  
end\_fitting\_lower\_1\_cell.region = -end\_fitting\_outer\_1\_radius & +end\_fitting\_lower\_1\_min & -end\_fitting\_lower\_1\_max  
fuel\_universe.add\_cell(end\_fitting\_lower\_1\_cell)

#buat sel empty space diatas ss304  
empty\_space\_upper\_cell= openmc.Cell(name=‘Empty space upper fuel rod’)  
empty\_space\_upper\_cell.fill = water  
empty\_space\_upper\_cell.region = +end\_fitting\_outer\_1\_radius & +end\_fitting\_upper\_min & -end\_fitting\_upper\_max  
fuel\_universe.add\_cell(empty\_space\_upper\_cell)

#buat sel empty space lower fuel rod 1  
empty\_space\_lower\_1\_cell= openmc.Cell(name=‘Empty space upper fuel rod’)  
empty\_space\_lower\_1\_cell.fill = water  
empty\_space\_lower\_1\_cell.region = +end\_fitting\_outer\_1\_radius & +end\_fitting\_lower\_1\_min & -end\_fitting\_lower\_1\_max  
fuel\_universe.add\_cell(empty\_space\_lower\_1\_cell)

#buat sel empty space lower fuel rod 2  
empty\_space\_lower\_cell = openmc.Cell(name=‘Empty space lower fuel rod’)  
empty\_space\_lower\_cell.fill = water  
empty\_space\_lower\_cell.region = -clad\_outer\_radius & +empty\_space\_lower\_min & -empty\_space\_lower\_max  
fuel\_universe.add\_cell(empty\_space\_lower\_cell)

# Create water universe to surround the lattice

all\_water\_cell = openmc.Cell(fill=water)  
outer\_universe = openmc.Universe(cells=(all\_water\_cell,))

# Create surfaces that will divide rings in the circular lattice

ring\_radii = np.array([0.0, 8.0, 16.0, 24.0, 32.0, 40.0])  
radial\_surf = [openmc.ZCylinder(r=r) for r in  
(ring\_radii[:-1] + ring\_radii[1:])/2]

water\_cells =   
for i in range(ring\_radii.size):  
# Create annular region  
if i == 0:  
water\_region = -radial\_surf[i]  
elif i == ring\_radii.size - 1:  
water\_region = +radial\_surf[i-1]  
else:  
water\_region = +radial\_surf[i-1] & -radial\_surf[i]  
water\_cells.append(openmc.Cell(fill=water, region=water\_region))

# Arrange the pins in the circular lattice

num\_pins = [1, 6, 12, 18, 24, 30]  
angles = [0, 0, 0, 0, 0, 0]

for i, (r, n, a) in enumerate(zip(ring\_radii, num\_pins, angles)):

```
for j in range(n):
    
    # Determine location of center of pin
    theta = (a + j/n*360.) * np.pi/180.
    x = r*np.cos(theta)
    y = r*np.sin(theta)
    
    pin_boundary = openmc.ZCylinder(x0=x, y0=y, r=clad_outer_radius.r)
    water_cells[i].region &= +pin_boundary
    
    # Create each fuel pin -- note that we explicitly assign an ID so 
    # that we can identify the pin later when looking at tallies
    pin = openmc.Cell(fill=fuel_universe, region=-pin_boundary)
    pin.translation = (x, y, 0)
    pin.id = (i + 1)*100 + j
    bundle_universe.add_cell(pin)

```

# Geometry definitions for the reactor

reactor\_wall = openmc.ZCylinder(r=50.0, boundary\_type=‘vacuum’)  
reactor\_top = openmc.ZPlane(z0=0.0, boundary\_type=‘vacuum’)  
reactor\_bottom = openmc.ZPlane(z0=-109.855, boundary\_type=‘vacuum’)  
reactor = openmc.Cell()  
reactor.region = -reactor\_wall & -reactor\_top & +reactor\_bottom  
reactor.fill = bundle\_universe  
reactor\_universe = openmc.Universe(cells=[reactor])

reactor\_universe.plot(width=(100, 100), origin=[0,0,-40], show\_overlaps=(True),  
basis=‘yz’, color\_by=‘material’,  
colors={water:‘blue’,uzrh:‘orange’,  
zirconium:‘green’,graphite:‘gray’,  
b4c:‘yellow’})

geometry = openmc.Geometry(reactor\_universe)  
geometry.export\_to\_xml()

# OpenMC simulation parameters

batches = 100  
inactive = 10  
particles = 5000

settings\_file = openmc.Settings()  
settings\_file.batches = batches  
settings\_file.inactive = inactive  
settings\_file.particles = particles

bounds = [-28.527375, -28.527375, -28.527375, 28.527375, 28.527375, 28.527375]  
uniform\_dist = openmc.stats.Box(bounds[:3], bounds[3:])  
settings\_file.source = openmc.IndependentSource(space=uniform\_dist)

settings\_file.export\_to\_xml()

# running openmc

openmc.run()

---

<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:** [April 1, 2026, 10:59am UTC](https://openmc.discourse.group/t/warning-after-particle-1878-crossed-surface-66-it-could-not-be-located-in-cell-and-it-did-not-leak/6271/2 "2026-04-01T10:59:35Z")

</div>

Hi pras\_3136, welcome to the openmc community  
I think the problem was came from your cladding cell definition, please check the z region definition you have done `clad_cell.region = -clad_outer_radius & +ss304_outer_radius & +clad_min & -clad_max`

also, I see that you havent include your water\_cells into the bundle\_universe, so your developed core model just made up only by the fuel pin cells
