|
[Sponsors] |
December 9, 2010, 12:29 |
Add Layers in snappyHexMesh
|
#1 | |
Member
Mihails Ščepanskis
Join Date: Jul 2009
Posts: 36
Rep Power: 17 |
Hi,
I have the problem with adding layers in snappyHexMesh. My geometry is: Code:
geometry { topSurfFlat.stl { type triSurfaceMesh; name topSurf; } sideWall.stl { type triSurfaceMesh; name sideWall; } botWall.stl { type triSurfaceMesh; name botWall; } }; Code:
addLayersControls { relativeSizes true; layers { sideWall { nSurfaceLayers 1; } } expansionRatio 1.0; finalLayerThickness 1.0; minThickness 0.9; nGrow 1; featureAngle 60; nRelaxIter 5; nSmoothSurfaceNormals 1; nSmoothNormals 3; nSmoothThickness 10; maxFaceThicknessRatio 0.5; maxThicknessToMedialRatio 0.3; minMedianAxisAngle 130; nBufferCellsNoExtrude 0; nLayerIter 50; } Quote:
__________________
Mihails Ščepanskis Laboratory for Mathematical Modelling of Environmental and Technological Processes University of Latvia |
||
June 17, 2012, 03:39 |
Same problem: no layers added
|
#2 |
New Member
Jeff Kollasch
Join Date: Dec 2011
Location: Ames, Iowa
Posts: 5
Rep Power: 15 |
This is my first post on these forums.
I am having more or less the same exact issue in trying to mesh a boundary layer region on a pipe made in FreeCAD. As the previous poster did (over a year ago) I have explicitly specified patches to add layers in the same way yet find no layers added and a message "No layers to generate ..." Attached is my case file. I already have made .eMesh files for the edge snapping feature so it can be run by tar xvzf SimplePipe-SAV02.tar.gz cd SimplePipe-SAV02 blockMesh snappyHexMesh Any suggestion on how to change snappyHexMeshDict will be appreciated. Obviously a lot of people have got this working so I'm sure it's something simple. |
|
June 17, 2012, 07:23 |
|
#3 |
Senior Member
|
Haven't ran you case but I'm pretty sure that if you look for "layers" within your sHM log file, you'll see that it's probably complaining about the patch WALL that is not found and it may suggest you to use WALL_patch0 instead.
So WALL_patch0 is what you should have in the layers section of your sHMDict. |
|
June 17, 2012, 15:23 |
|
#4 |
New Member
Jeff Kollasch
Join Date: Dec 2011
Location: Ames, Iowa
Posts: 5
Rep Power: 15 |
Hi,
Thank you so much for your advice. That was exactly my problem. I'm almost there, just having a lot of trouble figuring out what parameter to tweak so the BL region will extend all the way to the inlet and outlet. Does someone know this off-hand? Thanks for the help. Jeff |
|
June 17, 2012, 15:55 |
|
#5 |
New Member
Jeff Kollasch
Join Date: Dec 2011
Location: Ames, Iowa
Posts: 5
Rep Power: 15 |
Never mind my above post. I found a sufficient example here which should do fine.
https://sites.google.com/site/snappy.../cylinder-case Thanks again. |
|
October 23, 2013, 08:12 |
|
#6 |
Member
R. P.
Join Date: Jul 2010
Posts: 73
Rep Power: 16 |
Hi all,
I am trying to add a layer in my geometry but I didn't manage to do it. I already tried to change the patch name, run sHM using geometry in binary and ascii, etc. Could you have a look in my case and give some tip in how to properly add layers on it ? I tried to upload the case here but it's bigger than 97.7 kb. I can send it by email. Thanks a lot. |
|
October 23, 2013, 08:17 |
|
#7 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
Tobias.holzmann@holzmann-cfd.de
Maybe I can have a look today evening.
|
|
October 23, 2013, 09:17 |
|
#8 |
Member
R. P.
Join Date: Jul 2010
Posts: 73
Rep Power: 16 |
Hi Tobias,
Thanks for you quickly response. I tried to upload the out (just the layer part) here, but I got the message: "The text that you have entered is too long (68499 characters). Please shorten it to 20000 characters long". I sent you the case anyway, you be able to see the output for the sHM. Thanks again. |
|
October 23, 2013, 14:37 |
|
#9 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
For all,
the problem was the OF version. After starting sHM with 2.2.x everything works fine. In OpenFOAM-2.1.x I realized that the layer thickness calculation in the beginning is a bit strange. To be sure you have to do the following steps: 1. sHMDict: castellated and snapping on // layer generation off 2. snappyHexMesh -overwrite 3. sHMDict: castellated and snapping off // layer generation on 4. snappyHexMesh -overwrite Done. Have Fun. |
|
October 23, 2013, 14:42 |
|
#10 |
Member
R. P.
Join Date: Jul 2010
Posts: 73
Rep Power: 16 |
Yes, it's working perfectly with 2.2.x openFoam version.
Thanks Tobi. |
|
November 4, 2013, 12:53 |
|
#11 |
New Member
hasan hasan hasan
Join Date: Apr 2013
Posts: 4
Rep Power: 13 |
hallo,
i am also having problems adding layers. i have tried changing many different parameters, but still i cant get the layers to grown. i am sure that i now have the write patch name! i think its might be the geometry. the best way to describe it would be a flying carpet. a thin wall ( 1- 2 cm thick) but with waved surface. much more like a sail. could you please help me with some tips or ideas how to solve the problem. thank you! |
|
April 29, 2015, 02:01 |
Add layers in snappyHexMesh _realtive sizes vs absolute
|
#13 |
New Member
Lavanya
Join Date: Mar 2015
Posts: 5
Rep Power: 11 |
Hi ,
I am running simulation using relative size as "false" in add layers. I want the first layer thickness to be specific, so I happen to figure out with relative size as false but couldn't understand when set as true. Please can you detail about how its meshed when it is set as "true". In some tutorials, I have found that its relative to the surface mesh size - -i.e., final layer thickness / surface mesh size. How do I calculate that? Is surface mesh size =Surface area / no of surface elements? How to go about setting values for maxFaceThicknessRatio and maxThicknessToMedialRatio ? Thanks |
|
April 29, 2015, 06:29 |
|
#14 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
Hi,
check out the snappyHexMesh section in the wiki. There is a good presentation from Engys. There you find the necessary stuff.
__________________
Keep foaming, Tobias Holzmann Last edited by Tobi; March 8, 2018 at 09:45. |
|
April 29, 2015, 11:39 |
|
#15 |
New Member
Philipp Gruschka
Join Date: Jun 2014
Posts: 5
Rep Power: 12 |
Hi everybody,
I'm also having a problem in the layers section of sHM. In my volume mesh I have two neighbouring regions of different cell density (lets say: R1 and R2), where R2 is twice as dens as R1. (e.g. R1 -> 20 mm cell length; R2 -> 10 mm cell length) Both regions are bordering a solid wall where boundary layers shall be applied. The entry "finalLayerThickness" is set to 0.4. 5 Layers shall be applied at the wall. Since finalLayerThickness is calculated relative to the last cell of the volume mesh, i get boundary layers of different height. To avoid this, I want to set an override for the finalLayerThickness in region R2. That way, the final layer of both regions has the same height and since the expansion ratio is constant, the remaining cells of the layer will also evolve equally. THE PROBLEM: I heard that an override for fLT can be set in the layers part like that: layers { R1 {nSurfaceLayers5;} R2 {nSurfaceLayers5; finalLayerThickness 0.8;} } expansionRatio 1.25; finalLayerThickness 0.4; Unfortunately, during the run of sHM it says that the expression of the override in brackets is "ill defined". Did anybody encounter a similar problem or has any suggestions to solve this? Many thanks in advance! |
|
May 5, 2015, 02:19 |
|
#16 |
New Member
Lavanya
Join Date: Mar 2015
Posts: 5
Rep Power: 11 |
Hi ,
It should look like the following. addLayersControls { relativeSizes true; expansionRatio 1.0; finalLayerThickness 0.3; minThickness 0.25; layers { sphere.stl_firstSolid { nSurfaceLayers 1; } maxY { nSurfaceLayers 1; expansionRatio 1.3; finalLayerThickness 0.3; minThickness 0.1; } frozenPatches { nSurfaceLayers 0; } } //Advanced settings ... } Thanks |
|
May 11, 2015, 10:19 |
|
#17 |
New Member
Philipp Gruschka
Join Date: Jun 2014
Posts: 5
Rep Power: 12 |
Thank you very much, i will try that as soon as possible.
However, i tried adding a value for finalLayerThickness directly in the 'layers' section, e.g.: layers { geoBody (nSurfaceLayers 5; finalLayerThickness 0.8) } expansionRatio 1.25; finalLayerThickness 0.4; This works fine for my problem. Greetings, Philipp |
|
November 20, 2015, 04:15 |
How can get the connectivity of Boundary Layer in different Dense of mesh using snapp
|
#18 |
New Member
SungTaekPark
Join Date: Nov 2015
Posts: 2
Rep Power: 0 |
Hello guys.
This is the first time to me writing some letter about OpenFOAM. Any way, in these days, using snappyHexMesh, I have calculated the vessel of KCS with multiphase flow. But, I don’t know how can I put the layer mesh around the hull well. Especially, if the Dense of grid is differ from other region(As different Level of refinementRegions) Then, the boundary layer mesh is just cutting out. I can’t give it the connectivity of layer. Also, if the surface normal vector is changing suddenly, or something like vessel’s Bulbosbow, The Boundary layer is also just stopped. Not connected across the surface. Please check the below picture which is the best snappyHexMeshing for me yet… . . Using STAR-CCM, making Grid more easier just like below picture. Boundary prism layer is well inserted. But, you know Star-CCM is very expensive. OpenFOAM is Free Actually, with the current snappyHexMesh, the result of hull’s resistance is almost correct (1.5 % Error by Experiment Result) But I still want to find the way how can I make the more stable Grid. If any one who know the way or get some experience, please give me some tip. Thank you. ^-^/~ Last edited by probpst; November 20, 2015 at 05:06. Reason: ... |
|
August 26, 2016, 11:36 |
|
#19 |
New Member
Join Date: Mar 2016
Posts: 17
Rep Power: 10 |
Hello, I am doing some similar things with ships. I have created the ship successfully. But like your problem, I cannot seem to create satisfactory boundary layer meshes around the ship. Have you solved your problem? Thank you.
|
|
September 13, 2016, 14:52 |
Hello. Peng.D.U - Regarding snappyHexMesh Boundary Layer - Sorry for late response
|
#20 |
New Member
SungTaekPark
Join Date: Nov 2015
Posts: 2
Rep Power: 0 |
Hello. Peng.D.U
It’s nice to contact to you. First of all, I’m very sorry for late response. Actually, I do not check my personal E-mail box regularly. So I couldn’t noticed the E-mail from you. sorry for that any way. As you said, I think it’s still hard to make Boundary layer satisfactorily using snappyHexMesh. Not only us, in the OpenFOAM wiki, they also somewhat acknowledged about this problem just like below. I think the main reason of this is for the sanpping process iteration which is searching surface boundary from the Outside domain not from the surface it self. But, it still might be also possible to get a opportunity to generate quite a good quality of Boundary Layer by adjusting meshQuality such as maximum allowance of skewness, Cell’s orthogonal property and Minimum volume ratio etc. For example if we adjust increasing “maxNonOrtho“ more higher and more lower “minTetQuality“, the Boundary Layer could be more better just like below picture But as you know, the Orthogonal property is very important to get stable iteration during CFD calculation, so too much allowance of Maximum Non Orthogonality is not good for getting good results. Also, for getting (y+)=1 condition, the boundary layer might be very thin in some condition, and this put a restriction on the Generating Boundary layer It self because of the Maximum Cell aspect ratio, and Min Volume ratio. But in the case of Model scale’s ship test, the Re number is normally put on the fully turbulent developed area, So even with somewhat imperfection Boundary layer mesh, the calculation result can be quite a good. I think this Prism Layer meshing problem is more critical at Propeller analysis. Normally, the Re number(chord based length) at 70% radios is below than 3.527×106, the Propeller Open Water test Experiment result might be changed depending onRe. (Re increase -> Kt , Kq decrease) It means that the flow is on the transient area affected somewhat Laminar condition. So, in the CFD calculation for this propeller simulation, I think the condition of Boundary prism Layer is quite a important such as giving (y+) < 1 But, it’s still not easy just like below picture(KP505) So, compromise some of regulating value, and set (y+)=5, I can barely generate below KP505 Propeller mesh. ( I attached MeshQualityDict & snappyHexMeshDict file for this case - check your E-mail Box of pp1565156@126.com ) But, I think it is still not enough for making fully covered Boundary Prism Layer including (y+)< 1 So, I suggest to you another method. May be you already know. Just Googling “enGrid” . it is also FREE soft ware for only mesh generating. It is specialized for making Prism Boundary Layer around Object. But, the Domain mesh consisted of Hexagonal, which is less stable than trimmed mesh(snappyHexMesh) So, around Object, enGrid can be better solution, and the left Domain area should be made using snappyHexMesh, And then, merge both two mesh with AMI patch. I think, above method can be quite a good method for both getting better Boundary Layer and calculating stabilization even AMI is still uncomfortable. Oh, it has been long writing,,, any way thank you for contact to me & sorry for late response. I hope it could be help to you. Thank you. Have a good day. Sung Taek Park (probpst) Naval architecture& Ocean Engineering Department Seoul national University South Korea +82 -10 9408-5375 probpst@snu.ac.kr |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[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 |
[snappyHexMesh] snappyHexMesh not adding layers to a solid | jet_engine | OpenFOAM Meshing & Mesh Conversion | 0 | June 3, 2016 09:25 |
[snappyHexMesh] snappyHexMesh : Layers on patches | Nucleophobe | OpenFOAM Meshing & Mesh Conversion | 0 | October 11, 2012 18:34 |
[snappyHexMesh] Add additional boundary layers to complex stl surface | tobijingles | OpenFOAM Meshing & Mesh Conversion | 1 | October 26, 2011 11:45 |