CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [blockMesh] Creating a Cylinder (https://www.cfd-online.com/Forums/openfoam-meshing/85863-creating-cylinder.html)

m.maneshi March 8, 2011 18:50

Creating a Cylinder
 
Would anyone please let me know how to create a cylinder using blockMesh?

I tried :
Code:

vertices
(
    (-1 0 0)
    (0 -1 0)
    (1 0 0)
    (0 1 0)
    (-1 0 3)
    (0 -1 3)
    (1 0 3)
    (0 1 3)
   
);


edges
(
    arc 0 1 (-0.707106781 -0.707106781 0)
    arc 1 2 (0.707106781 -0.707106781 0)
    arc 2 3 (0.707106781 0.707106781 0)
    arc 3 1 (-0.707106781 0.707106781 0)
    arc 4 5 (0.707106781 -0.707106781 3)
    arc 5 6 (0.707106781 -0.707106781 3)
    arc 6 7 (0.707106781 0.707106781 3)
    arc 7 4 (0.707106781 0.707106781 3)

);

blocks
(
    hex (0 1 2 3 4 5 6 7) Fluid (1 1 20) simpleGrading (1 1 1)

but I had no luck and the blockMesh generated a cube for me.

MartinB March 10, 2011 04:31

Hi,

you must increase the number of elements here:
Fluid (1 1 20) --> Fluid (10 10 20)

Otherwise you will only have one element, which results in a cube, of course...

Have a look at this thread, post #6:
http://www.cfd-online.com/Forums/ope...arge-mesh.html

There you can see a sketch how to make a mesh with a much better quality.

Martin


All times are GMT -4. The time now is 06:08.