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

[snappyHexMesh] snappyHexMesh refinement issue

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 9, 2019, 11:24
Default snappyHexMesh refinement issue
  #1
New Member
 
Najmiddin
Join Date: Dec 2018
Posts: 1
Rep Power: 0
najimaddin96 is on a distinguished road
Hi everyone, I am using SHM to mesh an stl file I generated. After running snappy I dont get the meshing I expected.

As you see in the picture below some cells are coarser than the others. I want all of it to be same
mesh.jpg

My snappyHexMeshDict is as below:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  4.1                                   |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      snappyHexMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

// Which of the steps to run
castellatedMesh true;
snap            true;
addLayers       false;

geometry
{
    baffle03.stl
    {
        type triSurfaceMesh;
        name baffle;
    }
};


castellatedMeshControls
{
    maxLocalCells 300000;

    maxGlobalCells 5000000;

    minRefinementCells 0;

    maxLoadUnbalance 0.10;

    nCellsBetweenLevels 2;

    features
    (
	{
		file "baffle03.eMesh";
		level 5;
	}
    );

    refinementSurfaces
    {
        baffle
        {
            level (5 5);
            patchInfo
            {
                type wall;
            }
        }
    }

    resolveFeatureAngle 30;

    refinementRegions
    {
    }

    locationInMesh (0.001 -0.001 0.001);

    allowFreeStandingZoneFaces true;
}

snapControls
{

    nSmoothPatch 3;

    tolerance 2.0;

    nSolveIter 300;

    nRelaxIter 5;

        nFeatureSnapIter 10;

        implicitFeatureSnap true;

        explicitFeatureSnap false;

        multiRegionFeatureSnap false;
}

addLayersControls
{

    relativeSizes true;

    layers
    {

    }

    expansionRatio 1.0;

    finalLayerThickness 0.5;

    minThickness 0.2;

    nGrow 0;

    featureAngle 30;

    slipFeatureAngle 30;

    nRelaxIter 5;

    nSmoothSurfaceNormals 1;

    nSmoothNormals 3;

    nSmoothThickness 10;

    maxFaceThicknessRatio 0.5;

    maxThicknessToMedialRatio 0.3;

    minMedianAxisAngle 90;

    nBufferCellsNoExtrude 0;

    nLayerIter 50;
}

meshQualityControls
{

    maxNonOrtho 65;

    maxBoundarySkewness 20;

    maxInternalSkewness 4;

    maxConcave 80;

    minFlatness 0.5;

    minVol 1e-13;

    minTetQuality 1e-30;

    minArea -1;

    minTwist 0.02;

    minDeterminant 0.001;

    minFaceWeight 0.02;

    minVolRatio 0.01;

    minTriangleTwist -1;

    nSmoothScale 4;

    errorReduction 0.75;
}

writeFlags
(
    layerSets
);

mergeTolerance 1e-6;


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

Last edited by najimaddin96; October 9, 2019 at 11:25. Reason: tags forgotten
najimaddin96 is offline   Reply With Quote

Old   October 14, 2019, 23:16
Default
  #2
New Member
 
raphael
Join Date: Dec 2015
Posts: 4
Rep Power: 5
rapoutin is on a distinguished road
Hello,
Can you send the checkMesh result?
and the snappyHexMesh log files?
It may be due to maxGlobalCells or maxLocalCells
rapoutin is offline   Reply With Quote

Old   October 15, 2019, 03:58
Default
  #3
New Member
 
Damian Berghof
Join Date: May 2019
Posts: 19
Rep Power: 6
virengos will become famous soon enough
The refinement and quality of the mesh and required wall resolution are strongly related to your simulation task and chosen model. Which physical problem do you want to simulate?
best,
Damian
__________________
Get more support about Meshing with Salome and Visualization with ParaView in my growing groups
https://bit.ly/2lFfDkQ
https://bit.ly/2k2u8Pj
virengos is offline   Reply With Quote

Old   October 15, 2019, 08:51
Default
  #4
Member
 
Thomas Sprich
Join Date: Mar 2015
Posts: 59
Rep Power: 6
Swift is on a distinguished road
Hi,

To refine the entire region add:

Code:
      
baffle
        {
            mode        inside;
            levels      ((1E15 5));
        }

to refinementRegions assuming you haven't hit the maxGlobalCells and maxLocalCells limits mentioned by rapoutin.

Thomas
Swift is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[snappyHexMesh] SnappyHexMesh Problem 96faizizzuddin OpenFOAM Meshing & Mesh Conversion 8 September 30, 2019 09:04
[snappyHexMesh] snappyHexMesh does not create any mesh except one for the reference cell Arman_N OpenFOAM Meshing & Mesh Conversion 1 May 20, 2019 17:16
[snappyHexMesh] snappyHexMesh Parallel bad size error andrewpomeroy OpenFOAM Meshing & Mesh Conversion 2 April 2, 2018 01:08
[snappyHexMesh] snappyHexMesh issue kinbean OpenFOAM Meshing & Mesh Conversion 0 June 11, 2017 07:01
[snappyHexMesh] Problem with snappyhexMesh: modelling a pore chamber and pore throat model Saideep OpenFOAM Meshing & Mesh Conversion 5 May 10, 2015 14:46


All times are GMT -4. The time now is 09:44.