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


convertToMeters 1;

vertices
(
    //upst
    (-0.35 -0.35 0)    //0
    (-0.3 -0.35 0)     //1
    (-0.3 0.35 0)      //2
    (-0.35 0.35 0)     //3
    (-0.35 -0.35 0.01)   //4
    (-0.3 -0.35 0.01)    //5
    (-0.3 0.35 0.01)     //6
    (-0.35 0.35 0.01)    //7
    
    //downcyl
    (0.3 -0.35 0)      //8
    (0.035 -0.035 0)   //9
    (-0.035 -0.035 0)  //10
    (0.3 -0.35 0.01)     //11
    (0.035 -0.035 0.01)  //12
    (-0.035 -0.035 0.01) //13
    
    //left
    (-0.035 0.035 0)   //14
    (-0.035 0.035 0.01)  //15
    
    //upcyl
    (0.035 0.035 0)    //16
    (0.3 0.35 0)       //17
    (0.035 0.035 0.01)   //18
    (0.3 0.35 0.01)      //19
    
    //right is completely defined
    
    //dowst
    (2.0 0.35 0)       //20
    (2.0 -0.35 0)      //21
    (2.0 -0.35 0.01)      //22
    (2.0 0.35 0.01)      //23

);


blocks
(
//upstream
    hex (0 1 2 3 4 5 6 7)
    (20 100 1)
    simpleGrading (0.6 1 1)

//downcyl
    hex (1 8 9 10 5 11 12 13)
    (100 125 1)
    simpleGrading (1 0.1 1)
    
//left
    hex (1 10 14 2 5 13 15 6)
    (125 100 1)
    simpleGrading (0.1 1 1)

//upcyl
    hex (14 16 17 2 15 18 19 6)
    (100 125 1)
    simpleGrading (1 10 1)

//right
    hex (9 8 17 16 12 11 19 18)
    (125 100 1)
    simpleGrading (10 1 1)
    
//dowst
    hex (8 21 20 17 11 22 23 19)
    (300 100 1)
    simpleGrading (5 1 1)
    
);

edges
(
//downcyl
    arc 10 9 (0 -0.05 0)
    arc 13 12 (0 -0.05 0.01)
    
//left
    arc 10 14 (-0.05 0 0)
    arc 13 15 (-0.05 0 0.01)
    
//upcyl
    arc 14 16 (0 0.05 0)
    arc 15 18 (0 0.05 0.01)
    
//right
    arc 16 9 (0.05 0 0)
    arc 18 12 (0.05 0 0.01)
);

boundary
(
    inlet
    {
        type patch;
        faces
        (
            (0 3 7 4)
        );
    }
    outlet
    {
        type patch;
        faces
        (
            (23 20 21 22)
        );
    }
    wall1
    {
        type wall;
        faces
        (
            (3 2 6 7)  //start of wall on one side
            (2 17 19 6)
            (17 20 23 19) //end of wall on one side
            
            
        );
    }
    wall2
    {
        type wall;
        faces
        ( 
            (1 0 4 5) //start of wall in oter side
            (8 1 5 11)
            (21 8 11 22) //end of wall on other side
        );     
    }
    cylinder
    {
        type wall;
        faces
        (
          //downcyl
            (10 9 12 13)
            
          //left
            (10 13 15 14)
            
          //upcyl
            (14 15 18 16)
            
          //right
            (16 18 12 9)
        );
    }
    frontAndBack
    {
        type empty;
        faces
        (
            (0 1 2 3)
            (1 8 9 10)
            (1 10 14 2)
            (14 16 17 2)
            (9 8 17 16)
            (8 21 20 17) //end of top boundary
            
            (4 7 6 5)
            (5 13 12 11)
            (5 6 15 13)
            (15 6 19 18)
            (18 19 11 12)
            (11 19 23 22) //end of bottom boundary
        );
    }
);
mergePatchPairs
(
);
//**************************************************//

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