/*--------------------------------*- 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       0;

stopAt          endTime;

endTime         20000;

deltaT          1;

writeControl    timeStep;

writeInterval   250;

purgeWrite      0;

writeFormat     ascii;

writePrecision  6;

writeCompression off;

timeFormat      general;

timePrecision   6;

runTimeModifiable true;

functions
{
forces
    {
        type forces;
        functionObjectLibs ("libforces.so");

        outputControl   timeStep;
        outputInterval  1;

        patches         (cylinder);

        rho             rhoInf;
        rhoInf          1.225;
        CofR            (0 0 0);
        liftDir         (0 1 0);
        dragDir         (1 0 0);
        pitchAxis       (0 0 1);
    }
    
forceCoeffs  
    {
      type forceCoeffs;
      //functionObjectLibs ("libforces.so");
      
      outputControl timeStep;
      timeInterval 1;
      
      log yes;
      patches         (cylinder);
      outputControl timeStep;
      timeInterval 1;
      
        rho             rhoInf;
        rhoInf          1.225;
        CofR            (0 0 0);
        liftDir         (0 1 0);
        dragDir         (1 0 0);
        pitchAxis       (0 0 1);
        magUInf         1.6e-4;
        lRef            1;
        Aref            1;

    }

yPlus1
    {
    type            yPlus;
    libs            ("libfieldFunctionObjects.so");

    writePrecision  10;
    writeToFile     true;
    useUserTime     true;

    region          region0;
    enabled         true;
    log             true;
    timeStart       0;
    timeEnd         100;

    patches         (cylinder);

    writeFields     yes;
    executeControl  timeStep;
    executeInterval 1;
    writeControl    writeTime;
    writeInterval   1;
    }

}

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