# Chapter_11: Basic Aerofoil Analysis: A Worked Example We have illustrated the geometrical concepts described in this book through examples wherever possible, but have yet to close the loop, that is, link these concepts into complete design processes. In this chapter and the next we endeavour to do just that, first through a simple two-dimensional flow solver coupled with an airfoil parameter sweep, then by taking that example further to the aero/structural design of a wing planform and sections.

As well as examples of how to use the popular code XFoil, We have included our own simplified `panel()` and `boundarylayer()` codes. The Matlab script below shows how `panel()` can be used to calculated the pressure coefficient over the surface of a NACA0012 aerofoil.

alpha=10;
Re=2.88e6;
npoints=201;
% calculate aerofoil coordinates
A=naca4(0,0,12,‘Low’,npoints,0);
% format to pass to panel()
xu=A{1};
yu=A{2};
xl=A{3}(end:-1:2);
yl=A{4}(end:-1:2);
aerofoilPoints=[xl’ xu’; yl’ yu’]’;
% call panel()
[cl,cp,ux,uy,v,ds,xc,yc,theta,dy]=panel(aerofoilPoints,alpha,Re,1);

% Validation data (NACA0012 @ 10deg upper surface cp
%- Gregory & O’Reilly, NASA R&M 3726, Jan 1970)
upperCp=[0 -3.66423
0.00218341 -5.04375
0.00873362 -5.24068
0.0131004 -4.67125
0.0174672 -4.32079
0.0480349 -2.74347
0.0742358 -2.26115
0.0982533 -1.95405
0.124454 -1.7345
0.146288 -1.55884
0.176856 -1.36109
0.28821 -1.00829
0.320961 -0.941877
0.384279 -0.787206
0.447598 -0.654432
0.515284 -0.543461
0.576419 -0.432633
0.637555 -0.343703
0.700873 -0.254725
0.766376 -0.1657
0.831878 -0.098572
0.893013 -0.00964205
0.958515 0.0793835
1 0.124088];
% plot Cp
figure
plot(xc(npoints:-1:1),cp(npoints:-1:1),‘b’);
hold on
plot(xc(npoints:(npoints-1)*2),cp(npoints:(npoints-1)*2),‘r’);
plot(upperCp(:,1),upperCp(:,2),‘go’)
titletext=[‘cl=’,num2str(cl)];
title(titletext)
legend(‘lower’,‘upper’,‘experiment’,‘Location’,‘SouthEast’)
xlabel(‘x/c’)
ylabel(‘c_p’)

This will plot the calculated pressure coefficient profiles against a set of validation data, as shown in the figure below. ### 4 thoughts on “Chapter_11: Basic Aerofoil Analysis: A Worked Example”

1. eder said:

hi! I would like to know what is this function “naca4” that is on the following line:
% calculate aerofoil coordinates
A=naca4(0,0,12,‘Low’,npoints,0);

• András Sóbester said:

The function naca4 computes the coordinate sets representing the NACA 4-digit airfoil identified by its arguments – in this case the NACA0012 (type ‘help naca4’ at the Matlab prompt once you have downloaded the geometry toolbox from this page for a more detailed description).

2. Adil said:

Hello, do you have any idea of a code simillar to VGK or MSES with the advantage to be free for students (for my master thsis) and to give also accurate results for transonic airfoils. VGK and MSES are interesting solutions but not accessible for me as a student.

• András Sóbester said: