-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexperiment.asv
More file actions
61 lines (48 loc) · 1.38 KB
/
Copy pathexperiment.asv
File metadata and controls
61 lines (48 loc) · 1.38 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
%% MA342 Project 1
%% Experiment 1 - Increasing the number of panels
clear variables;
close all;
clc;
v = 76; % m/s
naca2418 = importdata('naca2418.dat.txt');
naca64209 = importdata('naca64209.dat.txt');
fx84w097 = importdata('fx84w097.dat.txt');
mh112 = importdata('mh112.dat.txt');
data = {};
data{1} =
num_panels = transpose(5:2:35);
figure;
for d = 1:length(data_exp)
C_L1 = zeros(length(num_panels), 1);
for i = 1:length(C_L1)
X = points_based_on_input(data_exp(d),num_panels(i));
X = [X; X(1, :)];
X = [X; [1.1, -0.05]];
C_L1(i) = airfoil_wing(X, v, false);
end
plot(num_panels, C_L1);
end
grid on;
title("Experiment 1: Altering the number of panels")
xlabel("Number of Panels");
ylabel("Lift Coefficient (C_L)");
%% Experiment 2 - Changing the wake angle
wa_length = 0.1118;
theta_max = pi/4;
theta_iter = linspace(0, theta_max, 25);
num_panels_2 = 13;
figure;
for d = 1:length(data_exp)
C_L2 = zeros(length(theta_iter), 1);
for i = 1:length(C_L2)
X = points_based_on_input(naca2418, num_panels_2);
X = [X; X(1, :)];
X = [X; [1 + wa_length*cos(theta_iter(i)), -wa_length*sin(theta_iter(i))]];
C_L2(i) = airfoil_wing(X, v, false);
end
plot(theta_iter, C_L2);
end
grid on;
title("Experiment 2: Altering the wake angle")
xlabel("Wake Angle Theta (rad)");
ylabel("Lift Coefficient (C_L)");