SetFactory("Built-in");

density = 0.001;
lp = 160;
Point(1) = {0.999985, 0.000254, 0.0, density};
Point(2) = {0.99406, 0.000877, 0.0, density};
Point(3) = {0.982067, 0.002158, 0.0, density};
Point(4) = {0.968523, 0.00357, 0.0, density};
Point(5) = {0.954679, 0.004997, 0.0, density};
Point(6) = {0.940794, 0.006406, 0.0, density};
Point(7) = {0.926907, 0.007801, 0.0, density};
Point(8) = {0.913017, 0.009183, 0.0, density};
Point(9) = {0.899126, 0.010558, 0.0, density};
Point(10) = {0.885237, 0.011924, 0.0, density};
Point(11) = {0.871348, 0.01328, 0.0, density};
Point(12) = {0.857464, 0.014625, 0.0, density};
Point(13) = {0.843579, 0.01596, 0.0, density};
Point(14) = {0.829697, 0.017281, 0.0, density};
Point(15) = {0.815815, 0.018589, 0.0, density};
Point(16) = {0.80193, 0.019883, 0.0, density};
Point(17) = {0.78805, 0.021162, 0.0, density};
Point(18) = {0.774167, 0.022424, 0.0, density};
Point(19) = {0.760282, 0.023672, 0.0, density};
Point(20) = {0.746399, 0.024905, 0.0, density};
Point(21) = {0.732513, 0.026123, 0.0, density};
Point(22) = {0.718624, 0.027325, 0.0, density};
Point(23) = {0.704739, 0.028513, 0.0, density};
Point(24) = {0.690854, 0.029685, 0.0, density};
Point(25) = {0.676966, 0.030839, 0.0, density};
Point(26) = {0.663082, 0.031975, 0.0, density};
Point(27) = {0.649202, 0.03309, 0.0, density};
Point(28) = {0.635318, 0.03418, 0.0, density};
Point(29) = {0.621435, 0.035246, 0.0, density};
Point(30) = {0.607557, 0.036286, 0.0, density};
Point(31) = {0.593678, 0.0373, 0.0, density};
Point(32) = {0.579799, 0.038286, 0.0, density};
Point(33) = {0.565925, 0.039244, 0.0, density};
Point(34) = {0.552052, 0.04017, 0.0, density};
Point(35) = {0.538178, 0.041065, 0.0, density};
Point(36) = {0.524307, 0.041927, 0.0, density};
Point(37) = {0.510442, 0.042754, 0.0, density};
Point(38) = {0.496577, 0.043544, 0.0, density};
Point(39) = {0.482711, 0.044298, 0.0, density};
Point(40) = {0.468851, 0.045013, 0.0, density};
Point(41) = {0.454997, 0.045687, 0.0, density};
Point(42) = {0.441142, 0.04632, 0.0, density};
Point(43) = {0.427293, 0.04691, 0.0, density};
Point(44) = {0.413451, 0.047453, 0.0, density};
Point(45) = {0.39961, 0.047949, 0.0, density};
Point(46) = {0.385774, 0.048396, 0.0, density};
Point(47) = {0.371948, 0.04879, 0.0, density};
Point(48) = {0.358127, 0.04913, 0.0, density};
Point(49) = {0.34431, 0.049414, 0.0, density};
Point(50) = {0.330505, 0.049638, 0.0, density};
Point(51) = {0.316712, 0.049797, 0.0, density};
Point(52) = {0.302923, 0.049888, 0.0, density};
Point(53) = {0.28915, 0.049911, 0.0, density};
Point(54) = {0.275394, 0.049856, 0.0, density};
Point(55) = {0.261644, 0.049721, 0.0, density};
Point(56) = {0.247916, 0.0495, 0.0, density};
Point(57) = {0.234209, 0.049186, 0.0, density};
Point(58) = {0.220519, 0.048772, 0.0, density};
Point(59) = {0.20686, 0.04825, 0.0, density};
Point(60) = {0.193233, 0.04761, 0.0, density};
Point(61) = {0.179639, 0.046842, 0.0, density};
Point(62) = {0.166099, 0.045935, 0.0, density};
Point(63) = {0.152607, 0.044871, 0.0, density};
Point(64) = {0.139184, 0.043639, 0.0, density};
Point(65) = {0.125846, 0.042218, 0.0, density};
Point(66) = {0.112599, 0.040587, 0.0, density};
Point(67) = {0.099488, 0.038723, 0.0, density};
Point(68) = {0.086527, 0.036593, 0.0, density};
Point(69) = {0.073782, 0.034165, 0.0, density};
Point(70) = {0.061297, 0.031395, 0.0, density};
Point(71) = {0.049192, 0.028241, 0.0, density};
Point(72) = {0.037643, 0.024669, 0.0, density};
Point(73) = {0.027028, 0.020699, 0.0, density};
Point(74) = {0.018045, 0.016557, 0.0, density};
Point(75) = {0.011377, 0.01272, 0.0, density};
Point(76) = {0.006944, 0.009528, 0.0, density};
Point(77) = {0.004076, 0.006955, 0.0, density};
Point(78) = {0.002198, 0.004819, 0.0, density};
Point(79) = {0.000966, 0.002984, 0.0, density};
Point(80) = {0.000232, 0.001348, 0.0, density};
Point(81) = {0.0, -0.000158, 0.0, density};
Point(82) = {0.000353, -0.001632, 0.0, density};
Point(83) = {0.001387, -0.003053, 0.0, density};
Point(84) = {0.003064, -0.004384, 0.0, density};
Point(85) = {0.005465, -0.00574, 0.0, density};
Point(86) = {0.008937, -0.007231, 0.0, density};
Point(87) = {0.014154, -0.008951, 0.0, density};
Point(88) = {0.021949, -0.010873, 0.0, density};
Point(89) = {0.032246, -0.012732, 0.0, density};
Point(90) = {0.044105, -0.014262, 0.0, density};
Point(91) = {0.056736, -0.01545, 0.0, density};
Point(92) = {0.069736, -0.016335, 0.0, density};
Point(93) = {0.082955, -0.016967, 0.0, density};
Point(94) = {0.096323, -0.017399, 0.0, density};
Point(95) = {0.109792, -0.017665, 0.0, density};
Point(96) = {0.123336, -0.017797, 0.0, density};
Point(97) = {0.136936, -0.017812, 0.0, density};
Point(98) = {0.150585, -0.017728, 0.0, density};
Point(99) = {0.164266, -0.017555, 0.0, density};
Point(100) = {0.177981, -0.017301, 0.0, density};
Point(101) = {0.191719, -0.016977, 0.0, density};
Point(102) = {0.205476, -0.016593, 0.0, density};
Point(103) = {0.219253, -0.016155, 0.0, density};
Point(104) = {0.233046, -0.015669, 0.0, density};
Point(105) = {0.24685, -0.015141, 0.0, density};
Point(106) = {0.260671, -0.014578, 0.0, density};
Point(107) = {0.274503, -0.013983, 0.0, density};
Point(108) = {0.288347, -0.013366, 0.0, density};
Point(109) = {0.302207, -0.012732, 0.0, density};
Point(110) = {0.316079, -0.01208, 0.0, density};
Point(111) = {0.329962, -0.011417, 0.0, density};
Point(112) = {0.343862, -0.010744, 0.0, density};
Point(113) = {0.357774, -0.010065, 0.0, density};
Point(114) = {0.371698, -0.009382, 0.0, density};
Point(115) = {0.385636, -0.008701, 0.0, density};
Point(116) = {0.399584, -0.008019, 0.0, density};
Point(117) = {0.413536, -0.007342, 0.0, density};
Point(118) = {0.427477, -0.006673, 0.0, density};
Point(119) = {0.441406, -0.006013, 0.0, density};
Point(120) = {0.455325, -0.005363, 0.0, density};
Point(121) = {0.469238, -0.004729, 0.0, density};
Point(122) = {0.48314, -0.004112, 0.0, density};
Point(123) = {0.497034, -0.003513, 0.0, density};
Point(124) = {0.510923, -0.002931, 0.0, density};
Point(125) = {0.524811, -0.002372, 0.0, density};
Point(126) = {0.538693, -0.001834, 0.0, density};
Point(127) = {0.552571, -0.001319, 0.0, density};
Point(128) = {0.566445, -0.000828, 0.0, density};
Point(129) = {0.580319, -0.000364, 0.0, density};
Point(130) = {0.594185, 7.5e-05, 0.0, density};
Point(131) = {0.608049, 0.000486, 0.0, density};
Point(132) = {0.621908, 0.00087, 0.0, density};
Point(133) = {0.635763, 0.001224, 0.0, density};
Point(134) = {0.649612, 0.001549, 0.0, density};
Point(135) = {0.66346, 0.001844, 0.0, density};
Point(136) = {0.677307, 0.002109, 0.0, density};
Point(137) = {0.691153, 0.002342, 0.0, density};
Point(138) = {0.704999, 0.002543, 0.0, density};
Point(139) = {0.718847, 0.002714, 0.0, density};
Point(140) = {0.732698, 0.002851, 0.0, density};
Point(141) = {0.746549, 0.002956, 0.0, density};
Point(142) = {0.760403, 0.003032, 0.0, density};
Point(143) = {0.774259, 0.003071, 0.0, density};
Point(144) = {0.788116, 0.00308, 0.0, density};
Point(145) = {0.801978, 0.003057, 0.0, density};
Point(146) = {0.815846, 0.002999, 0.0, density};
Point(147) = {0.829713, 0.002909, 0.0, density};
Point(148) = {0.843583, 0.002787, 0.0, density};
Point(149) = {0.857456, 0.002632, 0.0, density};
Point(150) = {0.871329, 0.002447, 0.0, density};
Point(151) = {0.885203, 0.002232, 0.0, density};
Point(152) = {0.899081, 0.001983, 0.0, density};
Point(153) = {0.912957, 0.001702, 0.0, density};
Point(154) = {0.926835, 0.001395, 0.0, density};
Point(155) = {0.940713, 0.001061, 0.0, density};
Point(156) = {0.954593, 0.000693, 0.0, density};
Point(157) = {0.968446, 0.000298, 0.0, density};
Point(158) = {0.982051, -0.000118, 0.0, density};
Point(159) = {0.994064, -0.000501, 0.0, density};
Point(160) = {1.000004, -0.000685, 0.0, density};
Spline(1) = {1 : 160};
Line(2) = {160, 1};
Curve Loop(1) = {1, 2};

// Definition of the close field
Point (1001) = {-0.25, 0.3, 0, 0.05};
Point (1002) = {1.1, 0.3, 0, 0.01};
Point (1003) = {1.1, -0.3, 0, 0.01};
Point (1004) = {-0.25, -0.3, 0, 0.05};
Line(100) = {1001, 1002};
Line(101) = {1002, 1003};
Line(102) = {1003, 1004};
Line(103) = {1004, 1001};

Curve Loop(2) = {100, 101, 102, 103};
Plane Surface(1) = {2, 1};

// Meshing of the Boundary Layer on the airfoil
Field[1] = BoundaryLayer;
Field[1].EdgesList = {1, 2};
Field[1].AnisoMax = 10000000000;
Field[1].NodesList = {1, lp};
Field[1].FanNodesList = {1, lp};
Field[1].hfar = 0.0001;
Field[1].hwall_n_nodes = {1, 0.00003, lp, 0.00003};
Field[1].thickness = 0.004;
Field[1].ratio = 1.1;
Field[1].Quads = 1;
Field[1].IntersectMetrics = 1;
BoundaryLayer Field = 1;
