CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[snappyHexMesh] Snappyhexmesh removes wrong section of the mesh

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 11, 2019, 14:40
Default Snappyhexmesh removes wrong section of the mesh
  #1
Senior Member
 
Join Date: Nov 2011
Posts: 109
Rep Power: 15
robboflea is on a distinguished road
Hi all,


I have a problem with shm that I cannot seem to solve. Below you can see my domain.
domain.png


I managed to mesh successfully the domain with the following snappyHexMeshDict


Code:
/*--------------------------------*- 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      snappyHexMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

castellatedMesh       true; //or false to de-activate
snap                  true;
addLayers             false;
mergeTolerance        1e-6;

geometry
{
    Scaled_domain.stl // STL filename
    {
        type triSurfaceMesh;
        name domain;

        regions
        {
            walls
            {
                name walls;
            }
            inlet
            {
                name inlet;
            }
            outlet
            {
                name outlet;
            }
        }
    }
}

castellatedMeshControls
{
    maxLocalCells 500000;
    maxGlobalCells 2000000;
    nCellsBetweenLevels 4;
    resolveFeatureAngle 70;
    minRefinementCells 0;
    allowFreeStandingZoneFaces false;
    
    locationInMesh (2E-4 2E-4 2.2E-4);
    
    features
    (
        {
            file "Scaled_domain.eMesh"; // file containing edge mesh
            levels ((0.0 1)(0.1 1));               // level of refinement
        }
    );


    refinementSurfaces
    {
        domain
        {
            level (2 2);
            regions
            {
                walls
                {
                    level (1 1);
                    patchInfo
                    {
                        type    wall;
                    }
                }

                inlet
                {
                    level (2 2);
                    patchInfo
                    {
                        type    patch;
                    }
                }

                outlet
                {
                    level (2 2);
                    patchInfo
                    {
                        type    patch;
                    }
                }
            }
        }
    }
    
    refinementRegions
    {
    }
}

snapControls
{
    nSmoothPatch 5;
    tolerance 1.0;
    nSolveIter 100;
    nRelaxIter 5;
    nFeatureSnapIter 10;
    implicitFeatureSnap false;
    explicitFeatureSnap true;
    multiRegionFeatureSnap false;
}

addLayersControls
{
    layers
    {
        walls
        {
            nSurfaceLayers 10;
        }
        inlet
        {
            nSurfaceLayers 10;
        }
        outlet
        {
            nSurfaceLayers 10;
        }
    }
    
    relativeSizes true;
    expansionRatio 1.1;
    finalLayerThickness 0.9;
    minThickness 0.1;
    nGrow 5;
    featureAngle 90;
    maxFaceThicknessRatio 0.5;
    nSmoothSurfaceNormals 1;
    nSmoothThickness 10;
    minMedialAxisAngle 90;
    maxThicknessToMedialRatio 0.3;
    maxThicknessToMedialRatio 0.3;
    nSmoothNormals 3;
    nRelaxIter 5;
    nBufferCellsNoExtrude 0;
    nLayerIter 50;
    nRelaxedIter 20;
}

meshQualityControls
{ 
    maxNonOrtho 65;
    maxBoundarySkewness 20;
    maxInternalSkewness 4;
    maxConcave 80;
    minVol 1.00E-13;
    minTetQuality  -1e15;
    minArea -1;
    minTwist 0.05;
    minDeterminant 0.001;
    minFaceWeight 0.05;
    minVolRatio 0.01;
    minTriangleTwist -1; // >0 for fluent compatibility
    minFlatness 0.5;
    nSmoothScale 4;
    errorReduction 0.75;
}

debugFlags
(
);

Below you can see a slice of the mesh obtained using the above dictionary.
shm_ok.png


However, if trying to refine the mesh by changing the line:
Code:
levels ((0.0 1)(0.1 1));               // level of refinement
in the features refinement section to:
Code:
levels ((0.0 2)(0.1 1));               // level of refinement
the final mesh becomes completely wrong as you can see from the image below:
shm_error.png


It looks that in this case shm removes the wrong section of mesh but I cannot understand why is it doing so. There is literally no other modification in the shm dictionary. The error is repeatable and happens consistently. In both cases I delete all previous mesh files and even restart with a new initial block mesh.


Any help would be much appreciated. Thanks a lot.
robboflea is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
sliding mesh problem in CFX Saima CFX 46 September 11, 2021 08:38
dsmcInitialise - dsmcFoam archymedes OpenFOAM Pre-Processing 94 July 15, 2016 17:14
[snappyHexMesh] snappyHexMesh won't work - zeros everywhere! sc298 OpenFOAM Meshing & Mesh Conversion 2 March 27, 2011 22:11
[snappyHexMesh] SnappyHexMesh not generate mesh first time mavimo OpenFOAM Meshing & Mesh Conversion 4 August 26, 2008 08:08
fluent add additional zones for the mesh file SSL FLUENT 2 January 26, 2008 12:55


All times are GMT -4. The time now is 05:58.