1
// gmsh -3 my_cube_TPH_gmsh.mshcad -o my_cube_TPH-10.msh
2
// ../pbin/msh2geo < my_cube_TPH-10.msh | ../pbin/geo -upgrade -geo - > my_cube_TPH-10.geo
3
// Omega = ]a,b[x]c,d[x]f,g[
10
Point(1) = {a, c, f, hloc};
11
Point(2) = {b, c, f, hloc};
12
Point(3) = {b, cd, f, hloc};
13
Point(4) = {a, cd, f, hloc};
14
Point(5) = {a, c, fg, hloc};
15
Point(6) = {b, c, fg, hloc};
16
Point(7) = {b, cd, fg, hloc};
17
Point(8) = {a, cd, fg, hloc};
31
Line Loop(21) = {-1,-4,-3,-2};
32
Plane Surface(31) = {21} ;
33
Line Loop(22) = {5,6,7,8};
34
Plane Surface(32) = {22} ;
35
Line Loop(23) = {1,10,-5,-9};
36
Plane Surface(33) = {23} ;
37
Line Loop(24) = {12,-7,-11,3};
38
Plane Surface(34) = {24} ;
39
Line Loop(25) = {2,11,-6,-10};
40
Plane Surface(35) = {25} ;
41
Line Loop(26) = {9,-8,-12,4};
42
Plane Surface(36) = {26} ;
43
Surface Loop(41) = {31,32,33,34,35,36};
44
Volume(51) = {41}; // lower part: T
45
extr_y[] = Extrude{0,(d-c)/2,0}{ Surface{34}; Layers{n/2}; Recombine;}; // left part: P
46
extr_z[] = Extrude{0,0,(g-f)/2}{ Surface{32,extr_y[3]}; Layers{n/2}; Recombine;}; // upper part: P+H
47
Physical Surface("boundary") = {31, extr_y[5], extr_z[0], extr_z[6],
48
33,extr_z[2], 35, extr_y[4], extr_z[3], extr_z[9],
49
extr_y[0],extr_z[10], 36, extr_y[2], extr_z[5], extr_z[11]};
50
Physical Surface("bottom") = {31, extr_y[5]};
51
Physical Surface("top") = {extr_z[0], extr_z[6]};
52
Physical Surface("left") = {33,extr_z[2]};
53
Physical Surface("front") = {35, extr_y[4], extr_z[3], extr_z[9]};
54
Physical Surface("right") = {extr_y[0],extr_z[10]};
55
Physical Surface("back") = {36, extr_y[2], extr_z[5], extr_z[11]};
56
Physical Volume("internal") = {51,extr_y[1],extr_z[1],extr_z[7]};