/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v2112                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application     pimpleFoam;
startFrom       latestTime; // Options: startTime, latestTime, etc.
startTime       0;
stopAt          endTime;
endTime         1000;
deltaT          0.02; // Time step size
writeControl    timeStep; // Options: timeStep, runTime, adjustableRunTime
writeInterval   10; // Write results every 10 time steps
purgeWrite      0; // Keep all time directories
writeFormat     ascii; // Options: ascii, binary
writePrecision  6;
writeCompression on;
timeFormat      general;
timePrecision   6;
runTimeModifiable false; // Allow modifications during run time

adjustTimeStep  yes;        // Enable adaptive time stepping
maxCo           0.9;        // Maximum Courant number

// Function objects for post-processing can be added here:
functions
{
	Q1
	{
		type            Q;
		libs            (fieldFunctionObjects);
		writeControl    writeTime;
	}
	
    QisoSurface
    {
        type            surfaces;
        libs            (sampling);
        writeControl    timeStep;
        writeInterval   5;
        surfaceFormat   vtk;
        fields          ( U p );
        surfaces
        {
            iso
            {
                type            isoSurface;
                isoField        Q;
                isoValue        1.0;
            }
        }
    }

    cuttingPlane
    {
        type            surfaces;
        libs            (sampling);
        writeControl    timeStep;
        writeInterval   5;
        surfaceFormat   vtk;
        fields          ( U );
        interpolationScheme cellPoint;
        surfaces
        {
            zNormal
            {
                type            cuttingPlane;
                planeType       pointAndNormal;
                pointAndNormalDict
                {
                    point       (0 0 0);
                    normal      (0 1 0);
                }
                interpolate     true;
            }
        }
    }

    probes
    {
        type            probes;
        libs            (sampling);
        name            probes;
        writeControl    timeStep;
        writeInterval   1;
        fields
        (
            U
        );
        probeLocations
        (
            (0 0 5)
            (0.025 0 5)
            (0.05 0 5)
            (0.075 0 5)
            (0.1 0 5)
        );
    }
    
    fieldAverage1
    {
        type                fieldAverage;
        libs                (fieldFunctionObjects);
        timeStart           20;
        writeControl        writeTime;

        fields
        (
            U
            {
                mean        on;
                prime2Mean  on;
                base        time;
            }

            p
            {
                mean        on;
                prime2Mean  on;
                base        time;
            }
        );
    }
    

	
    //~ randomiseU
    //~ {
        //~ type randomise;
        //~ libs (fieldFunctionObjects);

        //~ field U;
        //~ magPerturbation 0.1;
    //~ }
}
// ************************************************************************* //
