CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Native Meshers: snappyHexMesh and Others (http://www.cfd-online.com/Forums/openfoam-meshing-snappyhexmesh/)
-   -   How to refine the edges? (http://www.cfd-online.com/Forums/openfoam-meshing-snappyhexmesh/120653-how-refine-edges.html)

Tomashek July 11, 2013 11:26

How to refine the edges?
 
1 Attachment(s)
Hi!

I have a problem with sharp edges. Which parameters should I change to get a better mesh? As you can see the object is not mesh very well even If I change the snapControls parameters.



Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  1.6                                  |
|  \\  /    A nd          | Web:      http://www.OpenFOAM.org              |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    object      autoHexMeshDict;
}

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

castellatedMesh true;
snap                true;
addLayers        false;

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


castellatedMeshControls
{


    maxLocalCells 1500000;

    maxGlobalCells 2000000;

    minRefinementCells 0;

    nCellsBetweenLevels 2;

    features
    (
        {file "cube.eMesh"; level 2;}
    );



    refinementSurfaces
    {
        cube
        {
           
            level (1 2);

        }
    }

    resolveFeatureAngle 0;


    refinementRegions
    {
    }

    locationInMesh (2 2 2);

    allowFreeStandingZoneFaces true;
}



snapControls
{
   
    nSmoothPatch 15;
   
    tolerance 0.1;

    nSolveIter 300;

    nRelaxIter 15;
}



addLayersControls
{
 
    relativeSizes true;

 
    layers
    {
       
    }

   
    expansionRatio 1.1;
 
    finalLayerThickness 0.7;
 
    minThickness 0.1;
   
    nGrow 1;

    featureAngle 60;

    nRelaxIter 5;

    nSmoothSurfaceNormals 1;

    nSmoothNormals 3;

    nSmoothThickness 10;
 
    maxFaceThicknessRatio 0.9;

    maxThicknessToMedialRatio 0.9;


    minMedianAxisAngle 130;

    nBufferCellsNoExtrude 0;


    nLayerIter 50;

    nRelaxedIter 20;
}


meshQualityControls
{

    maxNonOrtho 65;

    maxBoundarySkewness 20;

    maxInternalSkewness 4;

    maxConcave 80;

    minFlatness 0.5;

    minVol 1e-13;

    minTetQuality 1e-30;

    minArea -1;

    minTwist 0.05;

    minDeterminant 0.001;

    minFaceWeight 0.05;

    minVolRatio 0.01;

    minTriangleTwist -1;



    nSmoothScale 4;

    errorReduction 0.75;



    relaxed
    {

        maxNonOrtho 75;
    }
}



debug 0;


mergeTolerance 1E-6;


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



All times are GMT -4. The time now is 20:54.