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

application     icoFoam;

startFrom       startTime;

startTime       0;

stopAt          endTime;

endTime         0.5;

deltaT          0.005;

writeControl    timeStep;

writeInterval   20;

purgeWrite      0;

writeFormat     ascii;

writePrecision  6;

writeCompression off;

timeFormat      general;

timePrecision   6;

runTimeModifiable true;

functions
{
    readFields
    {
        // Where to load it from (if not already in solver)
        libs ("libfieldFunctionObjects.so");

        type            readFields;
        fields          (p U k);
    }

    near
    {
        // Where to load it from
        libs ("libfieldFunctionObjects.so");

        type nearWallFields;

        // Output every
        writeControl   writeTime;
        //writeInterval  1;

        // Fields to be sampled. Per field original name and mapped field to
        // create.
        fields
        (
            (U UNear)
        );

        // Patches/groups to sample (regular expressions)
        patches (motorBike);

        // Distance to sample
        distance 0.001;
    }
    streamLines
    {
        // Where to load it from (if not already in solver)
        libs ("libfieldFunctionObjects.so");
        type            wallBoundedStreamLine;

        // Output every
        writeControl   timeStep;   //writeTime;
        // writeInterval 10;

        setFormat       vtk; //gnuplot; //xmgr; //raw; //jplot;

        // Velocity field to use for tracking.
        U UNear;

        // Interpolation method. Default is cellPoint.
        // interpolationScheme pointMVC;

        // Tracked forwards (+U) or backwards (-U)
        trackForward    true;

        interpolationScheme cellPoint;

        // Names of fields to sample. Should contain above velocity field!
        fields (p U k UNear);

        // Steps particles can travel before being removed
        lifeTime        100;

        // Optional absolute length of steps (trackLength)
        // Size of single track segment [m]
        //trackLength 1e-3;

        // Cloud name to use
        cloudName       particleTracks;

        // Seeding method.
        seedSampleSet   patchSeed;    //cloud; //triSurfaceMeshPointSet;

        uniformCoeffs
        {
            type        uniform;
            axis        x;  //distance;

            start       (0.0035 0.0999 0.0001);
            end         (0.0035 0.0999 0.0099);
            nPoints     20;
        }

        cloudCoeffs
        {
            type        cloud;
            axis        x;  //distance;
            points      ((0.351516548679288 -0.0116085375585099 1.24));
        }
        patchSeedCoeffs
        {
            type        patchSeed;//patchCloud; //cloud;  //uniform;
            patches     (motorBike);
            axis        x;  //distance;
            maxPoints   20000;
        }
    }
}


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