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

[snappyHexMesh] Triangular elements in boundary layers generated by snappyHexMesh

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 3, 2018, 10:46
Default Triangular elements in boundary layers generated by snappyHexMesh
  #1
Member
 
Michael Frank
Join Date: Aug 2012
Posts: 55
Rep Power: 14
mike.franky is on a distinguished road
Hi,

I am trying to mesh a relatively simple geometry using snappyHexMesh. The issue I am having is in the addition of the boundary layers. The output of snappyHexMesh says that the 100% of the surface has been extruded, the layers actually contain triangular elements which seem to affect my solution (see attached Fig. "layers.jpg").

The problem seems to start from the snapping phase. The triangular element in the layers only appear at points where the cells formed triangular elements which are not aligned with the rest of the cells (darker coloured cells close to the boundary in Fig. "snapping.jpg")

I found that changing the initial block mesh changes the number and position of these faults. Yet this seems to be seemingly random, and nothing to do with the overall refinement, or aspect ratio of the cells. The surface mesh (.stl) seems fine, and most of the quality parameters in snappyHexMesh dictionary don't seem to affect this behaviour much.

Just in case, my snapping, layer, and quality options in snappyHexMeshDict are:
Quote:
snapControls
{
//- Number of patch smoothing iterations before finding correspondence
// to surface
nSmoothPatch 4;

//- Relative distance for points to be attracted by surface feature point
// or edge. True distance is this factor times local
// maximum edge length.
tolerance 3.0;

//- Number of mesh displacement relaxation iterations.
nSolveIter 30;

//- Maximum number of snapping relaxation iterations. Should stop
// before upon reaching a correct mesh.
nRelaxIter 5;

// Feature snapping

//- Number of feature edge snapping iterations.
// Leave out altogether to disable.
nFeatureSnapIter 10;

//- Detect (geometric only) features by sampling the surface
// (default=false).
implicitFeatureSnap false;

//- Use castellatedMeshControls::features (default = true)
explicitFeatureSnap true;

//- Detect points on multiple surfaces (only for explicitFeatureSnap)
multiRegionFeatureSnap false;
}



// Settings for the layer addition.
addLayersControls
{
// Are the thickness parameters below relative to the undistorted
// size of the refined cell outside layer (true) or absolute sizes (false).
relativeSizes false;

// Per final patch (so not geometry!) the layer information
layers
{
pipe
{
nSurfaceLayers 4;
}

}

// Expansion factor for layer mesh
expansionRatio 1.2;

// Wanted thickness of final added cell layer. If multiple layers
// is the thickness of the layer furthest away from the wall.
// Relative to undistorted size of cell outside layer.
// See relativeSizes parameter.
finalLayerThickness 0.01;

// Minimum thickness of cell layer. If for any reason layer
// cannot be above minThickness do not add layer.
// Relative to undistorted size of cell outside layer.
minThickness 0.00005;

// If points get not extruded do nGrow layers of connected faces that are
// also not grown. This helps convergence of the layer addition process
// close to features.
// Note: changed(corrected) w.r.t 17x! (didn't do anything in 17x)
nGrow 0;

// Advanced settings

// When not to extrude surface. 0 is flat surface, 90 is when two faces
// are perpendicular
featureAngle 90;

// At non-patched sides allow mesh to slip if extrusion direction makes
// angle larger than slipFeatureAngle.
slipFeatureAngle 30;

// Maximum number of snapping relaxation iterations. Should stop
// before upon reaching a correct mesh.
nRelaxIter 3;

// Number of smoothing iterations of surface normals
nSmoothSurfaceNormals 50;

// Number of smoothing iterations of interior mesh movement direction
nSmoothNormals 50;

// Smooth layer thickness over surface patches
nSmoothThickness 10;

// Stop layer growth on highly warped cells
maxFaceThicknessRatio 0.5;

// Reduce layer growth where ratio thickness to medial
// distance is large
maxThicknessToMedialRatio 0.3;

// Angle used to pick up medial axis points
// Note: changed(corrected) w.r.t 17x! 90 degrees corresponds to 130 in 17x.
minMedianAxisAngle 90;


// Create buffer region for new layer terminations
nBufferCellsNoExtrude 0;


// Overall max number of layer addition iterations. The mesher will exit
// if it reaches this number of iterations; possibly with an illegal
// mesh.
nLayerIter 50;
}



// Generic mesh quality settings. At any undoable phase these determine
// where to undo.
meshQualityControls
{
maxNonOrtho 90;
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.001;
minTriangleTwist -1;

// Advanced

nSmoothScale 4;
errorReduction 0.75;

}


// Advanced

// Write flags
writeFlags
(
scalarLevels
layerSets
layerFields // write volScalarField for layer coverage
);


// Merge tolerance. Is fraction of overall bounding box of initial mesh.
// Note: the write tolerance needs to be higher than this.
mergeTolerance 1e-6;
If anyone has an idea as to why this might be happening, I would really appreciate some advise.

Thanks in advance for any help

Cheers
Mike
Attached Images
File Type: jpg layers.jpg (83.7 KB, 64 views)
File Type: jpg snapping.jpg (70.7 KB, 52 views)
mike.franky 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
y+ = 1 boundary layer mesh with snappyHexMesh Arzed23 OpenFOAM Running, Solving & CFD 6 November 23, 2022 16:15
sliding mesh problem in CFX Saima CFX 46 September 11, 2021 08:38
Question about adaptive timestepping Guille1811 CFX 25 November 12, 2017 18:38
Centrifugal fan-reverse flow in outlet lesds to a mass in flow field xiexing CFX 3 March 29, 2017 11:00
New topic on same subject - Flow around race car Tudor Miron CFX 15 April 2, 2004 07:18


All times are GMT -4. The time now is 14:03.