/*--------------------------------*- 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/sphereList"; 

assemblyType                    sphere; 
sphereDict
{
   totalNumber                  1; 

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

   radius
   {
       sizeDistribution         uniform; 
       value                    $r; 
   }

   positionType                  fixed; 

   positions
   (
       (0 0 0)
   );   
   

   // 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 sphere diameter) 
   // of the eMesh from boundary 
   // Prevents eMesh from being deleted
   mergeGap 1e-4;
}

// write a file containing sphere names, IDs, positions, etc
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                    $rhoFluid; 

   // referent pressure
   pRef                      0; 

   // take into account pressure jump over periodic neighbours
   pressureJump              false;  
}

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