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

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

assemblyType                     spherocylinder; 
spherocylinderDict
{
   totalNumber                   5; 

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

   // examples of size distribution
   radius
   {
       sizeDistribution          uniform; 
       value                     0.1; 
   }
   //radius
   //{
   //    sizeDistribution          GaussNormal; 
   //    meanValue                 0.1; 
   //    standardDeviation         0.01; 
   //    // seed for random number generator, default set to pid
   //    //seed                      42; 
   //}
   //radius 
   //{
   //   sizeDistribution      numberDistribution; 
   //   // example: 2 spherocylinders radius 0.15, 3 cylinders radius 0.1, 
   //   numberDistribution    (2 3); 
   //   value                 (0.15 0.1); 
   //}
   //radius 
   //{
   //    sizeDistribution fixed; 
   //    value            (0.15 0.12 0.1 0.08 0.06); 
   //}

   // length/diameter, minimum aspect ratio 1 (collapses onto sphere)
   //aspectRatio
   //{
   //     sizeDistribution    uniform; 
   //     value               2; 
   //}
   aspectRatio
   {
       sizeDistribution          GaussNormal;
       meanValue                 4;
       standardDeviation         0.1;
       // seed for random number generator, default set to pid
       //seed                      42;
   }

   //positionType                  random; 
   // global orientation vector 
   // example: random in all directions: (1 1 1)
   // example: random in y direction: (0 1 0) 
   globalOrientation              (1 1 1); 

   // seed for random number generator, default set to pid
   //seed                          42; 
   // for random positions, minimum distance allowed between spherocylinders,
   // defined as a fraction of the mean minimum dimension (radius or half-length) 
   // for a pair of spherocylinders
   minRelativeDistance           1e-1; 
   // number of collision check iterations
   maxIterations                 2e6; 

   // for fixed position type, supply a list of positions (centres) and
   // orientations 
   //positionType                  fixed; 
   //positions
   //(
   //    (6.197310e-01 9.151550e-01 9.268140e-01)
   //    (5.045940e-01 4.242960e-01 9.311740e-01)
   //    (9.051350e-01 6.241740e-01 9.975620e-01)
   //    (5.851590e-01 3.687700e-01 3.352180e-01)
   //    (7.557220e-01 8.942410e-01 3.594740e-01)
   //);   
   //orientations 
   //(
   //    ( 2.669456e-01  7.159116e-01  6.451439e-01)
   //    ( 6.107342e-01 -2.596857e-01 -7.480421e-01)
   //    (-5.164730e-01 -7.275017e-01 -4.516601e-01)
   //    (-8.250497e-02 -7.509172e-01  6.552223e-01)
   //    (-1.076374e-01 -9.671568e-01 -2.302648e-01)
   //); 

   // make periodic neighbours, default TRUE
   findPeriodicNeighbours       yes; 

   // remove spherocylinders that are too close to the boundary, default FALSE
   // NOT IMPLEMENTED 
   testTangential                no; 
   
}

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

   // refinement level for the eMesh
   // Default: +1 level higher than snappy input for surfaces under "[name].*" 
   //edgeRefinementLevel 3; 

   // number of points per edge
   nEdgePoints 360;

   // relative distance (to spherocylinder max dimension: diameter or length) 
   // of the eMesh from boundary 
   // if eMesh is sitting directly at boundary, sometimes it gets deleted
   mergeGap 1e-4;
}

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

// write "forcePressureJump" dictionaries for each spherocylinder
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             yes; 
   writeFirstMoment           yes; 

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

   // field names
   p                         p; 
   U                         U; 
   rho                       rhoInf; 
   rhoInf                    1.0; 

   // referent pressure
   pRef                      0; 

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

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