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/)
-   -   OpenFoam: time averaging velocity of a URANS Simulation (https://www.cfd-online.com/Forums/openfoam-post-processing/220037-openfoam-time-averaging-velocity-urans-simulation.html)

andreic August 21, 2019 09:46

OpenFoam: time averaging velocity of a URANS Simulation
 
Hi there,

I'm running a pipe simulation with pimpleFoam and after the simulation I would like to average the velocity in the whole field on a specific segment of time.

I know I could just use simpleFoam but the solution doesn't converge with simpleFoam. So I want to simulate with PimpleFoam check the periodicity of the Simulation and average the velocity in that period in order to get a similar result to a RANS simulation.

Can anybody help me?

Thank you

Evren Linda August 22, 2019 10:40

Try to use fieldAverage function object.
Here is an example:

Code:

fieldAverage1
    {
        type                fieldAverage;
        libs                ("libfieldFunctionObjects.so");

        writeControl    writeTime;

        restartOnRestart    false;
        restartOnOutput    false;
        periodicRestart    false;
        restartPeriod      0.002;

        fields
        (
            U
            {
                mean            on;
                prime2Mean      on;
                base            time;
                window          10.0;
                windowName      w1;
            }
            p
            {
                mean            on;
                prime2Mean      on;
                base            time;
            }
        );
    }

for more examples from tutorials, try:

Code:

grep -R "fieldAverage" $FOAM_TUTORIALS


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