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


scale 0.001;	//This is an scaling operation. Done at the end.

//..................Calculations

h 120; //length along +z direction

r 42;

//..................Inner points

i1x -10.5;
i1y 10.5;

i2x 10.5;
i2y 10.5;

i3x 10.5;
i3y -10.5;

i4x -10.5;
i4y -10.5;

e1x -29.69848481;
e1y 29.69848481;

e2x 29.69848481;
e2y 29.69848481;

e3x 29.69848481;
e3y -29.69848481;

e4x -29.69848481;
e4y -29.69848481;



vertices
(
    //block0 vertices
    ($i1x $i1y -28)		//0
    ($e1x $e1y -28)	        //1
    ($e2x $e2y -28)	        //2
    ($i2x $i2y -28)		//3
    ($i1x $i1y $h)		//4
    ($e1x $e1y $h)	        //5
    ($e2x $e2y $h)	        //6
    ($i2x $i2y $h)		//7

    //block1 new vertices
    ($i3x $i3y -28)		//8
    ($e3x $e3y -28)		//9
    ($i3x $i3y $h)		//10
    ($e3x $e3y $h)		//11

    //block3 new vertices
    ($i4x $i4y -28)		//12
    ($e4x $e4y -28)		//13
    ($i4x $i4y $h)		//14
    ($e4x $e4y $h)		//15
);


xcells 15;
ycells 15;
zcells 50;

xcells1 15;
ycells1 15;
zcells1 50;

stretch 0.25;

blocks
(
    //block0
    hex (0 3 2 1 4 7 6 5) 	($xcells $ycells $zcells) simpleGrading (1 $stretch 1)
    //block1
    hex (3 8 9 2 7 10 11 6) 	($xcells $ycells $zcells) simpleGrading (1 $stretch 1)
    //block2
    hex (8 12 13 9 10 14 15 11) ($xcells $ycells $zcells) simpleGrading (1 $stretch 1)
    //block3
    hex (12 0 1 13 14 4 5 15) 	($xcells $ycells $zcells) simpleGrading (1 $stretch 1)
    //block4
    hex (0 12 8 3 4 14 10 7) 	($xcells1 $ycells1 $zcells1) simpleGrading (1 1 1)
);

edges
(
    //block0 arc
    arc 1 2  (0 $r -28)
    arc 5 6  (0 $r $h)

    //block1 arc
    arc 2 9  ($r 0 -28)
    arc 6 11 ($r 0 $h)

    //block2 arc
    arc 9 13  (0 -42 -28)
    arc 11 15 (0 -42 $h)

    //block3 arc
    arc 1 13  (-42 0 -28)
    arc 5 15  (-42 0 $h)
);

boundary
(

    bottom
    {
        type patch;
        faces
        (
            (0 1 2 3)
            (2 3 8 9)
            (8 9 13 12)
            (13 12 0 1)
            (0 3 8 12)
        );
    }

    top
    {
        type patch;
        faces
        (
            (4 5 6 7)
            (6 7 10 11)
            (15 11 10 14)
            (15 14 4 5)
            (4 7 10 14)
        );
    }

    wall
    {
        type wall;
        faces
        (
            (1 5 6 2)
            (2 6 11 9)
            (9 11 15 13)
            (15 13 5 1)
        );
    }

);

mergePatchPairs
(
);

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