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] How to create a T-junction cylinder with blockMesh (https://www.cfd-online.com/Forums/openfoam-meshing/196910-how-create-t-junction-cylinder-blockmesh.html)

Blanca December 20, 2017 12:45

How to create a T-junction cylinder with blockMesh
 
Hi,

I am trying to create a T-junction cylinder with blockMesh, but I don't know how to do it. I created first one single cylinder, so I wonder if I can mix two cylinders? Because I didn't read anything about doing it with OpenFOAM, most people did it by ANSYS or other programs.
Could anyone help me?

Thanks

anuragm February 24, 2018 06:24

Quote:

Originally Posted by Blanca (Post 675722)
Hi,

I am trying to create a T-junction cylinder with blockMesh, but I don't know how to do it. I created first one single cylinder, so I wonder if I can mix two cylinders? Because I didn't read anything about doing it with OpenFOAM, most people did it by ANSYS or other programs.
Could anyone help me?

Thanks

If you are like me and prefer using open source solutions, then I can recommend gsmh which would be more than enough for what you want. However, I am not sure if it can produce structured meshes.

Incidentally, I am also trying to achieve a similar thing using blockMesh. I came across the following blockMeshDict posted by another user on this forum. It is missing O-grid in one of the blocks and I am working with this file to improve the mesh and integrating it in my geometry. However, it is a good base on which you can work as well.

Code:

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

convertToMeters 1e-2;
vertices
(
( 0.100000 -0.100000 0.000000)
( -0.100000 -0.100000 0.000000)
( -0.100000 0.100000 0.000000)
( 0.100000 0.100000 0.000000)
( 0.141421 -0.141421 0.000000)
( -0.141421 -0.141421 0.000000)
( -0.141421 0.141421 0.000000)
( 0.141421 0.141421 0.000000)
( 0.100000 -0.100000 1.000000)
( -0.100000 -0.100000 1.000000)
( -0.100000 0.100000 1.000000)
( 0.100000 0.100000 1.000000)
( 0.141421 -0.141421 1.000000)
( -0.141421 -0.141421 1.000000)
( -0.141421 0.141421 1.000000)
( 0.141421 0.141421 1.000000)

( 0.050000 -0.183333 0.450000)
( -0.050000 -0.183333 0.450000)
( -0.050000 -0.183333 0.550000)
( 0.050000 -0.183333 0.550000)
( 0.070711 -0.183333 0.429289)
( -0.070711 -0.183333 0.429289)
( -0.070711 -0.183333 0.570711)
( 0.070711 -0.183333 0.570711)
( 0.050000 -1.183333 0.450000)
( -0.050000 -1.183333 0.450000)
( -0.050000 -1.183333 0.550000)
( 0.050000 -1.183333 0.550000)
( 0.070711 -1.183333 0.429289)
( -0.070711 -1.183333 0.429289)
( -0.070711 -1.183333 0.570711)
( 0.070711 -1.183333 0.570711)

);
blocks
(
//block0
hex (1 0 3 2 9 8 11 10)
square
(5 5 50)
simpleGrading (1 1 1)

//block1
hex (0 4 7 3 8 12 15 11)
innerCircle
(5 5 50)
simpleGrading (1 1 1)

//block2
hex (3 7 6 2 11 15 14 10)
innerCircle
(5 5 50)
simpleGrading (1 1 1)

//block3
hex (2 6 5 1 10 14 13 9)
innerCircle
(5 5 50)
simpleGrading (1 1 1)

//block4
hex (1 5 4 0 9 13 12 8)
innerCircle
(5 5 50)
simpleGrading (1 1 1)

//block5
hex ( 17 16 19 18 25 24 27 26 )
square
(5 5 10)
simpleGrading (1 1 1)

//block5
hex ( 16 20 23 19 24 28 31 27 )
innerCircle
(5 5 10)
simpleGrading (1 1 1)

//block7
hex ( 19 23 22 18 27 31 30 26 )
innerCircle
(5 5 10)
simpleGrading (1 1 1)

//block8
hex ( 18 22 21 17 26 30 29 25 )
innerCircle
(5 5 10)
simpleGrading (1 1 1)

//block9
hex ( 17 21 20 16 25 29 28 24 )
innerCircle
(5 5 10)
simpleGrading (1 1 1)

);
edges
(

arc 7 4 ( 0.200000 0.000000 0.000000)
arc 4 5 ( 0.000000 -0.200000 0.000000)
arc 5 6 ( -0.200000 0.000000 0.000000)
arc 6 7 ( 0.000000 0.200000 0.000000)
arc 15 12 ( 0.200000 0.000000 1.000000)
arc 12 13 ( 0.000000 -0.200000 1.000000)
arc 13 14 ( -0.200000 0.000000 1.000000)
arc 14 15 ( 0.000000 0.200000 1.000000)
arc 3 0 ( 0.110000 0.000000 0.000000)
arc 0 1 ( 0.000000 -0.110000 0.000000)
arc 1 2 ( -0.110000 0.000000 0.000000)
arc 2 3 ( 0.000000 0.110000 0.000000)
arc 11 8 ( 0.110000 0.000000 1.000000)
arc 8 9 ( 0.000000 -0.110000 1.000000)
arc 9 10 ( -0.110000 0.000000 1.000000)
arc 10 11 ( 0.000000 0.110000 1.000000)

arc 23 20 ( 0.100000 -0.183333 0.500000)
arc 20 21 ( 0.000000 -0.183333 0.400000)
arc 21 22 ( -0.100000 -0.183333 0.500000)
arc 22 23 ( 0.000000 -0.183333 0.600000)
arc 31 28 ( 0.100000 -1.183333 0.500000)
arc 28 29 ( 0.000000 -1.183333 0.400000)
arc 29 30 ( -0.100000 -1.183333 0.500000)
arc 30 31 ( 0.000000 -1.183333 0.600000)
arc 19 16 ( 0.060000 -0.183333 0.500000)
arc 16 17 ( 0.000000 -0.183333 0.440000)
arc 17 18 ( -0.060000 -0.183333 0.500000)
arc 18 19 ( 0.000000 -0.183333 0.560000)
arc 27 24 ( 0.060000 -1.183333 0.500000)
arc 24 25 ( 0.000000 -1.183333 0.440000)
arc 25 26 ( -0.060000 -1.183333 0.500000)
arc 26 27 ( 0.000000 -1.183333 0.560000)

);
patches
(
wall
walls
(
(3 0 1 2)
(3 7 4 0)
(2 6 7 3)
(1 5 6 2)
(0 4 5 1)

(4 7 15 12)
(6 5 13 14)
(7 6 14 15)

( 20 23 31 28 )
( 21 20 28 29 )
( 22 21 29 30 )
( 23 22 30 31 )

)

patch
inlet
(
( 27 26 25 24 )
( 27 24 28 31 )
( 26 27 31 30 )
( 25 26 30 29 )
( 24 25 29 28 )
)

patch
outlet
(
(11 10 9 8)
(11 8 12 15)
(10 11 15 14)
(9 10 14 13)
(8 9 13 12)
)
patch
masterPatch
(
( 19 16 17 18 )
( 19 23 20 16 )
( 18 22 23 19 )
( 17 21 22 18 )
( 16 20 21 17 )
)
wall
mergewall
(
(5 4 12 13)
)

);

mergePatchPairs
(
(masterPatch mergewall)
);



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