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

libs            ("libOpenFOAM.so" "libfieldFunctionObjects.so");

application     simpleFoam;

startFrom       latestTime;

startTime       0;

stopAt          endTime;

endTime         500;

deltaT          1;

writeControl    timeStep;

writeInterval   500;

purgeWrite      0;

writeFormat     ascii;

writePrecision  6;

writeCompression compressed;

timeFormat      general;

timePrecision   6;

runTimeModifiable true;

functions
{
    readFields
    {
        functionObjectLibs ( "libfieldFunctionObjects.so" );
        type            readFields;
        fields          (p U);
    }
    streamLines
    {
        type            streamLine;
        outputControl   outputTime;
        setFormat       vtk;
        UName           U;
        trackForward    true;
        fields          (p U);
        lifeTime        10000;
        nSubCycle       5;
        cloudName       particleTracks;
        seedSampleSet   uniform;
        uniformCoeffs
        {
            type            uniform;
            axis            x;
            start           (-1.001 1e-07 0.0011);
            end             (-1.001 1e-07 1.0011);
            nPoints         20;
        }
    }
    cuttingPlane
    {
        type            surfaces;
        functionObjectLibs ( "libsampling.so" );
        outputControl   outputTime;
        surfaceFormat   vtk;
        fields          ( p U );
        interpolationScheme cellPoint;
        surfaces
        (
            yNormal
            {
                type cuttingPlane;
                planeType pointAndNormal;
                pointAndNormalDict
                {
                    basePoint (0 0 0);
                    normalVector (0 1 0);
                }
                interpolate true;
            }
        );
    }
    forces
    {
        type            forceCoeffs;
        functionObjectLibs ( "libforces.so" );
        outputControl   timeStep;
        outputInterval  1;
        patches         ( "motorBike.*" );
        pName           p;
        UName           U;
        rhoName         rhoInf;
        log             true;
        rhoInf          1;
        liftDir         (0 0 1);
        dragDir         (1 0 0);
        CofR            (0.72 0 0);
        pitchAxis       (0 1 0);
        magUInf         20;
        lRef            1.42;
        Aref            0.75;
    }
}


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