// Gmsh project created on Mon Dec 18 13:01:03 2017
// Gmsh project created on Thu Dec 14 16:36:21 2017
// Gmsh project created on Wed Dec 13 11:08:40 2017
//Nozzle diameter D
D=2;
//Nozzle Length LN
LN=1;
//DOmain length L
L=30*D;
//Domain Width W
W=10*D;
//Magnification h
h=1;

//+
Point(1) = {0, 0, 0, h};
//+
Point(2) = {0, 0.5*D, 0, h};
//+
Point(3) = {0, -0.5*D, 0, h};
//+
Point(4) = {-1*LN, -0.5*D, 0, h};
//+
Point(5) = {-1*LN, 0.5*D, 0, h};
//+
Point(6) = {0, W/2, 0, 1.0};
//+
Point(7) = {0, -W/2, 0, 1.0};
//+
Point(8) = {L, -W/2, 0, 1.0};
//+
Point(9) = {L, W/2, 0, 1.0};
//+
Point(10) = {L, 0, 0, 1.0};
//+
Point(20) = {L, 0.5*D, 0, 1.0};
//+
Point(21) = {L, -0.5*D, 0, 1.0};
//+
Line(1) = {2, 3};
//+
Line(2) = {6, 9};
//+
Line(3) = {9, 20};
//+
Line(4) = {8, 7};
//+
Line(5) = {3, 7};
//+
Line(6) = {3, 4};

//+
Line(8) = {5, 2};
//+
Line(9) = {4, 5};
//+
Line(10) = {8, 21};
//+
Line(11) = {2, 20};
//+
Line(14) = {6, 2};
//+
Line(15) = {20, 21};
//+
Line(16) = {3, 21};

//surfaces

b=30;
n=1;//1.15
m=1;//3
v=300;

//top surf
//+
Line Loop(1) = {5, -4, 10,-16 };
//+
Plane Surface(1) = {1};
//+
Transfinite Line {4,16} = v Using Bump m;
//+
Transfinite Line {5} = b Using Progression n;
//+
Transfinite Line {14} = b Using Progression 1/n;
//+
Transfinite Line {10} = b Using Bump 1;//5
//+
Transfinite Line {11} = v Using Bump m;
//+

//+
//Bottom surf
Line Loop(2) = {2, 3, -11, -14};
//+
Plane Surface(2) = {2};
//+
Transfinite Line {2,11} = v Using Bump m;
//+
Transfinite Line {1} = b Using Progression n;
//+
Transfinite Line {3} = b Using Bump 1; //5

//+
Line Loop(3) = {8, 1, 6, 9};
//+
Plane Surface(3) = {3};
//+
Transfinite Line {8, 6} = 10 Using Progression 1;
//+
Transfinite Line {9, 1,15} = 10 Using Progression 1;

//+
Line Loop(4) = {11, 15, -16, -1};
//+
Plane Surface(4) = {4};
//+
Transfinite Surface {4};
//+
Transfinite Surface {3};
//+
Transfinite Surface {2};
//+
Transfinite Surface {1};
//+
Recombine Surface {4};
//+
Recombine Surface {2};
//+
Recombine Surface {3};
//+
Recombine Surface {1};
//+
Physical Line("Inlet") = {9};
//+
Physical Line("44") = {5, 4, 10, 15, 3, 2, 14};
//+
Physical Line("22") = {8, 6};//wall
//+
Physical Surface("55") = {4, 2, 1, 3};
