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

castellatedMesh true;

snap            true;

addLayers       false;

geometry
{
    zoneB.stl
    {
        type            triSurfaceMesh;
        name            zoneB;
    }
    zoneC.stl
    {
        type            triSurfaceMesh;
        name            zoneC;
    }
    geom.stl
    {
        type            triSurfaceMesh;
        name            geom;
        regions
        {
            left
            {
                name            left;
            }
            right
            {
                name            right;
            }
            top
            {
                name            top;
            }
            bottom
            {
                name            bottom;
            }
            front
            {
                name            front;
            }
            back
            {
                name            back;
            }
        }
    }
}

castellatedMeshControls
{
    maxLocalCells           100000000;
    maxGlobalCells          300000000;
    minRefinementCells      10;
    maxLoadUnbalance        0.1;
    features                ( );
    refinementRegions
    {
        zoneB
        {
            mode            inside;
            levels          ( ( 1 1 ) );
        }
        zoneC
        {
            mode            inside;
            levels          ( ( 1 2 ) );
        }
        geom
        {
            mode            inside;
            levels          ( ( 1 0 ) );
        }
    }
    refinementSurfaces
    {
        zoneB
        {
            level           (1 2);
            faceZone        zoneB;
            faceType        internal;
            cellZoneInside  inside;
            cellZone        zoneB;
        }
        zoneC
        {
            level           (2 3);
            faceZone        zoneC;
            faceType        internal;
            cellZoneInside  inside;
            cellZone        zoneC;
        }
        geom
        {
            level           (0 0);
            regions
            {
                left
                {
                    level   (0 0);
                }
                right
                {
                    level   (0 0);
                }
                top
                {
                    level   (0 0);
                }
                bottom
                {
                    level   (0 0);
                }
                front
                {
                    level   (0 0);
                }
                back
                {
                    level   (0 0);
                }
            }
        }
    }
    resolveFeatureAngle     30;
    nCellsBetweenLevels     2;
    locationInMesh          ( 0 0 0 );
    allowFreeStandingZoneFaces true;
}

snapControls
{
    nSmoothPatch            3;
    nSmoothInternal         5;
    tolerance               2;
    nSolveIter              30;
    nRelaxIter              5;
    nFeatureSnapIter        10;
    implicitFeatureSnap     true;
    explicitFeatureSnap     false;
    multiRegionFeatureSnap  false;
}

addLayersControls
{
    layers
    {
    }

    relativeSizes              true;
    expansionRatio             1.2;
    finalLayerThickness        0.1;
    featureAngle               180;
    slipFeatureAngle           30;
    nGrow                      0;
    nBufferCellsNoExtrude      0;
    minMedialAxisAngle         90;
    maxFaceThicknessRatio      0.3;
    maxThicknessToMedialRatio  0.3;
    minThickness               0.0001;
    nLayerIter                 50;
    nRelaxIter                 5;
    nSmoothSurfaceNormals      5;
    nSmoothNormals             30;
    nSmoothThickness           10;
    nRelaxedIter               50;
    nMedialAxisIter            10;
}

meshQualityControls
{
    maxNonOrtho             65;
    maxBoundarySkewness     20;
    maxInternalSkewness     4;
    maxConcave              80;
    minFlatness             0.5;
    minVol                  1e-40;
    minTetQuality           -1e-30;
    minArea                 -1;
    minTwist                0.02;
    minDeterminant          0.001;
    minFaceWeight           0.05;
    minVolRatio             0.01;
    minTriangleTwist        -1;
    minEdgeLength           -1;
    relaxed
    {
        maxNonOrtho         70;
    }
    nSmoothScale            4;
    errorReduction          0.75;
}

mergeTolerance  1e-06;


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