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

application     pimpleFoam;

startFrom       startTime;

startTime       0;

stopAt          endTime;

endTime         1000;

deltaT          0.2;

writeControl    timeStep;

writeInterval   200;

purgeWrite      0;

writeFormat     ascii;

writePrecision  6;

writeCompression off;

timeFormat      general;

timePrecision   6;

runTimeModifiable true;

functions
{
    #includeFunc fieldAverage(U, p, prime2Mean = yes)

    #includeFunc uniform
    (
        fieldType = volScalarField,
        name = half,
        dimensions = [0 0 0 0 0 0 0],
        value = 0.5
    )

    #includeFunc mag(UPrime2Mean)

    #includeFunc multiply(half, mag(UPrime2Mean), result = k)

    #includeFunc graphLayerAverage
    (
        funcName = layerAverage,
        patches = (bottomWall),
        axis = y,
        symmetric = yes,
        pMean,
        pPrime2Mean,
        UMean,
        UPrime2Mean,
        k
    );
}

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