NACA Airfoil Module

NACA airfoil geometry generators.

This module provides classes for generating NACA 4-digit and 5-digit airfoil coordinates and computing basic aerodynamic properties.

References

Abbott, I.H., and Von Doenhoff, A.E., “Theory of Wing Sections”, Dover Publications, 1959.

class aerodemo.naca_airfoil.NACAFourDigit(designation, n_points=100, cosine_spacing=True)[source]

Bases: object

NACA 4-digit airfoil geometry generator.

The NACA 4-digit series airfoils are defined by: - First digit: maximum camber as a percentage of chord - Second digit: location of maximum camber in tenths of chord - Last two digits: maximum thickness as a percentage of chord

Parameters:
  • designation (str) – NACA 4-digit designation, e.g. ‘2412’, ‘0012’, ‘4415’.

  • n_points (int, optional) – Number of points on each surface (upper/lower). Default is 100.

  • cosine_spacing (bool, optional) – Use cosine spacing for denser distribution near leading/trailing edges. Default is True.

Examples

>>> airfoil = NACAFourDigit('2412')
>>> x_upper, y_upper, x_lower, y_lower = airfoil.coordinates()
__init__(designation, n_points=100, cosine_spacing=True)[source]
Parameters:
  • designation (str)

  • n_points (int)

  • cosine_spacing (bool)

property max_camber: float

Maximum camber as fraction of chord.

property max_camber_location: float

Location of maximum camber as fraction of chord.

property max_thickness: float

Maximum thickness as fraction of chord.

thickness(x)[source]

Compute half-thickness distribution.

Parameters:

x (array_like) – Chordwise positions (0 to 1).

Returns:

yt – Half-thickness values.

Return type:

ndarray

camber_line(x)[source]

Compute camber line and its gradient.

Parameters:

x (array_like) – Chordwise positions (0 to 1).

Returns:

  • yc (ndarray) – Camber line ordinates.

  • dyc_dx (ndarray) – Gradient of the camber line.

coordinates()[source]

Compute upper and lower surface coordinates.

Returns:

  • x_upper (ndarray)

  • y_upper (ndarray)

  • x_lower (ndarray)

  • y_lower (ndarray)

lift_curve_slope()[source]

Thin-airfoil theory lift-curve slope (per radian).

Returns:

dCL/dalpha = 2*pi rad^{-1}

Return type:

float

zero_lift_angle()[source]

Zero-lift angle of attack (radians) from thin-airfoil theory.

Returns:

alpha_L0 in radians.

Return type:

float

cl(alpha_deg)[source]

Lift coefficient from thin-airfoil theory.

Parameters:

alpha_deg (float) – Angle of attack in degrees.

Returns:

Lift coefficient.

Return type:

float

class aerodemo.naca_airfoil.NACAFiveDigit(designation, n_points=100, cosine_spacing=True)[source]

Bases: object

NACA 5-digit airfoil geometry generator.

The NACA 5-digit series airfoils provide reflex camber options. Designation examples: ‘23012’, ‘23015’, ‘23112’ (reflex).

Parameters:
  • designation (str) – NACA 5-digit designation, e.g. ‘23012’.

  • n_points (int, optional) – Number of surface points. Default is 100.

  • cosine_spacing (bool, optional) – Use cosine spacing. Default is True.

Examples

>>> airfoil = NACAFiveDigit('23012')
>>> x_u, y_u, x_l, y_l = airfoil.coordinates()
__init__(designation, n_points=100, cosine_spacing=True)[source]
Parameters:
  • designation (str)

  • n_points (int)

  • cosine_spacing (bool)

property max_thickness: float
thickness(x)[source]
Parameters:

x (ndarray)

Return type:

ndarray

camber_line(x)[source]
Parameters:

x (ndarray)

coordinates()[source]