/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v2012                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version         2;
    format          ascii;
    class           dictionary;
    object          snappyHexMeshDict;
}

castellatedMesh true;
snap            true;
addLayers       false;

geometry
{
    Sphere1-1
    {
        type    searchableSphere;
        centre  (0.002 0 0);
        radius  0.000495;
    }

    Sphere1-2
    {
        type    searchableSphere;
        centre  (0.002 0 0.00146314);
        radius  0.000495;
    }

    Sphere1-3
    {
        type    searchableSphere;
        centre  (0.002 0.00146314 0.00146314);     
   	radius  0.000495;
    }

    Sphere1-4
    {
        type    searchableSphere;
        centre  (0.002 0.00146314 0);
        radius  0.000495;
    }

    Sphere1-5
    {
        type    searchableSphere;
        centre  (0.002 0.000731571 0.000731571);
        radius  0.000495;
    }

    Sphere2-1
    {
        type    searchableSphere;
        centre  (0.00273157 0 0.000731571);
        radius  0.000495;
    }

    Sphere2-2
    {
        type    searchableSphere;
        centre  (0.00273157 0.000731571 0.00146314);
        radius  0.000495;
    }

    Sphere2-3
    {
        type    searchableSphere;
        centre  (0.00273157 0.00146314 0.000731571);
        radius  0.000495;
    }

    Sphere2-4
    {
        type    searchableSphere;
        centre  (0.00273157 0.000731571 0);
        radius  0.000495;
    }

    Sphere3-1
    {
        type    searchableSphere;
        centre  (0.00346314 0 0);
        radius  0.000495;
    }

    Sphere3-2
    {
        type    searchableSphere;
        centre  (0.00346314 0 0.00146314);
        radius  0.000495;
    }

    Sphere3-3
    {
        type    searchableSphere;
        centre  (0.00346314 0.00146314 0.00146314);
        radius  0.000495;
    }

    Sphere3-4
    {
        type    searchableSphere;
        centre  (0.00346314 0.00146314 0);
        radius  0.000495;
    }

    Sphere3-5
    {
        type    searchableSphere;
        centre  (0.00346314 0.000731571 0.000731571);
        radius  0.000495;
    }

    Sphere4-1
    {
        type    searchableSphere;
        centre  (0.00419471 0 0.000731571);
        radius  0.000495;
    }

    Sphere4-2
    {
        type    searchableSphere;
        centre  (0.00419471 0.000731571 0.00146314);
        radius  0.000495;
    }

    Sphere4-3
    {
        type    searchableSphere;
        centre  (0.00419471 0.00146314 0.000731571);
        radius  0.000495;
    }

    Sphere4-4
    {
        type    searchableSphere;
        centre  (0.00419471 0.000731571 0);
        radius  0.000495;
    }    

    Sphere5-1
    {
        type    searchableSphere;
        centre  (0.00492628 0 0);
        radius  0.000495;
    }

    Sphere5-2
    {
        type    searchableSphere;
        centre  (0.00492628 0 0.00146314);
        radius  0.000495;
    }

    Sphere5-3
    {
        type    searchableSphere;
        centre  (0.00492628 0.00146314 0.00146314);
        radius  0.000495;
    }

    Sphere5-4
    {
        type    searchableSphere;
        centre  (0.00492628 0.00146314 0);
        radius  0.000495;
    }

    Sphere5-5
    {
        type    searchableSphere;
        centre  (0.00492628 0.000731571 0.000731571);
        radius  0.000495;
    }
}

castellatedMeshControls
{
    maxLocalCells   1000000;
    maxGlobalCells  20000000;
    minRefinementCells 0;
    maxLoadUnbalance 0.1;
    nCellsBetweenLevels 1;
    locationInMesh (0.0001 0.000731571 0.000731571);
    allowFreeStandingZoneFaces true;
    resolveFeatureAngle 30;

    features
    (
        
    );


    refinementSurfaces
    {
        Sphere1-1
        {
            level (2 4);
            patchInfo { type patch; }
        }

        Sphere1-2
        {
            level (2 4);
            patchInfo { type patch; }
        }

        Sphere1-3
        {
            level (2 4);
            patchInfo { type patch; }
        }

	Sphere1-4
        {
            level (2 4);
            patchInfo { type patch; }
        }

	Sphere1-5
        {
            level (2 4);
            patchInfo { type patch; }
        }

	Sphere2-1
        {
            level (2 4);
            patchInfo { type patch; }
        } 

	Sphere2-2
        {
            level (2 4);
            patchInfo { type patch; }
        }

	Sphere2-3
        {
            level (2 4);
            patchInfo { type patch; }
        }

	Sphere2-4
        {
            level (2 4);
            patchInfo { type patch; }
        }

	Sphere3-1
        {
            level (2 4);
            patchInfo { type patch; }
        }

        Sphere3-2
        {
            level (2 4);
            patchInfo { type patch; }
        }

        Sphere3-3
        {
            level (2 4);
            patchInfo { type patch; }
        }

        Sphere3-4
        {
            level (2 4);
            patchInfo { type patch; }
        }

        Sphere3-5
        {
            level (2 4);
             patchInfo { type patch; }
        }

	Sphere4-1
        {
            level (2 4);
            patchInfo { type patch; }
        }

        Sphere4-2
        {
            level (2 4);
            patchInfo { type patch; }
        }

        Sphere4-3
        {
            level (2 4);
            patchInfo { type patch; }
        }

        Sphere4-4
        {
            level (2 4);
            patchInfo { type patch; }
        }

	Sphere5-1
        {
            level (2 4);
            patchInfo { type patch; }
        }

        Sphere5-2
        {
            level (2 4);
            patchInfo { type patch; }
        }

        Sphere5-3
        {
            level (2 4);
            patchInfo { type patch; }
        }

        Sphere5-4
        {
            level (2 4);
            patchInfo { type patch; }
        }

        Sphere5-5
        {
            level (2 4);
            patchInfo { type patch; }
        }
    }

    refinementRegions
    {
    }
}

snapControls
{
    nSmoothPatch    3;
    tolerance       1;
    nSolveIter      300;
    nRelaxIter      10;
    nFeatureSnapIter 10;
    implicitFeatureSnap false;
    explicitFeatureSnap true;
    multiRegionFeatureSnap false;
}

addLayersControls
{
    relativeSizes   true;
    expansionRatio  1;
    finalLayerThickness 0.3;
    minThickness    0.1;
    nGrow           0;
    featureAngle    60;
    slipFeatureAngle 30;
    nRelaxIter      3;
    nSmoothSurfaceNormals 1;
    nSmoothNormals  3;
    nSmoothThickness 10;
    maxFaceThicknessRatio 0.5;
    maxThicknessToMedialRatio 0.3;
    minMedianAxisAngle 90;
    nBufferCellsNoExtrude 0;
    nLayerIter      50;

    layers
    {

    }
}

meshQualityControls
{
    maxNonOrtho     75;
    maxBoundarySkewness 20;
    maxInternalSkewness 4;
    maxConcave      80;
    minVol          1e-15;
    minTetQuality   1e-15;
    minArea         -1;
    minTwist        0.02;
    minDeterminant  0.001;
    minFaceWeight   0.05;
    minVolRatio     0.01;
    minTriangleTwist -1;
    nSmoothScale    4;
    errorReduction  0.75;
}

writeFlags      ( scalarLevels layerSets layerFields );

mergeTolerance  1e-06;

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

