|
[Sponsors] |
[snappyHexMesh] How to generate Layers at the corner |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 6, 2019, 12:17 |
How to generate Layers at the corner
|
#1 |
New Member
amin
Join Date: Jun 2015
Posts: 5
Rep Power: 11 |
Dear Foamers,
I've been trying for quite some time to generate a decent Mesh in a wind tunnel using helyxHexMesh (Engys version) and snappyHexMesh but the problem is that they both fail to grow layers at the corners of the duct (Image attached). I tried with many modifications and different parameters (including featureAngle= 180 which Engys suggested for such cases) but non of them worked. My ultimate goal is to bound y+ between 30 to 300 but the coarse grid at the corner is causing trouble particularly through the nozzle (flow of high velocity). Is there any chance to improve it using snappy/helyxHM ? Any Help would be highly appreciated. Code:
/*--------------------------------*- C++ -*----------------------------------*\ | o | | | o o | OpenFOAM (Engys Edition): | | o O o | Version: 2.1_engysEdition-1.0 | | o o | Web: http://www.engys.com | | o | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object snappyHexMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // castellatedMesh true; debug 1; snap true; addLayers true; autoBlockMesh false; crackDetection false; geometry { inlet.stl { type triSurfaceMesh; name inlet; } outlet.stl { type triSurfaceMesh; name outlet; } walls.stl { type triSurfaceMesh; name walls; } } castellatedMeshControls { features ( { file "walls.eMesh"; level 4; refineFeatureEdgeOnly false; } ); nCellsBetweenLevels 3; refinementSurfaces { walls { level (4 6); refineSurfaceBoundary true; featureRefineAngle 20; } inlet { level (0 0); patchInfo { type patch; } } outlet { level (0 0); patchInfo { type patch; } } } refinementRegions { walls { mode distance; levels ( ( 0.015 4 ) ); } } locationInMesh ( 0.0 0.0 0.0 ); maxLocalCells 100000000; maxGlobalCells 1000000000; minRefinementCells 100; maxLoadUnbalance 0.1; resolveFeatureAngle -60; featureRefineAngle 20; refineSurfaceBoundary true; allowFreeStandingZoneFaces false; balanceThenRefine true; nGapRefinements 0; minZoneRegionSize 0; } snapControls { featureEdges { } nOuterIter 2; nPreFeatureIter 0; nSolveIter 10; nFeatureIter 50; globalFeatureEdges true; globalRegionSnap false; nSmoothPatch 2; tolerance 4; nRelaxIter 5; zoneFeatureSnapping true; directFeatureSnapping true; regionFeatureLines false; geometryFeatureLines true; snapSurfBoundary true; // collapseTol 0.25; } addLayersControls { layers { "walls.*" { nSurfaceLayers 8; fch 0.001; expansionRatio 1.1; } } relativeSizes true; expansionRatio 1.2; finalLayerThickness 0.8; //- 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.2; nGrow 0; // Advanced settings featureAngle 180; //- What feature angle to try merge two faces // featureAngleMerge 45; // Terminate layers at feature edges specified with this angle (0 to disable) featureAngleTerminate 180; // 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 5; // Number of smoothing iterations of surface normals nSmoothSurfaceNormals 1; // Number of smoothing iterations of interior mesh movement direction nSmoothNormals 3; // Smooth layer thickness over surface patches nSmoothThickness 10; // Stop layer growth on highly warped cells maxFaceThicknessRatio 2.0; // Reduce layer growth where ratio thickness to medial // distance is large maxThicknessToMedialRatio 0.3; // Angle used to pick up medial axis points //minMedialAxisAngle 90; minMedianAxisAngle 90; // Maximum number of layer generation iterations maxLayerIter 30; // Try and grow around convex edges growConvexEdge true; // Try and grow around concave edges growConcaveEdge true; // Try to grow layers up non grown planar surfaces (inlets, symmetry etc) growUpPatches true; // Whether to re-balance based on predicted number of layer cells preBalance false; // Where layers collapse recover layers by this increment layerRecovery 1; nBufferCellsNoExtrude 0; nLayerIter 50; } meshQualityControls { maxNonOrtho 65; maxBoundarySkewness 20; maxInternalSkewness 4; maxConcave 80; minFlatness 0.5; minVol 1e-14; minTetQuality -1e+30; minArea 1e-13; minTwist 0.05; minDeterminant 0.0001; minFaceWeight 0.08; minVolRatio 0.025; minTriangleTwist -0.99; nSmoothScale 10; errorReduction 0.75; } debug 0; mergeTolerance 1e-06; // ************************************************************************* // |
|
September 8, 2019, 07:43 |
|
#2 |
New Member
Adam
Join Date: Jan 2019
Posts: 21
Rep Power: 7 |
Change the featureAngle in snappyHexMesh to a value higher than 90
|
|
September 9, 2019, 03:03 |
|
#3 |
Member
Damian Berghof
Join Date: May 2019
Posts: 41
Rep Power: 11 |
Hi Amin,
snappyHexMesh is really a good Mesher, but the learning curve is steep. You could also mesh this simple geometry with the Salome Meca Software in just 1 run and within seconds. Let me know if you need some support to do it! 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 |
|
June 22, 2023, 11:46 |
|
#4 |
New Member
Ali Berk Kahraman
Join Date: Dec 2015
Location: Braunschweig, Germany
Posts: 14
Rep Power: 10 |
Hi Amin,
Were you able to figure this out? I am having the same problem and there seems to be no obvious answer online. |
|
Tags |
layer addition, snappyhexmesh 3d |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] addLayersControls does not generate boundary layers | rinaldialberto | OpenFOAM Meshing & Mesh Conversion | 2 | July 12, 2018 12:22 |
[snappyHexMesh] Problem with prism layers at corner edges | Fauster | OpenFOAM Meshing & Mesh Conversion | 1 | September 30, 2016 01:25 |
[snappyHexMesh] SnappyHexMesh: can not generate Layers | Qianchaoqun | OpenFOAM Meshing & Mesh Conversion | 0 | August 10, 2016 04:17 |
Prism Layers in the corner | bengy | STAR-CCM+ | 19 | August 1, 2016 07:46 |
[snappyHexMesh] snappyHexMesh layers at the corner missing | wc34071209 | OpenFOAM Meshing & Mesh Conversion | 3 | February 12, 2014 12:32 |