CCBlade Airfoil Types

DuctAPE includes all the airfoil types and methods available in CCBlade. We repeat them here for convenience, but refer the user to the CCBlade documentation for more context if advanced usage is desired.

DuctAPE.C4Blade.AlphaAFType
AlphaAF(alpha, cl, cd, info, Re, Mach)
AlphaAF(alpha, cl, cd, info, Re=0.0, Mach=0.0)
AlphaAF(alpha, cl, cd, info="CCBlade generated airfoil", Re=0.0, Mach=0.0)
AlphaAF(filename::String; radians=true)

Airfoil data that varies with angle of attack. Data is fit with an Akima spline.

Arguments:

  • alpha::Vector{Float64}: angles of attack
  • cl::Vector{Float64}: corresponding lift coefficients
  • cd::Vector{Float64}: corresponding drag coefficients
  • info::String: a description of this airfoil data (just informational)
  • Re::Float64: Reynolds number data was taken at (just informational)
  • Mach::Float64: Mach number data was taken at (just informational)

or

a file

Arguments:

  • filename::String: name/path of file to read in
  • radians::Bool: true if angle of attack in file is given in radians
source
DuctAPE.C4Blade.AlphaMachAFType
AlphaMachAF(alpha, Mach, cl, cd, info, Re)
AlphaMachAF(alpha, Mach, cl, cd, info)
AlphaMachAF(alpha, Mach, cl, cd)
AlphaMachAF(filenames::Vector{String}; radians=true)

Airfoil data that varies with angle of attack and Mach number. Data is fit with a recursive Akima spline.

Arguments:

  • alpha::Vector{Float64}: angles of attack
  • Mach::Vector{Float64}: Mach numbers
  • cl::Matrix{Float64}: lift coefficients where cl[i, j] corresponds to alpha[i], Mach[j]
  • cd::Matrix{Float64}: drag coefficients where cd[i, j] corresponds to alpha[i], Mach[j]
  • info::String: a description of this airfoil data (just informational)
  • Re::Float64: Reynolds number data was taken at (just informational)

or

filenames with one file per Mach number.

Arguments:

  • filenames::Vector{String}: name/path of files to read in, each at a different Mach number in ascending order
  • radians::Bool: true if angle of attack in file is given in radians
source
DuctAPE.C4Blade.AlphaReAFType
AlphaReAF(alpha, Re, cl, cd, info, Mach)
AlphaReAF(alpha, Re, cl, cd, info)
AlphaReAF(alpha, Re, cl, cd)
read_AlphaReAF(filenames::Vector{String}; radians=true)

Airfoil data that varies with angle of attack and Reynolds number. Data is fit with a recursive Akima spline.

Arguments:

  • alpha::Vector{Float64}: angles of attack
  • Re::Vector{Float64}: Reynolds numbers
  • cl::Matrix{Float64}: lift coefficients where cl[i, j] corresponds to alpha[i], Re[j]
  • cd::Matrix{Float64}: drag coefficients where cd[i, j] corresponds to alpha[i], Re[j]
  • info::String: a description of this airfoil data (just informational)
  • Mach::Float64: Mach number data was taken at (just informational)

or

filenames with one file per Reynolds number.

Arguments:

  • filenames::Vector{String}: name/path of files to read in, each at a different Reynolds number in ascending order
  • radians::Bool: true if angle of attack in file is given in radians
source
DuctAPE.C4Blade.AlphaReMachAFType
AlphaReMachAF(alpha, Re, Mach, cl, cd, info)
AlphaReMachAF(alpha, Re, Mach, cl, cd)
AlphaReMachAF(filenames::Matrix{String}; radians=true)

Airfoil data that varies with angle of attack, Reynolds number, and Mach number. Data is fit with a recursive Akima spline.

Arguments:

  • alpha::Vector{Float64}: angles of attack
  • Re::Vector{Float64}: Reynolds numbers
  • Mach::Vector{Float64}: Mach numbers
  • cl::Array{Float64}: lift coefficients where cl[i, j, k] corresponds to alpha[i], Re[j], Mach[k]
  • cd::Array{Float64}: drag coefficients where cd[i, j, k] corresponds to alpha[i], Re[j], Mach[k]
  • info::String: a description of this airfoil data (just informational)

or files with one per Re/Mach combination

Arguments:

  • filenames::Matrix{String}: name/path of files to read in. filenames[i, j] corresponds to Re[i] Mach[j] with Reynolds number and Mach number in ascending order.
  • radians::Bool: true if angle of attack in file is given in radians
source
DuctAPE.C4Blade.DuSeligEggersType
DuSeligEggers(a, b, d, m, alpha0)
DuSeligEggers(a=1.0, b=1.0, d=1.0, m=2*pi, alpha0=0.0)  # uses defaults

DuSelig correction for lift an Eggers correction for drag.

Arguments:

  • a, b, d::Float64: parameters in Du-Selig paper. Normally just 1.0 for each.
  • m::Float64: lift curve slope. Defaults to 2 pi for zero argument version.
  • alpha0::Float64: zero-lift angle of attack. Defaults to 0 for zero argument version.
source
DuctAPE.C4Blade.SimpleAFType
SimpleAF(m, alpha0, clmax, clmin, cd0, cd2)

A simple parameterized lift and drag curve.

  • cl = m (alpha - alpha0) (capped by clmax/clmin)
  • cd = cd0 + cd2 * cl^2

Arguments:

  • m::Float64: lift curve slope
  • alpha0::Float64: zero-lift angle of attack
  • clmax::Float64: maximum lift coefficient
  • clmin::Float64: minimum lift coefficient
  • cd0::Float64: zero lift drag
  • cd2::Float64: quadratic drag term
source
DuctAPE.C4Blade.SkinFrictionType
SkinFriction(Re0, p)

Skin friction model for a flat plate. cd *= (Re0 / Re)^p

Arguments:

  • Re0::Float64: reference Reynolds number (i.e., no corrections at this number)
  • p::Float64: exponent in flat plate model. 0.5 for laminar (Blasius solution), ~0.2 for fully turbulent (Schlichting empirical fit)
source
DuctAPE.C4Blade.afevalMethod
afeval(af::AFType, alpha, Re, Mach)

Evaluate airfoil aerodynamic performance

Arguments:

  • af::AFType or Function: dispatch on AFType or if function call: cl, cd = af(alpha, Re, Mach)
  • alpha::Float64: angle of attack in radians
  • Re::Float64: Reynolds number
  • Mach::Float64: Mach number

Returns:

  • cl::Float64: lift coefficient
  • cd::Float64: drag coefficient
source
DuctAPE.C4Blade.mach_correctionMethod
mach_correction(::MachCorrection, cl, cd, Mach)

Mach number correction for lift/drag coefficient

Arguments:

  • mc::MachCorrection: used for dispatch
  • cl::Float64: lift coefficient before correction
  • cd::Float64: drag coefficient before correction
  • Mach::Float64: Mach number

Returns:

  • cl::Float64: lift coefficient after correction
  • cd::Float64: drag coefficient after correction
source
DuctAPE.C4Blade.parsefileMethod

A basic airfoil file format. nheader is the number of header lines, which will be skipped. For one Reynolds/Mach number. Additional data like cm is optional but will be ignored.

format:

informational header

Re

Mach

alpha1 cl1 cd1 ...

alpha2 cl2 cd2

alpha3 cl3 cd3

...

source
DuctAPE.C4Blade.re_correctionMethod
re_correction(re::ReCorrection, cl, cd, Re)

Reynolds number correction for lift/drag coefficient

Arguments:

  • re::ReCorrection: used for dispatch
  • cl::Float64: lift coefficient before correction
  • cd::Float64: drag coefficient before correction
  • Re::Float64: Reynolds number

Returns:

  • cl::Float64: lift coefficient after correction
  • cd::Float64: drag coefficient after correction
source
DuctAPE.C4Blade.re_correctionMethod
re_correction(sf::SkinFriction, cl, cd, Re)

Skin friction coefficient correction based on flat plat drag increases with Reynolds number.

source
DuctAPE.C4Blade.rotation_correctionFunction
rotation_correction(rc::RotationCorrection, cl, cd, cr, rR, tsr, alpha, phi=alpha, alpha_max_corr=30*pi/180)

Rotation correction (3D stall delay).

Arguments:

  • rc::RotationCorrection: used for dispatch
  • cl::Float64: lift coefficient before correction
  • cd::Float64: drag coefficient before correction
  • cr::Float64: local chord / local radius
  • rR::Float64: local radius / tip radius
  • tsr::Float64: local tip speed ratio (Omega r / Vinf)
  • alpha::Float64: local angle of attack
  • phi::Float64: local inflow angles (defaults to angle of attack is precomputing since it is only known for on-the-fly computations)
  • alpha_max_corr::Float64: angle of attack for maximum correction (tapers off to zero by 90 degrees)

Returns:

  • cl::Float64: lift coefficient after correction
  • cd::Float64: drag coefficient after correction
source
DuctAPE.C4Blade.tip_correctionMethod
tip_correction(::TipCorrection, r, Rhub, Rtip, phi, B)

Tip corrections for 3D flow.

Arguments:

  • tc::TipCorrection: used for dispatch
  • r::Float64: local radius
  • Rhub::Float64: hub radius
  • Rtip::Float64: tip radius
  • phi::Float64: inflow angle
  • B::Integer: number of blades

Returns:

  • F::Float64: tip loss factor to multiple against loads.
source
DuctAPE.C4Blade.viternaFunction
viterna(alpha, cl, cd, cr75, nalpha=50)

Viterna extrapolation. Follows Viterna paper and somewhat follows NREL version of AirfoilPrep, but with some modifications for better robustness and smoothness.

Arguments:

  • alpha::Vector{Float64}: angles of attack
  • cl::Vector{Float64}: correspnding lift coefficients
  • cd::Vector{Float64}: correspnding drag coefficients
  • cr75::Float64: chord/Rtip at 75% Rtip
  • nalpha::Int64: number of discrete points (angles of attack) to include in extrapolation

Returns:

  • alpha::Vector{Float64}: angle of attack from -pi to pi
  • cl::Vector{Float64}: correspnding extrapolated lift coefficients
  • cd::Vector{Float64}: correspnding extrapolated drag coefficients
source
DuctAPE.C4Blade.write_afMethod
write_af(filename(s), af::AFType; radians=true)

Write airfoil data to file

Arguments:

  • filename(s)::String or Vector{String} or Matrix{String}: name/path of file to write to
  • af::AFType: writing is dispatched based on type (AlphaAF, AlphaReAF, etc.)
  • radians::Bool: true if you want angle of attack to be written in radians
source