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

application     pimpleFoam;

startFrom       latestTime;

startTime       0;

stopAt          endTime;

endTime         0.2;

deltaT          1e-5;

//maxDeltaT 5e-5;

adjustTimeStep yes;

maxCo 1.0;

writeControl    runTime;

writeInterval   0.01;

purgeWrite      0;

writeFormat     ascii;

writePrecision  6;

writeCompression off;

timeFormat      general;

timePrecision   6;

runTimeModifiable true;

functions
{
    momErr
    {
        type            momentumError;
        libs            (fieldFunctionObjects);
        executeControl  writeTime;
        writeControl    writeTime;
    }
	
	probes
    {
        type            probes;
        libs            ("libsampling.so");
        fields          (U);  // You can also add p or other fields

        probeLocations
        (
            (-0.157 0 0)   // 2D/2
            (-0.1445 0 0) // 2D/4
			(-0.132 0 0) //c
			(0 0 0)		//origin
			(0.132 0 0) //c
			(0.264 0 0) //2c
			(0.396 0 0) //3c
        );

        writeControl    runTime;
        writeInterval   0.01;
    }

    contErr
    {
        type            div;
        libs            (fieldFunctionObjects);
        field           phi;
        executeControl  writeTime;
        writeControl    writeTime;
    }


    turbulenceFields1
    {
        type            turbulenceFields;
        libs            (fieldFunctionObjects);
        fields
        (
            k
            epsilon
            nut
            nuEff
            R
            devReff
            L
            I
        );

        executeControl  writeTime;
        writeControl    writeTime;
    }

    mag1
    {
        type            mag;
        libs            (fieldFunctionObjects);
        field           turbulenceProperties:R;

        result          magR;
        executeControl  writeTime;
        writeControl    writeTime;
    }

    vorticity
    {
        type            vorticity;
        libs            ("libfieldFunctionObjects.so");
        writeControl    runTime;       // or writeTime
        writeInterval   0.01;              // adjust based on how often you write fields
    }


		#include "forceCoeffs"
}

//functions
//{
    //forceCoeffs
    //{
       // type            forceCoeffs;
        //libs            ("libforces.so");
        //patches         ("airfoil");          // Replace with actual patch name
        //rho             rhoInf;
        //rhoInf          1.225;
        //liftDir         (0 1 0);
        //dragDir         (1 0 0);
        //pitchAxis       (0 0 1);
        //CofR            (0.033 0 0);
        //magUInf         11.06;
        //lRef            0.132;
        //Aref            0.0132;
        //writeControl    timeStep;
        //writeInterval   1;
        //log             yes;
    //}
//}



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