D = 1;
R = 0.5;

xmin = 0;
xmax = 19.5;

ymin = 0;
ymax = 12;

zmin = -1;
zmax = 1;

lc = 0.1;

// Number of nodes in x, y and z directions
nx = 100;
ny = 100;
nz = 1;

Point(1) = {5.5, 5.97, -1, lc};
Point(2) = {9.5, 5.97, -1, lc};
Point(3) = {9.5, 6.03, -1, lc};
Point(4) = {5.5, 6.03, -1, lc};


Line(1) = {1, 2};
Line(2) = {2, 3};
Line(3) = {3, 4};
Line(4) = {4, 1};

// Definition of line loop and surface
Line Loop(1) = {1, 2, 3, 4};
Plane Surface(1) = {1};

// Definition of number of nodes on lines
Transfinite Line{1, 3} = 120 Using Progression 1.065;
Transfinite Line{2, 4} = 60  Using Progression 1.13;

// Definition of the corners of the mesh and creation of a structured
//hexahedral mesh
Transfinite Surface{1} = {1, 2, 3, 4};
Recombine Surface{1};

// Extrusion in the third dimension
Extrude{0,0,zmax-zmin}{
Surface{1};
Layers{nz};Recombine;
}

// Definition of surfaces for boundary conditions
Physical Surface("plateFix") ={25};
Physical Surface("plate") ={1, 26, 21, 13, 17};
//Physical Surface("frontAndBackPlanes") = {};

// Definition of a volume
Physical Volume("channel") = {1};

Mesh 4;
Save "flexible_beam1.msh";









