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/)
-   -   Calculate Mass Flowrate and Mass Flow Averaged Total Pressure at inlet and outlet (https://www.cfd-online.com/Forums/openfoam-post-processing/158726-calculate-mass-flowrate-mass-flow-averaged-total-pressure-inlet-outlet.html)

coolcrasher September 2, 2015 07:19

Calculate Mass Flowrate and Mass Flow Averaged Total Pressure at inlet and outlet
 
Hi Foamers,

I have simulated centrifugal pump using OpenFoam 2.4.0 and working on post processing of it.

I have to calculate Mass Flow Rate at Inlet and outlet patches. Also I have to calculate the Mass Flow averaged Total Pressure at inlet and Outlet patches.

I have some questions though:

1) I have used patchIntegrate phi to evaluate the Mass Flow Rate at inlet and outlet. I am getting a reasonable value at outlet patch but getting value zero at inlet patch ( but inlet velocity given is ( 0 0 4.5 ) ). I dont understand why its zero.

2) What is the difference between patchAveragie and patchIntegrate ? I have used patchAverage phi but openfoam says its an error and says Only possible to average volfields but phi is surfaceScalarField

3) How the total pressure be attained and perform mass flow averaging on the inlet and outlet patches.

I have gone through many forums but could not get a clear answer. I am new to CFD and using Openfoam.

Any help regarding this would be great :)

Thanks and Best Regards

coolcrasher September 4, 2015 08:03

Any help foamers !!

Any suggestions or guidance is welcomed :)

wyldckat September 19, 2015 11:37

Quick answers:
Quote:

Originally Posted by coolcrasher (Post 562141)
1) I have used patchIntegrate phi to evaluate the Mass Flow Rate at inlet and outlet. I am getting a reasonable value at outlet patch but getting value zero at inlet patch ( but inlet velocity given is ( 0 0 4.5 ) ). I dont understand why its zero.

Without an example case, I can't even guess the reason why it's zero. Please read and follow: https://www.cfd-online.com/Forums/op...-get-help.html

Quote:

Originally Posted by coolcrasher (Post 562141)
2) What is the difference between patchAveragie and patchIntegrate ? I have used patchAverage phi but openfoam says its an error and says Only possible to average volfields but phi is surfaceScalarField

patchAverage is essentially the result of dividing the integration on the surface of a patch by the total area of the patch. It only works with volume fields, because it was coded to only work with volume fields.


Quote:

Originally Posted by coolcrasher (Post 562141)
3) How the total pressure be attained and perform mass flow averaging on the inlet and outlet patches.

Function objects. Read the OpenFOAM User Guide on how to use them. Then check https://cpp.openfoam.org -> "FunctionObjects" (in older pages it was "Post-Processing") near the bottom of the page -> then:
  • Utility function objects -> pressureTools
  • Field function objects -> faceSource
I believe there are already a few examples on this already here on the forum.

coolcrasher September 20, 2015 04:57

Thank you. That helped me.

Any clue how to do mass flow averaging? I am using function objects but they do only area averaging

wyldckat September 20, 2015 06:42

Quote:

Originally Posted by coolcrasher (Post 564795)
Any clue how to do mass flow averaging? I am using function objects but they do only area averaging

Quick answer: Field function objects -> faceSource -> weightedAverage
The weight field should be rhoPhi. Partial example can be found in the tutorial "multiphase/interFoam/ras/waterChannel", the remaining configuration is shown in in the code documentation I mentioned before, namely the link to sourceforge.net.

calf.Z November 25, 2018 21:42

I use patchAverage phi successfully ,which one should I to calculate mass flow between patchaverage and patchIntegrate?

Thank you.

wyldckat December 22, 2018 11:19

Quick answer: mass flow rate is calculated by using the "sum" operation on the "phi" field instead of the average one... see surfaceFieldValue: https://cpp.openfoam.org/v5/classFoa...e.html#details

john_arul November 4, 2021 04:57

Hi, 'patchIntegrate(phi,name=inlet)' will give you (Integral phi *dA ), whereas patchAverage will give you (integral phi*dA)/A. As per OpenFoam documentation the unit of phi is kg/s (per face?) for compressible solvers and m3/s (per face?) for incompressible. The function 'flowRatePatch(phi,name=inlet)' gives the mass flow rate through a patch as it sums over all the faces of a patch. Hope it helps.


All times are GMT -4. The time now is 13:29.