# How to set lattice so it will compatible with 20000 at least

**URL:** <https://openmc.discourse.group/t/how-to-set-lattice-so-it-will-compatible-with-20000-at-least/5352>\
**Category:** User Support\
**Created:** [March 21, 2025, 6:15am UTC](https://openmc.discourse.group/t/how-to-set-lattice-so-it-will-compatible-with-20000-at-least/5352 "2025-03-21T06:15:35Z")\
**Posts on this page:** 5\
**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:** [March 21, 2025, 6:15am UTC](https://openmc.discourse.group/t/how-to-set-lattice-so-it-will-compatible-with-20000-at-least/5352/1 "2025-03-21T06:15:35Z")

</div>

I have problem with the lattice. when i try to run the code with 200 particles, it works. however when i set it to 20000 or 50000 then it is error and could not located the particle. how do i fix it ?

---

<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:** [March 21, 2025, 12:45pm UTC](https://openmc.discourse.group/t/how-to-set-lattice-so-it-will-compatible-with-20000-at-least/5352/2 "2025-03-21T12:45:22Z")

</div>

Hi Azlan, welcome to the openmc community.  
I think you have some undefined regions or some overlaps between your cells. You can use the geometry debug feature of openmc to check this `openmc.run(geometry_debug=True)` from your script or `openmc -g` in terminal

> **[18. Troubleshooting — OpenMC Documentation](https://docs.openmc.org/en/stable/usersguide/troubleshoot.html)**

Hope it could localize the problem with openmc.

---

<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:** [March 21, 2025, 12:56pm UTC](https://openmc.discourse.group/t/how-to-set-lattice-so-it-will-compatible-with-20000-at-least/5352/3 "2025-03-21T12:56:33Z")

</div>

I have and it says it is overlapping. However when i visualize it, it is not

Pada Jum, 21 Mar 2025, 19.55, Wahid via OpenMC \<[notifications@openmc.discoursemail.com](mailto:notifications@openmc.discoursemail.com)\> menulis:

---

<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:** [March 21, 2025, 1:18pm UTC](https://openmc.discourse.group/t/how-to-set-lattice-so-it-will-compatible-with-20000-at-least/5352/4 "2025-03-21T13:18:51Z")

</div>

Sometimes, we can’t see that visually from openmc plot, but since the geometry debug feature reports which cells are overlapped, you can check those cells. Sometimes, it was just a small error, the wrong surface being assigned, and so on.

---

<div class="post-metadata">

**Author:** ![cjwiguna](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/cjwiguna/32/3728_2.png) [@cjwiguna](https://openmc.discourse.group/u/cjwiguna)\
**Post date:** [March 27, 2025, 11:25am UTC](https://openmc.discourse.group/t/how-to-set-lattice-so-it-will-compatible-with-20000-at-least/5352/5 "2025-03-27T11:25:42Z")

</div>

Hello @Azlan846,

the `Geometry` class have `remove_redundant_surfaces()` method to reduce the number of multiple surface definition with similar construction. You may want to use it, aside of debugging the geometry.

Also beware of putting the vaccum-boundary, there should be some distance between a material which produce neutron source and the vacuum-boundary, so the system can track neutrons properly (I think).
