The aerofoil section is the quintessence of a wing or lifting surface and, as such, occupies a central position in any discipline relating to fluid mechanics, from animal flight through marine propellers to aircraft.

In agreement with P. Lissaman’s thoughts quoted above, several chapters of the book are dedicated to airfoil geometry description, the first of which is Chapter 5, which discusses some of the fundamentals of designing and using airfoil geometries.

This is a good place to start experimenting with building some airfoil geometries based on legacy data and here we offer two ways to do this: via the AirCONICS tool set in Rhino/Python and via the Matlab code included here (scroll down for a first set of airfoil experiments with the latter).

#### RHINO/PYTHON

The first step here is to download AirCONICS, if you haven’t done so already.

Once you have checked that your installation works correctly (i.e., you were able to run `airfoil_example_SeligCoord.py`

), you can start conducting experiments similar to that shown in Figure 5.4. The goal here is to consider some issues around fitting a curve to legacy airfoil data.

In fact, it is worth sticking with airfoil_example_SeligCoord.py for a simple experiment.

1. Set the value of `AirfoilSeligName`

to `'naca2408'`

. AirCONICS has a routine for generating 4-digit NACA airfoils analytically, but for the purposes of this experiment this slightly noisy legacy dataset is ideal.

2. Set the value of `SmoothingPasses`

to 0.

3. Run the example script.

4. Use Rhino’s Curvature Analysis tool (you’ll find it in the ‘Analyze’ menu) to generate a porcupine plot of the curvature of the airfoil curve you have just fitted. It should look something like this (adjust the density and the scale if needed):

This is an interpolating curve, i.e., it goes through all the data and, as a result of small numerical errors and the difference between the analytical formulation of the NACA 4-digit foil and the spline we fitted here, the spline *snakes *significantly between the points. These fluctuations are not visible to the naked eye, but the curvature analysis tool lays them bare.

5. Delete the geometry (you could use the `SelAll`

command to select all objects and then press Delete).

6. Edit the example script again, this time setting `SmoothingPasses`

to 1. You should see something like this:

This is now a regression curve, i.e. it no longer goes strictly through all the legacy data points, so technically we have deviated (very slightly) from the original geometry. However, the curve is now smooth! This is one of the key trade-offs in re-using legacy data when constructing geometries – Section 5.4 in the book discusses this in detail.

#### MATLAB

This chapter is the place to start experimenting with some of the airfoil geometry functions included in the accompanying Aircraft Geometry Toolbox. Once you have downloaded it, you can begin by parsing some legacy cross sections using the `readfoildata`

function, as discussed in Section 5.5, page 101.

Type `help readfoildata`

to get started with the examples included there [note: you will need Selig-formatted airfoil data for this – the UIUC library of such section data is included in the AirCONICS download, make sure you enter the path to this library in `setup.m`

].

Along the lines of the spline fitting experiments mentioned in the Rhino/Python section above, you can experiment with applying a **CST** (Kulfan‘s **C**lass- and **S**hape function **T**ransformation) to a slightly noisy legacy data set. To alter the flexibility of the CST curve fit, you can simply try it with different polynomial orders. Very low orders will underfit (the CST will not capture salient features of the airfoil), while very high orders will overfit (capture the noise, along with the actual geometry).

The function `findcstcoeff.m`

can be used to apply Kulfan transformations of various orders to a given set of coordinates – typing `help findcstcoeff`

will reveal the usage instructions, as well as an example, which you can run to generate model versus data deviation plots like this:

`findcstcoeff.m`

also generates a plot of the two airfoils (the original data and the fitted Kulfan curve). In most sensible cases the deviations are too small to be seen on this (hence the need for the exaggerated representation above), but if you reduce to the polynomial orders to really silly values (1 on both the upper and the lower surface), you will see the difference – the model is now too stiff for the inflexions of the target:

Needless to say, the deviation plot is completely off the scale here – see for yourself by running the example in findcstcoeff.m with the polynomial orders set to 1.