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

application     interFoam;

startFrom       startTime;

startTime       0;

stopAt          endTime;

endTime         10;

deltaT          0.1;

writeControl    adjustableRunTime;

writeInterval   0.05;

purgeWrite      0;

writeFormat     ascii;

writePrecision  6;

writeCompression compressed;

timeFormat      general;

timePrecision   6;

runTimeModifiable yes;

adjustTimeStep  yes;

maxCo           6;
maxAlphaCo      6;
maxDeltaT       1;

functions
{
    inletFlux
    {
        type            faceSource;
        functionObjectLibs ("libfieldFunctionObjects.so");
        outputControl   timeStep;
        log             true;
        // Output field values as well
        valueOutput     false;
        source          patch;
        sourceName      inlet;
        operation       sum;

        fields
        (
            rhoPhi
        );
    }

    outlet1Flux
    {
        $inletFlux;
        sourceName      outlet1;
    }

    outlet2Flux
    {
        $inletFlux;
        sourceName      outlet2;
    }
    
    atmosphereFlux
    {
        $inletFlux;
        sourceName      atmosphere;
    }
}

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