/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM:  The Open Source CFD Toolbox
   \\    /   O peration     | Version:   OpenFOAM-9 (f8d11b031) (openfoam.org)
    \\  /    A nd           | Upstream:  A Wikki Brasil project (wikki.com.br)
     \\/     M anipulation  | Version:   dev
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application     upstreamFoam;

startFrom       startTime;

startTime       0;

stopAt          endTime;

endTime         3.1536e7;

deltaT          20000;

writeControl    adjustableRunTime;

writeInterval   864000;

purgeWrite      0;

writeFormat     ascii;

writePrecision  8;

writeCompression off;

timeFormat      general;

timePrecision   6;

runTimeModifiable yes;

adjustTimeStep  yes;

timeStepControl localCo;

reservCtrl      no;

maxDeltaT       86400;

localCoCoeffs
{
    maxCo       0.5;
}


functions
{
    // outlet flow rate
    Qdot0
    {
        type            surfaceFieldValue;
        libs            ("libfieldFunctionObjects.so");
        enabled         true;
        writeControl    timeStep;
        writeInterval   1;
        log             true;
        writeFields     false;
        regionType      patch;
        name            reservoir0_to_well0;
        scaleFactor     86400;
        operation       sum;
        fields
        (
            alphaPhi.oil alphaPhi.gas alphaRhoPhi.oil alphaRhoPhi.gas phi
        );
    }
}


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