|
[Sponsors] |
[snappyHexMesh] Adding layers distorts internal mesh |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 6, 2023, 10:58 |
Adding layers distorts internal mesh
|
#1 |
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 670
Rep Power: 14 |
I am finding that if I add a thick layer on one of the domain boundaries, SHM makes a real mess of the mesh at the other surfaces, as it shrinks the internal mesh to make way for the layer. In the example below, the mesh at the top of the cube is stretched horribly. Is there any way to control this better (other than to use a thinner layer)? I couldn't see anything in the snappyHexMeshDict controls ... any suggestions would be welcomed.
Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: dev \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object snappyHexMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // castellatedMesh true; snap true; addLayers true; geometry { domain { type triSurfaceMesh; file "cube.stl"; name cubeSTL; // name of this surf inside SHM regions { top { name cube_top ;} // STL patch name and final name of the patch sides { name cube_sides ;} bottom { name cube_bottom ;} } } }; castellatedMeshControls { maxLocalCells 1000000; //default 100000; maxGlobalCells 5000000; //default 2000000; minRefinementCells 10; maxLoadUnbalance 0.10; nCellsBetweenLevels 5; //feature edge refinement - eMesh read from constant/triSurface features ( { file "cube.eMesh"; level 1; } ); //surface refinement refinementSurfaces { cubeSTL { level (1 1); regions { top { level (1 1); patchinfo { type wall; } } sides { level (1 1); patchinfo { type wall; } } bottom { level (1 1); patchinfo { type wall; } } } } } resolveFeatureAngle 30; //volume refinement refinementRegions { } //other mesh parameters locationInMesh (0 0 2); allowFreeStandingZoneFaces true; } snapControls { nSmoothPatch 3; tolerance 2.0; nSolveIter 30; nRelaxIter 5; nFeatureSnapIter 10; implicitFeatureSnap false; explicitFeatureSnap true; multiRegionFeatureSnap false; } addLayersControls { relativeSizes false; firstLayerThickness 0.02; thickness 0.2; layers { Zneg {nSurfaceLayers 5;} } minThickness 0.005; nGrow 0; featureAngle 160; slipFeatureAngle 30; nRelaxIter 5; nSmoothSurfaceNormals 1; nSmoothNormals 3; nSmoothThickness 10; maxFaceThicknessRatio 0.5; maxThicknessToMedialRatio 0.3; minMedianAxisAngle 90; nBufferCellsNoExtrude 0; nLayerIter 50; nRelaxedIter 20; } meshQualityControls { #include "meshQualityDict" } writeFlags ( scalarLevels layerSets layerFields ); mergeTolerance 1e-6; |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
2 ways to mesh a multiRegion case - one works, the other fails | boffin5 | OpenFOAM Running, Solving & CFD | 16 | March 27, 2023 12:58 |
[snappyHexMesh] Holes in internal mesh when adding boundary layer snappyHex | otaolafr | OpenFOAM Meshing & Mesh Conversion | 3 | February 8, 2021 08:19 |
[snappyHexMesh] SnappyHexMesh no layers and no decent mesh for complex geometry | pizzaspinate | OpenFOAM Meshing & Mesh Conversion | 1 | February 25, 2015 07:05 |
[snappyHexMesh] Adding layers goes wrong with SnappyHexMesh | Elise | OpenFOAM Meshing & Mesh Conversion | 1 | April 22, 2013 02:32 |
[snappyHexMesh] snappyHexMesh won't work - zeros everywhere! | sc298 | OpenFOAM Meshing & Mesh Conversion | 2 | March 27, 2011 21:11 |