CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Native Meshers: blockMesh (http://www.cfd-online.com/Forums/openfoam-meshing-blockmesh/)
-   -   Help could anyone post a simple cylinder mesh (http://www.cfd-online.com/Forums/openfoam-meshing-blockmesh/61796-help-could-anyone-post-simple-cylinder-mesh.html)

guilherme October 19, 2006 14:18

hi, how do I do a cylinder wit
 
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?

gschaider October 19, 2006 15:04

Hi! I don't have a blockMes
 
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

hemph October 20, 2006 03:52

Hi Guilherme, I have a cylind
 
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
http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif cylinderMesh.m4

guilherme October 23, 2006 09:00

Thanks Rasmus The mesh work
 
Thanks Rasmus

The mesh works fine.

Bye.

francois March 23, 2007 11:57

Hi all, I'm starting a new
 
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.

http://www.cfd-online.com/OpenFOAM_D...ges/1/4061.png

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:

http://www.cfd-online.com/OpenFOAM_D...ges/1/4062.png

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

http://www.cfd-online.com/OpenFOAM_D...ges/1/4060.jpg

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 March 26, 2007 10:04

Thanks Ville, As you sugges
 
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

aderliner April 2, 2007 22:04

Hi, everyone I am also inte
 
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

guido_adriaensen May 3, 2007 06:32

Hello Cedric Sorry to say,
 
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
(
);

cedric_duprat May 4, 2007 04:29

Hi Guido, Thank you for your
 
Hi Guido,
Thank you for your reply. I hope it hadn't disturbed you too long ;o)
this is my final geometry:
http://www.cfd-online.com/OpenFOAM_D...ges/1/4361.jpg
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 :
http://www.cfd-online.com/OpenFOAM_D...s/mime_txt.gif CreateGridFoam_clausen.f.txt
Cedric
Thank you again for helping

guido_adriaensen May 4, 2007 06:53

Hello Cedric, I didn't take
 
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
(
);

cedric_duprat May 4, 2007 11:14

Hello Guido, Thank you very m
 
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

jaswi May 4, 2007 23:03

Hello OpenFOAM users I am n
 
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

lillberg January 21, 2008 03:25

You're misspelling fixedValue
 
You're misspelling fixedValue , capital V.

good luck

nikhilmadduri June 17, 2008 04:19

Hello Rasmus or anyone else,
 
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

bhuve June 17, 2008 04:43

HI!!....perhaves you can visul
 
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

ngj June 17, 2008 05:37

Hi Nikhil The reason for yo
 
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

nikhilmadduri June 17, 2008 05:47

thanq bhuvanesh. ur suggestion
 
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

ngj June 17, 2008 06:03

The reason is, that in the 'co
 
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

bhuve June 17, 2008 06:09

HI!...reason is as Niels menti
 
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

nikhilmadduri June 17, 2008 22:17

thanq Niels n Bhuvanesh. u
 
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


All times are GMT -4. The time now is 02:38.