FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      controlDict;
}

application     pimpleFoam;

startFrom       startTime;

startTime       0;

stopAt          endTime;

endTime         5;

deltaT          1e-3;

writeControl    adjustableRunTime;

writeInterval   0.1;

purgeWrite      0;

writeFormat     ascii;

writePrecision  6;

writeCompression off;

timeFormat      general;

timePrecision   6;

runTimeModifiable true;

adjustTimeStep  no;

maxCo           0.9;

maxDeltaT       1;


functions
{
    preCICE_Adapter
    {
        type preciceAdapterFunctionObject;
        libs ("libpreciceAdapterFunctionObject.so");
    }

forceCoeffs1
{
    // Mandatory entries
    type            forceCoeffs;
    libs            ("libforces.so");
    patches         (airfoil flap);


    // Optional entries

    // Field names
    p               p;
    U               U;
    rho             rhoInf;

    // Reference pressure [Pa]
    pRef            1.01e5;

    // Include porosity effects?
    porosity        no;

    // Store and write volume field representations of forces and moments
    writeFields     no;

    // Centre of rotation for moment calculations
    CofR            (0 0 0);

    // Lift direction
    liftDir         (0 1 0);

    // Drag direction
    dragDir         (1 0 0);

    // Pitch axis
    pitchAxis       (0 0 1);

    // Freestream velocity magnitude [m/s]
    magUInf         0.05;

    //Freestream density
    rhoInf	    1.225;

    // Reference length [m]
    lRef            1;

    // Reference area [m2]
    Aref            0.1;

    // Spatial data binning
    // - extents given by the bounds of the input geometry
    binData
    {
        nBin        20;
        direction   (1 0 0);
        cumulative  yes;
    }
}
}
