/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  9
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    format      ascii;
    class       dictionary;
    location    "system";
    object      controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application     simpleFoam;

startFrom       startTime;

startTime        12;

stopAt          endTime;

endTime         13;

deltaT          0.001;

writeControl    timeStep;

writeInterval   500;

purgeWrite      0;

writeFormat     ascii;

writePrecision  8;

writeCompression off;

timeFormat      general;

timePrecision   8;

runTimeModifiable true;

functions
{
    #includeFunc patchFlowRate(patch=inlet)
    #includeFunc patchFlowRate(patch=outlet)
    #includeFunc residuals
    //#includeFunc triSurfaceVolumetricFlowRate(name=inlet.stl)
    //#includeFunc triSurfaceVolumetricFlowRate(name=outlet.stl)
    
    outletMassFlowYourPatch
   {
        type            surfaceFieldValue;
        functionObjectLibs ("libfieldFunctionObjects.so");
        enabled         true;
        writeControl    timeStep;
        writeInterval   1;
        log             true;
        writeFields     false;
        regionType      patch;
        name            outlet;
        operation       sum;
        fields
        (
            phi
        );
   }
    
}


   

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