-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetupVR12duct.m
190 lines (179 loc) · 6.55 KB
/
setupVR12duct.m
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
function [xep, rep, rad, Vex, naf] = setupVR12duct( chord, alpha, xoff, roff, flipaf )
M=[1.0114441520951634, 0.0008603588621713
1.0078816173659302, 0.0010594774858371
1.0040261891456939, 0.0012749666302815
0.9998562349462619, 0.0015078620249825
0.9953509807785254, 0.0017887515413776
0.9904889447946528, 0.0021528238344522
0.9852461953357083, 0.0026100547763930
0.9795977576412399, 0.0031651235578752
0.9735178710493703, 0.0038256110758720
0.9669795975156359, 0.0045971936233186
0.9599557392777809, 0.0054919315997631
0.9524231787297139, 0.0065450545646550
0.9443585746366674, 0.0078006093908206
0.9357262541957397, 0.0092154676729752
0.9264939283146112, 0.0107646313309828
0.9166352818034065, 0.0124703984291863
0.9061134881086212, 0.0142810173480969
0.8949017999579607, 0.0161971928199156
0.8829788078420682, 0.0182398470548043
0.8703252717013870, 0.0204277207248031
0.8569217593614193, 0.0227606529647171
0.8427473404040355, 0.0252084165893256
0.8277909010604733, 0.0277737025674380
0.8120410793804737, 0.0304256492953862
0.7954871618537152, 0.0331039115746154
0.7781378649958643, 0.0358296267165459
0.7600163293658810, 0.0386701302119804
0.7411393403731825, 0.0416112770734396
0.7215282689782399, 0.0446191709855957
0.7012165046590750, 0.0476879084917920
0.6802301194228348, 0.0507020275433310
0.6586150666978373, 0.0536324872636258
0.6364285004341629, 0.0564583047190238
0.6137323524842345, 0.0591561801962213
0.5905918927599146, 0.0616369678522993
0.5670803750567471, 0.0638663333050939
0.5432902133197836, 0.0659093164926339
0.5193085097089470, 0.0677746906481002
0.4952213171737418, 0.0693986810254590
0.4711156064303400, 0.0707297219867352
0.4470893618422507, 0.0718864254379557
0.4232350760368611, 0.0729484121519622
0.3996349982994596, 0.0738111186037436
0.3763688944022765, 0.0744090510218863
0.3535166585884617, 0.0748035061806493
0.3311521324531312, 0.0750359503516795
0.3093393992208178, 0.0751109522936967
0.2881376269612776, 0.0750524456869033
0.2675957740218194, 0.0748725421308811
0.2477580244661967, 0.0745581192911474
0.2286557902820605, 0.0741592349524751
0.2103200802494105, 0.0736209344183075
0.1927754629655380, 0.0728629280778855
0.1760235489536418, 0.0719836128917037
0.1600871929307242, 0.0708911534615784
0.1449796769211872, 0.0695016766756727
0.1306747652767987, 0.0679324613319048
0.1171922423130213, 0.0661032807711184
0.1045258577721149, 0.0639891741114843
0.0926516109480793, 0.0616547347478731
0.0815836096211062, 0.0590342669174632
0.0712895411030410, 0.0561840819432526
0.0618163266413878, 0.0529741204410469
0.0531068332041595, 0.0495345824736983
0.0451229584602935, 0.0459577489893711
0.0378021577786515, 0.0423450365575646
0.0311445313772118, 0.0386700268811053
0.0251969507747870, 0.0348248633619456
0.0198825972443428, 0.0309379536693168
0.0151779445197008, 0.0270306401007998
0.0110866405727931, 0.0230983855054154
0.0076143424254968, 0.0191452338795542
0.0047860153768671, 0.0151759746738412
0.0026148633240498, 0.0112190448538094
0.0011137924272347, 0.0073221969047201
0.0002631215388228, 0.0035561345575862
0.0000000000000000, 0.0000000000000000
0.0009805002522131, -0.0033166545794600
0.0034131488186314, -0.0062173625286246
0.0066539700700101, -0.0086973620455084
0.0105554062102541, -0.0107583177123038
0.0150259027397783, -0.0124138311552803
0.0200340350791810, -0.0136072256482367
0.0254810707174286, -0.0146805164018437
0.0313866620121998, -0.0156301132274185
0.0377631882190040, -0.0165303325440078
0.0446316197865141, -0.0174182384889000
0.0520152779863808, -0.0183312881005404
0.0599467259415153, -0.0192379285110348
0.0684570629124054, -0.0201190746126169
0.0775754456899354, -0.0209526479723180
0.0873316324607578, -0.0217218077706786
0.0977462957704929, -0.0224888050382176
0.1088463056387578, -0.0232425137596247
0.1206553426552454, -0.0239803939508243
0.1331956168166911, -0.0246913319917700
0.1464854231211347, -0.0253777005624590
0.1605390646534045, -0.0260439429246788
0.1753685848823170, -0.0266739433418908
0.1909794574178825, -0.0272746595590925
0.2073716252781282, -0.0278550766416243
0.2245407520259948, -0.0284018740598127
0.2424752771659489, -0.0289067055608228
0.2611563586998181, -0.0293619487983497
0.2805587335137376, -0.0297560538281662
0.3006483317173191, -0.0301109519965492
0.3213838586117880, -0.0304413224998584
0.3427172355012185, -0.0307220242687483
0.3645926798506630, -0.0309292146709599
0.3869474487430462, -0.0310607352072024
0.4097119274855092, -0.0311095967448151
0.4328113944758031, -0.0310683912213507
0.4561661290782071, -0.0309706808227144
0.4796929937985859, -0.0308258058753185
0.5033061540431470, -0.0306162495682843
0.5269185705420311, -0.0303363145017915
0.5504433951013368, -0.0299935393545399
0.5737949713290234, -0.0295949930334556
0.5968898475817712, -0.0291338751000979
0.6196483508982077, -0.0286060120654575
0.6419955137748256, -0.0280100454723717
0.6638615709306830, -0.0273370570656099
0.6851840059550871, -0.0265986850068384
0.7059075440897018, -0.0258199904859674
0.7259834292005566, -0.0249987014112349
0.7453698933897248, -0.0241220001047346
0.7640343576381112, -0.0232083330898507
0.7819517985979475, -0.0222800848283643
0.7991038704980334, -0.0213406555790044
0.8154785696821141, -0.0203870041268015
0.8310712197790078, -0.0194260128860595
0.8458826676306721, -0.0184630004290183
0.8599216231513547, -0.0175289202091922
0.8731956618910544, -0.0165856278956276
0.8857143999930209, -0.0155707219433892
0.8974983958718830, -0.0145039342276494
0.9085743089496533, -0.0134523179075312
0.9189682904309023, -0.0124439839196273
0.9287060271404022, -0.0114716680278697
0.9378167106219160, -0.0105536799806771
0.9463318156875924, -0.0097158132979337
0.9542683360177242, -0.0088578333738870
0.9616511922888851, -0.0079391596104640
0.9685128596331840, -0.0069998415623416
0.9748804469377526, -0.0060406040384736
0.9807876807919059, -0.0050980490222185
0.9862708900610823, -0.0042255194503962
0.9913331145098154, -0.0032974121585480
0.9960021207390140, -0.0023245954073100
1.0003263859520000, -0.0014326726339971
1.0043271216082754, -0.0006075159100353
1.0080261394194756, 0.0001553984660494
1.0114441520951634, 0.0008603588621713];
xep = flip(M(:,1));
rep = flip(M(:,2));
naf = length(xep);
% Make sure airfoil is _exactly_ closed.
xep(end) = xep(1);
rep(end) = rep(1);
xep = chord * xep;
rep = chord * rep;
if ( flipaf )
rep = -1 * rep;
rep = flip(rep);
xep = flip(xep);
end
% 'Angle of attack'
A = [cos(-alpha * pi/180) -sin(-alpha * pi/180);
sin(-alpha * pi/180) cos(-alpha * pi/180)] * [xep rep]';
xep = A(1,:);
rep = A(2,:);
% Translate LE point.
xep = xep + xoff;
rep = rep + roff;
% Disable local curvature term
rad = inf( 1, naf - 1 );
Vex = nan( 1, length( xep ) - 1 );
end