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/)
-   -   pipe bend mesh imperfect (http://www.cfd-online.com/Forums/openfoam-meshing-blockmesh/95417-pipe-bend-mesh-imperfect.html)

jochemvandenbosch December 16, 2011 11:13

pipe bend mesh imperfect
 
1 Attachment(s)
Dear fellow Foamers,

I'm still sort of a newbie in OpenFOAM and I'm trying to mesh a pipe bend in blockMesh. I've got no errors when I run blockMesh (and checkMesh) but for some reason the diameter of the bend seems smaller than the diameter of the rest of the pipe. I've checked every node and block like 5 times and everything seems to be in order. Does anybody see what mistake(s) I made? Thanks in advance! This is my blockMeshDict (in the attachment a picture of my mesh in paraFoam)

Quote:

/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / 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;
}

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

convertToMeters 1;

vertices
(
// pipe horizontal
(0 0 0) // 0
(1 0 0) // 1
(1 0.12 0) // 2
(0 0.12 0) // 3
(0 0 0.12) // 4
(1 0 0.12) // 5
(1 0.12 0.12) // 6
(0 0.12 0.12) // 7

// bend region
(1.34 0 -0.34) // 8
(1.46 0 -0.34) // 9
(1.46 0.12 -0.34) // 10
(1.34 0.12 -0.34) // 11

// pipe vertical
(1.34 0 -1.34) // 12
(1.46 0 -1.34) // 13
(1.46 0.12 -1.34) // 14
(1.34 0.12 -1.34) // 15

// cylinder nodes
(0 -0.01071 -0.01071) // 16
(0 0.13071 -0.01071) // 17
(0 0.13071 0.13071) // 18
(0 -0.01071 0.13071) // 19

(1 -0.0107 -0.01071) // 20
(1 0.13071 -0.01071) // 21
(1 0.13071 0.13071) // 22
(1 -0.01071 0.13071) // 23

(1.32929 -0.01071 -0.34) // 24
(1.47071 -0.01071 -0.34) // 25
(1.47071 0.13071 -0.34) // 26
(1.32929 0.13071 -0.34) // 27

(1.32929 -0.01071 -1.34) // 28
(1.47071 -0.01071 -1.34) // 29
(1.47071 0.13071 -1.34) // 30
(1.32929 0.13071 -1.34) // 31
);

blocks
(
// inlet block
hex (0 1 2 3 4 5 6 7) (10 10 10) simpleGrading (1 1 1)
hex (4 5 6 7 19 23 22 18) (10 10 10) simpleGrading (1 1 1)
hex (3 2 21 17 7 6 22 18) (10 10 10) simpleGrading (1 1 1)
hex (16 20 21 17 0 1 2 3) (10 10 10) simpleGrading (1 1 1)
hex (16 20 1 0 19 23 5 4) (10 10 10) simpleGrading (1 1 1)

// bend block
hex (1 8 11 2 5 9 10 6) (10 10 10) simpleGrading (1 1 1)
hex (5 9 10 6 23 25 26 22) (10 10 10) simpleGrading (1 1 1)
hex (2 11 27 21 6 10 26 22) (10 10 10) simpleGrading (1 1 1)
hex (20 24 27 21 1 8 11 2) (10 10 10) simpleGrading (1 1 1)
hex (20 24 8 1 23 25 9 5) (10 10 10) simpleGrading (1 1 1)

// outlet block
hex (12 13 14 15 8 9 10 11) (10 10 10) simpleGrading (1 1 1)
hex (13 29 30 14 9 25 26 10) (10 10 10) simpleGrading (1 1 1)
hex (15 14 30 31 11 10 26 27) (10 10 10) simpleGrading (1 1 1)
hex (28 12 15 31 24 8 11 27) (10 10 10) simpleGrading (1 1 1)
hex (28 29 13 12 24 25 9 8) (10 10 10) simpleGrading (1 1 1)

);

edges
(
// cylinder 1
arc 16 17 (0 0.06 -0.04)
arc 17 18 (0 0.16 0.04)
arc 18 19 (0 0.06 0.16)
arc 19 16 (0 -0.04 0.06)
// cylinder 2
arc 20 21 (1 0.06 -0.04)
arc 21 22 (1 0.16 0.04)
arc 22 23 (1 0.06 0.16)
arc 23 20 (1 -0.04 0.06)
// cylinder 3
arc 24 25 (1.4 -0.04 -0.34)
arc 25 26 (1.5 0.06 -0.34)
arc 26 27 (1.4 0.16 -0.34)
arc 27 24 (1.3 0.06 -0.34)
// cylinder 4
arc 28 29 (1.4 -0.04 -1.34)
arc 29 30 (1.5 0.06 -1.34)
arc 30 31 (1.4 0.16 -1.34)
arc 31 28 (1.3 0.06 -1.34)
// bend
arc 1 8 (1.24041 0 -0.09958)
arc 5 9 (1.32527 0 -0.01473)
arc 2 11 (1.24041 0.12 -0.09958)
arc 6 10 (1.32527 0.12 -0.01473)

arc 20 24 (1.23284 -0.01071 -0.10716)
arc 21 27 (1.23284 0.13071 -0.10716)
arc 23 25 (1.33284 -0.01071 -0.00715)
arc 22 26 (1.33284 0.13071 -0.00715)
);


patches
(

patch inlet
(
(4 7 3 0)
(19 18 7 4)
(7 18 17 3)
(0 3 17 16)
(19 4 0 16)
)
patch outlet
(
(12 15 14 13)
(28 31 15 12)
(15 31 30 14)
(13 14 30 29)
(28 12 13 29)
)
wall walls
(
(19 23 22 18)
(17 18 22 21)
(16 17 21 20)
(23 19 16 20)
(20 21 27 24)
(21 22 26 27)
(23 25 26 22)
(23 20 24 25)
(24 27 31 28)
(27 26 30 31)
(26 25 29 30)
(25 24 28 29)
)
);

mergePatchPairs
(
);

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

jochemvandenbosch December 19, 2011 09:28

Nobody? I'm drawing a blank here...

Locky3827 December 21, 2011 00:58

Hi,
i had this issue. I got around it by meshing the bend itself in three stages. I suspect it might be blockMesh not taking account of the curvature between the straight pipes.
Regards,
Locky

jochemvandenbosch December 21, 2011 05:42

How do you mean 'meshing the bend itself in three stages'. I'm afraid I don't fully understand. Could you clarify it a little.

Best regards,

Locky3827 December 21, 2011 18:10

What I mean is that for a 90 degree bend, split that up into say 3x 30 degree segments instead of a single 90 degree bend. The mesh looks better as a result.

jochemvandenbosch December 22, 2011 04:52

Hi Locky, I think splitting up the bend will indeed make the mesh look better. However, eventually I want to make a spiraling pipe and if I divide every corner in 3 segments this will be a immense job. Another forum user suggested defining the outermost lines of the corners (which I didn't in my mesh). I think this is the solution to the problem!

Best regards and thank you for your help!

ChemE1989 February 16, 2012 17:50

Question about your case
 
Hello,

I am VERY new to OpenFoam and I have been trying to model a case that is similar to yours. I am having difficulties with the boundary file in polyMesh. Can anyone shed some light on what startFace is and how to calculate the value for it? Would anyone be able to share how the code looks like for this case?

Thanks

jochemvandenbosch February 17, 2012 04:50

Dear ChemE1989, you don't need to do anything with the 'boundary' file in polymesh. This file is automatically generated when you run 'blockMesh' in terminal on the blockMeshDict file. If you need a example blockMeshDict file of a bend, just send me a message.
Best regards,

kjetil November 1, 2012 04:03

Quote:

Originally Posted by jochemvandenbosch (Post 336588)
How do you mean 'meshing the bend itself in three stages'. I'm afraid I don't fully understand. Could you clarify it a little.

Best regards,

I believe this is a known problem, when generating large bends: http://www.cfd-online.com/Forums/ope...rved-bend.html.

YellowSimulator November 12, 2014 05:49

vertical, horizontal and bent pipe in openfoam
 
Hello every one. Could some one tell me how to find a tutorial on how to construct a vertical, horizontal and bend pipe with blockmesh in openFoam.
Thank you in advance.


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