// Gmsh project created on Sat Jun 29 20:29:15 2019
SetFactory("OpenCASCADE");

//+
Coherence;
Tolerence = 0.0001;

//+
Point(1) = {0, -0.5, 0.5, 1.0};
//+
Point(2) = {0, -0.15, 0.5, 1.0};

//+
Point(4) = {0, 0.15, 0.5, 1.0};
//+
Point(5) = {0, 0.5, 0.5, 1.0};
//+
Point(6) = {0, 0.5, 0.15, 1.0};

//+
Point(8) = {0, 0.5, -0.15, 1.0};
//+
Point(9) = {0, 0.5, -0.5, 1.0};
//+
Point(10) = {0, 0.15, -0.5, 1.0};

//+
Point(12) = {0, -0.15, -0.5, 1.0};
//+
Point(13) = {0, -0.5, -0.5, 1.0};
//+
Point(14) = {0, -0.5, -0.15, 1.0};

//+
Point(16) = {0, -0.5, 0.15, 1.0};

//+
Point(17) = {0, -0.15, 0.15, 1.0};

//+
Point(19) = {0, 0.15, 0.15, 1.0};



//+
Point(21) = {0, 0.15, -0.15, 1.0};

//+
Point(23) = {0, -0.15, -0.15, 1.0};
//+
Point(25) = {0, 0, 0, 1.0};

//+
Point(26) = {0, 0.026516504, 0.026516504, 1.0};
//+
Point(27) = {0, -0.026516504, 0.026516504, 1.0};
//+
Point(28) = {0, -0.026516504, -0.026516504, 1.0};
//+
Point(29) = {0, 0.026516504, -0.026516504, 1.0};
//+
Point(30) = {0, 0.029185832, 0.029185832, 1.0};
//+
Point(31) = {0, -0.029185832, 0.029185832, 1.0};
//+
Point(32) = {0, -0.029185832, -0.029185832, 1.0};
//+
Point(33) = {0, 0.029185832, -0.029185832, 1.0};
//+
Point(34) = {0, 0.031533426, 0.031533426, 1.0};
//+
Point(35) = {0, -0.031533426, 0.031533426, 1.0};
//+
Point(36) = {0, -0.031533426, -0.031533426, 1.0};
//+
Point(37) = {0, 0.031533426, -0.031533426, 1.0};
//+
Point(38) = {0, 0.01, 0.01, 1.0};
//+
Point(39) = {0, -0.01, 0.01, 1.0};
//+
Point(40) = {0, -0.01, -0.01, 1.0};
//+
Point(41) = {0, 0.01, -0.01, 1.0};

//+
Line(1) = {9, 8};Transfinite Line {1} = 20 Using Progression 1;
//+
Line(2) = {8, 6};Transfinite Line {2} = 20 Using Progression 1;
//+
Line(3) = {6, 5};Transfinite Line {3} = 20 Using Progression 1;


Line(4) = {9, 10};Transfinite Line {4} = 20 Using Progression 1;
//+
Line(5) = {10, 12};Transfinite Line {5} = 20 Using Progression 1;
//+
Line(6) = {12, 13};Transfinite Line {6} = 20 Using Progression 1;

//+
Line(7) = {13, 14};Transfinite Line {7} = 20 Using Progression 1;
//+
Line(8) = {14, 16};Transfinite Line {8} = 20 Using Progression 1;
//+
Line(9) = {16, 1};Transfinite Line {9} = 20 Using Progression 1;

//+
Line(10) = {1, 2};Transfinite Line {10} = 20 Using Progression 1;
//+
Line(11) = {2, 4};Transfinite Line {11} = 20 Using Progression 1;
//+
Line(12) = {4, 5};Transfinite Line {12} = 20 Using Progression 1;


//+
Line(13) = {2, 17};Transfinite Line {13} = 20 Using Progression 1;
//+
Line(14) = {17, 23};Transfinite Line {14} = 20 Using Progression 1;
//+
Line(15) = {23, 12};Transfinite Line {15} = 20 Using Progression 1;

//+
Line(16) = {4, 19};Transfinite Line {16} = 20 Using Progression 1;
//+
Line(17) = {19, 21};Transfinite Line {17} = 20 Using Progression 1;
//+
Line(18) = {21, 10};Transfinite Line {18} = 20 Using Progression 1;


//+
Line(19) = {16, 17};Transfinite Line {19} = 20 Using Progression 1;
//+
Line(20) = {17, 19};Transfinite Line {20} = 20 Using Progression 1;
//+
Line(21) = {19, 6};Transfinite Line {21} = 20 Using Progression 1;


//+
Line(22) = {14, 23};Transfinite Line {22} = 20 Using Progression 1;
//+
Line(23) = {23, 21};Transfinite Line {23} = 20 Using Progression 1;
//+
Line(24) = {21, 8};Transfinite Line {24} = 20 Using Progression 1;


Line(25) = {39, 38};Transfinite Line {25} = 20 Using Progression 1;
//+
Line(26) = {38, 41};Transfinite Line {26} = 20 Using Progression 1;
//+
Line(27) = {41, 40};Transfinite Line {27} = 20 Using Progression 1;
//+
Line(28) = {40, 39};Transfinite Line {28} = 20 Using Progression 1;



//+
Circle(29) = {27, 25, 26};Transfinite Line {29} = 20 Using Progression 1;
//+
Circle(30) = {26, 25, 29};Transfinite Line {30} = 20 Using Progression 1;
//+
Circle(31) = {29, 25, 28};Transfinite Line {31} = 20 Using Progression 1;
//+
Circle(32) = {28, 25, 27};Transfinite Line {32} = 20 Using Progression 1;


//+
Circle(33) = {31, 25, 30};Transfinite Line {33} = 20 Using Progression 1;
//+
Circle(34) = {30, 25, 33};Transfinite Line {34} = 20 Using Progression 1;
//+
Circle(35) = {33, 25, 32};Transfinite Line {35} = 20 Using Progression 1;
//+
Circle(36) = {32, 25, 31};Transfinite Line {36} = 20 Using Progression 1;

//+
Circle(37) = {35, 25, 34};Transfinite Line {37} = 20 Using Progression 1;
//+
Circle(38) = {34, 25, 37};Transfinite Line {38} = 20 Using Progression 1;
//+
Circle(39) = {37, 25, 36};Transfinite Line {39} = 20 Using Progression 1;
//+
Circle(40) = {36, 25, 35};Transfinite Line {40} = 20 Using Progression 1;


//+
Line(41) = {27, 31};Transfinite Line {41} = 10 Using Progression 1;
//+
Line(42) = {31, 35};Transfinite Line {42} = 10 Using Progression 1;

//+
Line(43) = {39, 27};Transfinite Line {43} = 20 Using Progression 1;
//+
Line(44) = {40, 28};Transfinite Line {44} = 20 Using Progression 1;

//+
Line(45) = {28, 32};Transfinite Line {45} = 10 Using Progression 1;
//+
Line(46) = {32, 36};Transfinite Line {46} = 10 Using Progression 1;


//+
Line(47) = {41, 29};Transfinite Line {47} = 20 Using Progression 1;

//+
Line(48) = {29, 33};Transfinite Line {48} = 10 Using Progression 1;

//+
Line(49) = {33, 37};Transfinite Line {49} = 10 Using Progression 1;


//+
Line(50) = {26, 30};Transfinite Line {50} = 10 Using Progression 1;
//+
Line(51) = {30, 34};Transfinite Line {51} = 10 Using Progression 1;


//+
Line(52) = {38, 26};Transfinite Line {52} = 20 Using Progression 1;

//+
Line(53) = {34, 19};Transfinite Line {53} = 20 Using Progression 1;
//+
Line(54) = {37, 21};Transfinite Line {54} = 20 Using Progression 1;
//+
Line(55) = {36, 23};Transfinite Line {55} = 20 Using Progression 1;
//+
Line(56) = {35, 17};Transfinite Line {56} = 20 Using Progression 1;




//+
Point(42) = {0.984807753, 0.5, 0.5, 1.0};
//+
Point(43) = {0.984807753, 0.15, 0.5, 1.0};
//+
Point(44) = {0.984807753, -0.15, 0.5, 1.0};
//+
Point(45) = {0.984807753, -0.5, 0.5, 1.0};
//+
Point(46) = {0.984807753, -0.5, -0.5, 1.0};
//+
Point(47) = {0.984807753, 0.5, -0.5, 1.0};
//+
Point(48) = {0.984807753, 0.15, -0.5, 1.0};
//+
Point(49) = {0.984807753, -0.15, -0.5, 1.0};
//+
Line(57) = {5, 42};Transfinite Line {57} = 25 Using Progression 1;
//+
Line(58) = {4, 43};Transfinite Line {58} = 25 Using Progression 1;
//+
Line(59) = {2, 44};Transfinite Line {59} = 25 Using Progression 1;
//+
Line(60) = {1, 45};Transfinite Line {60} = 25 Using Progression 1;


//+
Line(61) = {45, 44};Transfinite Line {61} = 20 Using Progression 1;
//+
Line(62) = {44, 43};Transfinite Line {62} = 20 Using Progression 1;
//+
Line(63) = {43, 42};Transfinite Line {63} = 20 Using Progression 1;


//+
Line(64) = {13, 46};Transfinite Line {64} = 25 Using Progression 1;
//+
Line(65) = {12, 49};Transfinite Line {65} = 25 Using Progression 1;
//+
Line(66) = {10, 48};Transfinite Line {66} = 25 Using Progression 1;
//+
Line(67) = {9, 47};Transfinite Line {67} = 25 Using Progression 1;



//+
Line(68) = {47, 48};Transfinite Line {68} = 20 Using Progression 1;
//+
Line(69) = {48, 49};Transfinite Line {69} = 20 Using Progression 1;
//+
Line(70) = {49, 46};Transfinite Line {70} = 20 Using Progression 1;



//+
Line Loop(1) = {3, -12, 16, 21};
//+
Plane Surface(1) = {1};
//+
Line Loop(2) = {16, -20, -13, 11};
//+
Plane Surface(2) = {2};
//+
Line Loop(3) = {13, -19, 9, 10};
//+
Plane Surface(3) = {3};
//+
Line Loop(4) = {2, -21, 17, 24};
//+
Plane Surface(4) = {4};
//+
Line Loop(5) = {14, -22, 8, 19};
//+
Plane Surface(5) = {5};
//+
Line Loop(6) = {1, -24, 18, -4};
//+
Plane Surface(6) = {6};
//+
Line Loop(7) = {18, 5, -15, 23};
//+
Plane Surface(7) = {7};
//+
Line Loop(8) = {15, 6, 7, 22};
//+
Plane Surface(8) = {8};
//+
Line Loop(9) = {17, -54, -38, 53};
//+
Plane Surface(9) = {9};
//+
Line Loop(10) = {54, -23, -55, -39};
//+
Plane Surface(10) = {10};
//+
Line Loop(11) = {55, -14, -56, -40};
//+
Plane Surface(11) = {11};
//+
Line Loop(12) = {53, -20, -56, 37};
//+
Plane Surface(12) = {12};
//+
Line Loop(13) = {25, 26, 27, 28};
//+
Plane Surface(13) = {13};
//+
Line Loop(14) = {43, -32, -44, 28};
//+
Plane Surface(14) = {14};
//+
Line Loop(15) = {25, 52, -29, -43};
//+
Plane Surface(15) = {15};
//+
Line Loop(16) = {52, 30, -47, -26};
//+
Plane Surface(16) = {16};
//+
Line Loop(17) = {27, 44, -31, -47};
//+
Plane Surface(17) = {17};
//+
Line Loop(18) = {35, -45, -31, 48};
//+
Plane Surface(18) = {18};
//+
Line Loop(19) = {45, 36, -41, -32};
//+
Plane Surface(19) = {19};
//+
Line Loop(20) = {48, -34, -50, 30};
//+
Plane Surface(20) = {20};
//+
Line Loop(21) = {41, 33, -50, -29};
//+
Plane Surface(21) = {21};
//+
Line Loop(22) = {49, 39, -46, -35};
//+
Plane Surface(22) = {22};
//+
Line Loop(23) = {46, 40, -42, -36};
//+
Plane Surface(23) = {23};
//+
Line Loop(24) = {38, -49, -34, 51};
//+
Plane Surface(24) = {24};
//+
Line Loop(25) = {51, -37, -42, 33};
//+
Plane Surface(25) = {25};
//+
Line Loop(26) = {10, 59, -61, -60};
//+
Plane Surface(26) = {26};
//+
Line Loop(27) = {11, 58, -62, -59};
//+
Plane Surface(27) = {27};
//+
Line Loop(28) = {12, 57, -63, -58};
//+
Plane Surface(28) = {28};
//+
Line Loop(29) = {6, 64, -70, -65};
//+
Plane Surface(29) = {29};
//+
Line Loop(30) = {5, 65,  -69, -66};
//+
Plane Surface(30) = {30};
//+
Line Loop(31) = {4, 66, -68, -67};
//+
Plane Surface(31) = {31};

Transfinite Surface {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,26,27,28,29,30,31};
Recombine Surface {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,26,27,28,29,30,31};

//+
Point(50) = {0.984807753, -0.5, 0.323648177, 1.0};
//+
Point(51) = {0.984807753, -0.15, 0.323648177, 1.0};
//+
Point(52) = {0.984807753, 0.15, 0.323648177, 1.0};
//+
Point(53) = {0.984807753, 0.5, 0.323648177, 1.0};
//+
Point(54) = {0.984807753, 0.5, 0.023648177, 1.0};
//+
Point(55) = {0.984807753, 0.15, 0.023648177, 1.0};
//+
Point(56) = {0.984807753, -0.15, 0.023648177, 1.0};
//+
Point(57) = {0.984807753, -0.5, 0.023648177, 1.0};







//+
Line(71) = {45, 50};Transfinite Line {71} = 20 Using Progression 1;
//+
Line(72) = {50, 57};Transfinite Line {72} = 20 Using Progression 1;
//+
Line(73) = {57, 46};Transfinite Line {73} = 20 Using Progression 1;


//+
Line(74) = {44, 51};Transfinite Line {74} = 20 Using Progression 1;
//+
Line(75) = {51, 56};Transfinite Line {75} = 20 Using Progression 1;
//+
Line(76) = {56, 49};Transfinite Line {76} = 20 Using Progression 1;


//+
Line(77) = {43, 52};Transfinite Line {77} = 20 Using Progression 1;
//+
Line(78) = {52, 55};Transfinite Line {78} = 20 Using Progression 1;
//+
Line(79) = {55, 48};Transfinite Line {79} = 20 Using Progression 1;


//+
Line(80) = {42, 53};Transfinite Line {80} = 20 Using Progression 1;
//+
Line(81) = {53, 54};Transfinite Line {81} = 20 Using Progression 1;
//+
Line(82) = {54, 47};Transfinite Line {82} = 20 Using Progression 1;

//+
Line(83) = {14, 57};Transfinite Line {83} = 25 Using Progression 1;

//+
Line(84) = {23, 56};Transfinite Line {84} = 25 Using Progression 1;
//+
Line(85) = {21, 55};Transfinite Line {85} = 25 Using Progression 1;
//+
Line(86) = {8, 54};Transfinite Line {86} = 25 Using Progression 1;


//+
Line(87) = {16, 50};Transfinite Line {87} = 25 Using Progression 1;
//+
Line(88) = {17, 51};Transfinite Line {88} = 25 Using Progression 1;
//+
Line(89) = {19, 52};Transfinite Line {89} = 25 Using Progression 1;
//+
Line(90) = {6, 53};Transfinite Line {90} = 25 Using Progression 1;
//+
Line(91) = {50, 51};Transfinite Line {91} = 20 Using Progression 1;
//+
Line(92) = {51, 52};Transfinite Line {92} = 20 Using Progression 1;
//+
Line(93) = {52, 53};Transfinite Line {93} = 20 Using Progression 1;


//+
Line(94) = {57, 56};Transfinite Line {94} = 20 Using Progression 1;
//+
Line(95) = {56, 55};Transfinite Line {95} = 20 Using Progression 1;
//+
Line(96) = {55, 54};Transfinite Line {96} = 20 Using Progression 1;

//+
Line Loop(32) = {9, 60, 71, -87};
//+
Plane Surface(32) = {32};
//+
Line Loop(33) = {13, 88, -74, -59};
//+
Plane Surface(33) = {33};
//+
Line Loop(34) = {16, 89, -77, -58};
//+
Plane Surface(34) = {34};
//+
Line Loop(35) = {57, 80, -90, 3};
//+
Plane Surface(35) = {35};
//+
Line Loop(36) = {71, 91, -74, -61};
//+
Plane Surface(36) = {36};
//+
Line Loop(37) = {74, 92, -77, -62};
//+
Plane Surface(37) = {37};
//+
Line Loop(38) = {77, 93, -80, -63};
//+
Plane Surface(38) = {38};
//+
Line Loop(39) = {87, 91, -88, -19};
//+
Plane Surface(39) = {39};
//+
Line Loop(40) = {88, 92, -89, -20};
//+
Plane Surface(40) = {40};
//+
Line Loop(41) = {89, 93, -90, -21};
//+
Plane Surface(41) = {41};
//+
Line Loop(42) = {8, 87, 72, -83};
//+
Plane Surface(42) = {42};
//+
Line Loop(43) = {14, 84, -75, -88};
//+
Plane Surface(43) = {43};
//+
Line Loop(44) = {85, -78, -89, 17};
//+
Plane Surface(44) = {44};
//+
Line Loop(45) = {81, -86, 2, 90};
//+
Plane Surface(45) = {45};
//+
Line Loop(46) = {83, 94, -84, -22};
//+
Plane Surface(46) = {46};
//+
Line Loop(47) = {84, 95, -85, -23};
//+
Plane Surface(47) = {47};
//+
Line Loop(48) = {85, 96, -86, -24};
//+
Plane Surface(48) = {48};
//+
Line Loop(49) = {72, 94, -75, -91};
//+
Plane Surface(49) = {49};




//+
Line Loop(51) = {78, 96, -81, -93};
//+
Plane Surface(51) = {51};
//+
Line Loop(52) = {7, 83, 73, -64};
//+
Plane Surface(52) = {52};
//+
Line Loop(53) = {65, -76, -84, 15};
//+
Plane Surface(53) = {53};
//+
Line Loop(54) = {79, -66, -18, 85};
//+
Plane Surface(54) = {54};
//+
Line Loop(55) = {82, -67, 1, 86};
//+
Plane Surface(55) = {55};
//+
Line Loop(56) = {73, -70, -76, -94};
//+
Plane Surface(56) = {56};
//+
Line Loop(57) = {76, -69, -79, -95};
//+
Plane Surface(57) = {57};
//+
Line Loop(58) = {79, -68, -82, -96};
//+
Plane Surface(58) = {58};


Transfinite Surface {32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,51,52,53,54,55,56,57,58};
Recombine Surface {32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,51,52,53,54,55,56,57,58};




//+
Extrude {0.984807753, 0, 0.173648177} {
  Surface{13}; Surface{16}; Surface{17}; Surface{15}; Surface{14}; Surface{21}; Surface{25}; Surface{23}; Surface{19}; Surface{18}; Surface{22}; Surface{20}; Surface{24}; Surface{9}; Surface{10}; Surface{11}; Surface{12}; Layers{25}; Recombine;
}

//+
Extrude {0.5, 0, 0} {
  Surface{56}; Surface{57}; Surface{58}; Surface{51}; Surface{49}; Surface{106}; Surface{109}; Surface{103}; Surface{111}; Surface{38}; Surface{37}; Surface{36}; Surface{73}; Surface{67}; Surface{70}; Surface{75}; Surface{63}; Surface{83}; Surface{97}; Surface{99}; Surface{79}; Surface{92}; Surface{95}; Surface{89}; Surface{87}; Layers{5}; Recombine;
}

//+
Extrude {-0.5, 0, 0} {
  Surface{1}; Surface{2}; Surface{3}; Surface{4}; Surface{5}; Surface{6}; Surface{7}; Surface{8}; Surface{10}; Surface{11}; Surface{12}; Surface{9}; Surface{13}; Surface{17}; Surface{14}; Surface{15}; Surface{16}; Surface{24}; Surface{20}; Surface{22}; Surface{18}; Surface{19}; Surface{23}; Surface{21}; Surface{25}; Layers{5}; Recombine;
}


//+
Surface Loop(180) = {32, 3, 26, 36, 33, 39};
//+
Volume(180) = {180};
//+
Surface Loop(190) = {33, 27, 2, 37, 34, 40};
//+
Volume(190) = {190};
//+
Surface Loop(200) = {34, 41, 35, 28, 1, 38};
//+
Volume(200) = {200};
//+
Surface Loop(210) = {42, 5, 49, 39, 46, 43};
//+
Volume(210) = {210};
//+
Surface Loop(220) = {44, 45, 51, 4, 48, 41};
//+
Volume(220) = {220};
//+
Surface Loop(230) = {52, 8, 29, 56, 53, 46};
//+
Volume(230) = {230};
//+
Surface Loop(240) = {53, 57, 30, 7, 54, 47};
//+
Volume(240) = {240};
//+
Surface Loop(250) = {54, 31, 6, 55, 58, 48};
//+
Volume(250) = {250};


Transfinite Volume {180,190,200,210,220,230,240,250};
Recombine Volume {180,190,200,210,220,230,240,250};

//+
Recursive Delete {
  Volume{1}; Volume{5}; Volume{4}; Volume{2}; Volume{3}; 
}
//+
Recursive Delete {
  Volume{8}; Volume{11}; Volume{13}; Volume{7}; 
}




//+
Physical Surface("frontWall") = {207, 32, 42, 52, 112, 129, 227, 216, 157};
//+
Physical Surface("backWall") = {150, 35, 197, 126, 45, 210, 122, 55, 218};
//+
Physical Surface("inlet") = {226, 29, 113, 222, 30, 117, 220, 31, 121};
//+
Physical Surface("outlet") = {208, 27, 204, 28, 158, 155, 151, 198, 26};
//+
Physical Surface("leftWall") = {245, 255, 252, 249, 257, 264, 261, 269, 267, 272, 274, 277, 276, 235, 238, 240, 232, 217, 209, 201, 205, 213, 221, 225, 228};
//+
Physical Surface("rightWall") = {176, 164, 175, 172, 168, 184, 186, 188, 180, 196, 195, 191, 193, 141, 145, 148, 137, 128, 152, 156, 159, 132, 116, 120, 124};
//+
Physical Surface("ptOuterWall") = {98, 81, 85, 94};
//+
Physical Surface("cOuterWall") = {90, 96, 77, 86};
//+
Physical Surface("cInnerWall") = {69, 74, 71, 65};
//+
Physical Surface("fuelLeftWall") = {13, 16, 15, 14, 17};
//+
Physical Surface("ptLeftWall") = {24, 25, 23, 22};
//+
Physical Surface("fuelRightWall") = {63, 67, 73, 75, 70};
//+
Physical Surface("ptRightWall") = {83, 87, 95, 99};
//+
Physical Volume("coolant") = {20, 21, 27, 250, 19, 48, 240, 18, 49, 230, 50, 47, 45, 44, 180, 43, 28, 200, 51, 210, 52, 15, 23, 24, 14, 46, 12, 10, 9, 6, 17, 190, 29, 53, 22, 16, 54, 60, 61, 59, 56, 62, 63, 55, 57, 58, 66, 67, 64, 65, 26, 31, 36, 37, 32, 39, 40, 34, 30, 38, 35, 33, 41, 42, 25, 220};


