CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[snappyHexMesh] Sails Meshing with snappyHexMesh

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 25, 2014, 05:09
Default Sails Meshing with snappyHexMesh
  #1
New Member
 
PaoloFariselli
Join Date: Aug 2013
Location: Milan, Italy
Posts: 28
Rep Power: 12
Paolo.F is on a distinguished road
Hello everyone!

I'm simulating the air flow around a sailing boat...
I am trying to mesh with snappyHexmesh (I have an .stl file of the hull, the main sail and the jib ) and then I will solve with the SimpleFoam Solver.

Unfortunately I have found the meshing process harder than I expected ( previously I have made simulations around an airfoil and a flat plate).

The sails are surfaces (without thickness) and they are twisted , so even if they have no thickness I have to handle a 3D model.

I can achieve a quite good mesh, but I have to use really a lot of elements (4.5M cells) and I can't obtain BoundaryLayers on the sail's surface. This brings the solver to overestimate lift and drag coefficients (expecially CD)

Does anybody has any idea to help me introducing the BL?
Thanks !!!
paolo

this is my SnappyHexMeshDict:
Attached Files
File Type: txt SnappyHexMeshDict.txt (12.3 KB, 34 views)

Last edited by Paolo.F; February 25, 2014 at 05:29. Reason: post was too long
Paolo.F is offline   Reply With Quote

Old   February 25, 2014, 14:00
Default
  #2
Member
 
Julian Langowski
Join Date: May 2011
Location: Bremen, Germany
Posts: 91
Rep Power: 14
Ruli is on a distinguished road
Hi Paolo,
what is the problem with layer generation?
What does the log say? The file looks OK...

Best regards
Julian
__________________
πάντα ῥεῖ - Heraclitus
Ruli is offline   Reply With Quote

Old   February 25, 2014, 18:55
Default
  #3
New Member
 
PaoloFariselli
Join Date: Aug 2013
Location: Milan, Italy
Posts: 28
Rep Power: 12
Paolo.F is on a distinguished road
Hello Julian,
unfortunately the log doesn't say anything wrong ( just a few faces with skewness)...the problem is that I get a very poor percentage of added layers...in fact snappy tries to add layers, and I can see them, but not all around the sail. They appear only in a small flat area of the sail (very far from the curved part or around the leading/trailing edge).
Paolo
Paolo.F is offline   Reply With Quote

Old   February 26, 2014, 01:39
Default
  #4
Member
 
Julian Langowski
Join Date: May 2011
Location: Bremen, Germany
Posts: 91
Rep Power: 14
Ruli is on a distinguished road
Dear Paolo,
do you have any pictures of the layers?

What might help:
- set higher refinement level => layers can follow surface easier
- reduce relaxation iterations => layers don`t get destructed as much

How much layer coverage do you have in the first layer iteration?

Best regards
Julian
__________________
πάντα ῥεῖ - Heraclitus
Ruli is offline   Reply With Quote

Old   February 26, 2014, 03:49
Default
  #5
New Member
 
PaoloFariselli
Join Date: Aug 2013
Location: Milan, Italy
Posts: 28
Rep Power: 12
Paolo.F is on a distinguished road
Hi Julien,

Thanks for your hints! I would like to raise the refinement lev. but I already have many cells so it will be hard to handle more...

Now I will try to reduce the relaxation iterations to see if anything changes...

this is what I get from the snappy log:

Detected 1528121 illegal faces (concave, zero area or negative cell pyramid volu
me)
Extruding 0 out of 788781 faces (0%). Removed extrusion at 0 faces.
Added 0 out of 1577562 cells (0%).

You have asked me :" How much layer coverage do you have in the first layer iteration?"
I don't know if I get you the right answer....

These are a couple of screenshots of my "best" mesh till now. You are watching the sails from above; wind is coming from the top ad the left side (22° angle of attack; x-axis is 0°)
I hope I've been clear...
Thanks again!!!
Paolo
Attached Images
File Type: jpg mesh1.jpg (98.6 KB, 117 views)
File Type: jpg mesh2.jpg (99.7 KB, 102 views)
File Type: jpg mesh3.jpg (100.2 KB, 101 views)
File Type: jpg mesh4.jpg (98.3 KB, 84 views)
Paolo.F is offline   Reply With Quote

Old   February 26, 2014, 09:49
Default
  #6
Member
 
Julian Langowski
Join Date: May 2011
Location: Bremen, Germany
Posts: 91
Rep Power: 14
Ruli is on a distinguished road
Dear Paolo,
you have NLayerIter 65, which means 65 iterations of layer generation and adoption. Do you get the full layer coverage after the first iteration? Its the log part directly after the end of snapping

You also could play with:
-featureAngle

Thinking about it: Did you check, if you have 8 layers, with the outmost being 0.3 dx, that the innermost layer isn`t below your minThickness of 0.00001? Just an idea..

Best regards
__________________
πάντα ῥεῖ - Heraclitus
Ruli is offline   Reply With Quote

Old   February 26, 2014, 16:21
Default
  #7
New Member
 
PaoloFariselli
Join Date: Aug 2013
Location: Milan, Italy
Posts: 28
Rep Power: 12
Paolo.F is on a distinguished road
Dear Julian,
I've tried to follow your hints, but unfortunately nothing seems to work....I checked the minThickess parameter but everything seems to be right...

I checked the log file, and I found that i get a coverage near to 0%

Anyway thanks again for your help! I you get any other idea please tell me!
Regards,
paolo
Paolo.F is offline   Reply With Quote

Old   June 24, 2015, 01:58
Default
  #8
Senior Member
 
Join Date: Mar 2015
Posts: 250
Rep Power: 12
KateEisenhower is on a distinguished road
Quote:
Originally Posted by Paolo.F View Post
Dear Julian,
I've tried to follow your hints, but unfortunately nothing seems to work....I checked the minThickess parameter but everything seems to be right...

I checked the log file, and I found that i get a coverage near to 0%

Anyway thanks again for your help! I you get any other idea please tell me!
Regards,
paolo
Hello Paolo,

How about lowering your meshQualityControls? If these criteria are too strict, sHM can't add layers and stay within the allowed regions.

Best regards,

Kate
KateEisenhower is offline   Reply With Quote

Old   August 12, 2015, 15:17
Default
  #9
Member
 
DanielP
Join Date: Jan 2015
Posts: 33
Rep Power: 11
danielpiaget is on a distinguished road
Hello Paolo,

I suggest that you extrude the mesh around the sails before you generate the boundary layers. See below the link were they use this method on an airfoil.

https://www.hpc.ntnu.no/display/hpc/...l+Calculations

good luck,

Daniel
danielpiaget is offline   Reply With Quote

Old   August 13, 2015, 02:31
Default
  #10
Senior Member
 
Join Date: Mar 2015
Posts: 250
Rep Power: 12
KateEisenhower is on a distinguished road
Quote:
Originally Posted by danielpiaget View Post
Hello Paolo,

I suggest that you extrude the mesh around the sails before you generate the boundary layers. See below the link were they use this method on an airfoil.

https://www.hpc.ntnu.no/display/hpc/...l+Calculations

good luck,

Daniel
Hello Daniel,

Thank you very much for the link to this tutorial. It is one of the best I have seen so far! In my research I was never able to achieve a decent boundary layer region with more than 5 layers, an y+ value of 10^-5 and an expansion ratio of around 1.2.
So I'm wondering if this is possible. Has anyone managed to create a boundary layer region of this type with snappyHexMesh, maybe following this tutorial?

Best regards,

Kate
KateEisenhower is offline   Reply With Quote

Old   August 13, 2015, 03:34
Default
  #11
Senior Member
 
anonymous
Join Date: Aug 2014
Posts: 205
Rep Power: 12
ssss is on a distinguished road
Did you check your stl file with surfaceCheck? Did you you surfaceFeatureExtract to help snappyHexMesh to adapt to the edge? I would try to split your stl in various stl which contain each of the parts of your original stl. I would also try to play with the featureEdges in your snappyHexMeshDict, it seems like if snappy does not recognize the edges of your geometry
ssss is offline   Reply With Quote

Old   August 13, 2015, 10:38
Default
  #12
Member
 
DanielP
Join Date: Jan 2015
Posts: 33
Rep Power: 11
danielpiaget is on a distinguished road
Hello Kate,

snappyHexMesh has a particular way of generating the boundary layers around a geometry. The algortihm seems to work better when working with an external flow as opposed to an internal flow problem (my experience).

Note that when the boundary layers in inserted (extruded) at the surface, the Snap mesh is translated towards the center (or shrunk).This will limited also the total thickness of the boundary layer. Regarding your expansion ratio try keeping the value closer to 1. I suggest something like 1.05-1.08. Also, why do you need such a low value of y+ ?

The extrusion of the boundary layers is done in two steps. In the first step, all the faces are found that will have a boundary layer added to them. The faces are sorted for quality and will be rejected if they are too warped, or have non -manifold points,etc. If the faces are rejected, the boundary layer will no be extruded for that face\point.Also, in order to extrude the points at an intersection between patches, the angle between the patches normals must be bigger than half of the featureAngle or must be specified set as slipFeatureAngle in the snappyHexMeshdict.

In the second step, the surface points of the chosen faces are extruded.Cells are constructed with the new faces. The Snap mesh is shrunk back.

Also, when setting the parameters for the boundary layers, you can do it in different ways.

1) speficied the expansionRatio and the finalLayerThickness
2) speficied the expansionRatio and the firstLayerThickness
3) speficied the expansionRatio and the finalThickness
4) specified the finalThickness and firstLayerThickness.
5) specified the finalThickness and finalLayerThickness.

Note that if the relativeSize is set to true the finalLayerThickness become relative to the smallest edge of the faces that composed surface mesh.

But to answer your question, I have been able to generate large number of layers (over 10) in a rectangular domain. Once the geometry becomes more complicated, the quality of the Snap mesh degrades, making the extrusion harder.

regards,

Daniel
danielpiaget is offline   Reply With Quote

Old   August 14, 2015, 02:25
Default
  #13
Senior Member
 
Join Date: Mar 2015
Posts: 250
Rep Power: 12
KateEisenhower is on a distinguished road
Hello daniel,

Thank you very much for the effort to write this useful post.
Quote:
Originally Posted by danielpiaget View Post
Hello Kate,

snappyHexMesh has a particular way of generating the boundary layers around a geometry. The algortihm seems to work better when working with an external flow as opposed to an internal flow problem (my experience).

Note that when the boundary layers in inserted (extruded) at the surface, the Snap mesh is translated towards the center (or shrunk).This will limited also the total thickness of the boundary layer. Regarding your expansion ratio try keeping the value closer to 1. I suggest something like 1.05-1.08. Also, why do you need such a low value of y+ ?
I've tried values down to 1. It didn't change much. But I think that is related to the huge number of layers I want to create (20 to 30). I want to reach a y+ value of 1 because I don't want to use any wall functions.

Quote:
The extrusion of the boundary layers is done in two steps. In the first step, all the faces are found that will have a boundary layer added to them. The faces are sorted for quality and will be rejected if they are too warped, or have non -manifold points,etc. If the faces are rejected, the boundary layer will no be extruded for that face\point.Also, in order to extrude the points at an intersection between patches, the angle between the patches normals must be bigger than half of the featureAngle or must be specified set as slipFeatureAngle in the snappyHexMeshdict.

In the second step, the surface points of the chosen faces are extruded.Cells are constructed with the new faces. The Snap mesh is shrunk back.

Also, when setting the parameters for the boundary layers, you can do it in different ways.

1) speficied the expansionRatio and the finalLayerThickness
2) speficied the expansionRatio and the firstLayerThickness
3) speficied the expansionRatio and the finalThickness
4) specified the finalThickness and firstLayerThickness.
5) specified the finalThickness and finalLayerThickness.

Note that if the relativeSize is set to true the finalLayerThickness become relative to the smallest edge of the faces that composed surface mesh.

But to answer your question, I have been able to generate large number of layers (over 10) in a rectangular domain. Once the geometry becomes more complicated, the quality of the Snap mesh degrades, making the extrusion harder.

regards,

Daniel
This is the same as I have experienced so far. sHM is great in terms of quickly meshing a complicated geometry. But if you want to generate many boundary layers with an y+ value of around 1, it fails most of the times. At least this is my experience (I am speaking of a non-rectangular quite complicated domain here). I switched to a combination of Blender, gmsh and sHM instead and it seems to work better for me. I'll post a decent step by step guide if I succeed with this method though.

Again, thanks for all your input!

Best regards, Kate
KateEisenhower is offline   Reply With Quote

Old   August 14, 2015, 02:28
Default
  #14
Senior Member
 
Join Date: Mar 2015
Posts: 250
Rep Power: 12
KateEisenhower is on a distinguished road
Quote:
Originally Posted by ssss View Post
Did you check your stl file with surfaceCheck? Did you you surfaceFeatureExtract to help snappyHexMesh to adapt to the edge? I would try to split your stl in various stl which contain each of the parts of your original stl. I would also try to play with the featureEdges in your snappyHexMeshDict, it seems like if snappy does not recognize the edges of your geometry
Hello,

yes, my input file is a patched stl file with very high quality. The problem appears not only at edges, but at slightly curved surfaces too. Anyway, I appreciated your help! Please also see my previous post.

Best regards,

Kate
KateEisenhower is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[snappyHexMesh] snappyHexMesh - 3D Wing Meshing Setup & Trials denbjornen OpenFOAM Meshing & Mesh Conversion 1 May 25, 2020 11:14
Map of this Meshing (sub-)Forum wyldckat OpenFOAM Meshing & Mesh Conversion 0 April 27, 2019 09:33
[snappyHexMesh] Meshing Naca0012 with snappyHexMesh kasimirXV OpenFOAM Meshing & Mesh Conversion 10 May 10, 2016 23:04
[snappyHexMesh] Problem Meshing a V-notch Weir with snappyHexMesh kflora OpenFOAM Meshing & Mesh Conversion 11 December 19, 2011 01:58
[snappyHexMesh] Meshing a sphere with snappyHexMesh Cyberholmes OpenFOAM Meshing & Mesh Conversion 2 July 19, 2011 16:46


All times are GMT -4. The time now is 20:54.