|
[Sponsors] |
January 18, 2012, 17:00 |
how to calculate mass flow rate /simpleFoam
|
#1 |
Member
andres
Join Date: Jul 2011
Posts: 31
Rep Power: 15 |
Hi Foamers,
How can I get the mass flow rate through patch?? I´m trying to obtain mass flow rate values to validate the result using the "flow in a 90° planar tee-junction" validation test case of Fluent ( Experiments by Hayes) http://oniken.free.fr/prg%20ecole/fl.../PDF/VAL_4.PDF I was able to obtain similars contouts of static pressure, but I´m having severs problem to get the mass flow rate through exits. I´m working with openfoam 2.0, simpleFoam solver and I can´t compile calcMassFlow utilityhttp://openfoamwiki.net/index.php/Contrib_calcMassFlow and I don´t understand how to use swak4foam. Code:
usuarioubuntu@SAN1496UBU:~/swak4Foam/otros/calcMassFlow$ wmake SOURCE=calcMassFlow.C ; g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam200/src/cfdTools/lnInclude -I/opt/openfoam200/src/cfdTools/general/lnInclude -I/opt/openfoam200/src/meshTools/lnInclude -I/home/usuarioubuntu/OpenFOAM/usuarioubuntu-2.0.0/Libraries/cellFaceSetUtilities/lnInclude -IlnInclude -I. -I/opt/openfoam200/src/OpenFOAM/lnInclude -I/opt/openfoam200/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linuxGccDPOpt/calcMassFlow.o calcMassFlow.C:33:19: fatal error: fvCFD.H: No such file or directory compilation terminated. make: *** [Make/linuxGccDPOpt/calcMassFlow.o] Error 1 usuarioubuntu@SAN1496UBU:~/swak4Foam/otros/calcMassFlow$ wmake Making dependency list for source file calcMassFlow.C SOURCE=calcMassFlow.C ; g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam200/src/finiteVolume/lnInclude -I/opt/openfoam200/src/meshTools/lnInclude -IlnInclude -I. -I/opt/openfoam200/src/OpenFOAM/lnInclude -I/opt/openfoam200/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linuxGccDPOpt/calcMassFlow.o calcMassFlow.C: In function ‘int main(int, char**)’: calcMassFlow.C:63:9: error: expected ‘)’ before ‘IOobject’ calcMassFlow.C:71:30: error: ‘Uheader’ was not declared in this scope calcMassFlow.C:73:5: error: expected primary-expression before ‘)’ token calcMassFlow.C:73:5: error: expected ‘;’ before ‘)’ token make: *** [Make/linuxGccDPOpt/calcMassFlow.o] Error 1 usuarioubuntu@SAN1496UBU:~/swak4Foam/otros/calcMassFlow$ |
|
January 18, 2012, 21:07 |
|
#2 |
Senior Member
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 556
Rep Power: 27 |
__________________
Linnemann PS. I do not do personal support, so please post in the forums. |
|
January 19, 2012, 09:30 |
|
#3 | |
Member
andres
Join Date: Jul 2011
Posts: 31
Rep Power: 15 |
Quote:
|
||
January 19, 2012, 09:55 |
|
#4 | |
Senior Member
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 556
Rep Power: 27 |
Quote from the wiki.
Quote:
__________________
Linnemann PS. I do not do personal support, so please post in the forums. |
||
January 19, 2012, 10:08 |
|
#5 |
Member
andres
Join Date: Jul 2011
Posts: 31
Rep Power: 15 |
Thanks for the answer.
I had compiled swak4foam without problems, but I think that the mass flow entry need some changes. If I use the the one in wiki I got this error; Quote: Starting time loop --> FOAM Warning : From function dlLibraryTableen(const fileName&) in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 99 could not load "libsimpleFunctionObjects.so" --> FOAM FATAL ERROR: Unknown function type patchMassFlow Table of functionObjects is empty From function functionObject::New(const word& name, const Time&, const dictionary&) in file db/functionObjects/functionObject/functionObject.C at line 74. FOAM exiting So now I´m trying to replace "libsimpleFunctionObjects.so" and patchMassFlow Thanks! |
|
January 19, 2012, 10:29 |
|
#6 |
Senior Member
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 556
Rep Power: 27 |
I'll have a look at it tomorrow.
__________________
Linnemann PS. I do not do personal support, so please post in the forums. |
|
January 19, 2012, 14:59 |
|
#7 |
Member
andres
Join Date: Jul 2011
Posts: 31
Rep Power: 15 |
I keep trying with swak4foam but no results..
I have compiled calcMassFlow http://openfoamwiki.net/index.php/Contrib_calcMassFlow An I was able to obtain some result, I will check the values now |
|
January 19, 2012, 22:25 |
|
#8 |
Senior Member
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 556
Rep Power: 27 |
Hi again
Just tried adding the entry from the wiki and this is the output. So it works fine. Code:
smoothSolver: Solving for Ux, Initial residual = 1.74784e-06, Final residual = 5.48515e-08, No Iterations 3 smoothSolver: Solving for Uy, Initial residual = 1.765421e-06, Final residual = 5.508338e-08, No Iterations 3 smoothSolver: Solving for Uz, Initial residual = 2.072079e-06, Final residual = 7.16652e-08, No Iterations 3 GAMG: Solving for p, Initial residual = 0.004637279, Final residual = 5.125009e-06, No Iterations 3 time step continuity errors : sum local = 5.154984e-07, global = 5.606926e-10, cumulative = 5.606926e-10 smoothSolver: Solving for omega, Initial residual = 1.853332e-06, Final residual = 9.561004e-08, No Iterations 2 smoothSolver: Solving for k, Initial residual = 2.060505e-05, Final residual = 3.168589e-07, No Iterations 3 ExecutionTime = 65.84 s ClockTime = 66 s MassFlows: inlet = -16.77585 outlet = 16.77589 I've also compiled the full swak4foam for OF21. Try to do this instead. Code:
functions ( massFlow { type patchMassFlow; functionObjectLibs ( "/home/user/OpenFOAM/somefolder/libsimpleFunctionObjects.so" ); verbose true; patches ( inlet outlet ); factor 19.7363; } );
__________________
Linnemann PS. I do not do personal support, so please post in the forums. |
|
January 21, 2012, 10:29 |
|
#9 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
|
||
January 24, 2012, 16:01 |
|
#10 | |
Member
andres
Join Date: Jul 2011
Posts: 31
Rep Power: 15 |
Quote:
The libsimpleFunctionObjects.so wasn´t there so I went to swak4foam folder and "Allwmake" it. Now the libsimple... is in the folder $FOAM_USER_LIBBIN . Many thanks! I have studied the case http://www.sciencedirect.com/science...45793089900273 ( I dont have the paper so if anyone have it pls pm me) My results under simpleFoam are really similars for % of flow split Code:
Reynolds 10 100 200 300 400 Experimental * 0.5256 0.7256 0.8415 0.8854 0.9098 OpenFoam 0.5264 0.7196 0.8277 0.8812 0.9111 |
||
June 8, 2012, 12:00 |
|
#11 |
New Member
James McNeill
Join Date: Feb 2012
Posts: 4
Rep Power: 14 |
This is a bit tangential to the original question, but still falls unde the scope of the title. I'm struggling with understanding how mass flow rate is determined in the simpleFoam models (I'm using buoyantBoussinesqSimpleFoam) when there is no specification of the density in the transportProperties file. Does anyone have an idea of where the density may be entered, before I dig into the source code? Thanks in advance.
|
|
June 9, 2012, 13:22 |
|
#12 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
|
||
October 31, 2012, 11:58 |
|
#13 |
Member
Join Date: Mar 2009
Posts: 90
Rep Power: 17 |
What is the factor 19.7363 there for? Is it a unit conversion, and if so, from what to what?
|
|
November 14, 2012, 18:44 |
|
#14 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
It is completely unclear to me what you mean with "there". If you're referring to something in the thread pleas quote otherwise specify a minimum of context
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
|
November 15, 2012, 14:27 |
|
#15 |
Member
Join Date: Mar 2009
Posts: 90
Rep Power: 17 |
||
November 16, 2012, 01:16 |
|
#16 |
Senior Member
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 556
Rep Power: 27 |
Hi
Its just a factor, if you want it in m3/s you just set it to 1. I have no idea what the factor 19.7363 converts it into, it was taken directly copy/paste from the Wiki.
__________________
Linnemann PS. I do not do personal support, so please post in the forums. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
calculate mass flow rate on face OpenFoam | ronaldo | OpenFOAM | 7 | November 8, 2019 01:10 |
Mass flow rate: calculation v/s computation | beguxa | FLUENT | 5 | December 2, 2018 22:02 |
Mass Flow Rate Error | jallison | FLUENT | 1 | May 16, 2011 17:22 |
2D axisymmetric mass flow rate for the plain orifice atomizer | jwillie2000 | FLUENT | 2 | September 17, 2010 06:43 |
particle, parcel and mass flow rate balance | flybird | FLUENT | 0 | May 24, 2007 11:44 |