
// Convert to meters

toM=1;

// Characteristic length
lc = 1*toM;

//Height and radius

//Aspect ratio Teta=D/h

D=0.29;

R=D*0.5*toM;

h=R*toM;

r=R/1.5*toM;

w=R*0.5;
W=R*0.6;

Ru=Sqrt(R*R-W*W);




Point(1) = {0,0,0,lc};
Point(2) = {R,0,0,lc};
Point(4) = {0,R,0,lc};
Point(3) = {R,R,0,lc};

Point(5) = {0,0,R,lc};
Point(6) = {R,0,R,lc};
Point(7) = {0,R,R,lc};
Point(8) = {R,R,R,lc};



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

Line (5) = {1,5};
Line (6) = {2,6};
Line (7) = {3,8};
Line (8) = {4,7};

Line (9) = {5,6};
Line (10) = {6,8};
Line (11) = {8,7};
Line (12) = {7,5};


nodes1=7;
nodes2=4;


Transfinite Line {1,2,3,4,9,10,11,12} =nodes1;
Transfinite Line {5,6,7,8} =nodes1;


Line Loop (1) ={-1,-4,-3,-2};
Plane Surface (1)={1};

Line Loop (2) ={1,6,-9,-5};
Ruled Surface (2)={2};

Line Loop (3) ={2,7,-10,-6};
Plane Surface (3)={3};

Line Loop (4) ={3,8,-11,-7};
Plane Surface (4)={4};

Line Loop (5) ={4,5,-12,-8};
Plane Surface (5)={5};

Line Loop (6) ={9,10,11,12};
Plane Surface (6)={6};


Transfinite Surface {1} = {1,4,3,2};
Transfinite Surface {2} = {1,2,5,6};
Transfinite Surface {3} = {6,8,2,3};
Transfinite Surface {4} = {3,4,7,8};
Transfinite Surface {5} = {4,1,5,7};
Transfinite Surface {6} = {5,6,7,8};


Recombine Surface {1,2,3,4,5,6};

Surface Loop (1) = {1,2,3,4,5,6};
Volume (1) = {1};


Transfinite Volume {1} = {1,2,3,4,5,6,7,8};




//Physical Surface("Wall") = {2,3,4,5,37,54,59,76,81,102,103,120,125} ;


//Physical Volume ("internalField") = {1};




