| 1 |
END { |
| 2 |
Pi=3.14159265358979; |
| 3 |
i20=20; |
| 4 |
i8=8; |
| 5 |
r = 5; |
| 6 |
c0x = 1; |
| 7 |
c0y=0; |
| 8 |
print "Dimension",2; |
| 9 |
print "MaximalAngleOfCorner 46"; |
| 10 |
|
| 11 |
|
| 12 |
print "Vertices",i20+i20+i8; |
| 13 |
|
| 14 |
# the vertex on naca012 wing ( clock wise) |
| 15 |
for (i=-i20;i<i20;i++) { |
| 16 |
x = i/i20; |
| 17 |
x = x^4; |
| 18 |
t = 1.008930411365*x; |
| 19 |
y = 5*.12*(0.2969*sqrt(t) - 0.126*t - 0.3516*t^2 + 0.2843*t^3 - 0.1015*t^4); |
| 20 |
if(i<0) y=-y; |
| 21 |
print x,y,3;} |
| 22 |
|
| 23 |
# vertex on circle (counter clock wise) |
| 24 |
for (i=0;i<i8;i++) { |
| 25 |
t=i*Pi*2/i8; |
| 26 |
print c0x+r*(cos(t)),c0y+r*sin(t),5;} |
| 27 |
|
| 28 |
|
| 29 |
print "Edges",i20+i20+i8; |
| 30 |
|
| 31 |
# edge on wing |
| 32 |
k = 1 |
| 33 |
j = i20+i20-1; # previous points |
| 34 |
for (i=0;i<i20+i20;j=i++) |
| 35 |
{ print j+k,i+k,3;} # previous, current vertex |
| 36 |
|
| 37 |
# edge on circle |
| 38 |
k = i20+i20+1; |
| 39 |
j = i8-1;# previous points |
| 40 |
for (i=0;i<i8;j=i++) |
| 41 |
{ print k+j,k+i,5;} # previous, current vertex |
| 42 |
|
| 43 |
# one subdomain, region on left side of the wing |
| 44 |
# because clock wise sens. |
| 45 |
print "SubDomain",1; |
| 46 |
print 2,1,1,0; |
| 47 |
} |