You are on page 1of 1

clear all

Data=xlsread('C:\Users\lenovo\Desktop\Aero Data.xlsx');
alpha=[2 6 10 14];
Location=xlsread('C:\Users\lenovo\Desktop\Aero Location.xlsx');

hz=(Data(:,1)+Data(:,6))/2;
h=Data(:,2:5);
dh=h-repmat(hz,1,4);
dhs=dh(1:end-1,:);
dhq=dh(end,:);
cp=dhs./repmat(dhq,32,1);
figure(1)
plot(Location(:,1),cp,'x')
title('Pressure-Coefficient of the Aerofoil(Cp-x/c)')
xlabel('x/c')
ylabel('Cp')

figure(2)
plot(Location(:,2),cp,'x')
title('Pressure-Coefficient of the Aerofoil(Cp-yonc)')
xlabel('y/c')
ylabel('Cp')
cn=-trapz(Location(:,1),cp);
ccf=-trapz(Location(:,2),cp);
cL=cn.*cosd(alpha)-ccf.*sind(alpha)
cdf=cn.*sind(alpha)+ccf.*cosd(alpha)

figure(3)
plot(alpha,cL,'--+')
title('Lift Coefficient VS alpha')
xlabel('alpha in degree')
ylabel('CL')
figure(4)
plot(alpha,cdf,'--+')
title('Drag Coefficient VS alpha')
xlabel('alpha in degree')
ylabel('CD')

You might also like