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

[snappyHexMesh] snappyHexMesh - 2D Cylinder Problems

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 5, 2011, 13:16
Default snappyHexMesh - 2D Cylinder Problems
  #1
Member
 
Logan Page
Join Date: Sep 2010
Posts: 38
Rep Power: 16
Logan Page is on a distinguished road
Hi All

Ive got a problem that hopefully someone can help with.
Im trying to mesh a series of large and small cylinders to be cooled by natural convection.
It is strictly a 2D problem and as you know sHM refines the mesh in all 3 directions creating additional elements in the z-direction.

I have read the post reply by Ziad (2D Cylinder mesh problems with Snappy ) which has also been uploaded to wiki (Main ContribExamples/2DsHM ).
This post was very informative and helpfully and I was able to easily redo this for the "wingMotion_snappyHexMesh" tutorial.

However when I try to adapt this the my problem im getting garbage from the extrude step. (The empty space where the cylinders should be is being filled)


After further work, I've figured out the problem as follows:

Im getting jagged edges on the front and back patched where the cylinder edges join, which kind of creates a flange inwards from the cylinder edge as shown in the second attached figure. The problem is that this flange is part of the front patch and similarly the back patch.

When extruding the front patch the jagged faces extrude inward into the cylinder .

I've looked into the snapEdge utility from Niklas, but so far I've had no luck with fixing this problem.

Ive attached the "blockMeshDict" ; "snappyHexMeshDict" and "Cyl1.obj" files

Any advise would be appreciated !

Thanks

Logan
Attached Images
File Type: png Front.png (4.1 KB, 146 views)
File Type: png Rear_Edge_Zoom.png (7.0 KB, 164 views)
Attached Files
File Type: gz blockMeshDict.tar.gz (527 Bytes, 38 views)
File Type: gz Cyl1.obj.tar.gz (5.7 KB, 39 views)
File Type: gz snappyHexMeshDict.tar.gz (3.4 KB, 49 views)

Last edited by Logan Page; March 5, 2011 at 18:45. Reason: more info into the problem
Logan Page is offline   Reply With Quote

Old   March 6, 2011, 16:06
Default
  #2
Senior Member
 
Join Date: Mar 2009
Location: My oyster
Posts: 124
Rep Power: 17
ziad is on a distinguished road
Hi Logan,

I took a look at your case and I get the jagged edges as well. Not sure how to get rid of those. Maybe use edges (*.eMesh files) like the igloo tutorial, or create *.obj surfaces to represent the front and back? Maybe even one *.obj surface to represent the entire front-cyl1-back group with edges for the cylinder surface. After all you only need one plane right.

Mind you I stopped using sHM and co. myself. I find it to be still an alpha package. Went back to Pointwise and Gridgen which export directly into OpenFOAM format.

Cheers,
Ziad
ziad is offline   Reply With Quote

Old   March 6, 2011, 16:27
Default
  #3
Member
 
Logan Page
Join Date: Sep 2010
Posts: 38
Rep Power: 16
Logan Page is on a distinguished road
Hi Ziad

Thanks for looking into that for me and for the feedback.

Yes I only need the one plane.
Even with creating a *.obj file I get the same result.
Didn't try adding a *.eMesh file for additional edge refinement tho.

I did however manage to get a decent looking mesh by doing the following (for thos that have a similar problem):

1) blockMesh
2) snappyHexMesh -overwrite
3) flattenMesh (this got rid of the jagged edge and most of the elements in the z-direction, but if the refinement around the surface isn't fine enough then it causes some elements to be added to the cylinder wall patch i.e. gives it a slight thickness)
4) extrudeMesh

this gave a reasonable looking 2D mesh for my situation.


Im also not so happy with sHM, I find it to be very resource hungry and slow for getting this simple 2D scenario.

You wouldn't happen to know off-hand of any free linux based meshing software that both exports directly to OpenFOAM and can be u

Last edited by Logan Page; March 6, 2011 at 16:39. Reason: bad comment
Logan Page is offline   Reply With Quote

Old   March 6, 2011, 16:36
Default
  #4
Senior Member
 
Join Date: Mar 2009
Location: My oyster
Posts: 124
Rep Power: 17
ziad is on a distinguished road
Hey whatever gets the job done! Just make sure you run checkMesh before using your mesh.

I use Pointwise and Gridgen. You can find more info about them at http://www.pointwise.com
Pointwise is easier to use than Gridgen, which in turn has more features. You can get a demo license for free and use it anyway you want for a month. Your mesh would take 30 minutes to do. I think they have cylinders meshed in the tutorials as well.
ziad is offline   Reply With Quote

Old   May 27, 2013, 13:07
Default snap
  #5
Member
 
Join Date: Oct 2012
Posts: 47
Rep Power: 14
sh.d is on a distinguished road
Hello Ziad
I want to mesh a 2d airfoil in snappy but it cant snap the airfoil
can you help me please?
Attached Files
File Type: gz aerofoil.tar.gz (11.2 KB, 5 views)
sh.d is offline   Reply With Quote

Reply

Tags
2d meshing, smh, snappyhexmesh


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 on slice of cylinder Loekatoni OpenFOAM Meshing & Mesh Conversion 2 November 14, 2018 06:53
URANS 2D Square Cylinder Problems and_user OpenFOAM Running, Solving & CFD 5 May 24, 2017 22:01
[blockMesh] Problems meshing a half of a cylinder with blockMesh zfaraday OpenFOAM Meshing & Mesh Conversion 2 December 11, 2013 04:41
[snappyHexMesh] problems with snappyHexMesh StSchiff OpenFOAM Meshing & Mesh Conversion 7 August 9, 2010 12:11
Cylinder head port problems Jon Reynolds FLUENT 0 March 23, 2006 09:38


All times are GMT -4. The time now is 13:06.