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.AlphaAF
— TypeAlphaAF(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 attackcl::Vector{Float64}
: corresponding lift coefficientscd::Vector{Float64}
: corresponding drag coefficientsinfo::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 inradians::Bool
: true if angle of attack in file is given in radians
DuctAPE.C4Blade.AlphaMachAF
— TypeAlphaMachAF(alpha, Mach, cl, cd, info, Re)
+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 attackcl::Vector{Float64}
: corresponding lift coefficientscd::Vector{Float64}
: corresponding drag coefficientsinfo::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 inradians::Bool
: true if angle of attack in file is given in radians
DuctAPE.C4Blade.AlphaMachAF
— TypeAlphaMachAF(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 attackMach::Vector{Float64}
: Mach numberscl::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 orderradians::Bool
: true if angle of attack in file is given in radians
DuctAPE.C4Blade.AlphaReAF
— TypeAlphaReAF(alpha, Re, cl, cd, info, Mach)
+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 attackMach::Vector{Float64}
: Mach numberscl::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 orderradians::Bool
: true if angle of attack in file is given in radians
DuctAPE.C4Blade.AlphaReAF
— TypeAlphaReAF(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 attackRe::Vector{Float64}
: Reynolds numberscl::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 orderradians::Bool
: true if angle of attack in file is given in radians
DuctAPE.C4Blade.AlphaReMachAF
— TypeAlphaReMachAF(alpha, Re, Mach, cl, cd, info)
+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 attackRe::Vector{Float64}
: Reynolds numberscl::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 orderradians::Bool
: true if angle of attack in file is given in radians
DuctAPE.C4Blade.AlphaReMachAF
— TypeAlphaReMachAF(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 attackRe::Vector{Float64}
: Reynolds numbersMach::Vector{Float64}
: Mach numberscl::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
DuctAPE.C4Blade.DuSeligEggers
— TypeDuSeligEggers(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.
DuctAPE.C4Blade.PrandtlTip
— TypePrandtlTip()
Standard Prandtl tip loss correction.
DuctAPE.C4Blade.PrandtlTipHub
— TypePrandtlTipHub()
Standard Prandtl tip loss correction plus hub loss correction of same form.
DuctAPE.C4Blade.SimpleAF
— TypeSimpleAF(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 slopealpha0::Float64
: zero-lift angle of attackclmax::Float64
: maximum lift coefficientclmin::Float64
: minimum lift coefficientcd0::Float64
: zero lift dragcd2::Float64
: quadratic drag term
DuctAPE.C4Blade.SkinFriction
— TypeSkinFriction(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)
DuctAPE.C4Blade.afeval
— Methodafeval(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 radiansRe::Float64
: Reynolds numberMach::Float64
: Mach number
Returns:
cl::Float64
: lift coefficientcd::Float64
: drag coefficient
DuctAPE.C4Blade.mach_correction
— Methodmach_correction(::MachCorrection, cl, cd, Mach)
Mach number correction for lift/drag coefficient
Arguments:
mc::MachCorrection
: used for dispatchcl::Float64
: lift coefficient before correctioncd::Float64
: drag coefficient before correctionMach::Float64
: Mach number
Returns:
cl::Float64
: lift coefficient after correctioncd::Float64
: drag coefficient after correction
DuctAPE.C4Blade.mach_correction
— Methodmach_correction(::PrandtlGlauert, cl, cd, Mach)
Prandtl/Glauert Mach number correction for lift coefficient
DuctAPE.C4Blade.parsefile
— MethodA 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
...
DuctAPE.C4Blade.re_correction
— Methodre_correction(re::ReCorrection, cl, cd, Re)
Reynolds number correction for lift/drag coefficient
Arguments:
re::ReCorrection
: used for dispatchcl::Float64
: lift coefficient before correctioncd::Float64
: drag coefficient before correctionRe::Float64
: Reynolds number
Returns:
cl::Float64
: lift coefficient after correctioncd::Float64
: drag coefficient after correction
DuctAPE.C4Blade.re_correction
— Methodre_correction(sf::SkinFriction, cl, cd, Re)
Skin friction coefficient correction based on flat plat drag increases with Reynolds number.
DuctAPE.C4Blade.rotation_correction
— Functionrotation_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 dispatchcl::Float64
: lift coefficient before correctioncd::Float64
: drag coefficient before correctioncr::Float64
: local chord / local radiusrR::Float64
: local radius / tip radiustsr::Float64
: local tip speed ratio (Omega r / Vinf)alpha::Float64
: local angle of attackphi::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 correctioncd::Float64
: drag coefficient after correction
DuctAPE.C4Blade.tip_correction
— Methodtip_correction(::TipCorrection, r, Rhub, Rtip, phi, B)
Tip corrections for 3D flow.
Arguments:
tc::TipCorrection
: used for dispatchr::Float64
: local radiusRhub::Float64
: hub radiusRtip::Float64
: tip radiusphi::Float64
: inflow angleB::Integer
: number of blades
Returns:
F::Float64
: tip loss factor to multiple against loads.
DuctAPE.C4Blade.viterna
— Functionviterna(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 attackcl::Vector{Float64}
: correspnding lift coefficientscd::Vector{Float64}
: correspnding drag coefficientscr75::Float64
: chord/Rtip at 75% Rtipnalpha::Int64
: number of discrete points (angles of attack) to include in extrapolation
Returns:
alpha::Vector{Float64}
: angle of attack from -pi to picl::Vector{Float64}
: correspnding extrapolated lift coefficientscd::Vector{Float64}
: correspnding extrapolated drag coefficients
DuctAPE.C4Blade.write_af
— Methodwrite_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 toaf::AFType
: writing is dispatched based on type (AlphaAF, AlphaReAF, etc.)radians::Bool
: true if you want angle of attack to be written in radians