|
[Sponsors] |
[snappyHexMesh] Prism Layers Not Generating |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 15, 2021, 11:54 |
Prism Layers Not Generating
|
#1 |
New Member
Jack B
Join Date: Jul 2018
Posts: 11
Rep Power: 8 |
Hi Foamers,
I have seen this issue relatively often on this forum where people struggle to get the prism layers to generate off more complex geometries using SHM. In my case I can't get my head around the issue and was hoping for someone to point me in the right direction. I want to simulate the attached geometry in air at a velocity of 33m/s. I decided on using the Realizable K-E turbulence model as this is faster at producing results and I am not so fussed on the accuracy and more focused on a fast simulation with where I can have a fast turnaround time of designs. I am interested in the drag values. Using boundary layer theory, I calculated the first PL height to be ~0.0003m (y+~30) however I struggle to get snappy to build layers that small hence I decided to try with a first cell height of 0.001m and then to try and reduce this value if possible. I have attached my geometry, snappyHexMeshDict and meshQualityDict. https://drive.google.com/file/d/1l82...ew?usp=sharing The images below illustrate the issue. I have tried turning off the minTetQuality which had a really positive effect. Also reducing the resolveFeatureAngle to 15 and the featureAngle to 130 had some effect. However much I play with the parameters in SHM dict I feel like I am going in circles. Could anyone lend me a hand? Thanks in advance. |
|
April 15, 2021, 22:14 |
|
#2 |
Senior Member
Claudio Boezio
Join Date: May 2020
Location: Europe
Posts: 137
Rep Power: 7 |
Hello Jack,
I see from your snappyHexMeshDict that you are trying to generate viscous layers based on absolute size. I never managed to get that to work and therefore I gave up using sHM for that. If you ever find out how to make it work, please let me know! You can try the following:
Best, Claudio |
|
April 16, 2021, 02:44 |
|
#3 |
Senior Member
M
Join Date: Dec 2017
Posts: 703
Rep Power: 13 |
Very cool stuff, Claudio
I am not so familiar with blockMesh, I definetely have to get more into it at some point. I am investing a bit more into snappy. A few things I would recommend: try to play with the featureAngle setting (I have not opened the dictionaries, no idea what value you use). Also, you can try the alternative mesh shrinker to produce boundary layers. However, Claudio is right, boundary layers are the weak spot of sHM. @Claudio: I use relative/absolute layers like 50:50. I never know which one works better, but usually one does. Its not impossible, though. |
|
April 16, 2021, 04:50 |
|
#4 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29 |
Hello all,
Just to add my 2 cents on the relative/absolute sizes: a new hybrid mode is available in OpenFOAM-v2012, allowing to set an absolute size on the wall layer and a relative size on the final layer: https://www.openfoam.com/news/main-n...id-layer-input I did not have the chance to try it myself yet so I have no idea how it performs but since you are discussing this topic I thought it could be worth mentioning. Cheers, Yann PS: if someone tries it, please share your thoughts here, I would be interested in having some feedback about it! Last edited by Yann; April 16, 2021 at 09:40. Reason: typo |
|
April 16, 2021, 07:25 |
|
#5 |
Senior Member
M
Join Date: Dec 2017
Posts: 703
Rep Power: 13 |
Interesting, thanks for the tip. I will definetely try it at some point.
|
|
April 16, 2021, 21:18 |
|
#6 |
Senior Member
Claudio Boezio
Join Date: May 2020
Location: Europe
Posts: 137
Rep Power: 7 |
Thanks Yann and AtoHM for the suggestions. I don't quite see the value of this hybrid absolute/relative approach. I think it would be sufficient if absolute size would just work as expected. But I don't want to go off-topic with this.
Two things I would like to add for Jack. If the absolute size of cells gets very small like for your first layer thickness, at some point it might become necessary to increase writePrecision in controlDict. A resolveFeatureAngle of 15 is very coarse actually, although I'm not sure if this is related to your problem. If you are not clear what this setting does, let me know. |
|
April 17, 2021, 04:40 |
|
#7 |
Senior Member
M
Join Date: Dec 2017
Posts: 703
Rep Power: 13 |
I assume it can come in handy, especially for simulations with multiple phases. With the absolute setting you have no control of the volume ratio between last layer and surrounding mesh. High volume ratios at phase interfaces can have a bad influence on stability and convergence. So I guess thats one point.
|
|
April 19, 2021, 05:52 |
|
#8 |
New Member
Jack B
Join Date: Jul 2018
Posts: 11
Rep Power: 8 |
Hi all,
Thanks for your help. I was not able to reply earlier as I was having some trouble accessing the website. Claudio: I will take a look at cfMesh and see if I can use it to mesh my case well from scratch. Although I was hoping to be able to useSHM as it is the in-built tool. The blockMesh you showed on the attached images is really amazing. Would you mind uploading your blockMeshDict? I am not able to use this as I intend to change the geometry and don't want to have to edit the dict every time. I believe resolveFeatureAngle refines curves with angles smaller than the value set in resolveFeatureAngle? I played with decreasing this value down to 5 however it didn't fix the problem and increased the cell count a lot. I will give a try modifying the writePrecision and observing if that fixes the issue. Thanks |
|
May 12, 2021, 20:29 |
|
#9 |
New Member
Shreya Agrawal
Join Date: Nov 2020
Posts: 1
Rep Power: 0 |
Hello All,
I have a similar issue with SHM for my geometry (a 3D square building with corner cuts). The layers are extruding nicely for most of the geometry, except for at the corners (please look at the attached images of a 2D slice). I played around quite a lot with different settings of SHM (changing featureAngle etc.), and the following settings have worked the best so far (openfoam v2012): << Relevant code from SHM >> layers { building { nSurfaceLayers 12; } } relativeSizes false; thicknessModel firstAndOverall; // expansionRatio 1.0627; firstLayerThickness 0.00005; thickness 0.000857; minThickness 0.00004; featureAngle 180; layerTerminationAngle -180; resolveFeatureAngle 40; nLayerIter 100; nSmoothSurfaceNormals 10; nSmoothThickness 20; minMedialAxisAngle 90; maxThicknessToMedialRatio 0.3; nMedialAxisIter 10; nSmoothDisplacement 90; // detectExtrusionIsland true; nRelaxedIter 100; } Do you have any suggestions to extrude the boundary layers at the corners? Thank you! Last edited by shreyaag; May 12, 2021 at 22:02. |
|
May 13, 2021, 05:14 |
|
#10 |
New Member
Jack B
Join Date: Jul 2018
Posts: 11
Rep Power: 8 |
Hi shreyaag,
Check out this post where they deal with a similar issue. SnappyHexMesh: Layer on corners. It's from 2014 but I think it should at the very least point you in the right direction. |
|
July 10, 2021, 10:33 |
|
#11 | ||
Senior Member
Claudio Boezio
Join Date: May 2020
Location: Europe
Posts: 137
Rep Power: 7 |
Hello all,
First of all, apologies for not having replied again to this thread earlier. @AtoHM: Quote:
@Jack B: Quote:
Jack, were you able to make any progress? |
|||
October 16, 2023, 01:31 |
|
#12 | |
New Member
Aero_Cats!
Join Date: Jul 2021
Location: Indonesia
Posts: 7
Rep Power: 5 |
Quote:
Hi Claudio, I worked on a similar project as shown by your thread. Currently I'm trying to mesh the DTMB 5415 ship model and get lost on how to create a good mesh using SHM to generate the prism layer. Could you give us guide on how to mesh such ship geometry using blockMesh only? I believe some foamers also worked on the same project and will get benefit from your side |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Prism Layers at Slip Wall to Non-Slip Wall Transition | InfernoxCJC | STAR-CCM+ | 4 | November 26, 2017 20:06 |
[ICEM] Generating prism layers | undziabundzia | ANSYS Meshing & Geometry | 1 | November 22, 2015 15:21 |
[ICEM] Prism layers distorted near trailing edge of blade-Unstructured Mesh | Rohith Giridhar | ANSYS Meshing & Geometry | 3 | June 29, 2015 18:52 |
Doxygen documentation | Tanay | OpenFOAM Installation | 9 | September 23, 2011 12:40 |
ICEM Prism Layer transition between surface with prism layers and one without | TWaung | ANSYS Meshing & Geometry | 2 | October 12, 2009 15:56 |