# Material cannot reflect in lower universe and Particle 17551 could not be located after crossing a boundary of lattice 3

**URL:** <https://openmc.discourse.group/t/material-cannot-reflect-in-lower-universe-and-particle-17551-could-not-be-located-after-crossing-a-boundary-of-lattice-3/5469>\
**Category:** User Support\
**Created:** [April 30, 2025, 2:25am UTC](https://openmc.discourse.group/t/material-cannot-reflect-in-lower-universe-and-particle-17551-could-not-be-located-after-crossing-a-boundary-of-lattice-3/5469 "2025-04-30T02:25:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Azlan846](https://avatars.discourse-cdn.com/v4/letter/a/3bc359/32.png) [@Azlan846](https://openmc.discourse.group/u/Azlan846)\
**Post date:** [April 30, 2025, 2:25am UTC](https://openmc.discourse.group/t/material-cannot-reflect-in-lower-universe-and-particle-17551-could-not-be-located-after-crossing-a-boundary-of-lattice-3/5469/1 "2025-04-30T02:25:30Z")

</div>

I build a GFR reactor with hexagonal assembly however igot caanot reflect in a lower universe and cross of boundary of lattice 3. what is the issue

```auto
import openmc
import numpy as np
import matplotlib.pyplot as plt

#Material

materials=openmc.Materials()

#fuel
#UC
UC=openmc.Material(name='uranium carbide')
UC.add_nuclide('U235',0.1,'wo')
UC.add_nuclide('U238',0.9,'wo')
UC.add_nuclide('C12',1,'wo')
UC.set_density('g/cm3',13.63)
materials.append(UC)

#PuC
PuC=openmc.Material(name='plutonium carbide')
PuC.add_nuclide('Pu238',0.027,'wo')
PuC.add_nuclide('Pu239',0.56,'wo')
PuC.add_nuclide('Pu240',0.259,'wo')
PuC.add_nuclide('Pu241',0.074,'wo')
PuC.add_nuclide('Pu242',0.073,'wo')
PuC.add_nuclide('Am241',0.0007,'wo')
PuC.set_density('g/cm3',12.76)
materials.append(PuC)

#UC_PuC
UC_PuC=openmc.Material.mix_materials([UC,PuC],[0.8,0.2],'wo')
UC_PuC.volume=np.pi*(6.7/2)**2*86.79
materials.append(UC_PuC)

#SiC
SiC=openmc.Material(name='SiC')
SiC.add_nuclide('Si28',0.7005,'wo')
SiC.add_nuclide('C12',0.2995,'wo')
SiC.set_density('g/cm3',3.21)
materials.append(SiC)

#Helium
he=openmc.Material(name='helium')
he.add_nuclide('He4',1)
he.set_density('g/cm3',0.0001786)
materials.append(he)

#rhenium
re=openmc.Material(name='Rhenium')
re.add_element('Re',1)
materials.append(re)

#w14re
w14re=openmc.Material(name='W14Re')
w14re.add_nuclide('W184',0.86,'wo')
w14re.add_element('Re',0.14,'wo')
w14re.set_density('g/cm3',19.6)
materials.append(w14re)

#15Ni-15Cr-Ti
NiCrTi=openmc.Material(name='15Ni-15Cr-Ti')
NiCrTi.add_nuclide('C12',0.095,'wo')
NiCrTi.add_nuclide('N14',0.0049,'wo')
NiCrTi.add_nuclide('Cr52',0.143,'wo')
NiCrTi.add_nuclide('Ni59',0.16,'wo')
NiCrTi.add_nuclide('Ti48',0.0042,'wo')
NiCrTi.add_nuclide('Mo96',0.015,'wo')
NiCrTi.add_nuclide('Fe56',1-0.095-0.0049-0.143-0.16-0.0042-0.015,'wo')
NiCrTi.set_density('g/cm3',7.99)
materials.append(NiCrTi)

#B4C
b4c=openmc.Material(name='B4C')
b4c.add_nuclide('B11',4,'ao')
b4c.add_nuclide('C12',1,'ao')
materials.append(b4c)

materials.export_to_xml()
print (materials)

#geometry
#fuel pin
#size
fuel_pin=openmc.ZCylinder(r=0.67/2)
gap=openmc.ZCylinder(r=0.7/2)
w14re_size=openmc.ZCylinder(r=0.708/2)
re_size=openmc.ZCylinder(r=0.71/2)
clad_size=openmc.ZCylinder(r=0.916/2)

#fuel log
fuel_log=openmc.Universe(name='Fuel Log')
zmin=openmc.ZPlane(z0=0,boundary_type='reflective')
zmax=openmc.ZPlane(z0=86.79,boundary_type='reflective')

fuel_cell=openmc.Cell(name='Fuel')
fuel_cell.fill=UC_PuC
fuel_cell.region=-fuel_pin & +zmin & -zmax
fuel_log.add_cell(fuel_cell)

gap_cell=openmc.Cell(name='Gap')
gap_cell.fill=he
gap_cell.region=+fuel_pin & -gap & -zmax & +zmin
fuel_log.add_cell(gap_cell)

w14re_cell=openmc.Cell(name='W14Re layer')
w14re_cell.fill=w14re
w14re_cell.region=+gap & -w14re_size & +zmin & -zmax
fuel_log.add_cell(w14re_cell)

re_cell=openmc.Cell(name='Re')
re_cell.fill=re
re_cell.region=+w14re_size & -re_size & +zmin & -zmax
fuel_log.add_cell(re_cell)

clad_cell=openmc.Cell(name='Cladding')
clad_cell.fill=SiC
clad_cell.region=+re_size & -clad_size & +zmin & -zmax
fuel_log.add_cell(clad_cell)

fuel_log_dist=1.1
fuel_log_r=fuel_log_dist/2
fuel_pin_edge_length=(2*fuel_log_r)/np.sqrt(3)
print (fuel_pin_edge_length)

fuel_pin_hexagonal_region=openmc.model.HexagonalPrism(edge_length=fuel_pin_edge_length, orientation='x')
fuel_pin_coolant=openmc.Cell(name='fuel pin coolant')
fuel_pin_coolant.fill=he
fuel_pin_coolant.region= -fuel_pin_hexagonal_region & +clad_size & -zmax & +zmin
fuel_log.add_cell(fuel_pin_coolant)

print (fuel_log)
fuel_log.plot(basis='xy',color_by='material',colors={UC_PuC:'green',he:'blue',w14re:'black',re:'gold',SiC:'purple'}, origin=[0,0,0.01], width=(1.5,1.5), pixels=(1000,1000), )
plt.savefig('fuel log.png')

#making inert rod

#making instrumentation tube
instrumentation_tube=openmc.Universe(name='Instrumentation Tube')

#inert rod
inert_rod_size=openmc.ZCylinder(r=(0.667+0.03)/2)
inert_rod_cell=openmc.Cell(name='Inert rod')
inert_rod_cell.fill=he
inert_rod_cell.region=-inert_rod_size & -zmax & +zmin
instrumentation_tube.add_cell(inert_rod_cell)

#w14re
w14re_cell_inert_rod=openmc.Cell(name='W14Re layer for inert rod')
w14re_cell_inert_rod.fill=w14re
w14re_cell_inert_rod.region=+inert_rod_size & -w14re_size & +zmin & -zmax
instrumentation_tube.add_cell(w14re_cell_inert_rod)

#re
re_cell_inert_rod=openmc.Cell(name='Re for inert rod')
re_cell_inert_rod.fill=re
re_cell_inert_rod.region=+w14re_size & -re_size & +zmin & -zmax
instrumentation_tube.add_cell(re_cell_inert_rod)

#sic
clad_cell_inert_rod=openmc.Cell(name='Cladding for inert rod')
clad_cell_inert_rod.fill=SiC
clad_cell_inert_rod.region=+re_size & -clad_size & +zmin & -zmax
instrumentation_tube.add_cell(clad_cell_inert_rod)

instrumentation_pin_hexagonal_region=openmc.model.HexagonalPrism(edge_length=fuel_pin_edge_length, orientation='x')
instrumentation_pin_coolant=openmc.Cell(name='fuel pin coolant')
instrumentation_pin_coolant.fill=he
instrumentation_pin_coolant.region= -fuel_pin_hexagonal_region & +clad_size & -zmax & +zmin
instrumentation_tube.add_cell(instrumentation_pin_coolant)

print (instrumentation_tube)

instrumentation_tube.plot(basis='xy',color_by='material',colors={he:'blue',w14re:'black',re:'gold',SiC:'purple'}, origin=[0,0,0.1], width=(1.5,1.5), pixels=(1000,1000), )
plt.savefig('instrumentation rod.png')

#making hexagonal fuel pin
fuel_pin_hex_lat=openmc.HexLattice(name='Fuel assembly')
all_coolant=openmc.Cell(fill=he)
outer_universe=openmc.Universe(cells=[all_coolant], name = 'Coolant')

pitch_dist=1.1

fuel_pin_hex_lat.center=(0,0)
fuel_pin_hex_lat.pitch=(pitch_dist,)
fuel_pin_hex_lat.outer=outer_universe
fuel_pin_hex_lat.orientation='y'

print (fuel_pin_hex_lat.show_indices(num_rings=6))

r1=[instrumentation_tube]
r2=[fuel_log]*6
r3=[fuel_log]*12
r4=[fuel_log]*18
r5=[fuel_log]*24
r6=[fuel_log]*30

total1=[r6,r5,r4,r3,r2,r1]
fuel_pin_hex_lat.universes=total1

print (fuel_pin_hex_lat)

#making assembly
d_fuel_assembly=10.578
r_fuel_assembly=d_fuel_assembly/2

fuel_assembly_edge=(2*r_fuel_assembly)/(np.sqrt(3))
outer_assembly=openmc.model.HexagonalPrism(edge_length=fuel_assembly_edge, orientation='y')
filling_fuel_assembly=openmc.Cell(name='fuel assembly cell',fill=fuel_pin_hex_lat, region=-outer_assembly & -zmax & +zmin)

d_reflector_assembly=10.876
r_reflector_assembly=d_reflector_assembly/2

reflector_assembly_edge=(2*r_reflector_assembly)/(np.sqrt(3))
reflector_assembly_region=openmc.model.HexagonalPrism(edge_length=reflector_assembly_edge, orientation='y')
reflector_cell=openmc.Cell(name='reflector encasing', fill=NiCrTi, region=+outer_assembly & -reflector_assembly_region & +zmin & -zmax)

d_coolant_assembly=11.055
r_coolant_assembly=d_coolant_assembly/2

coolant_assembly_edge=(2*r_coolant_assembly)/np.sqrt(3)
coolant_assembly_region=openmc.model.HexagonalPrism(edge_length=coolant_assembly_edge, orientation='y', boundary_type='transmission')
coolant_cell=openmc.Cell(name='coolant encasing', fill=he, region=+reflector_assembly_region & -coolant_assembly_region & +zmin & -zmax)

fuel_assembly_universe=openmc.Universe(cells=[filling_fuel_assembly,reflector_cell,coolant_cell])

fuel_assembly_universe.plot(basis='xy',color_by='material',colors={UC_PuC:'green',he:'blue',w14re:'black',re:'gold',SiC:'purple',NiCrTi:'pink'}, origin=[0,0,0.1], width=(20,20), pixels=(1000,1000), )

# reflector hexagonal
reflector_assembly_edge=coolant_assembly_edge
reflector_assembly_region=openmc.model.HexagonalPrism(edge_length=reflector_assembly_edge,orientation='y', boundary_type='reflective')
reflector_cell=openmc.Cell(name='reflector encasing', fill=NiCrTi, region=-reflector_assembly_region & -zmax & +zmin)
reflector_hexagonals_universe=openmc.Universe(name='reflector hexagonal')
reflector_hexagonals_universe.add_cell(reflector_cell)

shielding_assembly_edge=coolant_assembly_edge
shielding_assembly_region=openmc.model.HexagonalPrism(edge_length=shielding_assembly_edge,orientation='y', boundary_type='vacuum')
shielding_cell=openmc.Cell(name='reflector encasing', fill=b4c, region=-shielding_assembly_region & -zmax & +zmin)
shielding_hexagonals_universe=openmc.Universe(name='shielding hexagonal')
shielding_hexagonals_universe.add_cell(shielding_cell)

#core
core_hexagonal=openmc.HexLattice()
core_coolant=openmc.Cell(fill=he)
outer_core_universe=openmc.Universe(cells=[core_coolant], name='coolant core')

assembly_dist=d_coolant_assembly

core_hexagonal.center=(0,0)
core_hexagonal.pitch=(assembly_dist,)
core_hexagonal.outer=outer_core_universe
core_hexagonal.orientation='x'

print (core_hexagonal.show_indices(num_rings=14))

r1 = [fuel_assembly_universe]
r2 = [fuel_assembly_universe] * 6
r3 = [fuel_assembly_universe] * 12
r4 = [fuel_assembly_universe] * 18
r5 = [fuel_assembly_universe] * 24
r6 = [fuel_assembly_universe] * 30
r7 = [reflector_hexagonals_universe]*36
r8 = [reflector_hexagonals_universe]*42
r9 = [reflector_hexagonals_universe]*48
r10 = [reflector_hexagonals_universe]*54
r11 = [reflector_hexagonals_universe]*60
r12 = [shielding_hexagonals_universe]*66
r13 = [shielding_hexagonals_universe]*72
r14 = [shielding_hexagonals_universe]*78

total2=[r14,r13,r12,r11,r10,r9,r8,r7,r6,r5,r4,r3,r2,r1]
core_hexagonal.universes=total2

print (core_hexagonal)

core_edge=160
assembly_reg=openmc.ZCylinder(r=core_edge)
reflector_reg=openmc.ZCylinder(r=core_edge+10.5, boundary_type='reflective')

core_universe=openmc.Universe(name='core')

fuel_assembly_core=openmc.Cell(name='fuel assembly region')
fuel_assembly_core.fill=core_hexagonal
fuel_assembly_core.region=-assembly_reg & -zmax & +zmin
core_universe.add_cell(fuel_assembly_core)

reflector_assembly_core=openmc.Cell(name='reflector region')
reflector_assembly_core.fill=NiCrTi
reflector_assembly_core.region=+assembly_reg & -reflector_reg & -zmax & +zmin
core_universe.add_cell(reflector_assembly_core)

reflector_width=openmc.ZPlane(z0=86.79+10.5, boundary_type='reflective')
upper_reflector_core=openmc.Cell(name='reflector upper', fill=NiCrTi, region=-reflector_reg & -reflector_width & +zmax)
core_universe.add_cell(upper_reflector_core)

reflector_width_down=openmc.ZPlane(z0=0-10.5, boundary_type='reflective')
down_reflector_core=openmc.Cell(name='reflector down', fill=NiCrTi, region=-reflector_reg & +reflector_width_down & -zmin)
core_universe.add_cell(down_reflector_core)

geom=openmc.Geometry(core_universe)
geom.export_to_xml()

batches = 100
inactive = 30
particles = 20000# 30000

settings_file = openmc.Settings()
settings_file.batches = batches
settings_file.inactive = inactive
settings_file.particles = particles

settings_file.export_to_xml()
openmc.run()

```

[LAPTOP-G8B21FES:04700] shmem: mmap: an error occurred while determining whether or not /tmp/ompi.LAPTOP-G8B21FES.1000/jf.0/539230208/shared\_mem\_cuda\_pool.LAPTOP-G8B21FES could be created.  
[LAPTOP-G8B21FES:04700] create\_and\_attach: unable to create shared memory BTL coordinating structure :: size 134217728  
%%%%%%%%%%%%%%%  
%%%%%%%%%%%%%%%%%%%%%%%%  
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
%%%%%%%%%%%%%%%%%%%%%%%%  
%%%%%%%%%%%%%%%%%%%%%%%%  
############### %%%%%%%%%%%%%%%%%%%%%%%%  
################## %%%%%%%%%%%%%%%%%%%%%%%  
################### %%%%%%%%%%%%%%%%%%%%%%%  
#################### %%%%%%%%%%%%%%%%%%%%%%  
##################### %%%%%%%%%%%%%%%%%%%%%  
###################### %%%%%%%%%%%%%%%%%%%%  
####################### %%%%%%%%%%%%%%%%%%  
####################### %%%%%%%%%%%%%%%%%  
###################### %%%%%%%%%%%%%%%%%  
#################### %%%%%%%%%%%%%%%%%  
################# %%%%%%%%%%%%%%%%%  
############### %%%%%%%%%%%%%%%%  
############ %%%%%%%%%%%%%%%  
######## %%%%%%%%%%%%%%  
%%%%%%%%%%%

```
             | The OpenMC Monte Carlo Code
   Copyright | 2011-2024 MIT, UChicago Argonne LLC, and contributors
     License | https://docs.openmc.org/en/latest/license.html
     Version | 0.15.0
    Git SHA1 | 84fb85977f46e162fea8f5a20ea653a3ec62ac24
   Date/Time | 2025-04-30 09:12:57

```

MPI Processes | 1  
OpenMP Threads | 16

Reading settings XML file…  
Reading cross sections XML file…  
Reading materials XML file…  
Reading geometry XML file…  
Reading U235 from /home/azlan/endfb-viii.0-hdf5/neutron/U235.h5  
Reading U238 from /home/azlan/endfb-viii.0-hdf5/neutron/U238.h5  
Reading C12 from /home/azlan/endfb-viii.0-hdf5/neutron/C12.h5  
Reading Pu238 from /home/azlan/endfb-viii.0-hdf5/neutron/Pu238.h5  
Reading Pu239 from /home/azlan/endfb-viii.0-hdf5/neutron/Pu239.h5  
Reading Pu240 from /home/azlan/endfb-viii.0-hdf5/neutron/Pu240.h5  
Reading Pu241 from /home/azlan/endfb-viii.0-hdf5/neutron/Pu241.h5  
Reading Pu242 from /home/azlan/endfb-viii.0-hdf5/neutron/Pu242.h5  
Reading Am241 from /home/azlan/endfb-viii.0-hdf5/neutron/Am241.h5  
Reading Si28 from /home/azlan/endfb-viii.0-hdf5/neutron/Si28.h5  
Reading He4 from /home/azlan/endfb-viii.0-hdf5/neutron/He4.h5  
Reading Re185 from /home/azlan/endfb-viii.0-hdf5/neutron/Re185.h5  
Reading Re187 from /home/azlan/endfb-viii.0-hdf5/neutron/Re187.h5  
Reading W184 from /home/azlan/endfb-viii.0-hdf5/neutron/W184.h5  
Reading N14 from /home/azlan/endfb-viii.0-hdf5/neutron/N14.h5  
Reading Cr52 from /home/azlan/endfb-viii.0-hdf5/neutron/Cr52.h5  
Reading Ni59 from /home/azlan/endfb-viii.0-hdf5/neutron/Ni59.h5  
Reading Ti48 from /home/azlan/endfb-viii.0-hdf5/neutron/Ti48.h5  
Reading Mo96 from /home/azlan/endfb-viii.0-hdf5/neutron/Mo96.h5  
Reading Fe56 from /home/azlan/endfb-viii.0-hdf5/neutron/Fe56.h5  
Reading B11 from /home/azlan/endfb-viii.0-hdf5/neutron/B11.h5  
Minimum neutron data temperature: 294 K  
Maximum neutron data temperature: 294 K  
Preparing distributed cell instances…  
Reading plot XML file…  
Writing summary.h5 file…  
Maximum neutron transport energy: 20000000 eV for Pu239  
Initializing source particles…

====================\> K EIGENVALUE SIMULATION \<====================

## Bat./Gen. k Average k ========= ======== ==================== 1/1 0.53472 2/1 1.07937 3/1 1.06951 4/1 1.05973 5/1 1.04286 6/1 1.04965 7/1 1.02812 WARNING: Cannot reflect particle 4006 off surface in a lower universe. 8/1 1.02000 9/1 1.00665 10/1 1.02314 WARNING: Cannot reflect particle 11404 off surface in a lower universe. 11/1 1.01799 12/1 1.01524 13/1 1.00407 WARNING: Cannot reflect particle 8908 off surface in a lower universe. WARNING: Cannot reflect particle 3564 off surface in a lower universe. 14/1 1.01906 15/1 1.01143 16/1 1.01720 WARNING: Cannot reflect particle 13402 off surface in a lower universe. 17/1 1.01082 18/1 1.01793 WARNING: Cannot reflect particle 19795 off surface in a lower universe. 19/1 1.01227 20/1 1.01395 21/1 1.00560 22/1 0.99823 23/1 1.00430 WARNING: Particle 17551 could not be located after crossing a boundary of lattice 3 24/1 1.00348 25/1 1.00012 26/1 1.00515 27/1 1.00579 WARNING: Cannot reflect particle 7775 off surface in a lower universe. 28/1 1.00307 29/1 0.99874 WARNING: Cannot reflect particle 14705 off surface in a lower universe. 30/1 0.99826 31/1 0.99957 32/1 1.00151 1.00054 +/- 0.00097 33/1 1.00721 1.00276 +/- 0.00229 34/1 1.00858 1.00422 +/- 0.00218 WARNING: Cannot reflect particle 16472 off surface in a lower universe. ERROR: Maximum number of lost particles has been reached.

MPI\_ABORT was invoked on rank 0 in communicator MPI\_COMM\_WORLD  
Proc: [[8228,0],0]  
Errorcode: -1

NOTE: invoking MPI\_ABORT causes Open MPI to kill all MPI processes.  
You may or may not see output from other processes, depending on  
exactly when Open MPI kills them.

---

<div class="post-metadata">

**Author:** ![magnoxemo](https://avatars.discourse-cdn.com/v4/letter/m/5f8ce5/32.png) [@magnoxemo](https://openmc.discourse.group/u/magnoxemo)\
**Post date:** [May 1, 2025, 6:37pm UTC](https://openmc.discourse.group/t/material-cannot-reflect-in-lower-universe-and-particle-17551-could-not-be-located-after-crossing-a-boundary-of-lattice-3/5469/2 "2025-05-01T18:37:28Z")

</div>

This occurs mostly when there is a cell overlap. To find out which one, run your model with `geometry_debug = True` argument. Just replace the `openmc.run()` with `openmc.run( geometry_debug = True )`. That should show which cells are overlapped.

Sometimes plotting the geometry in high resolution also helps ( use [openmc-plotter](https://github.com/openmc-dev/plotter) app for that ).

---

<div class="post-metadata">

**Author:** ![yuanminghao](https://avatars.discourse-cdn.com/v4/letter/y/779978/32.png) [@yuanminghao](https://openmc.discourse.group/u/yuanminghao)\
**Post date:** [May 2, 2025, 2:28pm UTC](https://openmc.discourse.group/t/material-cannot-reflect-in-lower-universe-and-particle-17551-could-not-be-located-after-crossing-a-boundary-of-lattice-3/5469/3 "2025-05-02T14:28:11Z")

</div>

It seems that some surface boundary\_types are incorrect. They should be set as “transmission” instead of “reflective”, such as

reflector\_assembly\_region=openmc.model.HexagonalPrism(edge\_length=reflector\_assembly\_edge,orientation=‘y’, boundary\_type=‘ **transmission** ’)
