/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v1706+                                |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
/* Butterfly 0.0.4                https://github.com/ladybug-tools/butterfly *\
\*---------------------------------------------------------------------------*/
FoamFile
{
	version		4.0;
	format		ascii;
	class		dictionary;
	location	"system";
	object		snappyHexMeshDict;
}

castellatedMesh		true;

snap		true;

addLayers		false;

geometry
{

    darakeh.stl
    {

        type		triSurfaceMesh;

        name		darakeh;

        regions
        {

            tunnel
            {

                name		tunnel;

            }

        }

    }

}

castellatedMeshControls
{

    maxLocalCells		1000000;

    maxGlobalCells		2000000;

    minRefinementCells		10;

    maxLoadUnbalance		0.10;

    nCellsBetweenLevels		3;

    features		();

    refinementSurfaces
    {

        darakeh
        {

            level		(0 0);

            regions{}

        }

    }

    resolveFeatureAngle		180;

    refinementRegions{}

    locationInMesh		(455.00000000000051 602.99999999999977 1773.8446960449219);

    allowFreeStandingZoneFaces		true;

}

snapControls
{

    nSmoothPatch		5;

    tolerance		5;

    nSolveIter		100;

    nRelaxIter		8;

    nFeatureSnapIter		10;

    implicitFeatureSnap		true;

    multiRegionFeatureSnap		true;

}

addLayersControls
{

    relativeSizes		true;

    layers{}

    expansionRatio		1.0;

    finalLayerThickness		0.3;

    minThickness		0.2;

    nGrow		0;

    featureAngle		110;

    nRelaxIter		3;

    nSmoothSurfaceNormals		1;

    nSmoothThickness		10;

    nSmoothNormals		3;

    maxFaceThicknessRatio		0.5;

    maxThicknessToMedialRatio		0.3;

    minMedianAxisAngle		130;

    nBufferCellsNoExtrude		0;

    nLayerIter		50;

    nRelaxedIter		20;

}

meshQualityControls
{

    maxNonOrtho		60;

    maxBoundarySkewness		20;

    maxInternalSkewness		4;

    maxConcave		80;

    minFlatness		0.5;

    minVol		1e-13;

    minTetQuality		1e-15;

    minArea		-1;

    minTwist		0.02;

    minDeterminant		0.001;

    minFaceWeight		0.02;

    minVolRatio		0.01;

    minTriangleTwist		-1;

    nSmoothScale		4;

    errorReduction		0.75;

    relaxed
    {

        maxNonOrtho		75;

    }

}

debug		0;

mergeTolerance		1E-6;