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

convertToMeters 1;

vertices
(
    (0 0 0) //0
    (0.8 0 0) //1
    (0.8 0 0.005) //2
    (0 0 0.005) //3


    (0 -0.02 0) //4
    (0.8 -0.02 0) //5
    (0.8 -0.02 0.005) //6
    (0 -0.02 0.005) //7

    (0 -0.04 0)   //8
    (0.8 -0.04 0) //9
    (0.8 -0.04 0.005) //10
    (0 -0.04 0.005) //11
    
    (0.8 -0.04 0.01) //12
     (0 -0.04 0.01) //13
    (0 -0.02 0.01) //14
    (0.8 -0.02 0.01) //15
    (0.8 0 0.01) //16
     (0 0 0.01) //17


     (0.8 0.02 0) //18
    (0.82 0.02 0) //19
     (0.82 0.02 0.005)   //20

    (0.8 0.02 0.005) //21

    (0.82 0 0) //22

    (0.82 0 0.005) //23

     (0.82 0.02 0.01) //24

 (0.8 0.02 0.01) //25
     (0.82 0 0.01) //26
 (0.84 0.02 0) //27
     (0.84 0.02 0.005) //28
 (0.84 0 0) //29
     (0.84 0 0.005) //30

   (0.84 0.02 0.01) //31

    (0.84 0 0.01) //32
     (0.82 -0.02 0) //33



      (0.82 -0.02 0.005) //34
     (0.82 -0.02 0.01) //35
      (0.84 -0.02 0) //36
     (0.84 -0.02 0.005) //37
    (0.84 -0.02 0.01) //38
     (0.82 -0.04 0) //39

     (0.82 -0.04 0.005) //40

     (0.82 -0.04 0.01) //41
     (0.84 -0.04 0) //42



      (0.84 -0.04 0.005) //43
     (0.84 -0.04 0.01) //44





     (0.8 -0.06 0) //45
     (0.82 -0.06 0) //46
      (0.82 -0.06 0.005) //47
     (0.8 -0.06 0.005) //48
      (0.82 -0.06 0.01) //49


 (0.8 -0.06 0.01) //50
     (0.84 -0.06 0) //51
 (0.84 -0.06 0.005) //52
     (0.84 -0.06 0.01) //53


);
blocks
(
     // Main block (horizontal channel section)
   hex (0 1 2 3 4 5 6 7) (100 23 40) simpleGrading (1 1.2 1.2)  
   hex (4 5 6 7 8 9 10 11) (100 23 40) simpleGrading  (1 1.2 0.83)  
  hex (3 2 16 17 7 6 15 14) (100 23 40) simpleGrading  (1 0.83 1.2)
  hex (7 6 15 14 11 10 12 13) (100 23 40) simpleGrading  (1 0.83 0.83)
  
   
  //  branched section 1

     hex (18 19 20 21 1 22 23 2)  (40 23 40) simpleGrading (1.2 1.2 0.83)
     hex (21 20 24 25 2 23 26 16) (40 23 40) simpleGrading (1.2 0.83 0.83)
          
  hex (19 27 28 20 22 29 30 23) (40 23 40) simpleGrading  (0.83 1.2 0.83)

  hex (20 28 31 24 23 30 32 26) (40 23 40) simpleGrading  (0.83 0.83 0.83)
  


//  middle branch

   hex (1 22 23 2 5 33 34 6) (40 23 40) simpleGrading (1.2 1.2 1.2)
  hex (2 23 26 16 6 34 35 15) (40 23 40) simpleGrading (1.2 0.83 1.2)


   hex (22 29 30 23 33 36 37 34) (40 23 40) simpleGrading  (0.83 1.2 1.2)
    hex (23 30 32 26 34 37 38 35) (40 23 40) simpleGrading  (0.83 0.83 1.2)
    hex (5 33 34 6 9 39 40 10) (40 23 40) simpleGrading  (1.2 1.2 0.83)


   hex (6 34 35 15 10 40 41 12) (40 23 40) simpleGrading  (1.2 0.83 0.83)


    hex (33 36 37 34 39 42 43 40) (40 23 40) simpleGrading  (0.83 1.2 0.83)
    hex (34 37 38 35 40 43 44 41) (40 23 40) simpleGrading  (0.83 0.83 0.83)
 
 

    // branched section 2

   hex (9 39 40 10 45 46 47 48) (40 23 40) simpleGrading  (1.2 1.2 1.2)

   hex (10 40 41 12 48 47 49 50) (40 23 40) simpleGrading  (1.2 0.83 1.2)
  hex (39 42 43 40 46 51 52 47) (40 23 40) simpleGrading  (0.83 1.2 1.2)
    hex (40 43 44 41 47 52 53 49) (40 23 40) simpleGrading  (0.83 0.83 1.2)
 
);

edges
(
);

boundary
(
 
 mainchannelsidewall
{ 
	type wall;
	faces
	(
	  
	  (0 1 2 3)
          (8 11 10 9)
           
	(3 2 16 17)
      
	(11 13 12 10)
   );
		}

  middlechannelsidewall
	
	{
	type wall;
	faces
  (
        (29 36 37 30)
        (30 37 38 32)

	(36 42 43 37)
        (37 43 44 38)
	
    
       
	);
  }
  
branchedchannelsidewall1
	{

	type wall;
	faces
	(

	(18 21 2 1)
	(21 25 16 2)
	(27 29 30 28)
	(28 30 32 31)
        
         
	
	
	);
	}
	
	

	branchedchannelsidewall2
	{

	type wall;
	faces
	(

	(9 10 48 45)
	(10 12 50 48)
         (42 51 52 43)
	(43 52 53 44)
	
        
	
	
	);
	}
 inlet
    {
        type patch;
        faces
        (
            (0 3 7 4)
		(4 7 11 8)
           (7 3 17 14)
                (11 7 14 13)

            
        );
    }
    outlet
    {
        type patch;
        faces
        (
           
	     (18 19 20 21)
	(21 20 24 25)

         (19 27 28 20)
          (20 28 31 24)

        (45 48 47 46)
	(48 50 49 47)

         (46 47 52 51)
          (47 49 53 52)
       
            
        );
    }

bottom_wall
        {
            type wall;
            faces
            (
                 //main
                (0 4 5 1)
                (4 8 9 5)

                   //mid   
                   (1 5 33 22)
		(22 33 36 29)
 
		(5 9 39 33)
		(33 39 42 36)

		//branch1
                 (18 1 22 19)
		(19 22 29 27)

                //branch2

                (9 45 46 39)
		(39 46 51 42)
                   

            );
        }
	top_wall
        {
            type wall;
            faces
            (

                  //main
                  (14 17 16 15)
                (13 14 15 12)

                    //mid  
                   (16 26 35 15)
		(26 32 38 35)

		 (15 35 41 12)
		(35 38 44 41)


		//branch1
                 (25 24 26 16)
		(24 31 32 26)

                //branch2

                (12 41 49 50)
		(41 44 53 49)
		
		

               
            );
        }



    
    

    
    
);

mergePatchPairs
(
);



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