|
[Sponsors] |
[snappyHexMesh] SnappyHexMesh do not add layers |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 28, 2023, 10:16 |
SnappyHexMesh do not add layers
|
#1 |
New Member
RT
Join Date: Mar 2020
Location: Germany
Posts: 16
Rep Power: 6 |
Dear all,
I would like to add layers around a small cylindrical hole in a very thin plate (width = 1 mm), but the layers are not added with the log "no layers to generate". Here is the snappyHexMeshDict: Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v2306 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object snappyHexMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Which of the steps to run castellatedMesh true; snap true; addLayers true; geometry { pipe.stl { type triSurfaceMesh; name pipe; } inlet.stl { type triSurfaceMesh; name inlet; } outlet.stl { type triSurfaceMesh; name outlet; } plane.stl { type triSurfaceMesh; name plane; regions { plane_back {name plane_back; } plane_bottom {name plane_bottom;} plane_front {name plane_front; } plane_hole1 {name plane_hole1; } plane_hole2 {name plane_hole2; } plane_hole3 {name plane_hole3; } plane_hole4 {name plane_hole4; } plane_hole5 {name plane_hole5; } plane_hole6 {name plane_hole6; } plane_left {name plane_left; } plane_right {name plane_right; } plane_top {name plane_top; } } } } // Settings for the castellatedMesh generation. castellatedMeshControls { maxGlobalCells 15000000; maxLocalCells 5000000; maxLoadUnbalance 0.1; minRefinementCells 0; nCellsBetweenLevels 3; features ( { file "pipe.extendedFeatureEdgeMesh"; level 2; } { file "plane.extendedFeatureEdgeMesh"; level 2; } ); refinementSurfaces { pipe { level (2 2); patchInfo { type patch; } } inlet { level (2 2); patchInfo { type patch; } } outlet { level (2 2); patchInfo { type patch; } } plane { level (2 2); patchInfo { type patch; } regions { plane_hole1 { level (4 5); } plane_hole2 { level (4 5); } plane_hole3 { level (4 5); } plane_hole4 { level (4 5); } plane_hole5 { level (4 5); } plane_hole6 { level (4 5); } } } } resolveFeatureAngle 30; refinementRegions { } locationsInMesh ( ( (0.0081 0.0001 0.0049) fluid ) ( (0.0139 0.0001 0.0001) pipe ) ( (0.0001 0.0001 0.0001) plane ) ); allowFreeStandingZoneFaces false; } // Settings for the snapping. snapControls { nSmoothPatch 3; tolerance 1.0; nSolveIter 100; nRelaxIter 5; nFeatureSnapIter 10; implicitFeatureSnap false; explicitFeatureSnap true; multiRegionFeatureSnap false; } addLayersControls { layers { plane_hole1 { nSurfaceLayers 3; } plane_hole2 { nSurfaceLayers 3; } plane_hole3 { nSurfaceLayers 3; } plane_hole4 { nSurfaceLayers 3; } plane_hole5 { nSurfaceLayers 3; } plane_hole6 { nSurfaceLayers 3; } } relativeSizes yes; expansionRatio 1.1; // firstLayerThickness 0.3; finalLayerThickness 0.3; minThickness 0.05; nGrow 0; featureAngle 150; maxFaceThicknessRatio 0.5; nSmoothSurfaceNormals 1; nSmoothThickness 10; minMedialAxisAngle 90; maxThicknessToMedialRatio 0.3; nSmoothNormals 3; nRelaxIter 5; nBufferCellsNoExtrude 0; nLayerIter 50; nRelaxedIter 20; } meshQualityControls { maxNonOrtho 75; maxBoundarySkewness 20; maxInternalSkewness 4; maxConcave 80; minFlatness 0.5; minVol 1e-30; minTetQuality 1e-30; minArea -1; minTwist 0.02; minDeterminant 0.001; minFaceWeight 0.02; minVolRatio 0.01; minTriangleTwist -1; nSmoothScale 4; errorReduction 0.75; } mergeTolerance 1e-6; // ************************************************************************* // Code:
relativeSizes no; expansionRatio 1.1; firstLayerThickness 0.00005; // finalLayerThickness 0.3; minThickness 0.00005; I would very appreciate any hint on how to get the layers to work. Thank you! |
|
November 28, 2023, 10:38 |
|
#2 |
Senior Member
M
Join Date: Dec 2017
Posts: 703
Rep Power: 13 |
Hi,
on first look I would think it should work, I hope not to miss something obvious. It could be beneficial if you provided the log file. What can stop the layers from growing is a clash with any of the quality metrics. I see you are not completely using the default values, or, at least I spotted "minFlatness" which is not in the ESI 2112 version: https://www.openfoam.com/documentati...shquality.html it might be "minFaceFlatness" but its inactive by default. You can try with the default setting, maybe it helps. |
|
November 28, 2023, 11:19 |
|
#3 |
New Member
RT
Join Date: Mar 2020
Location: Germany
Posts: 16
Rep Power: 6 |
Dear AtoHM,
thank you very much for the reply and for the hint! I will try to use the default quality metrics. Meanwhile, I attach the log file. I would very appreciate if you could take a look. Thanks again for the help! |
|
November 28, 2023, 11:43 |
|
#4 |
New Member
RT
Join Date: Mar 2020
Location: Germany
Posts: 16
Rep Power: 6 |
UPDATE: I tried the following quality metrics:
Code:
maxNonOrtho 75; maxBoundarySkewness 20; maxInternalSkewness 4; maxConcave 80; minVol 1e-30; minTetQuality -1e+30; // minVolCollapseRation 0.5; minArea -1; minTwist 0.02; minDeterminant 0.001; minFaceWeight 0.05; minFaceFlatness -1; minVolRatio 0.01; minTriangleTwist -1; nSmoothScale 4; errorReduction 0.75; I would very appreciate further help! |
|
November 28, 2023, 11:48 |
|
#5 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29 |
Hello folks,
It seems you are meshing a multiregion case, according to the use of locationsInMesh. For such case, snappy creates interfaces during the meshing process, as you can see in your log file : Code:
Adding patches for face zones ----------------------------- Patch Type Name FaceZone FaceType ----- ---- ---- -------- -------- 24 wall fluid_to_plane fluid_to_plane internal 25 wall plane_to_fluid fluid_to_plane internal 26 wall fluid_to_pipe fluid_to_pipe internal 27 wall pipe_to_fluid fluid_to_pipe internal To do so, you will have to use these names in your layer definition. (for instance fluid_to_plane) I hope I didn't say anything stupid because it's been a while I didn't run a multiregion case. Regards, Yann |
|
November 28, 2023, 11:55 |
|
#6 |
New Member
RT
Join Date: Mar 2020
Location: Germany
Posts: 16
Rep Power: 6 |
Dear Yann,
thank you for the help! Yes, I do mesh a multi-region case. At first, I didn't want to create the layers over the whole plane, but over the holes only. I thought it was possible. But may be not in the multi-region case? However, eventually I will need to have the layers over the whole plane, therefore, I will try to use the patch names as you suggest. Thank you very much for the help! |
|
November 28, 2023, 16:32 |
|
#7 |
New Member
RT
Join Date: Mar 2020
Location: Germany
Posts: 16
Rep Power: 6 |
Dear Yann,
thank you for the hint! I tried using the interface patches and it worked. Now I am getting the layers at all interfaces: fluid-pipe, fluid-plane. Thank you again for the help! |
|
Tags |
layer addition, snapphexmesh |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] SnappyHexMesh add Layer Only failed | fxzf | OpenFOAM Meshing & Mesh Conversion | 1 | January 11, 2023 05:14 |
[snappyHexMesh] Add layers at the bottom of a mesh | chayoun | OpenFOAM Meshing & Mesh Conversion | 5 | June 2, 2021 12:35 |
[snappyHexMesh] Inconsistent Layers SnappyHexMesh | CfdUser5855 | OpenFOAM Meshing & Mesh Conversion | 0 | March 10, 2021 14:42 |
[snappyHexMesh] Snappy add layers failed | mqsim | OpenFOAM Meshing & Mesh Conversion | 1 | January 24, 2021 16:02 |
[snappyHexMesh] snappyHexMesh fails adding layers | biscarri | OpenFOAM Meshing & Mesh Conversion | 13 | March 21, 2020 13:40 |