-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcavity.geo
More file actions
45 lines (35 loc) · 1.42 KB
/
Copy pathcavity.geo
File metadata and controls
45 lines (35 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// Unit cube, purely hexahedral
lc = 1.0; // not really used since we set explicit divisions below
// 8 corner points of a 1x1x1 cube
Point(1) = {0, 0, 0, lc};
Point(2) = {1, 0, 0, lc};
Point(3) = {1, 1, 0, lc};
Point(4) = {0, 1, 0, lc};
Point(5) = {0, 0, 1, lc};
Point(6) = {1, 0, 1, lc};
Point(7) = {1, 1, 1, lc};
Point(8) = {0, 1, 1, lc};
// 12 edges
Line(1) = {1, 2}; Line(2) = {2, 3}; Line(3) = {3, 4}; Line(4) = {4, 1};
Line(5) = {5, 6}; Line(6) = {6, 7}; Line(7) = {7, 8}; Line(8) = {8, 5};
Line(9) = {1, 5}; Line(10) = {2, 6}; Line(11) = {3, 7}; Line(12) = {4, 8};
// 6 faces
Line Loop(1) = {1, 2, 3, 4}; Plane Surface(1) = {1}; // bottom
Line Loop(2) = {5, 6, 7, 8}; Plane Surface(2) = {2}; // top
Line Loop(3) = {1, 10, -5, -9}; Plane Surface(3) = {3}; // front
Line Loop(4) = {2, 11, -6, -10}; Plane Surface(4) = {4}; // right
Line Loop(5) = {3, 12, -7, -11}; Plane Surface(5) = {5}; // back
Line Loop(6) = {4, 9, -8, -12}; Plane Surface(6) = {6}; // left
Surface Loop(1) = {1, 2, 3, 4, 5, 6};
Volume(1) = {1};
// --- Number of cells per edge direction ---
N = 20; // 20x20x20 = 8,000 hex cells
Transfinite Line {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12} = N + 1;
Transfinite Surface {1, 2, 3, 4, 5, 6};
Recombine Surface {1, 2, 3, 4, 5, 6};
Transfinite Volume {1};
// Physical Surface & Volume Groups
Physical Surface("lid") = {2};
Physical Surface("walls") = {1, 3, 4, 5, 6};
Physical Volume("fluid") = {1};
Mesh 3;