/*--------------------------------*- 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.6e7;//9.504e6;  // 110 d

deltaT          3600;

writeControl    adjustableRunTime;

writeInterval   3.6e6;

purgeWrite      0;

writeFormat     ascii;

writePrecision  8;

writeCompression off;

timeFormat      general;

timePrecision   6;

runTimeModifiable yes;

adjustTimeStep  yes;

timeStepControl Courant;

CourantCoeffs
{
    reservCtrl      no;
    maxCo           1e20;
}

maxDeltaT       86400;


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

    Qicv0
    {
        type            surfaceFieldValue;
        libs            ("libfieldFunctionObjects.so");
        enabled         true;
        writeControl    timeStep;
        writeInterval   50;
        log             true;
        writeFields     false;
        regionType      faceZone;
        name            icv0;
        scaleFactor     1;
        operation       sum;
        fields          (alphaPhi.oil alphaPhi.water phi);
    }

    Qicv1
    {
        type            surfaceFieldValue;
        libs            ("libfieldFunctionObjects.so");
        enabled         true;
        writeControl    timeStep;
        writeInterval   50;
        log             true;
        writeFields     false;
        regionType      faceZone;
        name            icv1;
        scaleFactor     1;
        operation       sum;
        fields          (alphaPhi.oil alphaPhi.water phi);
    }
}


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