//aerofoil suction part
ps_lc = 0.005;
Point(1) = {0.99591, 0.00228, 0, ps_lc};
Point(2) = {0.99591, 0.00228, 0.1, ps_lc };
Point(3) = {0.98332, 0.0053, 0, ps_lc };
Point(4) = {0.98332, 0.0053, 0.1, ps_lc };
Point(5) = {0.96256, 0.01018, 0, ps_lc};
Point(6) = {0.96256, 0.01018, 0.1, ps_lc };
Point(7) = {0.93397, 0.01672, 0, ps_lc};
Point(8) = {0.93397, 0.01672, 0.1, ps_lc };
Point(9) = {0.89801, 0.02463, 0, ps_lc };
Point(10) = {0.89801, 0.02463, 0.1, ps_lc };
Point(11) = {0.85526, 0.03361, 0, ps_lc };
Point(12) = {0.85526, 0.03361, 0.1, ps_lc };
Point(13) = {0.80644, 0.04331, 0, ps_lc };
Point(14) = {0.80644, 0.04331, 0.1, ps_lc};
Point(15) = {0.75236, 0.05339, 0, ps_lc };
Point(16) = {0.75236, 0.05339, 0.1, ps_lc };
Point(17) = {0.69393, 0.06349, 0, ps_lc };
Point(18) = {0.69393, 0.06349, 0.1, ps_lc };
Point(19) = {0.63212, 0.07325, 0, ps_lc };
Point(20) = {0.63212, 0.07325, 0.1, ps_lc };
Point(21) = {0.56799, 0.08233, 0, ps_lc };
Point(22) = {0.56799, 0.08233, 0.1, ps_lc };
Point(23) = {0.50264, 0.09037000000000001, 0, ps_lc };
Point(24) = {0.50264, 0.09037000000000001, 0.1, ps_lc };
Point(25) = {0.43719, 0.09705999999999999, 0, ps_lc };
Point(26) = {0.43719, 0.09705999999999999, 0.1, ps_lc };
Point(27) = {0.37278, 0.10208, 0, ps_lc };
Point(28) = {0.37278, 0.10208, 0.1, ps_lc };
Point(29) = {0.31051, 0.10521, 0, ps_lc };
Point(30) = {0.31051, 0.10521, 0.1, ps_lc };
Point(31) = {0.25148, 0.10627, 0, ps_lc };
Point(32) = {0.25148, 0.10627, 0.1, ps_lc };
Point(33) = {0.19674, 0.10519, 0, ps_lc};
Point(34) = {0.19674, 0.10519, 0.1, ps_lc };
Point(35) = {0.14722, 0.10201, 0, ps_lc };
Point(36) = {0.14722, 0.10201, 0.1, ps_lc };
Point(37) = {0.10381, 0.09684, 0, ps_lc };
Point(38) = {0.10381, 0.09684, 0.1, ps_lc };
Point(39) = {0.06726, 0.08992, 0, ps_lc };
Point(40) = {0.06726, 0.08992, 0.1, ps_lc };
Point(41) = {0.03818, 0.08151, 0, ps_lc };
Point(42) = {0.03818, 0.08151, 0.1, ps_lc };
Point(43) = {0.01707, 0.07189, 0, ps_lc };
Point(44) = {0.01707, 0.07189, 0.1, ps_lc };

//leading edge
edge_lc = 0.005;
Point(45) = {0, 0.05, 0, edge_lc};

//aerofoil pressure
ss_lc = 0.005;
Point(46) = {0, 0.05, 0.1, ss_lc };
Point(47) = {0.017, 0.02808, 0, ss_lc };
Point(48) = {0.017, 0.02808, 0.1, ss_lc };
Point(49) = {0.03794, 0.01835, 0, ss_lc };
Point(50) = {0.03794, 0.01835, 0.1, ss_lc };
Point(51) = {0.06672, 0.00963, 0, ss_lc };
Point(52) = {0.06672, 0.00963, 0.1, ss_lc };
Point(53) = {0.10283, 0.00209, 0, ss_lc};
Point(54) = {0.10283, 0.00209, 0.1, ss_lc };
Point(55) = {0.14567, -0.00415, 0, ss_lc };
Point(56) = {0.14567, -0.00415, 0.1, ss_lc };
Point(57) = {0.1945, -0.00902, 0, ss_lc };
Point(58) = {0.1945, -0.00902, 0.1, ss_lc };
Point(59) = {0.24852, -0.01252, 0, ss_lc };
Point(60) = {0.24852, -0.01252, 0.1, ss_lc };
Point(61) = {0.30681, -0.01473, 0, ss_lc };
Point(62) = {0.30681, -0.01473, 0.1, ss_lc };
Point(63) = {0.36841, -0.01581, 0, ss_lc };
Point(64) = {0.36841, -0.01581, 0.1, ss_lc };
Point(65) = {0.43228, -0.01596, 0, ss_lc};
Point(66) = {0.43228, -0.01596, 0.1, ss_lc };
Point(67) = {0.49736, -0.01537, 0, ss_lc };
Point(68) = {0.49736, -0.01537, 0.1, ss_lc };
Point(69) = {0.56253, -0.01428, 0, ss_lc };
Point(70) = {0.56253, -0.01428, 0.1, ss_lc };
Point(71) = {0.6267, -0.01287, 0, ss_lc };
Point(72) = {0.6267, -0.01287, 0.1, ss_lc };
Point(73) = {0.68876, -0.01128, 0, ss_lc };
Point(74) = {0.68876, -0.01128, 0.1, ss_lc };
Point(75) = {0.74764, -0.009639999999999999, 0, ss_lc };
Point(76) = {0.74764, -0.009639999999999999, 0.1, ss_lc };
Point(77) = {0.80232, -0.00801, 0, ss_lc };
Point(78) = {0.80232, -0.00801, 0.1, ss_lc };
Point(79) = {0.85184, -0.00646, 0, ss_lc };
Point(80) = {0.85184, -0.00646, 0.1, ss_lc };
Point(81) = {0.89535, -0.00503, 0, ss_lc };
Point(82) = {0.89535, -0.00503, 0.1, ss_lc };
Point(83) = {0.93206, -0.00377, 0, ss_lc };
Point(84) = {0.93206, -0.00377, 0.1, ss_lc };
Point(85) = {0.96132, -0.00271, 0, ss_lc };
Point(86) = {0.96132, -0.00271, 0.1, ss_lc };
Point(87) = {0.98261, -0.00192, 0, ss_lc};
Point(88) = {0.98261, -0.00192, 0.1, ss_lc };
Point(89) = {0.99554, -0.00142, 0, ss_lc };
Point(90) = {0.99554, -0.00142, 0.1, ss_lc };
Point(91) = {0.99987, -0.00125, 0, ss_lc };
Point(92) = {0.99987, -0.00125, 0.1, ss_lc };

//boundary 
bd_lc = 0.2;
Point(93) = {5, 4, 0, bd_lc};
Point(94) = {-5, 4, 0, bd_lc};
Point(95) = {-5, -4, 0, bd_lc};
Point(97) = {5, -4, 0, bd_lc};
Point(98) = {-5, 4, 0.1, bd_lc};
Point(99) = {-5, -4, 0.1, bd_lc};
Point(103) = {5, -4, 0.1, bd_lc};
Point(107) = {5, 4, 0.1, bd_lc};

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

//line at pressure side
Line(68) = {47, 48};
Line(69) = {45, 47};
Line(70) = {46, 48};
Line(71) = {49, 50};
Line(72) = {47, 49};
Line(73) = {48, 50};
Line(74) = {51, 52};
Line(75) = {49, 51};
Line(76) = {50, 52};
Line(77) = {53, 54};
Line(78) = {51, 53};
Line(79) = {52, 54};
Line(80) = {55, 56};
Line(81) = {53, 55};
Line(82) = {54, 56};
Line(83) = {57, 58};
Line(84) = {55, 57};
Line(85) = {56, 58};
Line(86) = {59, 60};
Line(87) = {57, 59};
Line(88) = {58, 60};
Line(89) = {61, 62};
Line(90) = {59, 61};
Line(91) = {60, 62};
Line(92) = {63, 64};
Line(93) = {61, 63};
Line(94) = {62, 64};
Line(95) = {65, 66};
Line(96) = {63, 65};
Line(97) = {64, 66};
Line(98) = {67, 68};
Line(99) = {65, 67};
Line(100) = {66, 68};
Line(101) = {69, 70};
Line(102) = {67, 69};
Line(103) = {68, 70};
Line(104) = {71, 72};
Line(105) = {69, 71};
Line(106) = {70, 72};
Line(107) = {73, 74};
Line(108) = {71, 73};
Line(109) = {72, 74};
Line(110) = {75, 76};
Line(111) = {73, 75};
Line(112) = {74, 76};
Line(113) = {77, 78};
Line(114) = {75, 77};
Line(115) = {76, 78};
Line(116) = {79, 80};
Line(117) = {77, 79};
Line(118) = {78, 80};
Line(119) = {81, 82};
Line(120) = {79, 81};
Line(121) = {80, 82};
Line(122) = {83, 84};
Line(123) = {81, 83};
Line(124) = {82, 84};
Line(125) = {85, 86};
Line(126) = {83, 85};
Line(127) = {84, 86};
Line(128) = {87, 88};
Line(129) = {85, 87};
Line(130) = {86, 88};
Line(131) = {89, 90};
Line(132) = {87, 89};
Line(133) = {88, 90};
Line(134) = {91, 92};
Line(135) = {89, 91};
Line(136) = {90, 92};
Line(137) = {1, 91};
Line(138) = {2, 92};

// line at boundary
Line(139) = {94, 95};
Line(140) = {95, 97};
Line(141) = {97, 93};
Line(142) = {93, 94};
Line(146) = {98, 99};
Line(147) = {99, 103};
Line(148) = {103, 107};
Line(149) = {107, 98};
Line(151) = {94, 98};
Line(152) = {95, 99};
Line(156) = {97, 103};
Line(160) = {93, 107};

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


//surface pressure side
Line Loop(22) = {62, 67, -65, -66};
Line Loop(23) = {65, 70, -68, -69};
Line Loop(24) = {68, 73, -71, -72};
Line Loop(25) = {71, 76, -74, -75};
Line Loop(26) = {74, 79, -77, -78};
Line Loop(27) = {77, 82, -80, -81};
Line Loop(28) = {80, 85, -83, -84};
Line Loop(29) = {83, 88, -86, -87};
Line Loop(30) = {86, 91, -89, -90};
Line Loop(31) = {89, 94, -92, -93};
Line Loop(32) = {92, 97, -95, -96};
Line Loop(33) = {95, 100, -98, -99};
Line Loop(34) = {98, 103, -101, -102};
Line Loop(35) = {101, 106, -104, -105};
Line Loop(36) = {104, 109, -107, -108};
Line Loop(37) = {107, 112, -110, -111};
Line Loop(38) = {110, 115, -113, -114};
Line Loop(39) = {113, 118, -116, -117};
Line Loop(40) = {116, 121, -119, -120};
Line Loop(41) = {119, 124, -122, -123};
Line Loop(42) = {122, 127, -125, -126};
Line Loop(43) = {125, 130, -128, -129};
Line Loop(44) = {128, 133, -131, -132};
Line Loop(45) = {131, 136, -134, -135};
Line Loop(46) = {1, 138, -134, -137};



//aerofoil bottom
Line Loop(47) = {3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45, 48, 51, 54, 57, 60, 63, 66, 69, 72, 75, 78, 81, 84, 87, 90, 93, 96, 99, 102, 105, 108, 111, 114, 117, 120, 123, 126, 129, 132, 135, -137};

//aerofoil top
Line Loop(48) = {4, 7, 10, 13, 16, 19, 22, 25, 28, 31, 34, 37, 40, 43, 46, 49, 52, 55, 58, 61, 64, 67, 70, 73, 76, 79, 82, 85, 88, 91, 94, 97, 100, 103, 106, 109, 112, 115, 118, 121, 124, 127, 130, 133, 136, -138};


//boundary surface
Line Loop(49) = {139, 140, 141, 142};
Line Loop(50) = {139, 152, -146, -151};
Line Loop(51) = {140, 156, -147, -152};
Line Loop(52) = {141, 160, -148, -156};
Line Loop(53) = {142, 151, -149, -160};
Line Loop(54) = {146, 147, 148, 149};

//combine all the surface to become one
Plane Surface(1) = {48, 54};
Plane Surface(2) = {47, 49};



// surface combination at suction
Plane Surface(3) = {1};
Plane Surface(4) = {2};
Plane Surface(5) = {3};
Plane Surface(6) = {4};
Plane Surface(7) = {5};
Plane Surface(8) = {6};
Plane Surface(9) = {7};
Plane Surface(10) = {8};
Plane Surface(11) = {9};
Plane Surface(12) = {10};
Plane Surface(13) = {11};
Plane Surface(14) = {12};
Plane Surface(15) = {13};
Plane Surface(16) = {14};
Plane Surface(17) = {15};
Plane Surface(18) = {16};
Plane Surface(19) = {17};
Plane Surface(20) = {18};
Plane Surface(21) = {19};
Plane Surface(22) = {20};
Plane Surface(23) = {21};
Plane Surface(24) = {22};

// surface combination at Pressure
Plane Surface(25) = {23};
Plane Surface(26) = {24};
Plane Surface(27) = {25};
Plane Surface(28) = {26};
Plane Surface(29) = {27};
Plane Surface(30) = {28};
Plane Surface(31) = {29};
Plane Surface(32) = {30};
Plane Surface(33) = {31};
Plane Surface(34) = {32};
Plane Surface(35) = {33};
Plane Surface(36) = {34};
Plane Surface(37) = {35};
Plane Surface(38) = {36};
Plane Surface(39) = {37};
Plane Surface(40) = {38};
Plane Surface(41) = {39};
Plane Surface(42) = {40};
Plane Surface(43) = {41};
Plane Surface(44) = {42};
Plane Surface(45) = {43};
Plane Surface(46) = {44};
Plane Surface(47) = {45};
Plane Surface(48) = {46};

//boundary surface
Plane Surface(50) = {50};
Plane Surface(51) = {51};
Plane Surface(52) = {52};
Plane Surface(53) = {53};


//top and bottom surface of aerofoil
Plane Surface(55) = {48};
Plane Surface(56) = {47};


// internal volume of boundary did not include aerofoil
Surface Loop(1) = {1, 2, 50, 51, 52, 53};
Volume(1) = {1};

//internal volume of aerofoil
Surface Loop(2) =  {56, 55, 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, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48};
Volume(2) = {2};


// physical group of domain
Physical Volume("domain") = {1};
Physical Surface("top") = {1};
Physical Surface("front") = {51};
Physical Surface("back") = {53};
Physical Surface("inlet") = {50};
Physical Surface("outlet") = {52};
Physical Surface("bottom") = {2};

//physical group of aerofoil
Physical Volume("aerofoil") = {2};
Physical Surface("atop") = {55};
Physical Surface("abottom") = {56};
Physical Surface("aftone") = (24);
Physical Surface("afttwo") = (25);
Physical Surface("forone") = (48);
Physical Surface("fortwo") = (47);


//physical group of aerofoil at starbourd side
Physical Surface("stbone") = {26};
Physical Surface("stbtwo") = {27};
Physical Surface("stbthree") = {28};
Physical Surface("stbfour") = {29};
Physical Surface("stbfive") = {30};
Physical Surface("stbsix") = {31};
Physical Surface("stbseven") = {32};
Physical Surface("stbeight") = {33};
Physical Surface("stbnine") = {34};
Physical Surface("stbten") = {35};
Physical Surface("stbeleven") = {36};
Physical Surface("stbtwelve") = {37};
Physical Surface("stbthirteen") = {38};
Physical Surface("stbfourteen") = {39};
Physical Surface("stbfifteen") = {40};
Physical Surface("stbsixteen") = {41};
Physical Surface("stbseventeen") = {42};
Physical Surface("stbeighteen") = {43};
Physical Surface("stbninteen") = {44};
Physical Surface("stbtwenty") = {45};
Physical Surface("stbtwentyone") = {46};

//physical group of aerofoil at port side
Physical Surface("prtone") = {23};
Physical Surface("prttwo") = {22};
Physical Surface("prtthree") = {21};
Physical Surface("prtfour") = {20};
Physical Surface("prtfive") = {19};
Physical Surface("prtsix") = {18};
Physical Surface("prttseven") = {17};
Physical Surface("prteight") = {16};
Physical Surface("prtnine") = {15};
Physical Surface("prtten") = {14};
Physical Surface("prteleven") = {13};
Physical Surface("prttwelve") = {12};
Physical Surface("prtthirteen") = {11};
Physical Surface("prtforteen") = {10};
Physical Surface("prtfifteen") = {9};
Physical Surface("prtsixteen") = {8};
Physical Surface("prtseventeen") = {7};
Physical Surface("prteighteen") = {6};
Physical Surface("prtninteen") = {5};
Physical Surface("prttwenty") = {4};
Physical Surface("prttwentione") = {3};



