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

[blockMesh] could anyone post a simple cylinder mesh

Register Blogs Community New Posts Updated Threads Search

Like Tree16Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 19, 2006, 15:18
Default could anyone post a simple cylinder mesh
  #1
guilherme
Guest
 
Posts: n/a
hi, how do I do a cylinder with blockmesh? Is it necessary do a quarter of a cylinder and stablish simmetry plane in the lateral faces of it or exists a mean of make a entire cylinder? My cylinder is totally wrong I think.

Could anyone posts a simple mesh to I see?
  Reply With Quote

Old   October 19, 2006, 16:04
Default Hi! I don't have a blockMes
  #2
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Hi!

I don't have a blockMesh Handy, but it's actualy quite easy once you have the general idea: you've got to compose the cylinder of _five_ blocks: one at the center and 4 blocks "bolted" to that (let's call them N,E,S and W according to the side of the center block they're glued to) For instance the N block shares his S-side with the centre-block, E-side with block E, W-side with block W and the N-side is part of the outer boundary of the cylinder
nanavati and RGS like this.
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   October 20, 2006, 04:52
Default Hi Guilherme, I have a cylind
  #3
Senior Member
 
Rasmus Hemph
Join Date: Mar 2009
Location: Sweden
Posts: 108
Rep Power: 17
hemph is on a distinguished road
Hi Guilherme,
I have a cylinder-script file you could try. It does just what Bernhard suggests, and is easy to adapt to new number of cells/dimensions. To get a blockMeshDict file from it, do

m4 cylinderMesh.m4 > blockMeshDict

from a terminal window. If it doesn't work, you will need to install the m4-preprocessor.
//Rasmus
cylinderMesh.m4
greenleader, urcjh, Pirlu and 6 others like this.
hemph is offline   Reply With Quote

Old   October 23, 2006, 10:00
Default Thanks Rasmus The mesh work
  #4
guilherme
Guest
 
Posts: n/a
Thanks Rasmus

The mesh works fine.

Bye.
  Reply With Quote

Old   March 23, 2007, 11:57
Default Hi all, I'm starting a new
  #5
Senior Member
 
Francois Beaubert
Join Date: Mar 2009
Location: Lille, France
Posts: 147
Rep Power: 17
francois is on a distinguished road
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
francois is offline   Reply With Quote

Old   March 26, 2007, 11:04
Default Thanks Ville, As you sugges
  #6
Senior Member
 
Francois Beaubert
Join Date: Mar 2009
Location: Lille, France
Posts: 147
Rep Power: 17
francois is on a distinguished road
Thanks Ville,

As you suggested I will start with the with a 9 blocks mesh and play a bit with the cylinderMesh.m4 preprocessor script.

But I don't realy understand why I'll loose in the resolution with wedge blocks.

Anyway thanks a lot for your suggestions.
I will post my blockMeshDict file when I'm done with it ...

Have a nice day.
Francois
francois is offline   Reply With Quote

Old   April 2, 2007, 23:04
Default Hi, everyone I am also inte
  #7
Member
 
Bobby
Join Date: Mar 2009
Location: wuhan, hubei, China
Posts: 33
Rep Power: 17
aderliner is on a distinguished road
Hi, everyone

I am also interested in the wedge blocks,because when I use multiblock to simulate the spray process, it seems like the drops are allways spray from the corner of the "centre block". But, after I've read the userguider, I find that it seems like it's impossible to get the wedge blocks like the picture before using blockmesh?

Could anyone can help me ? Thank you ~~~!

Bobby
aderliner is offline   Reply With Quote

Old   May 3, 2007, 07:32
Default Hello Cedric Sorry to say,
  #8
Member
 
Guido Adriaensen
Join Date: Mar 2009
Posts: 56
Rep Power: 17
guido_adriaensen is on a distinguished road
Hello Cedric

Sorry to say, but that is not your only mistake... I have taken a look at your file and there is a lot wrong with it. Blocks are intersecting and not defined using a right-hand rule, you're arcs are also ill defined.
Could you give an example (picture) of what you're geometry should look like?

I've modified your file into the following, but I don't think this is the geometry you're looking for...

/*-----------------------------------------------------*\
| ========= | |
| \ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \ / O peration | Version: 1.3 |
| \ / A nd | Web: http://www.openfoam.org |
| \/ M anipulation | |
\*-----------------------------------------------------*/

FoamFile
{
version 2.0;
format ascii;

root "";
case "";
instance "";
local "";

class dictionary;
object blockMeshDict;
}

// * * * * * * * * * * * * * * * * * * * * * * * * * *//
//meshGenApp blockMesh;
convertToMeters 0.001;
vertices
(
( 3.0 -3.0 0.0)
( 1.0 -1.0 0.0)
( 1.0 1.0 0.0)
( 3.0 3.0 0.0)

( -3.0 3.0 0.0)
( -1.0 1.0 0.0)
( -1.0 -1.0 0.0)
( -3.0 -3.0 0.0)

( 6.0 -6.0 0.0)
( 6.0 6.0 0.0)
( -6.0 6.0 0.0) //10
( -6.0 -6.0 0.0)

( 6.0 -6.0 10.0)
( 3.0 -3.0 10.0)
( 3.0 3.0 10.0)
( 6.0 6.0 10.0)

( -6.0 6.0 10.0)
( -3.0 3.0 10.0)
( -3.0 -3.0 10.0)
( -6.0 -6.0 10.0)

);
blocks
(
hex (1 2 5 6 13 14 17 18) (6 6 10) simpleGrading (1 1 1)
hex (2 3 4 5 14 15 16 17) (2 6 10) simpleGrading (1 1 1)
hex (5 4 7 6 17 16 19 18) (2 6 10) simpleGrading (1 1 1)
hex (0 1 6 7 12 13 18 19) (2 6 10) simpleGrading (1 1 1)
hex (0 3 2 1 12 15 14 13) (6 2 10) simpleGrading (1 1 1)
);
edges
(
arc 5 2 (0.0 1.414214 0.0)
arc 6 5 (-1.414214 0.0 0.0)
arc 1 6 (0.0 -1.414214 0.0)
arc 2 1 (1.414214 0.0 0.0)
arc 17 14 (0.0 4.242641 10.0)
arc 18 17 (-4.242641 0.0 10.0)
arc 13 18 (0.0 -4.242641 10.0)
arc 14 13 (4.242641 0.0 10.0)
);

patches
(
patch inlet
(
(1 6 5 2)
(3 2 5 4)
(4 5 6 7)
(7 6 1 0)
(0 1 2 3)
)
patch outlet
(
(13 14 17 18)
(14 15 16 17)
(17 16 19 18)
(12 13 18 19)
(12 15 14 13)
)
wall walls
(
(3 4 16 15)
(4 7 19 16)
(7 0 12 19)
(0 3 15 12)
)

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

Old   May 4, 2007, 05:29
Default Hi Guido, Thank you for your
  #9
Senior Member
 
Cedric DUPRAT
Join Date: Mar 2009
Location: Nantes, France
Posts: 195
Rep Power: 17
cedric_duprat is on a distinguished road
Hi Guido,
Thank you for your reply. I hope it hadn't disturbed you too long ;o)
this is my final geometry:

I made the left part (the diffuser) and it works correctly, but when I add the large dump downstream of the diffuser section, some mistake are coming.
so what I gave you yesterday is only the dump with the outlet section of the diffuser.
I also would like to use a buterfly mesh (see Francois Beaubert message upper)
I give all also a piece of fortran code to do that easily where I can modifie all my parameters :
CreateGridFoam_clausen.f.txt
Cedric
Thank you again for helping
cedric_duprat is offline   Reply With Quote

Old   May 4, 2007, 07:53
Default Hello Cedric, I didn't take
  #10
Member
 
Guido Adriaensen
Join Date: Mar 2009
Posts: 56
Rep Power: 17
guido_adriaensen is on a distinguished road
Hello Cedric,

I didn't take me too long :-). Following your example, I have created a small diffuser with a dump, maybe this can point you in the right direction. I have made 7 blocks, 2 for the diffuser and 5 for the dump area. The dump area has been constructed as O-grid (You referred to it as a butterfly mesh, I think it is the same)
The blocks should be created with the right-hand-rule. The arcs are created by the two corner points and a point on the line in between (in this case in the middle). The patches should be numbered in such order that the normal points outward.

If you have anymore questions, let me know. :-)


Guido

/*-----------------------------------------------------*\
| ========= | |
| \ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \ / O peration | Version: 1.3 |
| \ / A nd | Web: http://www.openfoam.org |
| \/ M anipulation | |
\*-----------------------------------------------------*/

FoamFile
{
version 2.0;
format ascii;

root "";
case "";
instance "";
local "";

class dictionary;
object blockMeshDict;
}

// * * * * * * * * * * * * * * * * * * * * * * * * * *//
//meshGenApp blockMesh;
convertToMeters 0.001;
vertices
(
( 1.0 -1.0 -5.0) //0
( 1.0 1.0 -5.0)
( -1.0 1.0 -5.0)
( -1.0 -1.0 -5.0)

( 1.0 -1.0 -2.0) //4
( 1.0 1.0 -2.0)
( -1.0 1.0 -2.0)
( -1.0 -1.0 -2.0)

( 3.0 -3.0 0.0) //8
( 3.0 3.0 0.0)
( -3.0 3.0 0.0)
( -3.0 -3.0 0.0)

( 6.0 -6.0 0.0) //12
( 6.0 6.0 0.0)
( -6.0 6.0 0.0)
( -6.0 -6.0 0.0)

( 3.0 -3.0 10.0) //16
( 3.0 3.0 10.0)
( -3.0 3.0 10.0)
( -3.0 -3.0 10.0)

( 6.0 -6.0 10.0) //20
( 6.0 6.0 10.0)
( -6.0 6.0 10.0)
( -6.0 -6.0 10.0)

);
blocks
(
hex (0 1 2 3 4 5 6 7) (4 4 3) simpleGrading (1 1 1)
hex (4 5 6 7 8 9 10 11) (4 4 2) simpleGrading (1 1 1)
hex (8 9 10 11 16 17 18 19) (4 4 10) simpleGrading (1 1 1)
hex (14 10 9 13 22 18 17 21) (6 4 10) simpleGrading (3 1 1)
hex (15 11 10 14 23 19 18 22) (6 4 10) simpleGrading (3 1 1)
hex (12 8 11 15 20 16 19 23) (6 4 10) simpleGrading (3 1 1)
hex (13 9 8 12 21 17 16 20) (6 4 10) simpleGrading (3 1 1)
);
edges
(
arc 2 1 (0.0 1.414214 -5.0)
arc 1 0 (1.414214 0.0 -5.0)
arc 0 3 (0.0 -1.414214 -5.0)
arc 3 2 (-1.414214 0.0 -5.0)
arc 6 5 (0.0 1.414214 -2.0)
arc 5 4 (1.414214 0.0 -2.0)
arc 4 7 (0.0 -1.414214 -2.0)
arc 7 6 (-1.414214 0.0 -2.0)
arc 10 9 (0.0 4.242641 0.0)
arc 9 8 (4.242641 0.0 0.0)
arc 8 11 (0.0 -4.242641 0.0)
arc 11 10 (-4.242641 0.0 0.0)
arc 14 13 (0.0 8.485281 0.0)
arc 13 12 (8.485281 0.0 0.0)
arc 12 15 (0.0 -8.485281 0.0)
arc 15 14 (-8.485281 0.0 0.0)
arc 18 17 (0.0 4.242641 10.0)
arc 17 16 (4.242641 0.0 10.0)
arc 16 19 (0.0 -4.242641 10.0)
arc 19 18 (-4.242641 0.0 10.0)
arc 22 21 (0.0 8.485281 10.0)
arc 21 20 (8.485281 0.0 10.0)
arc 20 23 (0.0 -8.485281 10.0)
arc 23 22 (-8.485281 0.0 10.0)
);

patches
(
patch inlet
(
(0 3 2 1)
)
patch outlet
(
(16 17 18 19)
(17 21 22 18)
(18 22 23 19)
(20 16 19 23)
(20 21 17 16)
)
);
mergePatchPairs
(
);
guido_adriaensen is offline   Reply With Quote

Old   May 4, 2007, 12:14
Default Hello Guido, Thank you very m
  #11
Senior Member
 
Cedric DUPRAT
Join Date: Mar 2009
Location: Nantes, France
Posts: 195
Rep Power: 17
cedric_duprat is on a distinguished road
Hello Guido,
Thank you very much, it seems to work.
I'm trying now to improve the mesh.
If I have a problem, I won't hesitate to disturb you :-)
Cedric
cedric_duprat is offline   Reply With Quote

Old   May 5, 2007, 00:03
Default Hello OpenFOAM users I am n
  #12
Senior Member
 
Join Date: Mar 2009
Posts: 248
Rep Power: 18
jaswi is on a distinguished road
Hello OpenFOAM users

I am new to OpenFOAM. With the help of forum knowledgebase I have been able to install and create meshes for some simple geometries.

My interest is to simulate flow in a pipe with bend. Is it possible to generate geometry + mesh using the blockMesh tool.

Looking forward to suggestions
Kind Regards Jaswi
jaswi is offline   Reply With Quote

Old   January 21, 2008, 03:25
Default You're misspelling fixedValue
  #13
Member
 
lillberg's Avatar
 
Eric Lillberg
Join Date: Mar 2009
Location: Stockholm
Posts: 80
Rep Power: 17
lillberg is on a distinguished road
Send a message via Skype™ to lillberg
You're misspelling fixedValue , capital V.

good luck
yashjo likes this.
lillberg is offline   Reply With Quote

Old   June 17, 2008, 05:19
Default Hello Rasmus or anyone else,
  #14
New Member
 
nikhil babu madduri
Join Date: Mar 2009
Posts: 17
Rep Power: 17
nikhilmadduri is on a distinguished road
Hello Rasmus or anyone else,

I have tried to use the script provided by Rasmus.
When I executed it, it worked fine.

But to visualize it in paraFoam, when I tried, paraFoam window got open but on clicking "accept" in it, the window closed automatically showing the following FATAL ERROR message.


[nikhil@localhost ~]$ paraFoam /home/nikhil/OpenFOAM/nikhil-1.4.1/run/tutorials/icoFoam cavityGrade


--> FOAM FATAL IO ERROR : size 400 is not equal to the given value of 450

file: /home/nikhil/OpenFOAM/nikhil-1.4.1/run/tutorials/icoFoam/cavityGrade/0.8/p from line 25 to line 445.

From function Field<type>::Field(const word& keyword, const dictionary& dict, const label s)
in file lnInclude/Field.C at line 224.

FOAM exiting


I am pasting down the steps below. Somebody please tell me why I am not able to visualise in paraFoam and how I can make the necessary changes if required.

Thank you,
nikhil
nikhilmadduri is offline   Reply With Quote

Old   June 17, 2008, 05:43
Default HI!!....perhaves you can visul
  #15
New Member
 
Bhuvnesh verma
Join Date: Mar 2009
Location: Bangalore, Karnataka, India
Posts: 12
Rep Power: 17
bhuve is on a distinguished road
HI!!....perhaves you can visulize mesh by first clik on "constant" in paraFoam window and than "accept"..may be this error is because of differnt parameters.
regards
Bhuvnesh Verma
bhuve is offline   Reply With Quote

Old   June 17, 2008, 06:37
Default Hi Nikhil The reason for yo
  #16
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Hi Nikhil

The reason for your problems is seen in the following error:

-> FOAM FATAL IO ERROR : size 400 is not equal to the given value of 450

It means that the number of elements in your data files, in this case in specific the pressure at t=0.8, does not correspond to the number of elements in your mesh.

Best regards,

Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is offline   Reply With Quote

Old   June 17, 2008, 06:47
Default thanq bhuvanesh. ur suggestion
  #17
New Member
 
nikhil babu madduri
Join Date: Mar 2009
Posts: 17
Rep Power: 17
nikhilmadduri is on a distinguished road
thanq bhuvanesh. ur suggestion really works.

thanq Niels.

but i dint understand why itz not working when we click say "0.8" instead of "constant" in paraFoam.
i mean, which parameters will change if we change the above options(constant and 0.8)?

regards,
nikhil
nikhilmadduri is offline   Reply With Quote

Old   June 17, 2008, 07:03
Default The reason is, that in the 'co
  #18
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
The reason is, that in the 'constant' directory, the physical variables, i.e. pressure, velocity, etc is (probably) not loaded, thus a mismatch in the number of computational cells and the number of variables in the physical fields is not checked, thus you are allowed to see your mesh.

/ Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is offline   Reply With Quote

Old   June 17, 2008, 07:09
Default HI!...reason is as Niels menti
  #19
New Member
 
Bhuvnesh verma
Join Date: Mar 2009
Location: Bangalore, Karnataka, India
Posts: 12
Rep Power: 17
bhuve is on a distinguished road
HI!...reason is as Niels mentioned !..so for that you may try..'move to case->constant->..there you delet all neigh..,owne..ets previous stuff expect 'blockmeshdict'.than again form these stuff by blockmesh ./case.,than solve ur case. i think it must work now for anytime .

regards
Bhuvnesh Verma
bhuve is offline   Reply With Quote

Old   June 17, 2008, 23:17
Default thanq Niels n Bhuvanesh. u
  #20
New Member
 
nikhil babu madduri
Join Date: Mar 2009
Posts: 17
Rep Power: 17
nikhilmadduri is on a distinguished road
thanq Niels n Bhuvanesh.

u both were true.
itz working when i deleted the old files, the problem was coz of new stuff not getting loaded in the presence of old files.

regards,
nikhil
nikhilmadduri 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
how to set periodic boundary conditions Ganesh FLUENT 15 November 18, 2020 07:09
Prescribed Translating Cylinder Mesh for Added Mass Problem (Transient FSI) Lloyd Sullivan CFX 5 August 7, 2018 09:11
[snappyHexMesh] SnappyHexMesh for internal Flow vishwa OpenFOAM Meshing & Mesh Conversion 24 June 27, 2016 09:54
[ICEM] How to mesh for regular pentagonal cylinder using ICEM in 2D? ranjanrk ANSYS Meshing & Geometry 0 June 18, 2016 03:10
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 07:20


All times are GMT -4. The time now is 17:49.