cl__1 = 0.005;
Point(1001) = {1, 0.0003, 0, cl__1};
Point(1002) = {0.99039, 0.00284, 0, cl__1};
Point(1003) = {0.973469, 0.00729, 0, cl__1};
Point(1004) = {0.948439, 0.01357, 0, cl__1};
Point(1005) = {0.91573, 0.02193, 0, cl__1};
Point(1006) = {0.87592, 0.03242, 0, cl__1};
Point(1007) = {0.85355, 0.03845, 0, cl__1};
Point(1008) = {0.82967, 0.04501, 0, cl__1};
Point(1009) = {0.80438, 0.05197, 0, cl__1};
Point(1010) = {0.77779, 0.05936, 0, cl__1};
Point(1011) = {0.75, 0.066989, 0, cl__1};
Point(1012) = {0.72114, 0.07482, 0, cl__1};
Point(1013) = {0.69134, 0.08272, 0, cl__1};
Point(1014) = {0.66072, 0.09067, 0, cl__1};
Point(1015) = {0.62941, 0.09844, 0, cl__1};
Point(1016) = {0.59755, 0.10607, 0, cl__1};
Point(1017) = {0.56526, 0.11321, 0, cl__1};
Point(1018) = {0.5327, 0.11995, 0, cl__1};
Point(1019) = {0.5, 0.12585, 0, cl__1};
Point(1020) = {0.4673, 0.13095, 0, cl__1};
Point(1021) = {0.43474, 0.13467, 0, cl__1};
Point(1022) = {0.40245, 0.13691, 0, cl__1};
Point(1023) = {0.37059, 0.1369, 0, cl__1};
Point(1024) = {0.33928, 0.13537, 0, cl__1};
Point(1025) = {0.30866, 0.13243, 0, cl__1};
Point(1026) = {0.27866, 0.12848, 0, cl__1};
Point(1027) = {0.25, 0.12348, 0, cl__1};
Point(1028) = {0.22221, 0.11772, 0, cl__1};
Point(1029) = {0.19562, 0.11114, 0, cl__1};
Point(1030) = {0.17033, 0.10398, 0, cl__1};
Point(1031) = {0.14645, 0.09621, 0, cl__1};
Point(1032) = {0.12408, 0.08803, 0, cl__1};
Point(1033) = {0.10332, 0.07946, 0, cl__1};
Point(1034) = {0.08427, 0.07067, 0, cl__1};
Point(1035) = {0.066989, 0.0617, 0, cl__1};
Point(1036) = {0.05156, 0.05273, 0, cl__1};
Point(1037) = {0.03806, 0.04383, 0, cl__1};
Point(1038) = {0.02653, 0.0352, 0, cl__1};
Point(1039) = {0.01702, 0.02692, 0, cl__1};
Point(1040) = {0.00961, 0.01918, 0, cl__1};
Point(1041) = {0.00428, 0.01223, 0, cl__1};
Point(1042) = {0.00107, 0.00621, 0, cl__1};
Point(1043) = {0, 0, 0, cl__1};
Point(1044) = {0.00107, -0.00354, 0, cl__1};
Point(1045) = {0.00428, -0.00784, 0, cl__1};
Point(1046) = {0.00961, -0.01211, 0, cl__1};
Point(1047) = {0.01704, -0.01639, 0, cl__1};
Point(1048) = {0.02653, -0.02065, 0, cl__1};
Point(1049) = {0.03806, -0.02489, 0, cl__1};
Point(1050) = {0.05156, -0.02903, 0, cl__1};
Point(1051) = {0.0669899, -0.03307, 0, cl__1};
Point(1052) = {0.08427, -0.03695, 0, cl__1};
Point(1053) = {0.10332, -0.04063, 0, cl__1};
Point(1054) = {0.12408, -0.0441, 0, cl__1};
Point(1055) = {0.14645, -0.04729, 0, cl__1};
Point(1056) = {0.17033, -0.05022, 0, cl__1};
Point(1057) = {0.19562, -0.05279, 0, cl__1};
Point(1058) = {0.22221, -0.05503, 0, cl__1};
Point(1059) = {0.25, -0.05681, 0, cl__1};
Point(1060) = {0.27866, -0.0582, 0, cl__1};
Point(1061) = {0.30866, -0.05901, 0, cl__1};
Point(1062) = {0.33928, -0.05931, 0, cl__1};
Point(1063) = {0.37059, -0.0588, 0, cl__1};
Point(1064) = {0.40245, -0.05743, 0, cl__1};
Point(1065) = {0.43474, -0.05451, 0, cl__1};
Point(1066) = {0.4673, -0.05076, 0, cl__1};
Point(1067) = {0.5, -0.04628, 0, cl__1};
Point(1068) = {0.5327, -0.04161, 0, cl__1};
Point(1069) = {0.56526, -0.03667, 0, cl__1};
Point(1070) = {0.59755, -0.03186, 0, cl__1};
Point(1071) = {0.62941, -0.02707, 0, cl__1};
Point(1072) = {0.66072, -0.02256, 0, cl__1};
Point(1073) = {0.69134, -0.01827, 0, cl__1};
Point(1074) = {0.72114, -0.01435, 0, cl__1};
Point(1075) = {0.75, -0.0108, 0, cl__1};
Point(1076) = {0.77779, -0.00764, 0, cl__1};
Point(1077) = {0.80438, -0.00489, 0, cl__1};
Point(1078) = {0.82967, -0.0026, 0, cl__1};
Point(1079) = {0.85355, -0.00068, 0, cl__1};
Point(1080) = {0.87592, 0.0008, 0, cl__1};
Point(1081) = {0.91573, 0.00254, 0, cl__1};
Point(1082) = {0.948439, 0.00288, 0, cl__1};
Point(1083) = {0.973469, 0.00206, 0, cl__1};
Point(1084) = {0.99039, 0.00066, 0, cl__1};
Point(1085) = {1, -0.00025, 0, cl__1};
Spline(1000) = {1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085};

//trailing edge line, closing spline
Line(1) = {1001, 1085};

edge_lc = 0.2;

Point(2000) = {-2, 4, 0, edge_lc};
Point(2001) = {-2, -4, 0, edge_lc};
Point(2002) = {7, -4, 0, edge_lc};
Point(2003) = {7, 4, 0, edge_lc};

// outer boundary
Line(2) = {2000, 2001};
Line(3) = {2001, 2002};
Line(4) = {2002, 2003};
Line(5) = {2003, 2000};

// Create a boundary
Line Loop (1) = {2, 3, 4, 5};
// Tell gmsh the Spline should also be a line loop
Line Loop (2) = {1000};
//closing trailing edge line should also be a line loop and part of the boundary
Line Loop (3) = {1};
// Combine the three into a surface, gmsh makes a hole automagically
Plane Surface(1) = {1,2,3};


//creating and extruding the mesh to 3D required by OpenFoam
Extrude {0, 0, 1} {
Surface{1};
Layers{1};
Recombine;
}


//defining 3D surfaces
Physical Surface("back") = {1};
Physical Surface("front") = {1032};
Physical Surface("top") = {1023};
Physical Surface("outlet") = {1019};
Physical Surface("bottom") = {1015};
Physical Surface("inlet") = {1011};
Physical Surface("airfoil") = {1027, 1031};

Physical Volume("internal") = {1};



