/*--------------------------------*- 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                     sphere; 
sphereDict
{
   totalNumber                   10; 

   // 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; 
   //   // 2 spheres radius 0.15, 3 spheres radius 0.1, 5 spheres radius 0.05
   //   numberDistribution    (2 3 5); 
   //   value                 (0.15 0.1 0.05); 
   //}
   //radius 
   //{
   //    sizeDistribution fixed; 
   //    value            (0.1 0.15 0.12 0.13 0.1 0.1 0.12 0.08 0.05 0.06); 
   //}

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

   // for fixed position type, supply a list of positions of sphere centres
   //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)
   //);   

   // make periodic neighbours, default TRUE
   findPeriodicNeighbours       yes; 

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

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

   // refinement level for the eMEsh
   edgeRefinementLevel 3; 

   // number of points per edge
   nEdgePoints 360;

   // relative distance (to sphere radius) of the eMesh from boundary 
   // if eMesh is sitting directly at boundary, sometimes it gets deleted
   mergeGap 1e-4;
}

// write a file containing sphere names, positions and radii
writePositionData             yes; 
positionDataFileName          "./system/positionData";

// write "forcePressureJump" dictionaries for each sphere
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"; 
}

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