# Particle underwent maximum number of events?

**URL:** <https://openmc.discourse.group/t/particle-underwent-maximum-number-of-events/1970>\
**Category:** User Support\
**Created:** [April 23, 2022, 7:49am UTC](https://openmc.discourse.group/t/particle-underwent-maximum-number-of-events/1970 "2022-04-23T07:49:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![imtiaj\_hossain](https://avatars.discourse-cdn.com/v4/letter/i/90db22/32.png) [@imtiaj\_hossain](https://openmc.discourse.group/u/imtiaj_hossain)\
**Post date:** [April 23, 2022, 7:49am UTC](https://openmc.discourse.group/t/particle-underwent-maximum-number-of-events/1970/1 "2022-04-23T07:49:06Z")

</div>

Hi everyone. Can anyone tell me the reason for such warning? how do i eliminate it?

Imtiaj

---

<div class="post-metadata">

**Author:** ![paulromano](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/paulromano/32/486_2.png) [@paulromano](https://openmc.discourse.group/u/paulromano)\
**Post date:** [April 29, 2022, 8:11pm UTC](https://openmc.discourse.group/t/particle-underwent-maximum-number-of-events/1970/2 "2022-04-29T20:11:55Z")

</div>

@imtiaj_hossain Do you have a model you’re able to share that exhibits this problem? If so, I can try to reproduce and see what the issue is.

---

<div class="post-metadata">

**Author:** ![imtiaj\_hossain](https://avatars.discourse-cdn.com/v4/letter/i/90db22/32.png) [@imtiaj\_hossain](https://openmc.discourse.group/u/imtiaj_hossain)\
**Post date:** [May 1, 2022, 7:07am UTC](https://openmc.discourse.group/t/particle-underwent-maximum-number-of-events/1970/3 "2022-05-01T07:07:24Z")

</div>

Hi @paulromano, i already found a solution of it for my geometry. May be it was caused by overlapping of geometry. But i modified the geometry & it showed no more warning.

---

<div class="post-metadata">

**Author:** ![Sabyasachi](https://avatars.discourse-cdn.com/v4/letter/s/58956e/32.png) [@Sabyasachi](https://openmc.discourse.group/u/Sabyasachi)\
**Post date:** [September 4, 2023, 4:56pm UTC](https://openmc.discourse.group/t/particle-underwent-maximum-number-of-events/1970/4 "2023-09-04T16:56:03Z")

</div>

I was trying to run a openMC code importing a CAD geometry. My OpenMC code is given below:  
import openmc

from IPython.display import Image  
from matplotlib import pyplot as plt

# materials

u235 = openmc.Material(name=“1”)  
u235.add\_nuclide(‘U235’, 1.0, ‘ao’)  
u235.set\_density(‘g/cc’, 11)  
materials = openmc.Materials([u235])

dagmc\_univ = openmc.DAGMCUniverse(filename=‘cylinder\_cubit.h5m’, auto\_geom\_ids=True, auto\_mat\_ids=True)  
bounding\_box = openmc.rectangular\_prism(20,20,boundary\_type=‘reflective’)

cell = openmc.Cell(region=bounding\_box, fill=dagmc\_univ)  
geometry = openmc.Geometry([cell])

settings = openmc.Settings()  
settings.batches = 100  
settings.inactive = 2  
settings.particles = 10000

model = openmc.Model(geometry=geometry, materials=materials, settings=settings)  
model.export\_to\_model\_xml()

p = openmc.Plot()  
p.width = (25.0, 25.0)  
p.pixels = (400, 400)  
p.color\_by = ‘material’  
p.colors = {u235: ‘yellow’}  
openmc.plot\_inline(p)  
openmc.run()

But it shows,  
WARNING: Particle 7525 underwent maximum number of events.  
in repetition.
