/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v2006                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

libs            (OpenFOAM fieldFunctionObjects);

application     simpleFoam;

startFrom       startTime;

startTime       0;

stopAt          endTime;

endTime         50000; // End number of iterations

deltaT          1; // 1 iteration

writeControl    timeStep;
writeInterval   500; // Write partial results every 1000 iterations

executeControl  timeStep;
executeInterval 1;

purgeWrite      2;

writeFormat     ascii;

writePrecision  6;

writeCompression on;

timeFormat      general;

timePrecision   6;

runTimeModifiable true;

functions
{
	// Computation of forces over the body
	#include "forceCoeffs"
	// Computation of post-processing tools: <solver> -postProcess -func <name>
	#include "FOyPlus"           // y+
	#include "FOwallShearStress"
	//#include "FOfieldAverage"    // Averages
	#include "Vorticity"          // Vorticity
	fieldAverage
    {
        type            fieldAverage;
        libs            (fieldFunctionObjects);

        restartOnRestart    true;
        restartOnOutput     false;

        executeControl      timeStep;
        executeInterval     25;
        writeControl        writeTime;

        fields
        (
            U               { mean on; prime2Mean off; base time; }
            vorticity       { mean on; prime2Mean off; base time; }
            p               { mean on; prime2Mean off; base time; }
            nut             { mean on; prime2Mean off; base time; }
            wallShearStress { mean on; prime2Mean off; base time; }
        );
    }
}

// ************************************************************************* //
