Point (1) = {0, 0, 0, 50};
Point (2) = {0, 339.5, 0, 50};
Point (3) = {0, 393, 0, 50};
Point (4) = {0, 393, 434, 50};
Point (5) = {0, 385, 434, 50};
Point (6) = {0, 354.5, 434, 50};
Point (7) = {0, 0, 434, 50};
Point (8) = {0, 100, 1009, 50};
Point (9) = {0, 0, 1009, 50};
Point (10) = {0, 0, 1309, 50};
Point (11) = {0, 50, 1309, 50};
Point (12) = {0, 50, 1409, 50};
Point (13) = {0, 0, 1409, 50};
Point (14) = {0, 40, 1409, 50};
Point (16) = {0, 40, 721.5, 50};
Point (17) = {0, 0, 721.5, 50};
Line (1) = {3, 4};
Line (2) = {5, 4};
Line (3) = {2, 6};
Line (4) = {5, 8};
Line (5) = {8, 11};
Line (6) = {11, 12};
Line (7) = {6, 16};
Line (8) = {16, 14};
Line (9) = {3, 2};
Line (10) = {12, 14};

//surface to be rotated
Line Loop(11) = {9,3,7,8,-10,-6,-5,-4,2,-1};
Plane Surface(12) = {11};

//rotate surface
Extrude Surface {12, {0,0,1}, {0,0,0}, 2*Pi/3} {
  Recombine ; Layers { 6, 54, 1 } ; 
} ;

Extrude Surface {64, {0,0,1}, {0,0,0}, 2*Pi/3} {
  Recombine ; Layers { 6, 311, 1 } ; 
} ;

Extrude Surface {116, {0,0,1}, {0,0,0}, 2*Pi/3} {
  Recombine ; Layers { 6, 568, 1 } ; 
} ;

Surface Loop(168) = {55,59,63,27,31,35,39,43,47,51,167,131,135,139,143,147,151,155,159,163,83,87,91,95,99,103,107,111,115,79};
Volume(169) = {168};

//inlet
Physical Surface(170) = {27,79,131};
//outlet
Physical Surface(171) = {95,43,147};
//walls
Physical Surface(172) = {83,115,111,107,87,31,63,59,135,167,163,159,139,35,55,103,91,39,143,51,47,99,151,155};
//volume
Physical Volume(9000) = {169};
