FoamFile { format ascii; class dictionary; object snappyHexMeshDict; }
castellatedMesh true;
snap true;
addLayers false;

geometry
{
 ballGeometry
 {
  type triSurfaceMesh;
  file "Al_Rihla_2022.stl";
  name ball;
 }
 broadWake
 {
  type searchableBox;
  min (0.08 -0.24 -0.24);
  max (1.05 0.24 0.24);
 }
 nearWake
 {
  type searchableBox;
  min (0.08 -0.16 -0.16);
  max (0.55 0.16 0.16);
 }
}

castellatedMeshControls
{
 maxLocalCells 900000;
 maxGlobalCells 900000;
 minRefinementCells 0;
 maxLoadUnbalance 0.10;
 nCellsBetweenLevels 3;
 features ();
 refinementSurfaces
 {
  ball
  {
   level (3 4);
   patchInfo { type wall; }
  }
 }
 resolveFeatureAngle 35;
 refinementRegions
 {
  broadWake { mode inside; levels ((1e15 2)); }
  nearWake  { mode inside; levels ((1e15 3)); }
 }
 locationInMesh (1.5 0 0);
 allowFreeStandingZoneFaces true;
}

snapControls
{
 nSmoothPatch 5;
 tolerance 1.0;
 nSolveIter 100;
 nRelaxIter 10;
 nFeatureSnapIter 0;
 implicitFeatureSnap false;
 explicitFeatureSnap false;
 multiRegionFeatureSnap false;
}

addLayersControls
{
 relativeSizes true;
 layers {};
 expansionRatio 1.2;
 finalLayerThickness 0.25;
 minThickness 0.08;
 nGrow 0;
 featureAngle 55;
 nRelaxIter 5;
 nSmoothSurfaceNormals 3;
 nSmoothNormals 5;
 nSmoothThickness 10;
 maxFaceThicknessRatio 0.5;
 maxThicknessToMedialRatio 0.3;
 minMedialAxisAngle 90;
 nBufferCellsNoExtrude 0;
 nLayerIter 30;
}

meshQualityControls { #include "meshQualityDict" }
writeFlags (scalarLevels);
mergeTolerance 1e-6;
