CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Native Meshers: blockMesh

mesh generation inside/around 3D cylinder

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

Reply
 
LinkBack Thread Tools Display Modes
Old   August 6, 2012, 19:57
Default mesh generation inside/around 3D cylinder
  #1
New Member
 
Join Date: Aug 2012
Posts: 14
Rep Power: 4
Cloudy1988 is on a distinguished road
Dear all,

I am a new user of openFOAM and I would like to learn how to generate mesh around 3D cylinder in native mesher in openFOAM

I tried the blockMesh method http://www.foamcfd.org/Nabla/guides/...Guidese12.html. But the cylinder does not have "cover", and it looks like a "hole" not a cylinder in the domain.
1. how should I mesh the top and bottom of the cylinder in the method above?
2. how should I describe the cylinder itself like the image below and place it in the middle of the domain ( not connected with the top and bottom of the domain).

3. I also tried cylinderToCell in Cellset, while the whole domain is generated by blockMesh so that the boundary of the cylinder is not smooth, is there any way solve this?

If possible, I prefer the mesh generated by the native mesher in openFOAM. Any answer will be appreciated.

Many thanks,
Cloudy
Cloudy1988 is offline   Reply With Quote

Old   August 7, 2012, 07:45
Default
  #2
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,251
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Greetings Cloudy and welcome to the forum.

There are several examples of cylinder meshes here in the forum, some of which are listed in this sub-forum: http://www.cfd-online.com/Forums/ope...ing-blockmesh/

Anyway, one such example is this one: 3-D Mesh in a cylinder

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   August 10, 2012, 08:49
Default
  #3
New Member
 
Join Date: Aug 2012
Posts: 14
Rep Power: 4
Cloudy1988 is on a distinguished road
Hi Bruno,

Thanks for you reply,
the 3-D Mesh in a cylinder describe a cylindrical domain, I would like to put the clyinder in a larger rectangular box while i dont know how to set the "face to face" mesh connection between the cylinder boundary and box.

I am reading the snappyHex mesh in the openFOAM guider, First he used a STL surface to describe the object bouondary but I didnt find how does he do that, is STL a native function in openFOAM? could you please attache me any tutorial for that?

Regards,
Cloudy
Cloudy1988 is offline   Reply With Quote

Old   August 10, 2012, 09:09
Default
  #4
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,251
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Greetings Cloudy,

There is something better than having to go around editing files. Use can use Blender with these two marvellous scripts:
Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   August 13, 2012, 15:05
Default
  #5
New Member
 
Join Date: Aug 2012
Posts: 14
Rep Power: 4
Cloudy1988 is on a distinguished road
Hi Bruno,

I downloaded blender and installed these two addons, and I also tried their example. While, after i import the examples and click the "write" button, there are some errors shown below:
Traceback (most recent call last):
File "/../../../../2.63/scripts/addons/swiftsnap/_init_.py", line 548, in execute os.makedirs(pathtrisurface)
File"....../2.63/python/lib/python3.2/os.py", line 152, in makedirs mkdir(name,mode)
OSError: [Errno 13] Permission denied: '/triSurface'
location:<unknown location>:-1

Any idea for these?

Regards,
Cloudy
Cloudy1988 is offline   Reply With Quote

Old   August 13, 2012, 15:52
Default
  #6
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,251
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Hi Cloudy,

Both instruction pages indicate that you need:
Quote:
Compatible Blender versions
v2.6x, with x<3.
Which means that you'll need Blender 2.60 or 2.61 or 2.62... all available here: http://download.blender.org/release/

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   August 14, 2012, 02:15
Default
  #7
Senior Member
 
Karl-Johan Nogenmyr
Join Date: Mar 2009
Location: Linköping
Posts: 252
Rep Power: 12
kalle is on a distinguished road
Like Bruno says, stick to the compatible Blender versions. However, in this case, judging from the error message, it seems you are trying to put your files in a location where you do not have full write permissions.

K
kalle is offline   Reply With Quote

Old   August 14, 2012, 05:31
Default
  #8
New Member
 
Join Date: Aug 2012
Posts: 14
Rep Power: 4
Cloudy1988 is on a distinguished road
Hi Bruno,

Thanks for your reply, I get the stl.file and locate it in trisurface. With command: blockMesh+snappyHexmesh -overwrite, I got the mesh for cylinder.

While the meshes around the cylinder are cut out, could I keep the mesh around the cylinder and remove the inner mesh instead?

Regards,
Cloudy
Cloudy1988 is offline   Reply With Quote

Old   August 14, 2012, 17:13
Default
  #9
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,251
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Hi Cloudy,

What you are looking for is this:
Quote:
Originally Posted by http://openfoamwiki.net/index.php/SwiftSnap
Set locationInMesh Sets the corresponding entry in snappyHexMeshDict to the coordinate of Blender's 3D cursor.
If you look at a "snappyHexMeshDict" file, you'll see comments like this one:
Quote:
Originally Posted by https://github.com/OpenFOAM/OpenFOAM-2.1.x/blob/master/tutorials/mesh/snappyHexMesh/flange/system/snappyHexMeshDict
// After refinement patches get added for all refinementSurfaces and
// all cells intersecting the surfaces get put into these patches. The
// section reachable from the locationInMesh is kept.
// NOTE: This point should never be on a face, always inside a cell, even
// after refinement.
// This is an outside point locationInMesh (-0.033 -0.033 0.0033);
locationInMesh (-9.23149e-05 -0.0025 -0.0025); // Inside point
Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   August 23, 2012, 09:35
Default
  #10
New Member
 
Join Date: Aug 2012
Posts: 14
Rep Power: 4
Cloudy1988 is on a distinguished road
Hi bruno,

I got some questions would like to ask you,

The first one, in snappyHexMesh tutorial (in OPENFOAM user guide), there are more cells around the car surface, which part in snappyhexDict is to achieve this?

Secondly, what does the "level" mean? for example,
refinementSurfaces
sphere.stl
{
level (2 2)
...
what are the real meaning of the numbers in the ()? any detailed explanation?

Finally, normally we need a blockMesh as a blackground mesh for snappyHex, for the cylinder case, if the blockMesh size is larger than the cylinder , the top/bottom surface generated is not smooth (https://sites.google.com/site/snappy...ightblock_.png)
while if i use small blockMesh , the surface of top/bottom is quite good (https://sites.google.com/site/snappy...mallblock_.png).
Since I need the background block as a water tank to test the forces on the cylinder, is that possible to use 2 blockMesh, one small block for generate cylinder and one for water tank? or could I use any utility like Cellset to "define" a small region in blockMesh as the background for cylinder ?

Many thanks,
Cloudy

Last edited by Cloudy1988; August 23, 2012 at 10:05.
Cloudy1988 is offline   Reply With Quote

Old   August 23, 2012, 14:13
Default
  #11
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,251
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
I've answered you here: some questions in SnappyHexMesh post #2

It would be nice if you didn't repeat the same questions in two separate threads. If you create a new one with basically the same question, edit your previous post indicating where you've moved your question to.
wyldckat is offline   Reply With Quote

Reply

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
ISAAC code mesh generation morteza08 Main CFD Forum 0 June 15, 2012 09:26
Ugly mesh around cylinder rks171 STAR-CCM+ 4 May 9, 2012 14:35
how to mesh a cylinder fixed in water tank lilinghan8 OpenFOAM 10 April 30, 2012 11:49
external flow with snappyHexMesh chelvistero OpenFOAM 11 January 15, 2010 20:43
rotating cylinder using sliding mesh Tim Daly FLUENT 1 November 10, 2008 00:02


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