

Lcy = 1;      // longueur du cylindre    
    
c = 15;   	//nbr d'éléments sur la longueur du cylindre

Rcer = 0.4;   // rayon du cercle

a = 0.4;      // une arete du carré
     
Lca= a/2;

lc = 0.009;

Point(1) = {0,0,0,lc};

Point(2) = {Rcer,Rcer,0,lc};

Point(3) = {-Rcer,Rcer,0,lc};

Point(4) = {-Rcer,-Rcer,0,lc};


Point(5) = {Rcer,-Rcer,0,lc};

Circle(1) = {2,1,3};

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

Circle(3) = {4,1,5};

Circle(4) = {5,1,2};


Point(6) = {-Lca,Lca,0,lc};

Point(7) = {Lca,Lca,0,lc};

Point(8) = {Lca,-Lca,0,lc};

Point(9) = {-Lca,-Lca,0,lc};Line(5) = {7, 8};
Line(6) = {8, 9};
Line(7) = {9, 6};
Line(8) = {6, 7};
Line(9) = {6, 3};
Line(10) = {7, 2};
Line(11) = {9, 4};
Line(12) = {8, 5};
Line Loop(13) = {5, 6, 7, 8};
Plane Surface(14) = {13};
Line Loop(15) = {11, 3, -12, 6};
Plane Surface(16) = {15};
Line Loop(17) = {2, -11, 7, 9};
Plane Surface(18) = {17};
Line Loop(19) = {8, 10, 1, -9};
Plane Surface(20) = {19};
Line Loop(21) = {5, 12, 4, -10};
Plane Surface(22) = {21};



Transfinite Line {6} = 10 Using Progression 1;
Transfinite Line {5} = 10 Using Progression 1;
Transfinite Line {8} = 10 Using Progression 1;
Transfinite Line {7} = 10 Using Progression 1;
Transfinite Line {8} = 10 Using Progression 1;
Transfinite Line {9} = 10 Using Progression 1;
Transfinite Line {1} = 10 Using Progression 1;    // nbr d'él sur l'arcle de cercle
Transfinite Line {10} = 10 Using Progression 1;
Transfinite Line {2} = 10 Using Progression 1;	// nbr d'él sur l'arcle de cercle
Transfinite Line {11} = 10 Using Progression 1;
Transfinite Line {3} = 10 Using Progression 1;         // nbr d'él sur l'arcle de cercle
Transfinite Line {12} = 10 Using Progression 1;
Transfinite Line {4} = 10 Using Progression 1;      // nbr d'él sur l'arcle de cercle
Transfinite Line {10} = 10 Using Progression 1;
Recombine Surface {14};
Recombine Surface {20};
Recombine Surface {18};
Recombine Surface {16};
Recombine Surface {22};

Mesh.Smoothing = 100;
Transfinite Surface {14};
Transfinite Surface {20};
Transfinite Surface {18};
Transfinite Surface {16};
Transfinite Surface {22};



out[] = Extrude {0,0,Lcy} { Surface{14,16,18,20,22}; Layers{c}; Recombine; };  

Physical Volume(101) = {1, 2, 3, 4, 5, out[1]};

Physical Surface("outlet") = {22, 44, 110, 88, 66, 132};


Physical Surface("inlet") = {14, 20, 22, 16, 18};



Physical Surface("wall") = {127, 105, 75, 57};



Mesh.Format=2;
