# Issue with Integrating Variables

**URL:** https://discourse.paraview.org/t/issue-with-integrating-variables/15062
**Category:** ParaView Support
**Created:** [July 16, 2024, 2:52am UTC](https://discourse.paraview.org/t/issue-with-integrating-variables/15062 "2024-07-16T02:52:46Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![swilliams\_KMT](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/s/b5e925/32.png) [@swilliams\_KMT](https://discourse.paraview.org/u/swilliams_KMT)
#### Post date: [July 16, 2024, 2:52am UTC](https://discourse.paraview.org/t/issue-with-integrating-variables/15062/1 "2024-07-16T02:52:46Z")

</div>

Hello everyone,

I’m currently experiencing an issue with the ‘Integrate Variables’ function in ParaView (v5.13). It seems that it’s not working as expected.

I am attempting to compute the average of specific variables over a cross-section of a pipe - this data is from a CFD simulation from Ansys CFX and exported in EnSight Gold format. However, the results I’m getting from the ‘Integrate Variables’ function seem unusual. For instance, the volume fraction, which is 1 everywhere according to the info tab, is reported as 0.046 by the ‘Integrate Variables’ function.

I can’t seem to figure out what’s going wrong. Has anyone else experienced this issue or does anyone have any suggestions on what I might be doing wrong? Thanks!

 ![image](https://discourse.paraview.org/uploads/default/original/2X/b/be4a1170ba98475a9c1b47649d1c74e345b1e186.png)

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [July 16, 2024, 6:44am UTC](https://discourse.paraview.org/t/issue-with-integrating-variables/15062/2 "2024-07-16T06:44:58Z")

</div>

Please save the output of ExtractSurface2 and share it here.

---

<div class="post-metadata">

### Author: ![swilliams\_KMT](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/s/b5e925/32.png) [@swilliams\_KMT](https://discourse.paraview.org/u/swilliams_KMT)
#### Post date: [July 16, 2024, 7:22am UTC](https://discourse.paraview.org/t/issue-with-integrating-variables/15062/3 "2024-07-16T07:22:58Z")

</div>

Thanks Mathieu, here’s the data for volume fraction and velocity. The goal is to calculate the average velocity for this cross-section and I’m using the volume fraction as a sanity check because it should return 1.

[slice\_01.vtm](https://discourse.paraview.org/uploads/short-url/5zZHcdBq0VEaQB6k3uUVK5fwaTl.vtm) (1.1 KB)

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [July 16, 2024, 7:33am UTC](https://discourse.paraview.org/t/issue-with-integrating-variables/15062/4 "2024-07-16T07:33:47Z")

</div>

please share the .vtp files too.

---

<div class="post-metadata">

### Author: ![swilliams\_KMT](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/s/b5e925/32.png) [@swilliams\_KMT](https://discourse.paraview.org/u/swilliams_KMT)
#### Post date: [July 16, 2024, 7:48am UTC](https://discourse.paraview.org/t/issue-with-integrating-variables/15062/5 "2024-07-16T07:48:15Z")

</div>

I see. Apologies, I’m not familiar with sharing this file format. This should be everything 🙂

[slice\_01\_0\_0.vtp](https://discourse.paraview.org/uploads/short-url/hP8U2OINJZyjpWHHuSSZhVZejfs.vtp) (23.1 KB)  
[slice\_01\_7\_0.vtp](https://discourse.paraview.org/uploads/short-url/a87j8RG4AnjbnqW3Yc2jhA2Pxm7.vtp) (4.3 KB)  
[slice\_01.vtm](https://discourse.paraview.org/uploads/short-url/5zZHcdBq0VEaQB6k3uUVK5fwaTl.vtm) (1.1 KB)

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [July 16, 2024, 8:01am UTC](https://discourse.paraview.org/t/issue-with-integrating-variables/15062/6 "2024-07-16T08:01:08Z")

</div>

IntegrateVariable divide the integration result by the total surface.

---

<div class="post-metadata">

### Author: ![swilliams\_KMT](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/s/b5e925/32.png) [@swilliams\_KMT](https://discourse.paraview.org/u/swilliams_KMT)
#### Post date: [July 16, 2024, 8:24am UTC](https://discourse.paraview.org/t/issue-with-integrating-variables/15062/7 "2024-07-16T08:24:28Z")

</div>

Ah, seems obvious now. Thanks Mathieu!
