Public documentation

Documentation for AirfoilDefinitions.jl's public interface.

Index

Public interface

AirfoilDefinitions.AirfoilFileType
AirfoilFile <: AbstractAirfoilDefinition

Generic airfoil definition that reads the coordinates stored in an external file.

The file is expected to contain two columns representing (x, y) coordinates, ordered according to the Selig format. The geometry is read and normalized when coordinates are requested.

source
AirfoilDefinitions.CSTType
CST{Tu, Tl, Te, Tt, Tn1, Tn2} <: AbstractAirfoilDefinition

Class–-Shape Transformation (CST) airfoil definition.

Fields

  • upper_weights::Tu: Weights for the upper surface.
  • lower_weights::Tl: weights for the lower surface.
  • leading_edge_weight::Te: Leading-edge curvature.
  • trailing_edge_thickness::Tt: Trailing-edge thickness.
  • N1::Tn1: Leading-edge class exponent (default: 0.5).
  • N2::Tn2: Trailing-edge class exponent (default: 1.0).
source
AirfoilDefinitions.CSTMethod
CST(coordinates; num_upper_weights=8, num_lower_weights=8, N1=0.5, N2=1.0)

Fit a CST airfoil definition to a set of input airfoil coordinates.

This constructor performs a nonlinear least-squares fit of the CST (Class–Shape Transformation) parameterization to the provided airfoil coordinates. Upper and lower surfaces are fitted simultaneously using Bernstein polynomial shape functions.

The input coordinates are internally normalized to a unit chord prior to fitting.

Arguments

  • coordinates::AbstractMatrix: Airfoil coordinates following the Selig ordering.

Keyword Arguments

  • num_upper_weights::Int: Number of Bernstein coefficients used for the upper surface shape function.
  • num_lower_weights::Int: Number of Bernstein coefficients used for the lower surface shape function.
  • N1::Real: Leading-edge class exponent.
  • N2::Real: Trailing-edge class exponent.

Returns

  • CST: A CST representation of the given airfoil coordinates.
source
AirfoilDefinitions.NACA4Type
NACA4{Tm, Tp, Tt} <: AbstractAirfoilDefinition

Four-digit NACA airfoil definition.

Represents a classical NACA 4-digit airfoil parameterized by camber, camber position, and thickness. This type encodes how the airfoil is defined, not its discretized geometry.

Arguments

  • max_camber::Tm: Maximum camber as a fraction of the chord.
  • max_camber_position::Tp: Chordwise position of maximum camber.
  • max_thickness::Tt: Maximum thickness as a fraction of the chord.
  • open_trailing_edge::Bool: Whether to use the open trailing-edge formulation.
source
AirfoilDefinitions.NACA4Method
NACA4(s::String; open_trailing_edge=true)

Construct a NACA 4-digit airfoil from a four-digit string.

The string must contain exactly four digits, following the standard NACA convention (e.g. "2412").

Arguments

  • s: Four-digit NACA airfoil designation.

Keyword arguments

  • open_trailing_edge: Whether to use the open trailing-edge formulation.

An ArgumentError is thrown if the string does not contain exactly four digits.

source
AirfoilDefinitions.NACA4Method
NACA4(m, p, t; open_trailing_edge=true)

Construct a NACA 4-digit airfoil from numerical parameters.

Arguments

  • m: Maximum camber as a fraction of the chord.
  • p: Chordwise position of maximum camber.
  • t: Maximum thickness as a fraction of the chord.

Keyword arguments

  • open_trailing_edge: Whether to use the open trailing-edge formulation.

An ArgumentError is thrown if the parameters are invalid or inconsistent.

source
AirfoilDefinitions.UnitAirfoilType
UnitAirfoil{M <: AbstractAirfoilDefinition, C <: AbstractMatrix}

Canonical representation of a unit-chord airfoil.

UnitAirfoil stores airfoil geometry in a normalized reference frame (unit chord, fixed orientation, Selig ordering), together with the method that produced it.

Fields

  • method::M: Airfoil definition method.
  • coordinates::C: Airfoil coordinates in canonical form.
source
AirfoilDefinitions.coordinatesMethod
coordinates(method::AbstractAirfoilDefinition; kwargs...)

Return the airfoil coordinates defined by method.

Concrete subtypes of AbstractAirfoilDefinition are expected to implement this interface. Keyword arguments may be used to control some options of the method.

source
AirfoilDefinitions.coordinatesMethod
coordinates(method::AirfoilFile; kwargs...)

Read and return normalized airfoil coordinates from a file.

The coordinates are normalized in place to a canonical reference frame (unit chord, leading edge at the origin, Selig ordering).

Arguments

  • method::AirfoilFile: Generic airfoil definition stored in an external file.
source
AirfoilDefinitions.coordinatesMethod
coordinates(method::CST; num_points=199, kwargs...)

Generate airfoil coordinates using the CST airfoil definition.

Arguments

  • method::CST: CST airfoil definition.

Keyword arguments

  • num_points::Int: Total number of points used to discretize the airfoil.

Returns

  • Matrix{<:Real}: Airfoil coordinates on a unit chord, ordered according to the Selig convention.
source
AirfoilDefinitions.coordinatesMethod
coordinates(method::NACA4; num_points=199, kwargs...)

Generate airfoil coordinates for a NACA 4-digit airfoil.

Arguments

  • method::NACA4: four-digit NACA airfoil definition.

Keyword arguments

  • num_points::Int: Total number of points used to discretize the airfoil.

Returns

  • ::Matrix: Airfoil coordinates on a unit chord, ordered according to the Selig convention.
source
AirfoilDefinitions.normalize!Method
normalize(coordinates) -> AbstractMatrix
normalize!(coordinates)

Normalize airfoil coordinates.

The normalization assumes that coordinates are arranged according to the Selig ordering and performs the following steps:

  1. Identify the leading edge as the point farthest from the midpoint of the trailing edge.
  2. Translate the coordinates so that the leading edge lies at (0, 0).
  3. Scale the coordinates so that the chord length is unity.
  4. Rotate the coordinates so that the trailing edge lies at (1, 0).

Arguments

  • coordinates::AbstractMatrix: Two-column matrix of airfoil coordinates (x, y) ordered in Selig format.
source
AirfoilDefinitions.normalizeMethod
normalize(coordinates) -> AbstractMatrix
normalize!(coordinates)

Normalize airfoil coordinates.

The normalization assumes that coordinates are arranged according to the Selig ordering and performs the following steps:

  1. Identify the leading edge as the point farthest from the midpoint of the trailing edge.
  2. Translate the coordinates so that the leading edge lies at (0, 0).
  3. Scale the coordinates so that the chord length is unity.
  4. Rotate the coordinates so that the trailing edge lies at (1, 0).

Arguments

  • coordinates::AbstractMatrix: Two-column matrix of airfoil coordinates (x, y) ordered in Selig format.
source