CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   calculate mass flow rate on face OpenFoam (https://www.cfd-online.com/Forums/openfoam/78865-calculate-mass-flow-rate-face-openfoam.html)

ronaldo August 4, 2010 05:52

calculate mass flow rate on face OpenFoam
 
Dear All,
could some please tell me how to calculate mass flow rate on face OpenFoam. I need it for a Presentation.

Thanks in advance,

Ronaldo

Robat August 5, 2010 05:27

Hi ronaldo,

you can get the mass flux by volume flux * density.
The volume flux you can read out directly from the result directories (0.*). You just need to know the number of your expected face. But normally the mass flux is needed for a whole patch (to be independent from the cell resolution). In these cases you can use the function:

patchIntegrate phi <patchName> -case <caseName>

There are more functions which may provide you a more elegant way:
http://openfoamwiki.net/index.php/Co...unctionObjects

Or if you got OF 1.6, you can simply use the mass flow functions :-))

Regards,
Robert

ronaldo August 6, 2010 08:47

Thank you so much Robat,

I have tried, but it not works.This is the message
Table of functionObjects is empty

From function functionObject::New(const word& functionType, const Time&, const dictionary&)
in file db/functionObject/functionObject.C at line 75.

nuovodna August 9, 2010 10:21

1 Attachment(s)
You can use calcMassFlow utility

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

raagh77 August 20, 2010 07:05

compatible with 1.6 or 1.7
 
Is this compatible with 1.6 or higher vesion?
I tried to compile with 1.6 and ended up with some errors.!

Regards
Raghu

nuovodna August 27, 2010 05:26

it works on my 1.7.0 installation. Use the attached tar.gz : it contains a few modifications to make compatible with newer version

raagh77 August 27, 2010 05:56

thanks.. It worked
 
Hi Emanuele,

Thanks for the attached file.. I was able to compile in OF 1.7

Regards
Raghu

Mondal131211 November 8, 2019 00:10

Compiling Error of calcMassFlow utility
 
Quote:

Originally Posted by nuovodna (Post 270825)

Hi Nuovodna,

I do not know whether you are still here or not. I tried to compile this utility but it shows the following error in OpenFOAM 3.0.1. Do you know the reason for that?

HTML Code:

calcMassFlow.C: In function ‘int main(int, char**)’:
calcMassFlow.C:169:31: error: ‘endTime’ was not declared in this scope
    for (label i=startTime; i<endTime; i++)

Anyone can help me if that is known to you. Thanks in advance.

Cheers
Razon


All times are GMT -4. The time now is 15:54.