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/)
-   -   Comparison Mass flow rate at the inlet and outlet??? (https://www.cfd-online.com/Forums/openfoam-post-processing/107764-comparison-mass-flow-rate-inlet-outlet.html)

vahid.najafi October 6, 2012 00:29

Comparison Mass flow rate at the inlet and outlet???
 
Hi dear Foamers.

I have a question,please help me?
I want to Comparison Mass flow rate at the inlet and outlet in my geometry after running???
but i dont know hot to get them???

Thanks for your attention.

wouter October 6, 2012 09:02

hello,

did you take the trouble to search the forum for mass flow rate?
I got a lot of hits, so maybe one will solve your problem

Best
Wouter

vahid.najafi October 6, 2012 10:24

Tnx
 
Hi Wouter.
Thanks for your Guidance!

fredo490 October 25, 2012 13:36

A bit late but here is your answer :
http://openfoamwiki.net/index.php/Ho...e_density_flow


Code:

    label inletPatch = mesh.boundaryMesh().findPatchID("velocity_inlet");
 
    // if we don't have such a patch, warn the user
    if (inletPatch==-1)
    {
        Info << "Failure to find patch named velocity_inlet for mass flow calc."
            <<endl;
    }
    else  // calculate the result and do output
    {
        scalar inFlux = -1.0* sum(phi.boundaryField()[inletPatch]);
 
        Info << "  Inflow= " << inFlux    <<" [kg/s]  " ;

you can repeat the "inletPatch" declaration for an outlet and then plot it or do the subtraction.


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