CFD Online URL
[Sponsors]
Home > Forums > OpenFOAM Native Meshers: snappyHexMesh and Others

SnappyHexMesh for airfoil 2D case: High computational effort for low quality mesh

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

Like Tree5Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   May 15, 2013, 17:57
Default SnappyHexMesh for airfoil 2D case: High computational effort for low quality mesh
  #1
New Member
 
Deutschland
Join Date: May 2013
Posts: 5
Rep Power: 3
Simon_A is on a distinguished road
Good Evening,

using SnappyHexMesh for a 2D airfoil case, I encounter the following problem:

short description:
Snappy meshes in 3rd dimension and consumes high computational power, but after extrudeMesh, the mesh quality is low.


In blockMesh, the patches "left" and "right" are set "empty", which should tell snappy to not mesh in the 3rd dimension - however, this is happening along the stl surface.

The workaround to then generate a 2D mesh as described in the various threads here is to extrude one of the empty patches using extrudeMesh.

In theory, this works.

In practice, I have to generate a 20 million cells mesh with snappy to get 100000 cells after having used extrudeMesh.

Is something wrong in this workflow, or is there actually some kind of bug in snappy that causes computational inefficiency ?

platform:
Ubuntu 12.10, OF 2.2.0 (also encountered the same problem on a OF 1.6 machine)

Thank you very much for any help regarding this problem.

case file:
https://dl.dropboxusercontent.com/u/...nlineDB.tar.gz
Simon_A is offline   Reply With Quote

Old   May 16, 2013, 03:47
Default
  #2
Senior Member
 
Håkon Strandenes
Join Date: Dec 2011
Location: Norway
Posts: 110
Rep Power: 10
haakon will become famous soon enough
Quote:
Originally Posted by Simon_A View Post
Good Evening,

using SnappyHexMesh for a 2D airfoil case, I encounter the following problem:

short description:
Snappy meshes in 3rd dimension and consumes high computational power, but after extrudeMesh, the mesh quality is low.


In blockMesh, the patches "left" and "right" are set "empty", which should tell snappy to not mesh in the 3rd dimension - however, this is happening along the stl surface.
This is (as far as I know) the behaviour of snappyHexMesh. It is a 3D application, no matter what you do.

Quote:
Originally Posted by Simon_A View Post
The workaround to then generate a 2D mesh as described in the various threads here is to extrude one of the empty patches using extrudeMesh.

In theory, this works.

In practice, I have to generate a 20 million cells mesh with snappy to get 100000 cells after having used extrudeMesh.

Is something wrong in this workflow, or is there actually some kind of bug in snappy that causes computational inefficiency ?
No, I think your workflow is quite right.

Quote:
Originally Posted by Simon_A View Post
platform:
Ubuntu 12.10, OF 2.2.0 (also encountered the same problem on a OF 1.6 machine)

Thank you very much for any help regarding this problem.

case file:
https://dl.dropboxusercontent.com/u/...nlineDB.tar.gz
BTW: Have you seen the tutorial at https://www.hpc.ntnu.no/display/hpc/...l+Calculations ?

Last edited by haakon; May 16, 2013 at 04:33. Reason: Typo
haakon is offline   Reply With Quote

Old   May 16, 2013, 04:35
Default
  #3
New Member
 
Deutschland
Join Date: May 2013
Posts: 5
Rep Power: 3
Simon_A is on a distinguished road
Quote:
Originally Posted by haakon View Post
BTW: Have you seen the tutorial at https://www.hpc.ntnu.no/display/hpc/...l+Calculations ?
Hello Hakoon,

thank you very much for your quick answer.

Yes, I have seen and done that tutorial which is very helpful, however, I am simulating a multi element airfoil and using blockMesh for the slat and airfoil seems to be very complex and difficult.
Simon_A is offline   Reply With Quote

Old   May 16, 2013, 04:39
Default
  #4
Senior Member
 
Håkon Strandenes
Join Date: Dec 2011
Location: Norway
Posts: 110
Rep Power: 10
haakon will become famous soon enough
I am not utilizing blockMesh in that tutorial, but snappyHexMesh. There is the "alternative meshing", which is blockMesh, but if you download the tutorial files, you get a sHM case.

When it comes to your problem, you say that you suffer from bad mesh quality after the extrude process. Can you give any examples (I have not run your case)? It might be easier to help you if you describe your problem in more details.
haakon is offline   Reply With Quote

Old   May 16, 2013, 04:56
Default
  #5
New Member
 
Deutschland
Join Date: May 2013
Posts: 5
Rep Power: 3
Simon_A is on a distinguished road
Sorry for the non-explicit wording. "Bad quality" in this case refers not to any checkMesh results or anything else related to the final mesh and its geometric properties.

What I meant is the general quality of the mesh in terms of cell quantity necessary for that test case.

It takes hours to create the 3D mesh with all the useless cells along the surface in the 3rd dimension, and finally I can only use 100000 out of 20 Mio. cells.

Changing the depth of the initial mesh did not significantly change the number of cells on the stl-surface.
Simon_A is offline   Reply With Quote

Old   May 27, 2013, 12:48
Default snap
  #6
Member
 
Join Date: Oct 2012
Posts: 47
Rep Power: 4
sh.d is on a distinguished road
hello
i want to mesh a 2d airfoil but not span it
can any one help me?
sh.d is offline   Reply With Quote

Old   May 27, 2013, 12:56
Default snap
  #7
Member
 
Join Date: Oct 2012
Posts: 47
Rep Power: 4
sh.d is on a distinguished road
the following is the my test case
Attached Files
File Type: gz aerofoil.tar.gz (11.2 KB, 32 views)
sh.d is offline   Reply With Quote

Old   August 12, 2013, 10:07
Default snappy
  #8
Member
 
Ilya
Join Date: Dec 2011
Location: Russia
Posts: 65
Blog Entries: 35
Rep Power: 5
skeptik is on a distinguished road
Quote:
Originally Posted by Simon_A View Post
short description:
Snappy meshes in 3rd dimension and consumes high computational power, but after extrudeMesh, the mesh quality is low.
I've obtained quite good mesh in 2D. It was so hard and i spent a lot of time, but at the end i've got a good mesh.

Sadly i still have problems with tail zone and prism layers there. See it here.

1.jpg
3.jpg
__________________
practice makes perfect
skeptik is offline   Reply With Quote

Old   August 13, 2013, 04:46
Default
  #9
New Member
 
Deutschland
Join Date: May 2013
Posts: 5
Rep Power: 3
Simon_A is on a distinguished road
hello ilya,

it is difficult to get rid of the collapsing layers at the trailing edge, actually, the only thing to make it less bad is to set a refinement box at the trailing edge with the same size as your layers are.

The layers are usually growing with an expansion ratio, and there is no way to set the in the refinement box, it is all linear there.

good luck
skeptik likes this.
Simon_A is offline   Reply With Quote

Old   August 13, 2013, 05:35
Default
  #10
Member
 
Ilya
Join Date: Dec 2011
Location: Russia
Posts: 65
Blog Entries: 35
Rep Power: 5
skeptik is on a distinguished road
Quote:
Originally Posted by Simon_A View Post
actually, the only thing to make it less bad is to set a refinement box at the trailing edge with the same size as your layers are.
good trick!
i don't ever think about it. Thanks!
__________________
practice makes perfect
skeptik is offline   Reply With Quote

Old   September 12, 2013, 00:54
Default
  #11
New Member
 
QuocThien
Join Date: Apr 2013
Posts: 8
Rep Power: 3
neiht is on a distinguished road
trailing edge has the big feature angle so to solve this problem i think u need to increase limited feature angle
neiht is offline   Reply With Quote

Old   September 12, 2013, 05:30
Default
  #12
Member
 
Ilya
Join Date: Dec 2011
Location: Russia
Posts: 65
Blog Entries: 35
Rep Power: 5
skeptik is on a distinguished road
Quote:
Originally Posted by neiht View Post
trailing edge has the big feature angle so to solve this problem i think u need to increase limited feature angle
of course feature angle has influence on meshing near tail. but not for this case, i think.
__________________
practice makes perfect
skeptik is offline   Reply With Quote

Old   October 5, 2014, 03:09
Default Airfoil mesh with only square blocks
  #13
New Member
 
Srsh
Join Date: Oct 2014
Posts: 5
Rep Power: 2
blackgalaxy is on a distinguished road
Hello

Actually I am new to OpenFoam. I generate a mesh for the airfoil same as OpenFoam tutorial. But I want to have full face match cubic mesh instead of triangles. As you can see from the airfoil picture there are triangles in the grid which I want them to eliminate and have something like second picture (cubic mesh). Can someone guide me to how to get rid of triangles mesh? What feature in snappyhexmesh I should hide to have only square blocks.
Thanks
Attached Images
File Type: jpg airfoil.jpg (66.8 KB, 28 views)
File Type: jpg Cube mesh.jpg (73.2 KB, 19 views)
blackgalaxy is offline   Reply With Quote

Old   October 6, 2014, 03:38
Default
  #14
Member
 
Ilya
Join Date: Dec 2011
Location: Russia
Posts: 65
Blog Entries: 35
Rep Power: 5
skeptik is on a distinguished road
Quote:
Originally Posted by blackgalaxy View Post
Hello

Actually I am new to OpenFoam. I generate a mesh for the airfoil same as OpenFoam tutorial. But I want to have full face match cubic mesh instead of triangles. As you can see from the airfoil picture there are triangles in the grid which I want them to eliminate and have something like second picture (cubic mesh). Can someone guide me to how to get rid of triangles mesh? What feature in snappyhexmesh I should hide to have only square blocks.
Thanks
Not for shappyHexMesh. If you want pure hex mesh use blockMesh.
blackgalaxy likes this.
__________________
practice makes perfect
skeptik is offline   Reply With Quote

Old   October 6, 2014, 10:55
Default
  #15
New Member
 
Srsh
Join Date: Oct 2014
Posts: 5
Rep Power: 2
blackgalaxy is on a distinguished road
Quote:
Originally Posted by skeptik View Post
Not for shappyHexMesh. If you want pure hex mesh use blockMesh.
Hello ilya,
Thank you so much for your answer. Would you please help me how can I produce multi level of refinement of quadrilateral mesh with blockMesh? Is there any tutorials for making multi level of refinement with blockMesh? I greatly appreciate your help. Thanks
blackgalaxy is offline   Reply With Quote

Old   October 18, 2014, 14:10
Default
  #16
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 7,514
Blog Entries: 33
Rep Power: 74
wyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the rough
Greetings to all!

@Srsh: I hope you don't mind, I'll quote a question you sent me via private message, with a question very similar to the posts above. In addition, I'll try to answer some of the questions above.

I've trimmed a bit the message, to get to the bulk of the question:
Quote:
Originally Posted by blackgalaxy
I am trying to generate simple test case with SHM to generate quad grids. As I understand SHM can't make only quad mesh. so I really appreciated if you could answer these two question:
Do you think with making the castellated mesh, I mean the first step of SHM mesh generation, I can produce quad mesh?
Also do you think it is possible to change the source code of snappyHexmesh to get the quad mesh out of it?
Thank you so much for your time and consideration.


Actually, I'll start with your first post: there is a misconception of the mesh you're seeing in ParaView. Have a look at this FAQ entry: http://openfoamwiki.net/index.php/FA...is_in_ParaView - there you'll see how to see the real mesh and not the one you're seeing. Because the mesh you're seeing already has decomposed the more complex cells down to tetrahedral/prisms and in that FAQ is explained how to see the original cells.

Regarding blockMesh, check this page: http://openfoamwiki.net/index.php/BlockMesh
Regarding snappyHexMesh: http://openfoamwiki.net/index.php/SnappyHexMesh

Now, as for the questions in the private message: it's very tricky to do such a mesh with snappyHexMesh. This mesher is essentially what I call a chiseller: it will chisel the initial base+refined mesh onto the geometry, therefore it might end up having to deform some cells more than it might be acceptable.

I suggest you go ask Daniel Wei for a copy of the Enosh mesher: Enosh: A New Structured Mesh Generator - that mesher allegedly was specifically designed to assist in creating better meshes for airfoils.

Best regards,
Bruno
blackgalaxy likes this.
wyldckat is offline   Reply With Quote

Old   October 21, 2014, 13:20
Default
  #17
New Member
 
Srsh
Join Date: Oct 2014
Posts: 5
Rep Power: 2
blackgalaxy is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Greetings to all!

@Srsh: I hope you don't mind, I'll quote a question you sent me via private message, with a question very similar to the posts above. In addition, I'll try to answer some of the questions above.

I've trimmed a bit the message, to get to the bulk of the question:


Actually, I'll start with your first post: there is a misconception of the mesh you're seeing in ParaView. Have a look at this FAQ entry: http://openfoamwiki.net/index.php/FA...is_in_ParaView - there you'll see how to see the real mesh and not the one you're seeing. Because the mesh you're seeing already has decomposed the more complex cells down to tetrahedral/prisms and in that FAQ is explained how to see the original cells.

Regarding blockMesh, check this page: http://openfoamwiki.net/index.php/BlockMesh
Regarding snappyHexMesh: http://openfoamwiki.net/index.php/SnappyHexMesh

Now, as for the questions in the private message: it's very tricky to do such a mesh with snappyHexMesh. This mesher is essentially what I call a chiseller: it will chisel the initial base+refined mesh onto the geometry, therefore it might end up having to deform some cells more than it might be acceptable.

I suggest you go ask Daniel Wei for a copy of the Enosh mesher: Enosh: A New Structured Mesh Generator - that mesher allegedly was specifically designed to assist in creating better meshes for airfoils.

Best regards,
Bruno
Hello Bruno,
Thank you so much for your kind response. That was really helpful. I was wondering how can I extract these meshes from OpenFoam. I am trying to export the mesh to the plot3D format but apparently OpenFoam doesn't have this option. I used writeMeshObj command to export mesh but it seems it doesn't help. Would you please let me know if there is any way to transfer grid to structural format like plot3D. Thank you again.

Best Regards,
Srsh
blackgalaxy is offline   Reply With Quote

Old   October 21, 2014, 14:15
Default
  #18
Senior Member
 
linnemann's Avatar
 
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 441
Rep Power: 13
linnemann will become famous soon enough
Hello

Have you tried

http://hvirvel.dk/airfoilmesher/
blackgalaxy likes this.
__________________
Linnemann

PS. I do not do personal support, so please post in the forums.
linnemann is offline   Reply With Quote

Old   October 27, 2014, 13:46
Default
  #19
New Member
 
Srsh
Join Date: Oct 2014
Posts: 5
Rep Power: 2
blackgalaxy is on a distinguished road
Quote:
Originally Posted by linnemann View Post
Hello Niels,

Thank you for your concern. Actually one of my test cases was working on the airfoil. I choose airfoil to see if I could generate quad mesh with SHM. I have to generate grid for several geometries which are different from airfoil.
blackgalaxy is offline   Reply With Quote

Old   October 27, 2014, 17:39
Default
  #20
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 7,514
Blog Entries: 33
Rep Power: 74
wyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the rough
Hi Srsh,

Quote:
Originally Posted by blackgalaxy View Post
I am trying to export the mesh to the plot3D format but apparently OpenFoam doesn't have this option.
AFAIK, there is no easy way to do this. You'll have to create your own utility to perform this.
There is a utility named plot3dToFoam, which does the opposite of what you're looking for. The source code is located at the path indicated by the following command:
Code:
echo $FOAM_UTILITIES/mesh/conversion/plot3dToFoam
Another utility that you can use as a basis for creating such a new conversion utility is star4ToFoam, whose source code is in the same parent folder as "plot3dToFoam".

Good luck! Best regards,
Bruno
blackgalaxy likes this.
wyldckat is offline   Reply With Quote

Reply

Tags
meshing a 2d, snappyhexmesh 2d

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[ICEM] Tetra mesh quality before and after prism layer Chander ANSYS Meshing & Geometry 0 December 25, 2011 23:04
2d irregular grid Remy Main CFD Forum 1 December 22, 2008 05:49
Free surface boudary conditions with SOLA-VOF Fan Main CFD Forum 10 September 9, 2006 13:24
How to control Minximum mesh space? hung FLUENT 7 April 18, 2005 10:38
fluid flow fundas ram Main CFD Forum 5 June 17, 2000 22:31


All times are GMT -4. The time now is 07:34.