CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (https://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   mass flow rate on a patch (https://www.cfd-online.com/Forums/openfoam-post-processing/182461-mass-flow-rate-patch.html)

tperet January 10, 2017 12:00

mass flow rate on a patch
 
Hi everyone,

I performed a simulation of the flow of a fluid (here water) within a spray gun device with the interFoam solver. I can make a nice video of the evolution of my alpha.water field using paraview but now I'm more interested in getting the outcome mass flow rate with respect to time. I created a patch named "outlet" which denotes the output surface. Basically, what I want is, at each time step, the integral over the surface of (rho*alpha*U.n) where n is the normal vector of the surface, U the velocity, alpha the volumetric rate of water and rho the density of my fluid.

I tried to use (without success obviously) the postprocessing tool with those two command lines:

1) postProcess -fields "(alpha.water)" -func "volflowRateSurface(name=outlet)"
2) postProcess -fields "(alpha.water)" -func "flowRatePatch(name=outlet)"

Does anybody have a solution or a few advices to solve my problem ? When I looked it up on forums and so on, I saw people getting their "postprocessed" results whilst the computation is running but I didn't make out the explanations at all...

Thanks a lot,

Thomas

miotto April 8, 2020 02:31

I did this in following way:


https://www.cfd-online.com/Forums/op...tml#post764815


Not quite sure it is the best solution, though.


All times are GMT -4. The time now is 00:22.