/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v2212                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "$FOAM_CASE/constant/parameters"
application     pisoFoam;

startFrom       latestTime;

startTime      $startTime;

stopAt          endTime;

endTime         $endTime;

deltaT          $deltaT;

writeControl    adjustableRunTime;

writeInterval   $writeInterval;

purgeWrite      0;

writeFormat     ascii;

writePrecision  6;

writeCompression off;

timeFormat      general;

timePrecision   6;

runTimeModifiable true;

adjustTimeStep  yes;

maxCo           1;



functions
{

forceCoeffs
    {
        type            forceCoeffs;
        libs            ("libforces.so");
		patches			("plate");
		
		pRef			0;
		U				U;
		log    off;
		
		CofR			(0 0 0);
		liftDir			(0 1 0);
		dragDir			(1 0 0);
		magUInf			2.303;
		rho				rhoInf;
		rhoInf			1.204;
		lRef			1;
		Aref			1;
		pitchAxis (0 0 1);
        
       writeControl	timeStep;
	   writeInterval 1000;
    }
	
	forces
	{
		type			forces;
		libs			("libforces.so");
		patches			("plate");
		log off;
		CofR			(0 0 0);
		liftDir			(0 1 0);
		dragDir			(1 0 0);
		magUInf			2.303;
		rho				rhoInf;
		rhoInf			1.204;
		
		writeControl	timeStep;
		writeInterval 1000;
	}
	

		
	samplePoint
    {
        type            probes;
        libs            ("libsampling.so");
        writeControl    timeStep;
        writeInterval   1000;  // Writes data at every time step

        probeLocations
        (
            (5 0 0)  // Replace with your desired (x y z) coordinate
        );
      log off;
        fields
        (
            U   // Velocity
            p   // Pressure
        );
    }
	
	
	
}
// ************************************************************************* //
