CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

Calculate Mass Flowrate and Mass Flow Averaged Total Pressure at inlet and outlet

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 2, 2015, 08:19
Default Calculate Mass Flowrate and Mass Flow Averaged Total Pressure at inlet and outlet
  #1
Member
 
Sravan Kumar
Join Date: May 2014
Posts: 57
Rep Power: 12
coolcrasher is on a distinguished road
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 is offline   Reply With Quote

Old   September 4, 2015, 09:03
Default
  #2
Member
 
Sravan Kumar
Join Date: May 2014
Posts: 57
Rep Power: 12
coolcrasher is on a distinguished road
Any help foamers !!

Any suggestions or guidance is welcomed
coolcrasher is offline   Reply With Quote

Old   September 19, 2015, 12:37
Default
  #3
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick answers:
Quote:
Originally Posted by coolcrasher View Post
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: How to give enough info to get help

Quote:
Originally Posted by coolcrasher View Post
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 View Post
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.
__________________

Last edited by wyldckat; February 12, 2018 at 16:41. Reason: updated links and description for OpenFOAM's 'cpp' website
wyldckat is offline   Reply With Quote

Old   September 20, 2015, 05:57
Default
  #4
Member
 
Sravan Kumar
Join Date: May 2014
Posts: 57
Rep Power: 12
coolcrasher is on a distinguished road
Thank you. That helped me.

Any clue how to do mass flow averaging? I am using function objects but they do only area averaging
coolcrasher is offline   Reply With Quote

Old   September 20, 2015, 07:42
Default
  #5
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quote:
Originally Posted by coolcrasher View Post
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.
wyldckat is offline   Reply With Quote

Old   November 25, 2018, 22:42
Default
  #6
Senior Member
 
Jianrui Zeng
Join Date: May 2018
Location: China
Posts: 157
Rep Power: 8
calf.Z is on a distinguished road
I use patchAverage phi successfully ,which one should I to calculate mass flow between patchaverage and patchIntegrate?

Thank you.
calf.Z is offline   Reply With Quote

Old   December 22, 2018, 12:19
Default
  #7
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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
__________________
wyldckat is offline   Reply With Quote

Old   November 4, 2021, 05:57
Default
  #8
New Member
 
john arul
Join Date: Apr 2021
Posts: 1
Rep Power: 0
john_arul is on a distinguished road
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.
john_arul is offline   Reply With Quote

Reply

Tags
mass flow average, patchaverage, patchintegrate, post procesing, total pressure

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Wind tunnel Boundary Conditions in Fluent metmet FLUENT 6 October 30, 2019 13:23
Volume flow rate boundary condition in OpenFOAM mayank.dce2k7 OpenFOAM Running, Solving & CFD 13 August 11, 2014 21:16
Boundary condition for exhaut flow with imposed mass flow stephane FLUENT 1 November 24, 2011 03:04
CO2 condensor mass flow rate BC at inlet and oulet possible? Boo85 CFX 0 August 17, 2011 23:20
ZeroGradient pressure Outlet BC prob (adjustPhi.C) Stylianos OpenFOAM 3 March 23, 2010 13:28


All times are GMT -4. The time now is 17:27.