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

application     upstreamFoam;

startFrom       startTime;

startTime       0;

stopAt          endTime;

endTime         4000;  // 3h

deltaT          0.1; // 1 h

writeControl    timeStep;

writeInterval   1000;// 30 d

purgeWrite      0;

writeFormat     ascii;

writePrecision  6;

writeCompression off;

timeFormat      general;

timePrecision   6;

runTimeModifiable yes;

adjustTimeStep  no;

timeStepControl Courant;

CourantCoeffs
{
    reservCtrl      no;
    maxCo           0.1;
}

maxDeltaT       30;

functions
{
    pressureInlet
    {
        type            surfaceFieldValue;
        libs            ("libfieldFunctionObjects.so");
        writeControl    timeStep;
        writeInterval   1;
        log             no;
        writeTotalArea  no;
        writeFields     no;
        regionType      patch;
        name            reserv;
        operation       areaAverage;
        fields
        (   
            p_rgh
        );
    }
    volumeInlet
    {
        type            surfaceFieldValue;
        libs            ("libfieldFunctionObjects.so");
        writeControl    timeStep;
        writeInterval   1;
        log             no;
        writeTotalArea  no;
        writeFields     no;
        regionType      patch;
        name            reserv;
        operation       areaAverage;
        fields
        (   
            alphaPhi.water
        );
    }
    volumeOutlet
    {
        type            surfaceFieldValue;
        libs            ("libfieldFunctionObjects.so");
        writeControl    timeStep;
        writeInterval   1;
        log             no;
        writeTotalArea  no;
        writeFields     no;
        regionType      patch;
        name            reservoir0_to_well0;
        operation       sum;
        fields
        (   
            alphaPhi.water
        );
    }
    MassOutlet
    {
        type            surfaceFieldValue;
        libs            ("libfieldFunctionObjects.so");
        writeControl    timeStep;
        writeInterval   1;
        log             no;
        writeTotalArea  no;
        writeFields     no;
        regionType      patch;
        name            reservoir0_to_well0;
        operation       sum;
        fields
        (   
            alphaRhoPhi.water
        );
    }
    MassInlet
    {
        type            surfaceFieldValue;
        libs            ("libfieldFunctionObjects.so");
        writeControl    timeStep;
        writeInterval   1;
        log             no;
        writeTotalArea  no;
        writeFields     no;
        regionType      patch;
        name            reserv;
        operation       areaAverage;
        fields
        (   
            alphaRhoPhi.water
        );
    }
}


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