Challenge

Independent Research Project | Creating NACA Airfoil using PYTHON

AIM:

Python program to draw or make NACA airfoil, which can be used for the flow simulation study.

THEORY:

The NACA airfoils are airfoil shapes for aircraft wings developed by the National Advisory Committee for Aeronautics (NACA). The shape of the NACA airfoils is described using a series of digits following the word "NACA". The parameters in the numerical code can be entered into equations to precisely generate the cross-section of the airfoil and calculate its properties.

FOUR-DIGIT SERIES

The NACA four-digit wing sections define the profile by:

  1. First digit describing maximum chamber as a percentage of the Chord.
  2. The second digit describing the distance of maximum camber from the airfoil leading edge in tenths of the chord.
  3. Last two digits describing the maximum thickness of the airfoil as a percent of the chord.

For example, the NACA 2412 airfoil has a maximum camber of 2% located 40% (0.4 chords) from the leading edge with a maximum thickness of 12% of the chord.

The NACA 0015 airfoil is symmetrical, the 00 indicating that it has no camber. The 15 indicates that the airfoil has a 15% thickness to chord length ratio: it is 15% as thick as it is long.

The equation for a symmetrical 4-digit NACA airfoil

The formula for the shape of a NACA 00xx foil, with "xx" being replaced by the percentage of thickness to chord, is:

`yt=5tc[0.2969√(x/c)+(-01260)(x/c)+(-0.3156) (x/c)^2+0.2843(x/c)^3+(-0.1015) (x/c)^4`

where:

  • c is the chord length,
  • x is the position along the chord from 0 to c,
  • ‘yt’ is the half-thickness at a given value of x (centerline to the surface), and
  • t is the maximum thickness as a fraction of the chord (so 100 t gives the last two digits in the NACA 4-digit denomination).

Note that in this equation, at (x/c) = 1 (the trailing edge of the airfoil), the thickness is not quite zero. If a zero-thickness trailing edge is required, for example for computational work, one of the coefficients should be modified such that they sum to zero. Modifying the last coefficient (i.e. to −0.1036) will result in the smallest change to the overall shape of the airfoil. The leading edge approximates a cylinder with a radius of:

`r=1.019t^2`

PYTHON PROGRAM FOR CREATING NACA AIRFOIL:

import matplotlib.pyplot as plt 
import numpy as np 
import pandas as pd 

#INITIAL DATA
t = 0.1
c = 1
xc = np.linspace(0,1,1000)

#CALCULATION
y1 = (5*t*c)*((0.2969*np.sqrt(xc/c))-(0.3516*(xc/c)**2)+(0.2843*(xc/c)**3) - (0.1015*(xc/c)**4))
y2 = -y1

#PLOTTING
plt.plot(y1)
plt.plot(y2)
plt.savefig('NACA')
plt.show()

#EXPORTING TO CSV
dict = {'X-Cordinate': xc*c, 'Y-Cordinate': y1, 'X-Cordinate-1': xc*c, 'Y-Cordinate-2': y2 }
df = pd.DataFrame(dict)

#SAVING DATAFRAME
df.to_csv(r'E:\Python\INdependent Project\export_dataframe.csv')

PLOT:

SOURCE: https://nasa.fandom.com/wiki/NACA_airfoil#:~:text=Equation%20for%20a%20symmetrical%204%2Ddigit%20NACA%20airfoil&text=The%20formula%20for%20the%20shape,(%E2%88%920.3516)(xc

CSV FILE: https://drive.google.com/file/d/1fdgG9tgxWPevbCQuD8AdzuGBRUpuH6Py/view?usp=sharing

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.