CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (http://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   Calculating flow rate across a section (http://www.cfd-online.com/Forums/openfoam-post-processing/119926-calculating-flow-rate-across-section.html)

edalmau June 27, 2013 05:32

Calculating flow rate across a section
 
Hi all Foamers,

I've search about how to calculate fields in different parts of my case and I've a doubt about what is better (or maybe the unique way) for calculating the flow across a section of my study case.

The case is a tank with pipe (to simplify) where the fluid flows. Which of these two post-processing at run-time you recommend to my case?
1) fieldValue
2) probes

Maybe there are other options, if any better, please tell me.

Thanks in advance,

Eric

edalmau June 28, 2013 06:46

I found out that I can use sample to save info across a plane.

I've my SampleDict here but it doesn't work for phi. I read in other posts that it may depend on the interpolation scheme and what kind of "variable" are you trying to store. Phi is defined as SurfaceScalarField.

This leads me to 2 questions:
1) Which kind of interpolation can work with phi assuming I've a plane or cut plane defined?
2) Is there any way to sample an operation between two variables? In my case I need alpha1*phi.

Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.2.0                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    object      sampleDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
setFormat raw;
surfaceFormat vtk;

formatOptions
{
    ensight
    {
        format  ascii;
    }
}
interpolationScheme cell;

fields
(
    alpha1
    phi
   
);

surfaces
(
  triangleCut
    {
        // Cutingplane using iso surface
        type            cuttingPlane;
        planeType      pointAndNormal;
        pointAndNormalDict
        {
            basePoint      (0.0 1.0 1.54);
            normalVector    (0.0 0.866025 0.5);
        }
        interpolate    true;
        }
)

If I ran it separately (first alpha1 and then phi) it works for alpha1 but not for phi. I've tried all types of interpolationscheme I found in the dict info but I don't know if there are more not included there.

Any help?

gschaider July 2, 2013 19:36

Quote:

Originally Posted by edalmau (Post 436512)
I found out that I can use sample to save info across a plane.

I've my SampleDict here but it doesn't work for phi. I read in other posts that it may depend on the interpolation scheme and what kind of "variable" are you trying to store. Phi is defined as SurfaceScalarField.

This leads me to 2 questions:
1) Which kind of interpolation can work with phi assuming I've a plane or cut plane defined?
2) Is there any way to sample an operation between two variables? In my case I need alpha1*phi.


If I ran it separately (first alpha1 and then phi) it works for alpha1 but not for phi. I've tried all types of interpolationscheme I found in the dict info but I don't know if there are more not included there.

Any help?

I personally use swak4Foam in that kind of situation. It allows me to evaluate whatever combination of fields I want

edalmau July 3, 2013 06:55

Ok thanks I'll take a look on that app. I've look around other posts and for sampling only 1 component of the U vector is there any way to type that? Cause in one post I found "U.component(i)" where i is the component number from 0-2 but it doesn't work for me. The sample app is making only the cutting plane file but not filled with U data only geometrical.


All times are GMT -4. The time now is 04:42.