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/)
-   -   [Other] Cylindrical Pipe Mesh Generation (https://www.cfd-online.com/Forums/openfoam-meshing/143994-cylindrical-pipe-mesh-generation.html)

Shivam Sinha November 6, 2014 16:03

Cylindrical Pipe Mesh Generation
 
Hi,

I am trying to simulate pulsating flow through a cylindrical pipe. But I am having problems in generating a mesh for the pipe. Can anyone please post a blockMeshDict file for a cylindrical pipe?

otm November 6, 2014 16:18

Hi!

Here is a Python-script that generates a blockMeshDict for a cylindrical pipe:
http://www.cfd-online.com/Forums/ope...tml#post285979

Good luck!
/otm

Shivam Sinha November 7, 2014 01:50

Hi otm, Thanks for your help.

I had written a blockMechDict file on my own. When I ran blockMech, the following error was generated :

--> FOAM FATAL ERROR:
face 0 in patch 1 does not have neighbour cell face : 4(5 6 9 5)

Can you help me with this?

Here is my blockMeshDict code:

FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 1;

vertices
(
(0 0 0)
(0 0.01 0)
(0 0 -0.01)
(0 -0.01 0)
(0 0 0.01)
(4 0 0)
(4 0.01 0)
(4 0 -0.01)
(4 -0.01 0)
(4 0 0.01)
);

blocks
(
hex (5 9 6 5 0 4 1 0) (10 10 2000) simpleGrading (1 1 1)
hex (5 6 7 5 0 1 2 0) (10 10 2000) simpleGrading (1 1 1)
hex (5 7 8 5 0 2 3 0) (10 10 2000) simpleGrading (1 1 1)
hex (5 8 9 5 0 3 4 0) (10 10 2000) simpleGrading (1 1 1)

);

edges
(
arc 1 4 (0 0.0070710678 0.0070710678)
arc 4 3 (0 -0.0070710678 0.0070710678)
arc 3 2 (0 -0.0070710678 -0.0070710678)
arc 2 1 (0 0.0070710678 -0.0070710678)
arc 6 9 (4 0.0070710678 0.0070710678)
arc 9 8 (4 -0.0070710678 0.0070710678)
arc 8 7 (4 -0.0070710678 -0.0070710678)
arc 7 6 (4 0.0070710678 -0.0070710678)
);

boundary
(

inlet
{
type patch;
faces
(
(0 4 1 0)
(0 1 2 0)
(0 2 3 0)
(0 3 4 0)
);
}

outlet
{
type patch;
faces
(
(5 6 9 5)
(5 9 8 5)
(5 8 7 5)
(5 7 6 5)
);
}

walls
{
type wall;
faces
(
(1 4 9 6)
(4 3 8 9)
(3 2 7 8)
(2 1 6 7)
);
}

);

mergePatchPairs
(
);

// ************************************************** *********************** //

otm November 7, 2014 12:53

Hi,

I don't think your block topology will give you a good cylinder mesh. You need five blocks like in this example. Also, you are using the same vertex more than once in each block definition. This is not allowed. The same goes for the patches.

I suggest that you read carefully the section about meshes in the OpenFOAM user guide. That particular part of the guide is actually quite comprehensive.

Good luck!
//Olle


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