diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index fe963d8f..f993bf62 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.10.4","generation_timestamp":"2024-07-23T18:02:06","documenter_version":"1.5.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.10.4","generation_timestamp":"2024-07-23T18:17:08","documenter_version":"1.5.0"}} \ No newline at end of file diff --git a/dev/C4Blade/airfoil_types/CCBlade/index.html b/dev/C4Blade/airfoil_types/CCBlade/index.html index 6c297680..e09f855a 100644 --- a/dev/C4Blade/airfoil_types/CCBlade/index.html +++ b/dev/C4Blade/airfoil_types/CCBlade/index.html @@ -2,13 +2,13 @@ CCBlade Airfoil Types · DuctAPE.jl

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)
+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)
+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)
+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
+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:

or files with one per Re/Mach combination

Arguments:

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.PrandtlTipType
PrandtlTip()

Standard Prandtl tip loss correction.

source
DuctAPE.C4Blade.PrandtlTipHubType
PrandtlTipHub()

Standard Prandtl tip loss correction plus hub loss correction of same form.

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.mach_correctionMethod
mach_correction(::PrandtlGlauert, cl, cd, Mach)

Prandtl/Glauert Mach number correction for lift coefficient

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
diff --git a/dev/C4Blade/airfoil_types/DFDC/index.html b/dev/C4Blade/airfoil_types/DFDC/index.html index 0add707f..f742817d 100644 --- a/dev/C4Blade/airfoil_types/DFDC/index.html +++ b/dev/C4Blade/airfoil_types/DFDC/index.html @@ -1,2 +1,2 @@ -DFDC Airfoil Type · DuctAPE.jl

DFDC Airfoil Type

The DFDC Airfoil type is very similar to the XROTOR airfoil type, but includes additions for cascade corrections based on stagger and solidity. The cascade corrections aren't particularly accurate, but they do apply ballpark effects resulting from high solidity blade sections. The main benefit to this airfoil type is its simplicity and that the post-stall behavior is already in a format allowing more robust convergence of the DuctAPE solvers.

DuctAPE.C4Blade.DFDCairfoilType

Fields:

  • alpha0::Float : zero lift angle of attack
  • clmax::Float : maximum cl
  • clmin::Float : minimum cl
  • dclda::Float : lift curve slope (1/radians)
  • dclda_stall::Float : lift curve slope post-stall (1/radians)
  • dcl_stall::Float : cl increment from initial to total stall.
  • cdmin::Float : minimum cd
  • cldmin::Float : cl at cdmin
  • dcddcl2::Float : quadratic curve factor for cl vs cd curve $\left(\frac{d(c_d)}{d(c_l^2)}\right)$
  • cmcon::Float : pitching moment constant (unused right now)
  • Re_ref::Float : reference Reynolds number at which cd values apply
  • Re_exp::Float : Reynolds number exponent scaling $\left( c_d = c_d(Re/Re_{ref})^{Re_{exp}}\right)$ should be 0.2 for fully laminar and 0.5 for fully turbulent
  • mcrit::Float : critical Mach number
source
+DFDC Airfoil Type · DuctAPE.jl

DFDC Airfoil Type

The DFDC Airfoil type is very similar to the XROTOR airfoil type, but includes additions for cascade corrections based on stagger and solidity. The cascade corrections aren't particularly accurate, but they do apply ballpark effects resulting from high solidity blade sections. The main benefit to this airfoil type is its simplicity and that the post-stall behavior is already in a format allowing more robust convergence of the DuctAPE solvers.

DuctAPE.C4Blade.DFDCairfoilType

Fields:

  • alpha0::Float : zero lift angle of attack
  • clmax::Float : maximum cl
  • clmin::Float : minimum cl
  • dclda::Float : lift curve slope (1/radians)
  • dclda_stall::Float : lift curve slope post-stall (1/radians)
  • dcl_stall::Float : cl increment from initial to total stall.
  • cdmin::Float : minimum cd
  • cldmin::Float : cl at cdmin
  • dcddcl2::Float : quadratic curve factor for cl vs cd curve $\left(\frac{d(c_d)}{d(c_l^2)}\right)$
  • cmcon::Float : pitching moment constant (unused right now)
  • Re_ref::Float : reference Reynolds number at which cd values apply
  • Re_exp::Float : Reynolds number exponent scaling $\left( c_d = c_d(Re/Re_{ref})^{Re_{exp}}\right)$ should be 0.2 for fully laminar and 0.5 for fully turbulent
  • mcrit::Float : critical Mach number
source
diff --git a/dev/C4Blade/airfoil_types/actuator_disk/index.html b/dev/C4Blade/airfoil_types/actuator_disk/index.html index 9915b770..ec798a29 100644 --- a/dev/C4Blade/airfoil_types/actuator_disk/index.html +++ b/dev/C4Blade/airfoil_types/actuator_disk/index.html @@ -1,2 +1,2 @@ -Actuator Disk Type · DuctAPE.jl

Actuator Disk Type

Warning

Actuator disk types are currently in development and not ready for general use.

DuctAPE currently implements an actuator disk type that can be used to directly define the rotor blade circulation.

DuctAPE.C4Blade.ADMType

Fields:

  • prescribed_circulation::Float=0.0 : Prescribed circulation strength
  • prescribed_source_strength::Float=0.0 : Prescribed source panel strength
source
+Actuator Disk Type · DuctAPE.jl

Actuator Disk Type

Warning

Actuator disk types are currently in development and not ready for general use.

DuctAPE currently implements an actuator disk type that can be used to directly define the rotor blade circulation.

DuctAPE.C4Blade.ADMType

Fields:

  • prescribed_circulation::Float=0.0 : Prescribed circulation strength
  • prescribed_source_strength::Float=0.0 : Prescribed source panel strength
source
diff --git a/dev/C4Blade/airfoil_types/cascade/index.html b/dev/C4Blade/airfoil_types/cascade/index.html index 33f29034..127c2fde 100644 --- a/dev/C4Blade/airfoil_types/cascade/index.html +++ b/dev/C4Blade/airfoil_types/cascade/index.html @@ -1,4 +1,4 @@ Cascade Types · DuctAPE.jl

Cascade Types

Warning

Cascade types are currently in development and not ready for general use.

Cascade types are defined analogous to CCBlade airfoil types. Instead of angle of attack, however, cascade types take in both inflow and stagger angles. In addition, cascade types are dependent on local solidity.

DuctAPE.C4Blade.InReStSoMaCASType
InReStSoMaCAS(inflow, Re, stagger, solidity, Mach, cl, cd, info)
 InReStSoMaCAS(inflow, Re, stagger, solidity, Mach, cl, cd)
-InReStSoMaCAS(filenames::Matrix{String}; radians=true)

Data is fit recursively with Akima splines.

Arguments:

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

or files with one per Re/Stagger/Solidty/Mach combination

Arguments:

  • filenames::Matrix{String}: name/path of files to read in. filenames[i, j, k, ell] corresponds to Re[i] Stagger[j] Stagger[k] and Solidity[k] with each in ascending order.
  • radians::Bool: true if angle of attack in file is given in radians
source
DuctAPE.C4Blade.interp5dMethod
 interp5d(interp1d, x1data, x2data, x3data, x4data, fdata, x1pt, x2pt, x3pt, x4pt)

Same as FLOWMath.interp4d, ex1cept in five dimensions.

source
DuctAPE.C4Blade.parsecascadefileMethod
parsefile(filename, radians, solidity)

Cascade version of parsefile function from CCBlade. Assumes stagger is given before reynolds and Mach number, and solidity is given after

source
DuctAPE.C4Blade.writecascadefileMethod
writecascadefile(filename, info, Re, Mach, stagger, inflow, cl, cd, radians)

Cascade version of writecascadefile function from CCBlade. Writes solidity after Mach number

source
+InReStSoMaCAS(filenames::Matrix{String}; radians=true)

Data is fit recursively with Akima splines.

Arguments:

or files with one per Re/Stagger/Solidty/Mach combination

Arguments:

source
DuctAPE.C4Blade.interp5dMethod
 interp5d(interp1d, x1data, x2data, x3data, x4data, fdata, x1pt, x2pt, x3pt, x4pt)

Same as FLOWMath.interp4d, ex1cept in five dimensions.

source
DuctAPE.C4Blade.parsecascadefileMethod
parsefile(filename, radians, solidity)

Cascade version of parsefile function from CCBlade. Assumes stagger is given before reynolds and Mach number, and solidity is given after

source
DuctAPE.C4Blade.writecascadefileMethod
writecascadefile(filename, info, Re, Mach, stagger, inflow, cl, cd, radians)

Cascade version of writecascadefile function from CCBlade. Writes solidity after Mach number

source
diff --git a/dev/C4Blade/api/index.html b/dev/C4Blade/api/index.html index 365e47fa..ed415e30 100644 --- a/dev/C4Blade/api/index.html +++ b/dev/C4Blade/api/index.html @@ -1,2 +1,2 @@ -API Reference · DuctAPE.jl

Index

    +API Reference · DuctAPE.jl

    Index

      diff --git a/dev/C4Blade/corrections/index.html b/dev/C4Blade/corrections/index.html index 03fe0b0a..e636badd 100644 --- a/dev/C4Blade/corrections/index.html +++ b/dev/C4Blade/corrections/index.html @@ -9,7 +9,7 @@ cd_cutoff_slope=0.9, N=20, blend_hardness=50 -)

      Cuts off coefficient vs alpha curve at min and max coefficient and places rest of curve from -pi to min coeff and max coeff to pi according to user defined clcutoffslope (default 0.1)

      Arguments:

      Keyword Arguments:

      Returns:

      source

      Various other correction methods are available, including the cascade corrections inherent in the DuctAPE.C4Blade.DFDCairfoil type. The following methods are in addition to the various corrections available alongside the CCBlade Airfoil Types.

      DuctAPE.C4Blade.corrected_clcdMethod
      corrected_clcd(af::AlphaReAF, alpha, Re, Mach, solidity, stagger; kwargs...)

      Evaluates and applies on-the-fly corrections for airfoil lift and drag. On-the-fly airfoil polar corrections include solidity/stagger corrections, Prandtl-Glauert compressibility corrections, and transonic lift limits and drag additions.

      corrected_clcd!(cl, cd, af::AlphaReAF, Re, alpha, Mach, solidity, stagger; kwargs...)

      Evaluates and applies on-the-fly corrections for airfoil lift and drag in place.

      corrected_clcd!(cl, cd, Mach, solidity, stagger; kwargs...)

      Applies on-the-fly corrections for airfoil lift and drag in place.

      corrected_clcd!(cl, cd, af::AlphaAF, alpha, Re, Mach, solidity, stagger; kwargs...)

      Evaluates and applies on-the-fly corrections, including Reynolds corrections, for airfoil lift and drag in place

      corrected_clcd(cas::InReStSoMaCAS, inflow, Re, Mach, solidity, stagger)

      Evaluates cascade lift and drag.

      Arguments:

      Coefficients

      • cl::Float : local lift coefficient
      • cd::Float : local drag coefficient

      Airfoil Object

      • af::AlphaReAF : airfoil object of CCBlade type dependent on angle of attack and Reynolds number

      or

      • af::AlphaAF : airfoil object of CCBlade type dependent on angle of attack only

      or

      • cas::InReStSoMaCAS : cascade object depentent on inflow angle, Reynolds number, stagger, solidity, and Mach number.

      Flow Angle

      • alpha::Float : angle of attack, radians. Used with airfoil types

      or

      • inflow::Float : inflow angle, radians. Used with cascade types

      Flow Conditions

      • Re::Float : Reynolds number
      • Mach::Float : Mach number

      Geometry

      • solidity::Float : Local solidity
      • stagger::Float : Stagger angle, radians

      Keyword Arguments:

      • mcrit::Float=0.7 : Critical Mach number

      rotorzloc airfoil type parameters for post-stall behavior

      • dcl_stall::Float=0.1 : change in cl from incipient to total stall, used in transonic lift limiter correction
      • dclda_stall::Float=0.1 : Post-stall lift curve slope

      Correction factors that were hard coded in rotorzloc and DFDC

      • cdmfactor::Float=10.0 :
      • clmfactor::Float=0.25 :
      • mexp::Float=3.0 :
      • cdmstall::Float=0.1 :
      • cdmdd::Float=0.0020 :

      Smoothing Paramters

      • ssblend_hardness::Float=100.0 : sigmoid blending hardness for solidity/stagger corrections
      • transblendhardness::Float=75.0 : sigmoid blending hardness for transonic corrections
      • absdx::Float=0.0625 : smooth absolute value Δα (radians) for transonic drag addition

      Miscellaneous

      • verbose::Bool=false : Boolean of whether to print warnings, etc.
      source
      DuctAPE.C4Blade.prandtl_glauert!Method
      prandtl_glauert!(cl, ma)

      In place version of pradtl_glauert.

      source
      DuctAPE.C4Blade.prandtl_glauertMethod
      prandtl_glauert(cl, ma)

      Applies Prandtl-Glauert correction

      Arguments:

      • cl::Float : local lift coefficient

      Returns

      • cl_corr::AbstractVector{Float} : corrected lift coefficients
      source
      DuctAPE.C4Blade.prandtl_glauert_factorMethod
      prandtl_glauert_factor(mach; verbose=false, blend_range=0.02)

      Smoothed Prandtl-Glauert Mach correction factor

      Arguments:

      • mach::Float : Mach number

      Keyword Arguments:

      • blend_range::Float=0.02 : range for blending factor and max cutoff (allowing Mach >= 1.0 for continuity)
      source
      DuctAPE.C4Blade.quadsplineMethod
      quadspline(xdata, ydata, xpoint)

      Sample data in quadratic spline at give point.

      source
      DuctAPE.C4Blade.re_drag!Method
      re_drag!(cd, re, re_ref; re_exp=0.5)

      In-place version of re_drag.

      source
      DuctAPE.C4Blade.re_dragMethod
      re_drag(cd, re, re_ref; re_exp=0.5)

      Arguments:

      • cd::AbstractVector{Float} : input drag coefficients
      • re::Float : Current Reynolds number
      • re_ref::Float : Reference Reynolds number (at which the cd's were generated)

      Keyword Arguments:

      • re_exp::Float=0.5 : should be 0.2 for laminar and 0.5 for turbulent flow

      Returns:

      • cd_corr::AbstractVector{Float} : Reynolds corrected drag coefficients
      source
      DuctAPE.C4Blade.solidity_and_stagger!Method
      solidity_and_stagger!(cl, solidity, stagger; blend_hardness=100)

      In-place version of solidity_and_stagger.

      source
      DuctAPE.C4Blade.solidity_and_staggerMethod
      solidity_and_stagger(cl, solidity, stagger; blend_hardness=100)

      Apply smoothed Wallis' cascade correction (see solidity_and_stagger_factor_smooth) to local lift.

      Arguments:

      • cl::AbstractVector{Float} : input lift coefficients
      • solidity::Float : local solidity
      • stagger::Float : local stagger (in radians)

      Keyword Arguments:

      • blend_hardness::Float=100 : hardness of smoothing blends

      Returns:

      • cl_corr::AbstractVector{Float} : corrected lift coefficients.
      source
      DuctAPE.C4Blade.solidity_and_stagger_factorMethod
      solidity_and_stagger_factor(solidity, stagger; blend_hardness=100)

      Correction for airfoil data used in a high-solidity cascade application. Correction is used in DFDC airfoils nominally and come from quadratic fits to curves in fig 6-29 "Axial Flow Fans and Ducts" by Wallis (1983). Note that the corrections are really only meant for Wallis' custom airfoil design and specific conditions mentioned in the book.

      Arguments:

      • solidity::Float : local solidity
      • stagger::Float : local stagger (in radians)

      Keyword Arguments:

      • blend_hardness::Float=100 : hardness for smoothing blends
      source
      DuctAPE.C4Blade.solidity_and_stagger_factor_smoothMethod
      solidity_and_stagger_factor_smooth(solidity, stagger; blend_hardness=100)

      A smoothed version of solidity_and_stagger_factor.

      Arguments:

      • solidity::Float : local solidity
      • stagger::Float : local stagger (in radians)

      Keyword Arguments:

      • blend_hardness::Float=100 : hardness for smoothing blends
      source
      DuctAPE.C4Blade.stall_limitersMethod
      stall_limiters(
      +)

      Cuts off coefficient vs alpha curve at min and max coefficient and places rest of curve from -pi to min coeff and max coeff to pi according to user defined clcutoffslope (default 0.1)

      Arguments:

      • aoa::AbstractVector{Float} : input angles of attack, in radians
      • cl::AbstractVector{Float} : input lift coefficients
      • cd::AbstractVector{Float} : input drag coefficients

      Keyword Arguments:

      • clminid::Float=nothing : manually set index for minimum cl
      • clmaxid::Float=nothing : manually set index for maximum cl
      • cl_cutoff_slope::Float=0.1 : "post-stall" slope for cl
      • cd_cutoff_slope::Float=0.1 : "post-stall" slope for cd
      • blend_hardness::Float=50 : hardenss of blend between nominal polar and post-stall modifications.

      Returns:

      • aoa_ext::AbstractVector{Float} : angles of attack for modified polar, in radians
      • cl_ext::AbstractVector{Float} : modified lift coefficients
      • cd_ext::AbstractVector{Float} : modified drag coefficients
      source

      Various other correction methods are available, including the cascade corrections inherent in the DuctAPE.C4Blade.DFDCairfoil type. The following methods are in addition to the various corrections available alongside the CCBlade Airfoil Types.

      DuctAPE.C4Blade.corrected_clcdMethod
      corrected_clcd(af::AlphaReAF, alpha, Re, Mach, solidity, stagger; kwargs...)

      Evaluates and applies on-the-fly corrections for airfoil lift and drag. On-the-fly airfoil polar corrections include solidity/stagger corrections, Prandtl-Glauert compressibility corrections, and transonic lift limits and drag additions.

      corrected_clcd!(cl, cd, af::AlphaReAF, Re, alpha, Mach, solidity, stagger; kwargs...)

      Evaluates and applies on-the-fly corrections for airfoil lift and drag in place.

      corrected_clcd!(cl, cd, Mach, solidity, stagger; kwargs...)

      Applies on-the-fly corrections for airfoil lift and drag in place.

      corrected_clcd!(cl, cd, af::AlphaAF, alpha, Re, Mach, solidity, stagger; kwargs...)

      Evaluates and applies on-the-fly corrections, including Reynolds corrections, for airfoil lift and drag in place

      corrected_clcd(cas::InReStSoMaCAS, inflow, Re, Mach, solidity, stagger)

      Evaluates cascade lift and drag.

      Arguments:

      Coefficients

      • cl::Float : local lift coefficient
      • cd::Float : local drag coefficient

      Airfoil Object

      • af::AlphaReAF : airfoil object of CCBlade type dependent on angle of attack and Reynolds number

      or

      • af::AlphaAF : airfoil object of CCBlade type dependent on angle of attack only

      or

      • cas::InReStSoMaCAS : cascade object depentent on inflow angle, Reynolds number, stagger, solidity, and Mach number.

      Flow Angle

      • alpha::Float : angle of attack, radians. Used with airfoil types

      or

      • inflow::Float : inflow angle, radians. Used with cascade types

      Flow Conditions

      • Re::Float : Reynolds number
      • Mach::Float : Mach number

      Geometry

      • solidity::Float : Local solidity
      • stagger::Float : Stagger angle, radians

      Keyword Arguments:

      • mcrit::Float=0.7 : Critical Mach number

      rotorzloc airfoil type parameters for post-stall behavior

      • dcl_stall::Float=0.1 : change in cl from incipient to total stall, used in transonic lift limiter correction
      • dclda_stall::Float=0.1 : Post-stall lift curve slope

      Correction factors that were hard coded in rotorzloc and DFDC

      • cdmfactor::Float=10.0 :
      • clmfactor::Float=0.25 :
      • mexp::Float=3.0 :
      • cdmstall::Float=0.1 :
      • cdmdd::Float=0.0020 :

      Smoothing Paramters

      • ssblend_hardness::Float=100.0 : sigmoid blending hardness for solidity/stagger corrections
      • transblendhardness::Float=75.0 : sigmoid blending hardness for transonic corrections
      • absdx::Float=0.0625 : smooth absolute value Δα (radians) for transonic drag addition

      Miscellaneous

      • verbose::Bool=false : Boolean of whether to print warnings, etc.
      source
      DuctAPE.C4Blade.prandtl_glauert!Method
      prandtl_glauert!(cl, ma)

      In place version of pradtl_glauert.

      source
      DuctAPE.C4Blade.prandtl_glauertMethod
      prandtl_glauert(cl, ma)

      Applies Prandtl-Glauert correction

      Arguments:

      • cl::Float : local lift coefficient

      Returns

      • cl_corr::AbstractVector{Float} : corrected lift coefficients
      source
      DuctAPE.C4Blade.prandtl_glauert_factorMethod
      prandtl_glauert_factor(mach; verbose=false, blend_range=0.02)

      Smoothed Prandtl-Glauert Mach correction factor

      Arguments:

      • mach::Float : Mach number

      Keyword Arguments:

      • blend_range::Float=0.02 : range for blending factor and max cutoff (allowing Mach >= 1.0 for continuity)
      source
      DuctAPE.C4Blade.quadsplineMethod
      quadspline(xdata, ydata, xpoint)

      Sample data in quadratic spline at give point.

      source
      DuctAPE.C4Blade.re_drag!Method
      re_drag!(cd, re, re_ref; re_exp=0.5)

      In-place version of re_drag.

      source
      DuctAPE.C4Blade.re_dragMethod
      re_drag(cd, re, re_ref; re_exp=0.5)

      Arguments:

      • cd::AbstractVector{Float} : input drag coefficients
      • re::Float : Current Reynolds number
      • re_ref::Float : Reference Reynolds number (at which the cd's were generated)

      Keyword Arguments:

      • re_exp::Float=0.5 : should be 0.2 for laminar and 0.5 for turbulent flow

      Returns:

      • cd_corr::AbstractVector{Float} : Reynolds corrected drag coefficients
      source
      DuctAPE.C4Blade.solidity_and_stagger!Method
      solidity_and_stagger!(cl, solidity, stagger; blend_hardness=100)

      In-place version of solidity_and_stagger.

      source
      DuctAPE.C4Blade.solidity_and_staggerMethod
      solidity_and_stagger(cl, solidity, stagger; blend_hardness=100)

      Apply smoothed Wallis' cascade correction (see solidity_and_stagger_factor_smooth) to local lift.

      Arguments:

      • cl::AbstractVector{Float} : input lift coefficients
      • solidity::Float : local solidity
      • stagger::Float : local stagger (in radians)

      Keyword Arguments:

      • blend_hardness::Float=100 : hardness of smoothing blends

      Returns:

      • cl_corr::AbstractVector{Float} : corrected lift coefficients.
      source
      DuctAPE.C4Blade.solidity_and_stagger_factorMethod
      solidity_and_stagger_factor(solidity, stagger; blend_hardness=100)

      Correction for airfoil data used in a high-solidity cascade application. Correction is used in DFDC airfoils nominally and come from quadratic fits to curves in fig 6-29 "Axial Flow Fans and Ducts" by Wallis (1983). Note that the corrections are really only meant for Wallis' custom airfoil design and specific conditions mentioned in the book.

      Arguments:

      • solidity::Float : local solidity
      • stagger::Float : local stagger (in radians)

      Keyword Arguments:

      • blend_hardness::Float=100 : hardness for smoothing blends
      source
      DuctAPE.C4Blade.solidity_and_stagger_factor_smoothMethod
      solidity_and_stagger_factor_smooth(solidity, stagger; blend_hardness=100)

      A smoothed version of solidity_and_stagger_factor.

      Arguments:

      • solidity::Float : local solidity
      • stagger::Float : local stagger (in radians)

      Keyword Arguments:

      • blend_hardness::Float=100 : hardness for smoothing blends
      source
      DuctAPE.C4Blade.stall_limitersMethod
      stall_limiters(
           aoa,
           cl,
           cd;
      @@ -19,7 +19,7 @@
           cd_cutoff_slope=0.9,
           N=20,
           blend_hardness=50
      -)

      Cuts off coefficient vs alpha curve at min and max coefficient and places rest of curve from -pi to min coeff and max coeff to pi according to user defined clcutoffslope (default 0.1)

      Arguments:

      • aoa::AbstractVector{Float} : input angles of attack, in radians
      • cl::AbstractVector{Float} : input lift coefficients
      • cd::AbstractVector{Float} : input drag coefficients

      Keyword Arguments:

      • clminid::Float=nothing : manually set index for minimum cl
      • clmaxid::Float=nothing : manually set index for maximum cl
      • cl_cutoff_slope::Float=0.1 : "post-stall" slope for cl
      • cd_cutoff_slope::Float=0.1 : "post-stall" slope for cd
      • blend_hardness::Float=50 : hardenss of blend between nominal polar and post-stall modifications.

      Returns:

      • aoa_ext::AbstractVector{Float} : angles of attack for modified polar, in radians
      • cl_ext::AbstractVector{Float} : modified lift coefficients
      • cd_ext::AbstractVector{Float} : modified drag coefficients
      source
      DuctAPE.C4Blade.transonic_drag_addition!Method
      transonic_drag_addition!(
      +)

      Cuts off coefficient vs alpha curve at min and max coefficient and places rest of curve from -pi to min coeff and max coeff to pi according to user defined clcutoffslope (default 0.1)

      Arguments:

      • aoa::AbstractVector{Float} : input angles of attack, in radians
      • cl::AbstractVector{Float} : input lift coefficients
      • cd::AbstractVector{Float} : input drag coefficients

      Keyword Arguments:

      • clminid::Float=nothing : manually set index for minimum cl
      • clmaxid::Float=nothing : manually set index for maximum cl
      • cl_cutoff_slope::Float=0.1 : "post-stall" slope for cl
      • cd_cutoff_slope::Float=0.1 : "post-stall" slope for cd
      • blend_hardness::Float=50 : hardenss of blend between nominal polar and post-stall modifications.

      Returns:

      • aoa_ext::AbstractVector{Float} : angles of attack for modified polar, in radians
      • cl_ext::AbstractVector{Float} : modified lift coefficients
      • cd_ext::AbstractVector{Float} : modified drag coefficients
      source
      DuctAPE.C4Blade.transonic_drag_addition!Method
      transonic_drag_addition!(
           cd,
           cl,
           clcdmin,
      @@ -32,7 +32,7 @@
           cdmstall=0.1000,
           absdx=0.0625,
           blend_hardness=50,
      -)

      Smoothed, vecotrized, in-place version of transonic_drag_addition.

      Different Arguments:

      • cd::AbstractVector{Float} : vector of drag coefficients
      • cl::AbstractVector{Float} : vector of lift coefficients

      Additional Keyword Argument:

      • blend_hardness::Float=50 : hardenss of smoothing blends
      source
      DuctAPE.C4Blade.transonic_drag_additionMethod
      transonic_drag_addition(
      +)

      Smoothed, vecotrized, in-place version of transonic_drag_addition.

      Different Arguments:

      • cd::AbstractVector{Float} : vector of drag coefficients
      • cl::AbstractVector{Float} : vector of lift coefficients

      Additional Keyword Argument:

      • blend_hardness::Float=50 : hardenss of smoothing blends
      source
      DuctAPE.C4Blade.transonic_drag_additionMethod
      transonic_drag_addition(
           cd,
           cl,
           clcdmin,
      @@ -44,7 +44,7 @@
           cdmdd=0.0020,
           cdmstall=0.1000,
           absdx=0.0625,
      -)

      Drag augmentation due to transonic effects as found in XROTOR and DFDC. Note this is nominally applied to DFDC airfoil evaluation.

      Arguments:

      • cd::Float : input drag coefficient
      • cl::Float : input lift coefficient
      • clcdmin::Float : lift coefficient at minimum drag coefficient.
      • mach::Float : Mach number

      Keyword Arguments

      • mcrit::Float=0.7 : critical Mach number
      • cdmfactor::Float=10.0 : factor hard coded in XROTOR and DFDC
      • clmfactor::Float=0.25 : factor hard coded in XROTOR and DFDC
      • mexp::Float=3.0 : factor hard coded in XROTOR and DFDC
      • cdmstall::Float=0.1000 : factor hard coded in XROTOR and DFDC
      • absdx::Float=0.0625 : smoothing factor for smooth absolute value function

      Returns:

      • cl_corr:Float : corrected lift coefficient
      source
      DuctAPE.C4Blade.transonic_lift_limiterMethod
      transonic_lift_limiter(
      +)

      Drag augmentation due to transonic effects as found in XROTOR and DFDC. Note this is nominally applied to DFDC airfoil evaluation.

      Arguments:

      • cd::Float : input drag coefficient
      • cl::Float : input lift coefficient
      • clcdmin::Float : lift coefficient at minimum drag coefficient.
      • mach::Float : Mach number

      Keyword Arguments

      • mcrit::Float=0.7 : critical Mach number
      • cdmfactor::Float=10.0 : factor hard coded in XROTOR and DFDC
      • clmfactor::Float=0.25 : factor hard coded in XROTOR and DFDC
      • mexp::Float=3.0 : factor hard coded in XROTOR and DFDC
      • cdmstall::Float=0.1000 : factor hard coded in XROTOR and DFDC
      • absdx::Float=0.0625 : smoothing factor for smooth absolute value function

      Returns:

      • cl_corr:Float : corrected lift coefficient
      source
      DuctAPE.C4Blade.transonic_lift_limiterMethod
      transonic_lift_limiter(
           cl,
           mach,
           clcdmin,
      @@ -58,7 +58,7 @@
           clmfactor=0.25,
           mexp=3.0,
           cdmstall=0.1000,
      -)

      Airfoil polar corrections due to transonic effects as found in XROTOR and DFDC. Note that this correction is done nominally in the DFDC airfoil evaluation.

      Arguments:

      • cl::Float : input lift coefficient
      • mach::Float : Mach number
      • clcdmin::Float : lift coefficient at minimum drag coefficient.
      • clmax::Float : maximum lift coefficient
      • clmin::Float : minimum lift coefficient
      • dclda::Float : lift-curve slope
      • mcrit::Float=0.7 : critical Mach number
      • dcl_stall::Float=0.1 : cl increment from initial to total stall
      • dclda_stall::Float=0.1 : lift curve slope post-stall (1/radians)
      • cdmfactor::Float=10.0 : factor hard coded in XROTOR and DFDC
      • clmfactor::Float=0.25 : factor hard coded in XROTOR and DFDC
      • mexp::Float=3.0 : factor hard coded in XROTOR and DFDC
      • cdmstall::Float=0.1000 : factor hard coded in XROTOR and DFDC

      Returns:

      • cl_corr:Float : corrected lift coefficient
      source
      DuctAPE.C4Blade.transonic_lift_limiter_smooth!Method
      transonic_lift_limiter_smooth!(
      +)

      Airfoil polar corrections due to transonic effects as found in XROTOR and DFDC. Note that this correction is done nominally in the DFDC airfoil evaluation.

      Arguments:

      • cl::Float : input lift coefficient
      • mach::Float : Mach number
      • clcdmin::Float : lift coefficient at minimum drag coefficient.
      • clmax::Float : maximum lift coefficient
      • clmin::Float : minimum lift coefficient
      • dclda::Float : lift-curve slope
      • mcrit::Float=0.7 : critical Mach number
      • dcl_stall::Float=0.1 : cl increment from initial to total stall
      • dclda_stall::Float=0.1 : lift curve slope post-stall (1/radians)
      • cdmfactor::Float=10.0 : factor hard coded in XROTOR and DFDC
      • clmfactor::Float=0.25 : factor hard coded in XROTOR and DFDC
      • mexp::Float=3.0 : factor hard coded in XROTOR and DFDC
      • cdmstall::Float=0.1000 : factor hard coded in XROTOR and DFDC

      Returns:

      • cl_corr:Float : corrected lift coefficient
      source
      DuctAPE.C4Blade.transonic_lift_limiter_smooth!Method
      transonic_lift_limiter_smooth!(
           cl,
           mach,
           clcdmin,
      @@ -73,4 +73,4 @@
           mexp=3.0,
           cdmstall=0.1000,
           blend_hardness=50,
      -)

      Smoothed, vectorized, in-place version of transonic_lift_limiter.

      Different Arguments:

      • cl::AbstractVector{Float} : vector of lift coefficients

      Additional Keyword Argument:

      • blend_hardness::Float=50 : hardenss of smoothing blends
      source
      +)

      Smoothed, vectorized, in-place version of transonic_lift_limiter.

      Different Arguments:

      Additional Keyword Argument:

      source diff --git a/dev/C4Blade/intro/index.html b/dev/C4Blade/intro/index.html index e2a56909..54b60604 100644 --- a/dev/C4Blade/intro/index.html +++ b/dev/C4Blade/intro/index.html @@ -1,2 +1,2 @@ -Intro · DuctAPE.jl
      +Intro · DuctAPE.jl
      diff --git a/dev/DuctAPE/advanced_usage/manual_repaneling/index.html b/dev/DuctAPE/advanced_usage/manual_repaneling/index.html index 5e872857..71be6fbf 100644 --- a/dev/DuctAPE/advanced_usage/manual_repaneling/index.html +++ b/dev/DuctAPE/advanced_usage/manual_repaneling/index.html @@ -1,2 +1,2 @@ -- · DuctAPE.jl

      Circumventing the Automated Geometry Re-paneling

      It is not advised to circument the automated geometry re-paneling, but if it must be done, the user needs to provide duct, centerbody, and wake nodes conforming to compatible geometry formatting. The best use case for this is to use previously generated geometry or perhaps geometry exported from DFDC.

      The process is not simple, but is possible. You would have to manually run the dispatches of precompute_parameters that take in the the repaneled body nodes and wake grid. These dispatches exist for this purpose, but there is, by design, no convenience functions at this time to aid the user in easily bypassing the automated repaneling.

      +- · DuctAPE.jl

      Circumventing the Automated Geometry Re-paneling

      It is not advised to circument the automated geometry re-paneling, but if it must be done, the user needs to provide duct, centerbody, and wake nodes conforming to compatible geometry formatting. The best use case for this is to use previously generated geometry or perhaps geometry exported from DFDC.

      The process is not simple, but is possible. You would have to manually run the dispatches of precompute_parameters that take in the the repaneled body nodes and wake grid. These dispatches exist for this purpose, but there is, by design, no convenience functions at this time to aid the user in easily bypassing the automated repaneling.

      diff --git a/dev/DuctAPE/advanced_usage/option/index.html b/dev/DuctAPE/advanced_usage/option/index.html index dd65f4ea..b9632b69 100644 --- a/dev/DuctAPE/advanced_usage/option/index.html +++ b/dev/DuctAPE/advanced_usage/option/index.html @@ -10,8 +10,8 @@ TIo<:IntegrationOptions, TSo<:SolverOptionsType, WS<:GridSolverOptionsType, -}

      Type containing (nearly) all the available user options.

      Fields

      General Options

      Pre-processing Options

      Geometry ee-interpolation and generation options :

      paneling options

      Integration Options

      Post-processing Options

      Solving Options

      source

      Options are selected through the set_options function

      DuctAPE.set_optionsFunction
      set_options(; kwargs...)
      -set_options(multipoint; kwargs...)

      Set the options for DuctAPE to use.

      Note that the vast majority of the available options are defined through keyword arguments. See the documentation for the various option types for more information.

      Arguments

      • multipoint::AbstractArray{OperatingPoint} : a vector of operating points to use if running a multi-point analysis.
      source

      There are three main sub-option objects for quadrature, wake geometry solver, and aerodyanmic solver; these are explained in more detail below. In addition, there are various options for pre- and post-processing as well as miscellaneous options for things such as supressing warnings and printing verbose statements throughout the analysis, which can be seen in the docstring above.

      Quadrature

      There are several implementations for different quadrature approaches depending on user desires; they include:

      The default method is Gauss-Legendre quadrature using 8 sample points for both the nominal and singular integrals. To modify the quadrature methods and settings, an IntegrationOptions struct needs to be passed to the set_options method.

      DuctAPE.IntegrationOptionsType
      struct IntegrationOptions{TN<:IntegrationMethod,TS<:IntegrationMethod}

      A struct used to hold the integration options for both the nominal and singular cases.

      Fields

      • nominal::IntegrationMethod=GaussLegendre(8) : the integration options to use for the nominal case.
      • singular::IntegrationMethod=GaussLegendre(8) : the integration options to use for the self-induced case.
      source

      The IntegraionOptions type takes in two objects of type IntegrationMethod, one for the nominal integrals, and one for the singular integrals. These methods can be mixed and matched between quadrature methods as well as settings.

      For example, if one wanted to use a 10-point Gauss-Legendre method for the nominal integrals, and a order 7 Gauss-Kronrod method with an absolute tolerance of 2e-16 the following would need to be included in the set_options call:

      # set nominal options using a GaussLegendre object (which is an InterationMethod type)
      +}

      Type containing (nearly) all the available user options.

      Fields

      General Options

      Pre-processing Options

      Geometry ee-interpolation and generation options :

      paneling options

      Integration Options

      Post-processing Options

      Solving Options

      source

      Options are selected through the set_options function

      DuctAPE.set_optionsFunction
      set_options(; kwargs...)
      +set_options(multipoint; kwargs...)

      Set the options for DuctAPE to use.

      Note that the vast majority of the available options are defined through keyword arguments. See the documentation for the various option types for more information.

      Arguments

      • multipoint::AbstractArray{OperatingPoint} : a vector of operating points to use if running a multi-point analysis.
      source

      There are three main sub-option objects for quadrature, wake geometry solver, and aerodyanmic solver; these are explained in more detail below. In addition, there are various options for pre- and post-processing as well as miscellaneous options for things such as supressing warnings and printing verbose statements throughout the analysis, which can be seen in the docstring above.

      Quadrature

      There are several implementations for different quadrature approaches depending on user desires; they include:

      The default method is Gauss-Legendre quadrature using 8 sample points for both the nominal and singular integrals. To modify the quadrature methods and settings, an IntegrationOptions struct needs to be passed to the set_options method.

      DuctAPE.IntegrationOptionsType
      struct IntegrationOptions{TN<:IntegrationMethod,TS<:IntegrationMethod}

      A struct used to hold the integration options for both the nominal and singular cases.

      Fields

      • nominal::IntegrationMethod=GaussLegendre(8) : the integration options to use for the nominal case.
      • singular::IntegrationMethod=GaussLegendre(8) : the integration options to use for the self-induced case.
      source

      The IntegraionOptions type takes in two objects of type IntegrationMethod, one for the nominal integrals, and one for the singular integrals. These methods can be mixed and matched between quadrature methods as well as settings.

      For example, if one wanted to use a 10-point Gauss-Legendre method for the nominal integrals, and a order 7 Gauss-Kronrod method with an absolute tolerance of 2e-16 the following would need to be included in the set_options call:

      # set nominal options using a GaussLegendre object (which is an InterationMethod type)
       # note that a convenience method is used here that takes in the number of points and
       #calculates the appropriate sample locations and weights.
       nominal_integration_method = DuctAPE.GaussLegendre(10)
      @@ -28,7 +28,7 @@
       )
       
       # example of calling the set_options function
      -options = DuctAPE.set_options(; integration_options=integration_options)

      Elliptic Grid Solvers

      As part of the pre-process, an elliptic grid defining the wake geometry is solved with a system of Poisson equations. For this solve there currently two options:

      The SLOR (successive line over relaxation) is the method employed by DFDC, and can be used by itself, or as a preconditioner to a Newton solve (using NLsolve.jl).

      Selection of solver and solver settings follows the same pattern as with the quadrature settings, in that the user must pass the appropriate GridSolverOptionsType into the set_options call.

      For the SLOR method alone, the type is

      DuctAPE.SLORGridSolverOptionsType
      struct SLORGridSolverOptions{TB,TF,TI} <: GridSolverOptionsType

      Options for SLOR (successive line over relaxation) elliptic grid solver.

      Fields

      • iteration_limit::TI = 100 : maximum number of iterations
      • atol::TF = 1e-9 : absolute convergence tolerance
      • `converged::AbstractArray{TB} = [false]
      source

      And for the SLOR+Newton method, the type is

      DuctAPE.GridSolverOptionsType
      struct GridSolverOptions{TB,TF,TI,TSym} <: GridSolverOptionsType

      Options for SLOR + Newton elliptic grid solver.

      Fields

      • iteration_limit::TI = 10 : maximum number of iterations
      • atol::TF = 1e-14 : absolute convergence tolerance
      • algorithm::TSym = :newton : algorithm to use in NLsolve.jl
      • autodiff::TSym = :forward : differentiation method to use in NLsolve.jl
      • converged::AbstractArray{TB} = [false]
      source

      As an example, this is the input that would be required to use the SLOR+Newton method with an absolute convergence tolerance of 1e-12, and also including the quadrature settings from above:

      # define wake grid solver settings
      +options = DuctAPE.set_options(; integration_options=integration_options)

      Elliptic Grid Solvers

      As part of the pre-process, an elliptic grid defining the wake geometry is solved with a system of Poisson equations. For this solve there currently two options:

      The SLOR (successive line over relaxation) is the method employed by DFDC, and can be used by itself, or as a preconditioner to a Newton solve (using NLsolve.jl).

      Selection of solver and solver settings follows the same pattern as with the quadrature settings, in that the user must pass the appropriate GridSolverOptionsType into the set_options call.

      For the SLOR method alone, the type is

      DuctAPE.SLORGridSolverOptionsType
      struct SLORGridSolverOptions{TB,TF,TI} <: GridSolverOptionsType

      Options for SLOR (successive line over relaxation) elliptic grid solver.

      Fields

      • iteration_limit::TI = 100 : maximum number of iterations
      • atol::TF = 1e-9 : absolute convergence tolerance
      • `converged::AbstractArray{TB} = [false]
      source

      And for the SLOR+Newton method, the type is

      DuctAPE.GridSolverOptionsType
      struct GridSolverOptions{TB,TF,TI,TSym} <: GridSolverOptionsType

      Options for SLOR + Newton elliptic grid solver.

      Fields

      • iteration_limit::TI = 10 : maximum number of iterations
      • atol::TF = 1e-14 : absolute convergence tolerance
      • algorithm::TSym = :newton : algorithm to use in NLsolve.jl
      • autodiff::TSym = :forward : differentiation method to use in NLsolve.jl
      • converged::AbstractArray{TB} = [false]
      source

      As an example, this is the input that would be required to use the SLOR+Newton method with an absolute convergence tolerance of 1e-12, and also including the quadrature settings from above:

      # define wake grid solver settings
       wake_solve_options = DuctAPE.GridSolverOptions(; atol=1e-12)
       
       # set all options
      @@ -81,4 +81,4 @@
               converged=fill(false, (2, nop)), # flags for each solver and each operating point
               iterations=zeros(Int, (2, nop)), # counts for each solver and each operating point
           ),
      -)
      +) diff --git a/dev/DuctAPE/advanced_usage/outputs/index.html b/dev/DuctAPE/advanced_usage/outputs/index.html index b205f8a8..1fcd0a8b 100644 --- a/dev/DuctAPE/advanced_usage/outputs/index.html +++ b/dev/DuctAPE/advanced_usage/outputs/index.html @@ -18,4 +18,4 @@ checkoutfileexists=options.checkoutfileexists, output_tuple_name=options.output_tuple_name, verbose=options.verbose, -)

      Post-process a converged nonlinear solve solution.

      Arguments

      Keyword Arguments

      Returns

      outs::NamedTuple : A named tuple containing all the output values including

      source

      Returning the Pre-process Objects

      Sometimes, it may be desireable to return the pre-process objects, including:

      In this case, we can use the return_inputs keyword argument when calling the analyze function to return a named tuple containing those pre-process objects.

      outs, ins, success_flag = dt.analyze(propulsor; return_inputs=true)
      +)

      Post-process a converged nonlinear solve solution.

      Arguments

      Keyword Arguments

      Returns

      outs::NamedTuple : A named tuple containing all the output values including

      source

      Returning the Pre-process Objects

      Sometimes, it may be desireable to return the pre-process objects, including:

      In this case, we can use the return_inputs keyword argument when calling the analyze function to return a named tuple containing those pre-process objects.

      outs, ins, success_flag = dt.analyze(propulsor; return_inputs=true)
      diff --git a/dev/DuctAPE/advanced_usage/precompilation/index.html b/dev/DuctAPE/advanced_usage/precompilation/index.html index 94a98941..f1ca0397 100644 --- a/dev/DuctAPE/advanced_usage/precompilation/index.html +++ b/dev/DuctAPE/advanced_usage/precompilation/index.html @@ -1,6 +1,6 @@ Preallocation · DuctAPE.jl

      Pre-compiling the Caches

      There are several available caches that can be precompiled to help speed up multiple analyses. The first is a cache used for intermediate calculations in the pre- and post-processing phases of the analysis. It can be preallocated using allocate_prepost_container_cache

      DuctAPE.allocate_prepost_container_cacheFunction
      allocate_prepost_container_cache(paneling_constants::PanelingConstants)
      -allocate_prepost_container_cache(problem_dimensions::ProblemDimensions)

      Allocate the pre- and post-processing cache (used for intermediate calculations) based on paneling constants or problem dimensions.

      Arguments

      • paneling_constants::PanelingConstants : a PanelingConstants object

      OR

      • problem_dimensions::ProblemDimensions : a ProblemDimensions object

      Keyword Arguments

      • fd_chunk_size::Int=12 : chunk size to use for PreallocationTools caches. Note that the automated chuck size for DuctAPE will always be the ForwardDiff threshold of 12 due to the size of the system, so it will be best to leave this at the default unless further development allows for chunk size selection for individual solvers.
      • levels::Int=1 : levels for nested duals. Note that since ImplicitAD is being used for all solves, there should be no need for more than 1 level.

      Returns

      • prepost_container_caching::NamedTuple : a Named Tuple containing:
        • prepost_container_cache::PreallocationTools.DiffCache : the cache
        • prepost_container_cache_dims::NamedTuple : a named tuple containing the dimensions used for reshaping the cache when needed.
      source

      The second is a cache containing parameters used in the solver, in other words, the results of the pre-processing phase. It can be preallocated using allocate_solve_parameter_cache.

      DuctAPE.allocate_solve_parameter_cacheFunction
      allocate_solve_parameter_cache(
      +allocate_prepost_container_cache(problem_dimensions::ProblemDimensions)

      Allocate the pre- and post-processing cache (used for intermediate calculations) based on paneling constants or problem dimensions.

      Arguments

      • paneling_constants::PanelingConstants : a PanelingConstants object

      OR

      • problem_dimensions::ProblemDimensions : a ProblemDimensions object

      Keyword Arguments

      • fd_chunk_size::Int=12 : chunk size to use for PreallocationTools caches. Note that the automated chuck size for DuctAPE will always be the ForwardDiff threshold of 12 due to the size of the system, so it will be best to leave this at the default unless further development allows for chunk size selection for individual solvers.
      • levels::Int=1 : levels for nested duals. Note that since ImplicitAD is being used for all solves, there should be no need for more than 1 level.

      Returns

      • prepost_container_caching::NamedTuple : a Named Tuple containing:
        • prepost_container_cache::PreallocationTools.DiffCache : the cache
        • prepost_container_cache_dims::NamedTuple : a named tuple containing the dimensions used for reshaping the cache when needed.
      source

      The second is a cache containing parameters used in the solver, in other words, the results of the pre-processing phase. It can be preallocated using allocate_solve_parameter_cache.

      DuctAPE.allocate_solve_parameter_cacheFunction
      allocate_solve_parameter_cache(
           solve_type::SolverOptionsType,
           paneling_constants::PanelingConstants;
           fd_chunk_size=12,
      @@ -11,7 +11,7 @@
           problem_dimensions::ProblemDimensions;
           fd_chunk_size=12,
           levels=1
      -)

      Allocate the solve parameter cache for parameters passed into the solver(s).

      Arguments

      • solve_type::SolverOptionsType : Solver options type used for dispatch
      • paneling_constants::PanelingConstants : a PanlingConstants object used for sizing

      OR

      • problem_dimensions::ProblemDimensions : a ProblemDimensions object used for sizing

      Keyword Arguments

      • fd_chunk_size::Int=12 : chunk size to use for PreallocationTools caches. Note that the automated chuck size for DuctAPE will always be the ForwardDiff threshold of 12 due to the size of the system, so it will be best to leave this at the default unless further development allows for chunk size selection for individual solvers.
      • levels::Int=1 : levels for nested duals. Note that since ImplicitAD is being used for all solves, there should be no need for more than 1 level.

      Returns

      • solve_parameter_caching::NamedTuple : a Named Tuple containing:
        • solve_parameter_cache::PreallocationTools.DiffCache : the cache
        • solve_parameter_cache_dims::NamedTuple : a named tuple containing the dimensions used for reshaping the cache when needed.
      source

      The final precompileable cache is for intermediate calculations within the solve and can be preallocated using allocate_solve_container_cache

      DuctAPE.allocate_solve_container_cacheFunction
      allocate_solve_container_cache(
      +)

      Allocate the solve parameter cache for parameters passed into the solver(s).

      Arguments

      • solve_type::SolverOptionsType : Solver options type used for dispatch
      • paneling_constants::PanelingConstants : a PanlingConstants object used for sizing

      OR

      • problem_dimensions::ProblemDimensions : a ProblemDimensions object used for sizing

      Keyword Arguments

      • fd_chunk_size::Int=12 : chunk size to use for PreallocationTools caches. Note that the automated chuck size for DuctAPE will always be the ForwardDiff threshold of 12 due to the size of the system, so it will be best to leave this at the default unless further development allows for chunk size selection for individual solvers.
      • levels::Int=1 : levels for nested duals. Note that since ImplicitAD is being used for all solves, there should be no need for more than 1 level.

      Returns

      • solve_parameter_caching::NamedTuple : a Named Tuple containing:
        • solve_parameter_cache::PreallocationTools.DiffCache : the cache
        • solve_parameter_cache_dims::NamedTuple : a named tuple containing the dimensions used for reshaping the cache when needed.
      source

      The final precompileable cache is for intermediate calculations within the solve and can be preallocated using allocate_solve_container_cache

      DuctAPE.allocate_solve_container_cacheFunction
      allocate_solve_container_cache(
           solve_type::SolverOptionsType,
           paneling_constants::PanelingConstants;
           fd_chunk_size=12,
      @@ -22,11 +22,11 @@
           problem_dimensions::ProblemDimensions;
           fd_chunk_size=12,
           levels=1,
      -)

      Allocate the solve cache (used for intermediate calculations) based on paneling constants or problem dimensions.

      Arguments

      • paneling_constants::PanelingConstants : a PanelingConstants object

      OR

      • problem_dimensions::ProblemDimensions : a ProblemDimensions object

      Keyword Arguments

      • fd_chunk_size::Int=12 : chunk size to use for PreallocationTools caches. Note that the automated chuck size for DuctAPE will always be the ForwardDiff threshold of 12 due to the size of the system, so it will be best to leave this at the default unless further development allows for chunk size selection for individual solvers.
      • levels::Int=1 : levels for nested duals. Note that since ImplicitAD is being used for all solves, there should be no need for more than 1 level.

      Returns

      • solve_container_caching::NamedTuple : a Named Tuple containing:
        • solve_container_cache::PreallocationTools.DiffCache : the cache
        • solve_container_cache_dims::NamedTuple : a named tuple containing the dimensions used for reshaping the cache when needed.
      source

      You may run all these simultaneously using the initialize_all_caches function.

      DuctAPE.initialize_all_cachesFunction
      initialize_all_caches(solver_options, paneling_constants)

      Convenience function to initialize all caches before calling analysis.

      Arguments

      • solver_options::SolverOptionsType : solver options used for cache allocation dispatch
      • paneling_constants::PanelingConstants : PanelingConstants object upon which all cache sizing depends

      Keyword Arguments

      • fd_chunk_size::Int=12 : chunk size to use for PreallocationTools caches. Note that the automated chuck size for DuctAPE will always be the ForwardDiff threshold of 12 due to the size of the system, so it will be best to leave this at the default unless further development allows for chunk size selection for individual solvers.
      • levels::Int=1 : levels for nested duals. Note that since ImplicitAD is being used for all solves, there should be no need for more than 1 level.

      Returns

      • prepost_container_caching::NamedTuple : A named tuple containing the PreallocationTools DiffCache and a named tuple with relevant dimensions for accessing the cache.
      • solve_parameter_caching::NamedTuple : A named tuple containing the PreallocationTools DiffCache and a named tuple with relevant dimensions for accessing the cache.
      • solve_container_caching::NamedTuple : A named tuple containing the PreallocationTools DiffCache and a named tuple with relevant dimensions for accessing the cache.
      source

      How to pass the caches into an analysis

      The precompiled caches can be passed in via keyword arguments to the analysis functions. If they are not, they are generated as the first step in the analysis.

      DuctAPE.analyzeFunction
      analyze(
      +)

      Allocate the solve cache (used for intermediate calculations) based on paneling constants or problem dimensions.

      Arguments

      • paneling_constants::PanelingConstants : a PanelingConstants object

      OR

      • problem_dimensions::ProblemDimensions : a ProblemDimensions object

      Keyword Arguments

      • fd_chunk_size::Int=12 : chunk size to use for PreallocationTools caches. Note that the automated chuck size for DuctAPE will always be the ForwardDiff threshold of 12 due to the size of the system, so it will be best to leave this at the default unless further development allows for chunk size selection for individual solvers.
      • levels::Int=1 : levels for nested duals. Note that since ImplicitAD is being used for all solves, there should be no need for more than 1 level.

      Returns

      • solve_container_caching::NamedTuple : a Named Tuple containing:
        • solve_container_cache::PreallocationTools.DiffCache : the cache
        • solve_container_cache_dims::NamedTuple : a named tuple containing the dimensions used for reshaping the cache when needed.
      source

      You may run all these simultaneously using the initialize_all_caches function.

      DuctAPE.initialize_all_cachesFunction
      initialize_all_caches(solver_options, paneling_constants)

      Convenience function to initialize all caches before calling analysis.

      Arguments

      • solver_options::SolverOptionsType : solver options used for cache allocation dispatch
      • paneling_constants::PanelingConstants : PanelingConstants object upon which all cache sizing depends

      Keyword Arguments

      • fd_chunk_size::Int=12 : chunk size to use for PreallocationTools caches. Note that the automated chuck size for DuctAPE will always be the ForwardDiff threshold of 12 due to the size of the system, so it will be best to leave this at the default unless further development allows for chunk size selection for individual solvers.
      • levels::Int=1 : levels for nested duals. Note that since ImplicitAD is being used for all solves, there should be no need for more than 1 level.

      Returns

      • prepost_container_caching::NamedTuple : A named tuple containing the PreallocationTools DiffCache and a named tuple with relevant dimensions for accessing the cache.
      • solve_parameter_caching::NamedTuple : A named tuple containing the PreallocationTools DiffCache and a named tuple with relevant dimensions for accessing the cache.
      • solve_container_caching::NamedTuple : A named tuple containing the PreallocationTools DiffCache and a named tuple with relevant dimensions for accessing the cache.
      source

      How to pass the caches into an analysis

      The precompiled caches can be passed in via keyword arguments to the analysis functions. If they are not, they are generated as the first step in the analysis.

      DuctAPE.analyzeFunction
      analyze(
           propulsor::Propulsor,
           options::Options=set_options();
           prepost_container_caching=nothing,
           solve_parameter_caching=nothing,
           solve_container_caching=nothing,
           return_inputs=false,
      -)

      Analyze propulsor, including preprocessing.

      Arguments

      • propulsor::Propulsor : Propulsor input object (see docstring for Propulsor type)
      • options::Options=set_options() : Options object (see set_options and related functions)

      Keyword Arguments

      • prepost_container_caching=nothing : Output of allocate_prepost_container_cache
      • solve_parameter_caching=nothing : Output of allocate_solve_parameter_container_cache
      • solve_container_caching=nothing : Output of allocate_solve_container_cache
      • return_inputs=false : flag as to whether or not to return the pre-processed inputs

      Returns

      • outs::NamedTuple : Named Tuple of various analysis outputs (see docstring for postprocess for details), note, if linear system decomposition fails, no solve is performed and an empty vector is returned.
      • ins::NamedTuple : Named Tuple of various pre-processed inputs (e.g. panels and body linear system), will only be returned if return_inputs=true
      • convergence_flag : Flag for successful solve convergence
      source
      +)

      Analyze propulsor, including preprocessing.

      Arguments

      Keyword Arguments

      Returns

      source diff --git a/dev/DuctAPE/api/api_index/index.html b/dev/DuctAPE/api/api_index/index.html index c23d1ca6..cd934d8a 100644 --- a/dev/DuctAPE/api/api_index/index.html +++ b/dev/DuctAPE/api/api_index/index.html @@ -1,2 +1,2 @@ -API Index · DuctAPE.jl

      Index

      +API Index · DuctAPE.jl

      Index

      diff --git a/dev/DuctAPE/api/private_api/index.html b/dev/DuctAPE/api/private_api/index.html index 50db0c81..acd75d83 100644 --- a/dev/DuctAPE/api/private_api/index.html +++ b/dev/DuctAPE/api/private_api/index.html @@ -1,2 +1,2 @@ -Private API · DuctAPE.jl
      +Private API · DuctAPE.jl
      diff --git a/dev/DuctAPE/api/private_postprocess/index.html b/dev/DuctAPE/api/private_postprocess/index.html index eb23f485..ff8f7f21 100644 --- a/dev/DuctAPE/api/private_postprocess/index.html +++ b/dev/DuctAPE/api/private_postprocess/index.html @@ -18,7 +18,7 @@ checkoutfileexists=options.checkoutfileexists, output_tuple_name=options.output_tuple_name, verbose=options.verbose, -)

      Post-process a converged nonlinear solve solution.

      Arguments

      Keyword Arguments

      Returns

      outs::NamedTuple : A named tuple containing all the output values including

      source

      Velocities

      DuctAPE.get_body_tangential_velocitiesFunction
      get_body_tangential_velocities(
      +)

      Post-process a converged nonlinear solve solution.

      Arguments

      • solver_options::SolverOptionsType : A SolverOptionsType object (also used for dispatch)
      • converged_states::Vector{Float} : the converged state variables
      • prepost_containers::NamedTuple : the named tuple containing pre-allocated containers for the pre- and post-processing intermediate calculations
      • solve_container_cache::NamedTuple : the cache and dimensions for intermediate values in the residual calculation
      • solve_parameter_cache_vector::Vector{Float} : the applicably typed cache vector for the solve parameters
      • solve_parameter_cache_dims::NamedTuple : the dimensions of the solver parameters
      • operating_point::OperatingPoint : the operating point being analyzed
      • reference_parameters::ReferenceParameters : a ReferenceParameters object
      • A_bb_LU::LinearAlgebra.LU : LinearAlgebra LU factorization of the LHS matrix
      • airfoils::Vector{AFType} : A matrix of airfoil types associated with each of the blade elements
      • idmaps::NamedTuple : A named tuple containing index mapping used in bookkeeping throughout solve and post-process
      • problem_dimensions::ProblemDimensions : A ProblemDimensions object

      Keyword Arguments

      • multipoint_index::Vector{Int} : a one-dimensional vector containing the index of which multipoint analysis operating point is being analyzed.
      • write_outputs=options.write_outputs::Vector{Bool} : a vector with the same length as number of multipoints indicating if the outputs should be saved.
      • outfile=options.outfile::Vector{String} : a vector of file paths/names for where outputs should be written
      • checkoutfileexists=options.checkoutfileexists::Bool : a flag for whether existing files should be checked for or if blind overwriting is okay.
      • output_tuple_name=options.output_tuple_name::Vector{String} : the variable name(s) of the named tuple of outputs to be written.
      • verbose::Bool=false : flag to print verbose statements

      Returns

      outs::NamedTuple : A named tuple containing all the output values including

      • bodies
        • panel_strengths
        • total_thrust
        • thrust_comp
        • induced_efficiency
        • cp_in
        • cp_out
        • cp_casing_in
        • cp_casing_out
        • casing_zpts
        • cp_nacelle_in
        • cp_nacelle_out
        • nacelle_zpts
        • cp_centerbody_in
        • cp_centerbody_out
        • centerbody_zpts
        • Vtot_in
        • Vtot_out
        • Vtot_prejump
        • vtot_body
        • vtot_jump
        • vtot_wake
        • vtot_rotors
        • Vtan_in
        • Vtan_out
        • vtan_casing_in
        • vtan_casing_out
        • vtan_nacelle_in
        • vtan_nacelle_out
        • vtan_centerbody_in
        • vtan_centerbody_out
      • rotors
        • circulation
        • panel_strengths
        • efficiency
        • inviscid_thrust
        • inviscid_thrust_dist
        • viscous_thrust
        • viscous_thrust_dist
        • thrust
        • CT
        • inviscid_torque
        • inviscid_torque_dist
        • viscous_torque
        • viscous_torque_dist
        • torque
        • CQ
        • inviscid_power
        • inviscid_power_dist
        • viscous_power
        • viscous_power_dist
        • power
        • CP
        • cl
        • cd
        • alpha
        • beta1
        • blade_normal_force_per_unit_span
        • blade_tangential_force_per_unit_span
      • wake
        • panel_strengths
      • totals
        • thrust
        • torque
        • power
        • CT
        • CQ
        • CP
        • total_efficiency
        • ideal_efficiency
      • intermediate_solve_values
        • vz_rotor
        • vtheta_rotor
        • Cm_wake
        • reynolds
        • mach
        • Cz_rotor
        • Ctheta_rotor
        • Cmag_rotor
        • Gamma_tilde
        • H_tilde
        • deltaGamma2
        • deltaH
        • vz_wake
        • vr_wake
        • Cm_avg
      source

      Velocities

      DuctAPE.get_body_tangential_velocitiesFunction
      get_body_tangential_velocities(
           gamb,
           gamw,
           sigr,
      @@ -36,9 +36,9 @@
           centerbody_panel_ids_along_centerbody_wake_interface,
           duct_panel_ids_along_casing_wake_interface,
           num_casing_panels,
      -)

      Get the tangential velocities along the body surfaces.

      Arguments

      • gamb::Vector{Float} : the body panel strengths
      • gamw::Vector{Float} : the wake panel strengths
      • sigr::Vector{Float} : the rotor panel strengths
      • ivb::NamedTuple : the unit induced velocities on the bodies
      • Vinf::Vector{Float} : one element vector containing the freestream magnitude
      • totnode::Int : total number of nodes between all bodies
      • totpanel::Int : total number of panels between all bodies
      • nnode::Vector{Int} : number of nodes in each body
      • npanel::Vector{Int} : number of panels in each body.
      • tangent::Matrix{Float} : unit tangent vectors for each panel
      • controlpoints::Matrix{Float} : control point locations for each panel
      • endpanelidxs::Matrix{Int} : the indices of the first and last panels for each body
      • wake_panel_ids_along_centerbody_wake_interface::Vector{Int} : the indices of the wake panels coincident with the centerbody panels
      • wake_panel_ids_along_casing_wake_interface::Vector{Int} : the indices of the wake panels coincident with the duct casing (inner surface) panels
      • centerbody_panel_ids_along_centerbody_wake_interface::Vector{Int} : the indices of the centerbody panels coincident with the wake panels
      • duct_panel_ids_along_casing_wake_interface::Vector{Int} : the indices of the duct panels coincident with the wake panels
      • num_casing_panels::Int : the number of panels between the leading and trailing edge of the duct on the duct inner side (casing)

      Returns

      • vtan_tuple::NamedTuple : a named tuple containing the body tangential surface velocities and various useful breakdowns thereof.
      source
      DuctAPE.get_body_tangential_velocities!Function

      function getbodytangentialvelocities!( vtantuple, gamb, gamw, sigr, ivb, Vinf, totnode, totpanel, nnode, npanel, tangent, controlpoints, endpanelidxs, wakepanelidsalongcenterbodywakeinterface, wakepanelidsalongcasingwakeinterface, centerbodypanelidsalongcenterbodywakeinterface, ductpanelidsalongcasingwakeinterface, zpts, )

      In-place version of get_body_tangential_velocities.

      Additional Arguments

      • zpts::NamedTuple : a named tuple containing the z-coordinates of the control points of the duct casing, duct nacelle, and centerbody.
      source
      DuctAPE.calculate_vthetaFunction
      calculate_vtheta(Gamma_tilde, r)

      Calculate tangential velocity for a given net circulation and radial location

      Arguments

      • Gamma_tilde::Matrix{Float} : Sum of upstream circulation values
      • r::Matrix{Float} : blade element radial positions
      source
      DuctAPE.calculate_induced_velocities_on_bodywakeFunction
      calculate_induced_velocities_on_bodywake(
      +)

      Get the tangential velocities along the body surfaces.

      Arguments

      • gamb::Vector{Float} : the body panel strengths
      • gamw::Vector{Float} : the wake panel strengths
      • sigr::Vector{Float} : the rotor panel strengths
      • ivb::NamedTuple : the unit induced velocities on the bodies
      • Vinf::Vector{Float} : one element vector containing the freestream magnitude
      • totnode::Int : total number of nodes between all bodies
      • totpanel::Int : total number of panels between all bodies
      • nnode::Vector{Int} : number of nodes in each body
      • npanel::Vector{Int} : number of panels in each body.
      • tangent::Matrix{Float} : unit tangent vectors for each panel
      • controlpoints::Matrix{Float} : control point locations for each panel
      • endpanelidxs::Matrix{Int} : the indices of the first and last panels for each body
      • wake_panel_ids_along_centerbody_wake_interface::Vector{Int} : the indices of the wake panels coincident with the centerbody panels
      • wake_panel_ids_along_casing_wake_interface::Vector{Int} : the indices of the wake panels coincident with the duct casing (inner surface) panels
      • centerbody_panel_ids_along_centerbody_wake_interface::Vector{Int} : the indices of the centerbody panels coincident with the wake panels
      • duct_panel_ids_along_casing_wake_interface::Vector{Int} : the indices of the duct panels coincident with the wake panels
      • num_casing_panels::Int : the number of panels between the leading and trailing edge of the duct on the duct inner side (casing)

      Returns

      • vtan_tuple::NamedTuple : a named tuple containing the body tangential surface velocities and various useful breakdowns thereof.
      source
      DuctAPE.get_body_tangential_velocities!Function

      function getbodytangentialvelocities!( vtantuple, gamb, gamw, sigr, ivb, Vinf, totnode, totpanel, nnode, npanel, tangent, controlpoints, endpanelidxs, wakepanelidsalongcenterbodywakeinterface, wakepanelidsalongcasingwakeinterface, centerbodypanelidsalongcenterbodywakeinterface, ductpanelidsalongcasingwakeinterface, zpts, )

      In-place version of get_body_tangential_velocities.

      Additional Arguments

      • zpts::NamedTuple : a named tuple containing the z-coordinates of the control points of the duct casing, duct nacelle, and centerbody.
      source
      DuctAPE.calculate_vthetaFunction
      calculate_vtheta(Gamma_tilde, r)

      Calculate tangential velocity for a given net circulation and radial location

      Arguments

      • Gamma_tilde::Matrix{Float} : Sum of upstream circulation values
      • r::Matrix{Float} : blade element radial positions
      source
      DuctAPE.calculate_induced_velocities_on_bodywakeFunction
      calculate_induced_velocities_on_bodywake(
           vz_w, vr_w, gamw, vz_r, vr_r, sigr, vz_b, vr_b, gamb, Vinf
      -)

      Calculate the induced velocities on one of the body wakes (unit velocity inputs determine which one)

      Arguments

      • vz_w::Matrix{Float} : unit axial induced velocity of the wake onto the body wake
      • vr_w::Matrix{Float} : unit radial induced velocity of the wake onto the body wake
      • gamw::Vector{Float} : wake panel strengths
      • vz_r::Matrix{Float} : unit axial induced velocity of the rotor onto the body wake
      • vr_r::Matrix{Float} : unit radial induced velocity of the rotor onto the body wake
      • sigr::Vector{Float} : rotor panel strengths
      • vz_b::Matrix{Float} : unit axial induced velocity of the bodies onto the body wake
      • vr_b::Matrix{Float} : unit radial induced velocity of the bodies onto the body wake
      • gamb::Vector{Float} : body panel strengths
      • Vinf::Vector{Float} : one element vector containing the velocity magnitude
      source

      Pressures

      DuctAPE.steady_cpFunction
      steady_cp(Vs, Vinf, Vref)

      Calculate steady pressure coefficients for a given surface velocity.

      Arguments

      • Vs::Vector{Float} : the surface velocities
      • Vinf::Vector{Float} : one element vector with freestream mangnitude
      • Vref::Vector{Float} : one element vector with reference velocity used for non-dimensionalization

      Returns

      • cp::Vector{Float} : the steady pressure coefficients
      source
      DuctAPE.steady_cp!Function
      steady_cp!(cp, Vs, Vinf, Vref)

      In-place verison of steady_cp.

      source
      DuctAPE.calculate_entropy_jumpsFunction
      calculate_entropy_jumps(sigr, Cz_rotor)

      Calculate jumps in entropy across the disks.

      Arguments

      • sigr::Matrix{Float} : rotor source panel strengths
      • Cz_rotor::Vector{Float} : absolute axial velocity on rotor blade elements

      Returns

      • deltaS::Vector{Float} : entropy jump across rotor disks
      source
      DuctAPE.calculate_rotor_jumpsFunction
      calculate_rotor_jumps(Gamr, Omega, B, sigr, Cz_rotor)

      Calculate net circulation and enthalpy and entropy disk jumps

      Arguments

      • Gamr::Matrix{Float} : Blade element circulation strengths
      • Omega::Vector{Float} : rotor rotation rates
      • B::Vector{Float} : blade count for each rotor (usually integers but could be a float)
      • sigr::Matrix{Float} : rotor source panel strengths
      • Cz_rotor::Vector{Float} : absolute axial velocity on rotor blade elements

      Returns

      • Gamma_tilde::Matrix{Float} : net upstream circulation
      • Htilde::Matrix{Float} : net upstream enthalpy jumps
      • Stilde::Matrix{Float} : net upstream entropy jumps
      source
      DuctAPE.delta_cpFunction
      delta_cp(deltaH, deltaS, Ctheta, Vref)

      Calculate change in pressure coefficient aft of rotor, due to rotor

      Arguments

      • deltaH::Vector{Float} : Enthalpy jumps across disks
      • deltaS::Vector{Float} : Entropy jumps across disks`
      • Ctheta::Vector{Float} : tangenetial velocity
      • Vref::Vector{Float} : reference velocity for non-dimensionalization

      Returns

      • delta_cp::Vector{Float} : pressure rises due to rotor disks
      source
      DuctAPE.calculate_body_delta_cp!Function
      calculate_body_delta_cp!(cp, Gamr, sigr, Cz_rotor, Vref, Omega, B, cpr, casing_panel_ids_aft_of_rotors, centerbody_panel_ids_aft_of_rotors)

      Augment surface pressure by change in pressure coefficient due to rotors specifically on the body panels aft of the rotors.

      Arguments

      • cp::Vector{Float} : steady pressure coeffients, modified in-place to include rotor effects.
      • Gamr::Matrix{Float} : Blade element circulation strengths
      • sigr::Matrix{Float} : rotor source panel strengths
      • Cz_rotor::Vector{Float} : absolute axial velocity on rotor blade elements
      • Vref::Vector{Float} : one element vector with reference velocity used for non-dimensionalization
      • Omega::Vector{Float} : rotor rotation rates
      • B::Vector{Float} : blade count for each rotor (usually integers but could be a float)
      • cpr::Vector{Float} : control point radial positions of body panels
      • casing_panel_ids_aft_of_rotors::Vector{Int} : duct indices of control point radial positions aft of rotors
      • centerbody_panel_ids_aft_of_rotors::Vector{Int} : centerbody indices of control point radial positions aft of rotors
      source
      DuctAPE.calculate_bodywake_delta_cpFunction
      calculate_bodywake_delta_cp(Gamr, sigr, Cz_rotor, Vref, Omega, B, cpr; body="duct")

      Calculate change in pressure coefficient due to rotors specifically on the body wakes

      Arguments

      • Gamr::Matrix{Float} : Blade element circulation strengths
      • sigr::Matrix{Float} : rotor source panel strengths
      • Cz_rotor::Vector{Float} : absolute axial velocity on rotor blade elements
      • Vref::Vector{Float} : one element vector with reference velocity used for non-dimensionalization
      • Omega::Vector{Float} : rotor rotation rates
      • B::Vector{Float} : blade count for each rotor (usually integers but could be a float)
      • cpr::Vector{Float} : control point radial positions of body wake "panels"

      Keyword Arguments

      • body::String="duct" : flag as to whether the body in question is a duct or centerbody.
      source
      DuctAPE.get_body_cpsFunction

      getbodycps( Vtanin, Vtanout, Gamr, sigr, Czrotor, Vinf, Vref, B, Omega, casingpanelidsaftofrotors, centerbodypanelidsaftof_rotors, controlpoints, endpanelidxs, zpts, )

      Description

      Arguments

      • Vtan_in::Vector{Float} : Tangential velocity on the inside of the body panels
      • Vtan_out::Vector{Float} : Tangential velocity on the outside of the body panels
      • Gamr::Matrix{Float} : Blade element circulation strengths
      • sigr::Matrix{Float} : rotor source panel strengths
      • Cz_rotor::Vector{Float} : absolute axial velocity on rotor blade elements
      • Vinf::Vector{Float} : one element vector with freestream mangnitude
      • Vref::Vector{Float} : one element vector with reference velocity used for non-dimensionalization
      • B::Vector{Float} : blade count for each rotor (usually integers but could be a float)
      • Omega::Vector{Float} : rotor rotation rates
      • casing_panel_ids_aft_of_rotors::Vector{Int} : duct indices of control point radial positions aft of rotors
      • centerbody_panel_ids_aft_of_rotors::Vector{Int} : centerbody indices of control point radial positions aft of rotors
      • controlpoints::Matrix{Float} : control point locations for each panel
      • endpanelidxs::Matrix{Int} : the indices of the first and last panels for each body
      • zpts::NamedTuple : a named tuple containing the z-coordinates of the control points of the duct casing, duct nacelle, and centerbody.

      Returns

      • cp_tuple::NamedTuple : body surface velocities and various useful breakdowns thereof.
      source
      DuctAPE.get_body_cps!Function
      get_body_cps!(
      +)

      Calculate the induced velocities on one of the body wakes (unit velocity inputs determine which one)

      Arguments

      • vz_w::Matrix{Float} : unit axial induced velocity of the wake onto the body wake
      • vr_w::Matrix{Float} : unit radial induced velocity of the wake onto the body wake
      • gamw::Vector{Float} : wake panel strengths
      • vz_r::Matrix{Float} : unit axial induced velocity of the rotor onto the body wake
      • vr_r::Matrix{Float} : unit radial induced velocity of the rotor onto the body wake
      • sigr::Vector{Float} : rotor panel strengths
      • vz_b::Matrix{Float} : unit axial induced velocity of the bodies onto the body wake
      • vr_b::Matrix{Float} : unit radial induced velocity of the bodies onto the body wake
      • gamb::Vector{Float} : body panel strengths
      • Vinf::Vector{Float} : one element vector containing the velocity magnitude
      source

      Pressures

      DuctAPE.steady_cpFunction
      steady_cp(Vs, Vinf, Vref)

      Calculate steady pressure coefficients for a given surface velocity.

      Arguments

      • Vs::Vector{Float} : the surface velocities
      • Vinf::Vector{Float} : one element vector with freestream mangnitude
      • Vref::Vector{Float} : one element vector with reference velocity used for non-dimensionalization

      Returns

      • cp::Vector{Float} : the steady pressure coefficients
      source
      DuctAPE.steady_cp!Function
      steady_cp!(cp, Vs, Vinf, Vref)

      In-place verison of steady_cp.

      source
      DuctAPE.calculate_entropy_jumpsFunction
      calculate_entropy_jumps(sigr, Cz_rotor)

      Calculate jumps in entropy across the disks.

      Arguments

      • sigr::Matrix{Float} : rotor source panel strengths
      • Cz_rotor::Vector{Float} : absolute axial velocity on rotor blade elements

      Returns

      • deltaS::Vector{Float} : entropy jump across rotor disks
      source
      DuctAPE.calculate_rotor_jumpsFunction
      calculate_rotor_jumps(Gamr, Omega, B, sigr, Cz_rotor)

      Calculate net circulation and enthalpy and entropy disk jumps

      Arguments

      • Gamr::Matrix{Float} : Blade element circulation strengths
      • Omega::Vector{Float} : rotor rotation rates
      • B::Vector{Float} : blade count for each rotor (usually integers but could be a float)
      • sigr::Matrix{Float} : rotor source panel strengths
      • Cz_rotor::Vector{Float} : absolute axial velocity on rotor blade elements

      Returns

      • Gamma_tilde::Matrix{Float} : net upstream circulation
      • Htilde::Matrix{Float} : net upstream enthalpy jumps
      • Stilde::Matrix{Float} : net upstream entropy jumps
      source
      DuctAPE.delta_cpFunction
      delta_cp(deltaH, deltaS, Ctheta, Vref)

      Calculate change in pressure coefficient aft of rotor, due to rotor

      Arguments

      • deltaH::Vector{Float} : Enthalpy jumps across disks
      • deltaS::Vector{Float} : Entropy jumps across disks`
      • Ctheta::Vector{Float} : tangenetial velocity
      • Vref::Vector{Float} : reference velocity for non-dimensionalization

      Returns

      • delta_cp::Vector{Float} : pressure rises due to rotor disks
      source
      DuctAPE.calculate_body_delta_cp!Function
      calculate_body_delta_cp!(cp, Gamr, sigr, Cz_rotor, Vref, Omega, B, cpr, casing_panel_ids_aft_of_rotors, centerbody_panel_ids_aft_of_rotors)

      Augment surface pressure by change in pressure coefficient due to rotors specifically on the body panels aft of the rotors.

      Arguments

      • cp::Vector{Float} : steady pressure coeffients, modified in-place to include rotor effects.
      • Gamr::Matrix{Float} : Blade element circulation strengths
      • sigr::Matrix{Float} : rotor source panel strengths
      • Cz_rotor::Vector{Float} : absolute axial velocity on rotor blade elements
      • Vref::Vector{Float} : one element vector with reference velocity used for non-dimensionalization
      • Omega::Vector{Float} : rotor rotation rates
      • B::Vector{Float} : blade count for each rotor (usually integers but could be a float)
      • cpr::Vector{Float} : control point radial positions of body panels
      • casing_panel_ids_aft_of_rotors::Vector{Int} : duct indices of control point radial positions aft of rotors
      • centerbody_panel_ids_aft_of_rotors::Vector{Int} : centerbody indices of control point radial positions aft of rotors
      source
      DuctAPE.calculate_bodywake_delta_cpFunction
      calculate_bodywake_delta_cp(Gamr, sigr, Cz_rotor, Vref, Omega, B, cpr; body="duct")

      Calculate change in pressure coefficient due to rotors specifically on the body wakes

      Arguments

      • Gamr::Matrix{Float} : Blade element circulation strengths
      • sigr::Matrix{Float} : rotor source panel strengths
      • Cz_rotor::Vector{Float} : absolute axial velocity on rotor blade elements
      • Vref::Vector{Float} : one element vector with reference velocity used for non-dimensionalization
      • Omega::Vector{Float} : rotor rotation rates
      • B::Vector{Float} : blade count for each rotor (usually integers but could be a float)
      • cpr::Vector{Float} : control point radial positions of body wake "panels"

      Keyword Arguments

      • body::String="duct" : flag as to whether the body in question is a duct or centerbody.
      source
      DuctAPE.get_body_cpsFunction

      getbodycps( Vtanin, Vtanout, Gamr, sigr, Czrotor, Vinf, Vref, B, Omega, casingpanelidsaftofrotors, centerbodypanelidsaftof_rotors, controlpoints, endpanelidxs, zpts, )

      Description

      Arguments

      • Vtan_in::Vector{Float} : Tangential velocity on the inside of the body panels
      • Vtan_out::Vector{Float} : Tangential velocity on the outside of the body panels
      • Gamr::Matrix{Float} : Blade element circulation strengths
      • sigr::Matrix{Float} : rotor source panel strengths
      • Cz_rotor::Vector{Float} : absolute axial velocity on rotor blade elements
      • Vinf::Vector{Float} : one element vector with freestream mangnitude
      • Vref::Vector{Float} : one element vector with reference velocity used for non-dimensionalization
      • B::Vector{Float} : blade count for each rotor (usually integers but could be a float)
      • Omega::Vector{Float} : rotor rotation rates
      • casing_panel_ids_aft_of_rotors::Vector{Int} : duct indices of control point radial positions aft of rotors
      • centerbody_panel_ids_aft_of_rotors::Vector{Int} : centerbody indices of control point radial positions aft of rotors
      • controlpoints::Matrix{Float} : control point locations for each panel
      • endpanelidxs::Matrix{Int} : the indices of the first and last panels for each body
      • zpts::NamedTuple : a named tuple containing the z-coordinates of the control points of the duct casing, duct nacelle, and centerbody.

      Returns

      • cp_tuple::NamedTuple : body surface velocities and various useful breakdowns thereof.
      source
      DuctAPE.get_body_cps!Function
      get_body_cps!(
           cp_tuple,
           Vtan_in,
           Vtan_out,
      @@ -54,7 +54,7 @@
           controlpoints,
           endpanelidxs,
           zpts,
      -)

      In-place version of get_body_cps.

      source
      DuctAPE.get_bodywake_cpsFunction
      get_bodywake_cps(
      +)

      In-place version of get_body_cps.

      source
      DuctAPE.get_bodywake_cpsFunction
      get_bodywake_cps(
           Gamr,
           vz_w,
           vr_w,
      @@ -72,21 +72,21 @@
           Vinf,
           Vref;
           body="duct",
      -)

      Calculate the pressure coefficient distributions on one of the body wakes

      Arguments

      • Gamr::Matrix{Float} : Blade element circulation strengths
      • vz_w::Matrix{Float} : unit axial induced velocity of the wake onto the body wake
      • vr_w::Matrix{Float} : unit radial induced velocity of the wake onto the body wake
      • gamw::Vector{Float} : wake panel strengths
      • vz_r::Matrix{Float} : unit axial induced velocity of the rotor onto the body wake
      • vr_r::Matrix{Float} : unit radial induced velocity of the rotor onto the body wake
      • sigr::Vector{Float} : rotor panel strengths
      • vz_b::Matrix{Float} : unit axial induced velocity of the bodies onto the body wake
      • vr_b::Matrix{Float} : unit radial induced velocity of the bodies onto the body wake
      • gamb::Vector{Float} : body panel strengths
      • panels::NamedTuple : A named tuple containing bodywake "panel" geometries
      • Cz_rotor::Vector{Float} : absolute axial velocity on rotor blade elements
      • Omega::Vector{Float} : rotor rotation rates
      • B::Vector{Float} : blade count for each rotor (usually integers but could be a float)
      • Vinf::Vector{Float} : one element vector containing the velocity magnitude
      • Vref::Vector{Float} : one element vector with reference velocity used for non-dimensionalization

      Keyword Arguments

      • body::String="duct" : flag as to whether the body in question is a duct or centerbody.
      source
      DuctAPE.forces_from_pressureFunction
      forces_from_pressure(cp_in, cp_out, panels; rhoinf=1.225, Vref=1.0)

      Calculate dimensional and non-dimensional axial force on a single body

      Arguments

      • cp_in::Vector{Float} : pressure coefficient on inside of body surfaces
      • cp_out::Vector{Float} : pressure coefficients on outside of body surfaces
      • panels::NamedTuple : A named tuple containing panel geometry information

      Keyword Arguments

      • rhoinf::Float=1.225 : reference density for non-dimensionalization
      • Vref::Float=1.0 : reference velocity for non-dimensionalization

      Returns

      • thrust::Vector{Float} : dimensional axial force
      • force_coeff::Vector{Float} : non-dimensional axial force
      source
      DuctAPE.forces_from_pressure!Function
      forces_from_pressure!(CFx, cfx, cp_in, cp_out, panels; rhoinf=1.225, Vref=1.0)

      In-place version of forces_from_pressure.

      source
      DuctAPE.forces_from_TEpanels!Function
      forces_from_TEpanels!(
      +)

      Calculate the pressure coefficient distributions on one of the body wakes

      Arguments

      • Gamr::Matrix{Float} : Blade element circulation strengths
      • vz_w::Matrix{Float} : unit axial induced velocity of the wake onto the body wake
      • vr_w::Matrix{Float} : unit radial induced velocity of the wake onto the body wake
      • gamw::Vector{Float} : wake panel strengths
      • vz_r::Matrix{Float} : unit axial induced velocity of the rotor onto the body wake
      • vr_r::Matrix{Float} : unit radial induced velocity of the rotor onto the body wake
      • sigr::Vector{Float} : rotor panel strengths
      • vz_b::Matrix{Float} : unit axial induced velocity of the bodies onto the body wake
      • vr_b::Matrix{Float} : unit radial induced velocity of the bodies onto the body wake
      • gamb::Vector{Float} : body panel strengths
      • panels::NamedTuple : A named tuple containing bodywake "panel" geometries
      • Cz_rotor::Vector{Float} : absolute axial velocity on rotor blade elements
      • Omega::Vector{Float} : rotor rotation rates
      • B::Vector{Float} : blade count for each rotor (usually integers but could be a float)
      • Vinf::Vector{Float} : one element vector containing the velocity magnitude
      • Vref::Vector{Float} : one element vector with reference velocity used for non-dimensionalization

      Keyword Arguments

      • body::String="duct" : flag as to whether the body in question is a duct or centerbody.
      source
      DuctAPE.forces_from_pressureFunction
      forces_from_pressure(cp_in, cp_out, panels; rhoinf=1.225, Vref=1.0)

      Calculate dimensional and non-dimensional axial force on a single body

      Arguments

      • cp_in::Vector{Float} : pressure coefficient on inside of body surfaces
      • cp_out::Vector{Float} : pressure coefficients on outside of body surfaces
      • panels::NamedTuple : A named tuple containing panel geometry information

      Keyword Arguments

      • rhoinf::Float=1.225 : reference density for non-dimensionalization
      • Vref::Float=1.0 : reference velocity for non-dimensionalization

      Returns

      • thrust::Vector{Float} : dimensional axial force
      • force_coeff::Vector{Float} : non-dimensional axial force
      source
      DuctAPE.forces_from_pressure!Function
      forces_from_pressure!(CFx, cfx, cp_in, cp_out, panels; rhoinf=1.225, Vref=1.0)

      In-place version of forces_from_pressure.

      source
      DuctAPE.forces_from_TEpanels!Function
      forces_from_TEpanels!(
           thrust, force_coeff, cp_in, cp_out, panels; rhoinf=1.225, Vref=1.0
      -)

      Add force induced by trailing edge gap panels to total forces.

      Arguments

      • thrust::Vector{Float} : dimensional axial force
      • force_coeff::Vector{Float} : non-dimensional axial force
      • cp_in::Vector{Float} : pressure coefficient on inside of body surfaces
      • cp_out::Vector{Float} : pressure coefficients on outside of body surfaces
      • panels::NamedTuple : A named tuple containing panel geometry information

      Keyword Arguments

      • rhoinf::Float=1.225 : reference density for non-dimensionalization
      • Vref::Float=1.0 : reference velocity for non-dimensionalization
      source

      Rotor Performance

      DuctAPE.inviscid_rotor_thrustFunction
      inviscid_rotor_thrust(Ctheta_rotor, Gamma_tilde, rotor_panel_length, rhoinf)

      Calculate inviscid rotor thrust.

      Arguments

      • Ctheta_rotor::Vector{Float} : Absolute tangential velocity on rotor blade elements
      • Gamma_tilde::Matrix{Float} : net upstream rotor circulation
      • rotor_panel_length::Vector{Float} : dimensional lengths on which blade element values apply
      • rhoinf::Float : freestream density

      Returns

      • Tinv::Vector{Float} : inviscid dimensional thrust
      • dTi::Vector{Float} : inviscid dimensional thrust distribution
      source
      DuctAPE.inviscid_rotor_thrust!Function
      inviscid_rotor_thrust!(
      +)

      Add force induced by trailing edge gap panels to total forces.

      Arguments

      • thrust::Vector{Float} : dimensional axial force
      • force_coeff::Vector{Float} : non-dimensional axial force
      • cp_in::Vector{Float} : pressure coefficient on inside of body surfaces
      • cp_out::Vector{Float} : pressure coefficients on outside of body surfaces
      • panels::NamedTuple : A named tuple containing panel geometry information

      Keyword Arguments

      • rhoinf::Float=1.225 : reference density for non-dimensionalization
      • Vref::Float=1.0 : reference velocity for non-dimensionalization
      source

      Rotor Performance

      DuctAPE.inviscid_rotor_thrustFunction
      inviscid_rotor_thrust(Ctheta_rotor, Gamma_tilde, rotor_panel_length, rhoinf)

      Calculate inviscid rotor thrust.

      Arguments

      • Ctheta_rotor::Vector{Float} : Absolute tangential velocity on rotor blade elements
      • Gamma_tilde::Matrix{Float} : net upstream rotor circulation
      • rotor_panel_length::Vector{Float} : dimensional lengths on which blade element values apply
      • rhoinf::Float : freestream density

      Returns

      • Tinv::Vector{Float} : inviscid dimensional thrust
      • dTi::Vector{Float} : inviscid dimensional thrust distribution
      source
      DuctAPE.inviscid_rotor_thrust!Function
      inviscid_rotor_thrust!(
           Tinv, dTi, Ctheta_rotor, Gamma_tilde, rotor_panel_length, rhoinf
      -)

      In-place version of inviscid_rotor_thrust.

      source
      DuctAPE.viscous_rotor_thrustFunction
      viscous_rotor_thrust(
      +)

      In-place version of inviscid_rotor_thrust.

      source
      DuctAPE.viscous_rotor_thrustFunction
      viscous_rotor_thrust(
           Cz_rotor, Cmag_rotor, B, chord, rotor_panel_length, cd, rhoinf
      -)

      Calculate visous rotor "thrust."

      Arguments

      • Cz_rotor::Vector{Float} : Absolute axial velocity on rotor blade elements
      • Cmag_rotor::Vector{Float} : Absolute inflow velocity magnitude on rotor blade elements
      • B::Vector{Float} : blade count for each rotor (usually integers but could be a float)
      • chord::Vector{Float} : blade element chord lengths
      • rotor_panel_length::Vector{Float} : dimensional lengths on which blade element values apply
      • cd::Vector{Float} : drag coefficient for each blade element
      • rhoinf::Float : freestream density

      Returns

      • Tvisc::Vector{Float} : viscous dimensional thrust
      • dTv::Vector{Float} : viscous dimensional thrust distribution
      source
      DuctAPE.viscous_rotor_thrust!Function
      viscous_rotor_thrust!(
      +)

      Calculate visous rotor "thrust."

      Arguments

      • Cz_rotor::Vector{Float} : Absolute axial velocity on rotor blade elements
      • Cmag_rotor::Vector{Float} : Absolute inflow velocity magnitude on rotor blade elements
      • B::Vector{Float} : blade count for each rotor (usually integers but could be a float)
      • chord::Vector{Float} : blade element chord lengths
      • rotor_panel_length::Vector{Float} : dimensional lengths on which blade element values apply
      • cd::Vector{Float} : drag coefficient for each blade element
      • rhoinf::Float : freestream density

      Returns

      • Tvisc::Vector{Float} : viscous dimensional thrust
      • dTv::Vector{Float} : viscous dimensional thrust distribution
      source
      DuctAPE.viscous_rotor_thrust!Function
      viscous_rotor_thrust!(
           Tvisc, dTv, Cz_rotor, Cmag_rotor, B, chord, rotor_panel_length, cd, rhoinf
      -)

      In-place version of viscous_rotor_thrust.

      source
      DuctAPE.inviscid_rotor_torqueFunction
      inviscid_rotor_torque(
      +)

      In-place version of viscous_rotor_thrust.

      source
      DuctAPE.inviscid_rotor_torqueFunction
      inviscid_rotor_torque(
           Cz_rotor, rotor_panel_center, rotor_panel_length, Gamma_tilde, rhoinf
      -)

      Calculate inviscid rotor torque.

      Arguments

      • Cz_rotor::Vector{Float} : Absolute axial velocity on rotor blade elements
      • rotor_panel_center::Vector{Float} : radial location of rotor blade elements
      • rotor_panel_length::Vector{Float} : dimensional lengths on which blade element values apply
      • Gamma_tilde::Matrix{Float} : net upstream rotor circulation
      • rhoinf::Float : freestream density

      Returns

      • Qinv::Vector{Float} : inviscid dimensional thrust
      • dQi::Vector{Float} : inviscid dimensional thrust distribution
      source
      DuctAPE.inviscid_rotor_torque!Function
      inviscid_rotor_torque!(
      +)

      Calculate inviscid rotor torque.

      Arguments

      • Cz_rotor::Vector{Float} : Absolute axial velocity on rotor blade elements
      • rotor_panel_center::Vector{Float} : radial location of rotor blade elements
      • rotor_panel_length::Vector{Float} : dimensional lengths on which blade element values apply
      • Gamma_tilde::Matrix{Float} : net upstream rotor circulation
      • rhoinf::Float : freestream density

      Returns

      • Qinv::Vector{Float} : inviscid dimensional thrust
      • dQi::Vector{Float} : inviscid dimensional thrust distribution
      source
      DuctAPE.inviscid_rotor_torque!Function
      inviscid_rotor_torque!(
           Qinv, dQi, Cz_rotor, rotor_panel_center, rotor_panel_length, Gamma_tilde, rhoinf
      -)

      In-place version of inviscid_rotor_torque.

      source
      DuctAPE.viscous_rotor_torqueFunction
      viscous_rotor_torque(
      +)

      In-place version of inviscid_rotor_torque.

      source
      DuctAPE.viscous_rotor_torqueFunction
      viscous_rotor_torque(
           Ctheta_rotor, Cmag_rotor, B, chord, rotor_panel_center, rotor_panel_length, cd, rhoinf
      -)

      Calculate viscous rotor torque.

      Arguments

      • Ctheta_rotor::Vector{Float} : Absolute tangential velocity on rotor blade elements
      • Cmag_rotor::Vector{Float} : Absolute inflow velocity magnitude on rotor blade elements
      • B::Vector{Float} : blade count for each rotor (usually integers but could be a float)
      • chord::Vector{Float} : blade element chord lengths
      • rotor_panel_center::Vector{Float} : radial location of rotor blade elements
      • rotor_panel_length::Vector{Float} : dimensional lengths on which blade element values apply
      • cd::Vector{Float} : drag coefficient for each blade element
      • rhoinf::Float : freestream density

      Returns

      • Qvisc::Vector{Float} : viscous dimensional thrust
      • dQv::Vector{Float} : viscous dimensional thrust distribution
      source
      DuctAPE.viscous_rotor_torque!Function
      viscous_rotor_torque!(
      +)

      Calculate viscous rotor torque.

      Arguments

      • Ctheta_rotor::Vector{Float} : Absolute tangential velocity on rotor blade elements
      • Cmag_rotor::Vector{Float} : Absolute inflow velocity magnitude on rotor blade elements
      • B::Vector{Float} : blade count for each rotor (usually integers but could be a float)
      • chord::Vector{Float} : blade element chord lengths
      • rotor_panel_center::Vector{Float} : radial location of rotor blade elements
      • rotor_panel_length::Vector{Float} : dimensional lengths on which blade element values apply
      • cd::Vector{Float} : drag coefficient for each blade element
      • rhoinf::Float : freestream density

      Returns

      • Qvisc::Vector{Float} : viscous dimensional thrust
      • dQv::Vector{Float} : viscous dimensional thrust distribution
      source
      DuctAPE.viscous_rotor_torque!Function
      viscous_rotor_torque!(
           Qvisc,
           dQv,
           Ctheta_rotor,
      @@ -97,4 +97,4 @@
           rotor_panel_length,
           cd,
           rhoinf
      -)

      In-place version of viscous_rotor_torque.

      source
      DuctAPE.rotor_powerFunction
      rotor_power(Q, dQ, Omega)

      Calculate power from torque and rotation rate.

      Arguments

      • Q::Vector{Float} : dimensional thrust
      • dQ::Vector{Float} : dimensional thrust distribution
      • Omega::Vector{Float} : rotor rotation rates

      Returns

      • P::Vector{Float} : dimensional power
      • dP::Vector{Float} : dimensional thrust distribution
      source
      DuctAPE.rotor_power!Function
      rotor_power!(P, dP, Q, dQ, Omega)

      In-place version of rotor_power.

      source
      DuctAPE.get_total_efficiencyFunction
      get_total_efficiency(total_thrust, total_power, Vinf)

      Get total efficiency.

      Arguments

      • total_thrust::Vector{Float} : total thrust
      • total_power::Vector{Float} : total power
      • Vinf::Vector{Float} : one element vector freestream velocity magnitude

      Returns

      • `total_efficiency::Vector{Float} : total efficiency
      source
      DuctAPE.get_total_efficiency!Function
      get_total_efficiency!(eta, total_thrust, total_power, Vinf)

      In-place version of get_total_efficiency.

      source
      DuctAPE.get_induced_efficiencyFunction
      get_induced_efficiency(Tinv, Tduct, Pinv, Vinf)

      Get rotor efficiency induced by presence of the duct.

      Arguments

      • Tinv::Vector{Float} : inviscid dimensional thrust
      • Tduct::Vector{Float} : duct thrust
      • Pinv::Vector{Float} : inviscid dimensional power
      • Vinf::Vector{Float} : one element vector freestream velocity magnitude

      Returns

      • induced_efficiency::Vector{Float} : rotor efficiency induced by duct
      source
      DuctAPE.get_induced_efficiency!Function
      get_induced_efficiency!(eta_inv, Tinv, Tduct, Pinv, Vinf)

      In-place version of get_induced_efficiency.

      source
      DuctAPE.get_ideal_efficiencyFunction
      get_ideal_efficiency(total_thrust, rhoinf, Vinf, Rref)

      Compute ducted fan ideal efficiency

      Arguments

      • total_thrust::Vector{Float} : total thrust from rotors and duct
      • rhoinf::Float : freestream density
      • Vinf::Vector{Float} : one element vector freestream velocity magnitude
      • Rref::Vector{Float} : one element vector reference rotor tip radius

      Returns

      • ideal_efficiency::Vector{Float} : ideal ducted fan efficiency
      source
      DuctAPE.tqpcoeffFunction
      tqpcoeff(thrust, torque, power, rhoinf, Omega, Rref)

      Calculate non-dimensional thrust, torque, and power coefficients

      Arguments

      • thrust::Vector{Float} : dimensional thrust
      • torque::Vector{Float} : dimensional torque
      • power::Vector{Float} : dimensional power
      • rhoinf::Float : freestream density
      • Omega::Vector{Float} : rotor rotation rates
      • Rref::Vector{Float} : one element vector reference rotor tip radius

      Returns

      • CT::Vector{Float} : thrust coefficient
      • CQ::Vector{Float} : torque coefficient
      • CP::Vector{Float} : power coefficient
      source
      DuctAPE.tqpcoeff!Function
      tqpcoeff!(CT, CQ, CP, thrust, torque, power, rhoinf, Omega, Rref)

      In-place version of tqpcoeff.

      source
      DuctAPE.get_blade_loadsFunction
      get_blade_loads(Cmag_rotor, beta1, cl, cd, chords, rhoinf)

      Get loading along blades.

      Arguments

      • Cmag_rotor::Vector{Float} : blade element inflow magnitudes
      • beta1::Vector{Float} : blade element inflow angles
      • cl::Vector{Float} : blade element lift coefficients
      • cd::Vector{Float} : blade element drag coefficients
      • chords::Vector{Float} : blade element chord lengths
      • rhoinf::Vector{Float} : one element freestream density

      Returns

      • Np::Vector{Float} : blade loading per unit length in the normal direction: N'
      • Tp::Vector{Float} : blade loading per unit length in the tangential direction: T'
      source
      DuctAPE.get_blade_loads!Function
      get_blade_loads!(Np, Tp, Cmag_rotor, beta1, cl, cd, chords, rhoinf, cache)

      In-place version of get_blade_loads.

      source
      +)

      In-place version of viscous_rotor_torque.

      source
      DuctAPE.rotor_powerFunction
      rotor_power(Q, dQ, Omega)

      Calculate power from torque and rotation rate.

      Arguments

      • Q::Vector{Float} : dimensional thrust
      • dQ::Vector{Float} : dimensional thrust distribution
      • Omega::Vector{Float} : rotor rotation rates

      Returns

      • P::Vector{Float} : dimensional power
      • dP::Vector{Float} : dimensional thrust distribution
      source
      DuctAPE.rotor_power!Function
      rotor_power!(P, dP, Q, dQ, Omega)

      In-place version of rotor_power.

      source
      DuctAPE.get_total_efficiencyFunction
      get_total_efficiency(total_thrust, total_power, Vinf)

      Get total efficiency.

      Arguments

      • total_thrust::Vector{Float} : total thrust
      • total_power::Vector{Float} : total power
      • Vinf::Vector{Float} : one element vector freestream velocity magnitude

      Returns

      • `total_efficiency::Vector{Float} : total efficiency
      source
      DuctAPE.get_total_efficiency!Function
      get_total_efficiency!(eta, total_thrust, total_power, Vinf)

      In-place version of get_total_efficiency.

      source
      DuctAPE.get_induced_efficiencyFunction
      get_induced_efficiency(Tinv, Tduct, Pinv, Vinf)

      Get rotor efficiency induced by presence of the duct.

      Arguments

      • Tinv::Vector{Float} : inviscid dimensional thrust
      • Tduct::Vector{Float} : duct thrust
      • Pinv::Vector{Float} : inviscid dimensional power
      • Vinf::Vector{Float} : one element vector freestream velocity magnitude

      Returns

      • induced_efficiency::Vector{Float} : rotor efficiency induced by duct
      source
      DuctAPE.get_induced_efficiency!Function
      get_induced_efficiency!(eta_inv, Tinv, Tduct, Pinv, Vinf)

      In-place version of get_induced_efficiency.

      source
      DuctAPE.get_ideal_efficiencyFunction
      get_ideal_efficiency(total_thrust, rhoinf, Vinf, Rref)

      Compute ducted fan ideal efficiency

      Arguments

      • total_thrust::Vector{Float} : total thrust from rotors and duct
      • rhoinf::Float : freestream density
      • Vinf::Vector{Float} : one element vector freestream velocity magnitude
      • Rref::Vector{Float} : one element vector reference rotor tip radius

      Returns

      • ideal_efficiency::Vector{Float} : ideal ducted fan efficiency
      source
      DuctAPE.tqpcoeffFunction
      tqpcoeff(thrust, torque, power, rhoinf, Omega, Rref)

      Calculate non-dimensional thrust, torque, and power coefficients

      Arguments

      • thrust::Vector{Float} : dimensional thrust
      • torque::Vector{Float} : dimensional torque
      • power::Vector{Float} : dimensional power
      • rhoinf::Float : freestream density
      • Omega::Vector{Float} : rotor rotation rates
      • Rref::Vector{Float} : one element vector reference rotor tip radius

      Returns

      • CT::Vector{Float} : thrust coefficient
      • CQ::Vector{Float} : torque coefficient
      • CP::Vector{Float} : power coefficient
      source
      DuctAPE.tqpcoeff!Function
      tqpcoeff!(CT, CQ, CP, thrust, torque, power, rhoinf, Omega, Rref)

      In-place version of tqpcoeff.

      source
      DuctAPE.get_blade_loadsFunction
      get_blade_loads(Cmag_rotor, beta1, cl, cd, chords, rhoinf)

      Get loading along blades.

      Arguments

      • Cmag_rotor::Vector{Float} : blade element inflow magnitudes
      • beta1::Vector{Float} : blade element inflow angles
      • cl::Vector{Float} : blade element lift coefficients
      • cd::Vector{Float} : blade element drag coefficients
      • chords::Vector{Float} : blade element chord lengths
      • rhoinf::Vector{Float} : one element freestream density

      Returns

      • Np::Vector{Float} : blade loading per unit length in the normal direction: N'
      • Tp::Vector{Float} : blade loading per unit length in the tangential direction: T'
      source
      DuctAPE.get_blade_loads!Function
      get_blade_loads!(Np, Tp, Cmag_rotor, beta1, cl, cd, chords, rhoinf, cache)

      In-place version of get_blade_loads.

      source
      diff --git a/dev/DuctAPE/api/private_prelims/index.html b/dev/DuctAPE/api/private_prelims/index.html index 3e761615..805b9d70 100644 --- a/dev/DuctAPE/api/private_prelims/index.html +++ b/dev/DuctAPE/api/private_prelims/index.html @@ -3,14 +3,14 @@ grid_solver_options=SLORGridSolverOptions(), solver_options=CSORSolverOptions(), kwargs..., -)

      Convenience function to select options used in DFDC.

      source
      function DFDC_options(
      +)

      Convenience function to select options used in DFDC.

      source
      function DFDC_options(
           multipoint;
           grid_solver_options=SLORGridSolverOptions(),
           solver_options=CSORSolverOptions(),
           kwargs...,
      -)

      Convenience function to select options used in DFDC and run multipoint analysis.

      Arguments

      source
      DuctAPE.ConvergenceTypeType
      abstract type ConvergenceType

      Used in dispatching the CSOR (controlled successive over relaxation) residual as relative or absolute.

      source
      DuctAPE.RelativeType
      struct Relative <: ConvergenceType

      Used to dispatch the relative residual for CSOR (controlled successive over relaxation) method

      source
      DuctAPE.AbsoluteType
      struct Absolute <: ConvergenceType

      Used to dispatch the absolute residual for CSOR (controlled successive over relaxation) method

      source
      DuctAPE.SolverOptionsTypeType
      abstract type SolverOptionsType

      Used for solver dispatch.

      source
      DuctAPE.ExternalSolverOptionsType
      abstract type ExternalSolverOptions <: SolverOptionsType

      Used for solver dispatch.

      source
      DuctAPE.PolyAlgorithmOptionsType
      abstract type PolyAlgorithmOptions <: SolverOptionsType

      Used for solver dispatch.

      source
      DuctAPE.GridSolverOptionsTypeType
      abstract type GridSolverOptionsType

      Used for elliptic grid solver dispatch

      source
      DuctAPE.IntegrationMethodType
      abstract type IntegrationMethod

      Used in integration method dispatch

      source

      Bookkeeping

      DuctAPE.get_problem_dimensionsFunction
      get_problem_dimensions(paneling_constants::PanelingConstants)
      -get_problem_dimensions(body_vortex_panels, rotor_source_panels, wake_vortex_panels)

      Determine all relevant dimensions to the problem based either on the paneling_constants or the panels themselves.

      Arguments

      • paneling_constants::PanelingConstants : Rotor (and possibly stator) geometric paramters.

      Returns

      • problem_dimensions::ProblemDimensions : ProblemDimensions object.
      source
      source

      Caching

      Allocation

      The following are various helper functions used in preallocating the various caches.

      DuctAPE.initialize_all_cachesFunction
      initialize_all_caches(solver_options, paneling_constants)

      Convenience function to initialize all caches before calling analysis.

      Arguments

      • solver_options::SolverOptionsType : solver options used for cache allocation dispatch
      • paneling_constants::PanelingConstants : PanelingConstants object upon which all cache sizing depends

      Keyword Arguments

      • fd_chunk_size::Int=12 : chunk size to use for PreallocationTools caches. Note that the automated chuck size for DuctAPE will always be the ForwardDiff threshold of 12 due to the size of the system, so it will be best to leave this at the default unless further development allows for chunk size selection for individual solvers.
      • levels::Int=1 : levels for nested duals. Note that since ImplicitAD is being used for all solves, there should be no need for more than 1 level.

      Returns

      • prepost_container_caching::NamedTuple : A named tuple containing the PreallocationTools DiffCache and a named tuple with relevant dimensions for accessing the cache.
      • solve_parameter_caching::NamedTuple : A named tuple containing the PreallocationTools DiffCache and a named tuple with relevant dimensions for accessing the cache.
      • solve_container_caching::NamedTuple : A named tuple containing the PreallocationTools DiffCache and a named tuple with relevant dimensions for accessing the cache.
      source
      DuctAPE.allocate_wake_panel_container!Function
      allocate_wake_panel_containers!(total_length, problem_dimensions::ProblemDimensions)

      A helper function is assembling the prepostcontainercache.

      Arguments

      • total_length::Vector{Int} : a one-element vector used to store the total length in order to know how large of a cache to allocate. Is updated in place.
      • problem_dimensions::ProblemDimensions : a ProblemDimensions object

      Returns

      • wake_vortex_panels::NamedTuple : A named containing the dimensions needed to reshape the cache with regards to the wake vortex panel object
      source
      DuctAPE.allocate_panel_containers!Function
      allocate_panel_containers!(total_length, problem_dimensions::ProblemDimensions)

      A helper function is assembling the prepostcontainercache.

      Arguments

      • total_length::Vector{Int} : a one-element vector used to store the total length in order to know how large of a cache to allocate. Is updated in place.
      • problem_dimensions::ProblemDimensions : a ProblemDimensions object

      Returns

      • panels::NamedTuple : A named tuple of named tuples containing the dimensions needed to reshape the cache with regards to the panel objects
      source
      DuctAPE.allocate_panel_container!Function
      allocate_panel_container!(total_length, nn, np, tn, tp, nb)

      A helper function is assembling the prepostcontainercache.

      Arguments

      • total_length::Vector{Int} : a one-element vector used to store the total length in order to know how large of a cache to allocate. Is updated in place.
      • nn::Int : number of nodes in each body, rotor, or wake sheet
      • np::Int : number of panels in each body, rotor, or wake sheet
      • tn::Int : number of total nodes among the bodies, rotors, or wake sheets
      • tp::Int : number of total panels among the bodies, rotors, or wake sheets
      • nb::Int : number of bodies, rotors, or wake sheets

      Returns

      • panel::NamedTuple : A named containing the dimensions needed to reshape the cache with regards to an arbitrary panel set
      source
      DuctAPE.allocate_body_panel_container!Function
      allocate_body_panel_containers!(total_length, problem_dimensions::ProblemDimensions)

      A helper function is assembling the prepostcontainercache.

      Arguments

      • total_length::Vector{Int} : a one-element vector used to store the total length in order to know how large of a cache to allocate. Is updated in place.
      • problem_dimensions::ProblemDimensions : a ProblemDimensions object

      Returns

      • body_vortex_panels::NamedTuple : A named tuple containing the dimensions needed to reshape the cache with regards to the body vortex panel object
      source
      DuctAPE.allocate_rotor_panel_container!Function
      allocate_rotor_panel_containers!(total_length, problem_dimensions::ProblemDimensions)

      A helper function is assembling the prepostcontainercache.

      Arguments

      • total_length::Vector{Int} : a one-element vector used to store the total length in order to know how large of a cache to allocate. Is updated in place.
      • problem_dimensions::ProblemDimensions : a ProblemDimensions object

      Returns

      • rotor_source_panels::NamedTuple : A named containing the dimensions needed to reshape the cache with regards to the rotor source panel object
      source
      DuctAPE.allocate_solve_parameter_extras!Function
      allocate_solve_parameter_extras!(
      +)

      Convenience function to select options used in DFDC and run multipoint analysis.

      Arguments

      • multipoint::Vector : doesn't need to be anything but a vector of the length of multipoints.
      source
      DuctAPE.ConvergenceTypeType
      abstract type ConvergenceType

      Used in dispatching the CSOR (controlled successive over relaxation) residual as relative or absolute.

      source
      DuctAPE.RelativeType
      struct Relative <: ConvergenceType

      Used to dispatch the relative residual for CSOR (controlled successive over relaxation) method

      source
      DuctAPE.AbsoluteType
      struct Absolute <: ConvergenceType

      Used to dispatch the absolute residual for CSOR (controlled successive over relaxation) method

      source
      DuctAPE.SolverOptionsTypeType
      abstract type SolverOptionsType

      Used for solver dispatch.

      source
      DuctAPE.ExternalSolverOptionsType
      abstract type ExternalSolverOptions <: SolverOptionsType

      Used for solver dispatch.

      source
      DuctAPE.PolyAlgorithmOptionsType
      abstract type PolyAlgorithmOptions <: SolverOptionsType

      Used for solver dispatch.

      source
      DuctAPE.GridSolverOptionsTypeType
      abstract type GridSolverOptionsType

      Used for elliptic grid solver dispatch

      source
      DuctAPE.IntegrationMethodType
      abstract type IntegrationMethod

      Used in integration method dispatch

      source

      Bookkeeping

      DuctAPE.get_problem_dimensionsFunction
      get_problem_dimensions(paneling_constants::PanelingConstants)
      +get_problem_dimensions(body_vortex_panels, rotor_source_panels, wake_vortex_panels)

      Determine all relevant dimensions to the problem based either on the paneling_constants or the panels themselves.

      Arguments

      • paneling_constants::PanelingConstants : Rotor (and possibly stator) geometric paramters.

      Returns

      • problem_dimensions::ProblemDimensions : ProblemDimensions object.
      source
      source

      Caching

      Allocation

      The following are various helper functions used in preallocating the various caches.

      DuctAPE.initialize_all_cachesFunction
      initialize_all_caches(solver_options, paneling_constants)

      Convenience function to initialize all caches before calling analysis.

      Arguments

      • solver_options::SolverOptionsType : solver options used for cache allocation dispatch
      • paneling_constants::PanelingConstants : PanelingConstants object upon which all cache sizing depends

      Keyword Arguments

      • fd_chunk_size::Int=12 : chunk size to use for PreallocationTools caches. Note that the automated chuck size for DuctAPE will always be the ForwardDiff threshold of 12 due to the size of the system, so it will be best to leave this at the default unless further development allows for chunk size selection for individual solvers.
      • levels::Int=1 : levels for nested duals. Note that since ImplicitAD is being used for all solves, there should be no need for more than 1 level.

      Returns

      • prepost_container_caching::NamedTuple : A named tuple containing the PreallocationTools DiffCache and a named tuple with relevant dimensions for accessing the cache.
      • solve_parameter_caching::NamedTuple : A named tuple containing the PreallocationTools DiffCache and a named tuple with relevant dimensions for accessing the cache.
      • solve_container_caching::NamedTuple : A named tuple containing the PreallocationTools DiffCache and a named tuple with relevant dimensions for accessing the cache.
      source
      DuctAPE.allocate_wake_panel_container!Function
      allocate_wake_panel_containers!(total_length, problem_dimensions::ProblemDimensions)

      A helper function is assembling the prepostcontainercache.

      Arguments

      • total_length::Vector{Int} : a one-element vector used to store the total length in order to know how large of a cache to allocate. Is updated in place.
      • problem_dimensions::ProblemDimensions : a ProblemDimensions object

      Returns

      • wake_vortex_panels::NamedTuple : A named containing the dimensions needed to reshape the cache with regards to the wake vortex panel object
      source
      DuctAPE.allocate_panel_containers!Function
      allocate_panel_containers!(total_length, problem_dimensions::ProblemDimensions)

      A helper function is assembling the prepostcontainercache.

      Arguments

      • total_length::Vector{Int} : a one-element vector used to store the total length in order to know how large of a cache to allocate. Is updated in place.
      • problem_dimensions::ProblemDimensions : a ProblemDimensions object

      Returns

      • panels::NamedTuple : A named tuple of named tuples containing the dimensions needed to reshape the cache with regards to the panel objects
      source
      DuctAPE.allocate_panel_container!Function
      allocate_panel_container!(total_length, nn, np, tn, tp, nb)

      A helper function is assembling the prepostcontainercache.

      Arguments

      • total_length::Vector{Int} : a one-element vector used to store the total length in order to know how large of a cache to allocate. Is updated in place.
      • nn::Int : number of nodes in each body, rotor, or wake sheet
      • np::Int : number of panels in each body, rotor, or wake sheet
      • tn::Int : number of total nodes among the bodies, rotors, or wake sheets
      • tp::Int : number of total panels among the bodies, rotors, or wake sheets
      • nb::Int : number of bodies, rotors, or wake sheets

      Returns

      • panel::NamedTuple : A named containing the dimensions needed to reshape the cache with regards to an arbitrary panel set
      source
      DuctAPE.allocate_body_panel_container!Function
      allocate_body_panel_containers!(total_length, problem_dimensions::ProblemDimensions)

      A helper function is assembling the prepostcontainercache.

      Arguments

      • total_length::Vector{Int} : a one-element vector used to store the total length in order to know how large of a cache to allocate. Is updated in place.
      • problem_dimensions::ProblemDimensions : a ProblemDimensions object

      Returns

      • body_vortex_panels::NamedTuple : A named tuple containing the dimensions needed to reshape the cache with regards to the body vortex panel object
      source
      DuctAPE.allocate_rotor_panel_container!Function
      allocate_rotor_panel_containers!(total_length, problem_dimensions::ProblemDimensions)

      A helper function is assembling the prepostcontainercache.

      Arguments

      • total_length::Vector{Int} : a one-element vector used to store the total length in order to know how large of a cache to allocate. Is updated in place.
      • problem_dimensions::ProblemDimensions : a ProblemDimensions object

      Returns

      • rotor_source_panels::NamedTuple : A named containing the dimensions needed to reshape the cache with regards to the rotor source panel object
      source
      DuctAPE.allocate_solve_parameter_extras!Function
      allocate_solve_parameter_extras!(
           solver_options::SolverOptionsType, input_length, total_length
      -)

      Includes additional caching for various solvers. Currently only does anything for SIAMFANLEOptions types.

      Arguments

      • input_length::Int : the number of state variables in the solver
      • total_length::Vector{Int} : a one-element vector used to store the total length in order to know how large of a cache to allocate. Is updated in place.

      Returns

      • solve_parameter_extras::NamedTuple : A named tuple containing dimensions related to extra caching parameters used in various solvers.
      source
      DuctAPE.allocate_grid_parameter_cacheFunction
      allocate_grid_parameter_cache(pg, x, n)

      Allocate a cache used inside the elliptic grid solve.

      Arguments

      • pg::AbstractArray{Float,3} : the proposed grid array
      • x::AbstractVector{Float} : the array of ξ values used in the solve
      • n::AbstractVector{Float} : the array of η values used in the solve

      Returns

      • grid_parameter_cache::NamedTuple : A named tuple containing the PreallocationTools DiffCache and dimensions for accessing it.
      source
      DuctAPE.allocate_integration_containersFunction
      allocate_integration_containers(
      +)

      Includes additional caching for various solvers. Currently only does anything for SIAMFANLEOptions types.

      Arguments

      • input_length::Int : the number of state variables in the solver
      • total_length::Vector{Int} : a one-element vector used to store the total length in order to know how large of a cache to allocate. Is updated in place.

      Returns

      • solve_parameter_extras::NamedTuple : A named tuple containing dimensions related to extra caching parameters used in various solvers.
      source
      DuctAPE.allocate_grid_parameter_cacheFunction
      allocate_grid_parameter_cache(pg, x, n)

      Allocate a cache used inside the elliptic grid solve.

      Arguments

      • pg::AbstractArray{Float,3} : the proposed grid array
      • x::AbstractVector{Float} : the array of ξ values used in the solve
      • n::AbstractVector{Float} : the array of η values used in the solve

      Returns

      • grid_parameter_cache::NamedTuple : A named tuple containing the PreallocationTools DiffCache and dimensions for accessing it.
      source
      DuctAPE.allocate_integration_containersFunction
      allocate_integration_containers(
           integration_options::IntegrationMethod, dispatch_type; cache_size=20
      -)

      Description

      Arguments

      • integration_options::IntegrationMethod : options for integration used for dispatch and to size cache
      • dispatch_type:: : an object with eltype(dispatch_type) with which to define the type for cache initialization.

      Keyword Arguments

      • cache_size::Int=20 : size needed for intermediate calculations for integration.

      Returns

      • integration_containers::NamedTuple : A named tuple containing the cache(s) needed for integration.
      source

      Reshaping

      The following are used internally to reshape the cache vectors into more usable formats.

      DuctAPE.withdraw_prepost_container_cacheFunction
      withdraw_prepost_container_cache(vec, dims)

      Reshape the prepost cache vector using the saved dimensions tuple.

      Arguments

      • vec::Vector{Float} : vector cache of pre- and post-processing intermediate containers.
      • dims::NamedTuple : Named tuple containing the indices and shape of the various items stored in the cache vector.

      Returns

      • prepost_container_caching::NamedTuple : Named tuple containing reshaped views of sections of the cache vector.
      source
      DuctAPE.withdraw_solve_parameter_cacheFunction
      withdraw_solve_parameter_cache(solver_options::SolverOptionsType, vec, dims)

      Reshape the solve parameter cache vector using the saved dimensions tuple.

      Arguments

      • solver_options::SolverOptionsType : Solver options type for dispatch.
      • vec::Vector{Float} : vector cache of pre- and post-processing intermediate containers.
      • dims::NamedTuple : Named tuple containing the indices and shape of the various items stored in the cache vector.

      Returns

      • solve_parameter_caching::NamedTuple : Named tuple containing reshaped views of sections of the cache vector.
      source
      DuctAPE.withdraw_solve_container_cacheFunction
      withdraw_solve_container_cache(solver_options::SolverOptionsType, vec, dims)

      Reshape the intermediate solve container cache vector using the saved dimensions tuple.

      Arguments

      • solver_options::SolverOptionsType : Solver options type for dispatch.
      • vec::Vector{Float} : vector cache of pre- and post-processing intermediate containers.
      • dims::NamedTuple : Named tuple containing the indices and shape of the various items stored in the cache vector.

      Returns

      • solve_container_caching::NamedTuple : Named tuple containing reshaped views of sections of the cache vector.
      source
      DuctAPE.withdraw_grid_parameter_cacheFunction
      withdraw_grid_parameter_cache(vec, dims)

      Reshape the cache used inside the elliptic grid solve.

      Arguments

      • vec::Vector{Float} : the cache vector
      • dims::NamedTuple : the named tuple of dimensions used to reshape the cache vector

      Returns

      • proposed_grid::AbstractArray{Float,3} : the proposed grid array
      • xi::AbstractVector{Float} : the array of ξ values used in the solve
      • eta::AbstractVector{Float} : the array of η values used in the solve
      source
      +)

      Description

      Arguments

      Keyword Arguments

      Returns

      source

      Reshaping

      The following are used internally to reshape the cache vectors into more usable formats.

      DuctAPE.withdraw_prepost_container_cacheFunction
      withdraw_prepost_container_cache(vec, dims)

      Reshape the prepost cache vector using the saved dimensions tuple.

      Arguments

      • vec::Vector{Float} : vector cache of pre- and post-processing intermediate containers.
      • dims::NamedTuple : Named tuple containing the indices and shape of the various items stored in the cache vector.

      Returns

      • prepost_container_caching::NamedTuple : Named tuple containing reshaped views of sections of the cache vector.
      source
      DuctAPE.withdraw_solve_parameter_cacheFunction
      withdraw_solve_parameter_cache(solver_options::SolverOptionsType, vec, dims)

      Reshape the solve parameter cache vector using the saved dimensions tuple.

      Arguments

      • solver_options::SolverOptionsType : Solver options type for dispatch.
      • vec::Vector{Float} : vector cache of pre- and post-processing intermediate containers.
      • dims::NamedTuple : Named tuple containing the indices and shape of the various items stored in the cache vector.

      Returns

      • solve_parameter_caching::NamedTuple : Named tuple containing reshaped views of sections of the cache vector.
      source
      DuctAPE.withdraw_solve_container_cacheFunction
      withdraw_solve_container_cache(solver_options::SolverOptionsType, vec, dims)

      Reshape the intermediate solve container cache vector using the saved dimensions tuple.

      Arguments

      • solver_options::SolverOptionsType : Solver options type for dispatch.
      • vec::Vector{Float} : vector cache of pre- and post-processing intermediate containers.
      • dims::NamedTuple : Named tuple containing the indices and shape of the various items stored in the cache vector.

      Returns

      • solve_container_caching::NamedTuple : Named tuple containing reshaped views of sections of the cache vector.
      source
      DuctAPE.withdraw_grid_parameter_cacheFunction
      withdraw_grid_parameter_cache(vec, dims)

      Reshape the cache used inside the elliptic grid solve.

      Arguments

      • vec::Vector{Float} : the cache vector
      • dims::NamedTuple : the named tuple of dimensions used to reshape the cache vector

      Returns

      • proposed_grid::AbstractArray{Float,3} : the proposed grid array
      • xi::AbstractVector{Float} : the array of ξ values used in the solve
      • eta::AbstractVector{Float} : the array of η values used in the solve
      source
      diff --git a/dev/DuctAPE/api/private_preprocess/index.html b/dev/DuctAPE/api/private_preprocess/index.html index e1355b88..f5bcea2f 100644 --- a/dev/DuctAPE/api/private_preprocess/index.html +++ b/dev/DuctAPE/api/private_preprocess/index.html @@ -12,7 +12,7 @@ ndp, riiw, nrotor, -)

      Set values for index map to be used throughout solve and post-process.

      Arguments

      Returns

      source
      DuctAPE.precompute_parametersFunction
      precompute_parameters(
      +)

      Set values for index map to be used throughout solve and post-process.

      Arguments

      • npanels : paneling_constants.npanels
      • ncenterbody_inlet : paneling_constants.ncenterbody_inlet
      • nwake_sheets : paneling_constants.nwake_sheets
      • dte_minus_cbte : paneling_constants.dte_minus_cbte
      • wnm : wake_vortex_panels.nodemap
      • wenids : wake_vortex_panels.endnodeidxs
      • nwp : problem_dimensions.nwp
      • nwsp : problem_dimensions.nwsp
      • nbn : problem_dimensions.nbn
      • ndp : body_vortex_panels.npanel[1]
      • riiw : rotor_indices_in_wake
      • nrotor : problem_dimensions.nrotor

      Returns

      • idmaps::NamedTuple : A named tuple containing index mapping used in bookkeeping throughout solve and post-process
      source
      DuctAPE.precompute_parametersFunction
      precompute_parameters(
           propulsor;
           grid_solver_options=GridSolverOptions(),
           integration_options=IntegrationOptions(),
      @@ -23,7 +23,7 @@
           finterp=(x,y,xp)->FLOWMath.akima(x,y,xp,2.0*eps(),eps()),
           silence_warnings=true,
           verbose=false,
      -)

      Out of place main pre-processing function that computes all the required parameters for the solve.

      Arguments

      • propulsor::Propulsor : A Propuslor object

      Keyword Arguments

      • grid_solver_options::GridSolverOptionsType=GridSolverOptions() : A GridSolverOptionsType object
      • integration_options::IntegrationMethod=IntegrationOptions() : An IntegrationMethod object
      • autoshiftduct::Bool=true : flag to shift duct geometry based on rotor tip radius
      • itcpshift::Float=0.05 : value used in positioning the internal pseudo control point in the solid bodies. Default is DFDC hard-coded value.
      • axistol::Float=1e-15 : tolerance for how close to the axis of rotation to be considered on the axis.
      • tegaptol::Float=1e1 * eps() : tolerance for how large of a trailing edge gap is considered a gap.
      • finterp::Function=FLOWMath.akima : interpolation method for re-interpolating body coordinates
      • silence_warnings::Bool=true : flag to silence warnings
      • verbose::Bool=false : flag to print verbose statements

      Returns

      • ivr::NamedTuple : A named tuple containing arrays of induced velocities on the rotors
      • ivw::NamedTuple : A named tuple containing arrays of induced velocities on the wake
      • ivb::NamedTuple : A named tuple containing arrays of induced velocities on the bodies
      • linsys::NamedTuple : A named tuple containing cacheable data for the linear system, including:
        • A_bb::Array{Float} : AIC (LHS) matrix for the panel method system
        • b_bf::Array{Float} : Initial system RHS vector based on freestrem magnitude
        • A_br::Array{Float} : Unit normal velocity from rotors onto body panels
        • A_pr::Array{Float} : Unit normal velocity from rotors onto body internal psuedo control points
        • A_bw::Array{Float} : Unit normal velocity from wake onto body panels
        • A_pw::Array{Float} : Unit normal velocity from wake onto body internal psuedo control points
      • A_bb_LU::LinearAlgebra.LU : LinearAlgebra LU factorization of the LHS matrix
      • lu_decomp_flag::Vector{Bool} : flag for whether factorization was successful
      • blade_elements::NamedTuple : A named tuple containing cacheable blade element information (see docs for interpolate_blade_elements)
      • airfoils::Vector{AFType} : A matrix of airfoil types associated with each of the blade elements
      • wakeK::Matrix{Float} : A matrix of precomputed geometric constants used in the calculation of the wake vortex strengths
      • idmaps::NamedTuple : A named tuple containing index mapping used in bookkeeping throughout solve and post-process
      • panels::NamedTuple : A named tuple of panel objects including:
        • body_vortex_panels::NamedTuple : the named tuple containing the body vortex panel information
        • rotor_source_panels::NamedTuple : the named tuple containing the rotor source panel information
        • wake_vortex_panels::NamedTuple : the named tuple containing the wake vortex panel information
      • problem_dimensions::ProblemDimensions : A ProblemDimensions object
      source
      precompute_parameters(
      +)

      Out of place main pre-processing function that computes all the required parameters for the solve.

      Arguments

      • propulsor::Propulsor : A Propuslor object

      Keyword Arguments

      • grid_solver_options::GridSolverOptionsType=GridSolverOptions() : A GridSolverOptionsType object
      • integration_options::IntegrationMethod=IntegrationOptions() : An IntegrationMethod object
      • autoshiftduct::Bool=true : flag to shift duct geometry based on rotor tip radius
      • itcpshift::Float=0.05 : value used in positioning the internal pseudo control point in the solid bodies. Default is DFDC hard-coded value.
      • axistol::Float=1e-15 : tolerance for how close to the axis of rotation to be considered on the axis.
      • tegaptol::Float=1e1 * eps() : tolerance for how large of a trailing edge gap is considered a gap.
      • finterp::Function=FLOWMath.akima : interpolation method for re-interpolating body coordinates
      • silence_warnings::Bool=true : flag to silence warnings
      • verbose::Bool=false : flag to print verbose statements

      Returns

      • ivr::NamedTuple : A named tuple containing arrays of induced velocities on the rotors
      • ivw::NamedTuple : A named tuple containing arrays of induced velocities on the wake
      • ivb::NamedTuple : A named tuple containing arrays of induced velocities on the bodies
      • linsys::NamedTuple : A named tuple containing cacheable data for the linear system, including:
        • A_bb::Array{Float} : AIC (LHS) matrix for the panel method system
        • b_bf::Array{Float} : Initial system RHS vector based on freestrem magnitude
        • A_br::Array{Float} : Unit normal velocity from rotors onto body panels
        • A_pr::Array{Float} : Unit normal velocity from rotors onto body internal psuedo control points
        • A_bw::Array{Float} : Unit normal velocity from wake onto body panels
        • A_pw::Array{Float} : Unit normal velocity from wake onto body internal psuedo control points
      • A_bb_LU::LinearAlgebra.LU : LinearAlgebra LU factorization of the LHS matrix
      • lu_decomp_flag::Vector{Bool} : flag for whether factorization was successful
      • blade_elements::NamedTuple : A named tuple containing cacheable blade element information (see docs for interpolate_blade_elements)
      • airfoils::Vector{AFType} : A matrix of airfoil types associated with each of the blade elements
      • wakeK::Matrix{Float} : A matrix of precomputed geometric constants used in the calculation of the wake vortex strengths
      • idmaps::NamedTuple : A named tuple containing index mapping used in bookkeeping throughout solve and post-process
      • panels::NamedTuple : A named tuple of panel objects including:
        • body_vortex_panels::NamedTuple : the named tuple containing the body vortex panel information
        • rotor_source_panels::NamedTuple : the named tuple containing the rotor source panel information
        • wake_vortex_panels::NamedTuple : the named tuple containing the wake vortex panel information
      • problem_dimensions::ProblemDimensions : A ProblemDimensions object
      source
      precompute_parameters(
           rp_duct_coordinates,
           rp_centerbody_coordinates,
           wake_grid,
      @@ -40,7 +40,7 @@
           tegaptol=1e1 * eps(),
           silence_warnings=true,
           verbose=false,
      -)

      An alternate version of precompute_parameters allowing for user defined geometry that does not go through a re-panling step (use with caution).

      The first inputs are the outputs of the reinterpolate_geometry and get_blade_ends_from_body_geometry functions.

      source
      DuctAPE.precompute_parameters!Function
      precompute_parameters!(
      +)

      An alternate version of precompute_parameters allowing for user defined geometry that does not go through a re-panling step (use with caution).

      The first inputs are the outputs of the reinterpolate_geometry and get_blade_ends_from_body_geometry functions.

      source
      DuctAPE.precompute_parameters!Function
      precompute_parameters!(
           ivr,
           ivw,
           blade_element_cache,
      @@ -58,7 +58,7 @@
           finterp=(x,y,xp)->FLOWMath.akima(x,y,xp,2.0*eps(),eps()),
           silence_warnings=true,
           verbose=false,
      -)

      In-place version of precompute_parameters.

      source
      precompute_parameters!(
      +)

      In-place version of precompute_parameters.

      source
      precompute_parameters!(
           ivr,
           ivw,
           blade_element_cache,
      @@ -80,7 +80,7 @@
           finterp=(x,y,xp)->FLOWMath.akima(x,y,xp,2.0*eps(),eps()),
           silence_warnings=true,
           verbose=false,
      -)

      In-place version of the precompute_parameters function by-passing the geometry reinterpolateion. (Use with caution)

      source

      Geometry

      DuctAPE.reinterpolate_geometryFunction
      reinterpolate_geometry(
      +)

      In-place version of the precompute_parameters function by-passing the geometry reinterpolateion. (Use with caution)

      source

      Geometry

      DuctAPE.reinterpolate_geometryFunction
      reinterpolate_geometry(
           problem_dimensions,
           duct_coordinates,
           centerbody_coordinates,
      @@ -91,7 +91,7 @@
           finterp=(x,y,xp)->FLOWMath.akima(x,y,xp,2.0*eps(),eps()),
           verbose=false,
           silence_warnings=true,
      -)

      Re-interpolate the body geometry and return compatible body and way geometry.

      Arguments

      • problem_dimensions::ProblemDimensions : A ProblemDimensions object
      • duct_coordinates::Matrix{Float} : [z,r] coordinates of duct geometry
      • centerbody_coordinates::Matrix{Float} : [z,r] coordinates of centerbody geometry
      • rotorstator_parameters::RotorStatorParameters : A RotorStatorParameters object
      • paneling_constants::PanelingConstants : A PanelingConstants object

      Keyword Arguments

      • autoshiftduct::Bool=true : flag to shift duct geometry based on rotor tip radius
      • grid_solver_options::SolverOptionsType=GridSolverOptions() : options for the wake grid position solver
      • finterp::Function=FLOWMath.akima : interpolation method for re-interpolating body coordinates
      • verbose::Bool=false : flag to print verbose statements
      • silence_warnings::Bool=true : flag to silence warnings

      Returns

      • wake_grid::Array{Float} : array containig the z and r elliptic grid points defning the wake geometry.
      • rp_duct_coordinates::Matrix{Float} : matrix containing the re-paneled duct coordinates
      • rp_centerbody_coordinates::Matrix{Float} : matrix containing the re-paneled centerbody coordinates
      • rotor_indices_in_wake::Vector{Int} : vector containing the indices of where in the wake the rotors reside (used later to define the rotor panel edges).
      source
      DuctAPE.reinterpolate_geometry!Function
      reinterpolate_geometry!(
      +)

      Re-interpolate the body geometry and return compatible body and way geometry.

      Arguments

      • problem_dimensions::ProblemDimensions : A ProblemDimensions object
      • duct_coordinates::Matrix{Float} : [z,r] coordinates of duct geometry
      • centerbody_coordinates::Matrix{Float} : [z,r] coordinates of centerbody geometry
      • rotorstator_parameters::RotorStatorParameters : A RotorStatorParameters object
      • paneling_constants::PanelingConstants : A PanelingConstants object

      Keyword Arguments

      • autoshiftduct::Bool=true : flag to shift duct geometry based on rotor tip radius
      • grid_solver_options::SolverOptionsType=GridSolverOptions() : options for the wake grid position solver
      • finterp::Function=FLOWMath.akima : interpolation method for re-interpolating body coordinates
      • verbose::Bool=false : flag to print verbose statements
      • silence_warnings::Bool=true : flag to silence warnings

      Returns

      • wake_grid::Array{Float} : array containig the z and r elliptic grid points defning the wake geometry.
      • rp_duct_coordinates::Matrix{Float} : matrix containing the re-paneled duct coordinates
      • rp_centerbody_coordinates::Matrix{Float} : matrix containing the re-paneled centerbody coordinates
      • rotor_indices_in_wake::Vector{Int} : vector containing the indices of where in the wake the rotors reside (used later to define the rotor panel edges).
      source
      DuctAPE.reinterpolate_geometry!Function
      reinterpolate_geometry!(
           wake_grid,
           rp_duct_coordinates,
           rp_centerbody_coordinates,
      @@ -106,7 +106,7 @@
           finterp=(x,y,xp)->FLOWMath.akima(x,y,xp,2.0*eps(),eps()),
           verbose=false,
           silence_warnings=true,
      -)

      In-place version of reinterpolate_geometry.

      source
      DuctAPE.generate_all_panelsFunction
      generate_all_panels(
      +)

      In-place version of reinterpolate_geometry.

      source
      DuctAPE.generate_all_panelsFunction
      generate_all_panels(
           rp_duct_coordinates,
           rp_centerbody_coordinates,
           nwake_sheets,
      @@ -117,7 +117,7 @@
           axistol=1e-15,
           tegaptol=1e1 * eps(),
           silence_warnings=true,
      -)

      Function that calls all of the various panel generation functions are returns a named tuple containing all the panels

      Arguments

      • rp_duct_coordinates::Matrix{Float} : matrix containing the re-paneled duct coordinates
      • rp_centerbody_coordinates::Matrix{Float} : matrix containing the re-paneled centerbody coordinates
      • nwake_sheets::Int : number of wake sheets
      • rotor_indices_in_wake::Vector{Int} : vector containing the indices of where in the wake the rotors reside (used later to define the rotor panel edges).
      • rotorzloc:Vector{Float} : axial locations of rotor lifting lines (contained in RotorStatorParameters)
      • wake_grid::Array{Float} : array containig the z and r elliptic grid points defning the wake geometry.

      Keyword Arguments

      • itcpshift::Float=0.05 : value used in positioning the internal pseudo control point in the solid bodies. Default is DFDC hard-coded value.
      • axistol::Float=1e-15 : tolerance for how close to the axis of rotation to be considered on the axis.
      • tegaptol::Float=1e1 * eps() : tolerance for how large of a trailing edge gap is considered a gap.
      • silence_warnings::Bool=true : flag to silence warnings

      Returns

      • panels::NamedTuple : A named tuple of named tuples containing paneling information, including:
        • body_vortex_panels::NamedTuple
        • rotor_source_panels::NamedTuple
        • wake_vortex_panels::NamedTuple
      source
      DuctAPE.generate_all_panels!Function
      generate_all_panels!(
      +)

      Function that calls all of the various panel generation functions are returns a named tuple containing all the panels

      Arguments

      • rp_duct_coordinates::Matrix{Float} : matrix containing the re-paneled duct coordinates
      • rp_centerbody_coordinates::Matrix{Float} : matrix containing the re-paneled centerbody coordinates
      • nwake_sheets::Int : number of wake sheets
      • rotor_indices_in_wake::Vector{Int} : vector containing the indices of where in the wake the rotors reside (used later to define the rotor panel edges).
      • rotorzloc:Vector{Float} : axial locations of rotor lifting lines (contained in RotorStatorParameters)
      • wake_grid::Array{Float} : array containig the z and r elliptic grid points defning the wake geometry.

      Keyword Arguments

      • itcpshift::Float=0.05 : value used in positioning the internal pseudo control point in the solid bodies. Default is DFDC hard-coded value.
      • axistol::Float=1e-15 : tolerance for how close to the axis of rotation to be considered on the axis.
      • tegaptol::Float=1e1 * eps() : tolerance for how large of a trailing edge gap is considered a gap.
      • silence_warnings::Bool=true : flag to silence warnings

      Returns

      • panels::NamedTuple : A named tuple of named tuples containing paneling information, including:
        • body_vortex_panels::NamedTuple
        • rotor_source_panels::NamedTuple
        • wake_vortex_panels::NamedTuple
      source
      DuctAPE.generate_all_panels!Function
      generate_all_panels!(
           panels,
           wake_grid,
           rp_duct_coordinates,
      @@ -129,14 +129,14 @@
           axistol=1e-15,
           tegaptol=1e1 * eps(),
           silence_warnings=true,
      -)

      In-place version of generate_all_panels.

      source

      Wake

      DuctAPE.discretize_wakeFunction
      discretize_wake(
      +)

      In-place version of generate_all_panels.

      source

      Wake

      DuctAPE.discretize_wakeFunction
      discretize_wake(
           duct_coordinates,
           centerbody_coordinates,
           rotorzloc, # rotor axial locations
           wake_length,
           npanels,
           dte_minus_cbte;
      -)

      Calculate wake sheet panel node z-coordinates.

      Arguments

      • duct_coordinates::Matrix{Float} : Array of input duct coordinates
      • centerbody_coordinates::Matrix{Float} : Array of input centerbody_coordinates coordinates
      • rotorzloc ::Vector{Float} : rotor axial locations
      • wake_length::Float : non-dimensional length of wake to extend beyond aft-most body trailing edge.
      • npanels::Vector{Int} : A vector of the number of panels between each discrete point. For example: [number of panels between the rotors; number of panels between the stator and the first trailing edge; number of panels between the trailing edges; number of panels between the last trailing edge and the end of the wake]
      • dte_minus_cbte::Float : indicator as to whether the duct trailing edge minus the centerbody trailing edge is positive, zero, or negative.
      source
      DuctAPE.generate_wake_gridFunction
      generate_wake_grid(
      +)

      Calculate wake sheet panel node z-coordinates.

      Arguments

      • duct_coordinates::Matrix{Float} : Array of input duct coordinates
      • centerbody_coordinates::Matrix{Float} : Array of input centerbody_coordinates coordinates
      • rotorzloc ::Vector{Float} : rotor axial locations
      • wake_length::Float : non-dimensional length of wake to extend beyond aft-most body trailing edge.
      • npanels::Vector{Int} : A vector of the number of panels between each discrete point. For example: [number of panels between the rotors; number of panels between the stator and the first trailing edge; number of panels between the trailing edges; number of panels between the last trailing edge and the end of the wake]
      • dte_minus_cbte::Float : indicator as to whether the duct trailing edge minus the centerbody trailing edge is positive, zero, or negative.
      source
      DuctAPE.generate_wake_gridFunction
      generate_wake_grid(
           problem_dimensions,
           rp_duct_coordinates,
           rp_centerbody_coordinates,
      @@ -147,7 +147,7 @@
           grid_solver_options=GridSolverOptions(),
           verbose=false,
           silence_warnings=true,
      -)

      Initialize and solve for elliptic grid on which wake sheets are defined.

      Arguments

      • problem_dimensions:: : A ProblemDimensions object
      • rp_duct_coordinates:: : repaneled duct coordinates
      • rp_centerbody_coordinates:: : repaneled centerbody coordinates
      • Rhub1:: : Hub radius of first rotor
      • Rtip1:: : Tip radius of first rotor
      • tip_gap1:: : Tip gap of first rotor (MUST BE ZERO for now)
      • zwake:: : axial positions of wake sheet panel nodes

      Keyword Arguments

      • grid_solver_options::GridSolverOptionsType=GridSolverOptions() : options for solving the elliptic grid.
      • verbose::Bool=false : flag to print verbose statements
      • silence_warnings::Bool=true : flag to supress warnings

      Returns

      • wake_grid::Array{Float,3} : 3D Array of axial and radial wake_grid points after solution of elliptic system.
      source
      DuctAPE.generate_wake_grid!Function
      generate_wake_grid!(
      +)

      Initialize and solve for elliptic grid on which wake sheets are defined.

      Arguments

      • problem_dimensions:: : A ProblemDimensions object
      • rp_duct_coordinates:: : repaneled duct coordinates
      • rp_centerbody_coordinates:: : repaneled centerbody coordinates
      • Rhub1:: : Hub radius of first rotor
      • Rtip1:: : Tip radius of first rotor
      • tip_gap1:: : Tip gap of first rotor (MUST BE ZERO for now)
      • zwake:: : axial positions of wake sheet panel nodes

      Keyword Arguments

      • grid_solver_options::GridSolverOptionsType=GridSolverOptions() : options for solving the elliptic grid.
      • verbose::Bool=false : flag to print verbose statements
      • silence_warnings::Bool=true : flag to supress warnings

      Returns

      • wake_grid::Array{Float,3} : 3D Array of axial and radial wake_grid points after solution of elliptic system.
      source
      DuctAPE.generate_wake_grid!Function
      generate_wake_grid!(
           wake_grid,
           rp_duct_coordinates,
           rp_centerbody_coordinates,
      @@ -158,16 +158,16 @@
           grid_solver_options=grid_solver_options,
           verbose=false,
           silence_warnings=true,
      -)

      In-place version of generate_wake_grid.

      source
      DuctAPE.initialize_wake_gridFunction
      initialize_wake_grid(rp_duct_coordinates, rp_centerbody_coordinates, zwake, rwake)

      Initialize the wake grid.

      Arguments:

      • rp_duct_coordinates::Matrix{Float} : The re-paneled duct coordinates
      • rp_centerbody_coordinates::Matrix{Float} : The re-paneled centerbody coordinates
      • zwake::Vector{Float} : The axial positions of the wake sheet panel nodes
      • rwake::Vector{Float} : The radial positions of the blade elements for the foremost rotor

      Returns:

      • wake_grid::Array{Float,3} : 3D Array of axial and radial wake_grid points
      source
      DuctAPE.initialize_wake_grid!Function
      initialize_wake_grid!(
      +)

      In-place version of generate_wake_grid.

      source
      DuctAPE.initialize_wake_gridFunction
      initialize_wake_grid(rp_duct_coordinates, rp_centerbody_coordinates, zwake, rwake)

      Initialize the wake grid.

      Arguments:

      • rp_duct_coordinates::Matrix{Float} : The re-paneled duct coordinates
      • rp_centerbody_coordinates::Matrix{Float} : The re-paneled centerbody coordinates
      • zwake::Vector{Float} : The axial positions of the wake sheet panel nodes
      • rwake::Vector{Float} : The radial positions of the blade elements for the foremost rotor

      Returns:

      • wake_grid::Array{Float,3} : 3D Array of axial and radial wake_grid points
      source
      DuctAPE.initialize_wake_grid!Function
      initialize_wake_grid!(
           wake_grid, rp_duct_coordinates, rp_centerbody_coordinates, zwake, rwake
      -)

      In-place version of initialize_wake_grid.

      source
      DuctAPE.relax_grid!Function
      relax_grid!(
      +)

      In-place version of initialize_wake_grid.

      source
      DuctAPE.relax_grid!Function
      relax_grid!(
           grid_solver_options::GridSolverOptionsType,
           wake_grid;
           verbose=false,
           silence_warnings=true,
           tabchar="    ",
           ntab=1,
      -)

      Relax/Solve initial wake grid according to elliptic system of equations.

      Arguments

      • `gridsolveroptions::GridSolverOptionsType' : options for elliptic grid solver
      • wake_grid::Array{Float,3} : Initialized wake grid

      Keyword Arguments

      • `verbose=false::' : flag for printing verbose statements
      • `silence_warnings=true::' : flag for supressing warnings
      • `tabchar::String=" "::' : string to use for tabbing over verbose statements.
      • `ntab::Int=1' : number of tabs for printing verbose statements
      source
      relax_grid!(xg, rg, nxi, neta; iteration_limit, atol)

      Relax wakegrid using elliptic wakegrid solver.

      Arguments:

      Keyword Arguments:

      • iteration_limit::Int : maximum number of iterations to run, default=100
      • atol::Float : convergence tolerance, default = 1e-9

      Returns:

      source
      DuctAPE.generate_wake_panelsFunction
      generate_wake_panels(wake_grid)

      Generate paneling for each wake sheet emanating from the rotor blade elements.

      Arguments:

      • wake_grid::Array{Float,3} : axial and radial locations of each wake_grid point (after relaxation/solution)

      Returns:

      • wake_vortex_panels::NamedTuple : A named tuple of panel values describing the wake vortex panels
      source
      DuctAPE.generate_wake_panels!Function
      generate_wake_panels!(wake_panels, wake_grid)

      In-place version of generate_wake_panels.

      source
      DuctAPE.get_wake_kFunction
      get_wake_k(r, nwn)

      Calculate geometric constant for use in later calculation of wake panel node strengths.

      Arguments

      • r::Vector{Float} : Vector of wake panel node radial positions

      Returns

      • K::Vector{Float} : Vector of geometric constants used in calculation of panel node strengths.
      source
      DuctAPE.get_wake_k!Function
      get_wake_k!(K, r)

      In-place version of get_wake_k.

      source

      Bodies

      DuctAPE.reinterpolate_bodies!Function
      reinterpolate_bodies!(
      +)

      Relax/Solve initial wake grid according to elliptic system of equations.

      Arguments

      • `gridsolveroptions::GridSolverOptionsType' : options for elliptic grid solver
      • wake_grid::Array{Float,3} : Initialized wake grid

      Keyword Arguments

      • `verbose=false::' : flag for printing verbose statements
      • `silence_warnings=true::' : flag for supressing warnings
      • `tabchar::String=" "::' : string to use for tabbing over verbose statements.
      • `ntab::Int=1' : number of tabs for printing verbose statements
      source
      relax_grid!(xg, rg, nxi, neta; iteration_limit, atol)

      Relax wakegrid using elliptic wakegrid solver.

      Arguments:

      Keyword Arguments:

      • iteration_limit::Int : maximum number of iterations to run, default=100
      • atol::Float : convergence tolerance, default = 1e-9

      Returns:

      source
      DuctAPE.generate_wake_panelsFunction
      generate_wake_panels(wake_grid)

      Generate paneling for each wake sheet emanating from the rotor blade elements.

      Arguments:

      • wake_grid::Array{Float,3} : axial and radial locations of each wake_grid point (after relaxation/solution)

      Returns:

      • wake_vortex_panels::NamedTuple : A named tuple of panel values describing the wake vortex panels
      source
      DuctAPE.generate_wake_panels!Function
      generate_wake_panels!(wake_panels, wake_grid)

      In-place version of generate_wake_panels.

      source
      DuctAPE.get_wake_kFunction
      get_wake_k(r, nwn)

      Calculate geometric constant for use in later calculation of wake panel node strengths.

      Arguments

      • r::Vector{Float} : Vector of wake panel node radial positions

      Returns

      • K::Vector{Float} : Vector of geometric constants used in calculation of panel node strengths.
      source
      DuctAPE.get_wake_k!Function
      get_wake_k!(K, r)

      In-place version of get_wake_k.

      source

      Bodies

      DuctAPE.reinterpolate_bodies!Function
      reinterpolate_bodies!(
           rp_duct_coordinates,
           rp_centerbody_coordinates,
           duct_coordinates,
      @@ -176,13 +176,13 @@
           ncenterbody_inlet,
           nduct_inlet;
           finterp=FLOWMath.akima,
      -)

      Reinterpolate duct and centerbody coordinates in order to make them compatible with the calculated wake sheet panel axial positions.

      Arguments

      • rp_duct_coordinates::Matrix{Float} : the re-paneled duct coordinates
      • rp_centerbody_coordinates::Matrix{Float} : the re-paneled centerbody coordinates
      • duct_coordinates::Matrix{Float} : the input duct coordinates
      • centerbody_coordinates::Matrix{Float} : the input centerbody coordinates
      • zwake::Matrix{Float} : the wake sheet panel node axial positions
      • ncenterbody_inlet::Matrix{Float} : the number of panels to use for the centerbody inlet
      • nduct_inlet::Matrix{Float} : the number of panels to use for the duct inlet

      Keyword Arguments

      • finterp::Function=FLOWMath.akima : interpolation method
      source
      DuctAPE.place_duct!Function
      place_duct!(rp_duct_coordinates, Rtip, rotorzloc, tip_gap)

      Transform the duct radial coordinates such that the leading rotor radius touches the duct wall.

      Note that this function is called AFTER the repanling function is called, such that the rotorzloc locations should line up directly with the duct and centerbody coordinates.

      Arguments

      • rp_duct_coordinates::Matrix{Float} : the re-paneled duct coordinates
      • Rtip::Vector{Float} : Tip radii for the rotor(s)
      • rotorzloc::Vector{Float} : axial position(s) of the rotor(s)
      • tip_gap::Vector{Float} : tip gap for the fore-most rotor (MUST BE ZERO for now)
      source

      Rotors

      DuctAPE.interpolate_blade_elementsFunction
      interpolate_blade_elements(
      +)

      Reinterpolate duct and centerbody coordinates in order to make them compatible with the calculated wake sheet panel axial positions.

      Arguments

      • rp_duct_coordinates::Matrix{Float} : the re-paneled duct coordinates
      • rp_centerbody_coordinates::Matrix{Float} : the re-paneled centerbody coordinates
      • duct_coordinates::Matrix{Float} : the input duct coordinates
      • centerbody_coordinates::Matrix{Float} : the input centerbody coordinates
      • zwake::Matrix{Float} : the wake sheet panel node axial positions
      • ncenterbody_inlet::Matrix{Float} : the number of panels to use for the centerbody inlet
      • nduct_inlet::Matrix{Float} : the number of panels to use for the duct inlet

      Keyword Arguments

      • finterp::Function=FLOWMath.akima : interpolation method
      source
      DuctAPE.place_duct!Function
      place_duct!(rp_duct_coordinates, Rtip, rotorzloc, tip_gap)

      Transform the duct radial coordinates such that the leading rotor radius touches the duct wall.

      Note that this function is called AFTER the repanling function is called, such that the rotorzloc locations should line up directly with the duct and centerbody coordinates.

      Arguments

      • rp_duct_coordinates::Matrix{Float} : the re-paneled duct coordinates
      • Rtip::Vector{Float} : Tip radii for the rotor(s)
      • rotorzloc::Vector{Float} : axial position(s) of the rotor(s)
      • tip_gap::Vector{Float} : tip gap for the fore-most rotor (MUST BE ZERO for now)
      source

      Rotors

      DuctAPE.interpolate_blade_elementsFunction
      interpolate_blade_elements(
           rsp, Rtips, Rhubs, rotor_panel_centers, nbe; finterp=FLOWMath.linear
      -)

      Interpolate blade elements based on RotorStatorParameters inputs and number of desired blade elements (from number of wake sheet in PanelingConstants input)

      Arguments

      • rsp::RotorStatorParameters : A RotorStatorParameters object
      • `Rtips::Vector{Float}' : Vector of rotor tip radii
      • `Rhubs::Vector{Float}' : Vector of rotor hub radii
      • `rotorpanelcenters::Vector{Float}' : Vector of rotor panel centers
      • nbe::Int : number of blade elements per rotor

      Keyword Arguments

      • finterp::Function=FLOWMath.linear : interpolation method (note, using Akima splines as is done for the body geometry can lead to negative chord in some cases)

      Returns

      • blade_element_cache::NamedTuple : A named tuple containing the cacheable blade element information excluding the airfoil data.
      • airfoils::NamedTuple : A named tuple containing vectors of inner and outer airfoil polar data for each blade element, used in interpolating the input data at blade element locations.
      source
      DuctAPE.interpolate_blade_elements!Function
      interpolate_blade_elements!(
      +)

      Interpolate blade elements based on RotorStatorParameters inputs and number of desired blade elements (from number of wake sheet in PanelingConstants input)

      Arguments

      • rsp::RotorStatorParameters : A RotorStatorParameters object
      • `Rtips::Vector{Float}' : Vector of rotor tip radii
      • `Rhubs::Vector{Float}' : Vector of rotor hub radii
      • `rotorpanelcenters::Vector{Float}' : Vector of rotor panel centers
      • nbe::Int : number of blade elements per rotor

      Keyword Arguments

      • finterp::Function=FLOWMath.linear : interpolation method (note, using Akima splines as is done for the body geometry can lead to negative chord in some cases)

      Returns

      • blade_element_cache::NamedTuple : A named tuple containing the cacheable blade element information excluding the airfoil data.
      • airfoils::NamedTuple : A named tuple containing vectors of inner and outer airfoil polar data for each blade element, used in interpolating the input data at blade element locations.
      source
      DuctAPE.interpolate_blade_elements!Function
      interpolate_blade_elements!(
           blade_element_cache, rsp, rotor_panel_centers, nbe; finterp=FLOWMath.linear
      -)

      In-place version of interpolate_blade_elements.

      Returns

      • airfoils::NamedTuple : A named tuple containing vectors of inner and outer airfoil polar data for each blade element, used in interpolating the input data at blade element locations.
      source
      DuctAPE.get_blade_ends_from_body_geometryFunction
      get_blade_ends_from_body_geometry(
      +)

      In-place version of interpolate_blade_elements.

      Returns

      • airfoils::NamedTuple : A named tuple containing vectors of inner and outer airfoil polar data for each blade element, used in interpolating the input data at blade element locations.
      source
      DuctAPE.get_blade_ends_from_body_geometryFunction
      get_blade_ends_from_body_geometry(
           rp_duct_coordinates, rp_centerbody_coordinates, tip_gaps, rotorzloc
      -)

      Obtain rotor hub and tip radii based on duct and centerbody geometry.

      Arguments

      • var::type :
      • rp_duct_coordinates::Matrix{Float} : re-paneled duct coordinates
      • rp_centerbody_coordinates::Matrix{Float} : re-paneled centerbody coordinates
      • tip_gaps::Vector{Float} : gaps between blade tips and duct surface (MUST BE ZEROS for now)
      • rotorzloc::Vector{Float} : rotor lifting line axial positions.

      Returns

      • Rtips::Vector{Float} : rotor tip radii
      • Rhubs::Vector{Float} : rotor hub radii
      source
      DuctAPE.get_blade_ends_from_body_geometry!Function
      get_blade_ends_from_body_geometry!(
      +)

      Obtain rotor hub and tip radii based on duct and centerbody geometry.

      Arguments

      • var::type :
      • rp_duct_coordinates::Matrix{Float} : re-paneled duct coordinates
      • rp_centerbody_coordinates::Matrix{Float} : re-paneled centerbody coordinates
      • tip_gaps::Vector{Float} : gaps between blade tips and duct surface (MUST BE ZEROS for now)
      • rotorzloc::Vector{Float} : rotor lifting line axial positions.

      Returns

      • Rtips::Vector{Float} : rotor tip radii
      • Rhubs::Vector{Float} : rotor hub radii
      source
      DuctAPE.get_blade_ends_from_body_geometry!Function
      get_blade_ends_from_body_geometry!(
           Rtip,
           Rhub,
           rp_duct_coordinates,
      @@ -190,16 +190,16 @@
           tip_gaps,
           rotorzloc;
           silence_warnings=true,
      -)

      In-place version of get_blade_ends_from_body_geometry.

      source
      DuctAPE.get_local_solidityFunction
      get_local_solidity(B, chord, r)

      Calculate local solidity from local chord, radial position, and number of blades.

      Arguments

      • B::Float : number of blades on rotor (usually an integer, but not necessarily).
      • chord::Vector{Float} : chord lengths at each radial station.
      • r::Vector{Float} : dimensional radial positions.

      Returns

      • solidity::Vector{Float} : local solidity at each radial station
      source
      DuctAPE.get_staggerFunction
      get_stagger(twists)

      Convert twist angle to stagger angle

      source
      DuctAPE.generate_rotor_panelsFunction
      generate_rotor_panels(rotorzloc, wake_grid, rotor_indices_in_wake, nwake_sheets)

      Generate rotor panel objects.

      Arguments

      • rotorzloc::Vector{Float} : rotor lifting line axial position
      • wake_grid::Array{Float,3} : wake elliptic grid axial and radial locations
      • rotor_indices_in_wake::Vector{Int} : indices of where along wake the rotors are placed
      • nwake_sheets::Int : number of wake sheets

      Returns

      • rotor_source_panels::NamedTuple : A named tuple containing the rotor source panel variables.
      source
      DuctAPE.generate_rotor_panels!Function
      generate_rotor_panels!(
      +)

      In-place version of get_blade_ends_from_body_geometry.

      source
      DuctAPE.get_local_solidityFunction
      get_local_solidity(B, chord, r)

      Calculate local solidity from local chord, radial position, and number of blades.

      Arguments

      • B::Float : number of blades on rotor (usually an integer, but not necessarily).
      • chord::Vector{Float} : chord lengths at each radial station.
      • r::Vector{Float} : dimensional radial positions.

      Returns

      • solidity::Vector{Float} : local solidity at each radial station
      source
      DuctAPE.get_staggerFunction
      get_stagger(twists)

      Convert twist angle to stagger angle

      source
      DuctAPE.generate_rotor_panelsFunction
      generate_rotor_panels(rotorzloc, wake_grid, rotor_indices_in_wake, nwake_sheets)

      Generate rotor panel objects.

      Arguments

      • rotorzloc::Vector{Float} : rotor lifting line axial position
      • wake_grid::Array{Float,3} : wake elliptic grid axial and radial locations
      • rotor_indices_in_wake::Vector{Int} : indices of where along wake the rotors are placed
      • nwake_sheets::Int : number of wake sheets

      Returns

      • rotor_source_panels::NamedTuple : A named tuple containing the rotor source panel variables.
      source
      DuctAPE.generate_rotor_panels!Function
      generate_rotor_panels!(
           rotor_source_panels, rotorzloc, wake_grid, rotor_indices_in_wake, nwake_sheets
      -)

      In-place version of generate_rotor_panels.

      source

      Induced Velocities

      DuctAPE.calculate_unit_induced_velocitiesFunction
      calculate_unit_induced_velocities(problem_dimensions, panels, integration_options)

      Calculate all the unit-induced velocties of all panels on all control points

      Arguments

      • problem_dimensions::ProblemDimensions : A ProblemDimensions object
      • panels::NamedTuple : A named tuple containing all the paneling information
      • integration_options::IntegrationOptions : Options used for integration of velocity kernals across panels

      Returns

      • ivr::NamedTuple : A named tuple containing arrays of induced velocities on the rotors
      • ivw::NamedTuple : A named tuple containing arrays of induced velocities on the wake
      • ivb::NamedTuple : A named tuple containing arrays of induced velocities on the bodies
      source
      DuctAPE.calculate_unit_induced_velocities!Function
      calculate_unit_induced_velocities!(ivr, ivw, ivb, panels, integration_options)

      In-place version of calculate_unit_induced_velocities.

      source
      DuctAPE.initialize_linear_systemFunction
      initialize_linear_system(
      +)

      In-place version of generate_rotor_panels.

      source

      Induced Velocities

      DuctAPE.calculate_unit_induced_velocitiesFunction
      calculate_unit_induced_velocities(problem_dimensions, panels, integration_options)

      Calculate all the unit-induced velocties of all panels on all control points

      Arguments

      • problem_dimensions::ProblemDimensions : A ProblemDimensions object
      • panels::NamedTuple : A named tuple containing all the paneling information
      • integration_options::IntegrationOptions : Options used for integration of velocity kernals across panels

      Returns

      • ivr::NamedTuple : A named tuple containing arrays of induced velocities on the rotors
      • ivw::NamedTuple : A named tuple containing arrays of induced velocities on the wake
      • ivb::NamedTuple : A named tuple containing arrays of induced velocities on the bodies
      source
      DuctAPE.calculate_unit_induced_velocities!Function
      calculate_unit_induced_velocities!(ivr, ivw, ivb, panels, integration_options)

      In-place version of calculate_unit_induced_velocities.

      source
      DuctAPE.initialize_linear_systemFunction
      initialize_linear_system(
           ivb,
           body_vortex_panels,
           rotor_source_panels,
           wake_vortex_panels,
           Vinf,
           integration_options,
      -)

      Set up the linear system used in the panel method solve.

      Arguments

      • ivb::NamedTuple : the named tuple containing all the unit induced velocities on the bodies
      • body_vortex_panels::NamedTuple : the named tuple containing the body vortex panel information
      • rotor_source_panels::NamedTuple : the named tuple containing the rotor source panel information
      • wake_vortex_panels::NamedTuple : the named tuple containing the wake vortex panel information
      • Vinf::Vector{Float} : the one-element vector containing the Freestream velocity magnitude
      • integration_options::IntegrationOptions : the integration options used in integrating the panel induced velocities

      Returns

      • linsys::NamedTuple : A named tuple containing cacheable data for the linear system, including:
        • A_bb::Array{Float} : AIC (LHS) matrix for the panel method system
        • b_bf::Array{Float} : Initial system RHS vector based on freestrem magnitude
        • A_br::Array{Float} : Unit normal velocity from rotors onto body panels
        • A_pr::Array{Float} : Unit normal velocity from rotors onto body internal psuedo control points
        • A_bw::Array{Float} : Unit normal velocity from wake onto body panels
        • A_pw::Array{Float} : Unit normal velocity from wake onto body internal psuedo control points
      • A_bb_LU::LinearAlgebra.LU : LinearAlgebra LU factorization of the LHS matrix
      • lu_decomp_flag::Vector{Bool} : flag for whether factorization was successful
      source
      DuctAPE.initialize_linear_system!Function
      initialize_linear_system!(
      +)

      Set up the linear system used in the panel method solve.

      Arguments

      • ivb::NamedTuple : the named tuple containing all the unit induced velocities on the bodies
      • body_vortex_panels::NamedTuple : the named tuple containing the body vortex panel information
      • rotor_source_panels::NamedTuple : the named tuple containing the rotor source panel information
      • wake_vortex_panels::NamedTuple : the named tuple containing the wake vortex panel information
      • Vinf::Vector{Float} : the one-element vector containing the Freestream velocity magnitude
      • integration_options::IntegrationOptions : the integration options used in integrating the panel induced velocities

      Returns

      • linsys::NamedTuple : A named tuple containing cacheable data for the linear system, including:
        • A_bb::Array{Float} : AIC (LHS) matrix for the panel method system
        • b_bf::Array{Float} : Initial system RHS vector based on freestrem magnitude
        • A_br::Array{Float} : Unit normal velocity from rotors onto body panels
        • A_pr::Array{Float} : Unit normal velocity from rotors onto body internal psuedo control points
        • A_bw::Array{Float} : Unit normal velocity from wake onto body panels
        • A_pw::Array{Float} : Unit normal velocity from wake onto body internal psuedo control points
      • A_bb_LU::LinearAlgebra.LU : LinearAlgebra LU factorization of the LHS matrix
      • lu_decomp_flag::Vector{Bool} : flag for whether factorization was successful
      source
      DuctAPE.initialize_linear_system!Function
      initialize_linear_system!(
           linsys,
           ivb,
           body_vortex_panels,
      @@ -208,14 +208,14 @@
           Vinf,
           intermediate_containers,
           integration_options,
      -)

      In-place version of initialize_linear_system.

      source

      Unit Induced Velocities

      DuctAPE.calculate_xrmFunction
      calculate_xrm(controlpoint, node)

      Calculate xi, rho, and m for vortex and/or source ring induced velocity calculation.

      Returns zeros if ring is on (or approximately on) the axis of rotation (zero radius).

      Arguments

      • controlpoint::Vector{Float} [z r] coordinates of point being influenced
      • node::Vector{Float} : [z r] coordinates of singularity ring

      Returns

      • xi::Float : normalized relative axial position
      • rho::Float : normalized relative radial position
      • m::Float : Elliptic integral input
      • rj::Float : radial position of the ring
      source
      DuctAPE.calculate_xrm!Function
      calculate_xrm!(cache_vec, controlpoint, node)

      In-place version of calculate_xrm.

      Cache_vec is a vector used to hold intermediate values as well as the outputs.

      source
      DuctAPE.get_ellipticsFunction
      get_elliptics(m)

      Calculate value of elliptic functions for the given geometry parameter.

      Arguments

      • m::Float : Elliptic Function parameter

      Returns

      • K::Float : K(m), value of elliptic function of the first kind at m.
      • E::Float : E(m), value of eeliptic function of the second kind at m.
      source
      DuctAPE.vortex_ring_vzFunction
      vortex_ring_vz(xi, rho, m, r_influence, influence_length)

      Axial velocity induced by axisymmetric vortex ring.

      Uses equivalent smoke ring induced velocity for self-induction, and returns zero if vortex ring is on axis of rotation (zero radius).

      Arguments

      • xi::Float : normalized z-coordinate, (z-zo)/ro
      • rho::Float : normalized r-coordinate, r/ro
      • m::Float : Elliptic Integral parameter, 4rho/sqrt(xi^2+(rho+1)^2)
      • r_influence::Float : radial location of vortex ring, ro
      • influence_length::Float : length of panel used in calculating self-induction

      Returns

      • vz::Float : axially induced velocity of vortex ring
      source
      DuctAPE.vortex_ring_vz!Function
      vortex_ring_vz!(xi, rho, m, r_influence, influence_length, cache_vec)

      Same as vortexringvz, but uses the cache_vec to store intermediate calculations.

      source
      DuctAPE.smoke_ring_vzFunction
      smoke_ring_vz(r_influence, influence_length)

      Equivalent "smoke" ring self-induced velocity.

      Arguments

      • r_influence::Float : radial position of ring (i.e. the ring raidus)
      • influence_length::Float : length of influencing panel

      Returs

      • vz::Float : axially induced velocity of vortex ring
      source
      DuctAPE.vortex_ring_vrFunction
      vortex_ring_vr(xi, rho, m, r_influence)

      Radial velocity induced by axisymmetric vortex ring.

      Returns zero if vortex ring is on axis of rotation (zero radius), the point of influence is on the axis, or if self-inducing velocity.

      Arguments

      • xi::Float : normalized z-coordinate, (z-zo)/ro
      • rho::Float : normalized r-coordinate, r/ro
      • m::Float : Elliptic Integral parameter, 4rho/sqrt(xi^2+(rho+1)^2)
      • r_influence::Float : radial location of vortex ring, ro

      Returns

      • vr::Float : radially induced velocity of vortex ring
      source
      DuctAPE.vortex_ring_vr!Function
      vortex_ring_vr!(xi, rho, m, r_influence, cache_vec)

      Same as vortexringvr, but uses the cache_vec to store intermediate calculations.

      source
      DuctAPE.source_ring_vzFunction
      source_ring_vz(xi, rho, m, r_influence)

      Axial velocity induced by axisymmetric source ring.

      Returns zero if source ring is on axis of rotation (zero radius), the point of influence is on the axis, or if self-inducing velocity.

      Arguments:

      • xi::Float : normalized z-coordinate, (z-zo)/ro
      • rho::Float : normalized r-coordinate, r/ro
      • m::Float : Elliptic Integral parameter, 4rho/sqrt(xi^2+(rho+1)^2)
      • r_influence::Float : radial location of vortex ring, ro

      Returns:

      • vz::Float : axially induced velocity of source ring
      source
      DuctAPE.source_ring_vz!Function
      source_ring_vz!(xi, rho, m, r_influence, cache_vec)

      Same as sourceringvz, but uses cache_vec to store intermediate values.

      source
      DuctAPE.source_ring_vrFunction
      source_ring_vr(xi, rho, m, r_influence)

      Radial velocity induced by axisymmetric source ring.

      Returns zero if source ring is on axis of rotation (zero radius), the point of influence is on the axis, or if self-inducing velocity.

      Arguments:

      • xi::Float : normalized z-coordinate, (z-zo)/ro
      • rho::Float : normalized r-coordinate, r/ro
      • m::Float : Elliptic Integral parameter, 4rho/sqrt(xi^2+(rho+1)^2)
      • r_influence::Float : radial location of vortex ring, ro

      Returns:

      • vr::Float : radially induced velocity of source ring
      source
      DuctAPE.source_ring_vr!Function
      source_ring_vr!(xi, rho, m, r_influence, cache_vec)

      Same as sourceringvr, but uses cache_vec to store intermediate values.

      source

      Unit Induced Velocity Matrices

      DuctAPE.induced_velocities_from_vortex_panels_on_pointsFunction
      induced_velocities_from_vortex_panels_on_points(
      +)

      In-place version of initialize_linear_system.

      source

      Unit Induced Velocities

      DuctAPE.calculate_xrmFunction
      calculate_xrm(controlpoint, node)

      Calculate xi, rho, and m for vortex and/or source ring induced velocity calculation.

      Returns zeros if ring is on (or approximately on) the axis of rotation (zero radius).

      Arguments

      • controlpoint::Vector{Float} [z r] coordinates of point being influenced
      • node::Vector{Float} : [z r] coordinates of singularity ring

      Returns

      • xi::Float : normalized relative axial position
      • rho::Float : normalized relative radial position
      • m::Float : Elliptic integral input
      • rj::Float : radial position of the ring
      source
      DuctAPE.calculate_xrm!Function
      calculate_xrm!(cache_vec, controlpoint, node)

      In-place version of calculate_xrm.

      Cache_vec is a vector used to hold intermediate values as well as the outputs.

      source
      DuctAPE.get_ellipticsFunction
      get_elliptics(m)

      Calculate value of elliptic functions for the given geometry parameter.

      Arguments

      • m::Float : Elliptic Function parameter

      Returns

      • K::Float : K(m), value of elliptic function of the first kind at m.
      • E::Float : E(m), value of eeliptic function of the second kind at m.
      source
      DuctAPE.vortex_ring_vzFunction
      vortex_ring_vz(xi, rho, m, r_influence, influence_length)

      Axial velocity induced by axisymmetric vortex ring.

      Uses equivalent smoke ring induced velocity for self-induction, and returns zero if vortex ring is on axis of rotation (zero radius).

      Arguments

      • xi::Float : normalized z-coordinate, (z-zo)/ro
      • rho::Float : normalized r-coordinate, r/ro
      • m::Float : Elliptic Integral parameter, 4rho/sqrt(xi^2+(rho+1)^2)
      • r_influence::Float : radial location of vortex ring, ro
      • influence_length::Float : length of panel used in calculating self-induction

      Returns

      • vz::Float : axially induced velocity of vortex ring
      source
      DuctAPE.vortex_ring_vz!Function
      vortex_ring_vz!(xi, rho, m, r_influence, influence_length, cache_vec)

      Same as vortexringvz, but uses the cache_vec to store intermediate calculations.

      source
      DuctAPE.smoke_ring_vzFunction
      smoke_ring_vz(r_influence, influence_length)

      Equivalent "smoke" ring self-induced velocity.

      Arguments

      • r_influence::Float : radial position of ring (i.e. the ring raidus)
      • influence_length::Float : length of influencing panel

      Returs

      • vz::Float : axially induced velocity of vortex ring
      source
      DuctAPE.vortex_ring_vrFunction
      vortex_ring_vr(xi, rho, m, r_influence)

      Radial velocity induced by axisymmetric vortex ring.

      Returns zero if vortex ring is on axis of rotation (zero radius), the point of influence is on the axis, or if self-inducing velocity.

      Arguments

      • xi::Float : normalized z-coordinate, (z-zo)/ro
      • rho::Float : normalized r-coordinate, r/ro
      • m::Float : Elliptic Integral parameter, 4rho/sqrt(xi^2+(rho+1)^2)
      • r_influence::Float : radial location of vortex ring, ro

      Returns

      • vr::Float : radially induced velocity of vortex ring
      source
      DuctAPE.vortex_ring_vr!Function
      vortex_ring_vr!(xi, rho, m, r_influence, cache_vec)

      Same as vortexringvr, but uses the cache_vec to store intermediate calculations.

      source
      DuctAPE.source_ring_vzFunction
      source_ring_vz(xi, rho, m, r_influence)

      Axial velocity induced by axisymmetric source ring.

      Returns zero if source ring is on axis of rotation (zero radius), the point of influence is on the axis, or if self-inducing velocity.

      Arguments:

      • xi::Float : normalized z-coordinate, (z-zo)/ro
      • rho::Float : normalized r-coordinate, r/ro
      • m::Float : Elliptic Integral parameter, 4rho/sqrt(xi^2+(rho+1)^2)
      • r_influence::Float : radial location of vortex ring, ro

      Returns:

      • vz::Float : axially induced velocity of source ring
      source
      DuctAPE.source_ring_vz!Function
      source_ring_vz!(xi, rho, m, r_influence, cache_vec)

      Same as sourceringvz, but uses cache_vec to store intermediate values.

      source
      DuctAPE.source_ring_vrFunction
      source_ring_vr(xi, rho, m, r_influence)

      Radial velocity induced by axisymmetric source ring.

      Returns zero if source ring is on axis of rotation (zero radius), the point of influence is on the axis, or if self-inducing velocity.

      Arguments:

      • xi::Float : normalized z-coordinate, (z-zo)/ro
      • rho::Float : normalized r-coordinate, r/ro
      • m::Float : Elliptic Integral parameter, 4rho/sqrt(xi^2+(rho+1)^2)
      • r_influence::Float : radial location of vortex ring, ro

      Returns:

      • vr::Float : radially induced velocity of source ring
      source
      DuctAPE.source_ring_vr!Function
      source_ring_vr!(xi, rho, m, r_influence, cache_vec)

      Same as sourceringvr, but uses cache_vec to store intermediate values.

      source

      Unit Induced Velocity Matrices

      DuctAPE.induced_velocities_from_vortex_panels_on_pointsFunction
      induced_velocities_from_vortex_panels_on_points(
           controlpoints,
           nodes,
           nodemap,
           influence_lengths,
           integration_options;
           integration_caches=nothing,
      -)

      Calculate axial and radial components of induced velocity for a set of control points due to a set of axisymmetric vortex panels (bands).

      Used for getting the unit induced velocities due to the body panels on the rotor/wake as well as the unit induced velocity due to the wake on the body/rotor.

      Arguments

      • controlpoints::Matrix{Float} [z r] coordinates of points being influenced
      • nodes::Matrix{Float} : [z r] coordinates of vortex rings
      • nodemap::Matrix{Int} : mapping from panel index to associated node indices
      • influence_lengths::Vector{Float} : lengths over which vortex ring influence is applied on the surface.
      • integration_options::IntegrationOptions : integration options

      Keyword Arguments

      • integration_caches::NamedTuple=nothing : cache used in in-place quadrature functions.

      Returns

      • VEL::Array{Float} : N-controlpoint x N-node x [vz, vr] array of induced velocity components
      source
      DuctAPE.induced_velocities_from_vortex_panels_on_points!Function
      induced_velocities_from_vortex_panels_on_points!(
      +)

      Calculate axial and radial components of induced velocity for a set of control points due to a set of axisymmetric vortex panels (bands).

      Used for getting the unit induced velocities due to the body panels on the rotor/wake as well as the unit induced velocity due to the wake on the body/rotor.

      Arguments

      • controlpoints::Matrix{Float} [z r] coordinates of points being influenced
      • nodes::Matrix{Float} : [z r] coordinates of vortex rings
      • nodemap::Matrix{Int} : mapping from panel index to associated node indices
      • influence_lengths::Vector{Float} : lengths over which vortex ring influence is applied on the surface.
      • integration_options::IntegrationOptions : integration options

      Keyword Arguments

      • integration_caches::NamedTuple=nothing : cache used in in-place quadrature functions.

      Returns

      • VEL::Array{Float} : N-controlpoint x N-node x [vz, vr] array of induced velocity components
      source
      DuctAPE.induced_velocities_from_vortex_panels_on_points!Function
      induced_velocities_from_vortex_panels_on_points!(
           VEL,
           controlpoint,
           node,
      @@ -223,14 +223,14 @@
           influence_length,
           integration_options;
           integration_caches=nothing,
      -)

      In-place version of induced_velocities_from_vortex_panels_on_points.

      source
      DuctAPE.induced_velocities_from_source_panels_on_pointsFunction
      induced_velocities_from_source_panels_on_points(
      +)

      In-place version of induced_velocities_from_vortex_panels_on_points.

      source
      DuctAPE.induced_velocities_from_source_panels_on_pointsFunction
      induced_velocities_from_source_panels_on_points(
           controlpoints,
           nodes,
           nodemap,
           influence_lengths,
           integration_options;
           integration_caches=nothing,
      -)

      Calculate axial and radial components of induced velocity for a set of control points due to a set of axisymmetric source panels (bands)

      Used for getting the unit induced velocities due to the body panels on the rotor/wake as well as the unit induced velocity due to the wake on the body/rotor.

      Arguments

      • controlpoints::Matrix{Float} [z r] coordinates of points being influenced
      • nodes::Matrix{Float} : [z r] coordinates of vortex rings
      • nodemap::Matrix{Int} : mapping from panel index to associated node indices
      • influence_lengths::Vector{Float} : lengths over which vortex ring influence is applied on the surface.
      • integration_options::IntegrationOptions : integration options

      Returns:

      • VEL::Array{Float} : N-controlpoint x N-node x [vz, vr] array of induced velocity components
      source
      DuctAPE.induced_velocities_from_source_panels_on_points!Function
      induced_velocities_from_source_panels_on_points!(
      +)

      Calculate axial and radial components of induced velocity for a set of control points due to a set of axisymmetric source panels (bands)

      Used for getting the unit induced velocities due to the body panels on the rotor/wake as well as the unit induced velocity due to the wake on the body/rotor.

      Arguments

      • controlpoints::Matrix{Float} [z r] coordinates of points being influenced
      • nodes::Matrix{Float} : [z r] coordinates of vortex rings
      • nodemap::Matrix{Int} : mapping from panel index to associated node indices
      • influence_lengths::Vector{Float} : lengths over which vortex ring influence is applied on the surface.
      • integration_options::IntegrationOptions : integration options

      Returns:

      • VEL::Array{Float} : N-controlpoint x N-node x [vz, vr] array of induced velocity components
      source
      DuctAPE.induced_velocities_from_source_panels_on_points!Function
      induced_velocities_from_source_panels_on_points!(
           VEL,
           controlpoint,
           node,
      @@ -238,7 +238,7 @@
           influence_length,
           integration_options;
           integration_caches=nothing,
      -)

      In-place version of induced_velocities_from_source_panels_on_points.

      source
      DuctAPE.induced_velocities_from_trailing_edge_gap_panel!Function
      induced_velocities_from_trailing_edge_gap_panel!(
      +)

      In-place version of induced_velocities_from_source_panels_on_points.

      source
      DuctAPE.induced_velocities_from_trailing_edge_gap_panel!Function
      induced_velocities_from_trailing_edge_gap_panel!(
           VEL,
           controlpoint,
           tenode,
      @@ -249,9 +249,9 @@
           integration_options;
           wake=false,
           integration_caches=nothing,
      -)

      Calculate axial and radial components of induced velocity for a set of control points due to any trailing edge gap panels.

      Used for getting the unit induced velocities due to the body body trailing edge gap panels on the body/rotor/wake.

      Note, this function is also used to calculate the influence of the wake ends rather than modeling a semi-infinite fortex sheet.

      Arguments

      • VEL::Array{Float} : N-controlpoint x N-node x [vz, vr] array of induced velocity components (modified in place)
      • controlpoints::Matrix{Float} [z r] coordinates of points being influenced
      • nodes::Matrix{Float} : [z r] coordinates of vortex rings
      • nodemap::Matrix{Int} : mapping from panel index to associated node indices
      • influence_lengths::Vector{Float} : lengths over which vortex ring influence is applied on the surface.
      • strengths::Matrix{Float} : vortex constant circulation values
      • integration_options::IntegrationOptions : integration options

      Keyword Arguments

      • wake::Bool=false : flag to indicate if this is being used for a wake sheet.
      • integration_caches::NamedTuple=nothing : cache used in in-place quadrature functions.
      source

      Panel Method Velocity Functions

      DuctAPE.vortex_aic_boundary_on_boundaryFunction
      vortex_aic_boundary_on_boundary(
      +)

      Calculate axial and radial components of induced velocity for a set of control points due to any trailing edge gap panels.

      Used for getting the unit induced velocities due to the body body trailing edge gap panels on the body/rotor/wake.

      Note, this function is also used to calculate the influence of the wake ends rather than modeling a semi-infinite fortex sheet.

      Arguments

      • VEL::Array{Float} : N-controlpoint x N-node x [vz, vr] array of induced velocity components (modified in place)
      • controlpoints::Matrix{Float} [z r] coordinates of points being influenced
      • nodes::Matrix{Float} : [z r] coordinates of vortex rings
      • nodemap::Matrix{Int} : mapping from panel index to associated node indices
      • influence_lengths::Vector{Float} : lengths over which vortex ring influence is applied on the surface.
      • strengths::Matrix{Float} : vortex constant circulation values
      • integration_options::IntegrationOptions : integration options

      Keyword Arguments

      • wake::Bool=false : flag to indicate if this is being used for a wake sheet.
      • integration_caches::NamedTuple=nothing : cache used in in-place quadrature functions.
      source

      Panel Method Velocity Functions

      DuctAPE.vortex_aic_boundary_on_boundaryFunction
      vortex_aic_boundary_on_boundary(
           controlpoint, normal, node, nodemap, influence_length, integration_options
      -)

      Calculate panel method influence coefficients (V dot nhat) for a set of control points (on panels) due to a set of axisymmetric vortex rings (also on body surface)

      Can be used for constructing the LHS influence Matrix for the panel method system.

      Arguments

      • controlpoint::Matrix{Float} [z r] coordinates of points being influenced
      • normal::Matrix{Float} : unit normal vectors of the panels on which the control points are situated.
      • node::Matrix{Float} : [z r] coordinates of panel nodes (edges)
      • nodemap::Matrix{Int} : [1 2] node indices for each panel
      • influence_length::Vector{Float} : lengths of influencing panels
      • integration_options::IntegrationOptions : integration options

      Returns

      • AICn::Matrix{Float} : N controlpoint x N+1 node array of V dot nhat values
      source
      DuctAPE.vortex_aic_boundary_on_boundary!Function
      vortex_aic_boundary_on_boundary!(
      +)

      Calculate panel method influence coefficients (V dot nhat) for a set of control points (on panels) due to a set of axisymmetric vortex rings (also on body surface)

      Can be used for constructing the LHS influence Matrix for the panel method system.

      Arguments

      • controlpoint::Matrix{Float} [z r] coordinates of points being influenced
      • normal::Matrix{Float} : unit normal vectors of the panels on which the control points are situated.
      • node::Matrix{Float} : [z r] coordinates of panel nodes (edges)
      • nodemap::Matrix{Int} : [1 2] node indices for each panel
      • influence_length::Vector{Float} : lengths of influencing panels
      • integration_options::IntegrationOptions : integration options

      Returns

      • AICn::Matrix{Float} : N controlpoint x N+1 node array of V dot nhat values
      source
      DuctAPE.vortex_aic_boundary_on_boundary!Function
      vortex_aic_boundary_on_boundary!(
           AICn,
           controlpoint,
           normal,
      @@ -260,7 +260,7 @@
           influence_length,
           integration_options;
           integration_caches=nothing,
      -)

      In-place verion of vortex_aic_boundary_on_boundary.

      integration_caches is a named tuple containing caching for intermediate calculation values.

      source
      DuctAPE.vortex_aic_boundary_on_fieldFunction
      vortex_aic_boundary_on_field(
      +)

      In-place verion of vortex_aic_boundary_on_boundary.

      integration_caches is a named tuple containing caching for intermediate calculation values.

      source
      DuctAPE.vortex_aic_boundary_on_fieldFunction
      vortex_aic_boundary_on_field(
           controlpoint,
           normal,
           node,
      @@ -268,7 +268,7 @@
           influence_length,
           integration_options;
           integration_caches=nothing,
      -)

      Calculate panel method influence coefficients (V dot nhat) for a set of control points (NOT on panels) due to a set of axisymmetric vortex rings (on body surface)

      Used for constructing portions of the panel method LHS matrix related to the pseudo control points in the bodies.

      Arguments:

      • controlpoint::Matrix{Float} [z r] coordinates of points being influenced
      • normal::Matrix{Float} : unit normal vectors of the panels on which the control points are situated.
      • node::Matrix{Float} : [z r] coordinates of panel nodes (edges)
      • nodemap::Matrix{Int} : [1 2] node indices for each panel
      • influence_length::Vector{Float} : lengths of influencing panels
      • integration_options::IntegrationOptions : integration options

      Keyword Arguments

      • integration_caches::NamedTuple=nothing : caches for intermediate values in integration.

      Returns:

      • AICn::Matrix{Float} : N controlpoint x N+1 node array of V dot nhat values
      source
      DuctAPE.vortex_aic_boundary_on_field!Function
      vortex_aic_boundary_on_field!(
      +)

      Calculate panel method influence coefficients (V dot nhat) for a set of control points (NOT on panels) due to a set of axisymmetric vortex rings (on body surface)

      Used for constructing portions of the panel method LHS matrix related to the pseudo control points in the bodies.

      Arguments:

      • controlpoint::Matrix{Float} [z r] coordinates of points being influenced
      • normal::Matrix{Float} : unit normal vectors of the panels on which the control points are situated.
      • node::Matrix{Float} : [z r] coordinates of panel nodes (edges)
      • nodemap::Matrix{Int} : [1 2] node indices for each panel
      • influence_length::Vector{Float} : lengths of influencing panels
      • integration_options::IntegrationOptions : integration options

      Keyword Arguments

      • integration_caches::NamedTuple=nothing : caches for intermediate values in integration.

      Returns:

      • AICn::Matrix{Float} : N controlpoint x N+1 node array of V dot nhat values
      source
      DuctAPE.vortex_aic_boundary_on_field!Function
      vortex_aic_boundary_on_field!(
           AICn,
           controlpoint,
           normal,
      @@ -277,7 +277,7 @@
           influence_length,
           integration_options;
           integration_caches=nothing,
      -)

      In-place version of vortex_aic_boundary_on_field.

      source
      DuctAPE.add_kutta!Function
      add_kutta!(LHS, AICn, kids)

      Add Kutta condition (γ1 + γN = 0) to LHS matrix.

      • LHS::Matrix{Float} : a pre-allocated (zeros) full size left-hand side matrix
      • AICn::Matrix{Float} : influence coefficients for panels/nodes
      • kids::Vector{Int} : [1 2] indices of where to put 1's for kutta condition
      source
      DuctAPE.add_te_gap_aic!Function
      add_te_gap_aic!(
      +)

      In-place version of vortex_aic_boundary_on_field.

      source
      DuctAPE.add_kutta!Function
      add_kutta!(LHS, AICn, kids)

      Add Kutta condition (γ1 + γN = 0) to LHS matrix.

      • LHS::Matrix{Float} : a pre-allocated (zeros) full size left-hand side matrix
      • AICn::Matrix{Float} : influence coefficients for panels/nodes
      • kids::Vector{Int} : [1 2] indices of where to put 1's for kutta condition
      source
      DuctAPE.add_te_gap_aic!Function
      add_te_gap_aic!(
           AICn,
           controlpoint,
           normal,
      @@ -289,7 +289,7 @@
           integration_options;
           wake=false,
           integration_caches=nothing,
      -)

      Add trailing edge gap aerodynmic influence coefficient contributions to the AIC matrix.

      Arguments

      • AICn::Matrix{Float} : N controlpoint x N+1 node array of V dot nhat values
      • controlpoint::Matrix{Float} [z r] coordinates of points being influenced
      • normal::Matrix{Float} : unit normal vectors of the panels on which the control points are situated.
      • tenode::Matrix{Float} : [z r] coordinates of trailing edge panel nodes (edges)
      • teinfluence_length::Vector{Float} : lengths of influencing trailing edge panels
      • tendotn::Matrix{Float} : nhat of trailing edge panel dotted with nhat of adjacent panels
      • tencrossn::Matrix{Float} : nhat of trailing edge panel crossed with nhat of adjacent panels
      • teadjnodeidxs::Matrix{Float} : indices of nodes adjacent to trailing edge panel
      • integration_options::IntegrationOptions : integration options

      Keyword Arguments

      • wake::Bool=false : flag as to whether this function is being applied to a wake sheet.
      • integration_caches::NamedTuple=nothing : caches for intermediate values in integration.
      source
      DuctAPE.source_aicFunction
      source_aic(
      +)

      Add trailing edge gap aerodynmic influence coefficient contributions to the AIC matrix.

      Arguments

      • AICn::Matrix{Float} : N controlpoint x N+1 node array of V dot nhat values
      • controlpoint::Matrix{Float} [z r] coordinates of points being influenced
      • normal::Matrix{Float} : unit normal vectors of the panels on which the control points are situated.
      • tenode::Matrix{Float} : [z r] coordinates of trailing edge panel nodes (edges)
      • teinfluence_length::Vector{Float} : lengths of influencing trailing edge panels
      • tendotn::Matrix{Float} : nhat of trailing edge panel dotted with nhat of adjacent panels
      • tencrossn::Matrix{Float} : nhat of trailing edge panel crossed with nhat of adjacent panels
      • teadjnodeidxs::Matrix{Float} : indices of nodes adjacent to trailing edge panel
      • integration_options::IntegrationOptions : integration options

      Keyword Arguments

      • wake::Bool=false : flag as to whether this function is being applied to a wake sheet.
      • integration_caches::NamedTuple=nothing : caches for intermediate values in integration.
      source
      DuctAPE.source_aicFunction
      source_aic(
           controlpoint,
           normal,
           node,
      @@ -297,7 +297,7 @@
           influence_length,
           integration_options;
           integration_caches=nothing,
      -)

      Calculate panel method influence coefficients (V dot nhat) for a set of control points (on panels) due to a set of axisymmetric source rings not on body surface.

      Can be used for constructing the RHS boundary conditions due to rotor source panels.

      Arguments

      • controlpoint::Matrix{Float} [z r] coordinates of points being influenced
      • normal::Matrix{Float} : unit normal vectors of the panels on which the control points are situated.
      • node::Matrix{Float} : [z r] coordinates of panel nodes (edges)
      • nodemap::Matrix{Int} : [1 2] node indices for each panel
      • influence_length::Vector{Float} : lengths of influencing panels
      • integration_options::IntegrationOptions : integration options

      Keyword Arguments

      • integration_caches::NamedTuple=nothing : caches for intermediate values in integration.

      Returns

      • AICn::Matrix{Float} : N controlpoint x N+1 node array of V dot nhat values
      source
      DuctAPE.source_aic!Function
      source_aic!(
      +)

      Calculate panel method influence coefficients (V dot nhat) for a set of control points (on panels) due to a set of axisymmetric source rings not on body surface.

      Can be used for constructing the RHS boundary conditions due to rotor source panels.

      Arguments

      • controlpoint::Matrix{Float} [z r] coordinates of points being influenced
      • normal::Matrix{Float} : unit normal vectors of the panels on which the control points are situated.
      • node::Matrix{Float} : [z r] coordinates of panel nodes (edges)
      • nodemap::Matrix{Int} : [1 2] node indices for each panel
      • influence_length::Vector{Float} : lengths of influencing panels
      • integration_options::IntegrationOptions : integration options

      Keyword Arguments

      • integration_caches::NamedTuple=nothing : caches for intermediate values in integration.

      Returns

      • AICn::Matrix{Float} : N controlpoint x N+1 node array of V dot nhat values
      source
      DuctAPE.source_aic!Function
      source_aic!(
           AICn,
           controlpoint,
           normal,
      @@ -306,31 +306,31 @@
           influence_length,
           integration_options;
           integration_caches=nothing,
      -)

      In-place version of source_aic.

      source
      DuctAPE.freestream_influence_vectorFunction
      freestream_influence_vector(normals, Vinfmat)

      Calculate RHS contributions due to freestream.

      Note that the freestream is assumed to have zero radial component in the underlying theory, but here we allow an arbitrary 2D vector for velocity for taking the dot product easier.

      Arguments

      • normals::Matrix{Float} : unit normal vectors of the panels on which the control points are situated.
      • Vinfmat::Matrix{Float} : [z r] components of freestream velocity (r's should be zero)

      Returns

      • RHS::Vector{Float} : vector of normal components of freestream velocity on input panels
      source
      DuctAPE.freestream_influence_vector!Function
      freestream_influence_vector!(RHS, normals, Vinfmat)

      In-place version of freestream_influence_vector.

      source
      DuctAPE.assemble_lhs_matrixFunction
      assemble_lhs_matrix(
      +)

      In-place version of source_aic.

      source
      DuctAPE.freestream_influence_vectorFunction
      freestream_influence_vector(normals, Vinfmat)

      Calculate RHS contributions due to freestream.

      Note that the freestream is assumed to have zero radial component in the underlying theory, but here we allow an arbitrary 2D vector for velocity for taking the dot product easier.

      Arguments

      • normals::Matrix{Float} : unit normal vectors of the panels on which the control points are situated.
      • Vinfmat::Matrix{Float} : [z r] components of freestream velocity (r's should be zero)

      Returns

      • RHS::Vector{Float} : vector of normal components of freestream velocity on input panels
      source
      DuctAPE.freestream_influence_vector!Function
      freestream_influence_vector!(RHS, normals, Vinfmat)

      In-place version of freestream_influence_vector.

      source
      DuctAPE.assemble_lhs_matrixFunction
      assemble_lhs_matrix(
           AICn, AICpcp, npanel, nnode, totpanel, totnode, prescribednodeidxs; dummyval=1.0
      -)

      Assemble the LHS matrix of the panel method.

      Arguments

      • AICn::Matrix{Float} : N controlpoint x N+1 node array of V dot nhat values
      • AICpcp::Matrix{Float} : Nbodies controlpoint x N+1 node array of V dot nhat values (influence on psuedo control points)
      • npanel::Vector{Int} : number of panels comprising each body
      • nnode::Vector{Int} : number of nodes comprising each body
      • totpanel::Int : total number of panels
      • totnode::Int : total number of nodes
      • prescribednodeidxs::Vector{Int} : indices of nodes with prescribed strengths (those on the axis of rotation).

      Keyword Arguments

      • dummyval::Float=1.0 : value for dummy input for prescribed and internal control points in the system. Do not change except for debugging purposes.

      Returns

      • LHS::Matrix{Float} : The full LHS matrix for the panel method.
      source
      DuctAPE.assemble_lhs_matrix!Function
      assemble_lhs_matrix!(
      +)

      Assemble the LHS matrix of the panel method.

      Arguments

      • AICn::Matrix{Float} : N controlpoint x N+1 node array of V dot nhat values
      • AICpcp::Matrix{Float} : Nbodies controlpoint x N+1 node array of V dot nhat values (influence on psuedo control points)
      • npanel::Vector{Int} : number of panels comprising each body
      • nnode::Vector{Int} : number of nodes comprising each body
      • totpanel::Int : total number of panels
      • totnode::Int : total number of nodes
      • prescribednodeidxs::Vector{Int} : indices of nodes with prescribed strengths (those on the axis of rotation).

      Keyword Arguments

      • dummyval::Float=1.0 : value for dummy input for prescribed and internal control points in the system. Do not change except for debugging purposes.

      Returns

      • LHS::Matrix{Float} : The full LHS matrix for the panel method.
      source
      DuctAPE.assemble_lhs_matrix!Function
      assemble_lhs_matrix!(
           LHS, AICn, AICpcp, npanel, nnode, totpanel, totnode, prescribednodeidxs; dummyval=1.0
      -)

      In-place version of assemble_lhs_matrix.

      source
      DuctAPE.factorize_LHSFunction
      factorize_LHS(A::AbstractMatrix)

      Returns the LU decomposition of A.

      source
      DuctAPE.factorize_LHS!Function
      factorize_LHS!(Apivot::AbstractMatrix, A::AbstractMatrix)

      Returns the LU decomposition of A using Apivot as storage memory to pivot leaving A unchanged.

      source
      DuctAPE.assemble_rhs_matrixFunction
      assemble_rhs_matrix(
      +)

      In-place version of assemble_lhs_matrix.

      source
      DuctAPE.factorize_LHSFunction
      factorize_LHS(A::AbstractMatrix)

      Returns the LU decomposition of A.

      source
      DuctAPE.factorize_LHS!Function
      factorize_LHS!(Apivot::AbstractMatrix, A::AbstractMatrix)

      Returns the LU decomposition of A using Apivot as storage memory to pivot leaving A unchanged.

      source
      DuctAPE.assemble_rhs_matrixFunction
      assemble_rhs_matrix(
           vdnb, vdnpcp, npanel, nnode, totpanel, totnode, prescribednodeidxs
      -)

      Arguments

      • vdnb::Vector{Float} : V dot nhat for body panels
      • vdnpcp::Vector{Float} : V dot nhat for pseudo control points
      • npanel::Vector{Int} : number of panels comprising each body
      • nnode::Vector{Int} : number of nodes comprising each body
      • totpanel::Int : total number of body panels
      • totnode::Int : total number of body nodes
      • prescribednodeidxs::Vector{Int} : indices of nodes with prescribed strengths (those on the axis of rotation)

      Returns

      • RHS::Vector{Float} : the RHS vector of the panel method.
      source
      DuctAPE.assemble_rhs_matrix!Function
      assemble_rhs_matrix!(
      +)

      Arguments

      • vdnb::Vector{Float} : V dot nhat for body panels
      • vdnpcp::Vector{Float} : V dot nhat for pseudo control points
      • npanel::Vector{Int} : number of panels comprising each body
      • nnode::Vector{Int} : number of nodes comprising each body
      • totpanel::Int : total number of body panels
      • totnode::Int : total number of body nodes
      • prescribednodeidxs::Vector{Int} : indices of nodes with prescribed strengths (those on the axis of rotation)

      Returns

      • RHS::Vector{Float} : the RHS vector of the panel method.
      source
      DuctAPE.assemble_rhs_matrix!Function
      assemble_rhs_matrix!(
           RHS, vdnb, vdnpcp, npanel, nnode, totpanel, totnode, prescribednodeidxs
      -)

      In-place version of assemble_rhs_matrix.

      source
      DuctAPE.calculate_normal_velocityFunction
      calculate_normal_velocity(velocity_vector, normal)

      Calculate normal velocity_vector (V dot nhat).

      Arguments

      • velocity_vector::Matrix{Float} : velocity vector [z r] on each panel
      • normal::Matrix{Float} : the panel unit normals

      Returns

      • AIC::Matrix{Float} : V dot n on each panel
      source
      DuctAPE.calculate_normal_velocity!Function
      calculate_normal_velocity!(AIC, velocity_vector, normal)

      In-place version of calculate_normal_velocity.

      source

      Quadrature

      Integrands

      DuctAPE.nominal_vortex_induced_velocity_sampleFunction
      nominal_vortex_induced_velocity_sample(
      +)

      In-place version of assemble_rhs_matrix.

      source
      DuctAPE.calculate_normal_velocityFunction
      calculate_normal_velocity(velocity_vector, normal)

      Calculate normal velocity_vector (V dot nhat).

      Arguments

      • velocity_vector::Matrix{Float} : velocity vector [z r] on each panel
      • normal::Matrix{Float} : the panel unit normals

      Returns

      • AIC::Matrix{Float} : V dot n on each panel
      source
      DuctAPE.calculate_normal_velocity!Function
      calculate_normal_velocity!(AIC, velocity_vector, normal)

      In-place version of calculate_normal_velocity.

      source

      Quadrature

      Integrands

      DuctAPE.nominal_vortex_induced_velocity_sampleFunction
      nominal_vortex_induced_velocity_sample(
           t, node1, node2, influence_length, controlpoint, cache_vec; nondimrange=(0.0, 1.0)
      -)

      Calculate the velocity induced by a linear vortex panel on a point.

      Arguments

      • t::Float : sample point in range (0,1) selected by quadrature method.
      • node1::Vector{Float} : first panel node (edge) position.
      • node2::Vector{Float} : second panel node (edge) position.
      • influence_length::Float : dimensional length of panel.
      • controlpoint::Vector{Float} : controlpoint position
      • cache_vec::Vector{Float} : cache for intermediate calculations

      Keyword Arguments

      • nondimrange::Tuple=(0.0,1.0) : Non-dimensional range describing the panel length. Do not change excpet for debugging purposes. Note, can also be a vector.

      Returns

      • V::Matrix{Float} : 2x2 matrix of axial and radial induced velocities from each of the nodes.
      source
      DuctAPE.nominal_vortex_induced_velocity_sample!Function
      nominal_vortex_induced_velocity_sample!(
      +)

      Calculate the velocity induced by a linear vortex panel on a point.

      Arguments

      • t::Float : sample point in range (0,1) selected by quadrature method.
      • node1::Vector{Float} : first panel node (edge) position.
      • node2::Vector{Float} : second panel node (edge) position.
      • influence_length::Float : dimensional length of panel.
      • controlpoint::Vector{Float} : controlpoint position
      • cache_vec::Vector{Float} : cache for intermediate calculations

      Keyword Arguments

      • nondimrange::Tuple=(0.0,1.0) : Non-dimensional range describing the panel length. Do not change excpet for debugging purposes. Note, can also be a vector.

      Returns

      • V::Matrix{Float} : 2x2 matrix of axial and radial induced velocities from each of the nodes.
      source
      DuctAPE.nominal_vortex_induced_velocity_sample!Function
      nominal_vortex_induced_velocity_sample!(
           V, t, node1, node2, influence_length, controlpoint, cache_vec; nondimrange=(0.0, 1.0)
      -)

      In-place version of nominal_vortex_induced_velocity_sample.

      source
      DuctAPE.subtracted_singular_vortex_influenceFunction
      subtracted_singular_vortex_influence(node, controlpoint)

      Calculate the singular portions of the self-induced vortex panel influence to subtract off the integral in the separation of singularity method.

      Arguments

      • node::Vector{Float} : node position
      • controlpoint::Vector{Float} : controlpoint position

      Returns

      • axial::Float : axial direction influence
      • radial::Float : radial direction influence
      source
      DuctAPE.subtracted_singular_vortex_influence!Function
      subtracted_singular_vortex_influence!(node, controlpoint, cache_vec)

      Somewhat in-place version of subtracted_singular_vortex_influence.

      Arguments

      • node::Vector{Float} : node position
      • controlpoint::Vector{Float} : controlpoint position
      • cache_vec::Vector{Float} : used to store intermediate values.

      Returns

      • axial::Float : axial direction influence
      • radial::Float : radial direction influence
      source
      DuctAPE.analytically_integrated_vortex_influenceFunction
      analytically_integrated_vortex_influence(r, influence_length)

      Analytical approximation of the singular portions of the self-induced vortex panel velocities to be added back in as part of the separation of singularity method.

      Arguments

      • r::Float : radial position of self-induced control point
      • influence_length::Float : dimensional length of the panel

      Returns

      • V::Vector{Float} : axial and radial induced velocities
      source
      DuctAPE.analytically_integrated_vortex_influence!Function
      analytically_integrated_vortex_influence!(V, r, influence_length)

      In-place version of analytically_integrated_vortex_influence.

      source
      DuctAPE.self_vortex_induced_velocity_sampleFunction
      self_vortex_induced_velocity_sample(
      +)

      In-place version of nominal_vortex_induced_velocity_sample.

      source
      DuctAPE.subtracted_singular_vortex_influenceFunction
      subtracted_singular_vortex_influence(node, controlpoint)

      Calculate the singular portions of the self-induced vortex panel influence to subtract off the integral in the separation of singularity method.

      Arguments

      • node::Vector{Float} : node position
      • controlpoint::Vector{Float} : controlpoint position

      Returns

      • axial::Float : axial direction influence
      • radial::Float : radial direction influence
      source
      DuctAPE.subtracted_singular_vortex_influence!Function
      subtracted_singular_vortex_influence!(node, controlpoint, cache_vec)

      Somewhat in-place version of subtracted_singular_vortex_influence.

      Arguments

      • node::Vector{Float} : node position
      • controlpoint::Vector{Float} : controlpoint position
      • cache_vec::Vector{Float} : used to store intermediate values.

      Returns

      • axial::Float : axial direction influence
      • radial::Float : radial direction influence
      source
      DuctAPE.analytically_integrated_vortex_influenceFunction
      analytically_integrated_vortex_influence(r, influence_length)

      Analytical approximation of the singular portions of the self-induced vortex panel velocities to be added back in as part of the separation of singularity method.

      Arguments

      • r::Float : radial position of self-induced control point
      • influence_length::Float : dimensional length of the panel

      Returns

      • V::Vector{Float} : axial and radial induced velocities
      source
      DuctAPE.analytically_integrated_vortex_influence!Function
      analytically_integrated_vortex_influence!(V, r, influence_length)

      In-place version of analytically_integrated_vortex_influence.

      source
      DuctAPE.self_vortex_induced_velocity_sampleFunction
      self_vortex_induced_velocity_sample(
           t, node1, node2, influence_length, controlpoint, cache_vec; nondimrange=(0.0, 1.0)
      -)

      Calculate the velocity induced by a linear vortex panel on a point at the midpoint between the panel edges.

      Arguments

      • t::Float : sample point in range (0,1) selected by quadrature method.
      • node1::Vector{Float} : first panel node (edge) position.
      • node2::Vector{Float} : second panel node (edge) position.
      • influence_length::Float : dimensional length of panel.
      • controlpoint::Vector{Float} : controlpoint position
      • cache_vec::Vector{Float} : cache for intermediate calculations

      Keyword Arguments

      • nondimrange::Tuple=(0.0,1.0) : Non-dimensional range describing the panel length. Do not change excpet for debugging purposes. Note, can also be a vector.

      Returns

      • V::Matrix{Float} : 2x2 matrix of axial and radial induced velocities from each of the nodes.
      source
      DuctAPE.self_vortex_induced_velocity_sample!Function
      self_vortex_induced_velocity_sample!(
      +)

      Calculate the velocity induced by a linear vortex panel on a point at the midpoint between the panel edges.

      Arguments

      • t::Float : sample point in range (0,1) selected by quadrature method.
      • node1::Vector{Float} : first panel node (edge) position.
      • node2::Vector{Float} : second panel node (edge) position.
      • influence_length::Float : dimensional length of panel.
      • controlpoint::Vector{Float} : controlpoint position
      • cache_vec::Vector{Float} : cache for intermediate calculations

      Keyword Arguments

      • nondimrange::Tuple=(0.0,1.0) : Non-dimensional range describing the panel length. Do not change excpet for debugging purposes. Note, can also be a vector.

      Returns

      • V::Matrix{Float} : 2x2 matrix of axial and radial induced velocities from each of the nodes.
      source
      DuctAPE.self_vortex_induced_velocity_sample!Function
      self_vortex_induced_velocity_sample!(
           V, t, node1, node2, influence_length, controlpoint, cache_vec; nondimrange=(0.0, 1.0)
      -)

      In-place version of self_vortex_induced_velocity_sample.

      source
      DuctAPE.nominal_source_induced_velocity_sampleFunction
      nominal_source_induced_velocity_sample(
      +)

      In-place version of self_vortex_induced_velocity_sample.

      source
      DuctAPE.nominal_source_induced_velocity_sampleFunction
      nominal_source_induced_velocity_sample(
           t, node1, node2, influence_length, controlpoint, cache_vec; nondimrange=(0.0, 1.0)
      -)

      Calculate the velocity induced by a source panel on a point.

      Arguments

      • t::Float : sample point in range (0,1) selected by quadrature method.
      • node1::Vector{Float} : first panel node (edge) position.
      • node2::Vector{Float} : second panel node (edge) position.
      • influence_length::Float : dimensional length of panel.
      • controlpoint::Vector{Float} : controlpoint position
      • cache_vec::Vector{Float} : cache for intermediate calculations

      Keyword Arguments

      • nondimrange::Tuple=(0.0,1.0) : Non-dimensional range describing the panel length. Do not change excpet for debugging purposes. Note, can also be a vector.

      Returns

      • V::Matrix{Float} : 2x2 matrix of axial and radial induced velocities from each of the nodes.
      source
      DuctAPE.nominal_source_induced_velocity_sample!Function
      nominal_source_induced_velocity_sample!(
      +)

      Calculate the velocity induced by a source panel on a point.

      Arguments

      • t::Float : sample point in range (0,1) selected by quadrature method.
      • node1::Vector{Float} : first panel node (edge) position.
      • node2::Vector{Float} : second panel node (edge) position.
      • influence_length::Float : dimensional length of panel.
      • controlpoint::Vector{Float} : controlpoint position
      • cache_vec::Vector{Float} : cache for intermediate calculations

      Keyword Arguments

      • nondimrange::Tuple=(0.0,1.0) : Non-dimensional range describing the panel length. Do not change excpet for debugging purposes. Note, can also be a vector.

      Returns

      • V::Matrix{Float} : 2x2 matrix of axial and radial induced velocities from each of the nodes.
      source
      DuctAPE.nominal_source_induced_velocity_sample!Function
      nominal_source_induced_velocity_sample!(
           V, t, node1, node2, influence_length, controlpoint, cache_vec; nondimrange=(0.0,1.0)
      -)

      In-place version of nominal_source_induced_velocity_sample.

      source
      DuctAPE.subtracted_singular_source_influenceFunction
      subtracted_singular_source_influence(node, controlpoint)

      Calculate the singular portions of the self-induced source panel influence to subtract off the integral in the separation of singularity method.

      Arguments

      • node::Vector{Float} : node position
      • controlpoint::Vector{Float} : controlpoint position

      Returns

      • axial::Float : axial direction influence
      • radial::Float : radial direction influence
      source
      DuctAPE.subtracted_singular_source_influence!Function
      subtracted_singular_source_influence!(node, controlpoint, cache_vec)

      In-place version of subtracted_singular_source_influence.

      source
      DuctAPE.analytically_integrated_source_influenceFunction
      analytically_integrated_source_influence(r, influence_length)

      In-place version of analytically_integrated_source_influence.

      source
      DuctAPE.analytically_integrated_source_influence!Function
      analytically_integrated_source_influence(r, influence_length)

      Analytical approximation of the singular portions of the self-induced source panel velocities to be added back in as part of the separation of singularity method.

      Arguments

      • r::Float : radial position of self-induced control point
      • influence_length::Float : dimensional length of the panel

      Returns

      • V::Vector{Float} : axial and radial induced velocities
      source
      DuctAPE.self_source_induced_velocity_sampleFunction
      self_source_induced_velocity_sample(
      +)

      In-place version of nominal_source_induced_velocity_sample.

      source
      DuctAPE.subtracted_singular_source_influenceFunction
      subtracted_singular_source_influence(node, controlpoint)

      Calculate the singular portions of the self-induced source panel influence to subtract off the integral in the separation of singularity method.

      Arguments

      • node::Vector{Float} : node position
      • controlpoint::Vector{Float} : controlpoint position

      Returns

      • axial::Float : axial direction influence
      • radial::Float : radial direction influence
      source
      DuctAPE.subtracted_singular_source_influence!Function
      subtracted_singular_source_influence!(node, controlpoint, cache_vec)

      In-place version of subtracted_singular_source_influence.

      source
      DuctAPE.analytically_integrated_source_influenceFunction
      analytically_integrated_source_influence(r, influence_length)

      In-place version of analytically_integrated_source_influence.

      source
      DuctAPE.analytically_integrated_source_influence!Function
      analytically_integrated_source_influence(r, influence_length)

      Analytical approximation of the singular portions of the self-induced source panel velocities to be added back in as part of the separation of singularity method.

      Arguments

      • r::Float : radial position of self-induced control point
      • influence_length::Float : dimensional length of the panel

      Returns

      • V::Vector{Float} : axial and radial induced velocities
      source
      DuctAPE.self_source_induced_velocity_sampleFunction
      self_source_induced_velocity_sample(
           t, node1, node2, influence_length, controlpoint, cache_vec; nondimrange=(0.0, 1.0)
      -)

      Calculate the velocity induced by a linear source panel on a point at the midpoint between the panel edges.

      Arguments

      • t::Float : sample point in range (0,1) selected by quadrature method.
      • node1::Vector{Float} : first panel node (edge) position.
      • node2::Vector{Float} : second panel node (edge) position.
      • influence_length::Float : dimensional length of panel.
      • controlpoint::Vector{Float} : controlpoint position
      • cache_vec::Vector{Float} : cache for intermediate calculations

      Keyword Arguments

      • nondimrange::Tuple=(0.0,1.0) : Non-dimensional range describing the panel length. Do not change excpet for debugging purposes. Note, can also be a vector.

      Returns

      • V::Matrix{Float} : 2x2 matrix of axial and radial induced velocities from each of the nodes.
      source
      DuctAPE.self_source_induced_velocity_sample!Function
      self_source_induced_velocity_sample!(
      +)

      Calculate the velocity induced by a linear source panel on a point at the midpoint between the panel edges.

      Arguments

      • t::Float : sample point in range (0,1) selected by quadrature method.
      • node1::Vector{Float} : first panel node (edge) position.
      • node2::Vector{Float} : second panel node (edge) position.
      • influence_length::Float : dimensional length of panel.
      • controlpoint::Vector{Float} : controlpoint position
      • cache_vec::Vector{Float} : cache for intermediate calculations

      Keyword Arguments

      • nondimrange::Tuple=(0.0,1.0) : Non-dimensional range describing the panel length. Do not change excpet for debugging purposes. Note, can also be a vector.

      Returns

      • V::Matrix{Float} : 2x2 matrix of axial and radial induced velocities from each of the nodes.
      source
      DuctAPE.self_source_induced_velocity_sample!Function
      self_source_induced_velocity_sample!(
           V, t, node1, node2, influence_length, controlpoint, cache_vec; nondimrange=(0.0, 1.0)
      -)

      In-place version of self_source_induced_velocity_sample.

      source

      Integrals

      DuctAPE.nominal_vortex_panel_integrationFunction
      nominal_vortex_panel_integration(
      +)

      In-place version of self_source_induced_velocity_sample.

      source

      Integrals

      DuctAPE.nominal_vortex_panel_integrationFunction
      nominal_vortex_panel_integration(
           integration_options,
           node1,
           node2,
      @@ -338,7 +338,7 @@
           controlpoint,
           containers;
           debug=false,
      -)

      Integration of vortex panel induced velocity on a point far away.

      Arguments

      • integration_options::IntegrationMethod : options for itegration methods
      • node1::Vector{Float} : first panel node (edge) position.
      • node2::Vector{Float} : second panel node (edge) position.
      • influence_length::Float : dimensional length of panel.
      • controlpoint::Vector{Float} : controlpoint position
      • containers::NamedTuple : cache for intermediate calculations

      Keyword Arguments

      • debug::Bool=false : if true, some methods will return the estimation error.

      Returns

      • V::Matrix{Float} : velocity components due to the jth and j+1th nodes in the format: [vz_j vr_j; vz_{j+1} vr_{j+1}]
      source
      DuctAPE.nominal_vortex_panel_integration!Function
      nominal_vortex_panel_integration!(
      +)

      Integration of vortex panel induced velocity on a point far away.

      Arguments

      • integration_options::IntegrationMethod : options for itegration methods
      • node1::Vector{Float} : first panel node (edge) position.
      • node2::Vector{Float} : second panel node (edge) position.
      • influence_length::Float : dimensional length of panel.
      • controlpoint::Vector{Float} : controlpoint position
      • containers::NamedTuple : cache for intermediate calculations

      Keyword Arguments

      • debug::Bool=false : if true, some methods will return the estimation error.

      Returns

      • V::Matrix{Float} : velocity components due to the jth and j+1th nodes in the format: [vz_j vr_j; vz_{j+1} vr_{j+1}]
      source
      DuctAPE.nominal_vortex_panel_integration!Function
      nominal_vortex_panel_integration!(
           integration_options,
           V,
           node1,
      @@ -347,7 +347,7 @@
           controlpoint,
           containers;
           debug=false,
      -)

      In-place version of nominal_vortex_panel_integration.

      source
      DuctAPE.self_vortex_panel_integrationFunction
      self_vortex_panel_integration(
      +)

      In-place version of nominal_vortex_panel_integration.

      source
      DuctAPE.self_vortex_panel_integrationFunction
      self_vortex_panel_integration(
           integration_options,
           node1,
           node2,
      @@ -355,7 +355,7 @@
           controlpoint,
           containers;
           debug=false,
      -)

      Integration of linear vortex panel self-induced velocity.

      Arguments

      • integration_options::IntegrationMethod : options for itegration methods
      • node1::Vector{Float} : first panel node (edge) position.
      • node2::Vector{Float} : second panel node (edge) position.
      • influence_length::Float : dimensional length of panel.
      • controlpoint::Vector{Float} : controlpoint position
      • containers::NamedTuple : cache for intermediate calculations

      Keyword Arguments

      • debug::Bool=false : if true, some methods will return the estimation error.

      Returns

      • V::Matrix{Float} : velocity components due to the jth and j+1th nodes in the format: [vz_j vr_j; vz_{j+1} vr_{j+1}]
      source
      DuctAPE.self_vortex_panel_integration!Function
      self_vortex_panel_integration!(
      +)

      Integration of linear vortex panel self-induced velocity.

      Arguments

      • integration_options::IntegrationMethod : options for itegration methods
      • node1::Vector{Float} : first panel node (edge) position.
      • node2::Vector{Float} : second panel node (edge) position.
      • influence_length::Float : dimensional length of panel.
      • controlpoint::Vector{Float} : controlpoint position
      • containers::NamedTuple : cache for intermediate calculations

      Keyword Arguments

      • debug::Bool=false : if true, some methods will return the estimation error.

      Returns

      • V::Matrix{Float} : velocity components due to the jth and j+1th nodes in the format: [vz_j vr_j; vz_{j+1} vr_{j+1}]
      source
      DuctAPE.self_vortex_panel_integration!Function
      self_vortex_panel_integration!(
           integration_options,
           V,
           node1,
      @@ -364,7 +364,7 @@
           controlpoint,
           containers;
           debug=false,
      -)

      In-place version of self_vortex_panel_integration.

      source
      DuctAPE.nominal_source_panel_integrationFunction
      nominal_source_panel_integration(
      +)

      In-place version of self_vortex_panel_integration.

      source
      DuctAPE.nominal_source_panel_integrationFunction
      nominal_source_panel_integration(
           integration_options,
           node1,
           node2,
      @@ -372,7 +372,7 @@
           controlpoint,
           containers;
           debug=false,
      -)

      Integration of source panel induced velocity on a point far away.

      Arguments

      • integration_options::IntegrationMethod : options for itegration methods
      • node1::Vector{Float} : first panel node (edge) position.
      • node2::Vector{Float} : second panel node (edge) position.
      • influence_length::Float : dimensional length of panel.
      • controlpoint::Vector{Float} : controlpoint position
      • containers::NamedTuple : cache for intermediate calculations

      Keyword Arguments

      • debug::Bool=false : if true, some methods will return the estimation error.

      Returns

      • V::Matrix{Float} : velocity components due to the jth and j+1th nodes in the format: [vz_j vr_j; vz_{j+1} vr_{j+1}]
      source
      DuctAPE.nominal_source_panel_integration!Function
      nominal_source_panel_integration!(
      +)

      Integration of source panel induced velocity on a point far away.

      Arguments

      • integration_options::IntegrationMethod : options for itegration methods
      • node1::Vector{Float} : first panel node (edge) position.
      • node2::Vector{Float} : second panel node (edge) position.
      • influence_length::Float : dimensional length of panel.
      • controlpoint::Vector{Float} : controlpoint position
      • containers::NamedTuple : cache for intermediate calculations

      Keyword Arguments

      • debug::Bool=false : if true, some methods will return the estimation error.

      Returns

      • V::Matrix{Float} : velocity components due to the jth and j+1th nodes in the format: [vz_j vr_j; vz_{j+1} vr_{j+1}]
      source
      DuctAPE.nominal_source_panel_integration!Function
      nominal_source_panel_integration!(
           integration_options,
           V,
           node1,
      @@ -381,7 +381,7 @@
           controlpoint,
           containers;
           debug=false,
      -)

      In-place version of nominal_source_panel_integration.

      source
      DuctAPE.self_source_panel_integrationFunction
      self_source_panel_integration(
      +)

      In-place version of nominal_source_panel_integration.

      source
      DuctAPE.self_source_panel_integrationFunction
      self_source_panel_integration(
           integration_options,
           node1,
           node2,
      @@ -389,7 +389,7 @@
           controlpoint,
           containers;
           debug=false,
      -)

      Integration of linear source panel self-induced velocity.

      Arguments

      • integration_options::IntegrationMethod : options for itegration methods
      • node1::Vector{Float} : first panel node (edge) position.
      • node2::Vector{Float} : second panel node (edge) position.
      • influence_length::Float : dimensional length of panel.
      • controlpoint::Vector{Float} : controlpoint position
      • containers::NamedTuple : cache for intermediate calculations

      Keyword Arguments

      • debug::Bool=false : if true, some methods will return the estimation error.

      Returns

      • V::Matrix{Float} : velocity components due to the jth and j+1th nodes in the format: [vz_j vr_j; vz_{j+1} vr_{j+1}]
      source
      DuctAPE.self_source_panel_integration!Function
      self_source_panel_integration!(
      +)

      Integration of linear source panel self-induced velocity.

      Arguments

      • integration_options::IntegrationMethod : options for itegration methods
      • node1::Vector{Float} : first panel node (edge) position.
      • node2::Vector{Float} : second panel node (edge) position.
      • influence_length::Float : dimensional length of panel.
      • controlpoint::Vector{Float} : controlpoint position
      • containers::NamedTuple : cache for intermediate calculations

      Keyword Arguments

      • debug::Bool=false : if true, some methods will return the estimation error.

      Returns

      • V::Matrix{Float} : velocity components due to the jth and j+1th nodes in the format: [vz_j vr_j; vz_{j+1} vr_{j+1}]
      source
      DuctAPE.self_source_panel_integration!Function
      self_source_panel_integration!(
           integration_options,
           V,
           node1,
      @@ -398,7 +398,7 @@
           controlpoint,
           containers;
           debug=false,
      -)

      In-place version of self_source_panel_integration.

      source
      DuctAPE.extrapolate!Function
      extrapolate!(V, err, fh; power=2, atol=1e-6)

      Performs Richardson extrapolation on an array fh for use in Romberg integration.

      Arguments

      • V::Matrix{Float} : velocity components due to the jth and j+1th nodes in the format: [vz_j vr_j; vz_{j+1} vr_{j+1}]
      • err::Vector{Float} : estimated errors in velocity approximation
      • fh::Tuple : (f(h), h) tuples (in order of decreasing |h|)
      source

      State Initialization

      DuctAPE.initialize_velocitiesFunction
      initialize_velocities(
      +)

      In-place version of self_source_panel_integration.

      source
      DuctAPE.extrapolate!Function
      extrapolate!(V, err, fh; power=2, atol=1e-6)

      Performs Richardson extrapolation on an array fh for use in Romberg integration.

      Arguments

      • V::Matrix{Float} : velocity components due to the jth and j+1th nodes in the format: [vz_j vr_j; vz_{j+1} vr_{j+1}]
      • err::Vector{Float} : estimated errors in velocity approximation
      • fh::Tuple : (f(h), h) tuples (in order of decreasing |h|)
      source

      State Initialization

      DuctAPE.initialize_velocitiesFunction
      initialize_velocities(
           solver_options::SolverOptionsType,
           operating_point,
           blade_elements,
      @@ -407,7 +407,7 @@
           ivw,
           body_totnodes,
           wake_panel_sheet_be_map,
      -)

      Initialize velocity state variables.

      Arguments

      • solver_options::SolverOptionsType : solver options type for dispatch
      • operating_point::OperatingPoint : an OperatingPoint object
      • blade_elements::NamedTuple : A named tuple containing the blade element geometry and airfoil information.
      • linsys::NamedTuple : A named tuple containing the panel method linear system information.
      • ivr::NamedTuple : A named tuple containing the unit induced velocities on the rotors
      • ivw::NamedTuple : A named tuple containing the unit induced velocities on the wake
      • body_totnodes::Int : the total number of panel nodes comprising the duct and centerbody geometry
      • wake_panel_sheet_be_map::Matrix{Int} : An index map from the wake panels to the nearest ahead rotor blade element along the wake sheets

      Returns

      • vz_rotor::Vector{Float} : a vector of the velocity state variables associated with the rotor axially induced velocity
      • vtheta_rotor::Vector{Float} : a vector of the velocity state variables associated with the rotor tangentially induced velocity
      • Cm_wake::Vector{Float} : a vector of the velocity state variables associated with the wake control point meridional velocity
      source
      DuctAPE.initialize_velocities!Function

      function initializevelocities!( solveroptions::SolverOptionsType, vzrotor, vthetarotor, Cmwake, operatingpoint, bladeelements, linsys, ivr, ivw, bodytotnodes, wakepanelsheetbemap, )

      In-place version of initialize_velocities.

      source
      DuctAPE.initialize_strengths!Function
      initialize_strengths!(
      +)

      Initialize velocity state variables.

      Arguments

      • solver_options::SolverOptionsType : solver options type for dispatch
      • operating_point::OperatingPoint : an OperatingPoint object
      • blade_elements::NamedTuple : A named tuple containing the blade element geometry and airfoil information.
      • linsys::NamedTuple : A named tuple containing the panel method linear system information.
      • ivr::NamedTuple : A named tuple containing the unit induced velocities on the rotors
      • ivw::NamedTuple : A named tuple containing the unit induced velocities on the wake
      • body_totnodes::Int : the total number of panel nodes comprising the duct and centerbody geometry
      • wake_panel_sheet_be_map::Matrix{Int} : An index map from the wake panels to the nearest ahead rotor blade element along the wake sheets

      Returns

      • vz_rotor::Vector{Float} : a vector of the velocity state variables associated with the rotor axially induced velocity
      • vtheta_rotor::Vector{Float} : a vector of the velocity state variables associated with the rotor tangentially induced velocity
      • Cm_wake::Vector{Float} : a vector of the velocity state variables associated with the wake control point meridional velocity
      source
      DuctAPE.initialize_velocities!Function

      function initializevelocities!( solveroptions::SolverOptionsType, vzrotor, vthetarotor, Cmwake, operatingpoint, bladeelements, linsys, ivr, ivw, bodytotnodes, wakepanelsheetbemap, )

      In-place version of initialize_velocities.

      source
      DuctAPE.initialize_strengths!Function
      initialize_strengths!(
           solver_options::SolverOptionsType,
           Gamr,
           sigr,
      @@ -425,7 +425,7 @@
           wake_node_sheet_be_map,
           wake_node_ids_along_casing_wake_interface,
           wake_node_ids_along_centerbody_wake_interface,
      -)

      Initialize strength state variables.

      Arguments

      • solver_options::SolverOptionsType : solver options type for dispatch
      • Gamr::Vector{Float} : Rotor circulation state variables (modified in place)
      • sigr::Vector{Float} : Rotor panel strength state variables (modified in place)
      • gamw::Vector{Float} : Wake panel strength state variables (modified in place)
      • operating_point::OperatingPoint : an OperatingPoint object
      • blade_elements::NamedTuple : A named tuple containing the blade element geometry and airfoil information.
      • linsys::NamedTuple : A named tuple containing the panel method linear system information.
      • ivr::NamedTuple : A named tuple containing the unit induced velocities on the rotors
      • ivw::NamedTuple : A named tuple containing the unit induced velocities on the wake
      • wakeK::Vector{Float} : geometric constants of wake nodes used in calculating wake strengths
      • body_totnodes::Int : the total number of panel nodes comprising the duct and centerbody geometry
      • wake_nodemap::Matrix{Int} : an index map of wake panel to the associated node indices
      • wake_endnodeidxs::Matrix{Int} : the node indices of the start and end of the wake sheets.
      • wake_panel_sheet_be_map::Matrix{Int} : An index map from the wake panels to the nearest ahead rotor blade element along the wake sheets
      • wake_node_sheet_be_map::Matrix{Int} : An index map from the wake nodes to the nearest ahead rotor blade element along the wake sheets
      • wake_node_ids_along_casing_wake_interface::type : An index map indicating which wake nodes interface with the duct wall
      • wake_node_ids_along_centerbody_wake_interface::type : An index map indicating which wake nodes interface with the centerbody wall
      source
      function initialize_strengths!(
      +)

      Initialize strength state variables.

      Arguments

      • solver_options::SolverOptionsType : solver options type for dispatch
      • Gamr::Vector{Float} : Rotor circulation state variables (modified in place)
      • sigr::Vector{Float} : Rotor panel strength state variables (modified in place)
      • gamw::Vector{Float} : Wake panel strength state variables (modified in place)
      • operating_point::OperatingPoint : an OperatingPoint object
      • blade_elements::NamedTuple : A named tuple containing the blade element geometry and airfoil information.
      • linsys::NamedTuple : A named tuple containing the panel method linear system information.
      • ivr::NamedTuple : A named tuple containing the unit induced velocities on the rotors
      • ivw::NamedTuple : A named tuple containing the unit induced velocities on the wake
      • wakeK::Vector{Float} : geometric constants of wake nodes used in calculating wake strengths
      • body_totnodes::Int : the total number of panel nodes comprising the duct and centerbody geometry
      • wake_nodemap::Matrix{Int} : an index map of wake panel to the associated node indices
      • wake_endnodeidxs::Matrix{Int} : the node indices of the start and end of the wake sheets.
      • wake_panel_sheet_be_map::Matrix{Int} : An index map from the wake panels to the nearest ahead rotor blade element along the wake sheets
      • wake_node_sheet_be_map::Matrix{Int} : An index map from the wake nodes to the nearest ahead rotor blade element along the wake sheets
      • wake_node_ids_along_casing_wake_interface::type : An index map indicating which wake nodes interface with the duct wall
      • wake_node_ids_along_centerbody_wake_interface::type : An index map indicating which wake nodes interface with the centerbody wall
      source
      function initialize_strengths!(
           solver_options::CSORSolverOptions,
           Gamr,
           sigr,
      @@ -442,4 +442,4 @@
           wake_node_ids_along_centerbody_wake_interface;
           niter=10,
           rlx=0.5,
      -)

      Refactored from DFDC SUBROUTINE ROTINITBLD

      From the subroutine notes: Sets reasonable initial circulation using current rotor blade geometry (chord, beta). Initial circulations are set w/o induced effects An iteration is done using the self-induced velocity from momentum theory to converge an approximate induced axial velocity

      Arguments

      • solver_options::SolverOptionsType : solver options type for dispatch
      • Gamr::Vector{Float} : Rotor circulation state variables (modified in place)
      • sigr::Vector{Float} : Rotor panel strength state variables (modified in place)
      • gamw::Vector{Float} : Wake panel strength state variables (modified in place)
      • operating_point::OperatingPoint : an OperatingPoint object
      • blade_elements::NamedTuple : A named tuple containing the blade element geometry and airfoil information.
      • wakeK::Vector{Float} : geometric constants of wake nodes used in calculating wake strengths
      • wake_nodemap::Matrix{Int} : an index map of wake panel to the associated node indices
      • wake_endnodeidxs::Matrix{Int} : the node indices of the start and end of the wake sheets.
      • wake_panel_sheet_be_map::Matrix{Int} : An index map from the wake panels to the nearest ahead rotor blade element along the wake sheets
      • wake_node_sheet_be_map::Matrix{Int} : An index map from the wake nodes to the nearest ahead rotor blade element along the wake sheets
      • wake_node_ids_along_casing_wake_interface::type : An index map indicating which wake nodes interface with the duct wall
      • wake_node_ids_along_centerbody_wake_interface::type : An index map indicating which wake nodes interface with the centerbody wall

      Keyword Arguments

      • rlx::Float=0.5 : factor for under-relaxation to reduce transients in CL

      Returns

      source
      +)

      Refactored from DFDC SUBROUTINE ROTINITBLD

      From the subroutine notes: Sets reasonable initial circulation using current rotor blade geometry (chord, beta). Initial circulations are set w/o induced effects An iteration is done using the self-induced velocity from momentum theory to converge an approximate induced axial velocity

      Arguments

      Keyword Arguments

      Returns

      source diff --git a/dev/DuctAPE/api/private_process/index.html b/dev/DuctAPE/api/private_process/index.html index 53df110a..86a348d5 100644 --- a/dev/DuctAPE/api/private_process/index.html +++ b/dev/DuctAPE/api/private_process/index.html @@ -12,7 +12,7 @@ options::Options; solve_container_caching=nothing, return_inputs=false, -)

      Identical to the single analyze function assuming setup_analysis has been called; except here we are running a single operating point for a multipoint analysis, and overwriting the operating point in the propulsor with the explicit operating point input.

      source

      Process

      DuctAPE.processFunction
      process(
      +)

      Identical to the single analyze function assuming setup_analysis has been called; except here we are running a single operating point for a multipoint analysis, and overwriting the operating point in the propulsor with the explicit operating point input.

      source

      Process

      DuctAPE.processFunction
      process(
           solver_options::SolverOptionsType,
           solve_parameter_cache_vector,
           solve_parameter_cache_dims,
      @@ -21,12 +21,12 @@
           solve_container_caching,
           idmaps,
           options,
      -)

      Process (the step between pre-process and post-process) the solution, in other words: call the solver(s).

      Arguments

      • solver_options::SolverOptionsType : the solver options contained in the options object, used for dispatch.
      • solve_parameter_cache_vector::Vector{Float} : The vector cache for parameters used in the solve.
      • solve_parameter_cache_dims::NamedTuple : A named tuple containing the dimensions of the solve parameters.
      • airfoils::NamedTuple : The airfoils to be interpolated that are associated with each blade element
      • A_bb_LU::LinearAlgebra.LU : The LU decomposition of the panel method LHS matrix
      • solve_container_caching::NamedTuple : A named tuple containing the cache and dimensions for the intermediate solve values.
      • idmaps::NamedTuple : The set of index maps used in various solve sub-functions
      • options::Options : User options

      Returns

      • converged_states::Vector{Float} : The output of a call to ImplicitAD.implicit
      source
      DuctAPE.solveFunction
      solve(sensitivity_parameters, const_cache; initial_guess=nothing)

      A compact dispatch of solve that automatically dispatches based on the solveroptions contained in constcache.

      source
      solve(
      +)

      Process (the step between pre-process and post-process) the solution, in other words: call the solver(s).

      Arguments

      • solver_options::SolverOptionsType : the solver options contained in the options object, used for dispatch.
      • solve_parameter_cache_vector::Vector{Float} : The vector cache for parameters used in the solve.
      • solve_parameter_cache_dims::NamedTuple : A named tuple containing the dimensions of the solve parameters.
      • airfoils::NamedTuple : The airfoils to be interpolated that are associated with each blade element
      • A_bb_LU::LinearAlgebra.LU : The LU decomposition of the panel method LHS matrix
      • solve_container_caching::NamedTuple : A named tuple containing the cache and dimensions for the intermediate solve values.
      • idmaps::NamedTuple : The set of index maps used in various solve sub-functions
      • options::Options : User options

      Returns

      • converged_states::Vector{Float} : The output of a call to ImplicitAD.implicit
      source
      DuctAPE.solveFunction
      solve(sensitivity_parameters, const_cache; initial_guess=nothing)

      A compact dispatch of solve that automatically dispatches based on the solveroptions contained in constcache.

      source
      solve(
           solver_options::SolverOptionsType,
           sensitivity_parameters,
           const_cache;
           initial_guess=nothing,
      -)

      Converge the residual, solving for the state variables that do so.

      Arguments

      • solver_options::SolverOptionsType : SolverOptionsType used for dispatch
      • sensitivity_parameters::Vector{Float} : Sensitivity parameters for solve (parameters passed in through ImplicitAD)
      • const_cache::NamedTuple : A named tuple containing constants and caching helpers.

      Keyword Arguments

      • initial_guess=nothing::Vector{Float} : An optional manually provided initial guess (contained in the sensitivity parameters anyway).

      Returns

      • converged_states::Vector{Float} : the states for which the residual has converged.
      source

      Residuals

      CSOR
      DuctAPE.CSOR_residual!Function
      CSOR_residual!(resid, state_variables, sensitivity_parameters, constants)

      The in-place residual used for the CSOR solve method.

      Arguments

      • resid::Vector{Float} : In-place residual.
      • state_variables::Vector{Float} : The state variables
      • sensitivity_parameters::Vector{Float} : The parameters to which the solution is sensitive.
      • constants::NamedTuple : Various constants required in the solve

      Returns

      • state_variables::Vector{Float} : The state variables (modified in place)
      source
      DuctAPE.compute_CSOR_residual!Function
      compute_CSOR_residual!(
      +)

      Converge the residual, solving for the state variables that do so.

      Arguments

      • solver_options::SolverOptionsType : SolverOptionsType used for dispatch
      • sensitivity_parameters::Vector{Float} : Sensitivity parameters for solve (parameters passed in through ImplicitAD)
      • const_cache::NamedTuple : A named tuple containing constants and caching helpers.

      Keyword Arguments

      • initial_guess=nothing::Vector{Float} : An optional manually provided initial guess (contained in the sensitivity parameters anyway).

      Returns

      • converged_states::Vector{Float} : the states for which the residual has converged.
      source

      Residuals

      CSOR
      DuctAPE.CSOR_residual!Function
      CSOR_residual!(resid, state_variables, sensitivity_parameters, constants)

      The in-place residual used for the CSOR solve method.

      Arguments

      • resid::Vector{Float} : In-place residual.
      • state_variables::Vector{Float} : The state variables
      • sensitivity_parameters::Vector{Float} : The parameters to which the solution is sensitive.
      • constants::NamedTuple : Various constants required in the solve

      Returns

      • state_variables::Vector{Float} : The state variables (modified in place)
      source
      DuctAPE.compute_CSOR_residual!Function
      compute_CSOR_residual!(
           resid,
           solver_options,
           solve_containers,
      @@ -41,7 +41,7 @@
           wakeK,
           idmaps;
           verbose=false,
      -)

      Description

      Arguments

      • resid::Vector{Float} : the residual vector
      • solver_options::SolverOptionsType : solver options (used for convergence criteria)
      • solve_containers::NamedTuple : cache for intermediate solve values
      • Gamr::type : Blade element circulation strengths
      • sigr::type : Rotor source panel strengths
      • gamw::type : Wake vortex panel strengths
      • operating_point::NamedTuple : Named tuple containing operating_point information
      • ivr::NamedTuple : unit induced velocities on rotor(s)
      • ivw::NamedTuple : unit induced velocities on wake
      • linsys::NamedTuple : vectors and matricies comprising the panel method linear system
      • blade_elements::NamedTuple : blade element geometry and airfoil polar information
      • wakeK::Vector{Float} : geometric constants used in caculating wake strengths
      • idmaps::NamedTuple : index maps used throughout solve

      Keyword Arguments

      • verbose::Bool=false : Flag to print verbose statements
      source
      compute_CSOR_residual!(
      +)

      Description

      Arguments

      • resid::Vector{Float} : the residual vector
      • solver_options::SolverOptionsType : solver options (used for convergence criteria)
      • solve_containers::NamedTuple : cache for intermediate solve values
      • Gamr::type : Blade element circulation strengths
      • sigr::type : Rotor source panel strengths
      • gamw::type : Wake vortex panel strengths
      • operating_point::NamedTuple : Named tuple containing operating_point information
      • ivr::NamedTuple : unit induced velocities on rotor(s)
      • ivw::NamedTuple : unit induced velocities on wake
      • linsys::NamedTuple : vectors and matricies comprising the panel method linear system
      • blade_elements::NamedTuple : blade element geometry and airfoil polar information
      • wakeK::Vector{Float} : geometric constants used in caculating wake strengths
      • idmaps::NamedTuple : index maps used throughout solve

      Keyword Arguments

      • verbose::Bool=false : Flag to print verbose statements
      source
      compute_CSOR_residual!(
           resid,
           solver_options,
           solve_containers,
      @@ -56,7 +56,7 @@
           wakeK,
           idmaps;
           verbose=false,
      -)

      Description

      Arguments

      • resid::Vector{Float} : the residual vector
      • solver_options::SolverOptionsType : solver options (used for convergence criteria)
      • solve_containers::NamedTuple : cache for intermediate solve values
      • Gamr::type : Blade element circulation strengths
      • sigr::type : Rotor source panel strengths
      • gamw::type : Wake vortex panel strengths
      • operating_point::NamedTuple : Named tuple containing operating_point information
      • ivr::NamedTuple : unit induced velocities on rotor(s)
      • ivw::NamedTuple : unit induced velocities on wake
      • linsys::NamedTuple : vectors and matricies comprising the panel method linear system
      • blade_elements::NamedTuple : blade element geometry and airfoil polar information
      • wakeK::Vector{Float} : geometric constants used in caculating wake strengths
      • idmaps::NamedTuple : index maps used throughout solve

      Keyword Arguments

      • verbose::Bool=false : Flag to print verbose statements
      source
      DuctAPE.relax_Gamr!Function
      relax_Gamr!(
      +)

      Description

      Arguments

      • resid::Vector{Float} : the residual vector
      • solver_options::SolverOptionsType : solver options (used for convergence criteria)
      • solve_containers::NamedTuple : cache for intermediate solve values
      • Gamr::type : Blade element circulation strengths
      • sigr::type : Rotor source panel strengths
      • gamw::type : Wake vortex panel strengths
      • operating_point::NamedTuple : Named tuple containing operating_point information
      • ivr::NamedTuple : unit induced velocities on rotor(s)
      • ivw::NamedTuple : unit induced velocities on wake
      • linsys::NamedTuple : vectors and matricies comprising the panel method linear system
      • blade_elements::NamedTuple : blade element geometry and airfoil polar information
      • wakeK::Vector{Float} : geometric constants used in caculating wake strengths
      • idmaps::NamedTuple : index maps used throughout solve

      Keyword Arguments

      • verbose::Bool=false : Flag to print verbose statements
      source
      DuctAPE.relax_Gamr!Function
      relax_Gamr!(
           Gamr,
           delta_prev_mat,
           delta_mat,
      @@ -69,7 +69,7 @@
           pf1=0.4,
           pf2=0.5,
           test=false,
      -)

      Apply relaxed step to Gamr.

      Arguments

      • Gamr::Array{Float} : Array of rotor circulations (columns = rotors, rows = blade elements), updated in place
      • delta_prev_mat::Array{Float} : Array of previous iteration's differences in circulation values, updated in place
      • delta_mat::Array{Float} : Array of current iteration's differences in circulation values
      • B::Vector{Float} : number of blades on each rotor
      • nrf::Float=0.4 : nominal relaxation factor
      • bt1::Float=0.2 : backtrack factor 1
      • bt2::Float=0.6 : backtrack factor 2
      • pf1::Float=0.4 : press forward factor 1
      • pf2::Float=0.5 : press forward factor 2
      source
      relax_Gamr!(
      +)

      Apply relaxed step to Gamr.

      Arguments

      • Gamr::Array{Float} : Array of rotor circulations (columns = rotors, rows = blade elements), updated in place
      • delta_prev_mat::Array{Float} : Array of previous iteration's differences in circulation values, updated in place
      • delta_mat::Array{Float} : Array of current iteration's differences in circulation values
      • B::Vector{Float} : number of blades on each rotor
      • nrf::Float=0.4 : nominal relaxation factor
      • bt1::Float=0.2 : backtrack factor 1
      • bt2::Float=0.6 : backtrack factor 2
      • pf1::Float=0.4 : press forward factor 1
      • pf2::Float=0.5 : press forward factor 2
      source
      relax_Gamr!(
           Gamr,
           delta_prev_mat,
           delta_mat,
      @@ -81,17 +81,17 @@
           pf1=0.4,
           pf2=0.5,
           test=false,
      -)

      Apply relaxed step to Gamr.

      Arguments

      • Gamr::Array{Float} : Array of rotor circulations (columns = rotors, rows = blade elements), updated in place
      • delta_prev_mat::Array{Float} : Array of previous iteration's differences in circulation values, updated in place
      • delta_mat::Array{Float} : Array of current iteration's differences in circulation values
      • B::Vector{Float} : number of blades on each rotor
      • nrf::Float=0.4 : nominal relaxation factor
      • bt1::Float=0.2 : backtrack factor 1
      • bt2::Float=0.6 : backtrack factor 2
      • pf1::Float=0.4 : press forward factor 1
      • pf2::Float=0.5 : press forward factor 2
      source
      DuctAPE.relax_gamw!Function
      relax_gamw!(
      +)

      Apply relaxed step to Gamr.

      Arguments

      • Gamr::Array{Float} : Array of rotor circulations (columns = rotors, rows = blade elements), updated in place
      • delta_prev_mat::Array{Float} : Array of previous iteration's differences in circulation values, updated in place
      • delta_mat::Array{Float} : Array of current iteration's differences in circulation values
      • B::Vector{Float} : number of blades on each rotor
      • nrf::Float=0.4 : nominal relaxation factor
      • bt1::Float=0.2 : backtrack factor 1
      • bt2::Float=0.6 : backtrack factor 2
      • pf1::Float=0.4 : press forward factor 1
      • pf2::Float=0.5 : press forward factor 2
      source
      DuctAPE.relax_gamw!Function
      relax_gamw!(
           gamw, delta_prev, delta, maxdeltagamw; nrf=0.4, btw=0.6, pfw=1.2, test=false
      -)

      Apply relaxed step to gamw.

      Arguments

      • gamw::Array{Float} : Array of rotor circulations (columns = rotors, rows = blade elements), updated in place
      • delta_prev_mat::Array{Float} : Array of previous iteration's differences in circulation values, updated in place
      • delta_mat::Array{Float} : Array of current iteration's differences in circulation values
      • B::Vector{Float} : number of blades on each rotor
      • nrf::Float=0.4 : nominal relaxation factor
      • bt1::Float=0.2 : backtrack factor 1
      • bt2::Float=0.6 : backtrack factor 2
      • pf1::Float=0.4 : press forward factor 1
      • pf2::Float=0.5 : press forward factor 2
      source
      relax_gamw!(
      +)

      Apply relaxed step to gamw.

      Arguments

      • gamw::Array{Float} : Array of rotor circulations (columns = rotors, rows = blade elements), updated in place
      • delta_prev_mat::Array{Float} : Array of previous iteration's differences in circulation values, updated in place
      • delta_mat::Array{Float} : Array of current iteration's differences in circulation values
      • B::Vector{Float} : number of blades on each rotor
      • nrf::Float=0.4 : nominal relaxation factor
      • bt1::Float=0.2 : backtrack factor 1
      • bt2::Float=0.6 : backtrack factor 2
      • pf1::Float=0.4 : press forward factor 1
      • pf2::Float=0.5 : press forward factor 2
      source
      relax_gamw!(
           gamw, delta_prev, delta; nrf=0.4, btw=0.6, pfw=1.2, test=false
      -)

      Apply relaxed step to gamw.

      Arguments

      • gamw::Array{Float} : Array of rotor circulations (columns = rotors, rows = blade elements), updated in place
      • delta_prev_mat::Array{Float} : Array of previous iteration's differences in circulation values, updated in place
      • delta_mat::Array{Float} : Array of current iteration's differences in circulation values
      • B::Vector{Float} : number of blades on each rotor
      • nrf::Float=0.4 : nominal relaxation factor
      • bt1::Float=0.2 : backtrack factor 1
      • bt2::Float=0.6 : backtrack factor 2
      • pf1::Float=0.4 : press forward factor 1
      • pf2::Float=0.5 : press forward factor 2
      source
      DuctAPE.apply_relaxation_scheduleFunction
      apply_relaxation_schedule(
      +)

      Apply relaxed step to gamw.

      Arguments

      • gamw::Array{Float} : Array of rotor circulations (columns = rotors, rows = blade elements), updated in place
      • delta_prev_mat::Array{Float} : Array of previous iteration's differences in circulation values, updated in place
      • delta_mat::Array{Float} : Array of current iteration's differences in circulation values
      • B::Vector{Float} : number of blades on each rotor
      • nrf::Float=0.4 : nominal relaxation factor
      • bt1::Float=0.2 : backtrack factor 1
      • bt2::Float=0.6 : backtrack factor 2
      • pf1::Float=0.4 : press forward factor 1
      • pf2::Float=0.5 : press forward factor 2
      source
      DuctAPE.apply_relaxation_scheduleFunction
      apply_relaxation_schedule(
           resid::AbstractVector, solver_options::TS
      -) where {TS<:SolverOptionsType}

      Apply custom relaxation schedule to all relaxation factor inputs based on residual values.

      Arguments

      • resid::AbstractVector{Float} : current residual values
      • solver_options::SolverOptionsType : SolverOptions containing relaxation schedule

      Returns

      • nrf::Float : nominal relaxation factor
      • bt1::Float : backtrack factor 1
      • bt2::Float : backtrack factor 2
      • pf1::Float : press forward factor 1
      • pf2::Float : press forward factor 2
      source
      apply_relaxation_schedule(resid, nominal, schedule)

      Apply custom relaxation schedule to a single relaxation factor input.

      Arguments

      • resid::Float : residual value
      • nominal::Float : nominal relaxation value
      • schedule::AbstractVector{AbstractVector{Float}} : values between which to interpolate to scale the nominal relaxation value.

      Returns

      • rf::Float : the updated relaxation factor
      source
      DuctAPE.update_CSOR_residual_values!Function
      update_CSOR_residual_values!(
      +) where {TS<:SolverOptionsType}

      Apply custom relaxation schedule to all relaxation factor inputs based on residual values.

      Arguments

      • resid::AbstractVector{Float} : current residual values
      • solver_options::SolverOptionsType : SolverOptions containing relaxation schedule

      Returns

      • nrf::Float : nominal relaxation factor
      • bt1::Float : backtrack factor 1
      • bt2::Float : backtrack factor 2
      • pf1::Float : press forward factor 1
      • pf2::Float : press forward factor 2
      source
      apply_relaxation_schedule(resid, nominal, schedule)

      Apply custom relaxation schedule to a single relaxation factor input.

      Arguments

      • resid::Float : residual value
      • nominal::Float : nominal relaxation value
      • schedule::AbstractVector{AbstractVector{Float}} : values between which to interpolate to scale the nominal relaxation value.

      Returns

      • rf::Float : the updated relaxation factor
      source
      DuctAPE.update_CSOR_residual_values!Function
      update_CSOR_residual_values!(
           convergence_type::ConvergenceType, resid, maxBGamr, maxdeltaBGamr, maxdeltagamw, Vconv
      -)

      Update CSOR residual values in place.

      Arguments

      • convergence_type::ConvergenceType : used for dispatch of relative or absolute residual values.
      • resid::Vector{Float} : residual values modified in place
      • maxBGamr::Float : Maximum value of B*Gamr among all blade elements
      • maxdeltaBGamr::Float : Maximum change in B*Gamr between iterations among all blade elements
      • maxdeltagamw::Vector{Float} : Maximum change in gamw among all wake nodes (one element)
      • Vconv::Float : Reference velocity upon which the relative convergence criteria is based (one element)
      source
      DuctAPE.check_CSOR_convergence!Function
      check_CSOR_convergence!(
      +)

      Update CSOR residual values in place.

      Arguments

      • convergence_type::ConvergenceType : used for dispatch of relative or absolute residual values.
      • resid::Vector{Float} : residual values modified in place
      • maxBGamr::Float : Maximum value of B*Gamr among all blade elements
      • maxdeltaBGamr::Float : Maximum change in B*Gamr between iterations among all blade elements
      • maxdeltagamw::Vector{Float} : Maximum change in gamw among all wake nodes (one element)
      • Vconv::Float : Reference velocity upon which the relative convergence criteria is based (one element)
      source
      DuctAPE.check_CSOR_convergence!Function
      check_CSOR_convergence!(
           conv, resid; f_circ=1e-3, f_dgamw=2e-4, convergence_type=Relative(), verbose=false
      -)

      Description

      Arguments

      • conv::Vector{Float} : container holding convergence flag
      • resid::Vector{Float} : residual vector

      Keyword Arguments

      • f_circ::Float=1e-3 : convergence criteria for circulation residual
      • f_dgamw::Float=2e-4 : convergence criteria for wake strength residual
      • convergence_type::ConvergenceType=Relative() : convergence type (absolute or relative) for print statements
      • verbose::Bool=false : flag for verbose print statements
      source
      External Solvers
      DuctAPE.system_residualFunction
      system_residual(state_variables, sensitivity_parameters, constants)

      The residual function for external solvers.

      Arguments

      • state_variables::Vector{Float} : the state variables
      • sensitivity_parameters::Vector{Float} : parameters to which the solution derivatives are sensitive
      • constants::NamedTuple : parameters to which the solution derivatives are constant

      Returs

      • resid::Vector{Float} : residual vector
      source
      DuctAPE.system_residual!Function
      system_residual!(resid, state_variables, sensitivity_parameters, constants)

      In-place version of system_residual.

      source
      DuctAPE.update_system_residual!Function
      update_system_residual!(
      +)

      Description

      Arguments

      • conv::Vector{Float} : container holding convergence flag
      • resid::Vector{Float} : residual vector

      Keyword Arguments

      • f_circ::Float=1e-3 : convergence criteria for circulation residual
      • f_dgamw::Float=2e-4 : convergence criteria for wake strength residual
      • convergence_type::ConvergenceType=Relative() : convergence type (absolute or relative) for print statements
      • verbose::Bool=false : flag for verbose print statements
      source
      External Solvers
      DuctAPE.system_residualFunction
      system_residual(state_variables, sensitivity_parameters, constants)

      The residual function for external solvers.

      Arguments

      • state_variables::Vector{Float} : the state variables
      • sensitivity_parameters::Vector{Float} : parameters to which the solution derivatives are sensitive
      • constants::NamedTuple : parameters to which the solution derivatives are constant

      Returs

      • resid::Vector{Float} : residual vector
      source
      DuctAPE.system_residual!Function
      system_residual!(resid, state_variables, sensitivity_parameters, constants)

      In-place version of system_residual.

      source
      DuctAPE.update_system_residual!Function
      update_system_residual!(
           solver_options::SolverOptionsType
           resid,
           vz_est,
      @@ -101,7 +101,7 @@
           Cm_est,
           Cm_wake,
           solve_parameter_cache_dims,
      -)

      Update the residual for external solvers.

      Arguments

      • `solver_options::SolverOptionsType
      • resid::Vector{Float} : residual vector
      • vz_est::Vector{Float} : axial induced rotor velocity estimate container
      • vz_rotor::Vector{Float} : axial induced rotor velocity state container
      • vtheta_est::Vector{Float} : tangential induced rotor velocity estimate container
      • vtheta_rotor::Vector{Float} : tangential induced rotor velocity state container
      • Cm_est::Vector{Float} : absolute meridional wake control point velocity estimate container
      • Cm_wake::Vector{Float} : absolute meridional wake control point velocity state container
      • solve_parameter_cache_dims::Vector{Float} : dimensions of state vectors to use in accessing the residual vector
      source
      DuctAPE.estimate_states!Function
      estimate_states!(
      +)

      Update the residual for external solvers.

      Arguments

      • `solver_options::SolverOptionsType
      • resid::Vector{Float} : residual vector
      • vz_est::Vector{Float} : axial induced rotor velocity estimate container
      • vz_rotor::Vector{Float} : axial induced rotor velocity state container
      • vtheta_est::Vector{Float} : tangential induced rotor velocity estimate container
      • vtheta_rotor::Vector{Float} : tangential induced rotor velocity state container
      • Cm_est::Vector{Float} : absolute meridional wake control point velocity estimate container
      • Cm_wake::Vector{Float} : absolute meridional wake control point velocity state container
      • solve_parameter_cache_dims::Vector{Float} : dimensions of state vectors to use in accessing the residual vector
      source
      DuctAPE.estimate_states!Function
      estimate_states!(
           solve_containers,
           vz_rotor,
           vtheta_rotor,
      @@ -114,6 +114,6 @@
           wakeK,
           idmaps;
           verbose=false,
      -)

      Estimate velocity states.

      Arguments

      • solve_containers::NamedTuple : cache for intermediate values in solve
      • vz_rotor::Vector{Float} : axial induced rotor velocity state container
      • vtheta_rotor::Vector{Float} : tangential induced rotor velocity state container
      • Cm_wake::Vector{Float} : absolute meridional wake control point velocity state container
      • operating_point::NamedTuple : Named tuple containing operating_point information
      • ivr::NamedTuple : unit induced velocities on rotor(s)
      • ivw::NamedTuple : unit induced velocities on wake
      • linsys::NamedTuple : vectors and matricies comprising the panel method linear system
      • blade_elements::NamedTuple : blade element geometry and airfoil polar information
      • wakeK::Vector{Float} : geometric constants used in caculating wake strengths
      • idmaps::NamedTuple : index maps used throughout solve

      Keyword Arguments

      • verbose::Bool=false : flag for verbose print statements
      source

      Solve Utilities

      DuctAPE.extract_initial_guessFunction
      extract_initial_guess(
      +)

      Estimate velocity states.

      Arguments

      • solve_containers::NamedTuple : cache for intermediate values in solve
      • vz_rotor::Vector{Float} : axial induced rotor velocity state container
      • vtheta_rotor::Vector{Float} : tangential induced rotor velocity state container
      • Cm_wake::Vector{Float} : absolute meridional wake control point velocity state container
      • operating_point::NamedTuple : Named tuple containing operating_point information
      • ivr::NamedTuple : unit induced velocities on rotor(s)
      • ivw::NamedTuple : unit induced velocities on wake
      • linsys::NamedTuple : vectors and matricies comprising the panel method linear system
      • blade_elements::NamedTuple : blade element geometry and airfoil polar information
      • wakeK::Vector{Float} : geometric constants used in caculating wake strengths
      • idmaps::NamedTuple : index maps used throughout solve

      Keyword Arguments

      • verbose::Bool=false : flag for verbose print statements
      source

      Solve Utilities

      DuctAPE.extract_initial_guessFunction
      extract_initial_guess(
           solver_options::SolverOptionsType, sensitivity_parameters, state_dims
      -)

      Extract initial guess from the solve parameters cache vector.

      Arguments

      • solver_options::SolverOptionsType : used for dispatch
      • sensitivity_parameters::Vector{Float} : vector form of solve parameter cache passed into the solver.
      • state_dims::NamedTuple : dimensions and indices of state variables within the solve parameter cache vector

      Returns

      • initial_guess::Vector{Float}` : a vector of the solver initial guess
      source
      DuctAPE.extract_state_variablesFunction
      extract_state_variables(solver_options::SolverOptionsType, vars, dims)

      Reshape the state variables from a single vector, to multiple arrays.

      Arguments

      Returns if solver_options <: CSORSolverOptions

      • Gamr::type : Blade element circulation strengths
      • sigr::type : Rotor source panel strengths
      • gamw::type : Wake vortex panel strengths

      Returns if solver_options <: Union{ExternalSolverOptions, PolyAlgorithmOptions}

      • vz_rotor::Vector{Float} : axial induced rotor velocity state container
      • vtheta_rotor::Vector{Float} : tangential induced rotor velocity state container
      • Cm_wake::Vector{Float} : absolute meridional wake control point velocity state container
      source
      +)

      Extract initial guess from the solve parameters cache vector.

      Arguments

      Returns

      source
      DuctAPE.extract_state_variablesFunction
      extract_state_variables(solver_options::SolverOptionsType, vars, dims)

      Reshape the state variables from a single vector, to multiple arrays.

      Arguments

      Returns if solver_options <: CSORSolverOptions

      • Gamr::type : Blade element circulation strengths
      • sigr::type : Rotor source panel strengths
      • gamw::type : Wake vortex panel strengths

      Returns if solver_options <: Union{ExternalSolverOptions, PolyAlgorithmOptions}

      • vz_rotor::Vector{Float} : axial induced rotor velocity state container
      • vtheta_rotor::Vector{Float} : tangential induced rotor velocity state container
      • Cm_wake::Vector{Float} : absolute meridional wake control point velocity state container
      source
      diff --git a/dev/DuctAPE/api/private_utilities/index.html b/dev/DuctAPE/api/private_utilities/index.html index e60e2791..7a74ab36 100644 --- a/dev/DuctAPE/api/private_utilities/index.html +++ b/dev/DuctAPE/api/private_utilities/index.html @@ -1,3 +1,3 @@ -Utilities · DuctAPE.jl

      Utility Functions

      DuctAPE.promote_propulsor_typeFunction
      promote_propulsor_type(propulsor)

      Convenience function for promoting types based on any potential elements of the propulsor object dependent on optimization design variables.

      Arguments

      • propulsor::Propulsor : the propulsor input

      Returns

      • TP::Type : the promoted type
      source
      DuctAPE.update_operating_point!Function
      update_operating_point!(op_old, op_new)

      Overwrites all the values of an OperatingPoint object with another OperatingPoint object's values (or NamedTuple with the same field names).

      Arguments

      • op_old::OperatingPoint : the OperatingPoint to be overwritten (can also be a NamedTuple with the same field names as an OperatingPoint).
      • op_new::OperatingPoint : the OperatingPoint values to be used (can also be a NamedTuple with the same field names as an OperatingPoint).
      source
      DuctAPE.isscalarFunction
      isscalar(x::T) where {T} = isscalar(T)
      -isscalar(::Type{T}) where {T} = BroadcastStyle(T) isa Broadcast.DefaultArrayStyle{0}

      Determines if the input is a scalar. Note that Base.BroadcastStyle is imported.

      source
      DuctAPE.dotFunction
      dot(A, B) = sum(a * b for (a, b) in zip(A, B))

      A faster dot product.

      source
      DuctAPE.linear_transformFunction
      linear_transform(range1, range2, values)

      Linear transfrom of values from range (source_range[1], source_range[end]) to (target_range[1], target_range[end])

      Arguments

      • source_range::Vector{Float} : range values come from (can also be a Tuple)
      • target_range::Vector{Float} : range onto which we are transforming (can also be a Tuple)
      • source_values::Array{Float} : array of source values to transform

      Returns

      • target_values::Array{Float} : array of transformed sourcevalues onto target range
      source
      DuctAPE.lfsFunction
      lfs(shape)

      Determines length from shape (output of size function).

      source
      DuctAPE.reset_containers!Function
      reset_containers!(containers; exception_keys=[])

      Resets all fields (not incluing any contained in exception keys) of containers–-which must be arrays, structs of arrays, or tuples of arrays–-to zeros.

      source
      DuctAPE.cache_dims!Function
      cache_dims!(total_length, l, s)

      A function that returns a named tuple containing an index range and shape and increases total_length by l.

      This function is used heavily in the cache allocation functions for setting up the dimension maps used to access the vectorized caches.

      Arguments

      • total_length::Vector{Int} : single element vector containing the current total length of the eventual cache vector. Modified in place.
      • l::Int : total length of the object in question
      • s::Int : size of the object in question

      Returns

      • dims::NamedTuple : A named tuple containing index and shape fields
      source
      DuctAPE.write_dataFunction
      write_data(outs, filename; checkoutfileexists=false)

      Writes NamedTuples, specifically for writing out the output of the post_procces() function.

      Arguments:

      • outs::NamedTuple : Named tuple to write to file.
      • filename::String : file name (including full desired path and file type) for file to write

      Keyword Arguments:

      • output_tuple_name::String : desired variable name of written NamedTuple
      • checkoutfileexists::Bool=false : boolean for whether to check if the outfile already exists and whether or not to overwrite it.
      source
      +Utilities · DuctAPE.jl

      Utility Functions

      DuctAPE.promote_propulsor_typeFunction
      promote_propulsor_type(propulsor)

      Convenience function for promoting types based on any potential elements of the propulsor object dependent on optimization design variables.

      Arguments

      • propulsor::Propulsor : the propulsor input

      Returns

      • TP::Type : the promoted type
      source
      DuctAPE.update_operating_point!Function
      update_operating_point!(op_old, op_new)

      Overwrites all the values of an OperatingPoint object with another OperatingPoint object's values (or NamedTuple with the same field names).

      Arguments

      • op_old::OperatingPoint : the OperatingPoint to be overwritten (can also be a NamedTuple with the same field names as an OperatingPoint).
      • op_new::OperatingPoint : the OperatingPoint values to be used (can also be a NamedTuple with the same field names as an OperatingPoint).
      source
      DuctAPE.isscalarFunction
      isscalar(x::T) where {T} = isscalar(T)
      +isscalar(::Type{T}) where {T} = BroadcastStyle(T) isa Broadcast.DefaultArrayStyle{0}

      Determines if the input is a scalar. Note that Base.BroadcastStyle is imported.

      source
      DuctAPE.dotFunction
      dot(A, B) = sum(a * b for (a, b) in zip(A, B))

      A faster dot product.

      source
      DuctAPE.linear_transformFunction
      linear_transform(range1, range2, values)

      Linear transfrom of values from range (source_range[1], source_range[end]) to (target_range[1], target_range[end])

      Arguments

      • source_range::Vector{Float} : range values come from (can also be a Tuple)
      • target_range::Vector{Float} : range onto which we are transforming (can also be a Tuple)
      • source_values::Array{Float} : array of source values to transform

      Returns

      • target_values::Array{Float} : array of transformed sourcevalues onto target range
      source
      DuctAPE.lfsFunction
      lfs(shape)

      Determines length from shape (output of size function).

      source
      DuctAPE.reset_containers!Function
      reset_containers!(containers; exception_keys=[])

      Resets all fields (not incluing any contained in exception keys) of containers–-which must be arrays, structs of arrays, or tuples of arrays–-to zeros.

      source
      DuctAPE.cache_dims!Function
      cache_dims!(total_length, l, s)

      A function that returns a named tuple containing an index range and shape and increases total_length by l.

      This function is used heavily in the cache allocation functions for setting up the dimension maps used to access the vectorized caches.

      Arguments

      • total_length::Vector{Int} : single element vector containing the current total length of the eventual cache vector. Modified in place.
      • l::Int : total length of the object in question
      • s::Int : size of the object in question

      Returns

      • dims::NamedTuple : A named tuple containing index and shape fields
      source
      DuctAPE.write_dataFunction
      write_data(outs, filename; checkoutfileexists=false)

      Writes NamedTuples, specifically for writing out the output of the post_procces() function.

      Arguments:

      • outs::NamedTuple : Named tuple to write to file.
      • filename::String : file name (including full desired path and file type) for file to write

      Keyword Arguments:

      • output_tuple_name::String : desired variable name of written NamedTuple
      • checkoutfileexists::Bool=false : boolean for whether to check if the outfile already exists and whether or not to overwrite it.
      source
      diff --git a/dev/DuctAPE/api/public_api/index.html b/dev/DuctAPE/api/public_api/index.html index 20b54d20..b4a02e54 100644 --- a/dev/DuctAPE/api/public_api/index.html +++ b/dev/DuctAPE/api/public_api/index.html @@ -1,15 +1,15 @@ -Public API Reference · DuctAPE.jl

      Public API

      Input Types

      DuctAPE.PropulsorType
      Propulsor(duct_coordinates, centerbody_coordinates, rotorstator_parameters, operating_point, paneling_constants, reference_parameters)

      Arguments

      • duct_coordinates::AbstractMatrix : The [z, r] coordinates of the duct geometry beginning at the inner (casing) side trailing edge and proceeding clockwise. Note that the duct geometry absolute radial position does not need to be included here if the autoshiftduct option is selected.
      • centerbody_coordinates::AbstractMatrix : The [z, r] coordinates of the centerbody beginning at the leading edge and ending at the trailing edge. Note that the leading edge is assumed to be placed at a radial distance of 0.0 from the axis of rotation.
      • operating_point::OperatingPoint : The operating point values.
      • paneling_constants::PanelingConstants : Constants used in re-paneling the geometry.
      • rotorstator_parameters::RotorStatorParameters : Rotor (and possibly stator) geometric paramters.
      • reference_parameters::ReferenceParameters : Reference Parameters.
      source
      DuctAPE.RotorStatorParametersType
      RotorStatorParameters(
      +Public API Reference · DuctAPE.jl

      Public API

      Input Types

      DuctAPE.PropulsorType
      Propulsor(duct_coordinates, centerbody_coordinates, rotorstator_parameters, operating_point, paneling_constants, reference_parameters)

      Arguments

      • duct_coordinates::AbstractMatrix : The [z, r] coordinates of the duct geometry beginning at the inner (casing) side trailing edge and proceeding clockwise. Note that the duct geometry absolute radial position does not need to be included here if the autoshiftduct option is selected.
      • centerbody_coordinates::AbstractMatrix : The [z, r] coordinates of the centerbody beginning at the leading edge and ending at the trailing edge. Note that the leading edge is assumed to be placed at a radial distance of 0.0 from the axis of rotation.
      • operating_point::OperatingPoint : The operating point values.
      • paneling_constants::PanelingConstants : Constants used in re-paneling the geometry.
      • rotorstator_parameters::RotorStatorParameters : Rotor (and possibly stator) geometric paramters.
      • reference_parameters::ReferenceParameters : Reference Parameters.
      source
      DuctAPE.RotorStatorParametersType
      RotorStatorParameters(
           B, rotorzloc, r, Rhub, Rtip, chords, twists, tip_gap, airfoils, fliplift
      -)

      Composite type containing the rotor(s) geometric properties.

      Note that the actual struct requires the inputs to be arrays, but there is a constructor function that will take in scalars and automatically build the array-based struct.

      Arguments

      • B::AbstractVector{Float} : The number of blades for each rotor. May not be an integer, but usually is.
      • rotorzloc::AbstractVector{Float} : Dimensional, axial position of each rotor.
      • r::AbstractArray{Float} : Non-dimensional radial locations of each blade element.
      • Rhub::AbstractVector{Float} : Dimensional hub radius of rotor. (may be changed if it does not match the radial position of the centerbody geometry at the selected rotorzloc.
      • Rtip::AbstractVector{Float} : Dimensional tip radius of rotor. Is used to determine the radial position of the duct if the autoshiftduct option is selected.
      • chords::AbstractArray{Float} : Dimensional chord lengths of the blade elements.
      • twists::AbstractArray{Float} : Blade element angles, in radians.
      • tip_gap::AbstractVector{Float} : Currently unused, do not set to anything other than zeros.
      • airfoils::AbstractArray{AFType} : Airfoil types describing the airfoil polars for each blade element. Currently only fully tested with C4Blade.DFDCairfoil types.
      • fliplift::AbstractVector{Bool} : flag to indicate if the airfoil lift values should be flipped or not.
      source
      DuctAPE.OperatingPointType
      OperatingPoint(Vinf, rhoinf, muinf, asound, Omega)

      Propulsor operating point information.

      Note that the actual struct requires the inputs to be arrays, but there is a constructor function that will take in scalars and automatically build the array-based struct.

      Also note that even though each field is required to be a vector, only Omega should have more than one entry, and only then if there are more than one rotor. The purpose behind having vector rather than constant scalar inputs here is for ease of redefinition in an optimization setting when freestream design variables may be present.

      Arguments

      • Vinf::AbstractVector{Float} : Freestream velocity magnitude (which is only in the axial direction).
      • rhoinf::AbstractVector{Float} : Freestream density
      • muinf::AbstractVector{Float} : Freestream viscosity
      • asound::AbstractVector{Float} : Freestream speed of sound
      • Omega::AbstractVector{Float} : Rotor rototation rate(s)
      source
      DuctAPE.PanelingConstantsType
      PanelingConstants(
      +)

      Composite type containing the rotor(s) geometric properties.

      Note that the actual struct requires the inputs to be arrays, but there is a constructor function that will take in scalars and automatically build the array-based struct.

      Arguments

      • B::AbstractVector{Float} : The number of blades for each rotor. May not be an integer, but usually is.
      • rotorzloc::AbstractVector{Float} : Dimensional, axial position of each rotor.
      • r::AbstractArray{Float} : Non-dimensional radial locations of each blade element.
      • Rhub::AbstractVector{Float} : Dimensional hub radius of rotor. (may be changed if it does not match the radial position of the centerbody geometry at the selected rotorzloc.
      • Rtip::AbstractVector{Float} : Dimensional tip radius of rotor. Is used to determine the radial position of the duct if the autoshiftduct option is selected.
      • chords::AbstractArray{Float} : Dimensional chord lengths of the blade elements.
      • twists::AbstractArray{Float} : Blade element angles, in radians.
      • tip_gap::AbstractVector{Float} : Currently unused, do not set to anything other than zeros.
      • airfoils::AbstractArray{AFType} : Airfoil types describing the airfoil polars for each blade element. Currently only fully tested with C4Blade.DFDCairfoil types.
      • fliplift::AbstractVector{Bool} : flag to indicate if the airfoil lift values should be flipped or not.
      source
      DuctAPE.OperatingPointType
      OperatingPoint(Vinf, rhoinf, muinf, asound, Omega)

      Propulsor operating point information.

      Note that the actual struct requires the inputs to be arrays, but there is a constructor function that will take in scalars and automatically build the array-based struct.

      Also note that even though each field is required to be a vector, only Omega should have more than one entry, and only then if there are more than one rotor. The purpose behind having vector rather than constant scalar inputs here is for ease of redefinition in an optimization setting when freestream design variables may be present.

      Arguments

      • Vinf::AbstractVector{Float} : Freestream velocity magnitude (which is only in the axial direction).
      • rhoinf::AbstractVector{Float} : Freestream density
      • muinf::AbstractVector{Float} : Freestream viscosity
      • asound::AbstractVector{Float} : Freestream speed of sound
      • Omega::AbstractVector{Float} : Rotor rototation rate(s)
      source
      DuctAPE.PanelingConstantsType
      PanelingConstants(
           nduct_inlet,
           ncenterbody_inlet,
           npanels,
           dte_minus_cbte,
           nwake_sheets,
           wake_length=1.0,
      -)

      Constants used in re-paneling geometry.

      Note that unlike other input structures, this one, in general, does not define fields as vectors. This is because these values should not change throughout an optimization, even if the geometry may change. Otherwise, discontinuities could be experienced.

      Arguments

      • nduct_inlet::Int : The number of panels to use for the duct inlet (this number is used for both the casing and nacelle re-paneling)
      • ncenterbody_inlet::Int : The number of panels to use for the centerbody inlet.
      • npanels::AbstractVector{Int} : A vector containing the number of panels between discrete locations inside the wake. Specifically, the number of panels between the rotors, between the last rotor and the first body trailing edge, between the body trailing edges (if different), and between the last body trailing edge and the end of the wake. The length of this vector should be N+1 (where N is the number of rotors) if the duct and centerbody trailing edges are aligned, and N+2 if not.
      • dte_minus_cbte::Float : An indicator concerning the hub and duct trailing edge relative locations. Should be set to -1 if the duct trailing edge axial position minus the centerbody trailing edge axial position is negative, +1 if positive (though any positive or negative number will suffice), and zero if the trailing edges are aligned.
      • nwake_sheets::Int : The number of wake sheets to use. Note this will also be setting the number of blade elements to use.
      • wake_length::Float=1.0 : Non-dimensional (based on the length from the foremost body leading edge and the aftmost body trailing edge) length of the wake extending behind the aftmost body trailing edge.
      source
      DuctAPE.ReferenceParametersType
      ReferenceParameters(Vref, Rref)

      Reference parameters for post-process non-dimensionalization.

      Note that the actual struct requires the inputs to be arrays, but there is a constructor function that will take in scalars and automatically build the array-based struct.

      Arguments

      • Vref::AbstractVector{Float} : Reference velocity.
      • Rref::AbstractVector{Float} : Reference rotor tip radius.
      source

      Preallocations

      DuctAPE.allocate_prepost_container_cacheFunction
      allocate_prepost_container_cache(paneling_constants::PanelingConstants)
      -allocate_prepost_container_cache(problem_dimensions::ProblemDimensions)

      Allocate the pre- and post-processing cache (used for intermediate calculations) based on paneling constants or problem dimensions.

      Arguments

      • paneling_constants::PanelingConstants : a PanelingConstants object

      OR

      • problem_dimensions::ProblemDimensions : a ProblemDimensions object

      Keyword Arguments

      • fd_chunk_size::Int=12 : chunk size to use for PreallocationTools caches. Note that the automated chuck size for DuctAPE will always be the ForwardDiff threshold of 12 due to the size of the system, so it will be best to leave this at the default unless further development allows for chunk size selection for individual solvers.
      • levels::Int=1 : levels for nested duals. Note that since ImplicitAD is being used for all solves, there should be no need for more than 1 level.

      Returns

      • prepost_container_caching::NamedTuple : a Named Tuple containing:
        • prepost_container_cache::PreallocationTools.DiffCache : the cache
        • prepost_container_cache_dims::NamedTuple : a named tuple containing the dimensions used for reshaping the cache when needed.
      source
      DuctAPE.allocate_solve_parameter_cacheFunction
      allocate_solve_parameter_cache(
      +)

      Constants used in re-paneling geometry.

      Note that unlike other input structures, this one, in general, does not define fields as vectors. This is because these values should not change throughout an optimization, even if the geometry may change. Otherwise, discontinuities could be experienced.

      Arguments

      • nduct_inlet::Int : The number of panels to use for the duct inlet (this number is used for both the casing and nacelle re-paneling)
      • ncenterbody_inlet::Int : The number of panels to use for the centerbody inlet.
      • npanels::AbstractVector{Int} : A vector containing the number of panels between discrete locations inside the wake. Specifically, the number of panels between the rotors, between the last rotor and the first body trailing edge, between the body trailing edges (if different), and between the last body trailing edge and the end of the wake. The length of this vector should be N+1 (where N is the number of rotors) if the duct and centerbody trailing edges are aligned, and N+2 if not.
      • dte_minus_cbte::Float : An indicator concerning the hub and duct trailing edge relative locations. Should be set to -1 if the duct trailing edge axial position minus the centerbody trailing edge axial position is negative, +1 if positive (though any positive or negative number will suffice), and zero if the trailing edges are aligned.
      • nwake_sheets::Int : The number of wake sheets to use. Note this will also be setting the number of blade elements to use.
      • wake_length::Float=1.0 : Non-dimensional (based on the length from the foremost body leading edge and the aftmost body trailing edge) length of the wake extending behind the aftmost body trailing edge.
      source
      DuctAPE.ReferenceParametersType
      ReferenceParameters(Vref, Rref)

      Reference parameters for post-process non-dimensionalization.

      Note that the actual struct requires the inputs to be arrays, but there is a constructor function that will take in scalars and automatically build the array-based struct.

      Arguments

      • Vref::AbstractVector{Float} : Reference velocity.
      • Rref::AbstractVector{Float} : Reference rotor tip radius.
      source

      Preallocations

      DuctAPE.allocate_prepost_container_cacheFunction
      allocate_prepost_container_cache(paneling_constants::PanelingConstants)
      +allocate_prepost_container_cache(problem_dimensions::ProblemDimensions)

      Allocate the pre- and post-processing cache (used for intermediate calculations) based on paneling constants or problem dimensions.

      Arguments

      • paneling_constants::PanelingConstants : a PanelingConstants object

      OR

      • problem_dimensions::ProblemDimensions : a ProblemDimensions object

      Keyword Arguments

      • fd_chunk_size::Int=12 : chunk size to use for PreallocationTools caches. Note that the automated chuck size for DuctAPE will always be the ForwardDiff threshold of 12 due to the size of the system, so it will be best to leave this at the default unless further development allows for chunk size selection for individual solvers.
      • levels::Int=1 : levels for nested duals. Note that since ImplicitAD is being used for all solves, there should be no need for more than 1 level.

      Returns

      • prepost_container_caching::NamedTuple : a Named Tuple containing:
        • prepost_container_cache::PreallocationTools.DiffCache : the cache
        • prepost_container_cache_dims::NamedTuple : a named tuple containing the dimensions used for reshaping the cache when needed.
      source
      DuctAPE.allocate_solve_parameter_cacheFunction
      allocate_solve_parameter_cache(
           solve_type::SolverOptionsType,
           paneling_constants::PanelingConstants;
           fd_chunk_size=12,
      @@ -20,7 +20,7 @@
           problem_dimensions::ProblemDimensions;
           fd_chunk_size=12,
           levels=1
      -)

      Allocate the solve parameter cache for parameters passed into the solver(s).

      Arguments

      • solve_type::SolverOptionsType : Solver options type used for dispatch
      • paneling_constants::PanelingConstants : a PanlingConstants object used for sizing

      OR

      • problem_dimensions::ProblemDimensions : a ProblemDimensions object used for sizing

      Keyword Arguments

      • fd_chunk_size::Int=12 : chunk size to use for PreallocationTools caches. Note that the automated chuck size for DuctAPE will always be the ForwardDiff threshold of 12 due to the size of the system, so it will be best to leave this at the default unless further development allows for chunk size selection for individual solvers.
      • levels::Int=1 : levels for nested duals. Note that since ImplicitAD is being used for all solves, there should be no need for more than 1 level.

      Returns

      • solve_parameter_caching::NamedTuple : a Named Tuple containing:
        • solve_parameter_cache::PreallocationTools.DiffCache : the cache
        • solve_parameter_cache_dims::NamedTuple : a named tuple containing the dimensions used for reshaping the cache when needed.
      source
      DuctAPE.allocate_solve_container_cacheFunction
      allocate_solve_container_cache(
      +)

      Allocate the solve parameter cache for parameters passed into the solver(s).

      Arguments

      • solve_type::SolverOptionsType : Solver options type used for dispatch
      • paneling_constants::PanelingConstants : a PanlingConstants object used for sizing

      OR

      • problem_dimensions::ProblemDimensions : a ProblemDimensions object used for sizing

      Keyword Arguments

      • fd_chunk_size::Int=12 : chunk size to use for PreallocationTools caches. Note that the automated chuck size for DuctAPE will always be the ForwardDiff threshold of 12 due to the size of the system, so it will be best to leave this at the default unless further development allows for chunk size selection for individual solvers.
      • levels::Int=1 : levels for nested duals. Note that since ImplicitAD is being used for all solves, there should be no need for more than 1 level.

      Returns

      • solve_parameter_caching::NamedTuple : a Named Tuple containing:
        • solve_parameter_cache::PreallocationTools.DiffCache : the cache
        • solve_parameter_cache_dims::NamedTuple : a named tuple containing the dimensions used for reshaping the cache when needed.
      source
      DuctAPE.allocate_solve_container_cacheFunction
      allocate_solve_container_cache(
           solve_type::SolverOptionsType,
           paneling_constants::PanelingConstants;
           fd_chunk_size=12,
      @@ -31,7 +31,7 @@
           problem_dimensions::ProblemDimensions;
           fd_chunk_size=12,
           levels=1,
      -)

      Allocate the solve cache (used for intermediate calculations) based on paneling constants or problem dimensions.

      Arguments

      • paneling_constants::PanelingConstants : a PanelingConstants object

      OR

      • problem_dimensions::ProblemDimensions : a ProblemDimensions object

      Keyword Arguments

      • fd_chunk_size::Int=12 : chunk size to use for PreallocationTools caches. Note that the automated chuck size for DuctAPE will always be the ForwardDiff threshold of 12 due to the size of the system, so it will be best to leave this at the default unless further development allows for chunk size selection for individual solvers.
      • levels::Int=1 : levels for nested duals. Note that since ImplicitAD is being used for all solves, there should be no need for more than 1 level.

      Returns

      • solve_container_caching::NamedTuple : a Named Tuple containing:
        • solve_container_cache::PreallocationTools.DiffCache : the cache
        • solve_container_cache_dims::NamedTuple : a named tuple containing the dimensions used for reshaping the cache when needed.
      source

      Options

      General Options

      DuctAPE.OptionsType
      struct Options{
      +)

      Allocate the solve cache (used for intermediate calculations) based on paneling constants or problem dimensions.

      Arguments

      • paneling_constants::PanelingConstants : a PanelingConstants object

      OR

      • problem_dimensions::ProblemDimensions : a ProblemDimensions object

      Keyword Arguments

      • fd_chunk_size::Int=12 : chunk size to use for PreallocationTools caches. Note that the automated chuck size for DuctAPE will always be the ForwardDiff threshold of 12 due to the size of the system, so it will be best to leave this at the default unless further development allows for chunk size selection for individual solvers.
      • levels::Int=1 : levels for nested duals. Note that since ImplicitAD is being used for all solves, there should be no need for more than 1 level.

      Returns

      • solve_container_caching::NamedTuple : a Named Tuple containing:
        • solve_container_cache::PreallocationTools.DiffCache : the cache
        • solve_container_cache_dims::NamedTuple : a named tuple containing the dimensions used for reshaping the cache when needed.
      source

      Options

      General Options

      DuctAPE.OptionsType
      struct Options{
           TB,
           TBwo,
           TF,
      @@ -42,23 +42,23 @@
           TIo<:IntegrationOptions,
           TSo<:SolverOptionsType,
           WS<:GridSolverOptionsType,
      -}

      Type containing (nearly) all the available user options.

      Fields

      General Options

      • verbose::TB = false : flag to print verbose statements
      • silence_warnings::TB = true : flag to silence warnings
      • multipoint_index::TI = [1] : holds current index of multi-point solver (no need for user to change this usually)

      Pre-processing Options

      Geometry ee-interpolation and generation options :

      • finterp::Tin = FLOWMath.akima : interpolation method used for re-paneling bodies
      • autoshiftduct::TB = true : flag as to whether duct geometry should be shifted based on rotor tip location
      • lu_decomp_flag::TB = false : flag indicating if panel method LHS matrix factorization was successful

      paneling options

      • itcpshift::TF = 0.05 : factor for internal trailing edge psuedo-panel placement (default is DFDC hard-coded value)
      • axistol::TF = 1e-15 : tolerance for how close the the axis of rotation should be considered on the axis
      • tegaptol::TF = 1e1 * eps() : tolerance for how large of a trailing edge gap should be considered a gap

      Integration Options

      • integration_options::TIo = IntegrationOptions() : integration options

      Post-processing Options

      • write_outputs::TBwo = [false] : Bool for whether to write the outputs of the analysis to an external file (slow)
      • outfile::TSf = ["outputs.jl"] : External output file name (including path information) for files to write
      • checkoutfileexists::TB = false : Flag for whether to check if file exists before overwriting
      • output_tuple_name::TSt = ["outs"] : variable name for named tuple written to out file

      Solving Options

      • grid_solver_options::WS = GridSolverOptions() : elliptic grid solver options
      • solver_options::TSo = ChainSolverOptions() : solver options
      source
      DuctAPE.set_optionsFunction
      set_options(; kwargs...)
      -set_options(multipoint; kwargs...)

      Set the options for DuctAPE to use.

      Note that the vast majority of the available options are defined through keyword arguments. See the documentation for the various option types for more information.

      Arguments

      • multipoint::AbstractArray{OperatingPoint} : a vector of operating points to use if running a multi-point analysis.
      source

      Integration Options

      DuctAPE.IntegrationOptionsType
      struct IntegrationOptions{TN<:IntegrationMethod,TS<:IntegrationMethod}

      A struct used to hold the integration options for both the nominal and singular cases.

      Fields

      • nominal::IntegrationMethod=GaussLegendre(8) : the integration options to use for the nominal case.
      • singular::IntegrationMethod=GaussLegendre(8) : the integration options to use for the self-induced case.
      source
      DuctAPE.GaussLegendreType
      struct GaussLegendre{TN,TW} <: IntegrationMethod

      Options for Gauss-Legendre integration method

      Fields

      • sample_points::TN : Sample Points
      • weights::TW : Gauss weights
      source
      DuctAPE.GaussKronrodType
      struct GaussKronrod{TF,TI} <: IntegrationMethod

      Options for Gauss-Kronrod integration method

      Fields

      • order::TI = 7 : order of Legendre polynomial to use on each interval
      • maxevales::TI = 10^7 : maximum number of evaluations in the adaptive method
      • atol::TF = 0.0 : absolute error tolerance. (note, if zero, QuadGK uses sqrt(eps()) relative tolerance).
      source
      DuctAPE.RombergType
      struct Romberg{TF,TI} <: IntegrationMethod

      Options for Romberg integration method

      Fields

      • max_subdivisions::TI = 10 : maximum number of subdivisions. Note, total number of internvals is 2^N, where N is number of subdivisions.
      • atol::TF = 1e-6 : absolute error tolerance.
      source

      Solver Options

      Elliptic Grid Solve

      DuctAPE.SLORGridSolverOptionsType
      struct SLORGridSolverOptions{TB,TF,TI} <: GridSolverOptionsType

      Options for SLOR (successive line over relaxation) elliptic grid solver.

      Fields

      • iteration_limit::TI = 100 : maximum number of iterations
      • atol::TF = 1e-9 : absolute convergence tolerance
      • `converged::AbstractArray{TB} = [false]
      source
      DuctAPE.GridSolverOptionsType
      struct GridSolverOptions{TB,TF,TI,TSym} <: GridSolverOptionsType

      Options for SLOR + Newton elliptic grid solver.

      Fields

      • iteration_limit::TI = 10 : maximum number of iterations
      • atol::TF = 1e-14 : absolute convergence tolerance
      • algorithm::TSym = :newton : algorithm to use in NLsolve.jl
      • autodiff::TSym = :forward : differentiation method to use in NLsolve.jl
      • converged::AbstractArray{TB} = [false]
      source

      Aerodynamics Solve

      DuctAPE.ChainSolverOptionsType
      struct ChainSolverOptions{TB,TS<:Union{ExternalSolverOptions,PolyAlgorithmOptions}} <:PolyAlgorithmOptions

      Options for Chain Solvers (try one solver, if it doesn't converge, try another)

      Fields

      • `solvers::AbstractArray{TS} = [ NLsolveOptions(; algorithm=:anderson, atol=1e-12), MinpackOptions(; atol=1e-12), NonlinearSolveOptions(; algorithm=SimpleNonlinearSolve.SimpleNewtonRaphson, atol=1e-12, additional_kwargs=(; autodiff=SimpleNonlinearSolve.AutoForwardDiff()), ), ] : Vector of solver options to use.
      • converged::AbstractArray{TB} = [false] : flag to track if convergence took place.
      source
      DuctAPE.CompositeSolverOptionsType
      struct CompositeSolverOptions{
      +}

      Type containing (nearly) all the available user options.

      Fields

      General Options

      • verbose::TB = false : flag to print verbose statements
      • silence_warnings::TB = true : flag to silence warnings
      • multipoint_index::TI = [1] : holds current index of multi-point solver (no need for user to change this usually)

      Pre-processing Options

      Geometry ee-interpolation and generation options :

      • finterp::Tin = FLOWMath.akima : interpolation method used for re-paneling bodies
      • autoshiftduct::TB = true : flag as to whether duct geometry should be shifted based on rotor tip location
      • lu_decomp_flag::TB = false : flag indicating if panel method LHS matrix factorization was successful

      paneling options

      • itcpshift::TF = 0.05 : factor for internal trailing edge psuedo-panel placement (default is DFDC hard-coded value)
      • axistol::TF = 1e-15 : tolerance for how close the the axis of rotation should be considered on the axis
      • tegaptol::TF = 1e1 * eps() : tolerance for how large of a trailing edge gap should be considered a gap

      Integration Options

      • integration_options::TIo = IntegrationOptions() : integration options

      Post-processing Options

      • write_outputs::TBwo = [false] : Bool for whether to write the outputs of the analysis to an external file (slow)
      • outfile::TSf = ["outputs.jl"] : External output file name (including path information) for files to write
      • checkoutfileexists::TB = false : Flag for whether to check if file exists before overwriting
      • output_tuple_name::TSt = ["outs"] : variable name for named tuple written to out file

      Solving Options

      • grid_solver_options::WS = GridSolverOptions() : elliptic grid solver options
      • solver_options::TSo = ChainSolverOptions() : solver options
      source
      DuctAPE.set_optionsFunction
      set_options(; kwargs...)
      +set_options(multipoint; kwargs...)

      Set the options for DuctAPE to use.

      Note that the vast majority of the available options are defined through keyword arguments. See the documentation for the various option types for more information.

      Arguments

      • multipoint::AbstractArray{OperatingPoint} : a vector of operating points to use if running a multi-point analysis.
      source

      Integration Options

      DuctAPE.IntegrationOptionsType
      struct IntegrationOptions{TN<:IntegrationMethod,TS<:IntegrationMethod}

      A struct used to hold the integration options for both the nominal and singular cases.

      Fields

      • nominal::IntegrationMethod=GaussLegendre(8) : the integration options to use for the nominal case.
      • singular::IntegrationMethod=GaussLegendre(8) : the integration options to use for the self-induced case.
      source
      DuctAPE.GaussLegendreType
      struct GaussLegendre{TN,TW} <: IntegrationMethod

      Options for Gauss-Legendre integration method

      Fields

      • sample_points::TN : Sample Points
      • weights::TW : Gauss weights
      source
      DuctAPE.GaussKronrodType
      struct GaussKronrod{TF,TI} <: IntegrationMethod

      Options for Gauss-Kronrod integration method

      Fields

      • order::TI = 7 : order of Legendre polynomial to use on each interval
      • maxevales::TI = 10^7 : maximum number of evaluations in the adaptive method
      • atol::TF = 0.0 : absolute error tolerance. (note, if zero, QuadGK uses sqrt(eps()) relative tolerance).
      source
      DuctAPE.RombergType
      struct Romberg{TF,TI} <: IntegrationMethod

      Options for Romberg integration method

      Fields

      • max_subdivisions::TI = 10 : maximum number of subdivisions. Note, total number of internvals is 2^N, where N is number of subdivisions.
      • atol::TF = 1e-6 : absolute error tolerance.
      source

      Solver Options

      Elliptic Grid Solve

      DuctAPE.SLORGridSolverOptionsType
      struct SLORGridSolverOptions{TB,TF,TI} <: GridSolverOptionsType

      Options for SLOR (successive line over relaxation) elliptic grid solver.

      Fields

      • iteration_limit::TI = 100 : maximum number of iterations
      • atol::TF = 1e-9 : absolute convergence tolerance
      • `converged::AbstractArray{TB} = [false]
      source
      DuctAPE.GridSolverOptionsType
      struct GridSolverOptions{TB,TF,TI,TSym} <: GridSolverOptionsType

      Options for SLOR + Newton elliptic grid solver.

      Fields

      • iteration_limit::TI = 10 : maximum number of iterations
      • atol::TF = 1e-14 : absolute convergence tolerance
      • algorithm::TSym = :newton : algorithm to use in NLsolve.jl
      • autodiff::TSym = :forward : differentiation method to use in NLsolve.jl
      • converged::AbstractArray{TB} = [false]
      source

      Aerodynamics Solve

      DuctAPE.ChainSolverOptionsType
      struct ChainSolverOptions{TB,TS<:Union{ExternalSolverOptions,PolyAlgorithmOptions}} <:PolyAlgorithmOptions

      Options for Chain Solvers (try one solver, if it doesn't converge, try another)

      Fields

      • `solvers::AbstractArray{TS} = [ NLsolveOptions(; algorithm=:anderson, atol=1e-12), MinpackOptions(; atol=1e-12), NonlinearSolveOptions(; algorithm=SimpleNonlinearSolve.SimpleNewtonRaphson, atol=1e-12, additional_kwargs=(; autodiff=SimpleNonlinearSolve.AutoForwardDiff()), ), ] : Vector of solver options to use.
      • converged::AbstractArray{TB} = [false] : flag to track if convergence took place.
      source
      DuctAPE.CompositeSolverOptionsType
      struct CompositeSolverOptions{
           TB,TS<:Union{ExternalSolverOptions,PolyAlgorithmOptions}
      -} <: PolyAlgorithmOptions

      Options for Composite Solvers (start with a partial solve of one solve, then finish with another starting where the first left off).

      Fields

      • `solvers::AbstractArray{TS} = [ NLsolveOptions(; algorithm=:newton, iteration_limit=3), NLsolveOptions(; algorithm=:anderson, atol=1e-12), ]' : Vector of solver options to use.
      • converged::AbstractArray{TB} = [false] : flag to track if convergence took place.
      source
      DuctAPE.NLsolveOptionsType
      struct NLsolveOptions{TB,TF,TK,Tls,Tlsk,TSym} <: ExternalSolverOptions

      Options for the NLsolve pacakge solvers

      Fields

      • algorithm::TSym = :anderson : algorithm to use
      • additional_kwargs::TK = (;) : any additional keyword arguments for the solver
      • atol::TF = 1e-12 : absolute convergence tolerance
      • iteration_limit::TF = 25 : maximum number of iterations
      • linesearch_method::Tls = LineSearches.MoreThuente : line search method to use
      • linesearch_kwargs::Tlsk = (;) : any additional lineseach keyword arguments
      • converged::AbstractArray{TB} = [false] : flag to track if convergence took place.
      source
      DuctAPE.NonlinearSolveOptionsType
      struct NonlinearSolveOptions{TA,TB,TF,TI,TT} <: ExternalSolverOptions

      Options for the SimpleNonlinearSolve pacakge solvers

      Fields

      • algorithm::TA = SimpleNonlinearSolve.SimpleNewtonRaphson : algorithm to use
      • additional_kwargs::TK = (;) : any additional keyword arguments for the solver
      • atol::TF = 1e-12 : absolute convergence tolerance
      • iteration_limit::TF = 25 : maximum number of iterations
      • converged::AbstractArray{TB} = [false] : flag to track if convergence took place.
      source
      DuctAPE.MinpackOptionsType
      struct MinpackOptions{TB,TF,TI,TSym} <: ExternalSolverOptions

      Options for the MINPACK's HYBRJ solver

      Fields

      • algorithm::TSym = :hybr : algorithm to use in MINPACK.jl (hybr is HYBRJ when the jacobian is provided)
      • atol::TF = 1e-12 : absolute convergence tolerance
      • iteration_limit::TF = 100 : maximum number of iterations
      • converged::AbstractArray{TB} = [false] : flag to track if convergence took place.
      source
      DuctAPE.SIAMFANLEOptionsType
      struct SIAMFANLEOptions{TA,TB,TF,TI,TK} <: ExternalSolverOptions

      Options for the SIAMFANLEquations pacakge solvers

      Fields

      • algorithm::TA = SIAMFANLEquations.nsoli : algorithm to use
      • rtol::TF = 0.0 : relative convergence tolerance
      • atol::TF = 1e-10 : absolute convergence tolerance
      • iteration_limit::TF = 1000 : maximum number of iterations
      • linear_iteration_limit::TF = 5 : maximum number of linear solve iterations (GMRES)
      • additional_kwargs::TK = (;) : any additional keyword arguments for the solver
      • converged::AbstractArray{TB} = [false] : flag to track if convergence took place.
      source
      DuctAPE.SpeedMappingOptionsType
      struct SpeedMappingOptions{TB,TF,TI,TL,TSm,TU} <: ExternalSolverOptions

      Options for the SpeedMapping.jl package solver

      Fields

      • `orders::AbstractArray{TI} = [3, 2]
      • sig_min::TSm = 0 : maybe set to 1?
      • stabilize::TB = false : stabilizes before extrapolation
      • check_obj::TB = false : checks for inf's and nan's and starts from previous finite point
      • atol::TF = 1e-10 : absolute convergence tolerance
      • iteration_limit::TF = 1000 : maximum number of iterations
      • time_limit::TF = Inf : time limit in seconds
      • lower::TL = nothing : box lower bounds
      • upper::TU = nothing : box upper bounds
      • buffer::TF = 0.01 : if using bounds, buffer brings x inside bounds by buffer amountd
      • Lp::TF = Inf : p value for p-norm for convergence criteria
      • converged::AbstractArray{TB} = [false] : flag to track if convergence took place.
      source
      DuctAPE.FixedPointOptionsType
      struct FixedPointOptions{TB,TF,TI} <: ExternalSolverOptions

      Options for the FixedPoint.jl package solver

      Fields

      • iteration_limit::TF = 1000 : maximum number of iterations
      • vel::TF = 0.9 : vel keyword argument, default is package default
      • ep::TF = 0.01 : ep keyword argument, default is package default
      • atol::TF = 1e-12 : absolute convergence tolerance
      • converged::AbstractArray{TB} = [false] : flag to track if convergence took place.
      source
      DuctAPE.CSORSolverOptionsType
      struct CSORSolverOptions{TB,TC<:ConvergenceType,TF,TS} <: SolverOptionsType

      Type containing all the options for the CSOR (controlled successive over relaxation) solver.

      Note that the defaults match DFDC with the exception of the relaxation schedule, which is an experimental feature.

      Fields

      • var::type :
      • verbose::TB = false : flag to print verbose statements
      • iteration_limit::TF = 1e2 : maximum number of iterations
      • nrf::TF = 0.4 : nominal relaxation factor
      • bt1::TF = 0.2 : backtracking factor 1
      • bt2::TF = 0.6 : backtracking factor 2
      • pf1::TF = 0.4 : press forward factor 1
      • pf2::TF = 0.5 : press forward factor 2
      • btw::TF = 0.6 : backtracking factor for wake
      • pfw::TF = 1.2 : press forward factor for wake
      • relaxation_schedule::TS = [[0.0;1e-14;1e-13;1e10]), [1.0;1.0;0.0;0.0])] : values used in spline definition for scaling the relaxation factors (second vector) after various convergence values (first vector).
      • f_circ::TF = 1e-3 : convergence tolerance for rotor circulation
      • f_dgamw::TF = 2e-4 : convergence tolerance for wake vortex strength
      • convergence_type::TC = Relative() : dispatch for relative or absolute convergence criteria.
      • Vconv::AbstractArray{TF} = [1.0] : velocity used in relative convergence criteria (should be set to Vref).
      • converged::AbstractArray{TB} = [false] : flag to track if convergence took place.
      source

      Preprocess

      DuctAPE.setup_analysisFunction
      setup_analysis(
      +} <: PolyAlgorithmOptions

      Options for Composite Solvers (start with a partial solve of one solve, then finish with another starting where the first left off).

      Fields

      • `solvers::AbstractArray{TS} = [ NLsolveOptions(; algorithm=:newton, iteration_limit=3), NLsolveOptions(; algorithm=:anderson, atol=1e-12), ]' : Vector of solver options to use.
      • converged::AbstractArray{TB} = [false] : flag to track if convergence took place.
      source
      DuctAPE.NLsolveOptionsType
      struct NLsolveOptions{TB,TF,TK,Tls,Tlsk,TSym} <: ExternalSolverOptions

      Options for the NLsolve pacakge solvers

      Fields

      • algorithm::TSym = :anderson : algorithm to use
      • additional_kwargs::TK = (;) : any additional keyword arguments for the solver
      • atol::TF = 1e-12 : absolute convergence tolerance
      • iteration_limit::TF = 25 : maximum number of iterations
      • linesearch_method::Tls = LineSearches.MoreThuente : line search method to use
      • linesearch_kwargs::Tlsk = (;) : any additional lineseach keyword arguments
      • converged::AbstractArray{TB} = [false] : flag to track if convergence took place.
      source
      DuctAPE.NonlinearSolveOptionsType
      struct NonlinearSolveOptions{TA,TB,TF,TI,TT} <: ExternalSolverOptions

      Options for the SimpleNonlinearSolve pacakge solvers

      Fields

      • algorithm::TA = SimpleNonlinearSolve.SimpleNewtonRaphson : algorithm to use
      • additional_kwargs::TK = (;) : any additional keyword arguments for the solver
      • atol::TF = 1e-12 : absolute convergence tolerance
      • iteration_limit::TF = 25 : maximum number of iterations
      • converged::AbstractArray{TB} = [false] : flag to track if convergence took place.
      source
      DuctAPE.MinpackOptionsType
      struct MinpackOptions{TB,TF,TI,TSym} <: ExternalSolverOptions

      Options for the MINPACK's HYBRJ solver

      Fields

      • algorithm::TSym = :hybr : algorithm to use in MINPACK.jl (hybr is HYBRJ when the jacobian is provided)
      • atol::TF = 1e-12 : absolute convergence tolerance
      • iteration_limit::TF = 100 : maximum number of iterations
      • converged::AbstractArray{TB} = [false] : flag to track if convergence took place.
      source
      DuctAPE.SIAMFANLEOptionsType
      struct SIAMFANLEOptions{TA,TB,TF,TI,TK} <: ExternalSolverOptions

      Options for the SIAMFANLEquations pacakge solvers

      Fields

      • algorithm::TA = SIAMFANLEquations.nsoli : algorithm to use
      • rtol::TF = 0.0 : relative convergence tolerance
      • atol::TF = 1e-10 : absolute convergence tolerance
      • iteration_limit::TF = 1000 : maximum number of iterations
      • linear_iteration_limit::TF = 5 : maximum number of linear solve iterations (GMRES)
      • additional_kwargs::TK = (;) : any additional keyword arguments for the solver
      • converged::AbstractArray{TB} = [false] : flag to track if convergence took place.
      source
      DuctAPE.SpeedMappingOptionsType
      struct SpeedMappingOptions{TB,TF,TI,TL,TSm,TU} <: ExternalSolverOptions

      Options for the SpeedMapping.jl package solver

      Fields

      • `orders::AbstractArray{TI} = [3, 2]
      • sig_min::TSm = 0 : maybe set to 1?
      • stabilize::TB = false : stabilizes before extrapolation
      • check_obj::TB = false : checks for inf's and nan's and starts from previous finite point
      • atol::TF = 1e-10 : absolute convergence tolerance
      • iteration_limit::TF = 1000 : maximum number of iterations
      • time_limit::TF = Inf : time limit in seconds
      • lower::TL = nothing : box lower bounds
      • upper::TU = nothing : box upper bounds
      • buffer::TF = 0.01 : if using bounds, buffer brings x inside bounds by buffer amountd
      • Lp::TF = Inf : p value for p-norm for convergence criteria
      • converged::AbstractArray{TB} = [false] : flag to track if convergence took place.
      source
      DuctAPE.FixedPointOptionsType
      struct FixedPointOptions{TB,TF,TI} <: ExternalSolverOptions

      Options for the FixedPoint.jl package solver

      Fields

      • iteration_limit::TF = 1000 : maximum number of iterations
      • vel::TF = 0.9 : vel keyword argument, default is package default
      • ep::TF = 0.01 : ep keyword argument, default is package default
      • atol::TF = 1e-12 : absolute convergence tolerance
      • converged::AbstractArray{TB} = [false] : flag to track if convergence took place.
      source
      DuctAPE.CSORSolverOptionsType
      struct CSORSolverOptions{TB,TC<:ConvergenceType,TF,TS} <: SolverOptionsType

      Type containing all the options for the CSOR (controlled successive over relaxation) solver.

      Note that the defaults match DFDC with the exception of the relaxation schedule, which is an experimental feature.

      Fields

      • var::type :
      • verbose::TB = false : flag to print verbose statements
      • iteration_limit::TF = 1e2 : maximum number of iterations
      • nrf::TF = 0.4 : nominal relaxation factor
      • bt1::TF = 0.2 : backtracking factor 1
      • bt2::TF = 0.6 : backtracking factor 2
      • pf1::TF = 0.4 : press forward factor 1
      • pf2::TF = 0.5 : press forward factor 2
      • btw::TF = 0.6 : backtracking factor for wake
      • pfw::TF = 1.2 : press forward factor for wake
      • relaxation_schedule::TS = [[0.0;1e-14;1e-13;1e10]), [1.0;1.0;0.0;0.0])] : values used in spline definition for scaling the relaxation factors (second vector) after various convergence values (first vector).
      • f_circ::TF = 1e-3 : convergence tolerance for rotor circulation
      • f_dgamw::TF = 2e-4 : convergence tolerance for wake vortex strength
      • convergence_type::TC = Relative() : dispatch for relative or absolute convergence criteria.
      • Vconv::AbstractArray{TF} = [1.0] : velocity used in relative convergence criteria (should be set to Vref).
      • converged::AbstractArray{TB} = [false] : flag to track if convergence took place.
      source

      Preprocess

      DuctAPE.setup_analysisFunction
      setup_analysis(
           propulsor::Propulsor,
           options::Options=set_options();
           prepost_container_caching=nothing,
           solve_parameter_caching=nothing,
           solve_container_caching=nothing,
      -)

      Perform pre-processing and cache setup (as needed) for propuslor analysis.

      Arguments

      • propulsor::Propulsor : Propulsor input object (see docstring for Propulsor type)
      • options::Options=set_options() : Options object (see set_options and related functions)

      Keyword Arguments

      • prepost_container_caching=nothing : Output of allocate_prepost_container_cache
      • solve_parameter_caching=nothing : Output of allocate_solve_parameter_container_cache
      • solve_container_caching=nothing : Output of allocate_solve_container_cache

      Returns

      • problem_dimensions::NamedTuple : Named Tuple contiaining bookkeeping information (problem dimensions)
      • prepost_containers::NamedTuple : Named Tuple containing reshaped views into the prepost cache
      • solve_parameter_cache_vector::Vector : Vector containing the relevant typed cache vector of solve parameters
      • solve_parameter_cache_dims::NamedTuple : Named Tuple containing dimensions used for reshaping the solve parameter cache
      • A_bb_LU::LinearAlgebra.LU : The LU factorization of the AIC matrix used in the panel method
      • lu_decomp_flag::Bool : flag indicating if the LU decomposition was successful
      • airfoils::Matrix{AFType} : Matrix contiaining the blade element airfoil polar objects
      • idmaps::NamedTuple : Named Tuple containing bookkeeping information (index mappings)
      source

      Analysis

      DuctAPE.analyzeFunction
      analyze(
      +)

      Perform pre-processing and cache setup (as needed) for propuslor analysis.

      Arguments

      • propulsor::Propulsor : Propulsor input object (see docstring for Propulsor type)
      • options::Options=set_options() : Options object (see set_options and related functions)

      Keyword Arguments

      • prepost_container_caching=nothing : Output of allocate_prepost_container_cache
      • solve_parameter_caching=nothing : Output of allocate_solve_parameter_container_cache
      • solve_container_caching=nothing : Output of allocate_solve_container_cache

      Returns

      • problem_dimensions::NamedTuple : Named Tuple contiaining bookkeeping information (problem dimensions)
      • prepost_containers::NamedTuple : Named Tuple containing reshaped views into the prepost cache
      • solve_parameter_cache_vector::Vector : Vector containing the relevant typed cache vector of solve parameters
      • solve_parameter_cache_dims::NamedTuple : Named Tuple containing dimensions used for reshaping the solve parameter cache
      • A_bb_LU::LinearAlgebra.LU : The LU factorization of the AIC matrix used in the panel method
      • lu_decomp_flag::Bool : flag indicating if the LU decomposition was successful
      • airfoils::Matrix{AFType} : Matrix contiaining the blade element airfoil polar objects
      • idmaps::NamedTuple : Named Tuple containing bookkeeping information (index mappings)
      source

      Analysis

      DuctAPE.analyzeFunction
      analyze(
           propulsor::Propulsor,
           options::Options=set_options();
           prepost_container_caching=nothing,
           solve_parameter_caching=nothing,
           solve_container_caching=nothing,
           return_inputs=false,
      -)

      Analyze propulsor, including preprocessing.

      Arguments

      • propulsor::Propulsor : Propulsor input object (see docstring for Propulsor type)
      • options::Options=set_options() : Options object (see set_options and related functions)

      Keyword Arguments

      • prepost_container_caching=nothing : Output of allocate_prepost_container_cache
      • solve_parameter_caching=nothing : Output of allocate_solve_parameter_container_cache
      • solve_container_caching=nothing : Output of allocate_solve_container_cache
      • return_inputs=false : flag as to whether or not to return the pre-processed inputs

      Returns

      • outs::NamedTuple : Named Tuple of various analysis outputs (see docstring for postprocess for details), note, if linear system decomposition fails, no solve is performed and an empty vector is returned.
      • ins::NamedTuple : Named Tuple of various pre-processed inputs (e.g. panels and body linear system), will only be returned if return_inputs=true
      • convergence_flag : Flag for successful solve convergence
      source
      analyze(
      +)

      Analyze propulsor, including preprocessing.

      Arguments

      • propulsor::Propulsor : Propulsor input object (see docstring for Propulsor type)
      • options::Options=set_options() : Options object (see set_options and related functions)

      Keyword Arguments

      • prepost_container_caching=nothing : Output of allocate_prepost_container_cache
      • solve_parameter_caching=nothing : Output of allocate_solve_parameter_container_cache
      • solve_container_caching=nothing : Output of allocate_solve_container_cache
      • return_inputs=false : flag as to whether or not to return the pre-processed inputs

      Returns

      • outs::NamedTuple : Named Tuple of various analysis outputs (see docstring for postprocess for details), note, if linear system decomposition fails, no solve is performed and an empty vector is returned.
      • ins::NamedTuple : Named Tuple of various pre-processed inputs (e.g. panels and body linear system), will only be returned if return_inputs=true
      • convergence_flag : Flag for successful solve convergence
      source
      analyze(
           propulsor::Propulsor,
           prepost_containers,
           solve_parameter_cache_vector,
      @@ -70,7 +70,7 @@
           options::Options=set_options();
           return_inputs=false,
           solve_container_caching=nothing,
      -)

      Analyze propulsor, assuming setup_analysis has been called and the outputs thereof are being passed in here.

      Arguments

      • propulsor::Propulsor : Propulsor input object
      • prepost_containers::NamedTuple : An output from setup_analysis containing reshaped views into the prepost cache
      • solve_parameter_cache_vector::Vector : An output from setup_analysis containing the relevant typed cache vector of solve parameters
      • solve_parameter_cache_dims::NamedTuple : An output from setup_analysis containing dimensions used for reshaping the solve parameter cache
      • airfoils::Vector{AFType} : An output from setup_analysis contiaining the blade element airfoil polar objects
      • A_bb_LU::LinearAlgebra.LU : An output from setup_analysis that is the LU decomposition of the AIC matrix used in the panel method
      • idmaps::NamedTuple : An output from setup_analysis containing bookkeeping information (index mappings)
      • problem_dimensions::NamedTuple : An output from setup_analysis contiaining bookkeeping information (problem dimensions)
      • options::Options=set_options() : Options object

      Keyword Arguments

      • solve_container_caching=nothing : Output of allocate_solve_container_cache
      • return_inputs=false : flag as to whether or not to return the pre-processed inputs

      Returns

      • outs::NamedTuple : Named Tuple of various analysis outputs (see docstring for postprocess for details), note, if linear system decomposition fails, no solve is performed and an empty vector is returned.
      • ins::NamedTuple : Named Tuple of various pre-processed inputs (e.g. panels and body linear system), will only be returned if return_inputs=true
      • convergence_flag : Flag for successful solve convergence
      source
      analyze(
      +)

      Analyze propulsor, assuming setup_analysis has been called and the outputs thereof are being passed in here.

      Arguments

      • propulsor::Propulsor : Propulsor input object
      • prepost_containers::NamedTuple : An output from setup_analysis containing reshaped views into the prepost cache
      • solve_parameter_cache_vector::Vector : An output from setup_analysis containing the relevant typed cache vector of solve parameters
      • solve_parameter_cache_dims::NamedTuple : An output from setup_analysis containing dimensions used for reshaping the solve parameter cache
      • airfoils::Vector{AFType} : An output from setup_analysis contiaining the blade element airfoil polar objects
      • A_bb_LU::LinearAlgebra.LU : An output from setup_analysis that is the LU decomposition of the AIC matrix used in the panel method
      • idmaps::NamedTuple : An output from setup_analysis containing bookkeeping information (index mappings)
      • problem_dimensions::NamedTuple : An output from setup_analysis contiaining bookkeeping information (problem dimensions)
      • options::Options=set_options() : Options object

      Keyword Arguments

      • solve_container_caching=nothing : Output of allocate_solve_container_cache
      • return_inputs=false : flag as to whether or not to return the pre-processed inputs

      Returns

      • outs::NamedTuple : Named Tuple of various analysis outputs (see docstring for postprocess for details), note, if linear system decomposition fails, no solve is performed and an empty vector is returned.
      • ins::NamedTuple : Named Tuple of various pre-processed inputs (e.g. panels and body linear system), will only be returned if return_inputs=true
      • convergence_flag : Flag for successful solve convergence
      source
      analyze(
           multipoint::AbstractVector{OperatingPoint},
           propulsor::Propulsor,
           options::Options=set_options();
      @@ -78,7 +78,7 @@
           solve_parameter_caching=nothing,
           solve_container_caching=nothing,
           return_inputs=false,
      -)

      Analyze propulsor, including preprocessing, for a set of operating points.

      Arguments

      • multipoint::AbstractVector{OperatingPoint} : Vector of Operating Points at which to analyze the propulsor (note that the operating point within the propulsor input will be overwritten with these)
      • propulsor::Propulsor : Propulsor input object
      • options::Options=set_options() : Options object

      Keyword Arguments

      • prepost_container_caching=nothing : Output of allocate_prepost_container_cache
      • solve_parameter_caching=nothing : Output of allocate_solve_parameter_container_cache
      • solve_container_caching=nothing : Output of allocate_solve_container_cache
      • return_inputs=false : flag as to whether or not to return the pre-processed inputs

      Returns

      • outs::Vector{NamedTuple} : Vector of named tuples of various analysis outputs (see docstring for postprocess for details), note, if linear system decomposition fails, no solve is performed and an empty vector is returned.
      • ins::NamedTuple : Named Tuple of various pre-processed inputs (e.g. panels and body linear system), will only be returned if return_inputs=true
      • convergence_flag : Flag for successful solve convergence
      source
      analyze(
      +)

      Analyze propulsor, including preprocessing, for a set of operating points.

      Arguments

      • multipoint::AbstractVector{OperatingPoint} : Vector of Operating Points at which to analyze the propulsor (note that the operating point within the propulsor input will be overwritten with these)
      • propulsor::Propulsor : Propulsor input object
      • options::Options=set_options() : Options object

      Keyword Arguments

      • prepost_container_caching=nothing : Output of allocate_prepost_container_cache
      • solve_parameter_caching=nothing : Output of allocate_solve_parameter_container_cache
      • solve_container_caching=nothing : Output of allocate_solve_container_cache
      • return_inputs=false : flag as to whether or not to return the pre-processed inputs

      Returns

      • outs::Vector{NamedTuple} : Vector of named tuples of various analysis outputs (see docstring for postprocess for details), note, if linear system decomposition fails, no solve is performed and an empty vector is returned.
      • ins::NamedTuple : Named Tuple of various pre-processed inputs (e.g. panels and body linear system), will only be returned if return_inputs=true
      • convergence_flag : Flag for successful solve convergence
      source
      analyze(
           multipoint::Vector{OperatingPoint},
           propulsor::Propulsor,
           prepost_containers,
      @@ -91,4 +91,4 @@
           options::Options=set_options();
           return_inputs=false,
           solve_container_caching=nothing,
      -)

      Analyze propulsor, assuming setup_analysis has been called and the inputs are being passed in here.

      Arguments

      • multipoint::AbstractVector{OperatingPoint} : Vector of Operating Points at which to analyze the propulsor (note that the operating point within the propulsor input will be overwritten with these)
      • propulsor::Propulsor : Propulsor input object
      • prepost_containers::NamedTuple : An output from setup_analysis containing reshaped views into the prepost cache
      • solve_parameter_cache_vector::Vector : An output from setup_analysis containing the relevant typed cache vector of solve parameters
      • solve_parameter_cache_dims::NamedTuple : An output from setup_analysis containing dimensions used for reshaping the solve parameter cache
      • airfoils::Vector{AFType} : An output from setup_analysis contiaining the blade element airfoil polar objects
      • A_bb_LU::LinearAlgebra.LU : An output from setup_analysis that is the LU decomposition of the AIC matrix used in the panel method
      • idmaps::NamedTuple : An output from setup_analysis containing bookkeeping information (index mappings)
      • problem_dimensions::NamedTuple : An output from setup_analysis contiaining bookkeeping information (problem dimensions)
      • options::Options=set_options() : Options object

      Keyword Arguments

      • solve_container_caching=nothing : Output of allocate_solve_container_cache
      • return_inputs=false : flag as to whether or not to return the pre-processed inputs

      Returns

      • outs::Vector{NamedTuple} : Named Tuple of various analysis outputs (see docstring for postprocess for details), note, if linear system decomposition fails, no solve is performed and an empty vector is returned.
      • ins::NamedTuple : Named Tuple of various pre-processed inputs (e.g. panels and body linear system), will only be returned if return_inputs=true. Note that some inputs will be overwritten (e.g. the linear system RHS components related to the freestream) and only those associated with the final operating point will be returned.
      • convergence_flag : Flag for successful solve convergence
      source

      Miscellaneous

      Airfoil/Geometry Manipulation

      NACA 6-Series Cascade Geometry Generation

      +)

      Analyze propulsor, assuming setup_analysis has been called and the inputs are being passed in here.

      Arguments

      • multipoint::AbstractVector{OperatingPoint} : Vector of Operating Points at which to analyze the propulsor (note that the operating point within the propulsor input will be overwritten with these)
      • propulsor::Propulsor : Propulsor input object
      • prepost_containers::NamedTuple : An output from setup_analysis containing reshaped views into the prepost cache
      • solve_parameter_cache_vector::Vector : An output from setup_analysis containing the relevant typed cache vector of solve parameters
      • solve_parameter_cache_dims::NamedTuple : An output from setup_analysis containing dimensions used for reshaping the solve parameter cache
      • airfoils::Vector{AFType} : An output from setup_analysis contiaining the blade element airfoil polar objects
      • A_bb_LU::LinearAlgebra.LU : An output from setup_analysis that is the LU decomposition of the AIC matrix used in the panel method
      • idmaps::NamedTuple : An output from setup_analysis containing bookkeeping information (index mappings)
      • problem_dimensions::NamedTuple : An output from setup_analysis contiaining bookkeeping information (problem dimensions)
      • options::Options=set_options() : Options object

      Keyword Arguments

      • solve_container_caching=nothing : Output of allocate_solve_container_cache
      • return_inputs=false : flag as to whether or not to return the pre-processed inputs

      Returns

      • outs::Vector{NamedTuple} : Named Tuple of various analysis outputs (see docstring for postprocess for details), note, if linear system decomposition fails, no solve is performed and an empty vector is returned.
      • ins::NamedTuple : Named Tuple of various pre-processed inputs (e.g. panels and body linear system), will only be returned if return_inputs=true. Note that some inputs will be overwritten (e.g. the linear system RHS components related to the freestream) and only those associated with the final operating point will be returned.
      • convergence_flag : Flag for successful solve convergence
      source

      Miscellaneous

      Airfoil/Geometry Manipulation

      NACA 6-Series Cascade Geometry Generation

      diff --git a/dev/DuctAPE/theory/index.html b/dev/DuctAPE/theory/index.html index 2f3a79ef..1786d2b1 100644 --- a/dev/DuctAPE/theory/index.html +++ b/dev/DuctAPE/theory/index.html @@ -1,2 +1,2 @@ -Theory · DuctAPE.jl

      Theory

      For a brief overview of the theory behind DuctAPE, see:

      • Mehr, J. and Ning, A., "DuctAPE: A steady-state, axisymmetric ducted fan analysis code designed for gradient-based optimization.," AIAA Aviation Forum, July 2024.

      For a more thorough dive into the details see this pdf document.

      +Theory · DuctAPE.jl

      Theory

      For a brief overview of the theory behind DuctAPE, see:

      • Mehr, J. and Ning, A., "DuctAPE: A steady-state, axisymmetric ducted fan analysis code designed for gradient-based optimization.," AIAA Aviation Forum, July 2024.

      For a more thorough dive into the details see this pdf document.

      diff --git a/dev/DuctAPE/tutorial/15747a4c.svg b/dev/DuctAPE/tutorial/5f10b6fa.svg similarity index 78% rename from dev/DuctAPE/tutorial/15747a4c.svg rename to dev/DuctAPE/tutorial/5f10b6fa.svg index 7a7323d4..f7273a03 100644 --- a/dev/DuctAPE/tutorial/15747a4c.svg +++ b/dev/DuctAPE/tutorial/5f10b6fa.svg @@ -1,206 +1,206 @@ - + - + - + - - - - - - - + + + + + + + 0.0 - + 0.5 - + 1.0 - + 1.5 - + 2.0 - + Advance Ratio - - - - - - + + + + + + 0.0 - + 0.2 - + 0.4 - + 0.6 - + Efficiency - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + DFDC - - + + DuctAPE - + - - - - - - - + + + + + + + 0.0 - + 0.5 - + 1.0 - + 1.5 - + 2.0 - + Advance Ratio - - - - - - - + + + + + + + 0.0 - + 0.2 - + 0.4 - + 0.6 - + 0.8 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DFDC Cp - - + + DFDC Ct - - + + DuctAPE Cp - - + + DuctAPE Ct diff --git a/dev/DuctAPE/tutorial/765de1e2.svg b/dev/DuctAPE/tutorial/db81a906.svg similarity index 77% rename from dev/DuctAPE/tutorial/765de1e2.svg rename to dev/DuctAPE/tutorial/db81a906.svg index a9c09467..94679079 100644 --- a/dev/DuctAPE/tutorial/765de1e2.svg +++ b/dev/DuctAPE/tutorial/db81a906.svg @@ -1,88 +1,88 @@ - + - + - + - - - - - - + + + + + + 0.0 - + 0.1 - + 0.2 - + 0.3 - + z - - - - - - - + + + + + + + 0.00 - + 0.05 - + 0.10 - + 0.15 - + 0.20 - + r - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Duct - - + + Center Body - - + + Blade Elements diff --git a/dev/DuctAPE/tutorial/96efed33.svg b/dev/DuctAPE/tutorial/f30479a7.svg similarity index 81% rename from dev/DuctAPE/tutorial/96efed33.svg rename to dev/DuctAPE/tutorial/f30479a7.svg index 459adbab..affbd9ca 100644 --- a/dev/DuctAPE/tutorial/96efed33.svg +++ b/dev/DuctAPE/tutorial/f30479a7.svg @@ -1,74 +1,74 @@ - + - + - + - - - - - - + + + + + + 0.0 - + 0.1 - + 0.2 - + 0.3 - + z - - - - - - - + + + + + + + 0.00 - + 0.05 - + 0.10 - + 0.15 - + 0.20 - + r - - - - - - + + + + + + Duct - - + + Center Body diff --git a/dev/DuctAPE/tutorial/index.html b/dev/DuctAPE/tutorial/index.html index 2df01a2a..af40400d 100644 --- a/dev/DuctAPE/tutorial/index.html +++ b/dev/DuctAPE/tutorial/index.html @@ -1,6 +1,6 @@ Getting Started · DuctAPE.jl

      Getting Started

      The following is a basic tutorial on how to set up the inputs to, and run, an analysis of a ducted fan in DuctAPE.

      We begin by loading the package, and optionally create a shorthand name.

      using DuctAPE
      -const dt = DuctAPE

      Assemble Inputs

      The next step is to create the input object of type Propulsor.

      DuctAPE.PropulsorType
      Propulsor(duct_coordinates, centerbody_coordinates, rotorstator_parameters, operating_point, paneling_constants, reference_parameters)

      Arguments

      • duct_coordinates::AbstractMatrix : The [z, r] coordinates of the duct geometry beginning at the inner (casing) side trailing edge and proceeding clockwise. Note that the duct geometry absolute radial position does not need to be included here if the autoshiftduct option is selected.
      • centerbody_coordinates::AbstractMatrix : The [z, r] coordinates of the centerbody beginning at the leading edge and ending at the trailing edge. Note that the leading edge is assumed to be placed at a radial distance of 0.0 from the axis of rotation.
      • operating_point::OperatingPoint : The operating point values.
      • paneling_constants::PanelingConstants : Constants used in re-paneling the geometry.
      • rotorstator_parameters::RotorStatorParameters : Rotor (and possibly stator) geometric paramters.
      • reference_parameters::ReferenceParameters : Reference Parameters.
      source

      Body Geometry

      We begin by defining a matrix of coordinates for the duct and another for the centerbody geometries, for example:

      duct_coordinates = [
      +const dt = DuctAPE

      Assemble Inputs

      The next step is to create the input object of type Propulsor.

      DuctAPE.PropulsorType
      Propulsor(duct_coordinates, centerbody_coordinates, rotorstator_parameters, operating_point, paneling_constants, reference_parameters)

      Arguments

      • duct_coordinates::AbstractMatrix : The [z, r] coordinates of the duct geometry beginning at the inner (casing) side trailing edge and proceeding clockwise. Note that the duct geometry absolute radial position does not need to be included here if the autoshiftduct option is selected.
      • centerbody_coordinates::AbstractMatrix : The [z, r] coordinates of the centerbody beginning at the leading edge and ending at the trailing edge. Note that the leading edge is assumed to be placed at a radial distance of 0.0 from the axis of rotation.
      • operating_point::OperatingPoint : The operating point values.
      • paneling_constants::PanelingConstants : Constants used in re-paneling the geometry.
      • rotorstator_parameters::RotorStatorParameters : Rotor (and possibly stator) geometric paramters.
      • reference_parameters::ReferenceParameters : Reference Parameters.
      source

      Body Geometry

      We begin by defining a matrix of coordinates for the duct and another for the centerbody geometries, for example:

      duct_coordinates = [
           0.304466  0.158439
           0.294972  0.158441
           0.28113   0.158423
      @@ -111,9 +111,9 @@
           centerbody_coordinates[:, 2];
           color=2,
           linewidth=2,
      -    label="Center Body",
      Example block output
      Note

      The body geometry coordinates must be input as columns of z (axial) and r (radial) coordinates, in that order.

      Rotor Geometry

      The next step is to assemble an object of type RotorStatorParameters which contains the geometric information required to define the rotor(s) and their respective blade elements.

      DuctAPE.RotorStatorParametersType
      RotorStatorParameters(
      +    label="Center Body",
      Example block output
      Note

      The body geometry coordinates must be input as columns of z (axial) and r (radial) coordinates, in that order.

      Rotor Geometry

      The next step is to assemble an object of type RotorStatorParameters which contains the geometric information required to define the rotor(s) and their respective blade elements.

      DuctAPE.RotorStatorParametersType
      RotorStatorParameters(
           B, rotorzloc, r, Rhub, Rtip, chords, twists, tip_gap, airfoils, fliplift
      -)

      Composite type containing the rotor(s) geometric properties.

      Note that the actual struct requires the inputs to be arrays, but there is a constructor function that will take in scalars and automatically build the array-based struct.

      Arguments

      • B::AbstractVector{Float} : The number of blades for each rotor. May not be an integer, but usually is.
      • rotorzloc::AbstractVector{Float} : Dimensional, axial position of each rotor.
      • r::AbstractArray{Float} : Non-dimensional radial locations of each blade element.
      • Rhub::AbstractVector{Float} : Dimensional hub radius of rotor. (may be changed if it does not match the radial position of the centerbody geometry at the selected rotorzloc.
      • Rtip::AbstractVector{Float} : Dimensional tip radius of rotor. Is used to determine the radial position of the duct if the autoshiftduct option is selected.
      • chords::AbstractArray{Float} : Dimensional chord lengths of the blade elements.
      • twists::AbstractArray{Float} : Blade element angles, in radians.
      • tip_gap::AbstractVector{Float} : Currently unused, do not set to anything other than zeros.
      • airfoils::AbstractArray{AFType} : Airfoil types describing the airfoil polars for each blade element. Currently only fully tested with C4Blade.DFDCairfoil types.
      • fliplift::AbstractVector{Bool} : flag to indicate if the airfoil lift values should be flipped or not.
      source

      In this example, we have a single rotor defined as follows.

      # number of rotors
      +)

      Composite type containing the rotor(s) geometric properties.

      Note that the actual struct requires the inputs to be arrays, but there is a constructor function that will take in scalars and automatically build the array-based struct.

      Arguments

      • B::AbstractVector{Float} : The number of blades for each rotor. May not be an integer, but usually is.
      • rotorzloc::AbstractVector{Float} : Dimensional, axial position of each rotor.
      • r::AbstractArray{Float} : Non-dimensional radial locations of each blade element.
      • Rhub::AbstractVector{Float} : Dimensional hub radius of rotor. (may be changed if it does not match the radial position of the centerbody geometry at the selected rotorzloc.
      • Rtip::AbstractVector{Float} : Dimensional tip radius of rotor. Is used to determine the radial position of the duct if the autoshiftduct option is selected.
      • chords::AbstractArray{Float} : Dimensional chord lengths of the blade elements.
      • twists::AbstractArray{Float} : Blade element angles, in radians.
      • tip_gap::AbstractVector{Float} : Currently unused, do not set to anything other than zeros.
      • airfoils::AbstractArray{AFType} : Airfoil types describing the airfoil polars for each blade element. Currently only fully tested with C4Blade.DFDCairfoil types.
      • fliplift::AbstractVector{Bool} : flag to indicate if the airfoil lift values should be flipped or not.
      source

      In this example, we have a single rotor defined as follows.

      # number of rotors
       B = 5
       
       # rotor axial location
      @@ -206,7 +206,7 @@
           seriestype=:scatter,
           markersize=3,
           markerstrokewidth=0,
      -    label="Blade Elements",
      Example block output
      Airfoils

      Airfoil types for DuctAPE are currently contained in the C4Blade (Cascade Compatible CCBlade) sub-module of DuctAPE which is exported as c4b and also contains the various airfoil evaluation functions used for the blade element lookups. The available airfoil types include all the airfoil types from CCBlade, as well as DFDCairfoil which is an XROTOR-like parametric cascade polar used in DFDC. In addition there are untested cascade types with similar structure to CCBlades airfoil types called DTCascade. Furthermore, there is an experimental actuator disk model implemented via the ADM airfoil type in C4Blade.

      Operating Point

      Next we will assemble the operating point which contains information about the freestream as well as the rotor rotation rate(s).

      DuctAPE.OperatingPointType
      OperatingPoint(Vinf, rhoinf, muinf, asound, Omega)

      Propulsor operating point information.

      Note that the actual struct requires the inputs to be arrays, but there is a constructor function that will take in scalars and automatically build the array-based struct.

      Also note that even though each field is required to be a vector, only Omega should have more than one entry, and only then if there are more than one rotor. The purpose behind having vector rather than constant scalar inputs here is for ease of redefinition in an optimization setting when freestream design variables may be present.

      Arguments

      • Vinf::AbstractVector{Float} : Freestream velocity magnitude (which is only in the axial direction).
      • rhoinf::AbstractVector{Float} : Freestream density
      • muinf::AbstractVector{Float} : Freestream viscosity
      • asound::AbstractVector{Float} : Freestream speed of sound
      • Omega::AbstractVector{Float} : Rotor rototation rate(s)
      source
      # Freestream
      +    label="Blade Elements",
      Example block output
      Airfoils

      Airfoil types for DuctAPE are currently contained in the C4Blade (Cascade Compatible CCBlade) sub-module of DuctAPE which is exported as c4b and also contains the various airfoil evaluation functions used for the blade element lookups. The available airfoil types include all the airfoil types from CCBlade, as well as DFDCairfoil which is an XROTOR-like parametric cascade polar used in DFDC. In addition there are untested cascade types with similar structure to CCBlades airfoil types called DTCascade. Furthermore, there is an experimental actuator disk model implemented via the ADM airfoil type in C4Blade.

      Operating Point

      Next we will assemble the operating point which contains information about the freestream as well as the rotor rotation rate(s).

      DuctAPE.OperatingPointType
      OperatingPoint(Vinf, rhoinf, muinf, asound, Omega)

      Propulsor operating point information.

      Note that the actual struct requires the inputs to be arrays, but there is a constructor function that will take in scalars and automatically build the array-based struct.

      Also note that even though each field is required to be a vector, only Omega should have more than one entry, and only then if there are more than one rotor. The purpose behind having vector rather than constant scalar inputs here is for ease of redefinition in an optimization setting when freestream design variables may be present.

      Arguments

      • Vinf::AbstractVector{Float} : Freestream velocity magnitude (which is only in the axial direction).
      • rhoinf::AbstractVector{Float} : Freestream density
      • muinf::AbstractVector{Float} : Freestream viscosity
      • asound::AbstractVector{Float} : Freestream speed of sound
      • Omega::AbstractVector{Float} : Rotor rototation rate(s)
      source
      # Freestream
       Vinf = 0.0 # hover condition
       rhoinf = 1.226
       asound = 340.0
      @@ -224,7 +224,7 @@
           dte_minus_cbte,
           nwake_sheets,
           wake_length=1.0,
      -)

      Constants used in re-paneling geometry.

      Note that unlike other input structures, this one, in general, does not define fields as vectors. This is because these values should not change throughout an optimization, even if the geometry may change. Otherwise, discontinuities could be experienced.

      Arguments

      • nduct_inlet::Int : The number of panels to use for the duct inlet (this number is used for both the casing and nacelle re-paneling)
      • ncenterbody_inlet::Int : The number of panels to use for the centerbody inlet.
      • npanels::AbstractVector{Int} : A vector containing the number of panels between discrete locations inside the wake. Specifically, the number of panels between the rotors, between the last rotor and the first body trailing edge, between the body trailing edges (if different), and between the last body trailing edge and the end of the wake. The length of this vector should be N+1 (where N is the number of rotors) if the duct and centerbody trailing edges are aligned, and N+2 if not.
      • dte_minus_cbte::Float : An indicator concerning the hub and duct trailing edge relative locations. Should be set to -1 if the duct trailing edge axial position minus the centerbody trailing edge axial position is negative, +1 if positive (though any positive or negative number will suffice), and zero if the trailing edges are aligned.
      • nwake_sheets::Int : The number of wake sheets to use. Note this will also be setting the number of blade elements to use.
      • wake_length::Float=1.0 : Non-dimensional (based on the length from the foremost body leading edge and the aftmost body trailing edge) length of the wake extending behind the aftmost body trailing edge.
      source
      # number of panels for the duct inlet
      +)

      Constants used in re-paneling geometry.

      Note that unlike other input structures, this one, in general, does not define fields as vectors. This is because these values should not change throughout an optimization, even if the geometry may change. Otherwise, discontinuities could be experienced.

      Arguments

      source
      # number of panels for the duct inlet
       nduct_inlet = 30
       
       # number of panels for the center body inlet
      @@ -248,7 +248,7 @@
       # assemble paneling constants
       paneling_constants = dt.PanelingConstants(
           nduct_inlet, ncenterbody_inlet, npanels, dte_minus_cbte, nwake_sheets, wake_length
      -)

      Reference Parameters

      The reference parameters are used in the post-processing non-dimensionalizations.

      DuctAPE.ReferenceParametersType
      ReferenceParameters(Vref, Rref)

      Reference parameters for post-process non-dimensionalization.

      Note that the actual struct requires the inputs to be arrays, but there is a constructor function that will take in scalars and automatically build the array-based struct.

      Arguments

      • Vref::AbstractVector{Float} : Reference velocity.
      • Rref::AbstractVector{Float} : Reference rotor tip radius.
      source
      # reference velocity (close to average axial velocity at rotor in this case)
      +)

      Reference Parameters

      The reference parameters are used in the post-processing non-dimensionalizations.

      DuctAPE.ReferenceParametersType
      ReferenceParameters(Vref, Rref)

      Reference parameters for post-process non-dimensionalization.

      Note that the actual struct requires the inputs to be arrays, but there is a constructor function that will take in scalars and automatically build the array-based struct.

      Arguments

      • Vref::AbstractVector{Float} : Reference velocity.
      • Rref::AbstractVector{Float} : Reference rotor tip radius.
      source
      # reference velocity (close to average axial velocity at rotor in this case)
       Vref = 50.0
       
       # reference radius (usually tip radius of rotor)
      @@ -264,14 +264,14 @@
           paneling_constants,
           reference_parameters,
       )

      Set Options

      The default options should be sufficient for just starting out and are set through the set_options function.

      DuctAPE.set_optionsFunction
      set_options(; kwargs...)
      -set_options(multipoint; kwargs...)

      Set the options for DuctAPE to use.

      Note that the vast majority of the available options are defined through keyword arguments. See the documentation for the various option types for more information.

      Arguments

      • multipoint::AbstractArray{OperatingPoint} : a vector of operating points to use if running a multi-point analysis.
      source
      options = dt.set_options()
      Options{Bool, Vector{Bool}, Float64, Vector{Int64}, Vector{String}, Vector{String}, DuctAPE.var"#42#47", IntegrationOptions{GaussLegendre{Vector{Float64}, Vector{Float64}}, GaussLegendre{Vector{Float64}, Vector{Float64}}}, ChainSolverOptions{Bool, Int64, DuctAPE.ExternalSolverOptions}, SLORGridSolverOptions{Bool, Float64, Int64}}(false, true, [1], DuctAPE.var"#42#47"(), true, false, 0.05, 1.0e-15, 2.220446049250313e-15, IntegrationOptions{GaussLegendre{Vector{Float64}, Vector{Float64}}, GaussLegendre{Vector{Float64}, Vector{Float64}}}(GaussLegendre{Vector{Float64}, Vector{Float64}}([0.019855071751231856, 0.10166676129318664, 0.2372337950418355, 0.4082826787521751, 0.591717321247825, 0.7627662049581645, 0.8983332387068134, 0.9801449282487682], [0.05061426814518838, 0.11119051722668723, 0.15685332293894372, 0.18134189168918097, 0.18134189168918097, 0.15685332293894372, 0.11119051722668723, 0.05061426814518838]), GaussLegendre{Vector{Float64}, Vector{Float64}}([0.019855071751231856, 0.10166676129318664, 0.2372337950418355, 0.4082826787521751, 0.591717321247825, 0.7627662049581645, 0.8983332387068134, 0.9801449282487682], [0.05061426814518838, 0.11119051722668723, 0.15685332293894372, 0.18134189168918097, 0.18134189168918097, 0.15685332293894372, 0.11119051722668723, 0.05061426814518838])), Bool[0], ["outputs.jl"], false, ["outs"], SLORGridSolverOptions{Bool, Float64, Int64}(200, 2.220446049250313e-16, Bool[0], [0]), ChainSolverOptions{Bool, Int64, DuctAPE.ExternalSolverOptions}(DuctAPE.ExternalSolverOptions[NLsolveOptions{Bool, Float64, Int64, UnionAll, @NamedTuple{}, Symbol}(:anderson, 1.0e-12, 200, LineSearches.MoreThuente, NamedTuple(), Bool[0], [0]), MinpackOptions{Bool, Float64, Int64, Symbol}(:hybr, 1.0e-12, 100, Bool[0], [0]), NLsolveOptions{Bool, Float64, Int64, UnionAll, @NamedTuple{}, Symbol}(:newton, 1.0e-12, 20, LineSearches.MoreThuente, NamedTuple(), Bool[0], [0])], Bool[0, 0, 0], [0, 0, 0]))

      For more advanced option selection, see the examples and API reference.

      Run a Single Analysis

      With the propulsor input build, and the options selected, we are now ready to run an analysis. This is done simply with the analyze function which dispatches the appropriate analysis, solve, and post-processing functions based on the selected options.

      DuctAPE.analyzeMethod
      analyze(
      +set_options(multipoint; kwargs...)

      Set the options for DuctAPE to use.

      Note that the vast majority of the available options are defined through keyword arguments. See the documentation for the various option types for more information.

      Arguments

      • multipoint::AbstractArray{OperatingPoint} : a vector of operating points to use if running a multi-point analysis.
      source
      options = dt.set_options()
      Options{Bool, Vector{Bool}, Float64, Vector{Int64}, Vector{String}, Vector{String}, DuctAPE.var"#42#47", IntegrationOptions{GaussLegendre{Vector{Float64}, Vector{Float64}}, GaussLegendre{Vector{Float64}, Vector{Float64}}}, ChainSolverOptions{Bool, Int64, DuctAPE.ExternalSolverOptions}, SLORGridSolverOptions{Bool, Float64, Int64}}(false, true, [1], DuctAPE.var"#42#47"(), true, false, 0.05, 1.0e-15, 2.220446049250313e-15, IntegrationOptions{GaussLegendre{Vector{Float64}, Vector{Float64}}, GaussLegendre{Vector{Float64}, Vector{Float64}}}(GaussLegendre{Vector{Float64}, Vector{Float64}}([0.019855071751231856, 0.10166676129318664, 0.2372337950418355, 0.4082826787521751, 0.591717321247825, 0.7627662049581645, 0.8983332387068134, 0.9801449282487682], [0.05061426814518838, 0.11119051722668723, 0.15685332293894372, 0.18134189168918097, 0.18134189168918097, 0.15685332293894372, 0.11119051722668723, 0.05061426814518838]), GaussLegendre{Vector{Float64}, Vector{Float64}}([0.019855071751231856, 0.10166676129318664, 0.2372337950418355, 0.4082826787521751, 0.591717321247825, 0.7627662049581645, 0.8983332387068134, 0.9801449282487682], [0.05061426814518838, 0.11119051722668723, 0.15685332293894372, 0.18134189168918097, 0.18134189168918097, 0.15685332293894372, 0.11119051722668723, 0.05061426814518838])), Bool[0], ["outputs.jl"], false, ["outs"], SLORGridSolverOptions{Bool, Float64, Int64}(200, 2.220446049250313e-16, Bool[0], [0]), ChainSolverOptions{Bool, Int64, DuctAPE.ExternalSolverOptions}(DuctAPE.ExternalSolverOptions[NLsolveOptions{Bool, Float64, Int64, UnionAll, @NamedTuple{}, Symbol}(:anderson, 1.0e-12, 200, LineSearches.MoreThuente, NamedTuple(), Bool[0], [0]), MinpackOptions{Bool, Float64, Int64, Symbol}(:hybr, 1.0e-12, 100, Bool[0], [0]), NLsolveOptions{Bool, Float64, Int64, UnionAll, @NamedTuple{}, Symbol}(:newton, 1.0e-12, 20, LineSearches.MoreThuente, NamedTuple(), Bool[0], [0])], Bool[0, 0, 0], [0, 0, 0]))

      For more advanced option selection, see the examples and API reference.

      Run a Single Analysis

      With the propulsor input build, and the options selected, we are now ready to run an analysis. This is done simply with the analyze function which dispatches the appropriate analysis, solve, and post-processing functions based on the selected options.

      DuctAPE.analyzeMethod
      analyze(
           propulsor::Propulsor,
           options::Options=set_options();
           prepost_container_caching=nothing,
           solve_parameter_caching=nothing,
           solve_container_caching=nothing,
           return_inputs=false,
      -)

      Analyze propulsor, including preprocessing.

      Arguments

      • propulsor::Propulsor : Propulsor input object (see docstring for Propulsor type)
      • options::Options=set_options() : Options object (see set_options and related functions)

      Keyword Arguments

      • prepost_container_caching=nothing : Output of allocate_prepost_container_cache
      • solve_parameter_caching=nothing : Output of allocate_solve_parameter_container_cache
      • solve_container_caching=nothing : Output of allocate_solve_container_cache
      • return_inputs=false : flag as to whether or not to return the pre-processed inputs

      Returns

      • outs::NamedTuple : Named Tuple of various analysis outputs (see docstring for postprocess for details), note, if linear system decomposition fails, no solve is performed and an empty vector is returned.
      • ins::NamedTuple : Named Tuple of various pre-processed inputs (e.g. panels and body linear system), will only be returned if return_inputs=true
      • convergence_flag : Flag for successful solve convergence
      source
      outs, success_flag = dt.analyze(propulsor, options)

      Single Run Outputs

      There are many outputs contained in the named tuple output from the analyze function (see the post_process() docstring), but some that may be of immediate interest include:

      # Total Thrust Coefficient
      +)

      Analyze propulsor, including preprocessing.

      Arguments

      Keyword Arguments

      Returns

      source
      outs, success_flag = dt.analyze(propulsor, options)

      Single Run Outputs

      There are many outputs contained in the named tuple output from the analyze function (see the post_process() docstring), but some that may be of immediate interest include:

      # Total Thrust Coefficient
       outs.totals.CT
      0.9693509063670719
      # Total Torque Coefficient
       outs.totals.CQ
      0.10306885180217912

      Run a Multi-Point Analysis

      In the case that one wants to run the same geometry at several different operating points, for example: for a range of advance ratios, there is another dispatch of the analyze function that takes in an input, multipoint, that is a vector of operating points.

      DuctAPE.analyzeMethod
      analyze(
           multipoint::AbstractVector{OperatingPoint},
      @@ -281,7 +281,7 @@
           solve_parameter_caching=nothing,
           solve_container_caching=nothing,
           return_inputs=false,
      -)

      Analyze propulsor, including preprocessing, for a set of operating points.

      Arguments

      • multipoint::AbstractVector{OperatingPoint} : Vector of Operating Points at which to analyze the propulsor (note that the operating point within the propulsor input will be overwritten with these)
      • propulsor::Propulsor : Propulsor input object
      • options::Options=set_options() : Options object

      Keyword Arguments

      • prepost_container_caching=nothing : Output of allocate_prepost_container_cache
      • solve_parameter_caching=nothing : Output of allocate_solve_parameter_container_cache
      • solve_container_caching=nothing : Output of allocate_solve_container_cache
      • return_inputs=false : flag as to whether or not to return the pre-processed inputs

      Returns

      • outs::Vector{NamedTuple} : Vector of named tuples of various analysis outputs (see docstring for postprocess for details), note, if linear system decomposition fails, no solve is performed and an empty vector is returned.
      • ins::NamedTuple : Named Tuple of various pre-processed inputs (e.g. panels and body linear system), will only be returned if return_inputs=true
      • convergence_flag : Flag for successful solve convergence
      source

      Running a multi-point analysis on the example geometry given there, it might look something like this:

      # - Advance Ratio Range - #
      +)

      Analyze propulsor, including preprocessing, for a set of operating points.

      Arguments

      Keyword Arguments

      Returns

      source

      Running a multi-point analysis on the example geometry given there, it might look something like this:

      # - Advance Ratio Range - #
       Js = range(0.0, 2.0; step=0.01)
       
       # - Calculate Vinfs - #
      @@ -394,4 +394,4 @@
           label="DuctAPE Ct"
       )
       
      -plot(pe, ppt; size=(700,350), layout=(1,2), margin=2mm)
      Example block output +plot(pe, ppt; size=(700,350), layout=(1,2), margin=2mm)Example block output diff --git a/dev/assets/plots_default.jl b/dev/assets/plots_default.jl index 29fba7a9..00f12c5a 100644 --- a/dev/assets/plots_default.jl +++ b/dev/assets/plots_default.jl @@ -35,7 +35,7 @@ function plots_default(; dpi=300, # extra_kwargs, # extra_plot_kwargs, - fontfamily="cmunrm", + fontfamily="Palatino_Roman", # fontfamily="Palatino Roman", foreground_color=RGB(128 / 255, 128 / 255, 128 / 255), #gray, plotsgray, # html_output_format, @@ -121,7 +121,7 @@ function plots_default(; # :Subplot ####################### # annotationcolor, - annotationfontfamily="cmunrm", + annotationfontfamily="Palatino_Roman", annotationfontsize=10, # annotationhalign, # annotationrotation, diff --git a/dev/index.html b/dev/index.html index 8d544cbd..0ecde2c9 100644 --- a/dev/index.html +++ b/dev/index.html @@ -1,2 +1,2 @@ -Home · DuctAPE.jl

      DuctAPE.jl [Ducted Axisymmetric Propulsor Evaluation]

      Authors: Judd Mehr,

      Contributers: Taylor McDonnell,

      DuctAPE is a code for the aerodynamic evaluation of axisymmetric ducted propulsors designed for incompressible (low mach) applications. It is strongly influenced by the underlying theory of Ducted Fan Design Code (DFDC), utilizing a linear axisymmetric vortex panel method for duct and center body, blade element lifting line rotor representation, and wake model axisymmetrically smeared onto an elliptic grid for efficient computation. DuctAPE has been developed specifically for applications in gradient-based optimization settings.

      Installation

      pkg> add DuctAPE

      Documentation

      • Start with Getting Started to get up and running.
      • The Advanced Usage tab includes several pages of additional information for customizing your usage.
      • The API tab contains public and private method descriptions.
      • The Theory tab contain several pages on the underlying theory of DuctAPE.
      • The C$^4$Blade tab contains documentation for the C$^4$Blade submodule used for airfoil/cascade management within DuctAPE as well as state initialization.

      Citing

      Mehr, J. and Ning, A., "DuctAPE: A steady-state, axisymmetric ducted fan analysis code designed for gradient-based optimization.," AIAA Aviation Forum, July 2024.

      +Home · DuctAPE.jl

      DuctAPE.jl [Ducted Axisymmetric Propulsor Evaluation]

      Authors: Judd Mehr,

      Contributers: Taylor McDonnell,

      DuctAPE is a code for the aerodynamic evaluation of axisymmetric ducted propulsors designed for incompressible (low mach) applications. It is strongly influenced by the underlying theory of Ducted Fan Design Code (DFDC), utilizing a linear axisymmetric vortex panel method for duct and center body, blade element lifting line rotor representation, and wake model axisymmetrically smeared onto an elliptic grid for efficient computation. DuctAPE has been developed specifically for applications in gradient-based optimization settings.

      Installation

      pkg> add DuctAPE

      Documentation

      • Start with Getting Started to get up and running.
      • The Advanced Usage tab includes several pages of additional information for customizing your usage.
      • The API tab contains public and private method descriptions.
      • The Theory tab contain several pages on the underlying theory of DuctAPE.
      • The C$^4$Blade tab contains documentation for the C$^4$Blade submodule used for airfoil/cascade management within DuctAPE as well as state initialization.

      Citing

      Mehr, J. and Ning, A., "DuctAPE: A steady-state, axisymmetric ducted fan analysis code designed for gradient-based optimization.," AIAA Aviation Forum, July 2024.