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

#include "../settings"

// Name of the file containing "searchableSurfaces"
// Needs to be included in snappyHexMeshDict, under "geometry"
searchableSurfacesFileName    "./system/cylinderList"; 

assemblyType                    cylinder; 
cylinderDict
{
   totalNumber                  $ncyl; 

   // name of the patches, refered to as "[name].*" in 0/, snappy, etc
   name                         cylinder; 

   radius
   {
       sizeDistribution         uniform; 
       value                    $r; 
   }
   aspectRatio
   {
        sizeDistribution        uniform; 
        value                   $AR; 
   }

   positionType                  random; 

   // horizontal case: parallel to velocity direction
   globalOrientation             ($ex $ey $ez); 

   minRelativeDistance $gapSize; 

   // remove spheres that are too close to the boundary, default FALSE
   testTangential                yes;
   // Minimum boundary overlap (relative to radius)
   minBoundaryOverlap            $Delta_mo;
   // Minimum distance from the boundary (rel to radius)
   minBoundaryDistance           $Delta_md;

   // make periodic neighbours, default TRUE
   findPeriodicNeighbours       yes; 
}

writeEmeshes                  yes; 
eMeshDict
{
   // file that will be included in snappyHexMeshDict, under features
   eMeshesFileName "./system/eMeshesList";

   // number of points per edge
   nEdgePoints 100;

   // Relative distance (to cylinder max dimension: diameter or length) 
   // of the eMesh from boundary 
   // Prevents eMesh from being deleted
   mergeGap 1e-4;
}

// write a file containing cylinder names, IDs, positions, etc
writePositionData             yes; 
positionDataFileName          "./system/positionData";

// write "forcePressureJump" dictionaries for each cylinder
writePostProcess              yes; 
postProcessDict
{
   // name of the file to be included in controlDict
   postProcessFileName        "./system/includeForcesFiles"; 

   // library containing the function object
   libs                       "libforcesParticleDNS.so";

   // select fields to be written-out in files
   writeForce                 yes; 
   writeTorque                no;   
   writeStresslet             no; 
   writeFirstMoment           yes; 

   // function object properties
   executeControl            onEnd; 
   writeControl              onEnd; 
   writeFields               true; 

   // field names
   p                         p; 
   U                         U; 
   rho                       rhoInf; 
   rhoInf                    $rhoFluid; 

   // referent pressure
   pRef                      0; 

   // take into account pressure jump over periodic neighbours
   pressureJump              true; 
   // name of the outlet patch (in blockMesh) 
   outletPatchName           "frontWall"; 
}

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