// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
FoamFile{
	version	 2.0;
	format	  ascii;
	class	   dictionary;
	location	"system";
	object	  controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

application	 olaDyMFlow;

startFrom	   latestTime;

startTime	   0.0;

stopAt		  endTime;

endTime		 15.0;

deltaT		  0.0001;

writeControl	adjustable;

writeInterval   0.025;

writeFormat	 ascii;

writePrecision  6;

writeCompression off;

timeFormat	  general;

timePrecision   12;

runTimeModifiable true;
adjustTimeStep true;

DebugSwitches
{
  level	2;
  lduMatrix 2;
  libs 2;
}
OptimisationSwitches
{
fileHandler collated;
maxThreadFileBufferSize 1e9; // v1712 default is 0;
maxMasterFileBufferSize 1e9;
}


maxCo		   0.5;
maxAlphaCo	  0.5;
maxDeltaT 0.0001;
functions 
{
			preCICE_Adapter
	{
	   type preciceAdapterFunctionObject;
		libs ("libpreciceAdapterFunctionObject.so");
	}
	
	freeSurfaceVTK
   {   
	   type			surfaces;
	   functionObjectLibs
	   (   
		   "libsampling.so" 
	   );  
	   outputControl   outputTime;
	   outputInterval  1;  
	   surfaceFormat  vtk;
	   fields
	   (   
		   alpha.water
	   );  
	   surfaces
	   (   
		   freeSurface
		   {   
			   type		isoSurfaceCell;
			   isoField	alpha.water;
			   isoValue	0.5;
			   interpolate false;
			   regularise  false;
		   }   
		   
	   );  
	   interpolationScheme cell;
   }
   XSec1
		{   
		   type			surfaces;
		   functionObjectLibs
		   (   
			   "libsampling.so" 
		   );  
		   outputControl   outputTime;
		   outputInterval  1;  
		   surfaceFormat  vtk;
		   fields
		   (   
			   p
				   U
				   alpha
				   water
				   
		   );  
		   surfaces
		   (   
			interpolatedSurface
			{
				// Cutingplane using iso surface
				type			cuttingPlane;
				planeType	   pointAndNormal;
				pointAndNormalDict
				{
					basePoint	   (20 0 0);
					normalVector	(0 1 0);
					}
				interpolate	 true;	   
				}	
		   );  
		   interpolationScheme cell;
	   }
	   structureInterface
	{   
	   type			surfaces;
	   functionObjectLibs
	   (   
		   "libsampling.so" 
	   );  
	   outputControl   outputTime;
	   outputInterval  1;  
	   surfaceFormat  vtk;
	   fields
	   (   
		   p
				   U
				   alpha
				   water
				   
	   );  
	   surfaces
	   (   
		interface
		{
			type			patch;
			patches	   (interface);	
			}	
	   );  
	   interpolationScheme cell;
   }
   
		WaveGauge1
		{
			type			interfaceHeight;
			libs			("libfieldFunctionObjects.so");
			writeControl	timeStep; 
			writeInterval   1; 
			locations
			((13.957 -1.389 1.325)
			);
			alpha		   alpha.water;
		}
	
		WaveGauge2
		{
			type			interfaceHeight;
			libs			("libfieldFunctionObjects.so");
			writeControl	timeStep; 
			writeInterval   1; 
			locations
			((17.62 -1.391 1.309)
			);
			alpha		   alpha.water;
		}
	
		WaveGauge3
		{
			type			interfaceHeight;
			libs			("libfieldFunctionObjects.so");
			writeControl	timeStep; 
			writeInterval   1; 
			locations
			((21.284 -1.389 1.309)
			);
			alpha		   alpha.water;
		}
	
		WaveGauge4
		{
			type			interfaceHeight;
			libs			("libfieldFunctionObjects.so");
			writeControl	timeStep; 
			writeInterval   1; 
			locations
			((24.934 -1.383 1.324)
			);
			alpha		   alpha.water;
		}
	
		WaveGauge5
		{
			type			interfaceHeight;
			libs			("libfieldFunctionObjects.so");
			writeControl	timeStep; 
			writeInterval   1; 
			locations
			((28.588 -1.38 1.323)
			);
			alpha		   alpha.water;
		}
	
		WaveGauge6
		{
			type			interfaceHeight;
			libs			("libfieldFunctionObjects.so");
			writeControl	timeStep; 
			writeInterval   1; 
			locations
			((32.237 -1.376 1.324)
			);
			alpha		   alpha.water;
		}
	
		USWG1
		{
			type			interfaceHeight;
			libs			("libfieldFunctionObjects.so");
			writeControl	timeStep; 
			writeInterval   1; 
			locations
			((36.044 -1.373 3.632)
			);
			alpha		   alpha.water;
		}
	
		USWG2
		{
			type			interfaceHeight;
			libs			("libfieldFunctionObjects.so");
			writeControl	timeStep; 
			writeInterval   1; 
			locations
			((39.967 -0.03 3.82)
			);
			alpha		   alpha.water;
		}
	
				VelocityProbe1
			{ 
				type				probes; 
				libs				("libsampling.so"); 
				writeControl		timeStep; 
				writeInterval		1; 
				probeLocations 
				((28.579 -1.34 0.916)
				); 
				fields 
				( 
				U
				); 	}
			
				VelocityProbe2
			{ 
				type				probes; 
				libs				("libsampling.so"); 
				writeControl		timeStep; 
				writeInterval		1; 
				probeLocations 
				((32.22 -1.34 0.922)
				); 
				fields 
				( 
				U
				); 	}
			
				VelocityProbe3
			{ 
				type				probes; 
				libs				("libsampling.so"); 
				writeControl		timeStep; 
				writeInterval		1; 
				probeLocations 
				((36.078 -1.34 0.922)
				); 
				fields 
				( 
				U
				); 	}
			
				VelocityProbe4
			{ 
				type				probes; 
				libs				("libsampling.so"); 
				writeControl		timeStep; 
				writeInterval		1; 
				probeLocations 
				((39.738 -1.34 2.465)
				); 
				fields 
				( 
				U
				); 	}
			
				pSensor1
			{ 
				type				probes; 
				libs				("libsampling.so"); 
				writeControl		timeStep; 
				writeInterval		1; 
				probeLocations 
				((40.8 0.5 2.2)
				); 
				fields 
				( 
				p
				); 	}
			
				pSensor2
			{ 
				type				probes; 
				libs				("libsampling.so"); 
				writeControl		timeStep; 
				writeInterval		1; 
				probeLocations 
				((40.8 0.5 2.4)
				); 
				fields 
				( 
				p
				); 	}
			
				pSensor3
			{ 
				type				probes; 
				libs				("libsampling.so"); 
				writeControl		timeStep; 
				writeInterval		1; 
				probeLocations 
				((40.8 0.5 2.6)
				); 
				fields 
				( 
				p
				); 	}
			
				pSensor4
			{ 
				type				probes; 
				libs				("libsampling.so"); 
				writeControl		timeStep; 
				writeInterval		1; 
				probeLocations 
				((40.8 0.5 2.8)
				); 
				fields 
				( 
				p
				); 	}
			
				pSensor5
			{ 
				type				probes; 
				libs				("libsampling.so"); 
				writeControl		timeStep; 
				writeInterval		1; 
				probeLocations 
				((40.8 0.5 3)
				); 
				fields 
				( 
				p
				); 	}
			
				pSensor6
			{ 
				type				probes; 
				libs				("libsampling.so"); 
				writeControl		timeStep; 
				writeInterval		1; 
				probeLocations 
				((40.8 0.5 3.2)
				); 
				fields 
				( 
				p
				); 	}
			
interface
	{
	type		  forces;
	libs		  ("libforces.so");
	writeControl  timeStep;
	timeInterval  1;
	log		   yes;
	patches	   (interface);
	rho		   rhoInf;	 // Indicates incompressible
	log		   true;
	rhoInf		1000;		  // Redundant for incompressible
	CofR		  (1 1 1);	// Rotation around centroid of group
	pitchAxis	 (0 1 0);
	}

}
// ************************************************************************* //