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/)
-   -   How to calculate mean velocity profile for channel flow (https://www.cfd-online.com/Forums/openfoam-post-processing/115924-how-calculate-mean-velocity-profile-channel-flow.html)

michel1988 April 9, 2013 10:03

How to calculate mean velocity profile for channel flow
 
Dear all,
I want to calculate the mean velocity profile for channel flow. For the moment, I can do it with postChannel utility which performs a spatial average for a given moment. How to do it with time average over a range of time in OpenFOAM? I am new to OpenFOAM and I am not familiar with the utilities.
Thanks for your help!

alireza94 January 24, 2019 14:34

Quote:

Originally Posted by michel1988 (Post 419434)
Dear all,
I want to calculate the mean velocity profile for channel flow. For the moment, I can do it with postChannel utility which performs a spatial average for a given moment. How to do it with time average over a range of time in OpenFOAM? I am new to OpenFOAM and I am not familiar with the utilities.
Thanks for your help!




Hi michel


i know this topic is very old but i'm eager to know, did you find a solution for you problem?:confused::confused:

calf.Z November 18, 2019 08:59

fieldAverage maybe work.

Bazinga November 20, 2019 09:09

fieldAverage does the trick. Add the following code (works with OpenFOAM 6) to your controlDict and adjust writeControl, writeInterval, timeStart and the fields.

Code:

functions
{
fieldAverage
        {
        type fieldAverage;
        functionObjectLibs ("libfieldFunctionObjects.so");
        enabled true;
        writeControl    writeTime;
        writeInterval    1;
        timeStart 5;
        fields
        (
                U
                {
                mean on;
                prime2Mean on;
                base time;
                }
             
        );
}
}



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