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

application     upstreamFoam;

startFrom       latestTime;

startTime       0;

stopAt          endTime;

endTime         1;

deltaT          0.01;

writeControl    adjustableRunTime;

writeInterval   1;

purgeWrite      0;

writeFormat     ascii;

writePrecision  6;

writeCompression off;

timeFormat      general;

timePrecision   6;

runTimeModifiable true;

adjustTimeStep  yes;

timeStepControl Courant;

CourantCoeffs
{
    reservCtrl      no;
    maxCo           0.6;
}

DebugSwitches
{
    SolverPerformance 1; //1 to infos
}


functions
{
    pressureInlet
    {
        type            surfaceFieldValue;
        libs            ("libfieldFunctionObjects.so");
        writeControl    timeStep;
        writeInterval   1;
        log             no;
        writeTotalArea  no;
        writeFields     no;
        regionType      patch;
        name            inlet;
        operation       areaAverage;
        fields
        (   
            p
        );
    }
    
    pressureOutlet
    {
        type            surfaceFieldValue;
        libs            ("libfieldFunctionObjects.so");
        writeControl    timeStep;
        writeInterval   1;
        log             no;
        writeTotalArea  no;
        writeFields     no;
        regionType      patch;
        name            outlet;
        operation       areaAverage;
        fields
        (   
            p
        );
    }
}

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