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

application     pimpleDyMFoam;

startFrom       latestTime;

startTime       0;

stopAt          endTime;

endTime         1500;

deltaT          0.01;

writeControl    timeStep;

writeInterval   10;

purgeWrite      0;

writeFormat     ascii;

writePrecision  6;

writeCompression off;

timeFormat      general;

timePrecision   6;

runTimeModifiable true;

functions
{
    fieldAverage1
    {
        type            fieldAverage;
        libs            ( "libfieldFunctionObjects.so" );
        writeControl    writeTime;
        fields          ( U { mean on ; prime2Mean on ; base time ; window 50 ; } p { mean on ; prime2Mean on ; base time ; window 50 ; } );
    }
    forces
    {
        type            forces;
        libs            ( "libforces.so" );
        patches         ( "CYLINDER" );
        writeControl    timeStep;
        writeInterval   1;
        log             true;
        rho             rhoInf;
        CofR            ( 0 0 0 );
        rhoInf          1.225;
    }
    forceCoeffs
    {
        type            forceCoeffs;
        libs            ( "libforces.so" );
        patches         ( "CYLINDER" );
        writeControl    timeStep;
        writeInterval   1;
        log             true;
        rho             rhoInf;
        liftDir         ( 0 1 0 );
        dragDir         ( 1 0 0 );
        pitchAxis       ( 0 0 1 );
        CofR            ( 0 0 0 );
        rhoInf          1.225;
        magUInf         1;
        lRef            1;
        Aref            1;
    }
    cuttingPlane
    {
        type            surfaces;
        libs            ( "libsampling.so" );
        writeControl    timeStep;
        writeInterval   10;
        surfaceFormat   vtk;
        fields          ( p U UMean pMean );
        interpolationScheme cellPoint;
        surfaces        ( zNormal { type cuttingPlane ; planeType pointAndNormal ; pointAndNormalDict { basePoint ( 0 0 0 ) ; normalVector ( 0 0 1 ) ; } interpolate true ; } );
    }
}


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