CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [snappyHexMesh] Sails Meshing with snappyHexMesh (https://www.cfd-online.com/Forums/openfoam-meshing/130378-sails-meshing-snappyhexmesh.html)

Paolo.F February 25, 2014 05:09

Sails Meshing with snappyHexMesh
 
1 Attachment(s)
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:

Ruli February 25, 2014 14:00

Hi Paolo,
what is the problem with layer generation?
What does the log say? The file looks OK...

Best regards
Julian

Paolo.F February 25, 2014 18:55

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

Ruli February 26, 2014 01:39

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

Paolo.F February 26, 2014 03:49

4 Attachment(s)
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....:o

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

Ruli February 26, 2014 09:49

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

Paolo.F February 26, 2014 16:21

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

KateEisenhower June 24, 2015 01:58

Quote:

Originally Posted by Paolo.F (Post 476989)
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

danielpiaget August 12, 2015 15:17

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

KateEisenhower August 13, 2015 02:31

Quote:

Originally Posted by danielpiaget (Post 559324)
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

ssss August 13, 2015 03:34

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

danielpiaget August 13, 2015 10:38

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

KateEisenhower August 14, 2015 02:25

Hello daniel,

Thank you very much for the effort to write this useful post.
Quote:

Originally Posted by danielpiaget (Post 559455)
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 August 14, 2015 02:28

Quote:

Originally Posted by ssss (Post 559378)
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


All times are GMT -4. The time now is 17:04.