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

[snappyHexMesh] snappyhexmesh cuts small gaps into geometry

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By ssa_cfd
  • 1 Post By guin

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 2, 2019, 11:57
Default snappyhexmesh cuts small gaps into geometry
  #1
New Member
 
David
Join Date: Oct 2018
Posts: 27
Rep Power: 8
Fool is on a distinguished road
Hello together,

I am trying to do a hexahedral mesh of a basin with an inclination on one side.
My problem is that the edges at the top of the basin don't get cut off properly as you can see in the picture.

I've tried to play around with the edge refinement and some angle settings but nothing really worked well as I don't want that edge to be very fine because then it takes to long to run the process.
Do you have any suggestions for me?

Here's the snappyHexMeshDict. The part is named as "end_wall". The top of the geometry is "outlet".

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

castellatedMesh true;   
snap            true;   
addLayers       false;   


geometry
{
    
inlet.stl {type triSurfaceMeshname inlet;}
    
outlet.stl {type triSurfaceMeshname outlet;}
    
visc_main_wall.stl {type triSurfaceMeshname visc_main_wall;}
    
end_wall.stl {type triSurfaceMeshname end_wall;}
  
rinne_wall.stl {type triSurfaceMeshname rinne_wall;}
    
becken.stl {type triSurfaceMeshname becken;}
    
refinementBox {type searchableBoxmin (-30 -23 -25); max 97 70 28);}
};

castellatedMeshControls
{
    
maxLocalCells 1000000
    
maxGlobalCells 2000000
    
minRefinementCells 10;  
    
maxLoadUnbalance 0.10;
    
nCellsBetweenLevels 1;  

    
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    
features 
    
(
        {
file "inlet.eMesh"level 3;} 
        {
file "outlet.eMesh"level 3;} 
        {
file "visc_main_wall.eMesh"level 3;} 
        {
file "end_wall.eMesh"level 3;} 
        {
file "rinne_wall.eMesh"level 3;} 
    );

 


    
refinementSurfaces
    
{
        
inlet {level (2 2);}
        
outlet {level (2 2);}
        
visc_main_wall {level (3 3);} 
        
end_wall {level (5 7);} 
        
rinne_wall {level (5 5);} 
    }  


    
resolveFeatureAngle 30;  
    
refinementRegions       
    
{volume {mode distancelevels ((0.0006 4) (0.002 3) (0.01 2));}} 
    
locationInMesh (18.0 17.0 0.47);
    
allowFreeStandingZoneFaces true;
}


snapControls
{
    
nSmoothPatch 3;
    
tolerance 4.0;
    
nSolveIter 30;
    
nRelaxIter 5;
    
nFeatureSnapIter 15
    

implicitFeatureSnap false
explicitFeatureSnap true;
multiRegionFeatureSnap false

}



addLayersControls
{
    
relativeSizes false;
    
layers
    
{
      
visc_main_wall
             
{nSurfaceLayers 3;} 
       
end_wall 
          
{nSurfaceLayers 3;} 
       
rinne_wall
          
{nSurfaceLayers 3;} 
    }

    
expansionRatio 1.3;
    
finalLayerThickness 0.00016
    
minThickness 0.00008
    
nGrow 0



    
featureAngle 80
    
nRelaxIter 3;  
    
nSmoothSurfaceNormals 1
    
nSmoothNormals 3
    
nSmoothThickness 10;  
    
maxFaceThicknessRatio 0.5
    
maxThicknessToMedialRatio 0.3
    
minMedianAxisAngle 130
    
nBufferCellsNoExtrude 0;  
    
nLayerIter 50
}




meshQualityControls
{
    
maxNonOrtho 65;
    
maxBoundarySkewness 20;
    
maxInternalSkewness 4;
    
maxConcave 80;
    
minFlatness 0.5;
    
minVol 1e-13;
    
minTetQuality 1e-9;
    
minArea -1;
    
minTwist 0.02;
    
minDeterminant 0.001;
    
minFaceWeight 0.02;
    
minVolRatio 0.01;
    
minTriangleTwist -1;



    
nSmoothScale 4;
    
errorReduction 0.75;
}



debug 0;



//************************************************************************* // 
mesh_end.jpg

Last edited by Fool; January 2, 2019 at 14:02. Reason: forget to tell the name of the top layer
Fool is offline   Reply With Quote

Old   January 2, 2019, 18:22
Default
  #2
New Member
 
David
Join Date: Oct 2018
Posts: 27
Rep Power: 8
Fool is on a distinguished road
By the way it does the same even worse at my inlet as you can see in the picture.

inlet.JPG

Below I post a picture of the .stl so you can see how it should look.

becken.jpg
Fool is offline   Reply With Quote

Old   January 3, 2019, 08:09
Default
  #3
Member
 
ssa
Join Date: Sep 2018
Posts: 93
Rep Power: 8
ssa_cfd is on a distinguished road
I think your blockMesh is too coarse.
Fool likes this.
ssa_cfd is offline   Reply With Quote

Old   January 3, 2019, 08:43
Default
  #4
New Member
 
David
Join Date: Oct 2018
Posts: 27
Rep Power: 8
Fool is on a distinguished road
Okay. I'll try to do it with a finer blockmesh. But isn't there another possibility if I don't want a very fine mesh?
Fool is offline   Reply With Quote

Old   January 3, 2019, 11:42
Default
  #5
Member
 
Rodrigo
Join Date: Mar 2010
Posts: 98
Rep Power: 16
guin is on a distinguished road
Quote:
Originally Posted by Fool View Post
Okay. I'll try to do it with a finer blockmesh. But isn't there another possibility if I don't want a very fine mesh?
I guess that you want to extract the edge features... this post can be helpful https://www.cfd-online.com/Forums/op...tml#post312645
Fool likes this.
guin is offline   Reply With Quote

Reply

Tags
snappyhexmesh


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
Joints of a geometry not snapped well (SnappyHexMesh) malini1408 OpenFOAM Pre-Processing 1 April 15, 2019 13:09
[snappyHexMesh] Problem and doubts with blockMesh, snappyHexMesh and multiple geometry luca1992 OpenFOAM Meshing & Mesh Conversion 0 August 23, 2017 12:40
Importing CAD geometry and Editing edges to match Ahmed CFX 15 March 21, 2016 13:39
[snappyHexMesh] SnappyHexMesh no layers and no decent mesh for complex geometry pizzaspinate OpenFOAM Meshing & Mesh Conversion 1 February 25, 2015 08:05
vitual _ real deneb FLUENT 3 January 22, 2007 05:31


All times are GMT -4. The time now is 01:50.