# Calculate mass flow in Paraview

#1

Hi,

I would like to calculate the mass flow through a slice of my solution field in Paraview.
Any tips on how I can do this?

#2

Cheers.

Regards,
Barry

#3

@Filiptheking, this seems to come up quite a bit on the forums. @jousefm, we might wanna include this in a post processing wiki in the future, possibly with the theme of âIntegrate variableâ filter.

The volume flow rate is the normal velocity times the area, and the mass flow rate takes into account the density as well. This is pretty straight forward, but translating it into paraview filters takes a bit of thinking about but essentially comes down to these steps.

• Finding the normal velocity to the surface (in your case a slice).
• Multipling the normal velocity by density if interested in mass flow rate.
• Integrating the normal velocity magnitude in respect to surface area.

The result should be a single value in the table.

Good luck,
Darren

#4

Hello @1318980 ,

I think I managed to get a value for the flow.

Here is what I did:

1. Made a slice of my flow domain, where I wanted to calculate the flow
2. Applied âsurface vectorsâ, with perpendicular constraint mode.
3. Used the filter âintegrateVariablesâ and checked the U value in the direction of interest. Which should be in m^3/s since its integrated over the surface.

Is this the right approach?
Should I convert cell data to point data before the integration? I get slightly different results if I do.

#6

Never tried that one, I normally go with the âGenerate surface normalsâ filter but it sounds like this should give equal results.

Seems right to me

Think its more accurate to do it on the cell data, as the continuity is on the raw data.

Thanks for sharing!
Darren

#7

That seems reasonable, thanks @1318980!

I tried both the âsurface vectorâ and the âsurface normalâ-filters and got exactly the same result when I integrated. However, I notice that it was difference in to coloring of the surfaces. The reason behind this seems to be that the âgenerate surface normalsâ- filter didnât really generate vectors perpendicular to the plane. Why could this be?

Surface vectors, color plot

Surface vectors, glyphs. Notice that the vectors are perfectly perpendicular to the plane

Surface normals, color plot The coloring outside the circle is a little bit brighter than the surface vector-plot

Surface normals, glyphs. Here you can se that the vectors seems severely tilted. Why could this be?