CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Native Meshers: blockMesh (https://www.cfd-online.com/Forums/openfoam-meshing-blockmesh/)
-   -   blockMesh pipe problem (https://www.cfd-online.com/Forums/openfoam-meshing-blockmesh/114139-blockmesh-pipe-problem.html)

xiyuqiu March 5, 2013 21:38

blockMesh pipe problem
 
Hello All

I am trying to use blockMesh to create a pipe. My blockMeshdict file is shown. It runs and I can see a pretty good cylinder from paraFoam. However, when I checkMesh, it fails.
Code:

  ***Open cells found, max cell openness: 1, number of open cells 330
  <<Writing 330 non closed cells to set nonClosedCells
  <<Writing 120 cells with high aspect ratio to set highAspectRatioCells
    Mesh non-orthogonality Max: 180 average: 35.0101
 ***Number of non-orthogonality errors: 801.
  <<Writing 801 non-orthogonal faces to set nonOrthoFaces
 ***Error in face pyramids: 1620 faces are incorrectly oriented.
  <<Writing 819 faces with incorrect orientation to set wrongOrientedFaces

Code:

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

convertToMeters 1;

vertices
(
// pipe centerl octagon
(0 0 0) // 0
(1 0 0) // 1
(1 0.05 0) // 2
(0 0.05 0) // 3
(0 0 0.05) // 4
(1 0 0.05) // 5
(1 0.0353553 0.0353553) // 6
(0 0.0353553 0.0353553) // 7
(0 0 -0.05) //8
(1 0 -0.05) //9
(1 0.0353553 -0.0353553) //10
(0 0.0353553 -0.0353553) //11
(0 -0.05 0)  //12
(1 -0.05 0) // 13
(1 -0.0353553 -0.0353553) // 14
(0 -0.0353553 -0.0353553) // 15
(0 -0.0353553 0.0353553) // 16
(1 -0.0353553 0.0353553) // 17
// outer octagon
(0 0 0.1) // 18
(1 0 0.1) // 19
(1 0.0707107 0.0707107) // 20
(0 0.0707107 0.0707107) // 21
(0 0.1 0) //22
(1 0.1 0) //23
(0 0.0707107 -0.0707107) // 24
(1 0.0707107 -0.0707107) // 25
(1 0 -0.1) // 26
(0 0 -0.1)// 27
(0 -0.1 0) // 28
(1 -0.1 0) // 29
(1 -0.0707107 -0.0707107) // 30
(0 -0.0707107 -0.0707107) // 31
(0 -0.0707107 0.0707107) //32
(1 -0.0707107 0.0707107) // 33
);

blocks
(
// center up right block
hex (0 1 2 3 4 5 6 7) (30 3 3) simpleGrading (1 1 1)
// center up left block
hex (8 9 10 11 0 1 2 3) (30 3 3) simpleGrading (1 1 1)
// center down left block
hex (15 14 9 8 12 13 1 0) (30 3 3) simpleGrading (1 1 1)
// center down right block
hex (16 17 5 4 12 13 1 0) (30 3 3) simpleGrading (1 1 1)
// outer up right lower block
hex (4 5 6 7 18 19 20 21) (30 3 3) simpleGrading (1 1 1)
// outer up right higher block
hex (3 2 23 22 7 6 20 21) (30 3 3) simpleGrading (1 1 1)
// outer up left higher block
hex (11 10 25 24 3 2 23 22) (30 3 3) simpleGrading (1 1 1)
// outer up left lower block
hex (27 26 25 24 8 9 10 11) (30 3 3) simpleGrading (1 1 1)
// outer down left higher block
hex (31 30 26 27 15 14 9 8) (30 3 3) simpleGrading (1 1 1)
//outer donw left lower block
hex (31 30 14 15 28 29 13 12) (30 3 3) simpleGrading (1 1 1)
//outer donw right lower block
hex (28 29 13 12 32 33 17 16) (30 3 3) simpleGrading (1 1 1)
//outer donw right higher block
hex (32 33 17 16 18 19 5 4) (30 3 3) simpleGrading (1 1 1)
);

edges
(
// at inlet
arc 18 21 (0 0.038269 0.092388)
arc 21 22 (0 0.092388 0.038269)
arc 22 24 (0 0.092388 -0.038269)
arc 24 27 (0 0.038269 -0.092388)
arc 27 31 (0 -0.038269 -0.092388)
arc 31 28 (0 -0.092388 -0.038269)
arc 28 32 (0 -0.092388 0.038269)
arc 32 18 (0 -0.038269 0.092388)

// at outlet
arc 19 20 (1 0.038269 0.092388)
arc 20 23 (1 0.092388 0.038269)
arc 23 25 (1 0.092388 -0.038269)
arc 25 26 (1 0.038269 -0.092388)
arc 26 30 (1 -0.038269 -0.092388)
arc 30 29 (1 -0.092388 -0.038269)
arc 29 33 (1 -0.092388 0.038269)
arc 33 19 (1 -0.038269 0.092388)

);


patches
(

patch inlet
(
(4 7 3 0)
(0 3 11 8)
(0 8 15 12)
(4 0 12 16)

(21 7 4 18)
(22 3 7 21)

(24 11 3 22)
(27 8 11 24)

(31 15 8 27)
(28 12 15 31)

(12 28 32 16)
(16 32 18 4)
)
patch outlet
(
(1 2 6 5)
(9 10 2 1)
(13 1 9 14)
(5 1 13 17)

(5 6 20 19)
(2 23 20 6)

(10 25 23 2)
(26 9 10 25)

(30 14 9 26)
(29 13 14 30)

(33 17 13 29)
(19 5 17 33)
)
wall wall
(
//(4 5 6 7)
//(7 6 2 3)

(18 19 20 21)
(21 20 23 22)

//(3 2 23 22)

(22 23 25 24)
(24 25 26 27)

//(3 2 10 11)
//(11 10 9 8)

//(27 26 9 8)
//(4 5 19 18)

(27 26 30 31)
(31 30 29 28)

//(8 9 14 15)
//(15 14 13 12)

//(28 29 13 12)
//(4 5 19 18)

//(12 13 17 16)
//(16 17 5 4)
(28 29 33 32)
(32 33 19 18)

)

);

mergePatchPairs
(
);

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

Can anyone tell me what seems to be the problem?

thank.

xiyuqiu March 5, 2013 23:51

I figured it out. It was a ordering problem for one of the blocks that I have. as always, usually it is the block ordering problem.

wyldckat March 8, 2013 19:41

Quote:

Originally Posted by xiyuqiu (Post 411826)
I figured it out. It was a ordering problem for one of the blocks that I have. as always, usually it is the block ordering problem.

Quick tip: First released in OpenFOAM 2.0, you can run paraFoam with the following option:
Code:

paraFoam -block
It can help you with figuring out where the ordering might go wrong!

cesarjets May 23, 2014 20:36

Cylinder BlockMesh
 
Quote:

Originally Posted by xiyuqiu (Post 411815)
Hello All

I am trying to use blockMesh to create a pipe. My blockMeshdict file is shown. It runs and I can see a pretty good cylinder from paraFoam. However, when I checkMesh, it fails.
Code:

  ***Open cells found, max cell openness: 1, number of open cells 330
  <<Writing 330 non closed cells to set nonClosedCells
  <<Writing 120 cells with high aspect ratio to set highAspectRatioCells
    Mesh non-orthogonality Max: 180 average: 35.0101
 ***Number of non-orthogonality errors: 801.
  <<Writing 801 non-orthogonal faces to set nonOrthoFaces
 ***Error in face pyramids: 1620 faces are incorrectly oriented.
  <<Writing 819 faces with incorrect orientation to set wrongOrientedFaces

Code:

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

convertToMeters 1;

vertices
(
// pipe centerl octagon
(0 0 0) // 0
(1 0 0) // 1
(1 0.05 0) // 2
(0 0.05 0) // 3
(0 0 0.05) // 4
(1 0 0.05) // 5
(1 0.0353553 0.0353553) // 6
(0 0.0353553 0.0353553) // 7
(0 0 -0.05) //8
(1 0 -0.05) //9
(1 0.0353553 -0.0353553) //10
(0 0.0353553 -0.0353553) //11
(0 -0.05 0)  //12
(1 -0.05 0) // 13
(1 -0.0353553 -0.0353553) // 14
(0 -0.0353553 -0.0353553) // 15
(0 -0.0353553 0.0353553) // 16
(1 -0.0353553 0.0353553) // 17
// outer octagon
(0 0 0.1) // 18
(1 0 0.1) // 19
(1 0.0707107 0.0707107) // 20
(0 0.0707107 0.0707107) // 21
(0 0.1 0) //22
(1 0.1 0) //23
(0 0.0707107 -0.0707107) // 24
(1 0.0707107 -0.0707107) // 25
(1 0 -0.1) // 26
(0 0 -0.1)// 27
(0 -0.1 0) // 28
(1 -0.1 0) // 29
(1 -0.0707107 -0.0707107) // 30
(0 -0.0707107 -0.0707107) // 31
(0 -0.0707107 0.0707107) //32
(1 -0.0707107 0.0707107) // 33
);

blocks
(
// center up right block
hex (0 1 2 3 4 5 6 7) (30 3 3) simpleGrading (1 1 1)
// center up left block
hex (8 9 10 11 0 1 2 3) (30 3 3) simpleGrading (1 1 1)
// center down left block
hex (15 14 9 8 12 13 1 0) (30 3 3) simpleGrading (1 1 1)
// center down right block
hex (16 17 5 4 12 13 1 0) (30 3 3) simpleGrading (1 1 1)
// outer up right lower block
hex (4 5 6 7 18 19 20 21) (30 3 3) simpleGrading (1 1 1)
// outer up right higher block
hex (3 2 23 22 7 6 20 21) (30 3 3) simpleGrading (1 1 1)
// outer up left higher block
hex (11 10 25 24 3 2 23 22) (30 3 3) simpleGrading (1 1 1)
// outer up left lower block
hex (27 26 25 24 8 9 10 11) (30 3 3) simpleGrading (1 1 1)
// outer down left higher block
hex (31 30 26 27 15 14 9 8) (30 3 3) simpleGrading (1 1 1)
//outer donw left lower block
hex (31 30 14 15 28 29 13 12) (30 3 3) simpleGrading (1 1 1)
//outer donw right lower block
hex (28 29 13 12 32 33 17 16) (30 3 3) simpleGrading (1 1 1)
//outer donw right higher block
hex (32 33 17 16 18 19 5 4) (30 3 3) simpleGrading (1 1 1)
);

edges
(
// at inlet
arc 18 21 (0 0.038269 0.092388)
arc 21 22 (0 0.092388 0.038269)
arc 22 24 (0 0.092388 -0.038269)
arc 24 27 (0 0.038269 -0.092388)
arc 27 31 (0 -0.038269 -0.092388)
arc 31 28 (0 -0.092388 -0.038269)
arc 28 32 (0 -0.092388 0.038269)
arc 32 18 (0 -0.038269 0.092388)

// at outlet
arc 19 20 (1 0.038269 0.092388)
arc 20 23 (1 0.092388 0.038269)
arc 23 25 (1 0.092388 -0.038269)
arc 25 26 (1 0.038269 -0.092388)
arc 26 30 (1 -0.038269 -0.092388)
arc 30 29 (1 -0.092388 -0.038269)
arc 29 33 (1 -0.092388 0.038269)
arc 33 19 (1 -0.038269 0.092388)

);


patches
(

patch inlet
(
(4 7 3 0)
(0 3 11 8)
(0 8 15 12)
(4 0 12 16)

(21 7 4 18)
(22 3 7 21)

(24 11 3 22)
(27 8 11 24)

(31 15 8 27)
(28 12 15 31)

(12 28 32 16)
(16 32 18 4)
)
patch outlet
(
(1 2 6 5)
(9 10 2 1)
(13 1 9 14)
(5 1 13 17)

(5 6 20 19)
(2 23 20 6)

(10 25 23 2)
(26 9 10 25)

(30 14 9 26)
(29 13 14 30)

(33 17 13 29)
(19 5 17 33)
)
wall wall
(
//(4 5 6 7)
//(7 6 2 3)

(18 19 20 21)
(21 20 23 22)

//(3 2 23 22)

(22 23 25 24)
(24 25 26 27)

//(3 2 10 11)
//(11 10 9 8)

//(27 26 9 8)
//(4 5 19 18)

(27 26 30 31)
(31 30 29 28)

//(8 9 14 15)
//(15 14 13 12)

//(28 29 13 12)
//(4 5 19 18)

//(12 13 17 16)
//(16 17 5 4)
(28 29 33 32)
(32 33 19 18)

)

);

mergePatchPairs
(
);

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

Can anyone tell me what seems to be the problem?

thank.

How you calculated the arcs? thank you

dahicocuk July 1, 2014 19:46

Hi,

I have some questions. What are your dimensions for pipe mesh? I mean what is your pipe diameter and length that you used for mesh? I have a pipe mesh problem it has D=4.5 mm and L=970 mm. Could you help me about these questions?

Thank you.

cesarjets July 20, 2014 16:42

Hi, sorry for the delay of my reply. are you working with snappyHexMesh? mine is D=0.26m and L=0.56m, these are the dimensions of the outer pipe, it has another cylinder in it, it's kind of concentric cylinder. I have worked with a STL file

regards

dahicocuk July 22, 2014 23:50

Quote:

Originally Posted by cesarjets (Post 502378)
Hi, sorry for the delay of my reply. are you working with snappyHexMesh? mine is D=0.26m and L=0.56m, these are the dimensions of the outer pipe, it has another cylinder in it, it's kind of concentric cylinder. I have worked with a STL file

regards

Hi Cesarjets,

I do not use snappyHexmESH but, I want to learn and use it as soon as possible.If possible, could you please share your mesh? I think, it will be a good start for me.

Thank you


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