CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   ParaView (https://www.cfd-online.com/Forums/paraview/)
-   -   [OpenFOAM] How to calculate the fluid flow through a surface (https://www.cfd-online.com/Forums/paraview/61153-how-calculate-fluid-flow-through-surface.html)

lynx April 14, 2008 11:23

How to calculate the fluid flow through a surface
 
Hello Foamers,

i have a problem. I'm not able to calculate the fluid flow through a surface (inlet or outlet for example).

At my domain i have several inlets and outlets with different settings. ("pressureInlet", "inlet" and "fixedVelocityOutlet")
To see if paraView calculates right, i let it calulate the fluid flow at the "inlet"- and the "fixedVelocityOutlet"-patch. (one by one - not at same time). Because so i can compare the paraView result value for the fluid flow with the theoretical value which i set up through the magnitude of the surface area and the given velocity there (dV/dt=A*U). (they should be equal)

My procedure:
I clicked on "Filter" in the menu and selected "Extract Parts" by clicking on it. Then i chose my "inlet"-patch (for example) and clicked on "Accept". Now with "ExtractParts0" highlightened i clicked on "Generate a Glyph" and the velocity-vectors from this patch (surface) are shown. Last i clicked on "Integrate a Vectorfield" to yield the fluid flow through this surface. But now i get the problem. the calulated value does not match the theoretical value.

My questions are:
1)Did i anything (or all) wrong?
2)What are the units (dimension) of this value there? (my theor. fluid flow value was in [m³/h] - so i calculated it to [m³/s], cause foam uses [m] als length units (as i likely too)
In fact i expected a value arround 160000 m³/h and paraView showed me a value arround 120.000 [???]
3)Is the "." (dot) a sign for the 1000er value or the comma for the value?

Thank you in advance for your help. http://www.cfd-online.com/OpenFOAM_D...part/happy.gif

gschaider April 14, 2008 14:53

Don't know how to do it in par
 
Don't know how to do it in paraview.
I usually do it with this utility:
http://openfoamwiki.net/index.php/Contrib_calcMassFlow
(it should compile as posted under 1.4, if not: tell me so.) (there is a more advanced version floating around on the message board)

Bernhard

gaby April 18, 2008 04:25

Hello!! Don't know how to d
 
Hello!!

Don't know how to do it in paraview.

You can go to the discussion:

http://www.cfd-online.com/cgi-bin/Op...how.cgi?1/6921

There is the application "calcMassFlow" (by Philippose Rajan), and the steps that you must follow. It works very nice.

I hope it will work for you.

Bye

johannes April 19, 2008 09:31

Hi Oliver, there is an easy
 
Hi Oliver,

there is an easy way to calculate the volume flow in ParaView using the filter "Surface Flow".

Unfortunately, it doesn't work with standard OpenFOAM files, so you have to convert your case to VTK format first.

Then you can open the .vtk file of the patch you want to determine the flow through and apply the Surface Flow filter. It will print out the volume flow in m³/s.

If you want to calculate the flow at various timesteps and are using ParaView 3.*, be sure to open the top level .vtk file (e.g. "outlet_..vtk") in a patch directory and not a timestep specific file (e.g. "outlet_10.vtk").

You may get an error regarding missing vectors when applying the filter and/or viewing timestep "0". The reason is: After converting an OpenFOAM case to VTK the first timestep does not contain any fields and thus no volume flow can be calculated. So nothing to worry about. http://www.cfd-online.com/OpenFOAM_D...part/happy.gif

Best regards,
Johannes

t.oliveira January 20, 2016 11:58

You can also try using a function object. See this post for instructions: http://www.cfd-online.com/Forums/ope...tml#post581774


All times are GMT -4. The time now is 09:19.