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

Mass flow through a patch

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

Like Tree1Likes
  • 1 Post By alf12

Reply
 
LinkBack Thread Tools Display Modes
Old   October 4, 2010, 12:00
Default Mass flow through a patch
  #1
New Member
 
Join Date: Jul 2010
Posts: 17
Rep Power: 6
alf12 is on a distinguished road
Hi,

I want to calculate mass flow through a patch, using incompressible RANS transient solver (2D case).

I have tried various methods, but I have some trouble with all of them

1 - Using post processing tool patchIngrate
Code:
patchIntegrate phi outlet
It works, but I have to format the file as an array to post process it and that's time consuming. I have done it for a few cases and I need a more efficient solution.

2 - Using libsimpleFunctionObjects library

2.1 - "patchMassFlow" function :
In this case I have a strange warning from OpenFoam :
Code:
--> FOAM Warning : 
    From function SolverInfo::SolverInfo(const dictionary& dict,const objectRegistry &obr)
    in file SolverInfo/SolverInfo.C at line 88
    Neither LES nor RANS found. Assuming no turbulence
2.2 - "patchIntegrate" function with field U
It works but the output is a vector and once again I have to process the file before I can use it.

Actually the best solution should be using patchMassFlow but I struggle to understand this warning.

Thanks for help
mm.abdollahzadeh likes this.
alf12 is offline   Reply With Quote

Old   October 4, 2010, 12:05
Default
  #2
Senior Member
 
Emanuele
Join Date: Mar 2009
Posts: 110
Rep Power: 7
nuovodna is on a distinguished road
Take a look here:

calculate mass flow rate on face OpenFoam

I attached a file of calcMassFlow that works on OF 1.7+
nuovodna is offline   Reply With Quote

Old   October 4, 2010, 12:44
Default
  #3
New Member
 
Join Date: Jul 2010
Posts: 17
Rep Power: 6
alf12 is on a distinguished road
Thanks for your answer. No problem to run your code but actually I have the same problem than with patchIntegrate, ie I have to format the file. I would like to get something that I could read more or less directly with gnuplot.

Code:
#Time Massflow
0.02 12.51
0.04 13.20
0.06 15.24
Anyway I will try to change the output format either in your code or either in the patchIntegrate tool.
alf12 is offline   Reply With Quote

Old   October 4, 2010, 13:02
Default
  #4
Senior Member
 
Emanuele
Join Date: Mar 2009
Posts: 110
Rep Power: 7
nuovodna is on a distinguished road
A precision: it's not my code. I only made some modification to get it working on OF 1.7.x

Original source code:

http://openfoamwiki.net/index.php/Contrib_calcMassFlow

I hope you can modify the code and obtain a "gnuplot ready" file

Regards

Emanuele
nuovodna is offline   Reply With Quote

Old   October 5, 2010, 04:33
Default
  #5
New Member
 
Join Date: Jul 2010
Posts: 17
Rep Power: 6
alf12 is on a distinguished road
So, I have made change in the patchIntegrate tool to fit my need and basically it works.

Anyway, I would prefer to use the libsimpleFunctionObjects in order to control the output interval and I don't really understand if the warning I get is a bug or if I miss anything.

I get this warning only when I use the patchMassFlow type with this lib and not when using the patchIntegrate type from the same lib.
alf12 is offline   Reply With Quote

Old   October 5, 2010, 13:49
Default
  #6
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,862
Rep Power: 38
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by alf12 View Post
Hi,

2 - Using libsimpleFunctionObjects library

2.1 - "patchMassFlow" function :
In this case I have a strange warning from OpenFoam :
Code:
--> FOAM Warning : 
    From function SolverInfo::SolverInfo(const dictionary& dict,const objectRegistry &obr)
    in file SolverInfo/SolverInfo.C at line 88
    Neither LES nor RANS found. Assuming no turbulence
2.2 - "patchIntegrate" function with field U
It works but the output is a vector and once again I have to process the file before I can use it.

Actually the best solution should be using patchMassFlow but I struggle to understand this warning.

Thanks for help
Don't mind the warning. The SolverInfo-class just tries to determine the properties of the solver you're working with and fails to understand new-school turbulence. But to calculate the massFlow you don't need turbulence so you'll be fine

Bernhard

PS: bug-Report at the mantis of the extend-project would be nice though
gschaider is offline   Reply With Quote

Old   October 6, 2010, 05:47
Default
  #7
New Member
 
Join Date: Jul 2010
Posts: 17
Rep Power: 6
alf12 is on a distinguished road
Bernhard, thanks for your answer.

I am still in the learning process with OpenFOAM and I have thought that SolverInfo was an OpenFOAM class.

I have run a calculation using patchMassFlow from libsimpleFunctionObjects and so far everything looks fine.
alf12 is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using starToFoam clo OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 33 September 26, 2012 05:04
Cyclic BC's: Possible face ordering problem? (Channel flow) sega OpenFOAM Native Meshers: blockMesh 3 September 28, 2010 13:46
mass flow in is not equal to mass flow out saii CFX 2 September 18, 2009 09:07
different mass flow rates michael FLUENT 4 February 21, 2005 04:48
Target mass flow rate Saturn FLUENT 0 December 10, 2004 05:18


All times are GMT -4. The time now is 16:40.