CFD Online URL
[Sponsors]
Home > Forums > OpenFOAM Native Meshers: blockMesh

Help could anyone post a simple cylinder mesh

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

Like Tree4Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   February 16, 2012, 20:00
Default
  #21
New Member
 
mo houssami
Join Date: May 2011
Posts: 11
Rep Power: 5
mo.houssami is on a distinguished road
hi all,

I took your examples and try to adapt it to my case, where i only have to make a simple cylinder that i need to mesh inside as regularly as possible.

the first solution proposed doesn't work on my version of openFOAM, but the others do but its a bit tricky, since i'm still learning.

If someone has an example of what i need, please post it.

Anyway thank you very much, i learned a lot from this discussion.
mo.houssami is offline   Reply With Quote

Old   February 20, 2012, 17:34
Default
  #22
New Member
 
mo houssami
Join Date: May 2011
Posts: 11
Rep Power: 5
mo.houssami is on a distinguished road
it's ok, i did it !
mo.houssami is offline   Reply With Quote

Old   April 23, 2012, 04:21
Default
  #23
Member
 
anonymous
Join Date: Mar 2012
Posts: 45
Rep Power: 4
libia87 is on a distinguished road
Quote:
Originally Posted by mo.houssami View Post
hi all,

I took your examples and try to adapt it to my case, where i only have to make a simple cylinder that i need to mesh inside as regularly as possible.

the first solution proposed doesn't work on my version of openFOAM, but the others do but its a bit tricky, since i'm still learning.

If someone has an example of what i need, please post it.

Anyway thank you very much, i learned a lot from this discussion.

I have the same problem!
Did you earned the mesh?? I'm new with the OPenFOAM and for me it's difficult to understand how it works the mesh generation.
Thanks!
libia87 is offline   Reply With Quote

Old   April 23, 2012, 07:43
Default
  #24
kid
Senior Member
 
cfdkid
Join Date: Mar 2009
Posts: 133
Rep Power: 7
kid is on a distinguished road
@libia87

OpenFOAM mesh how does it work?

This is a broad question, and really depends on the problem you are solving. So, Plz discribe your problem.

Note:
OpenFOAM mesh making module has two major blocks.
1. blockMesh // this generate basic structured mesh for domain to be considered.
2. snappyHexMesh // This generates fine mesh for boundary ex a CAR or Cylinder.

Also consider a cylinder placed in regular domain. If you want to mesh inside the cylnder domain Use following Patch in snappyHexMeshDict::castellatedMeshControls

refinementSurfaces
{
myCylinder // user defined cylinder
{
level (2 2);
faceZone cylinder;
cellZone cylinder;
zoneInside true; // inside or ZoneOutside for outer mesh
}
}

.
Also it is best you state your model. It will be much easier for us.

regards
CFDkid
kid is offline   Reply With Quote

Old   April 24, 2012, 10:05
Default
  #25
Senior Member
 
Elvis
Join Date: Mar 2009
Location: Sindelfingen, Germany
Posts: 541
Blog Entries: 4
Rep Power: 12
elvis is on a distinguished road
Hi,

blockmesh and snappyhexmesh are the two meshing programs that are included into OpemFoam. If you install Engrid you have another opensource mesher. With pyFoamDisplayBlockMesh.py an external program (you could visualize your blockmesh) => http://openfoamwiki.net/index.php/Co...m#Installation

There are commercial mesher that can export directly as OF (ANSA, Hypermesh, Pointwise, CastNet)
elvis is offline   Reply With Quote

Old   July 24, 2012, 10:55
Default
  #26
New Member
 
P.M.Bronow
Join Date: Nov 2009
Location: Poland/Germany
Posts: 14
Rep Power: 7
PrzemekPL is on a distinguished road
Hi,
has anyone tried to run script provided by Rasmus with the OF 2.0.1?

I get an error when I try to run the blockMesh on blockMeshDict created after execution of the m4 script.

blockMeshDict can be seen below. This is what I get after executing Rasmus's script:

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.0.1 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //


convertToMeters 0.001;

//5 mm column diameter
//10 cm length



//Width of middle square section




//how many cells in the square section
//how many cells from square section to perimeter
// how many cells from top to bottom

vertices
(
( 1.25 0.0 1.25) // Vertex fiveoclocksqb = 0
(-1.25 0.0 1.25) // Vertex sevenoclocksqb = 1
(-1.25 0.0 -1.25) // Vertex elevenoclocksqb = 2
( 1.25 0.0 -1.25) // Vertex oneoclocksqb = 3

( 1.76776695455285 0.0 1.76776695137989) // Vertex fiveoclockcb = 4
(-1.76776695455285 0.0 1.76776695137989) // Vertex sevenoclockcb = 5
(-1.76776695455285 0.0 -1.76776695137989) // Vertex elevenoclockcb = 6
( 1.76776695455285 0.0 -1.76776695137989) // Vertex oneoclockcb = 7

( 1.25 100 1.25) // Vertex fiveoclocksqt = 8
(-1.25 100 1.25) // Vertex sevenoclocksqt = 9
(-1.25 100 -1.25) // Vertex elevenoclocksqt = 10
( 1.25 100 -1.25) // Vertex oneoclocksqt = 11

( 1.76776695455285 100 1.76776695137989) // Vertex fiveoclockct = 12
(-1.76776695455285 100 1.76776695137989) // Vertex sevenoclockct = 13
(-1.76776695455285 100 -1.76776695137989) // Vertex elevenoclockct = 14
( 1.76776695455285 100 -1.76776695137989) // Vertex oneoclockct = 15
);

blocks
(
//square block
hex (
1 0 3 2
9 8 11 10
)
(3 3 10)
simpleGrading (1 1 1)

//slice1
hex (
5 4 0 1
13 12 8 9
)
(3 3 10)
simpleGrading (1 1 1)

//slice2
hex (
1 2 6 5
9 10 14 13
)
(3 3 10)
simpleGrading (1 1 1)

//slice3
hex (
2 3 7 6
10 11 15 14
)
(3 3 10)
simpleGrading (1 1 1)

//slice4
hex (
3 0 4 7
11 8 12 15
)
(3 3 10)
simpleGrading (1 1 1)

);


//create the quarter circles
edges
(
arc 4 5 (0.0 0.0 2.5)
arc 5 6 (-2.5 0.0 0.0)
arc 6 7 (0.0 0.0 -2.5)
arc 7 4 (2.5 0.0 0.0)

arc 12 13 (0.0 100 2.5)
arc 13 14 (-2.5 100 0.0)
arc 14 15 (0.0 100 -2.5)
arc 15 12 (2.5 100 0.0)

);

patches
(
patch outlet
(
(2 4(0 3 2 1))
(2 4(0 4 7 3))
(2 4(4 0 1 5))
(2 4(1 2 6 5))
(2 4(3 7 6 2))
)

patch inlet
(
(2 4(8 11 10 9))
(2 4(8 12 15 11))
(2 4(12 8 9 13))
(2 4(9 10 14 13))
(2 4(11 15 14 10))
)

wall walls
(
(2 4(5 4 12 13))
(2 4(5 13 14 6))
(2 4(6 14 15 7))
(2 4(7 15 12 4))
)

);
mergePatchPairs
(
);
PrzemekPL is offline   Reply With Quote

Old   July 28, 2012, 10:55
Default
  #27
Member
 
Adam
Join Date: Jun 2011
Posts: 30
Rep Power: 5
Smed is on a distinguished road
PrzemekPL,

I believe it has to do with a change in the way that patches are now defined. Rename the attached version to .m4 and use the same method that hemph described:
Quote:
m4 cylinderMesh.m4 > blockMeshDict
(The attachment tool rejected the file when it was named .m4, sorry)

-Smed
Attached Files
File Type: txt cylinderMesh.txt (4.8 KB, 98 views)
Smed is offline   Reply With Quote

Old   July 30, 2012, 04:36
Default
  #28
New Member
 
P.M.Bronow
Join Date: Nov 2009
Location: Poland/Germany
Posts: 14
Rep Power: 7
PrzemekPL is on a distinguished road
Smed,

you were right. There was an issue with the patches definition, i.e. :

(2 4(fiveoclocksqb oneoclocksqb elevenoclocksqb sevenoclocksqb))

Now, everything works,
thanks!
PrzemekPL is offline   Reply With Quote

Old   December 12, 2012, 11:59
Default
  #29
New Member
 
Burak
Join Date: Nov 2012
Posts: 5
Rep Power: 4
Burak_1984 is on a distinguished road
Hello

Here is my small contrubution to the forum.I modified the cylindermesher.m4 file to have the Z direction passing through the middle.

I wanted to have arced inlet conditions for the turbinsiting tutorial so I modified the skript somebodyposted in this thread(Thanks!).

So maybe somebody needs this version also.Just rename the file to cylindermesher.m4 and use it(You have to have the m4 preprocessor installed).I hope this helps.

My Regards
Burak
Attached Files
File Type: txt cylinderMesh.txt (5.9 KB, 67 views)
Burak_1984 is offline   Reply With Quote

Old   May 7, 2013, 12:17
Default
  #30
New Member
 
Álex de Sousa Vieira
Join Date: Apr 2013
Posts: 2
Rep Power: 0
ÁlexVieira is on a distinguished road
Quote:
Originally Posted by francois View Post
Hi all,

I'm starting a new project which deals with a Large Eddy Simulation of an axisymmetric jet on a rotating and heated plate. The sketch of the computational domain is shown on the present figure.



The jet nozzle is circular and the jet is impinging on an heated rotor (in red on the attached picture).

I have read some posts on cylinder mesh and was wondering about the best strategy for my configuration:

- use the cylinderMesh.m4 script-file to decompose the cylinder with a square like on this picture:



- use a wedge type meshing strategy like on this picture:



For the later case, I was not able to find some useful info to make a 3D mesh with wedge type cells with blockmesh.

Is it possible in OpenFOAM1.3 or this feature is only available for pseudo 3D domain (one cell in the third direction) ?

Thanks for your help or suggestions.
Francois


I'm trying to do basically the same mesh from this problem but using openfoam 2.1.1 and all the examples posted aren't working.
Using the mesh generated from the file posted from Burak_1984 i get the blockMesh but when i try to see it on paraFoam the following error appears:



--> FOAM FATAL IO ERROR:
keyword outlet is undefined in dictionary "/home/lest/Downloads/C1/0/p::boundaryField"

file: /home/lest/Downloads/C1/0/p::boundaryField from line 25 to line 35.

From function dictionary::subDict(const word& keyword) const
in file db/dictionary/dictionary.C at line 461.

FOAM exiting




Can anyone help me?

Last edited by ÁlexVieira; May 7, 2013 at 13:02.
ÁlexVieira is offline   Reply With Quote

Old   September 13, 2013, 05:34
Default
  #31
New Member
 
Benjamin van den Akker
Join Date: Jun 2013
Posts: 1
Rep Power: 0
BenjAkker is on a distinguished road
Quote:
Originally Posted by francois View Post
(...)

- use a wedge type meshing strategy like on this picture:



For the later case, I was not able to find some useful info to make a 3D mesh with wedge type cells with blockmesh.

Is it possible in OpenFOAM1.3 or this feature is only available for pseudo 3D domain (one cell in the third direction) ?

Thanks for your help or suggestions.
Francois
I attached a script that creates such a mesh (needs m4 like the other scripts posted in this thread). It has generated useful results in my own simulations. However, the aspect ratio of the cells on the axis worries me. I suggest using snappyHexMesh instead, as I intend to for my own work.

Quote:
Originally Posted by ÁlexVieira View Post
Using the mesh generated from the file posted from Burak_1984 i get the blockMesh but when i try to see it on paraFoam the following error appears:

--> FOAM FATAL IO ERROR:
keyword outlet is undefined in dictionary "/home/lest/Downloads/C1/0/p::boundaryField"

file: /home/lest/Downloads/C1/0/p::boundaryField from line 25 to line 35.

From function dictionary::subDict(const word& keyword) const
in file db/dictionary/dictionary.C at line 461.

FOAM exiting

Can anyone help me?
This is probably too late to be useful to you directly, but I'll answer it for the benefit of other readers. ParaView is telling you that it can't find the boundary condition for the 'outlet' patch. The '0' folder should specify this for each field. If you don't know how to do this, I suggest that you look at a few tutorials and then design a simple study case with a self-made mesh and corresponding boundary conditions, to learn the basics.
Attached Files
File Type: txt cylinder_mesh.txt (2.4 KB, 56 views)
BenjAkker 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
3-d mesh gambit (cylinder within a cylinder) Jason ANSYS Meshing & Geometry 19 June 26, 2013 11:00
Cylinder mesh help to fix it guilherme OpenFOAM Native Meshers: blockMesh 2 December 6, 2010 11:44
Simple post-processing question: velcoity profile Svetlana Nosedung FLUENT 1 May 8, 2006 15:35
Recommend software for simple post processing zonexo Main CFD Forum 5 March 4, 2006 04:20
simple post-processing question Jimmy FLUENT 0 January 23, 2006 08:42


All times are GMT -4. The time now is 01:55.