# Inconsistency with Lattice Components Placement

**URL:** <https://openmc.discourse.group/t/inconsistency-with-lattice-components-placement/5165>\
**Category:** User Support\
**Created:** [January 20, 2025, 5:08pm UTC](https://openmc.discourse.group/t/inconsistency-with-lattice-components-placement/5165 "2025-01-20T17:08:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![AbdullahAlharbi](https://avatars.discourse-cdn.com/v4/letter/a/45deac/32.png) [@AbdullahAlharbi](https://openmc.discourse.group/u/AbdullahAlharbi)\
**Post date:** [January 20, 2025, 5:08pm UTC](https://openmc.discourse.group/t/inconsistency-with-lattice-components-placement/5165/1 "2025-01-20T17:08:07Z")

</div>

I have been facing an issue with building a lattice & plotting, but I don’t know whether the issue here is plot or lattice related, when I create a lattice out of a fuel plate that has half the spacin of water between plates, I get inconsistency in the placement of the fuel meat, for some plates it is deviated forward and for some it is deviated backwards, the image shows that clearly, something tells me that it is just a plotting issue as the fuel meet is only a few millimeters thick and the OpenMC cant capture these fine details when plotting, but I feel like it is a bigger issue and has to do with the way I defined the lattice, I will also publish another post about how that lattice produces an error when running, so please take a look at that if you can. The specific portion of the code that builds the geometry will be included below, in addition toa photo of the plot + the full code.

fuel\_top = openmc.ZPlane(z0=30)  
fuel\_bottom = openmc.ZPlane(z0=-30)  
fuel\_right = openmc.XPlane(x0=2.98)  
fuel\_left = openmc.XPlane(x0=-2.98)  
fuel\_front = openmc.YPlane(y0=0.0255)  
fuel\_back = openmc.YPlane(y0=-0.0255)

fuel\_region = +fuel\_bottom & -fuel\_top & +fuel\_left & -fuel\_right & -fuel\_front & +fuel\_back

fuel\_cell = openmc.Cell(region=fuel\_region, fill=U3Si2Al)

clad\_top = openmc.ZPlane(z0=32.55)  
clad\_bottom = openmc.ZPlane(z0=-32.55)  
clad\_right = openmc.XPlane(x0=3.615)  
clad\_left = openmc.XPlane(x0=-3.615)  
clad\_front = openmc.YPlane(y0=0.0635)  
clad\_back = openmc.YPlane(y0=-0.0635)

for surf in [clad\_top, clad\_bottom, clad\_right, clad\_left]:  
surf.boundary\_type = ‘vacuum’

clad\_region = +clad\_bottom & -clad\_top & +clad\_left & -clad\_right & -clad\_front & +clad\_back & ~fuel\_region

clad\_cell = openmc.Cell(region=clad\_region, fill=Al6061)

coolant\_front = openmc.YPlane(y0=0.2045)  
coolant\_back = openmc.YPlane(y0=-0.2045)

coolant\_region = -clad\_top & + clad\_bottom & -coolant\_front & +coolant\_back & +clad\_left & -clad\_right & ~clad\_region & ~ fuel\_region

coolant\_cell = openmc.Cell(region=coolant\_region, fill=water)

infinite\_water = openmc.Cell(fill= water)  
infinite\_water\_universe = openmc.Universe(cells=[infinite\_water])

fuel\_plate = openmc.Universe(cells=[fuel\_cell, clad\_cell, coolant\_cell])

fuel\_assembly = openmc.RectLattice(name = ‘fuel assembly’)  
fuel\_assembly.lower\_left = (-3.615, -2.863)  
fuel\_assembly.pitch = (7.23, 0.409)  
fuel\_assembly.universes = [[fuel\_plate], [fuel\_plate], [fuel\_plate], [fuel\_plate], [fuel\_plate], [fuel\_plate], [fuel\_plate], [fuel\_plate], [fuel\_plate], [fuel\_plate], [fuel\_plate], [fuel\_plate], [fuel\_plate], [fuel\_plate]]  
fuel\_assembly.outer = infinite\_water\_universe  
fuel\_assembly\_cell = openmc.Cell()  
fuel\_assembly\_cell.fill = fuel\_assembly

fuel\_assembly\_universe = openmc.Universe()  
fuel\_assembly\_universe.add\_cell(fuel\_assembly\_cell)

geometry = openmc.Geometry(root=fuel\_assembly\_universe)  
geometry.export\_to\_xml()  
[main code.py](https://openmc.discourse.group/uploads/short-url/dakIXmBDDkxc3KytdgNEwvCxJdP.py) (4.6 KB)

 ![Geometry (XY)](https://global.discourse-cdn.com/free1/uploads/openmc/original/2X/1/160e7ad021e1d40d628f747ec40ca7bf1243a1ca.png)

Please zoom in to the image and see the inconsistency, the first fuel plate from the top is placed forward not exactly in the middle, as we go to the bottom, plates start getting deviated to the bottom, so that is a pattern that indicates a problem with the lattice definition, but I am still unable to figure out what the issue is exactly.
