/*--------------------------------*- 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
{
    format      ascii;
    class       dictionary;
    location    "system";
    object      controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application     upstreamFoam;

startFrom       startTime;

startTime       0;

stopAt          endTime;

endTime         31536000;

deltaT          3600;

writeControl    adjustableRunTime;

writeInterval   6307200;

purgeWrite      0;

writeFormat     ascii;

writePrecision  8;

writeCompression off;

timeFormat      general;

timePrecision   6;

runTimeModifiable yes;

adjustTimeStep  yes;

maxDeltaT       86400;

functions
{
    p_rghc
    {
        type            scale;
        libs            ( "libfieldFunctionObjects.so" );
        field           p_rgh;
        result          p_rghc;
        scale           1.01972e-05;
        writeControl    writeTime;
    }
    pc
    {
        type            scale;
        libs            ( "libfieldFunctionObjects.so" );
        field           p;
        result          pc;
        scale           1.01972e-05;
        writeControl    writeTime;
    }
    Qdot0
    {
        type            surfaceFieldValue;
        libs            ( "libfieldFunctionObjects.so" );
        enabled         true;
        writeControl    timeStep;
        writeInterval   1;
        log             true;
        writeFields     false;
        regionType      patch;
        name            outlet_region0;
        scaleFactor     72;
        operation       sum;
        fields          ( alphaPhi.oil phi );
    }
    noWriteObjects0
    {
        type            noWriteObjects;
        libs            ( "libfunctionObjectsAddOn.so" );
        writeControl    writeTime;
        objects         ( T.oil reserv alpha.oil buoyancy invD phi.oil S.oil );
    }
    Pout0
    {
        type            probes;
        libs            ( "libsampling.so" );
        name            probes;
        writeControl    timeStep;
        writeInterval   1;
        fields          ( p_rgh p );
        interpolationScheme cell;
        probeLocations  1 ( ( 500.04267 500 149.5 ) );
    }
    Q_w0_icv0
    {
        type            surfaceFieldValue;
        libs            ( "libfieldFunctionObjects.so" );
        enabled         true;
        writeControl    timeStep;
        writeInterval   1;
        log             true;
        writeFields     false;
        regionType      faceZone;
        name            w0_icv0;
        operation       sum;
        scaleFactor     72;
        fields          ( alphaPhi.oil phi );
    }
    Q_w0_icv1
    {
        type            surfaceFieldValue;
        libs            ( "libfieldFunctionObjects.so" );
        enabled         true;
        writeControl    timeStep;
        writeInterval   1;
        log             true;
        writeFields     false;
        regionType      faceZone;
        name            w0_icv1;
        operation       sum;
        scaleFactor     72;
        fields          ( alphaPhi.oil phi );
    }
    Q_cop_icv0
    {
        type            surfaceFieldValue;
        libs            ( "libfieldFunctionObjects.so" );
        enabled         true;
        writeControl    timeStep;
        writeInterval   1;
        log             true;
        writeFields     false;
        regionType      faceZone;
        name            cop_icv0;
        operation       sum;
        scaleFactor     72;
        fields          ( alphaPhi.oil phi );
    }
    Q_cop_icv1
    {
        type            surfaceFieldValue;
        libs            ( "libfieldFunctionObjects.so" );
        enabled         true;
        writeControl    timeStep;
        writeInterval   1;
        log             true;
        writeFields     false;
        regionType      faceZone;
        name            cop_icv1;
        operation       sum;
        scaleFactor     72;
        fields          ( alphaPhi.oil phi );
    }
}

timeStepControl localCo;

localCoCoeffs
{
    reservCtrl      no;
    maxCo           0.8;
}


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