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

Meshing a circle (cylinder)

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 27, 2010, 16:03
Default Meshing a circle (cylinder)
  #1
Member
 
Join Date: Mar 2010
Posts: 31
Rep Power: 16
bunni is on a distinguished road
Hi all,

I apologize for a question which has probably been answered before, but in my search here, I wasn't able to find the answer. I want to do a simulation which has is a cylinder with an outlet to atmosphere in the centre of one of the circles, and some nozzles jetting in liquid along the cylinder. A similar example was done for a wedge-shape in multiphase/interFoam/nozzleFlow2D. I thought I'd try with a quarter-circle. My problem is that I can't quite make a (2-d) mesh where the elements are not either wedges or rectangles. So that, on the circular part, if I want (say) 150 points on the outside of my circle, I end up with 150 pts at the center of my cylindrical bit.

Clearly, I'm new to meshing with openfoam, and have worked through the tutorials. I haven't found an example in the tutorial section. The examples I've found have been of meshes with the cylindrical bit cut out, and therefore a (logically) rectangular mesh.

I've attached the blockMeshDict (*gz) of the mesh I did make. It's clear that near the center I've got way too many wedge-shaped elements, but I don't know how to make the proper number of elements near the edge of my cylinder.

Any ideas and pointers to other examples greatly appreciated. Thanks
Attached Files
File Type: gz blockMeshDict.gz (1.1 KB, 261 views)
bunni is offline   Reply With Quote

Old   May 27, 2010, 16:27
Default
  #2
Member
 
Fran
Join Date: Sep 2009
Location: Buenos Aires
Posts: 37
Rep Power: 17
lfbarcelo is on a distinguished road
I am not sure if I understand what you are trying to do.

The mesh you uploaded is not a 2d mesh clearly. Why don't you try a 2d mesh consisting on a 5º wedge mesh with only one element width?. For doing this you must define front and back of the wedge as wedge type patches. (OpenFOAM understands that as an axisymmetric domain)

Check the UserGuide, page U-104, where it describes how to mesh a wedge.

Otherwise, If you want to work with a 3d mesh, you can't just mesh a quarter-tank, you should work with half a tank and define the symmetry wall as type symmetryPlane.

Doing this mesh with blockMesh will always generate the problem of high number of elements (probably highly skewed elements) in the axis, I recomend you try working with snappyHexMesh for this kind of meshes.
lfbarcelo is offline   Reply With Quote

Old   May 27, 2010, 16:33
Default
  #3
Member
 
Join Date: Mar 2010
Posts: 31
Rep Power: 16
bunni is on a distinguished road
I don't want a 2-d mesh, I want a 3-d cylinder, or quarter cylinder. I've already done wedges, but for my purposes it didn't work. A wedge is 5', thus giving 72-fold symmetry. I want much less symmetry than that. I'll need to do quarter/half/full circle to capture the symmetry (or lack!). The tutorial with snappy hex mesh also has circles cut *out* of the mesh, it also requires files to be in STL format. I was presuming that there might be an alternative to learning two other meshing systems, (stl, and snappyhexmesh)
bunni is offline   Reply With Quote

Old   May 27, 2010, 16:47
Default
  #4
Member
 
Fran
Join Date: Sep 2009
Location: Buenos Aires
Posts: 37
Rep Power: 17
lfbarcelo is on a distinguished road
I strongly recommend you start working with snappyHexMesh, i'm working with tanks nowadays and snappy really suits my needs. You can try to fool around with various blocks in blockMesh in order to get a fair mesh but you will always find that same problem in the axis because blockMesh puts out an structured mesh.

STL meshing is quite simple with any cad software, and any questions about snappy, just ask, we've been working with it for several months now. You can also try thetraedral mesh generators such as netgen.

best regards.
lfbarcelo is offline   Reply With Quote

Old   May 27, 2010, 17:07
Default
  #5
Member
 
Fran
Join Date: Sep 2009
Location: Buenos Aires
Posts: 37
Rep Power: 17
lfbarcelo is on a distinguished road
perhaps you can try this kind of block distribution in blockMesh
Attached Images
File Type: jpg mesh.jpg (24.1 KB, 709 views)
lfbarcelo is offline   Reply With Quote

Old   May 27, 2010, 18:20
Default thanks
  #6
Member
 
Join Date: Mar 2010
Posts: 31
Rep Power: 16
bunni is on a distinguished road
I'll try the geometry you've demonstrated, it looks like it might do the trick.As for meshers, I've contacted GridGen for a quote, but they haven't got back to me. We don't have any CAD software on-site. The other CFD person wrote his own meshers/cfd code, but he's left .
bunni is offline   Reply With Quote

Old   May 27, 2010, 21:49
Default
  #7
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings to all,

Might I suggest Discretizer: http://www.discretizer.org/
It has a good user interface and hooks up with various meshers. Personally I haven't used it yet, but it seems pretty good And I believe it allows to draw the geometry directly in it, but I'm not sure of it either

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   May 28, 2010, 05:06
Default
  #8
Senior Member
 
Cedric DUPRAT
Join Date: Mar 2009
Location: Nantes, France
Posts: 195
Rep Power: 17
cedric_duprat is on a distinguished road
Hi Bunni,

If you feel more confortable with blockMesh, you can have a look there:

http://openfoamwiki.net/index.php/Si...nical_diffuser

You will find an axisymetric diffuser test case (with or without pipe) and its mesh using a O-grid blockMesh (as lfbarcelo advice). The mesh as been parametrized using m4.
Thanks to the Sig Turbomachinery, you can get the mesh and play with it easily.

I hope this will help you

PS: same thing here http://openfoamwiki.net/index.php/Si...rupt_Expansion thank to Hakan Nilsson
cedric_duprat is offline   Reply With Quote

Old   May 28, 2010, 08:43
Default
  #9
Member
 
Costas K
Join Date: Nov 2009
Location: UK
Posts: 51
Rep Power: 17
thekay is on a distinguished road
Send a message via ICQ to thekay Send a message via MSN to thekay
What lfbarcelo is what I would recommend as well. It is pretty much the standard with cylindrical meshes and provides you with flexibility. You can have for instance, very fine mesh inside the square and move on with a less fine mesh to the edges that reach the arcs.
thekay is offline   Reply With Quote

Old   May 28, 2010, 16:11
Default thanks
  #10
Member
 
Join Date: Mar 2010
Posts: 31
Rep Power: 16
bunni is on a distinguished road
thanks for your feedback. As a first approach to the problem, I think it's good. I also like that you can vary the density of the mesh.

Last edited by bunni; May 28, 2010 at 17:14.
bunni is offline   Reply With Quote

Old   May 31, 2010, 09:13
Default
  #11
Senior Member
 
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,267
Blog Entries: 1
Rep Power: 25
nimasam is on a distinguished road
hi dears
i tried to use discretizer to model a cylinder or a pipe but its not as simple as it seems, any idea?
nimasam is offline   Reply With Quote

Old   May 31, 2010, 11:11
Default
  #12
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings nimasam,

Quote:
Originally Posted by nimasam View Post
hi dears
i tried to use discretizer to model a cylinder or a pipe but its not as simple as it seems, any idea?
I forgot to mention the thread for it The thread that is sort of dedicated to Discretizer is this one: Discretizer, a free mesh program for CFD
You can try there, since the developer himself can answer you

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Reply

Tags
meshing cylinder openfoam


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
[blockMesh] Meshing inside a cylinder so that the edges contain more cells than the center Bertrand OpenFOAM Meshing & Mesh Conversion 1 April 13, 2010 05:46
gambit meshing for the flow passing cylinder iilw1314 Main CFD Forum 5 April 11, 2010 20:28
Best Meshing scheme for Cylinder Nutrex Main CFD Forum 4 July 29, 2008 12:03
PB cylinder 3D meshing ALLARY Arnaud Siemens 0 December 12, 2007 12:16
doubt on meshing a cylinder FELIX JOE S FLUENT 13 July 27, 2005 09:06


All times are GMT -4. The time now is 19:59.