# Hex Lattice error with n\_axial set to 10

**URL:** https://openmc.discourse.group/t/hex-lattice-error-with-n-axial-set-to-10/1898
**Category:** User Support
**Created:** [April 5, 2022, 7:33pm UTC](https://openmc.discourse.group/t/hex-lattice-error-with-n-axial-set-to-10/1898 "2022-04-05T19:33:06Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Brian729](https://avatars.discourse-cdn.com/v4/letter/b/a8b319/32.png) [@Brian729](https://openmc.discourse.group/u/Brian729)
#### Post date: [April 5, 2022, 7:33pm UTC](https://openmc.discourse.group/t/hex-lattice-error-with-n-axial-set-to-10/1898/1 "2022-04-05T19:33:06Z")

</div>

One comment, one question. I have been able to get a planar replication of the hex lattice by setting the hexlattice.universe attribute to the replicated universe. But I have not been able to figure out how to replicate that in the Z direction. I set an n\_axial value to 10, but still get the following error:

A hexagonal lattice without \<n\_axial\> must have specified by 2 numbers.

I have 3 coordinates for the center (0,0,0), but still get the above call out?

Ideally I’d like openmc to “propagate” in the vertical direction without me having to call out the number of Z layers - is that possible? My assignment region will truncate the geometry.

Also, documentation error - the variable is called out as num\_axial in the documentation. Looking at the source, it should be n\_axial.

Appreciate any help! Brian

---

<div class="post-metadata">

### Author: ![Pranto](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/pranto/32/489_2.png) [@Pranto](https://openmc.discourse.group/u/Pranto)
#### Post date: [April 13, 2022, 5:59am UTC](https://openmc.discourse.group/t/hex-lattice-error-with-n-axial-set-to-10/1898/2 "2022-04-13T05:59:25Z")

</div>

@Brian729 You need one additional level of nesting.

```python
ring2 = [uni_1, uni_2, ...]
ring1 = [uni_1]

level_1 = [ring2, ring1] # 1st axial layer
level_2 = [ring2, ring1] # 2nd axial layer
...
...
... 

```

For more information, see this post; hopefully, you’ll find your answer there.

> [@AttributeError: can't set attribute When Creating HexLattice](https://openmc.discourse.group/t/attributeerror-cant-set-attribute-when-creating-hexlattice/355):
>
> Hi, I’m trying to create 3d hexagonal lattice but it shows “AttributeError: can’t set attribute” is there anyone who can help me solve this? Thanks, Kristina
