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

[blockMesh] mesh generation inside/around 3D cylinder

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread 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: 13
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
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
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 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: http://www.cfd-online.com/Forums/ope...tml#post370876

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: 13
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
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
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 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: 13
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
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
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
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: 279
Rep Power: 21
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: 13
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
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
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
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: 13
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
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
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
I've answered you here: http://www.cfd-online.com/Forums/ope...tml#post378406 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


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
State of mesh generation Wandadars Main CFD Forum 3 January 5, 2017 12:51
Unstructrued O-type Mesh of a cylinder with icoFoam kindle OpenFOAM Running, Solving & CFD 1 December 2, 2016 11:45
[ICEM] Meshing inclined cylinder with PBC tetra mesh ICEM shashi_soman ANSYS Meshing & Geometry 0 September 26, 2015 18:27
Ugly mesh around cylinder rks171 STAR-CCM+ 4 May 9, 2012 14:35
rotating cylinder using sliding mesh Tim Daly FLUENT 1 November 9, 2008 23:02


All times are GMT -4. The time now is 05:12.