WARNING: After particle 1712 crossed surface 69 it could not be located in any cell and it did not, ERROR: Maximum number of lost particles has been reached. leak.,,

the surface is causing the issue is fuel pallet outer radius,cladding outer radius,

please help me fixing this issue,or give me a code that i can follow

openmc code for single assembly

import openmc
####pure MATERIALS
m5 = openmc.Material(name=“M5 Tubing”)
m5.add_element(‘Zr’, 0.9825, percent_type=‘wo’)
m5.add_element(‘Nb’, 0.01, percent_type=‘wo’)
m5.add_element(‘O’, 0.007, percent_type=‘wo’)
m5.add_element(‘Fe’, 0.0005, percent_type=‘wo’)
m5.set_density(‘g/cm3’, 6.55)

helium = openmc.Material(name=“Helium Gas”)
helium.set_density(‘g/cm3’, 0.0001786)
helium.add_nuclide(‘He4’, 1.0)

water = openmc.Material(name=‘Water’)
water.add_element(‘H’, 2)
water.add_element(‘O’, 1)
water.add_s_alpha_beta(‘c_H_in_H2O’)
water.set_density(‘g/cm3’, 1.0)

A14B14C4D13 = openmc.Material(name=“1.87% u235”)##
A14B14C4D13.add_element(“U”, 1.0, enrichment=1.87)
A14B14C4D13.add_element(“O”, 2.0)
A14B14C4D13.set_density(‘g/cm3’, 10.53)

A233B233C233 = openmc.Material(name=“4.55% u235”)##
A233B233C233.add_element(“U”, 1.0, enrichment=4.55)
A233B233C233.add_element(“O”, 2.0)
A233B233C233.set_density(‘g/cm3’, 10.53)

Gd2O3 = openmc.Material(name=“A3_Gd2O3”)
Gd2O3.add_element(“Gd”, 2.0)
Gd2O3.add_element(“O”, 3.0)

A3_UO2 = openmc.Material(name=“4.55% u235”)##
A3_UO2.add_element(“U”, 1, enrichment=4.55)
A3_UO2.add_element(“O”, 2.0)
A3_UO2.set_density(‘g/cm3’, 10.53)

A3_UO2_Gd2O3 = openmc.Material.mix_materials([A3_UO2, Gd2O3], [0.98, 0.02], ‘wo’)##
A3_UO2_Gd2O3.set_density(‘g/cm3’, 10.53)

materials = openmc.Materials([m5, helium, water, A14B14C4D13, A233B233C233, Gd2O3, A3_UO2, A3_UO2_Gd2O3])
materials.export_to_xml()

#boundary
Aplane1 = openmc.ZPlane(z0=-100)
Aplane2 = openmc.ZPlane(z0=-92)
Aplane3 = openmc.ZPlane(z0=84)
Aplane4 = openmc.ZPlane(z0=92)
Aplane5 = openmc.ZPlane(z0=100)
Apallet_out_rad = openmc.ZCylinder( r=0.405765)
Acladout_rad = openmc.ZCylinder( r=0.47498)
Acladout_radm = openmc.ZCylinder( r=0.47498)
Acladin_rad = openmc.ZCylinder(r=0.41402)
Ar1 = openmc.ZCylinder(r=0.5715)
Ar2 = openmc.ZCylinder(r=0.6120)

AcellA1B1C1D1 = openmc.Cell(fill=A14B14C4D13, region=-Apallet_out_rad & +Aplane4 & -Aplane5)
AcellA2B2C2 = openmc.Cell(fill=A233B233C233, region=-Apallet_out_rad & +Aplane3 & -Aplane4)
AcellA3 = openmc.Cell(fill=A3_UO2_Gd2O3, region=-Apallet_out_rad & +Aplane2 & -Aplane3)
AcellA4B4C4D4 = openmc.Cell(fill=A14B14C4D13, region=-Apallet_out_rad & +Aplane1 & -Aplane2)
AcellA23B23C23 = openmc.Cell(fill=A14B14C4D13, region=-Apallet_out_rad & +Aplane2 & -Aplane4)

Agap_cell = openmc.Cell(fill=helium, region=+Apallet_out_rad & -Acladin_rad & +Aplane1 & -Aplane5)
Agap_cellm = openmc.Cell(fill=helium, region=+Apallet_out_rad & -Acladin_rad & +Aplane1 & -Aplane5)

Aclad_cell = openmc.Cell(fill=m5, region=+Acladin_rad & -Acladout_rad & +Aplane1 & -Aplane5)
Aclad_cellm = openmc.Cell(fill=m5, region=+Acladin_rad & -Acladout_rad & +Aplane1 & -Aplane5)
Agi1 = openmc.Cell(fill=water, region=-Ar1)
Agi2 = openmc.Cell(fill=m5, region=-Ar2 & +Ar1)
Awatercellp = openmc.Cell(fill=water, region=+Acladout_rad)
Awatercellpm = openmc.Cell(fill=water, region=+Acladout_rad)
Awatercellg = openmc.Cell(fill=water, region=+Ar2)

rodAuni1 = openmc.Universe(cells=[AcellA1B1C1D1, AcellA23B23C23, AcellA4B4C4D4, Agap_cell, Aclad_cell, Awatercellp])
rodAuni2mix = openmc.Universe(cells=[AcellA1B1C1D1, AcellA2B2C2, AcellA3, AcellA4B4C4D4, Agap_cellm, Aclad_cellm, Awatercellpm])

Agiuni = openmc.Universe(cells=[Agi1, Agi2, Awatercellg])
Aouter = openmc.Cell(fill=water)
Aouter_uni = openmc.Universe(cells=[Aouter])

#A_assembly.pitch = (1.259,)
A_assembly = openmc.RectLattice()
A_assembly.center = (0, 0)
A_assembly.pitch = (1.259, 1.259)
A_assembly.lower_left = [-1.259 * 17. / 2.0] * 2
A_assembly.outer = Aouter_uni
A_assembly.universes = [
[rodAuni1]*17,
[rodAuni1]*17,
[rodAuni1]*4 + [rodAuni2mix] + [Agiuni] + [rodAuni1]*2 + [Agiuni] + [rodAuni1]*2 + [Agiuni] + [rodAuni2mix] + [rodAuni1]*4,
[rodAuni1]*3 + [Agiuni] + [rodAuni1]*2 + [rodAuni2mix] + [rodAuni1] + [rodAuni2mix] + [rodAuni1] + [rodAuni2mix] + [rodAuni1]*2 + [Agiuni] + [rodAuni1]*3,
[rodAuni1]*2 + [rodAuni2mix] + [rodAuni1] + [rodAuni2mix] + [rodAuni1]*7 + [rodAuni2mix] + [rodAuni1] + [rodAuni2mix] + [rodAuni1]*2,
[rodAuni1] + [rodAuni1] + [Agiuni] + [rodAuni1] + [rodAuni1] + [Agiuni] + [rodAuni1] + [rodAuni2mix] + [Agiuni] + [rodAuni2mix] + [rodAuni1] + [Agiuni] + [rodAuni1] + [rodAuni1] + [Agiuni] + [rodAuni1] + [rodAuni1],
[rodAuni1]*3 + [rodAuni2mix] + [rodAuni1]*9 + [rodAuni2mix] + [rodAuni1]*3,
[rodAuni1]*5 + [rodAuni2mix] + [rodAuni1]*5 + [rodAuni2mix] + [rodAuni1]*5,
[rodAuni1]*2 + [Agiuni] + [rodAuni2mix] + [rodAuni1] + [Agiuni] + [rodAuni1]*2 + [Agiuni] + [rodAuni1]*2 + [Agiuni] + [rodAuni1] + [rodAuni2mix] + [Agiuni] + [rodAuni1]*2,
[rodAuni1]*5 + [rodAuni2mix] + [rodAuni1]*5 + [rodAuni2mix] + [rodAuni1]*5,
[rodAuni1]*3 + [rodAuni2mix] + [rodAuni1]*9 + [rodAuni2mix] + [rodAuni1]*3,
[rodAuni1] + [rodAuni1] + [Agiuni] + [rodAuni1] + [rodAuni1] + [Agiuni] + [rodAuni1] + [rodAuni2mix] + [Agiuni] + [rodAuni2mix] + [rodAuni1] + [Agiuni] + [rodAuni1] + [rodAuni1] + [Agiuni] + [rodAuni1] + [rodAuni1],
[rodAuni1]*2 + [rodAuni2mix] + [rodAuni1] + [rodAuni2mix] + [rodAuni1]*7 + [rodAuni2mix] + [rodAuni1] + [rodAuni2mix] + [rodAuni1]*2,
[rodAuni1]*3 + [Agiuni] + [rodAuni1]*2 + [rodAuni2mix] + [rodAuni1] + [rodAuni2mix] + [rodAuni1] + [rodAuni2mix] + [rodAuni1]*2 + [Agiuni] + [rodAuni1]*3,
[rodAuni1]*4 + [rodAuni2mix] + [Agiuni] + [rodAuni1]*2 + [Agiuni] + [rodAuni1]*2 + [Agiuni] + [rodAuni2mix] + [rodAuni1]*4,
[rodAuni1]*17,
[rodAuni1]*17,
]
Abox_region = openmc.model.RectangularPrism(width=25.403, height=25.403, origin=(0, 0), boundary_type=‘reflective’)
Abox_region1 = openmc.model.RectangularPrism(width=21.403, height=21.403, origin=(0, 0))
Abox_regionz = -openmc.ZPlane(z0=105, boundary_type=‘vacuum’) & +openmc.ZPlane(z0=-105, boundary_type=‘vacuum’)
Acl = openmc.Cell(fill=water, region=-Abox_region & +Abox_region1 & Abox_regionz)
Acl1 = openmc.Cell(fill=A_assembly, region=-Abox_region1 & Abox_regionz)
u1 = openmc.Universe(cells=[Acl, Acl1])
geom1 = openmc.Geometry(u1)
geom1.export_to_xml()
u1.plot(color_by =‘cell’,colors={Aclad_cellm:‘black’, Agap_cell:‘red’,Agap_cellm:‘blue’}, width=(30,40), pixels= (4000,4000))
#u1.plot(color_by =‘cell’,colors={Aclad_cellm:‘black’, Agap_cell:‘red’,Agap_cellm:‘blue’}, width=(5,5), pixels= (4000,4000))

point = openmc.stats.Point((0, 0, 0))
src = openmc.IndependentSource(space=point)
settings = openmc.Settings()
settings.source = src
settings.batches = 100
settings.inactive = 10
settings.particles = 5000
settings.export_to_xml()
openmc.run(geometry_debug=True)

Hi s_rahman_wave, welcome to the openmc community.
This kind of error ‘WARNING: After particle crossed surface it could not be located in any cell and it did not, ERROR: Maximum number of lost particles has been reached. leak.’ might come from the undefined boundaries condition. You might know that each openmc boundary will be assigned with transmission boundary condition. Still, for each model, the outermost boundary should be assigned as either a reflective boundary condition for a reflective case scenario (i.e. k-infinty problem) or a vacuum boundary condition for another case (i.e. k-effective in core model with leakage).

In your case, since you said that your problem is at the assembly level, have you checked the boundary conditions for your model? I can see that the XY direction uses reflective BC and vacuum in the Z direction, but you forgot to define some parts of your fuel pin region, especially on the top and bottom sections shown in the xz plot.

u1.plot(basis='xz', width=(30,250), pixels= (2000,2000), color_by ='cell', colors={Aclad_cellm:'black', Agap_cell:'red',Agap_cellm:'blue'})
u1.plot(basis='xy', width=(30,30), pixels= (1000,1000), color_by ='cell', colors={Aclad_cellm:'black', Agap_cell:'red',Agap_cellm:'blue'})


So I think you just need to complete the undefined region in your fuel assembly model.

Also, openmc reports that surface 69 is causing an error, so you can check which part of that surface is causing the error.
bonus
Apallet_out_rad → Apellet_out_rad

the Problem occured since i used same cell in multiple universes.That’s ehy openmc wasn’t assigning my cell in some mixture of fuel universe…so i assigned particular cell in particular universe though ther are with same dimention…The problem is solved

1 Like