/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v1812                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version         2.0;
    format          ascii;
    class           dictionary;
    location        "system";
    object          foamyQuadMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //


geometry
{
    surfaceFile.stl
    {
        name surfaceFile;
        type triSurfaceMesh;
    }
}

surfaceConformation
{
    locationInMesh              (-2.8 0.7 0.5);

    pointPairDistanceCoeff      0.005;

    minEdgeLenCoeff             0.005;

    maxNotchLenCoeff            0.003;

    minNearPointDistCoeff       0.0025;

    maxQuadAngle                125;

    // Insert near-boundary point mirror or point-pairs
    insertSurfaceNearestPointPairs yes;

    // Mirror near-boundary points rather than insert point-pairs
    mirrorPoints                no;

    // Insert point-pairs vor dual-cell vertices very near the surface
    insertSurfaceNearPointPairs yes;

    // Maximum number of iterations used in boundaryConform.
    maxBoundaryConformingIter   5;

    geometryToConformTo
    {
        surfaceFile
        {
            featureMethod           extendedFeatureEdgeMesh;
            extendedFeatureEdgeMesh "surfaceFile.extendedFeatureEdgeMesh";
        }
    }

    additionalFeatures
    {}

    // Choose if to randomise the initial grid created by insertGrid.
    randomiseInitialGrid yes;

    // Perturbation fraction, 1 = cell-size.
    randomPerturbation   0.1;

}


motionControl
{
    defaultCellSize     0.05;

    // Assign a priority to all requests for cell sizes, the highest overrules.
    defaultPriority     0;

    cellSizeControlGeometry
    {
        surfaceFile
        {
            priority              1;
            mode                  bothSides;
            cellSizeFunction      linearDistance;
            linearDistanceCoeffs
            {
                distanceCellSize  0.05;
                surfaceCellSize   0.01;
                distance          0.5;
            }
            uniformCoeffs
            {
                cellSize          0.01;
            }
        }
//        refinementBox
//        {
//            priority            1;
//            mode                outside;
//            cellSizeFunction    linearDistance;
//            linearDistanceCoeffs
//            {
//                distanceCellSize 0.04;
//                surfaceCellSize 0.005;
//                distance        0.2;
//            }
//        }
//        refinementSphere
//        {
//            priority            1;
//            mode                outside;
//            cellSizeFunction    linearDistance;
//            linearDistanceCoeffs
//            {
//                distanceCellSize 0.04;
//                surfaceCellSize 0.005;
//                distance        0.2;
//            }
//        }
    }

    relaxationModel     adaptiveLinear;

    adaptiveLinearCoeffs
    {
        relaxationStart 1.0;
        relaxationEnd   0.0;
    }

    objOutput           no;

    // Near-wall region where cells are aligned with the wall specified as a number
    // of cell layers
    nearWallAlignedDist 3;
}

shortEdgeFilter
{
    // Factor to multiply the average of a face's edge lengths by.
    // If an edge of that face is smaller than that value then delete it.
    shortEdgeFilterFactor           0.2;

    // Weighting for the lengths of edges that are attached to the boundaries.
    // Used when calculating the length of an edge. Default 2.0.
    edgeAttachedToBoundaryFactor    2.0;
}

extrusion
{
    extrude         on;

    extrudeModel        linearDirection;
    //extrudeModel        wedge;

    patchInfo
    {
        //type empty;
        //startFace
    }

    patchType           empty;
    //patchType           wedge;

    nLayers             1;

    expansionRatio      1.0;    //0.9;

    linearDirectionCoeffs
    {
        direction       (0 0 1);
        thickness       0.1;
    }

    wedgeCoeffs
    {
        axisPt      (0 0 0);
        axis        (1 0 0);
        angle       10;
    }

    thickness       0.1;
}


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