# How to calculate the flow rate

**URL:** https://discourse.paraview.org/t/how-to-calculate-the-flow-rate/806
**Category:** ParaView Support
**Created:** [October 29, 2018, 3:05pm UTC](https://discourse.paraview.org/t/how-to-calculate-the-flow-rate/806 "2018-10-29T15:05:01Z")
**Posts on this page:** 19
**Page:** 1

<div class="post-metadata">

### Author: ![Eliss](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/e/b5e925/32.png) [@Eliss](https://discourse.paraview.org/u/Eliss)
#### Post date: [October 29, 2018, 3:05pm UTC](https://discourse.paraview.org/t/how-to-calculate-the-flow-rate/806/1 "2018-10-29T15:05:01Z")

</div>

Good afternoon, I think this is a typical problem but I want to know how I could measure the flow rate of my simulation. I was looking for information but I only found that:

1. Integrate value filter for the inlet surface.

I don’t know if that gives me what I am looking for and how to know it.

Thank you in advance,  
Elisa.

---

<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: [October 29, 2018, 4:11pm UTC](https://discourse.paraview.org/t/how-to-calculate-the-flow-rate/806/2 "2018-10-29T16:11:44Z")

</div>

This category of discourse is for sharing your tips and tricks. You may want to post again in ParaView support category.

---

<div class="post-metadata">

### Author: ![utkarsh.ayachit](https://discourse.paraview.org/user_avatar/discourse.paraview.org/utkarsh.ayachit/32/39_2.png) [@utkarsh.ayachit](https://discourse.paraview.org/u/utkarsh.ayachit)
#### Post date: [October 29, 2018, 4:58pm UTC](https://discourse.paraview.org/t/how-to-calculate-the-flow-rate/806/3 "2018-10-29T16:58:18Z")

</div>

I’ve updated the category – no need to repost.

---

<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: [October 29, 2018, 4:58pm UTC](https://discourse.paraview.org/t/how-to-calculate-the-flow-rate/806/4 "2018-10-29T16:58:52Z")

</div>

Thanks Utkarsh.

---

<div class="post-metadata">

### Author: ![Eliss](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/e/b5e925/32.png) [@Eliss](https://discourse.paraview.org/u/Eliss)
#### Post date: [October 30, 2018, 7:33am UTC](https://discourse.paraview.org/t/how-to-calculate-the-flow-rate/806/5 "2018-10-30T07:33:57Z")

</div>

Thank you for changing the category, I new on this forum and I don’t know how to use it.

---

<div class="post-metadata">

### Author: ![Antech](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/a/8c91f0/32.png) [@Antech](https://discourse.paraview.org/u/Antech)
#### Post date: [October 31, 2018, 6:37am UTC](https://discourse.paraview.org/t/how-to-calculate-the-flow-rate/806/6 "2018-10-31T06:37:55Z")

</div>

Hello.  
This is indeed a standard problem. Custom postprocessors like CFD Post has built-in calculating functions to get mass flow averages, integrals etc. ParaView, to my knowledge, doesn’t have this function so you can only do it manually. First and simplest way is to create a target surface like just slice or something curvilinear + thresholds to limit it’s bounds, then use **Surface Normals** and **Calculator** filters in series to compute rw=Density\*(Velocity.Normals), then integrate with Integrate variables. It will only formally compute the sum of FaceArea\*Variable, but inspecting the table for your **rw** variable column you will find the mass flow through the slice.  
Although this method is simple, it’s not convenient because you must create this additional pipeline and then search the table for rw variable (datasets in CFD modeling has lots of variables so if you selected them all you will have a very long table header in Integrate Variables result). Also you will only get the mass flow. To calculate mass flow or area averages you will need to add more filters. Even if you use the custom filter, as I know, it’s not editable so you cannot just add new averaging functions (may be custom filters are editable in newer ParaView versions, sorry, I don’t know).  
If you need intensive averaging for many variants and you want to get result as fast as possible and be able to add new functionality relatively easily, you can make a script. I attach my simple script, but you need to customize it for your variables. To use the script, select the target surface (like slice) in pipeline, then run the script from Python console. This is made for ParaView 5.2 (newer versions doesn’t support our “semi-hardware” RDP).

[ParaViewSurfaceIntegrals.py](https://discourse.paraview.org/uploads/default/original/1X/6061c28a23f0b53357a415954edd85ec4fb332fc.py) (3.6 KB)

---

<div class="post-metadata">

### Author: ![Kai\_himself](https://discourse.paraview.org/user_avatar/discourse.paraview.org/kai_himself/32/280_2.png) [@Kai\_himself](https://discourse.paraview.org/u/Kai_himself)
#### Post date: [June 21, 2019, 8:34am UTC](https://discourse.paraview.org/t/how-to-calculate-the-flow-rate/806/7 "2019-06-21T08:34:49Z")

</div>

Hey,  
i post it into that topic because its the same topic, if its not ok remove my post and i will start a new topic.

i have to calculate the mass flow over a threshold in a multiphase simulation. I create a slice at the threshold, and then the GenerateSurfaceNormls, but the Glyph are pointing to the side. Why the dont point in the normal direction ?  
There is a screenshot below, showing the glyph.

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

I uploaded two videos, the show the result from the simulation.

  

Is it possible to measure the flow over the threshold ?

Best regards  
Kai

---

<div class="post-metadata">

### Author: ![Kai\_himself](https://discourse.paraview.org/user_avatar/discourse.paraview.org/kai_himself/32/280_2.png) [@Kai\_himself](https://discourse.paraview.org/u/Kai_himself)
#### Post date: [June 24, 2019, 6:30pm UTC](https://discourse.paraview.org/t/how-to-calculate-the-flow-rate/806/8 "2019-06-24T18:30:43Z")

</div>

Hey,  
is it even possible to calculate the flow volumen from one of the phases ?

Best regards  
Kai

---

<div class="post-metadata">

### Author: ![Antech](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/a/8c91f0/32.png) [@Antech](https://discourse.paraview.org/u/Antech)
#### Post date: [June 25, 2019, 9:21am UTC](https://discourse.paraview.org/t/how-to-calculate-the-flow-rate/806/9 "2019-06-25T09:21:24Z")

</div>

Hello. I think, there is still no built-in function for the “function  
calculation”. You may use Calculator filter to introduce the specific  
flow variable(s) with Integrate Variables after it. Later will just  
summarize Area_Variable over the mesh region you apply it to. So you  
will need something like PhaseVolumeFraction_PhaseNormalVelocity in  
Calculator filter. Integrating it will give the sum of  
PhaseVolumeFraction_PhaseNormalVelocity_CellArea that is the phase  
volumetric flow through the selected mesh face (surface zone).  
If you have an orthogonal face, just use the X, Y or Z velocity. But  
if it’s not the cese, you will need the “costom” normal velocity. For  
this, apply Surface normals to selected mesh zone first. It will give  
you the Normals variable. Then use the scalar multiplication  
(Normals.PhaseVelocity) as the PhaseNormalVelocity in expression above  
or introduce an additional calculator filter with  
(Normals.PhaseVelocity) and name the Result as PhaseNormalVelocity.  
Please note that some things will only work properly with the  
particular array types (surface or volume zones) and with only single  
block. You may use the Extract Block filter to extract exactly the  
volume region you need, then Slice it and feed integrate on this  
slice.

---

<div class="post-metadata">

### Author: ![Kai\_himself](https://discourse.paraview.org/user_avatar/discourse.paraview.org/kai_himself/32/280_2.png) [@Kai\_himself](https://discourse.paraview.org/u/Kai_himself)
#### Post date: [June 26, 2019, 7:31am UTC](https://discourse.paraview.org/t/how-to-calculate-the-flow-rate/806/10 "2019-06-26T07:31:43Z")

</div>

Hey Andrew,  
thank you for your advise. I will try it tomorrow in the evening, and i will get back to you.

Best regards  
Kai

---

<div class="post-metadata">

### Author: ![Kai\_himself](https://discourse.paraview.org/user_avatar/discourse.paraview.org/kai_himself/32/280_2.png) [@Kai\_himself](https://discourse.paraview.org/u/Kai_himself)
#### Post date: [July 2, 2019, 8:33am UTC](https://discourse.paraview.org/t/how-to-calculate-the-flow-rate/806/11 "2019-07-02T08:33:31Z")

</div>

@Antech  
Hey Andrew,  
sorry for my late replay.  
I tryed to follow your guide, but i did not make it. I watch a few videos on youtube, how to use the calculator, it does not really fit to my problem.

Here is a screenshot:

 ![AreaFlow](https://discourse.paraview.org/uploads/default/original/2X/c/cfb477c9ece46f3e6279269cbb46043e5e24a519.jpeg)  
At the first attempt, i calculate alpha.phase1 \* U\_Y \* Area

For the equation Q [m³/s]=v [m/s]\*A [m²], i need the Area where the alpha.phase1 is over (for example 0.85).  
Can i use the calculator to make an if instruction or something like that ?

Best regards  
Kai

EDIT:  
I have tried a little more.  
Like you write, i use the calculator to calculat the alpha.phase1 \* U\_Y direction.  
This time the result columen add to the Spreadsheet.  
How i get the Area of every Triangle at the Slice ?  
I like to use alpha.phase1 \* U\_Y \* Area of the specific triangle.  
Would that work ?

 ![](https://discourse.paraview.org/uploads/default/original/2X/b/b477c787c6ee351a119f6403f23f631b67b8217a.jpeg)

Best regards  
Kai

---

<div class="post-metadata">

### Author: ![Antech](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/a/8c91f0/32.png) [@Antech](https://discourse.paraview.org/u/Antech)
#### Post date: [July 2, 2019, 11:52am UTC](https://discourse.paraview.org/t/how-to-calculate-the-flow-rate/806/12 "2019-07-02T11:52:11Z")

</div>

Hello, Kai. If I get it right, you need alpha.phase\*U\_Y in calculator.  
You may name the result Flux (usually, flow is absolute). It will  
produce the [m/s] result because aplha.phase is [m3/m3]. Integrating  
it (Intagrate variables), you will have the flow of the phase in  
[m3/s] in “Flux” column in the Spreadsheet vie of Integrate variables  
filter.

---

<div class="post-metadata">

### Author: ![Antech](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/a/8c91f0/32.png) [@Antech](https://discourse.paraview.org/u/Antech)
#### Post date: [July 2, 2019, 11:59am UTC](https://discourse.paraview.org/t/how-to-calculate-the-flow-rate/806/13 "2019-07-02T11:59:10Z")

</div>

In addition to my previous message. Sorry, forgot this… If you need  
to accoun for only regions where some conditions are met, use the  
Threshold filter at the control surfece. Select alphs.phase as  
variable and set min/max values (for example, min=0.86, max=1.0 or  
just max=10). It will produce an array of faces that correspond to  
your condition. Apply the Calculator to get the phase Flux in [m/s],  
then Integrate variables (in integrates by the area) to get the phase  
flow through the part of your control surface where the phase volume  
fraction is greater that 0.85. If you need to apply the same filter  
set to many surfaces, use Python script or Custom filter in GUI  
(select the part of your pipeline and use the Custom filter in menu,  
AFAIR).

---

<div class="post-metadata">

### Author: ![Kai\_himself](https://discourse.paraview.org/user_avatar/discourse.paraview.org/kai_himself/32/280_2.png) [@Kai\_himself](https://discourse.paraview.org/u/Kai_himself)
#### Post date: [July 7, 2019, 6:49pm UTC](https://discourse.paraview.org/t/how-to-calculate-the-flow-rate/806/14 "2019-07-07T18:49:47Z")

</div>

Hey @Antech,  
once again sorry for my late answer.  
First thank you for your detailed answer. I think i got it.  
At the picture, i compare the flux of a.p1 with the threshold of a.p1 0.85 to 1.0.

 ![Flux](https://discourse.paraview.org/uploads/default/original/2X/d/d2bf504bec38e3ac43e35b953702c3421cd5c950.jpeg)

May i ask you another question, i didnt find any filter like “sum up a value over time”, is it imported in paraview or did i use python ?

Best redards  
Kai

---

<div class="post-metadata">

### Author: ![Antech](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/a/8c91f0/32.png) [@Antech](https://discourse.paraview.org/u/Antech)
#### Post date: [July 8, 2019, 12:28pm UTC](https://discourse.paraview.org/t/how-to-calculate-the-flow-rate/806/15 "2019-07-08T12:28:27Z")

</div>

Hello. I didnt do any time-related things in ParaView, so I cannot  
help you here. Please ask community at their forum.

---

<div class="post-metadata">

### Author: ![Asmaa\_Hadane](https://discourse.paraview.org/user_avatar/discourse.paraview.org/asmaa_hadane/32/3944_2.png) [@Asmaa\_Hadane](https://discourse.paraview.org/u/Asmaa_Hadane)
#### Post date: [June 15, 2020, 6:20am UTC](https://discourse.paraview.org/t/how-to-calculate-the-flow-rate/806/16 "2020-06-15T06:20:02Z")

</div>

Hello, to calculate the flowrate on paraview, please check the video below, it contains a detailed explanation of what you need 😃

[![](https://discourse.paraview.org/uploads/default/original/2X/3/3087e0e3c7f3d7d62e011904d37c08cd56dab8ca.jpeg "How to Calculate the FlowRate and Plot it Over Time in ParaView - #CFD #AsmaaHadane") ](https://www.youtube.com/watch?v=vgFL8kv320w)

---

<div class="post-metadata">

### Author: ![pavithra\_kalarani](https://discourse.paraview.org/user_avatar/discourse.paraview.org/pavithra_kalarani/32/6767_2.png) [@pavithra\_kalarani](https://discourse.paraview.org/u/pavithra_kalarani)
#### Post date: [May 26, 2021, 10:33am UTC](https://discourse.paraview.org/t/how-to-calculate-the-flow-rate/806/17 "2021-05-26T10:33:01Z")

</div>

Hello.  
I have a post-processing problem.  
I need to calculate the average mass flow at a particular location (in the screenshot i drew a line at that location)  
There is screenshot below showing the location.  
[mass flowrate|690x359](https://discourse.paraview.org/uploads/short-url/z1EN7wn3yyDzzXwwjfcFbtOBCqg.png)

---

<div class="post-metadata">

### Author: ![Asmaa\_Hadane](https://discourse.paraview.org/user_avatar/discourse.paraview.org/asmaa_hadane/32/3944_2.png) [@Asmaa\_Hadane](https://discourse.paraview.org/u/Asmaa_Hadane)
#### Post date: [May 26, 2021, 11:53am UTC](https://discourse.paraview.org/t/how-to-calculate-the-flow-rate/806/18 "2021-05-26T11:53:11Z")

</div>

Hello, you just need to do like in the video, you calculate magU then instead of extract block you will choose your slice and apply the filter integrate variables on it!

---

<div class="post-metadata">

### Author: ![Noah](https://discourse.paraview.org/user_avatar/discourse.paraview.org/noah/32/17766_2.png) [@Noah](https://discourse.paraview.org/u/Noah)
#### Post date: [July 10, 2026, 8:31am UTC](https://discourse.paraview.org/t/how-to-calculate-the-flow-rate/806/20 "2026-07-10T08:31:19Z")

</div>

Thanks for the explanation. Using **Integrate Variables** on a slice or cross-sectional surface is definitely one of the most reliable ways to calculate flow rate in ParaView. [deleted]
