-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrunellipduct.m
89 lines (66 loc) · 1.31 KB
/
runellipduct.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
clear all
format compact
close all
% Freestream velocity
W = 1.0;
Minf = 0.0;
Sref = 1.0;
xlim = [-2 2];
rlim = [0 2];
nsurvey = 51;
nsl = 21;
drawplots = true;
ntstep = 1;
% Construct an ellipse
ncirc = 136;
rada = 1.0;
radb = .25;
xcen = 0.0;
% Construct a duct
naf = 151;
chord = 0.6;
alpha = 15; % Degrees about LE
xoff = 0.7; % X-Offset of LE
roff = 0.4; % R-Offset of LE
% NACA 4-Digit airfoil parameters
dig1 = 4;
dig2 = 4;
dig34 = 12;
flipaf = false;
% Airfoil point spacing
% 1 -- Cosine cluster LE, TE
% 2 -- Cosine cluster LE
% 3 -- Uniform
spacing = 1;
% Actually generate bodies
[xep, rep, rad, Vex] = setupellipsoid( ncirc, rada, radb, xcen );
jtelow = -1;
jteup = - 1;
kutta = false;
names{1} = 'Ellipsoid';
xepts{1} = xep;
repts{1} = rep;
kuttas{1} = kutta;
props{1} = false;
deltaCP{1} = 0.0;
jtels{1} = jtelow;
jteus{1} = jteup;
rads{1}=rad;
Vexs{1}=Vex;
[xep, rep, rad, Vex] = setupNACAduct( naf, chord, alpha, xoff, roff, dig1, dig2, dig34, flipaf, spacing );
% Index for Kutta condition
jtelow = 1;
jteup = naf - 1;
kutta = true;
names{2} = ['NACA ' num2str(dig1) num2str(dig2) num2str(dig34) ' Duct'];
xepts{2} = xep;
repts{2} = rep;
kuttas{2} = kutta;
props{2} = false;
deltaCP{2} = 0.0;
jtels{2} = jtelow;
jteus{2} = jteup;
rads{2}=rad;
Vexs{2}=Vex;
% Execute script
run('bor')