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

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

application     pimpleFoam;

startFrom       latestTime;

startTime       0;

stopAt          endTime;

endTime         5;

deltaT          1e-4;

writeControl    adjustableRunTime;

writeInterval   5e-2;

purgeWrite      0;

writeFormat     ascii;

writePrecision  6;

writeCompression off;

timeFormat      general;

timePrecision   6;

graphFormat     raw;

runTimeModifiable yes;

maxCo           5;

functions   
{
#includeFunc  residuals
#includeFunc  yPlus 
#includeFunc  vorticity 
#includeFunc  wallShearStress

forceCoeffs1
{
    // Mandatory entries (unmodifiable)
    type            forceCoeffs;
    libs            ("libforces.so");
    patches         (wall wallRhoC exposed1 exposed2); // wall 
    magUInf         5; // Define the magnitude of the free-stream velocity at infinity
    lRef            0.049; // Define the reference length
    Aref            0.049; // Define the reference area
    
    // Conditional mandatory entries
    CofR            (0 0 0); // Define the position of the reference point
    liftDir         (0 1 0); // Define the direction of lift
    dragDir         (1 0 0); // Define the direction of drag
    pitchAxis       (0 0 1); // Define the pitch axis
    
    // Field names
    p               p;
    U               U;
    rho             rhoInf;
    rhoInf          1.225;
    
    // Postprocessing         
    log             true;
    timeStart       0;
    timeEnd         1000;
    executeControl  writeTime;
    writeContror    writeTime;
}
};

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