/*--------------------------------*- 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                  fixed; 

   positions
   (
       (6.197310e-01 9.151550e-01 9.268140e-01)
       (1.043690e+00 1.016310e+00 8.031410e-01)
       (5.045940e-01 4.242960e-01 9.311740e-01)
       (1.079180e+00 4.858750e-01 7.098290e-01)
       (9.051350e-01 6.241740e-01 9.975620e-01)
       (3.730140e-01 1.041490e+00 7.197560e-01)
       (5.851590e-01 3.687700e-01 3.352180e-01)
       (1.027420e+00 8.679240e-01 5.360630e-01)
       (8.764330e-01 4.153610e-01 9.230370e-01)
       (7.557220e-01 8.942410e-01 3.594740e-01)
       (4.060930e-01 6.783270e-01 7.703300e-01)
       (9.095830e-01 5.391680e-01 5.705280e-01)
       (9.506540e-01 3.732690e-01 3.951160e-01)
       (7.390970e-01 1.029400e+00 6.957490e-01)
       (4.327400e-01 7.600560e-01 3.450520e-01)
       (6.230690e-01 5.987650e-01 6.196210e-01)
   );   
   orientations 
   (
       (-2.689272e-01  7.039077e-01  6.574132e-01)
       (-1.110507e-01 -4.776731e-01  8.714907e-01)
       (-5.710023e-01 -8.031197e-01 -1.701624e-01)
       (-2.416503e-01 -9.315237e-01  2.717879e-01)
       ( 6.598760e-01 -5.706509e-01  4.887957e-01)
       ( 2.669456e-01  7.159116e-01  6.451439e-01)
       (-1.932249e-02 -9.911993e-01 -1.309599e-01)
       ( 6.107342e-01 -2.596857e-01 -7.480421e-01)
       (-4.589214e-01  5.766518e-01 -6.759171e-01)
       (-5.164730e-01 -7.275017e-01 -4.516601e-01)
       (-9.796511e-02  9.077285e-01  4.079605e-01)
       (-2.748969e-01 -8.300158e-01  4.852890e-01)
       (-8.250497e-02 -7.509172e-01  6.552223e-01)
       (-5.642932e-01 -3.722630e-01 -7.368809e-01)
       (-1.744901e-01  8.392507e-02 -9.810758e-01)
       (-1.076374e-01 -9.671568e-01 -2.302648e-01)
   ); 

   // 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                yes;   
   writeStresslet             no; 
   writeFirstMoment           no; 

   // 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; 
   // pressureJump              false; // for patchMeanVelocity
   // name of the outlet patch (in blockMesh) 
   outletPatchName           "frontWall"; 
}

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