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

application     cyclicHeatPimpleFoam;

startFrom       latestTime;

startTime       0;

stopAt          endTime;

endTime         100000;

deltaT          1e-4;

writeControl    adjustableRunTime;

writeInterval   1;

purgeWrite      10;

writeFormat     ascii;

writePrecision  6;

writeCompression off;

timeFormat      general;

timePrecision   6;

runTimeModifiable true;

adjustTimeStep  yes;

maxCo           1.0;

// ************************************************************************* //
functions
{
    probes
    {
        type            probes;
        libs            (sampling);

        // Name of the directory for probe data
        name            probes;

        // Write at same frequency as fields
        writeControl    outputTime;
        writeInterval   1;

        // Fields to be probed
        fields          (p U T);

        // Optional: interpolation scheme to use (default is cell)
        interpolationScheme cell;

        probeLocations
        (
            (0.0 0.0 0.01)
            (1.0 0.0 0.01)
        );

        includeOutOfBounds  false;
    }

    fieldAverage
    {
        // Mandatory entries (unmodifiable)
        type            fieldAverage;
        libs            (fieldFunctionObjects);

        // Mandatory entries (runtime modifiable)
        fields
        (
            U
            {
                mean        yes;
                prime2Mean  no;
                base        time;
            }
            
            T
            {
                mean        yes;
                prime2Mean  no;
                base        time;
            }

            p
            {
                mean        yes;
                prime2Mean  no;
                base        time;
            }
        );

        // Optional (inherited) entries
        region          region0;
        enabled         true;
        log             true;
        timeStart       99000;
        timeEnd         $endTime;
        executeControl  timeStep;
        executeInterval 1;
        writeControl    timeStep;
        writeInterval   1;
    }
}
