# Creat a mesh to plot the axial power distribution with step drawstyle

**URL:** <https://openmc.discourse.group/t/creat-a-mesh-to-plot-the-axial-power-distribution-with-step-drawstyle/4079>\
**Category:** User Support\
**Created:** [March 23, 2024, 5:17pm UTC](https://openmc.discourse.group/t/creat-a-mesh-to-plot-the-axial-power-distribution-with-step-drawstyle/4079 "2024-03-23T17:17:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![abdoiz](https://avatars.discourse-cdn.com/v4/letter/a/8491ac/32.png) [@abdoiz](https://openmc.discourse.group/u/abdoiz)\
**Post date:** [March 23, 2024, 5:17pm UTC](https://openmc.discourse.group/t/creat-a-mesh-to-plot-the-axial-power-distribution-with-step-drawstyle/4079/1 "2024-03-23T17:17:39Z")

</div>

Hi  
Is this the right approach for building the mesh tally to calculate and plot the axial power distribution?  
mesh1 = openmc.RegularMesh()  
mesh1.dimension = [1, 1, 1]  
mesh1.lower\_left = [-75.2626, -75.2626, 11.365]  
mesh1.upper\_right = [75.2626, 75.2626, 14.92]

mesh2 = openmc.RegularMesh()  
mesh2.dimension = [1, 1, 1]  
mesh2.lower\_left = [-75.2626, -75.2626, 14.92]  
mesh2.upper\_right = [75.2626, 75.2626, 19.365]

mesh3 = openmc.RegularMesh()  
mesh3.dimension = [1, 1, 4]  
mesh3.lower\_left = [-75.2626, -75.2626, 19.365]  
mesh3.upper\_right = [75.2626, 75.2626, 65.974]

mesh4 = openmc.RegularMesh()  
mesh4.dimension = [1, 1, 1]  
mesh4.lower\_left = [-75.2626, -75.2626, 65.974]  
mesh4.upper\_right = [75.2626, 75.2626, 70.419]

mesh5 = openmc.RegularMesh()  
mesh5.dimension = [1, 1, 4]  
mesh5.lower\_left = [-75.2626, -75.2626, 70.419]  
mesh5.upper\_right = [75.2626, 75.2626, 117.028]

mesh6 = openmc.RegularMesh()  
mesh6.dimension = [1, 1, 1]  
mesh6.lower\_left = [-75.2626, -75.2626, 117.028]  
mesh6.upper\_right = [75.2626, 75.2626, 121.473]

mesh7 = openmc.RegularMesh()  
mesh7.dimension = [1, 1, 4]  
mesh7.lower\_left = [-75.2626, -75.2626, 121.473]  
mesh7.upper\_right = [75.2626, 75.2626, 168.082]

mesh8 = openmc.RegularMesh()  
mesh8.dimension = [1, 1, 1]  
mesh8.lower\_left = [-75.2626, -75.2626, 168.082]  
mesh8.upper\_right = [75.2626, 75.2626, 172.527]

mesh9 = openmc.RegularMesh()  
mesh9.dimension = [1, 1, 4]  
mesh9.lower\_left = [-75.2626, -75.2626, 172.527]  
mesh9.upper\_right = [75.2626, 75.2626, 211.365]

# Instantiate tally filters for each mesh

mesh\_filter1 = openmc.MeshFilter(mesh1)  
mesh\_filter2 = openmc.MeshFilter(mesh2)  
mesh\_filter3 = openmc.MeshFilter(mesh3)  
mesh\_filter4 = openmc.MeshFilter(mesh4)  
mesh\_filter5 = openmc.MeshFilter(mesh5)  
mesh\_filter6 = openmc.MeshFilter(mesh6)  
mesh\_filter7 = openmc.MeshFilter(mesh7)  
mesh\_filter8 = openmc.MeshFilter(mesh8)  
mesh\_filter9 = openmc.MeshFilter(mesh9)

# Create a tally to score the axial power distribution

tally = openmc.Tally(name=‘mesh tally’)  
tally.filters = [mesh\_filter1, mesh\_filter2,  
mesh\_filter3, mesh\_filter4,  
mesh\_filter5, mesh\_filter6,  
mesh\_filter7, mesh\_filter8, mesh\_filter9]  
tally.scores = [‘kappa-fission’]

 ![image](https://global.discourse-cdn.com/free1/uploads/openmc/original/2X/2/23960bf151faa7e0cff9561b156655393896a5dc.png)  
 ![Capture](https://global.discourse-cdn.com/free1/uploads/openmc/original/2X/a/aa728e6d305356671d7ddc13b5f669d6c8c48581.jpeg)

---

<div class="post-metadata">

**Author:** ![abdoiz](https://avatars.discourse-cdn.com/v4/letter/a/8491ac/32.png) [@abdoiz](https://openmc.discourse.group/u/abdoiz)\
**Post date:** [March 23, 2024, 5:32pm UTC](https://openmc.discourse.group/t/creat-a-mesh-to-plot-the-axial-power-distribution-with-step-drawstyle/4079/2 "2024-03-23T17:32:40Z")

</div>

After combining the meshes, I get zero values for the kappa-fission rate in my tally results.

 ![image](https://global.discourse-cdn.com/free1/uploads/openmc/original/2X/f/fe66462e597eeec243e8757daa50e2c813241695.png)
