CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [snappyHexMesh] snappyhexmesh cuts small gaps into geometry (https://www.cfd-online.com/Forums/openfoam-meshing/213597-snappyhexmesh-cuts-small-gaps-into-geometry.html)

Fool January 2, 2019 10:57

snappyhexmesh cuts small gaps into geometry
 
1 Attachment(s)
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;



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

Attachment 67501

Fool January 2, 2019 17:22

2 Attachment(s)
By the way it does the same even worse at my inlet as you can see in the picture.

Attachment 67507

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

Attachment 67508

ssa_cfd January 3, 2019 07:09

I think your blockMesh is too coarse.

Fool January 3, 2019 07:43

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?

guin January 3, 2019 10:42

Quote:

Originally Posted by Fool (Post 720691)
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


All times are GMT -4. The time now is 23:25.