-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmesh.edp
44 lines (42 loc) · 1.61 KB
/
mesh.edp
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
//Parameters:
//
// real x0: x translation of the body.
//
// real la: length of half horizontal chord
//
// real lb: length of half vertical chord
//
real x0 = -1.0;
real la = 1;
real lb = 0.2;
//
// External infinite boundary is a rectangle
//
border lower(t=0,1){x=-18+36*t; y=-18;label=1;};
border outlet(t=0,1){x=18; y=-18+36*t;label=2;};
border upper(t=0,1){x=18-36*t; y=18;label=3;};
border inlet(t=0,1){x=-18; y=18-36*t;label=4;};
//
// Body is a double wedged-airfoil
//
border l1b(t=1,0.8){x=x0+la*t; y=(lb/la)*la*t-lb;label=5;};
border l1(t=0.8,0.2){x=x0+la*t; y=(lb/la)*la*t-lb;label=5;};
border l1c(t=0.2,0){x=x0+la*t; y=(lb/la)*la*t-lb;label=5;};
border l2c(t=1,0.8){x=x0+la*(1-t); y=-(lb/la)*la*(1-t)+lb;label=5;};
border l2(t=0.8,0.2){x=x0+la*(1-t); y=-(lb/la)*la*(1-t)+lb;label=5;};
border l2b(t=0.2,0){x=x0+la*(1-t); y=-(lb/la)*la*(1-t)+lb;label=5;};
border l3b(t=0,0.2){x=x0+la*(-1+t); y=(lb/la)*la*(-1+t)+lb;label=5;};
border l3(t=0.2,0.8){x=x0+la*(-1+t); y=(lb/la)*la*(-1+t)+lb;label=5;};
border l3c(t=0.8,1){x=x0+la*(-1+t); y=(lb/la)*la*(-1+t)+lb;label=5;};
border l4c(t=0,0.2){x=x0+la*(-t); y=-(lb/la)*la*(-t)-lb;label=5;};
border l4(t=0.2,0.8){x=x0+la*(-t); y=-(lb/la)*la*(-t)-lb;label=5;};
border l4b(t=0.8,1){x=x0+la*(-t); y=-(lb/la)*la*(-t)-lb;label=5;};
//
// Define and save the mesh.
//
int n = 10;
mesh Th = buildmesh(lower(2*n) + outlet(2*n) + upper(2*n) + inlet(2*n)
+ l1(0.4*n) + l2(0.4*n) + l3(0.4*n) + l4(0.4*n)
+ l1b(0.3*n) + l2b(0.2*n) + l3b(0.3*n) + l4b(0.2*n)
+ l1c(0.2*n) + l2c(0.3*n) + l3c(0.2*n) + l4c(0.3*n));
savemesh(Th,"mesh.msh");