From c1d48fef9418d970e5b628d52d0dd859e88866e7 Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Thu, 26 Sep 2024 18:02:34 +0000 Subject: [PATCH] build based on 441e0b2 --- dev/.documenter-siteinfo.json | 2 +- dev/C4Blade/airfoil_types/CCBlade/index.html | 10 +- dev/C4Blade/airfoil_types/DFDC/index.html | 2 +- .../airfoil_types/actuator_disk/index.html | 2 +- dev/C4Blade/airfoil_types/cascade/index.html | 2 +- dev/C4Blade/api/index.html | 2 +- dev/C4Blade/corrections/index.html | 12 +- dev/C4Blade/intro/index.html | 2 +- .../manual_repaneling/index.html | 2 +- dev/DuctAPE/advanced_usage/option/index.html | 8 +- dev/DuctAPE/advanced_usage/outputs/index.html | 4 +- .../advanced_usage/precompilation/index.html | 8 +- dev/DuctAPE/api/api_index/index.html | 2 +- dev/DuctAPE/api/private_api/index.html | 2 +- .../api/private_postprocess/index.html | 26 +- dev/DuctAPE/api/private_prelims/index.html | 10 +- dev/DuctAPE/api/private_preprocess/index.html | 118 ++++---- dev/DuctAPE/api/private_process/index.html | 32 +-- dev/DuctAPE/api/private_utilities/index.html | 4 +- dev/DuctAPE/api/public_api/index.html | 22 +- dev/DuctAPE/theory/index.html | 2 +- .../tutorial/{0e13708d.svg => 4fcb4520.svg} | 90 +++--- .../tutorial/{8c3dfa6d.svg => 7fde5643.svg} | 66 ++--- .../tutorial/{87614f11.svg => a865ad77.svg} | 262 +++++++++--------- dev/DuctAPE/tutorial/index.html | 22 +- dev/index.html | 2 +- dev/objects.inv | Bin 5236 -> 5207 bytes dev/search_index.js | 2 +- 28 files changed, 359 insertions(+), 359 deletions(-) rename dev/DuctAPE/tutorial/{0e13708d.svg => 4fcb4520.svg} (77%) rename dev/DuctAPE/tutorial/{8c3dfa6d.svg => 7fde5643.svg} (81%) rename dev/DuctAPE/tutorial/{87614f11.svg => a865ad77.svg} (78%) diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index fd92967a..0470b391 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.10.5","generation_timestamp":"2024-09-26T17:49:27","documenter_version":"1.7.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.10.5","generation_timestamp":"2024-09-26T18:02:13","documenter_version":"1.7.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 a998946a..de54cdd1 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 7ce42895..8000fd98 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
  • correct_for_mach::Bool : flag to add Prandtl-Glauert correction
  • correct_for_cascade::Bool : flag to add cascade corrections
  • correct_for_reynolds::Bool : flag to add reynolds drag correction
  • correct_for_transonic::Bool : flag to add drag correction above 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
  • correct_for_mach::Bool : flag to add Prandtl-Glauert correction
  • correct_for_cascade::Bool : flag to add cascade corrections
  • correct_for_reynolds::Bool : flag to add reynolds drag correction
  • correct_for_transonic::Bool : flag to add drag correction above 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 300a230e..66843923 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 b1d2ff67..f97f4e56 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 0710dca3..d70f067b 100644 --- a/dev/C4Blade/api/index.html +++ b/dev/C4Blade/api/index.html @@ -1,2 +1,2 @@ -API Reference · DuctAPE.jl
+API Reference · DuctAPE.jl
diff --git a/dev/C4Blade/corrections/index.html b/dev/C4Blade/corrections/index.html index e9e984b6..1b55f24b 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 18b654ef..bcd3381e 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 cd56b9b9..6fade451 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 93f27721..f0376a46 100644 --- a/dev/DuctAPE/advanced_usage/option/index.html +++ b/dev/DuctAPE/advanced_usage/option/index.html @@ -1,6 +1,6 @@ -Options · DuctAPE.jl

Advanced Option Selection

DuctAPE has been written in an attempt to make as many of the available options exposed to the user as possible. This means that there are quite a few options to select from if not using the option convenience functions. To help the user, the majority of overarching option types are defined using the @kwdef macro and have default values that should be reasonable in most cases. We will introduce some of the available options here that may be of common interest.

General Option Selection

In general, options are all accessed through the options argument of the analysis function being called. Said options are passed via an Options struct.

DuctAPE.OptionsType
struct Options

Type containing (nearly) all the available user options.

Fields

General Options

  • verbose::Bool = false : flag to print verbose statements
  • silence_warnings::Bool = true : flag to silence warnings
  • multipoint_index::Int = [1] : holds current index of multi-point solver (no need for user to change this usually)

Pre-processing Options

Geometry interpolation and generation options :

  • finterp::Interplation Method = FLOWMath.akima : interpolation method used for re-paneling bodies
  • autoshiftduct::Bool = true : flag as to whether duct geometry should be shifted based on rotor tip location
  • lu_decomp_flag::Bool = false : flag indicating if panel method LHS matrix factorization was successful

paneling options

  • itcpshift::Float = 0.05 : factor for internal trailing edge psuedo-panel placement (default is DFDC hard-coded value)
  • axistol::Float = 1e-15 : tolerance for how close the the axis of rotation should be considered on the axis
  • tegaptol::Float = 1e1 * eps() : tolerance for how large of a trailing edge gap should be considered a gap

Integration Options

  • integration_options::IntegrationOptions type = IntegrationOptions() : integration options

Post-processing Options

  • write_outputs::AbstractArray{Bool} = [false] : Bool for whether to write the outputs of the analysis to an external file (slow)
  • outfile::AbstractArray{String} = ["outputs.jl"] : External output file name (including path information) for files to write
  • checkoutfileexists::Bool = false : Flag for whether to check if file exists before overwriting
  • output_tuple_name::AbstractArray{String} = ["outs"] : variable name for named tuple written to out file

Solving Options

  • grid_solver_options::GridSolverOptionsType = GridSolverOptions() : elliptic grid solver options
  • solver_options::SolverOptionsType = ChainSolverOptions() : solver 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

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)
+Options · DuctAPE.jl

Advanced Option Selection

DuctAPE has been written in an attempt to make as many of the available options exposed to the user as possible. This means that there are quite a few options to select from if not using the option convenience functions. To help the user, the majority of overarching option types are defined using the @kwdef macro and have default values that should be reasonable in most cases. We will introduce some of the available options here that may be of common interest.

General Option Selection

In general, options are all accessed through the options argument of the analysis function being called. Said options are passed via an Options struct.

DuctAPE.OptionsType
struct Options

Type containing (nearly) all the available user options.

Fields

General Options

  • verbose::Bool = false : flag to print verbose statements
  • silence_warnings::Bool = true : flag to silence warnings
  • multipoint_index::Int = [1] : holds current index of multi-point solver (no need for user to change this usually)

Pre-processing Options

Geometry interpolation and generation options :

  • finterp::Interplation Method = FLOWMath.akima : interpolation method used for re-paneling bodies
  • autoshiftduct::Bool = true : flag as to whether duct geometry should be shifted based on rotor tip location
  • lu_decomp_flag::Bool = false : flag indicating if panel method LHS matrix factorization was successful

paneling options

  • itcpshift::Float = 0.05 : factor for internal trailing edge psuedo-panel placement (default is DFDC hard-coded value)
  • axistol::Float = 1e-15 : tolerance for how close the the axis of rotation should be considered on the axis
  • tegaptol::Float = 1e1 * eps() : tolerance for how large of a trailing edge gap should be considered a gap

Integration Options

  • integration_options::IntegrationOptions type = IntegrationOptions() : integration options

Post-processing Options

  • write_outputs::AbstractArray{Bool} = [false] : Bool for whether to write the outputs of the analysis to an external file (slow)
  • outfile::AbstractArray{String} = ["outputs.jl"] : External output file name (including path information) for files to write
  • checkoutfileexists::Bool = false : Flag for whether to check if file exists before overwriting
  • output_tuple_name::AbstractArray{String} = ["outs"] : variable name for named tuple written to out file

Solving Options

  • grid_solver_options::GridSolverOptionsType = GridSolverOptions() : elliptic grid solver options
  • solver_options::SolverOptionsType = ChainSolverOptions() : solver 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

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)
@@ -17,7 +17,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:

  • SLOR: DFDC grid solver
  • Default: Default method compatible with ImplicitAD

The SLOR (successive line over relaxation) is the method employed by DFDC.

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 <: GridSolverOptionsType

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

Fields

  • iteration_limit::Int = 100 : maximum number of iterations
  • atol::Float = 1e-9 : absolute convergence tolerance
  • converged::AbstractArray{Bool} = [false]
  • iterations::AbstractArray{Int} = [0] : iteration counter
source

And for the default method compatible with ImplicitAD, the type is

DuctAPE.GridSolverOptionsType
struct GridSolverOptions <: GridSolverOptionsType

Options for SLOR + Newton elliptic grid solver.

Fields

  • iteration_limit::Int = 10 : maximum number of iterations
  • atol::Float = 1e-14 : absolute convergence tolerance
  • algorithm::Symbol = :newton : algorithm to use in NLsolve.jl
  • autodiff::Symbol = :forward : differentiation method to use in NLsolve.jl
  • converged::AbstractArray{Bool} = [false]
  • iterations::AbstractArray{Int} = [0] : iteration counter
source

As an example, this is the input that would be required to use the default method with an absolute convergence tolerance of 1e-10, 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:

  • SLOR: DFDC grid solver
  • Default: Default method compatible with ImplicitAD

The SLOR (successive line over relaxation) is the method employed by DFDC.

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 <: GridSolverOptionsType

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

Fields

  • iteration_limit::Int = 100 : maximum number of iterations
  • atol::Float = 1e-9 : absolute convergence tolerance
  • converged::AbstractArray{Bool} = [false]
  • iterations::AbstractArray{Int} = [0] : iteration counter
source

And for the default method compatible with ImplicitAD, the type is

DuctAPE.GridSolverOptionsType
struct GridSolverOptions <: GridSolverOptionsType

Options for SLOR + Newton elliptic grid solver.

Fields

  • iteration_limit::Int = 10 : maximum number of iterations
  • atol::Float = 1e-14 : absolute convergence tolerance
  • algorithm::Symbol = :newton : algorithm to use in NLsolve.jl
  • autodiff::Symbol = :forward : differentiation method to use in NLsolve.jl
  • converged::AbstractArray{Bool} = [false]
  • iterations::AbstractArray{Int} = [0] : iteration counter
source

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

# define wake grid solver settings
 wake_solve_options = DuctAPE.GridSolverOptions(; atol=1e-10)
 
 # set all options
@@ -69,4 +69,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 4efdcf36..dd3dd6e9 100644 --- a/dev/DuctAPE/advanced_usage/outputs/index.html +++ b/dev/DuctAPE/advanced_usage/outputs/index.html @@ -1,5 +1,5 @@ -Outputs · DuctAPE.jl

Available Outputs

The output tuple contains many items. The post_process function docstring lists them. The purpose of showing this function here is not for you to manually run the fuction or apply any advanced usage, but simply rather for you to see what the available outputs are, as several of them may apply to advanced usage cases.

DuctAPE.post_processFunction
post_process(
+Outputs · DuctAPE.jl

The output tuple contains many items. The post_process function docstring lists them. The purpose of showing this function here is not for you to manually run the fuction or apply any advanced usage, but simply rather for you to see what the available outputs are, as several of them may apply to advanced usage cases.

DuctAPE.post_processFunction
post_process(
     solver_options,
     converged_states,
     prepost_containers,
@@ -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

  • 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

Returning the Pre-process Objects

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

  • panels which is a named tuple containing the body, rotor, and wake panel objects
  • ivb which are the unit induced velocities on the body panels
  • solve_parameter_tuple which contains all of the solver parameters
  • blade_elements which contains all of the blade element geometry and airfoil information
  • linsys which contains all the linear system objects for the panel method
  • idmaps which contains all the index mapping used throughout the solve and post-process.

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(ducted_rotor, operating_point, reference_parameters; return_inputs=true)
+)

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

Returning the Pre-process Objects

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

  • panels which is a named tuple containing the body, rotor, and wake panel objects
  • ivb which are the unit induced velocities on the body panels
  • solve_parameter_tuple which contains all of the solver parameters
  • blade_elements which contains all of the blade element geometry and airfoil information
  • linsys which contains all the linear system objects for the panel method
  • idmaps which contains all the index mapping used throughout the solve and post-process.

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(ducted_rotor, operating_point, reference_parameters; return_inputs=true)
diff --git a/dev/DuctAPE/advanced_usage/precompilation/index.html b/dev/DuctAPE/advanced_usage/precompilation/index.html index 9fc76cff..79bc60ce 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 chunk 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 chunk 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 chunk 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 chunk 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,7 +22,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 chunk 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 chunk 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

As an example of how to run this function, we'll grab solver options and oaneling constants from previous examples

# - grab an object of SolverOptionsType defined in a previous example - #
+)

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 chunk 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 chunk 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

As an example of how to run this function, we'll grab solver options and oaneling constants from previous examples

# - grab an object of SolverOptionsType defined in a previous example - #
 aero_solver_options = DuctAPE.NLsolveOptions(;
     algorithm=:newton,
     atol=1e-10,
@@ -69,4 +69,4 @@
     solve_parameter_caching=nothing,
     solve_container_caching=nothing,
     return_inputs=false,
-)

Analyze ducted_rotor, including preprocessing.

Arguments

Keyword Arguments

Returns

source +)

Analyze ducted_rotor, 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 e79bc58a..cf264d6a 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 a06dc9ad..4db74c21 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 25cb2c1c..ad4106f8 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 02f1a375..3c8b3a67 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

  • 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.InternalSolverOptionsType
abstract type InternalSolverOptions <: SolverOptionsType

Used for solver dispatch.

source
DuctAPE.InternalPolyAlgorithmOptionsType
abstract type InternalPolyAlgorithmOptions <: SolverOptionsType

Used for solver dispatch.

source
DuctAPE.ExternalSolverOptionsType
abstract type ExternalSolverOptions <: SolverOptionsType

Used for solver dispatch.

source
DuctAPE.ExternalPolyAlgorithmOptionsType
abstract type ExternalPolyAlgorithmOptions <: 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 chunk 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.InternalSolverOptionsType
abstract type InternalSolverOptions <: SolverOptionsType

Used for solver dispatch.

source
DuctAPE.InternalPolyAlgorithmOptionsType
abstract type InternalPolyAlgorithmOptions <: SolverOptionsType

Used for solver dispatch.

source
DuctAPE.ExternalSolverOptionsType
abstract type ExternalSolverOptions <: SolverOptionsType

Used for solver dispatch.

source
DuctAPE.ExternalPolyAlgorithmOptionsType
abstract type ExternalPolyAlgorithmOptions <: 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 chunk 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 45b13984..18f9a8ce 100644 --- a/dev/DuctAPE/api/private_preprocess/index.html +++ b/dev/DuctAPE/api/private_preprocess/index.html @@ -1,5 +1,5 @@ -Preprocess · DuctAPE.jl

General

DuctAPE.set_index_mapsFunction
set_index_maps(
+Preprocess · DuctAPE.jl

General

DuctAPE.set_index_mapsFunction
set_index_maps(
     npanels,
     ncenterbody_inlet,
     nwake_sheets,
@@ -12,7 +12,7 @@
     ndp,
     riiw,
     nrotor,
-)

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

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(
     ducted_rotor,
     operating_point;
     grid_solver_options=GridSolverOptions(),
@@ -24,7 +24,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

  • ducted_rotor::DuctedRotor : A DuctedRotor object
  • operating_point::OperatingPoint : A OperatingPoint 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

  • ducted_rotor::DuctedRotor : A DuctedRotor object
  • operating_point::OperatingPoint : A OperatingPoint 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,
@@ -41,7 +41,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,
@@ -60,7 +60,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,
@@ -82,7 +82,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,
@@ -93,7 +93,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
  • rotor::Rotor : A Rotor 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
  • rotor::Rotor : A Rotor 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,
@@ -108,7 +108,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(
     rp_duct_coordinates,
     rp_centerbody_coordinates,
     nwake_sheets,
@@ -119,7 +119,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 Rotor)
  • 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 Rotor)
  • 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,
@@ -131,14 +131,14 @@
     axistol=1e-15,
     tegaptol=1e1 * eps(),
     silence_warnings=true,
-)

In-place version of generate_all_panels.

source

Wake

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,
@@ -149,7 +149,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,
@@ -160,16 +160,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_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!(
     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:

  • wake_grid::Array{Float} : initial guess for grid points.

Keyword Arguments:

  • iteration_limit::Int : maximum number of iterations to run, default=100
  • atol::Float : convergence tolerance, default = 1e-9
source
DuctAPE.solve_elliptic_grid!Function
solve_elliptic_grid!(
+)

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:

  • wake_grid::Array{Float} : initial guess for grid points.

Keyword Arguments:

  • iteration_limit::Int : maximum number of iterations to run, default=100
  • atol::Float : convergence tolerance, default = 1e-9
source
DuctAPE.solve_elliptic_grid!Function
solve_elliptic_grid!(
     wake_grid;
     algorithm=:trust_region,
     autodiff=:forward,
@@ -177,7 +177,7 @@
     iteration_limit=10,
     converged=[false],
     verbose=false,
-)

Solve for elliptic grid using a non-SLOR approach that is compatible with ImplicitAD

Arguments:

  • wake_grid::Array{Float} : initial guess for grid points.

Keyword Arguments:

  • algorithm::Symbol=:trust_region : NLsolve algorithm type
  • autodiff::Symbol=:forward : NLsolve derivatives option
  • atol::Float=1e-10 : convergence tolerance, default = 1e-9
  • iteration_limit::Int=10 : maximum number of iterations to run, default=100
  • converged::Vector{Bool}=[false] : convergence flag
  • verbose::Bool=false : flag to print verbose statements
source
DuctAPE.solve_elliptic_gridFunction
solve_elliptic_grid!(x,p)

Solve for elliptic grid using a non-SLOR approach that is compatible with ImplicitAD

Arguments:

  • x::Vector{Float} : inputs (including initial guess for wake grid points)
  • p::NamedTuple : constant parameters

Returns:

  • converged_states::Vector{Float} : converged states for grid solver
source
DuctAPE.elliptic_grid_residual!Function
elliptic_grid_residual!(r, y, x, p)

Residual function for elliptic grid solver.

Note: We assume grid has radial lines of constant axial position (as is done in the grid initialization) such that z'(ξ)=1.0 and z''(ξ)=z'(η)=z''(η)=0.0.

Arguments

  • r::Vector{Float} : residual values
  • y::Vector{Float} : states
  • x::Vector{Float} : inputs (to which derivatives are sensitive)
  • p::Vector{Float} : constants
source
DuctAPE.backward_stencil_1Function
backward_stencil_1(f, x)

Three-point, backward difference scheme on a non-uniform grid.

Arguments:

  • f::AbstractMatrix{Float} : f(x) for x{i-2}:x{i}
  • x::AbstractVector{Float} : [x{i-2}:x{i}]

Returns:

  • f'(x)::Float : ∂f/∂x at x_i
source
DuctAPE.center_stencil_1Function
center_stencil_1(f, x)

Three-point, central difference scheme on a non-uniform grid, for first derivatives.

Arguments:

  • f::AbstractMatrix{Float} : f(x) for x{i-1}:x{i+1}
  • x::AbstractVector{Float} : [x{i-1}:x{i+1}]

Returns:

  • f'(x)::Float : ∂f/∂x at x_i
source
DuctAPE.center_stencil_2Function
center_stencil_2(f, x)

Three-point, central difference scheme on a non-uniform grid, for second derivatives.

Arguments:

  • f::AbstractMatrix{Float} : f(x) for x{i-1}:x{i+1}
  • x::AbstractVector{Float} : [x{i-1}:x{i+1}]

Returns:

  • f''(x)::Float : ∂^2f/∂x^2 at x_i
source
DuctAPE.center_stencil_2_mixedFunction
center_stencil_2_mixed(f, x, y)

Three-point, central difference scheme on a non-uniform grid, for mixed derivatives. Uses a consecutive first derivative central difference (center_stencil_1) in the x-dimension then another centeral difference of the f'(x) values in the y-dimension.

Arguments:

  • f::AbstractMatrix{Float} : f(x,y) for x{i-1}:x{i+1} and y{i-1}:y{i+1}
  • x::AbstractVector{Float} : [x{i-1}:x{i+1}]
  • y::AbstractVector{Float} : [y{i-1}:y{i+1}]

Returns:

  • f'(x,y)::Float : ∂^2f/∂x∂y at x_ij
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.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

Bodies

DuctAPE.reinterpolate_bodies!Function
reinterpolate_bodies!(
+)

Solve for elliptic grid using a non-SLOR approach that is compatible with ImplicitAD

Arguments:

  • wake_grid::Array{Float} : initial guess for grid points.

Keyword Arguments:

  • algorithm::Symbol=:trust_region : NLsolve algorithm type
  • autodiff::Symbol=:forward : NLsolve derivatives option
  • atol::Float=1e-10 : convergence tolerance, default = 1e-9
  • iteration_limit::Int=10 : maximum number of iterations to run, default=100
  • converged::Vector{Bool}=[false] : convergence flag
  • verbose::Bool=false : flag to print verbose statements
source
DuctAPE.solve_elliptic_gridFunction
solve_elliptic_grid!(x,p)

Solve for elliptic grid using a non-SLOR approach that is compatible with ImplicitAD

Arguments:

  • x::Vector{Float} : inputs (including initial guess for wake grid points)
  • p::NamedTuple : constant parameters

Returns:

  • converged_states::Vector{Float} : converged states for grid solver
source
DuctAPE.elliptic_grid_residual!Function
elliptic_grid_residual!(r, y, x, p)

Residual function for elliptic grid solver.

Note: We assume grid has radial lines of constant axial position (as is done in the grid initialization) such that z'(ξ)=1.0 and z''(ξ)=z'(η)=z''(η)=0.0.

Arguments

  • r::Vector{Float} : residual values
  • y::Vector{Float} : states
  • x::Vector{Float} : inputs (to which derivatives are sensitive)
  • p::Vector{Float} : constants
source
DuctAPE.backward_stencil_1Function
backward_stencil_1(f, x)

Three-point, backward difference scheme on a non-uniform grid.

Arguments:

  • f::AbstractMatrix{Float} : f(x) for x{i-2}:x{i}
  • x::AbstractVector{Float} : [x{i-2}:x{i}]

Returns:

  • f'(x)::Float : ∂f/∂x at x_i
source
DuctAPE.center_stencil_1Function
center_stencil_1(f, x)

Three-point, central difference scheme on a non-uniform grid, for first derivatives.

Arguments:

  • f::AbstractMatrix{Float} : f(x) for x{i-1}:x{i+1}
  • x::AbstractVector{Float} : [x{i-1}:x{i+1}]

Returns:

  • f'(x)::Float : ∂f/∂x at x_i
source
DuctAPE.center_stencil_2Function
center_stencil_2(f, x)

Three-point, central difference scheme on a non-uniform grid, for second derivatives.

Arguments:

  • f::AbstractMatrix{Float} : f(x) for x{i-1}:x{i+1}
  • x::AbstractVector{Float} : [x{i-1}:x{i+1}]

Returns:

  • f''(x)::Float : ∂^2f/∂x^2 at x_i
source
DuctAPE.center_stencil_2_mixedFunction
center_stencil_2_mixed(f, x, y)

Three-point, central difference scheme on a non-uniform grid, for mixed derivatives. Uses a consecutive first derivative central difference (center_stencil_1) in the x-dimension then another centeral difference of the f'(x) values in the y-dimension.

Arguments:

  • f::AbstractMatrix{Float} : f(x,y) for x{i-1}:x{i+1} and y{i-1}:y{i+1}
  • x::AbstractVector{Float} : [x{i-1}:x{i+1}]
  • y::AbstractVector{Float} : [y{i-1}:y{i+1}]

Returns:

  • f'(x,y)::Float : ∂^2f/∂x∂y at x_ij
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.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

Bodies

DuctAPE.reinterpolate_bodies!Function
reinterpolate_bodies!(
     rp_duct_coordinates,
     rp_centerbody_coordinates,
     duct_coordinates,
@@ -186,13 +186,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 Rotor inputs and number of desired blade elements (from number of wake sheet in PanelingConstants input)

Arguments

  • rsp::Rotor : A Rotor 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 Rotor inputs and number of desired blade elements (from number of wake sheet in PanelingConstants input)

Arguments

  • rsp::Rotor : A Rotor 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,
@@ -200,16 +200,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.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.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.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

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.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,
@@ -218,14 +218,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

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_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_trailing_edge_gap_panel!Function
induced_velocities_from_trailing_edge_gap_panel!(
     VEL,
     controlpoint,
     tenode,
@@ -259,9 +259,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,
@@ -270,7 +270,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,
@@ -278,7 +278,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,
@@ -287,7 +287,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_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,
@@ -299,7 +299,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,
@@ -307,7 +307,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,
@@ -316,31 +316,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_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.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_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.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

Quadrature

Integrands

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

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.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.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.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.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.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.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.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.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

Integrals

Integrals

DuctAPE.nominal_vortex_panel_integrationFunction
nominal_vortex_panel_integration(
     integration_options,
     node1,
     node2,
@@ -348,7 +348,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,
@@ -357,7 +357,7 @@
     controlpoint,
     containers;
     debug=false,
-)

In-place version of nominal_vortex_panel_integration.

source
DuctAPE.self_vortex_panel_integrationFunction
self_vortex_panel_integration(
     integration_options,
     node1,
     node2,
@@ -365,7 +365,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,
@@ -374,7 +374,7 @@
     controlpoint,
     containers;
     debug=false,
-)

In-place version of self_vortex_panel_integration.

source
DuctAPE.nominal_source_panel_integrationFunction
nominal_source_panel_integration(
     integration_options,
     node1,
     node2,
@@ -382,7 +382,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,
@@ -391,7 +391,7 @@
     controlpoint,
     containers;
     debug=false,
-)

In-place version of nominal_source_panel_integration.

source
DuctAPE.self_source_panel_integrationFunction
self_source_panel_integration(
     integration_options,
     node1,
     node2,
@@ -399,7 +399,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,
@@ -408,7 +408,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.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,
@@ -417,7 +417,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,
@@ -435,7 +435,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,
@@ -452,4 +452,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

  • 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
diff --git a/dev/DuctAPE/api/private_process/index.html b/dev/DuctAPE/api/private_process/index.html index 9413a607..04372121 100644 --- a/dev/DuctAPE/api/private_process/index.html +++ b/dev/DuctAPE/api/private_process/index.html @@ -1,5 +1,5 @@ -Process · DuctAPE.jl

Analysis

DuctAPE.analyze_multipointFunction
analyze_multipoint(
+Process · DuctAPE.jl

Analysis

DuctAPE.analyze_multipointFunction
analyze_multipoint(
     ducted_rotor::DuctedRotor,
     operating_point::OperatingPoint,
     reference_parameters::ReferenceParameters
@@ -13,7 +13,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 ducted_rotor 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 ducted_rotor with the explicit operating point input.

source

Process

DuctAPE.processFunction
process(
     solver_options::SolverOptionsType,
     solve_parameter_cache_vector,
     solve_parameter_cache_dims,
@@ -22,12 +22,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

Solvers

ModCSOR
DuctAPE.mod_COR_solverFunction
mod_COR_solver(
+)

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

Internal Solvers

ModCSOR

DuctAPE.mod_COR_solverFunction
mod_COR_solver(
     r_fun!,
     states,
     B,
@@ -35,7 +35,7 @@
     convergence_tolerance=1e-10,
     iteration_limit=500,
     relaxation_parameters=(; nrf=0.4, bt1=0.2, bt2=0.6, pf1=0.4, pf2=0.5, btw=0.6, pfw=1.2),
-)

Modified DFDC-like CSOR solver that updates all states before relaxing Gamr and gamw.

Arguments:

  • r_fun!::function handle : the residual function for the solver to use
  • initial_states::Vector{Float} : the inital guess for the states
  • B::Vector{Float} : number of blades on each rotor (used in state relaxation)
  • state_dims::NamedTuple : dimensions of the states (used in state relaxation)

Keyword Arguments

  • convergence_tolerance::type=1e-10 : absolute convergence tolerance
  • iteration_limit::type=500 : maximum number of iterations
  • relaxation_parameters::type=(; nrf=0.4, bt1=0.2, bt2=0.6, pf1=0.4, pf2=0.5, btw=0.6, pfw=1.2) : parameters used in state relaxation
source
DuctAPE.relax_Gamr_mod!Function
relax_Gamr_mod!(
+)

Modified DFDC-like CSOR solver that updates all states before relaxing Gamr and gamw.

Arguments:

  • r_fun!::function handle : the residual function for the solver to use
  • initial_states::Vector{Float} : the inital guess for the states
  • B::Vector{Float} : number of blades on each rotor (used in state relaxation)
  • state_dims::NamedTuple : dimensions of the states (used in state relaxation)

Keyword Arguments

  • convergence_tolerance::type=1e-10 : absolute convergence tolerance
  • iteration_limit::type=500 : maximum number of iterations
  • relaxation_parameters::type=(; nrf=0.4, bt1=0.2, bt2=0.6, pf1=0.4, pf2=0.5, btw=0.6, pfw=1.2) : parameters used in state relaxation
source
DuctAPE.relax_Gamr_mod!Function
relax_Gamr_mod!(
     Gamr,
     r_Gamr_current,
     r_Gamr_previous,
@@ -46,13 +46,13 @@
     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
  • B::Vector{Float} : number of blades on each rotor
  • r_Gamr_current::Array{Float} : Array of current iteration's differences in circulation values
  • r_Gamr_previous::Array{Float} : Array of previous iteration's differences in circulation values, updated in place

Keyword Arguments:

  • 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_mod!Function
relax_gamw_mod!(gamw, r_gamw_current, r_gamw_previous; nrf=0.4, btw=0.6, pfw=1.2)

Apply relaxed step to gamw.

Arguments

  • gamw::Array{Float} : Array of rotor circulations (columns = rotors, rows = blade elements), updated in place
  • r_gamw_current::Array{Float} : Array of current iteration's differences in circulation values
  • r_gamw_previous::Array{Float} : Array of previous iteration's differences in circulation values, updated in place

Keyword Arguments

  • 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.update_states!Function
update_states!(states, r_current, r_previous, B, relaxation_parameters, state_dims)

Update states using DFDC-like relaxation methods.

Arguments

  • states::Vector{Float} : current iteration states to update
  • r_current::Vector{Float} : current iteration residual values
  • r_previous::Vector{Float} : previous iteration residual values
  • B::Vector{Float} : number of blades for each rotor
  • relaxation_parameters::NamedTuple : relaxation parameters
  • state_dims::NamedTuple : dimensions of the state variables
  • solver_options::SolverOptionsType : used for dispatch
source
CSOR
DuctAPE.apply_relaxation_scheduleFunction
apply_relaxation_schedule(
+)

Apply relaxed step to Gamr.

Arguments

  • Gamr::Array{Float} : Array of rotor circulations (columns = rotors, rows = blade elements), updated in place
  • B::Vector{Float} : number of blades on each rotor
  • r_Gamr_current::Array{Float} : Array of current iteration's differences in circulation values
  • r_Gamr_previous::Array{Float} : Array of previous iteration's differences in circulation values, updated in place

Keyword Arguments:

  • 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_mod!Function
relax_gamw_mod!(gamw, r_gamw_current, r_gamw_previous; nrf=0.4, btw=0.6, pfw=1.2)

Apply relaxed step to gamw.

Arguments

  • gamw::Array{Float} : Array of rotor circulations (columns = rotors, rows = blade elements), updated in place
  • r_gamw_current::Array{Float} : Array of current iteration's differences in circulation values
  • r_gamw_previous::Array{Float} : Array of previous iteration's differences in circulation values, updated in place

Keyword Arguments

  • 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.update_states!Function
update_states!(states, r_current, r_previous, B, relaxation_parameters, state_dims)

Update states using DFDC-like relaxation methods.

Arguments

  • states::Vector{Float} : current iteration states to update
  • r_current::Vector{Float} : current iteration residual values
  • r_previous::Vector{Float} : previous iteration residual values
  • B::Vector{Float} : number of blades for each rotor
  • relaxation_parameters::NamedTuple : relaxation parameters
  • state_dims::NamedTuple : dimensions of the state variables
  • solver_options::SolverOptionsType : used for dispatch
source

CSOR

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
DuctAPE.relax_Gamr!Function
relax_Gamr!(
+)

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
DuctAPE.relax_Gamr!Function
relax_Gamr!(
     Gamr,
     delta_prev_mat,
     delta_mat,
@@ -65,9 +65,9 @@
     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
  • maxBGamr::Array{Float} : stores value of maximum B*Gamr for each rotor
  • maxdeltaBGamr::Array{Float} : stores value of maximum change in B*Gamr for each rotor
  • 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
  • maxBGamr::Array{Float} : stores value of maximum B*Gamr for each rotor
  • maxdeltaBGamr::Array{Float} : stores value of maximum change in B*Gamr for each rotor
  • 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
  • maxdeltagamw::Array{Float} : Single element array that gets updated with the new maximum change in gamw.

Keyword Arguments:

  • 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

Residuals

ModCSOR
DuctAPE.mod_CSOR_residual!Function
mod_CSOR_residual!(r, current_states, inputs, constants)

Modified DFDC-like CSOR residual that does not include any relaxation within the residual calculation.

Arguments

  • r::Vector{Float} : solve residual
  • current_states::Vector{Float} : solve states
  • inputs::Vector{Float} : solve inputs
  • constants::Vector{Float} : solve constants
source
DuctAPE.estimate_CSOR_states!Function
estimate_CSOR_states!(
+)

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
  • maxdeltagamw::Array{Float} : Single element array that gets updated with the new maximum change in gamw.

Keyword Arguments:

  • 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

Residuals

ModCSOR

DuctAPE.mod_CSOR_residual!Function
mod_CSOR_residual!(r, current_states, inputs, constants)

Modified DFDC-like CSOR residual that does not include any relaxation within the residual calculation.

Arguments

  • r::Vector{Float} : solve residual
  • current_states::Vector{Float} : solve states
  • inputs::Vector{Float} : solve inputs
  • constants::Vector{Float} : solve constants
source
DuctAPE.estimate_CSOR_states!Function
estimate_CSOR_states!(
     solve_containers,
     Gamr,
     sigr,
@@ -80,7 +80,7 @@
     wakeK,
     idmaps;
     verbose=false,
-)

Estimate states for modified CSOR solver.

Arguments:

  • 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
source
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!(
+)

Estimate states for modified CSOR solver.

Arguments:

  • 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
source

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,
@@ -95,7 +95,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
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

  • 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

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,
@@ -105,7 +105,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,
@@ -118,6 +118,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

  • 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
diff --git a/dev/DuctAPE/api/private_utilities/index.html b/dev/DuctAPE/api/private_utilities/index.html index 0c24b494..72b38480 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_ducted_rotor_typeFunction
promote_ducted_rotor_type(ducted_rotor)

Convenience function for promoting types based on any potential elements of the ducted_rotor object dependent on optimization design variables.

Arguments

  • ducted_rotor::DuctedRotor : the ducted_rotor input

Returns

  • TP::Type : the promoted type
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
DuctAPE.promote_ducted_rotor_typeFunction
promote_ducted_rotor_type(ducted_rotor)

Convenience function for promoting types based on any potential elements of the ducted_rotor object dependent on optimization design variables.

Arguments

  • ducted_rotor::DuctedRotor : the ducted_rotor input

Returns

  • TP::Type : the promoted type
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 7caef431..fc41fa89 100644 --- a/dev/DuctAPE/api/public_api/index.html +++ b/dev/DuctAPE/api/public_api/index.html @@ -6,10 +6,10 @@ 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

source
DuctAPE.RotorType
Rotor(
+)

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.RotorType
Rotor(
     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.DuctedRotorType
DuctedRotor(duct_coordinates, centerbody_coordinates, rotor, paneling_constants)

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.
  • paneling_constants::PanelingConstants : Constants used in re-paneling the geometry.
  • rotor::Rotor : Rotor (and possibly stator) geometric paramters.
source
DuctAPE.OperatingPointType
OperatingPoint(Vinf, rhoinf, muinf, asound, Omega)

DuctedRotor operating point information.

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.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 chunk 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(
+)

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.DuctedRotorType
DuctedRotor(duct_coordinates, centerbody_coordinates, rotor, paneling_constants)

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.
  • paneling_constants::PanelingConstants : Constants used in re-paneling the geometry.
  • rotor::Rotor : Rotor (and possibly stator) geometric paramters.
source
DuctAPE.OperatingPointType
OperatingPoint(Vinf, rhoinf, muinf, asound, Omega)

DuctedRotor operating point information.

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.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 chunk 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 chunk 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 chunk 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,15 +31,15 @@
     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 chunk 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

Type containing (nearly) all the available user options.

Fields

General Options

  • verbose::Bool = false : flag to print verbose statements
  • silence_warnings::Bool = true : flag to silence warnings
  • multipoint_index::Int = [1] : holds current index of multi-point solver (no need for user to change this usually)

Pre-processing Options

Geometry interpolation and generation options :

  • finterp::Interplation Method = FLOWMath.akima : interpolation method used for re-paneling bodies
  • autoshiftduct::Bool = true : flag as to whether duct geometry should be shifted based on rotor tip location
  • lu_decomp_flag::Bool = false : flag indicating if panel method LHS matrix factorization was successful

paneling options

  • itcpshift::Float = 0.05 : factor for internal trailing edge psuedo-panel placement (default is DFDC hard-coded value)
  • axistol::Float = 1e-15 : tolerance for how close the the axis of rotation should be considered on the axis
  • tegaptol::Float = 1e1 * eps() : tolerance for how large of a trailing edge gap should be considered a gap

Integration Options

  • integration_options::IntegrationOptions type = IntegrationOptions() : integration options

Post-processing Options

  • write_outputs::AbstractArray{Bool} = [false] : Bool for whether to write the outputs of the analysis to an external file (slow)
  • outfile::AbstractArray{String} = ["outputs.jl"] : External output file name (including path information) for files to write
  • checkoutfileexists::Bool = false : Flag for whether to check if file exists before overwriting
  • output_tuple_name::AbstractArray{String} = ["outs"] : variable name for named tuple written to out file

Solving Options

  • grid_solver_options::GridSolverOptionsType = GridSolverOptions() : elliptic grid solver options
  • solver_options::SolverOptionsType = 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

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 <: IntegrationMethod

Options for Gauss-Legendre integration method

Fields

  • sample_points::Int : Sample Points
  • weights::Int : Gauss weights
source
DuctAPE.GaussKronrodType
struct GaussKronrod <: IntegrationMethod

Options for Gauss-Kronrod integration method

Fields

  • order::Int = 7 : order of Legendre polynomial to use on each interval
  • maxevales::Int = 10^7 : maximum number of evaluations in the adaptive method
  • atol::Float = 0.0 : absolute error tolerance. (note, if zero, QuadGK uses sqrt(eps()) relative tolerance).
source
DuctAPE.RombergType
struct Romberg <: IntegrationMethod

Options for Romberg integration method

Fields

  • max_subdivisions::Int = 10 : maximum number of subdivisions. Note, total number of internvals is 2^N, where N is number of subdivisions.
  • atol::Float = 1e-6 : absolute error tolerance.
source

Solver Options

Elliptic Grid Solve

DuctAPE.SLORGridSolverOptionsType
struct SLORGridSolverOptions <: GridSolverOptionsType

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

Fields

  • iteration_limit::Int = 100 : maximum number of iterations
  • atol::Float = 1e-9 : absolute convergence tolerance
  • converged::AbstractArray{Bool} = [false]
  • iterations::AbstractArray{Int} = [0] : iteration counter
source
DuctAPE.GridSolverOptionsType
struct GridSolverOptions <: GridSolverOptionsType

Options for SLOR + Newton elliptic grid solver.

Fields

  • iteration_limit::Int = 10 : maximum number of iterations
  • atol::Float = 1e-14 : absolute convergence tolerance
  • algorithm::Symbol = :newton : algorithm to use in NLsolve.jl
  • autodiff::Symbol = :forward : differentiation method to use in NLsolve.jl
  • converged::AbstractArray{Bool} = [false]
  • iterations::AbstractArray{Int} = [0] : iteration counter
source

Aerodynamics Solve

DuctAPE.ChainSolverOptionsType
struct ChainSolverOptions <:ExternalPolyAlgorithmOptions

Options for Chain Solvers (try one solver, if it doesn't converge, try another)

Fields

  • `solvers::AbstractArray{SolverOptionsType} = [ 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{Bool} = [false] : flag to track if convergence took place.
  • iterations::AbstractArray{Int} = [0] : iteration counter
source
DuctAPE.CompositeSolverOptionsType
struct CompositeSolverOptions <: ExternalPolyAlgorithmOptions

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{SolverOptionsType} = [ NLsolveOptions(; algorithm=:newton, iteration_limit=3), NLsolveOptions(; algorithm=:anderson, atol=1e-12), ]' : Vector of solver options to use.
  • converged::AbstractArray{Bool} = [false] : flag to track if convergence took place.
  • iterations::AbstractArray{Int} = [0] : iteration counter
source
DuctAPE.NLsolveOptionsType
struct NLsolveOptions <: ExternalSolverOptions

Options for the NLsolve pacakge solvers

Fields

  • algorithm::Symbol = :anderson : algorithm to use
  • additional_kwargs = (;) : any additional keyword arguments for the solver
  • atol::Float = 1e-12 : absolute convergence tolerance
  • iteration_limit::Int = 25 : maximum number of iterations
  • linesearch_method::LineSearches method = LineSearches.MoreThuente : line search method to use
  • linesearch_kwargs = (;) : any additional lineseach keyword arguments
  • converged::AbstractArray{Bool} = [false] : flag to track if convergence took place.
  • iterations::AbstractArray{Int} = [0] : iteration counter
source
DuctAPE.NonlinearSolveOptionsType
struct NonlinearSolveOptions <: ExternalSolverOptions

Options for the SimpleNonlinearSolve pacakge solvers

Fields

  • algorithm::SimpleNonlinearSolve algorithm = SimpleNonlinearSolve.SimpleNewtonRaphson : algorithm to use
  • additional_kwargs = (;) : any additional keyword arguments for the solver
  • atol::Float = 1e-12 : absolute convergence tolerance
  • iteration_limit::Float = 25 : maximum number of iterations
  • converged::AbstractArray{Bool} = [false] : flag to track if convergence took place.
  • iterations::AbstractArray{Int} = [0] : iteration counter
source
DuctAPE.MinpackOptionsType
struct MinpackOptions <: ExternalSolverOptions

Options for the MINPACK's HYBRJ solver

Fields

  • algorithm::Symbol = :hybr : algorithm to use in MINPACK.jl (hybr is HYBRJ when the jacobian is provided)
  • atol::FLoat = 1e-12 : absolute convergence tolerance
  • iteration_limit::FLoat = 100 : maximum number of iterations
  • converged::AbstractArray{Bool} = [false] : flag to track if convergence took place.
  • iterations::AbstractArray{Int} = [0] : iteration counter
source
DuctAPE.SIAMFANLEOptionsType
struct SIAMFANLEOptions <: ExternalSolverOptions

Options for the SIAMFANLEquations pacakge solvers

Fields

  • algorithm::SIAMFANLEquations algorithm = SIAMFANLEquations.nsoli : algorithm to use
  • rtol::Float = 0.0 : relative convergence tolerance
  • atol::Float = 1e-10 : absolute convergence tolerance
  • iteration_limit::Int = 1000 : maximum number of iterations
  • linear_iteration_limit::Float = 5 : maximum number of linear solve iterations (GMRES)
  • additional_kwargs = (;) : any additional keyword arguments for the solver
  • converged::AbstractArray{Bool} = [false] : flag to track if convergence took place.
  • iterations::AbstractArray{Int} = [0] : iteration counter
source
DuctAPE.SpeedMappingOptionsType
struct SpeedMappingOptions <: ExternalSolverOptions

Options for the SpeedMapping.jl package solver

Fields

  • `orders::AbstractArray{Int} = [3, 2]
  • sig_min::Int = 0 : maybe set to 1?
  • stabilize::Bool = false : stabilizes before extrapolation
  • check_obj::Bool = false : checks for inf's and nan's and starts from previous finite point
  • atol::Float = 1e-10 : absolute convergence tolerance
  • iteration_limit::Float = 1000 : maximum number of iterations
  • time_limit::Float = Inf : time limit in seconds
  • lower::Float = nothing : box lower bounds
  • upper::Float = nothing : box upper bounds
  • buffer::Float = 0.01 : if using bounds, buffer brings x inside bounds by buffer amountd
  • Lp::Float = Inf : p value for p-norm for convergence criteria
  • converged::AbstractArray{Bool} = [false] : flag to track if convergence took place.
  • iterations::AbstractArray{Int} = [0] : iteration counter
source
DuctAPE.FixedPointOptionsType
struct FixedPointOptions <: ExternalSolverOptions

Options for the FixedPoint.jl package solver

Fields

  • iteration_limit::Int = 1000 : maximum number of iterations
  • vel::Float = 0.9 : vel keyword argument, default is package default
  • ep::Float = 0.01 : ep keyword argument, default is package default
  • atol::Float = 1e-12 : absolute convergence tolerance
  • converged::AbstractArray{Bool} = [false] : flag to track if convergence took place.
  • iterations::AbstractArray{Int} = [0] : iteration counter
source
DuctAPE.CSORSolverOptionsType
struct CSORSolverOptions <: InternalSolverOptions

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

  • verbose::Bool = false : flag to print verbose statements
  • iteration_limit::Float = 1e2 : maximum number of iterations
  • nrf::Float = 0.4 : nominal relaxation factor
  • bt1::Float = 0.2 : backtracking factor 1
  • bt2::Float = 0.6 : backtracking factor 2
  • pf1::Float = 0.4 : press forward factor 1
  • pf2::Float = 0.5 : press forward factor 2
  • btw::Float = 0.6 : backtracking factor for wake
  • pfw::Float = 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::Float = 1e-3 : convergence tolerance for rotor circulation
  • f_dgamw::Float = 2e-4 : convergence tolerance for wake vortex strength
  • convergence_type::ConvergenceType = Relative() : dispatch for relative or absolute convergence criteria.
  • Vconv::AbstractArray{Float} = [1.0] : velocity used in relative convergence criteria (should be set to Vref).
  • converged::AbstractArray{Bool} = [false] : flag to track if convergence took place.
  • iterations::AbstractArray{Int} = [0] : iteration counter
source
DuctAPE.ModCSORSolverOptionsType
struct ModCSORSolverOptions <: InternalSolverOptions

Type containing all the options for the modified CSOR solver.

Fields

  • verbose::Bool = false : flag to print verbose statements
  • iteration_limit::Float = 1e3 : maximum number of iterations
  • relaxation_parameters::NamedTuple = (;
    • nrf::Float = 0.4 : nominal relaxation factor
    • bt1::Float = 0.2 : backtracking factor 1
    • bt2::Float = 0.6 : backtracking factor 2
    • pf1::Float = 0.4 : press forward factor 1
    • pf2::Float = 0.5 : press forward factor 2
    • btw::Float = 0.6 : backtracking factor for wake
    • pfw::Float = 1.2 : press forward factor for wake
    ) : parameters for determining relaxation level of states in each iteration.
  • converged::AbstractArray{Bool} = [false] : flag to track if convergence took place.
  • iterations::AbstractArray{Int} = [0] : iteration counter
source

Preprocess

DuctAPE.setup_analysisFunction
setup_analysis(
+)

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 chunk 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

Type containing (nearly) all the available user options.

Fields

General Options

  • verbose::Bool = false : flag to print verbose statements
  • silence_warnings::Bool = true : flag to silence warnings
  • multipoint_index::Int = [1] : holds current index of multi-point solver (no need for user to change this usually)

Pre-processing Options

Geometry interpolation and generation options :

  • finterp::Interplation Method = FLOWMath.akima : interpolation method used for re-paneling bodies
  • autoshiftduct::Bool = true : flag as to whether duct geometry should be shifted based on rotor tip location
  • lu_decomp_flag::Bool = false : flag indicating if panel method LHS matrix factorization was successful

paneling options

  • itcpshift::Float = 0.05 : factor for internal trailing edge psuedo-panel placement (default is DFDC hard-coded value)
  • axistol::Float = 1e-15 : tolerance for how close the the axis of rotation should be considered on the axis
  • tegaptol::Float = 1e1 * eps() : tolerance for how large of a trailing edge gap should be considered a gap

Integration Options

  • integration_options::IntegrationOptions type = IntegrationOptions() : integration options

Post-processing Options

  • write_outputs::AbstractArray{Bool} = [false] : Bool for whether to write the outputs of the analysis to an external file (slow)
  • outfile::AbstractArray{String} = ["outputs.jl"] : External output file name (including path information) for files to write
  • checkoutfileexists::Bool = false : Flag for whether to check if file exists before overwriting
  • output_tuple_name::AbstractArray{String} = ["outs"] : variable name for named tuple written to out file

Solving Options

  • grid_solver_options::GridSolverOptionsType = GridSolverOptions() : elliptic grid solver options
  • solver_options::SolverOptionsType = 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

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 <: IntegrationMethod

Options for Gauss-Legendre integration method

Fields

  • sample_points::Int : Sample Points
  • weights::Int : Gauss weights
source
DuctAPE.GaussKronrodType
struct GaussKronrod <: IntegrationMethod

Options for Gauss-Kronrod integration method

Fields

  • order::Int = 7 : order of Legendre polynomial to use on each interval
  • maxevales::Int = 10^7 : maximum number of evaluations in the adaptive method
  • atol::Float = 0.0 : absolute error tolerance. (note, if zero, QuadGK uses sqrt(eps()) relative tolerance).
source
DuctAPE.RombergType
struct Romberg <: IntegrationMethod

Options for Romberg integration method

Fields

  • max_subdivisions::Int = 10 : maximum number of subdivisions. Note, total number of internvals is 2^N, where N is number of subdivisions.
  • atol::Float = 1e-6 : absolute error tolerance.
source

Solver Options

Elliptic Grid Solve

DuctAPE.SLORGridSolverOptionsType
struct SLORGridSolverOptions <: GridSolverOptionsType

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

Fields

  • iteration_limit::Int = 100 : maximum number of iterations
  • atol::Float = 1e-9 : absolute convergence tolerance
  • converged::AbstractArray{Bool} = [false]
  • iterations::AbstractArray{Int} = [0] : iteration counter
source
DuctAPE.GridSolverOptionsType
struct GridSolverOptions <: GridSolverOptionsType

Options for SLOR + Newton elliptic grid solver.

Fields

  • iteration_limit::Int = 10 : maximum number of iterations
  • atol::Float = 1e-14 : absolute convergence tolerance
  • algorithm::Symbol = :newton : algorithm to use in NLsolve.jl
  • autodiff::Symbol = :forward : differentiation method to use in NLsolve.jl
  • converged::AbstractArray{Bool} = [false]
  • iterations::AbstractArray{Int} = [0] : iteration counter
source

Aerodynamics Solve

DuctAPE.ChainSolverOptionsType
struct ChainSolverOptions <:ExternalPolyAlgorithmOptions

Options for Chain Solvers (try one solver, if it doesn't converge, try another)

Fields

  • `solvers::AbstractArray{SolverOptionsType} = [ 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{Bool} = [false] : flag to track if convergence took place.
  • iterations::AbstractArray{Int} = [0] : iteration counter
source
DuctAPE.CompositeSolverOptionsType
struct CompositeSolverOptions <: ExternalPolyAlgorithmOptions

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{SolverOptionsType} = [ NLsolveOptions(; algorithm=:newton, iteration_limit=3), NLsolveOptions(; algorithm=:anderson, atol=1e-12), ]' : Vector of solver options to use.
  • converged::AbstractArray{Bool} = [false] : flag to track if convergence took place.
  • iterations::AbstractArray{Int} = [0] : iteration counter
source
DuctAPE.NLsolveOptionsType
struct NLsolveOptions <: ExternalSolverOptions

Options for the NLsolve pacakge solvers

Fields

  • algorithm::Symbol = :anderson : algorithm to use
  • additional_kwargs = (;) : any additional keyword arguments for the solver
  • atol::Float = 1e-12 : absolute convergence tolerance
  • iteration_limit::Int = 25 : maximum number of iterations
  • linesearch_method::LineSearches method = LineSearches.MoreThuente : line search method to use
  • linesearch_kwargs = (;) : any additional lineseach keyword arguments
  • converged::AbstractArray{Bool} = [false] : flag to track if convergence took place.
  • iterations::AbstractArray{Int} = [0] : iteration counter
source
DuctAPE.NonlinearSolveOptionsType
struct NonlinearSolveOptions <: ExternalSolverOptions

Options for the SimpleNonlinearSolve pacakge solvers

Fields

  • algorithm::SimpleNonlinearSolve algorithm = SimpleNonlinearSolve.SimpleNewtonRaphson : algorithm to use
  • additional_kwargs = (;) : any additional keyword arguments for the solver
  • atol::Float = 1e-12 : absolute convergence tolerance
  • iteration_limit::Float = 25 : maximum number of iterations
  • converged::AbstractArray{Bool} = [false] : flag to track if convergence took place.
  • iterations::AbstractArray{Int} = [0] : iteration counter
source
DuctAPE.MinpackOptionsType
struct MinpackOptions <: ExternalSolverOptions

Options for the MINPACK's HYBRJ solver

Fields

  • algorithm::Symbol = :hybr : algorithm to use in MINPACK.jl (hybr is HYBRJ when the jacobian is provided)
  • atol::FLoat = 1e-12 : absolute convergence tolerance
  • iteration_limit::FLoat = 100 : maximum number of iterations
  • converged::AbstractArray{Bool} = [false] : flag to track if convergence took place.
  • iterations::AbstractArray{Int} = [0] : iteration counter
source
DuctAPE.SIAMFANLEOptionsType
struct SIAMFANLEOptions <: ExternalSolverOptions

Options for the SIAMFANLEquations pacakge solvers

Fields

  • algorithm::SIAMFANLEquations algorithm = SIAMFANLEquations.nsoli : algorithm to use
  • rtol::Float = 0.0 : relative convergence tolerance
  • atol::Float = 1e-10 : absolute convergence tolerance
  • iteration_limit::Int = 1000 : maximum number of iterations
  • linear_iteration_limit::Float = 5 : maximum number of linear solve iterations (GMRES)
  • additional_kwargs = (;) : any additional keyword arguments for the solver
  • converged::AbstractArray{Bool} = [false] : flag to track if convergence took place.
  • iterations::AbstractArray{Int} = [0] : iteration counter
source
DuctAPE.SpeedMappingOptionsType
struct SpeedMappingOptions <: ExternalSolverOptions

Options for the SpeedMapping.jl package solver

Fields

  • `orders::AbstractArray{Int} = [3, 2]
  • sig_min::Int = 0 : maybe set to 1?
  • stabilize::Bool = false : stabilizes before extrapolation
  • check_obj::Bool = false : checks for inf's and nan's and starts from previous finite point
  • atol::Float = 1e-10 : absolute convergence tolerance
  • iteration_limit::Float = 1000 : maximum number of iterations
  • time_limit::Float = Inf : time limit in seconds
  • lower::Float = nothing : box lower bounds
  • upper::Float = nothing : box upper bounds
  • buffer::Float = 0.01 : if using bounds, buffer brings x inside bounds by buffer amountd
  • Lp::Float = Inf : p value for p-norm for convergence criteria
  • converged::AbstractArray{Bool} = [false] : flag to track if convergence took place.
  • iterations::AbstractArray{Int} = [0] : iteration counter
source
DuctAPE.FixedPointOptionsType
struct FixedPointOptions <: ExternalSolverOptions

Options for the FixedPoint.jl package solver

Fields

  • iteration_limit::Int = 1000 : maximum number of iterations
  • vel::Float = 0.9 : vel keyword argument, default is package default
  • ep::Float = 0.01 : ep keyword argument, default is package default
  • atol::Float = 1e-12 : absolute convergence tolerance
  • converged::AbstractArray{Bool} = [false] : flag to track if convergence took place.
  • iterations::AbstractArray{Int} = [0] : iteration counter
source
DuctAPE.CSORSolverOptionsType
struct CSORSolverOptions <: InternalSolverOptions

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

  • verbose::Bool = false : flag to print verbose statements
  • iteration_limit::Float = 1e2 : maximum number of iterations
  • nrf::Float = 0.4 : nominal relaxation factor
  • bt1::Float = 0.2 : backtracking factor 1
  • bt2::Float = 0.6 : backtracking factor 2
  • pf1::Float = 0.4 : press forward factor 1
  • pf2::Float = 0.5 : press forward factor 2
  • btw::Float = 0.6 : backtracking factor for wake
  • pfw::Float = 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::Float = 1e-3 : convergence tolerance for rotor circulation
  • f_dgamw::Float = 2e-4 : convergence tolerance for wake vortex strength
  • convergence_type::ConvergenceType = Relative() : dispatch for relative or absolute convergence criteria.
  • Vconv::AbstractArray{Float} = [1.0] : velocity used in relative convergence criteria (should be set to Vref).
  • converged::AbstractArray{Bool} = [false] : flag to track if convergence took place.
  • iterations::AbstractArray{Int} = [0] : iteration counter
source
DuctAPE.ModCSORSolverOptionsType
struct ModCSORSolverOptions <: InternalSolverOptions

Type containing all the options for the modified CSOR solver.

Fields

  • verbose::Bool = false : flag to print verbose statements
  • iteration_limit::Float = 1e3 : maximum number of iterations
  • relaxation_parameters::NamedTuple = (;
    • nrf::Float = 0.4 : nominal relaxation factor
    • bt1::Float = 0.2 : backtracking factor 1
    • bt2::Float = 0.6 : backtracking factor 2
    • pf1::Float = 0.4 : press forward factor 1
    • pf2::Float = 0.5 : press forward factor 2
    • btw::Float = 0.6 : backtracking factor for wake
    • pfw::Float = 1.2 : press forward factor for wake
    ) : parameters for determining relaxation level of states in each iteration.
  • converged::AbstractArray{Bool} = [false] : flag to track if convergence took place.
  • iterations::AbstractArray{Int} = [0] : iteration counter
source

Preprocess

DuctAPE.setup_analysisFunction
setup_analysis(
     ducted_rotor::DuctedRotor,
     operating_point::OperatingPoint,
     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

  • ducted_rotor::DuctedRotor : DuctedRotor input object (see docstring for DuctedRotor type)
  • operating_point::OperatingPoint : OperatingPoint input object (see docstring for OperatingPoint 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

  • ducted_rotor::DuctedRotor : DuctedRotor input object (see docstring for DuctedRotor type)
  • operating_point::OperatingPoint : OperatingPoint input object (see docstring for OperatingPoint 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(
     ducted_rotor::DuctedRotor,
     operating_point::OperatingPoint,
     reference_parameters::ReferenceParameters,
@@ -48,7 +48,7 @@
     solve_parameter_caching=nothing,
     solve_container_caching=nothing,
     return_inputs=false,
-)

Analyze ducted_rotor, including preprocessing.

Arguments

  • ducted_rotor::DuctedRotor : DuctedRotor input object (see docstring for DuctedRotor type)
  • operating_point::OperatingPoint : OperatingPoint input object (see docstring for OperatingPoint type)
  • reference_parameters::ReferenceParameters : ReferenceParameters input object (see docstring for ReferenceParameters 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 ducted_rotor, including preprocessing.

Arguments

  • ducted_rotor::DuctedRotor : DuctedRotor input object (see docstring for DuctedRotor type)
  • operating_point::OperatingPoint : OperatingPoint input object (see docstring for OperatingPoint type)
  • reference_parameters::ReferenceParameters : ReferenceParameters input object (see docstring for ReferenceParameters 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(
     ducted_rotor::DuctedRotor,
     operating_point::OperatingPoint,
     reference_parameters::ReferenceParameters,
@@ -62,7 +62,7 @@
     options::Options=set_options();
     return_inputs=false,
     solve_container_caching=nothing,
-)

Analyze ductedrotor, assuming `setupanalysis` has been called and the outputs thereof are being passed in here.

Arguments

  • ducted_rotor::DuctedRotor : DuctedRotor input object (see docstring for DuctedRotor type)
  • operating_point::OperatingPoint : OperatingPoint input object (see docstring for OperatingPoint type)
  • reference_parameters::ReferenceParameters : ReferenceParameters input object (see docstring for ReferenceParameters type)
  • 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 ductedrotor, assuming `setupanalysis` has been called and the outputs thereof are being passed in here.

Arguments

  • ducted_rotor::DuctedRotor : DuctedRotor input object (see docstring for DuctedRotor type)
  • operating_point::OperatingPoint : OperatingPoint input object (see docstring for OperatingPoint type)
  • reference_parameters::ReferenceParameters : ReferenceParameters input object (see docstring for ReferenceParameters type)
  • 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(
     ducted_rotor::DuctedRotor,
     operating_point::AbstractVector{OperatingPoint},
     reference_parameters::ReferenceParameters,
@@ -71,7 +71,7 @@
     solve_parameter_caching=nothing,
     solve_container_caching=nothing,
     return_inputs=false,
-)

Analyze ducted_rotor, including preprocessing, for a set of operating points.

Arguments

  • ducted_rotor::DuctedRotor : DuctedRotor input object
  • operating_point::AbstractVector{OperatingPoint} : Vector of Operating Points at which to analyze the ducted_rotor
  • reference_parameters::ReferenceParameters : ReferenceParameters input object (see docstring for ReferenceParameters type)
  • 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 ducted_rotor, including preprocessing, for a set of operating points.

Arguments

  • ducted_rotor::DuctedRotor : DuctedRotor input object
  • operating_point::AbstractVector{OperatingPoint} : Vector of Operating Points at which to analyze the ducted_rotor
  • reference_parameters::ReferenceParameters : ReferenceParameters input object (see docstring for ReferenceParameters type)
  • 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(
     ducted_rotor::DuctedRotor,
     operating_point::Vector{OperatingPoint},
     reference_parameters::ReferenceParameters,
@@ -85,4 +85,4 @@
     options::Options=set_options();
     return_inputs=false,
     solve_container_caching=nothing,
-)

Analyze ductedrotor, assuming `setupanalysis` has been called and the inputs are being passed in here.

Arguments

  • ducted_rotor::DuctedRotor : DuctedRotor input object
  • operating_point::AbstractVector{OperatingPoint} : Vector of Operating Points at which to analyze the ducted_rotor
  • reference_parameters::ReferenceParameters : ReferenceParameters input object (see docstring for ReferenceParameters type)
  • 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 ductedrotor, assuming `setupanalysis` has been called and the inputs are being passed in here.

Arguments

Keyword Arguments

Returns

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 53910e5a..85d9cc6f 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/0e13708d.svg b/dev/DuctAPE/tutorial/4fcb4520.svg similarity index 77% rename from dev/DuctAPE/tutorial/0e13708d.svg rename to dev/DuctAPE/tutorial/4fcb4520.svg index 75c63753..ac95dd7a 100644 --- a/dev/DuctAPE/tutorial/0e13708d.svg +++ b/dev/DuctAPE/tutorial/4fcb4520.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/8c3dfa6d.svg b/dev/DuctAPE/tutorial/7fde5643.svg similarity index 81% rename from dev/DuctAPE/tutorial/8c3dfa6d.svg rename to dev/DuctAPE/tutorial/7fde5643.svg index a19a7e99..e29b80bf 100644 --- a/dev/DuctAPE/tutorial/8c3dfa6d.svg +++ b/dev/DuctAPE/tutorial/7fde5643.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/87614f11.svg b/dev/DuctAPE/tutorial/a865ad77.svg similarity index 78% rename from dev/DuctAPE/tutorial/87614f11.svg rename to dev/DuctAPE/tutorial/a865ad77.svg index 3a5c8d05..668c6f9f 100644 --- a/dev/DuctAPE/tutorial/87614f11.svg +++ b/dev/DuctAPE/tutorial/a865ad77.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/index.html b/dev/DuctAPE/tutorial/index.html index fe7bbdaf..68a1ec06 100644 --- a/dev/DuctAPE/tutorial/index.html +++ b/dev/DuctAPE/tutorial/index.html @@ -1,5 +1,5 @@ -Getting Started · DuctAPE.jl

Getting Started

The following is a basic tutorial on how to set up and run an analysis of a ducted fan in DuctAPE.

We begin by loading the package:

using DuctAPE

Assemble Inputs

The next step is to create the input object of type DuctedRotor.

DuctAPE.DuctedRotorType
DuctedRotor(duct_coordinates, centerbody_coordinates, rotor, paneling_constants)

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.
  • paneling_constants::PanelingConstants : Constants used in re-paneling the geometry.
  • rotor::Rotor : Rotor (and possibly stator) geometric paramters.
source

Body Geometry

We begin by defining a matrix of coordinates for the duct and another for the centerbody geometries. For example:

duct_coordinates = [
+Getting Started · DuctAPE.jl

Getting Started

The following is a basic tutorial on how to set up and run an analysis of a ducted fan in DuctAPE.

We begin by loading the package:

using DuctAPE

Assemble Inputs

The next step is to create the input object of type DuctedRotor.

DuctAPE.DuctedRotorType
DuctedRotor(duct_coordinates, centerbody_coordinates, rotor, paneling_constants)

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.
  • paneling_constants::PanelingConstants : Constants used in re-paneling the geometry.
  • rotor::Rotor : Rotor (and possibly stator) geometric paramters.
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
@@ -94,9 +94,9 @@
     0.285768  0.041795
     0.296701  0.039168
     0.306379  0.035928
-]
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 Rotor which contains the geometric information required to define the rotor(s) and their respective blade elements.

DuctAPE.RotorType
Rotor(
+]
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 Rotor which contains the geometric information required to define the rotor(s) and their respective blade elements.

DuctAPE.RotorType
Rotor(
     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
@@ -182,14 +182,14 @@
     [0.0], # currently only zero tip gaps work.
     airfoils,
     [0.0], # can flip the cl lookups on the fly if desired, say, for stator sections
-)
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.

Paneling Constants

The PanelingConstants object contains the constants required for DuctAPE to re-panel the provided geometry into a format compatible with the solve structure. Specifically, the DuctAPE solver makes some assumptions on the relative positioning of the body surfaces relative to the wakes and each other; and this is most easily guarenteed by a re-paneling of the provided body surface geometry. The PanelingConstants object is also used to build all of the preallocated caches inside DuctAPE, which can be done up-front if desired. Note that there is some functionality in place for cases when the user wants to keep their own specified geometry, but this functionality should be used with caution and only by users who are certain their provided geometry is in the compatible format. See the Examples for an example.

DuctAPE.PanelingConstantsType
PanelingConstants(
+)
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.

Paneling Constants

The PanelingConstants object contains the constants required for DuctAPE to re-panel the provided geometry into a format compatible with the solve structure. Specifically, the DuctAPE solver makes some assumptions on the relative positioning of the body surfaces relative to the wakes and each other; and this is most easily guarenteed by a re-paneling of the provided body surface geometry. The PanelingConstants object is also used to build all of the preallocated caches inside DuctAPE, which can be done up-front if desired. Note that there is some functionality in place for cases when the user wants to keep their own specified geometry, but this functionality should be used with caution and only by users who are certain their provided geometry is in the compatible format. See the Examples for an example.

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
# 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

  • 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
 nduct_inlet = 30
 
 # number of panels for the center body inlet
@@ -219,7 +219,7 @@
     centerbody_coordinates,
     rotor,
     paneling_constants,
-)

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)

DuctedRotor operating point information.

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

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)

DuctedRotor operating point information.

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
@@ -230,7 +230,7 @@
 Omega = RPM * pi / 30 # if using RPM, be sure to convert to rad/s
 
 # utilizing the constructor function to put things in vector types
-operating_point = DuctAPE.OperatingPoint(Vinf, rhoinf, muinf, asound, Omega)

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)
+operating_point = DuctAPE.OperatingPoint(Vinf, rhoinf, muinf, asound, Omega)

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)
@@ -238,7 +238,7 @@
 
 # assemble reference parameters
 reference_parameters = DuctAPE.ReferenceParameters([Vref], [Rref])

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 = DuctAPE.set_options()
Options{Bool, Vector{Bool}, Float64, Vector{Int64}, Vector{String}, Vector{String}, DuctAPE.var"#48#53", IntegrationOptions{GaussLegendre{Vector{Float64}, Vector{Float64}}, GaussLegendre{Vector{Float64}, Vector{Float64}}}, ChainSolverOptions{Bool, Int64, DuctAPE.ExternalSolverOptions}, GridSolverOptions{Bool, Float64, Int64, Symbol}}(false, true, [1], DuctAPE.var"#48#53"(), 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"], GridSolverOptions{Bool, Float64, Int64, Symbol}(100, 1.0e-10, :trust_region, :forward, Bool[0], [0]), ChainSolverOptions{Bool, Int64, DuctAPE.ExternalSolverOptions}(DuctAPE.ExternalSolverOptions[NLsolveOptions{Bool, Float64, Int64, UnionAll, @NamedTuple{}, Symbol}(:anderson, 1.0e-10, 200, LineSearches.MoreThuente, NamedTuple(), Bool[0], [0]), MinpackOptions{Bool, Float64, Int64, Symbol}(:hybr, 1.0e-10, 100, Bool[0], [0]), NLsolveOptions{Bool, Float64, Int64, UnionAll, @NamedTuple{}, Symbol}(:trust_region, 1.0e-10, 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 ducted_rotor 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 = DuctAPE.set_options()
Options{Bool, Vector{Bool}, Float64, Vector{Int64}, Vector{String}, Vector{String}, DuctAPE.var"#48#53", IntegrationOptions{GaussLegendre{Vector{Float64}, Vector{Float64}}, GaussLegendre{Vector{Float64}, Vector{Float64}}}, ChainSolverOptions{Bool, Int64, DuctAPE.ExternalSolverOptions}, GridSolverOptions{Bool, Float64, Int64, Symbol}}(false, true, [1], DuctAPE.var"#48#53"(), 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"], GridSolverOptions{Bool, Float64, Int64, Symbol}(100, 1.0e-10, :trust_region, :forward, Bool[0], [0]), ChainSolverOptions{Bool, Int64, DuctAPE.ExternalSolverOptions}(DuctAPE.ExternalSolverOptions[NLsolveOptions{Bool, Float64, Int64, UnionAll, @NamedTuple{}, Symbol}(:anderson, 1.0e-10, 200, LineSearches.MoreThuente, NamedTuple(), Bool[0], [0]), MinpackOptions{Bool, Float64, Int64, Symbol}(:hybr, 1.0e-10, 100, Bool[0], [0]), NLsolveOptions{Bool, Float64, Int64, UnionAll, @NamedTuple{}, Symbol}(:trust_region, 1.0e-10, 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 ducted_rotor 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(
     ducted_rotor::DuctedRotor,
     operating_point::OperatingPoint,
     reference_parameters::ReferenceParameters,
@@ -247,7 +247,7 @@
     solve_parameter_caching=nothing,
     solve_container_caching=nothing,
     return_inputs=false,
-)

Analyze ducted_rotor, including preprocessing.

Arguments

  • ducted_rotor::DuctedRotor : DuctedRotor input object (see docstring for DuctedRotor type)
  • operating_point::OperatingPoint : OperatingPoint input object (see docstring for OperatingPoint type)
  • reference_parameters::ReferenceParameters : ReferenceParameters input object (see docstring for ReferenceParameters 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 = DuctAPE.analyze(ducted_rotor, operating_point, reference_parameters, 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 ducted_rotor, including preprocessing.

Arguments

  • ducted_rotor::DuctedRotor : DuctedRotor input object (see docstring for DuctedRotor type)
  • operating_point::OperatingPoint : OperatingPoint input object (see docstring for OperatingPoint type)
  • reference_parameters::ReferenceParameters : ReferenceParameters input object (see docstring for ReferenceParameters 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 = DuctAPE.analyze(ducted_rotor, operating_point, reference_parameters, 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.9693459380375864
# Total Torque Coefficient
 outs.totals.CQ
0.10306689216543831

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 accepts an input, multipoint, that is a vector of operating points.

DuctAPE.analyzeMethod
analyze(
     ducted_rotor::DuctedRotor,
@@ -258,7 +258,7 @@
     solve_parameter_caching=nothing,
     solve_container_caching=nothing,
     return_inputs=false,
-)

Analyze ducted_rotor, including preprocessing, for a set of operating points.

Arguments

  • ducted_rotor::DuctedRotor : DuctedRotor input object
  • operating_point::AbstractVector{OperatingPoint} : Vector of Operating Points at which to analyze the ducted_rotor
  • reference_parameters::ReferenceParameters : ReferenceParameters input object (see docstring for ReferenceParameters type)
  • 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 ducted_rotor, including preprocessing, for a set of operating points.

Arguments

  • ducted_rotor::DuctedRotor : DuctedRotor input object
  • operating_point::AbstractVector{OperatingPoint} : Vector of Operating Points at which to analyze the ducted_rotor
  • reference_parameters::ReferenceParameters : ReferenceParameters input object (see docstring for ReferenceParameters type)
  • 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 - #
 Js = range(0.0, 2.0; step=0.01)
 
 # - Calculate Vinfs - #
@@ -373,4 +373,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/index.html b/dev/index.html index af3dd923..ba05097f 100644 --- a/dev/index.html +++ b/dev/index.html @@ -1,2 +1,2 @@ -Home · DuctAPE.jl

DuctAPE.jl [Ducted Axisymmetric Propulsor Evaluation]

Author: Judd Mehr

Contributer: Taylor McDonnell

DuctAPE is a code for the aerodynamic evaluation of axisymmetric ducted ducted_rotors 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 https://github.com/byuflowlab/DuctAPE.jl.git

Documentation

  • Getting Started will have you up and running quickly.
  • 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]

Author: Judd Mehr

Contributer: Taylor McDonnell

DuctAPE is a code for the aerodynamic evaluation of axisymmetric ducted ducted_rotors 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 https://github.com/byuflowlab/DuctAPE.jl.git

Documentation

  • Getting Started will have you up and running quickly.
  • 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.

diff --git a/dev/objects.inv b/dev/objects.inv index c3b2de2ddb87c41cb3a89d5184ab1a06ae25cc9c..d5112d172bf618bb6d2afd65a8633986d47294bb 100644 GIT binary patch delta 5103 zcmVEmVcczc;ncx-R_5MR*)smSg~%^#g`QQ@9*JFA~mE$k#ZME;2BGN zcsuuVNGExW9=*DWe~ydD^Iv-2FGYq{CvDVhE>71?+Z0t2rs5mJXKU{*YMLb9dsj_Z zH7M>{hw*)wM<@>3I^3gmQ8r1DtDuxGuDx^ev)1926^e?iOn=hQ5La%n_AV+ErfCt8 zui892v$)yrg;6UfZ2ah;JmMSqwCYatIlDk_jSM1rZXgvXdd z)3EZ+ia6ONOdNH6$`V8P^?D#5V7Jk}3RBu$8s4DPfPugM#`9N9(vCFjg%fGOp1t^- z`X4{yFQ5MQ_1{tKf85{?k4gQMWvHo=$p3hOe^V7@o7P3;e>}xs@58hu)BGfN`L%$1 z^y)SI!+*axdUbMi{LiD~?~jgufRUd92qr*Tm4cz_)X!LVO^76BJyh=hEn)p4*$aRsZMOW1$3_|Jd92{rRW|;_rl!c z=&RolSQ5P!87BxqI|=;f69HmGPehwTQ`(S8o(-Fe&)}|5N+pcZ)S1L231A;l!sXo)&5nH-lNKF*M+GI5FUeA zF(oBUyf&FRS91WYR&*D1M|~{FC%2u=oVCHiA4E`rMby)L88o1k+TVeY6j`4VwjsA_ zX{Yu8SCS4Kcg0te=spmIvbH=}Sy5l&et+0HQq3u}#$ulehKDgafyIPl9$T1#@34813O;pjoDthab`p(@#m+?aFTyGWfu)_NXi{{o zyuQ_Hn=}Vh)>D$jbQPOmIx)rCV@62g*3bqQ#W59UYcA0JvoKG<=2UEhZa@s;==hBq zWY~o#K3)BqCyhT4e;5GUzw@OaMt>WMLfj!mTd{zV&jLo%v~Un%Dxx++d84CJcn`Gd zI~WB3BwwahQ8@>K;mH_4e--q64_$Lnv4LS`@Mi3H%YF&G&dqfbb_TfxBojdItQ9dB z#GZ%@>3Z_IEfjj9UWI>#n%hFy!8dKL(yG(bCvYBx>$k9j1CteD^9xqtf`91s$vx~E zc%;GV3N_mF_9@n#H+8YpC3vk`^1J*=$r zjb){*<3Zff$bz}W$zu|jfTXAd)wJXGqBJ+6SNZ!ZBHjF7r9hdfbfZGG512_|*BNT$ zEU6;|nkh#`JEIx)66aecjDNf^c^EsvjJ7aYa3Avjrs3E7 zJv)5_l?ennVOpp+jW_OWiVvIZ#{Utl*9!K~=Y-kGJW9Fd+Ugq*19}{=qtZH) z!zY|13A>Mz~)_ zU0OW6xOr+{pt$88-HXrZ8q6eUu>SieHDA&Y?AP0)S6e!Oqkp{q;piVHbPzPSwG|^$ zY(T?b_d~-^X!rCv8Q{_P8_@XhPaGzE?FR~9=upXfKjC=S_P=yUbg14(zWCd&Gw!c` zqMTpN6=bwk@0rtZ6Mt68W~{^;P;MZMVBw7U#1gjV0p7Ud0hN(tF)WpJgazZKlZrEi z)pegZI9yelIw0@8E{eN5ge)929zFMQ^xQb|BZuJewjKuIdF(X`(+C@*D0r;0ue{Ic z&pT#oc++dD1UWi>DMYIGs0nUBJ_b#g@3B<{7T0~Z_C_6wo`0tq?BNiA7597KjCu3> zMnWNi5d{z6=my06s~zC(3$UmkgAjQ4rfBmxte%1*4|WMkW2aHVx?qwB(jttF1~?4H za41GwFD|f0+oab?iP12Hc?N;E9;a?^nkvMB?w|$^06M7xHv1&sr7iI_?PtuT1r-)t zUiKrMlFXr90X4gT`@=y-c{{2d^JE*FLY8yP+Z z`!IVj+o{1s`{wG|)kT`b;D80d0$hd!J0NBd$#lLjqJNPIOVQKW;4pDKVfD-f3IjhB z0aMjab%QboBErTAbdSdZZ{3Gr6@V>ZCgl`xHRi|wv2cwmh1V$E^>TwKan4##K^tMkjCV!@;UCml^iz<{tu@MKEMi!90UGdeS(SAwL^ve*isDO`CJCNkP~ zBqrGMXn%GULUjY~YSzC2dyN^xb`T?wa^GB?TomckCf$Q&+}vgkS|vtl69!S~qKTEt z#7S9ncz8|neRI2nqU*5a6=gvOcuwR&$)m~vN$L9RHD3Y}zY$vD&|EpNlk8#fS@8vAOX z9hX#*KwWC}sMeD_qOuf2Q!U#Gbt~;Kz))+1aYAy{3*+eWh??Kas6e~j65a&Ka)HH? zB@H8A0a255KJc0<&?CXUi#Jz;pH#3EJeNRS)vX#nLY)?N+wT(8aj_#Lpi2ccV?=BL6Fxtb!>psSAS}j zh?q9r0vR#}UGph0nGY12V^DGq!CjQcO!p93zh~JyTMn579_qo)=flPv zEByV7OcK7GS9eMNrb?oLs+l3i#BI^4GM0ok8n#e|W)|qT-LElBd8?wTsO#e_+}j&k ze8EeqID&l|wy0{{RP|=6J;J2|2MSO#fzJ`{6B0Mjc&G;A zMUaw9WOzoc7)MW-9E}UI(2SKdK)4*!Me!@_W2I|8fK>5rGL4TbUMRWTV zx95Izx91e_I8fCYc0XzjJC+5+^y-{dj!;heZ(tpPI*)@ac|=ZBM_pUcH1>WGM=*1y zMG{}enU;e_jyjj2476;gmx$HGWB%6pR}G%l3X>9m3q*MF;Hv3Fy2tV+{$LE>jf0S>X%j(Alx+??Vwve(GqrbKr% zCkxgYP}$ymQbP_^LJa~wMRo%ZW~xEr>BlHc7xMEpz5@U3t{WWXs*ED9Ag)3w+IpFy z78RJ>T~@@w7Iw6zRg{(?ZkGCAB2T1-k_RnC9A|cSxEpG;SwXU|o_{M!CfQT^K-sXW z%04JEL>k791;YKZ2>E}}RESZMr6!T{bVRU0rXFVo3^zLI>jCI!a6?E*TI7B3Pks%7UBLCBO0XNU6X!pChZPJs zt%=-^xFnk1s{( z=xx>3jf)L~>L$s^v~XpjT}9piL*CcT4J=sOARB+<8Iz%)`GUK)X+mp>%K-+0o*nZD zs@poq@bS<`>mClFH057?-TYGgszQ`IXH?oYLfx6Q233L$eSdOYQqA5g*CA@um>g6; zC{}il)2m99B?&zv)1}LDHQ@G%4v^D1ks+A8aNYS>dJL6w@$87BE}jL(EV()-K=B^T z$grdoYflfex*5c&r510<9s8PT_pVA8>imX6LSuF|MrxgvyTHyxG%(--%d zoMMy;=hUg(?tc~*$|V}l&jLVCS!m{UD7JTiBJXaxGg&cR`In(DvD}_GTQM`s$Cj25 znr;S8tsH8wmEl6I7`w{A!m#SX0ZBO>alKATG35FiDClZWotRgDI{7QA?iE2-X#mup zp@R@ToL8VJbt!F1X3hz1ZMi++MN_KMSX^pMMGcoO{(tUN!=(e2`{zM3dsjh1P@7rA ziDd`ah=0$IzkTO^{7r+6kHLMXiyd@HHV1ik^=@;BZ=Te9<56N&p%V&_X4&o0GFi!aKMtLS>rd_>#Zw9Dy|#X#wTw9~2UidoL^uNM*pr zQS4(ujZaTeMdScxb`WcUdIfcj(leDlO&2`9!G9G=B-UbCYhuPCUys6q{|&Rwd!@XG=M`(1vCu9~ajEZlCc zCVv&UaP^?TwEF7~90o}0W1KhV0A-Nwr+iyH7-ol5QdPj1Fj(zHKQ;zP0_tu7>GEv% zn$To>95%y3b`^*w)C#~^fl*pg!NUb~M#w zM}@*pTT$Qtl0-rA#;f~Z{&#gPnwALDAA}oR4jbgr7p(((?N_|l}K5tjFW&3cnY+C zQG?ub@u8Jhpt;z+Dm&VG5maDm!P0Hlq#>a!nLcT|vNC&BNuroR4F0)g8nFk^`+p|a zr!(p!r`D8%9o`Kk-+(Z?w)^0)k8?R^4#$jpDK{7h{;;)uXvpXHIHV zGLX|SqUN!6X<3IbtbJD1t1NRLihufS|KL8O8L6nzGg(rVyNhwp505z&$B4QSGp4O} zWY_fgzveKCKd9)rKL7Juua`nhd4iz1sY$ZqH{ylU*Az!yzvY*Ag9-O=3s1f4^MCzp zP^8ugutQy}94^QxE~~E3vB^dRkSM;`(3xbChA%f#OoKjPQ=tYSd?ypay?>k^eZM{W zels;KU6tNU%`t-9j%cmz{M383(tMmo#qZW$C9Zb+91~%wsrj; zfi)jj+8n3uJPG*&FP7Qz+<)ovJ^6q-34<Y{;ta<& zP+lhvmy9W0^ygR#ULr%bBXTQNwXAP(&OwdjpBAY+F_kMzpQIhXSATsf=j>vG)in$z zG|4VbTrY}R_r0jNZ*GxM;!S^}xO6#!qpUf+Khi0jbO@&~ zZT_z+@=9O+KNTkx{?^Vi$M{u|(m|-)B_P0|!X3H~Q(e;L4Hhd)1|h}nR4E(Mp?Qw1 z&z?IKHB<9F$nYO(ENHpgZey!k;akoTJ@Tx>8J_}3y2i6>Ka1^S>mO7=Zgw*_zG)HqvE=5}8rn4`@ R+-i5((Olc;{{b(v^uz$fzx)6I delta 5133 zcmV+o6!PoWDD)_hmVfOuc;ndcxZMxltRPFAv0~k-i!Ukq-`~TVL`tMYiEZA^;&E@I3s;jJs{8)UW`)uvJLsb=}2WMCL zMTNqqwI4qCX@EknF8u>qXL%K6sR~N@;@Y_&KT926UZ5aL@_#7y4RPfLYv-~+ejH~3 z`KqP5uJXDnO~|Hi0^RgOiO&S3;6XD3@#)Bam)hrGL?51eawpuya3$#2JD*^6t3w-CWg z4Z0sxwGT4K3#0OWybtMhm~QsfIl-+51`+sWU^EE!B7Y2mwUCJqvI67{kzgt;;W6gW z*e{&(ER6OM6Gu&-vcwR6z3#{dSZ#DD{FrtZ`?n}I*uY&B@X6KaY;TKRW&i`heeV#9xWM!Lv*8S<^2(I29i>6u>W?wpWJ?28GT> zK*d6d!Z@cb<*RonMFrE1lVno0tE8G zrG#H)n8!!q+O`g~b%eI7^E$2~H_t$ZxEF%*8-K(T8a3(AfEe);(dN*UHe`}#m&FgLFai+z-mn>P84)`aQ@La`Va!&; zEPurwaGDyN6;>ZElkjAWGV*}t0ocCoVRDWTJ5g{6O&jZSgNiJCPW>bbN_Th)wL=#m z90svss!bYrX))>=t~DDuYlBtBirOyE?pd7%W7F5Od;p8JcbfJf z3NtJ!pQp>h4)>Mr9)z_hg6IY_lp0!YEPoxqm82BMUGeoHIv7NuvM?Ml#)&{r$7L6zqI+S$2iW zJ9r5CVTuric3AVdmk8FfNbs;HuNl?50>bLw{=ErIXFpt_sxDHlFtN^KkKK#g&wnt{ zhWmiIqL?raNVJy#=rF+5X>emVx`Oh{Bl?kYhL)qY;5j+@|3Slk`0{b7H}_Z;eD^ zL&?snk9K_#m*f;}lJsrj^sST5Y4M$7L-i%^0p?5ljcBn0vetqOdmf1w?U7 z#o3w*bobm(Bd~oH%b+8OK^z^QseeJbT{z;?)vsw(xgGI`0k9oDT?%5ft|-JEQnVEd zT)8Z8HO>pYNLLor2}&y+m%@9Xr{4n=01$l{n?>aq2!j?DPq=F!1<@wW3}$-ncPS zK5n)f_eU^@3s^&!GiD=3Dd(Ciz;7H3=y1S>TbseQfGZm4AMxZQ?0+^ju-g8oLQhqZ z{PDw|)YZJX+2ZIL8vy;1B{_73CBO~yCO`e{uB!6#=kT|pX z%L^K;|Ncq6FKKl7>+R8-EhXUSA8&s+`o{?+g2wH(Vz7-7)cti!8h%2%r_Tw2N8fM2 zh=6}0neeqG6uwYW$$xu4;ZWZ8zmz0Os&m69f7^7%o$604UNTjX(N=BvfJV}=mN(l< zyaC+}WFyS*?_8y&Gy_OwB4JUsY2?^M@p9c}G5YgB^BCm4w^??7kI)Qnjfe7G9LhHi zD9QN%yb%4201pHQejH$n6nRfY@|E*B{&~*~4rhE$l^{pQuYZNG`2khlEl4!4^3wx0 zt-$PhXy)FiL(%;-gYA<5o9A!U6-mXV%z|sQlAp^7e$@5{i-DY(f z`o*)CrQSY5acD&)%nN1-FV6hXh`??{hC?yldUc82+A6+|a*T#K%rS`PwK!#cTNOTz zx_c$;0N|6tV}GNM(tTVLhjadjvFD9-92Hhv!nKr+?lBG&alZpiWl+VAP=a;YQe>zD z_GstNLX>rJuljS)kW>h#zlv7gt`vB1#_4fSQVc4r2}A z$()vENq>~$XLMvluXs_LyqPP2#&BgSOl0(2N=&e2YW4*}Wd#mq(!K#}jW@TU@|*I>yr%EAQjoXCTm zhn78(Uv}ARt{j+gJ0))#;>J?iuENgk2oIP_Y=3xRV-hQ3n{^^0s?6#l==HLIh~jGF zq}~Ca9Zs>jDCe1E9BLEicmC$g4n(EKzUpYlB~>JFms&ll^(2phEVZGjmTiRkEbY+2 zP-}!?MzYll!{{WAw1zB48V2&~AW=3J3$r_o7>4z!p;{H`q)6etx*&|jm zdFqwWc~~3DF~z(yQxyz?w8Z&i101O!Lp4Rjv}q>DaAVLp9|M#3fkJcai!9-LiN*x5 zG9h&rHX53gY`3&{6L%Bf9#QL=5N3 zIu%yO?(MrMv(4N-l-yU7T^CaF8vUbL+m9beCnL&B)3_hb`K7*{r}>%JY%y6aLT5b$ zCvP!VXb@EG_Y?V)r7({m+Yg=}f)Ro%iCB>1hq?C5FfK_hsI3^ht-1ICO&kRgaDURX zol_xf4H7X#F~S*s8@Y9!h1lgaip7oa>F>24mO0iJ3)zxgKr{0Z7iDrwVXihO8l2bg zSS(o^+(l`~bPtjB2bOP}yF*5SyLzzk`LHp^s*wL8lY}ql?mkM-iYVx)nh9b|To$b= zV`*a}vV~#-vq1mc^%}yImntZ-vVS~I{KI@hi%)n?6^D0-{TdaOef(1iI2iM6op^*3 zv-z|4xlVGcJ@qk5sZF|@uUZ@HQP3-`4LMtE@Odh*Tfyg%P5aPpXr-iaD8AVr27SW{ z4fU=NsOrU3dxT2`4iunf0-qy1L?mvY@lXxKiy$SJ$nXqWF_xY%Ij83(zJJ+P(g5L_ zOdG|ou#c6lc?VMMmiG;=INDd7A-polvg+Y3BPy9Kp<)7Fm25XIc&#S?XMd($TVwULsZ#kNMBe zziRNbR+y9kTp*G!;dMN;3V-=PlEvT}1R0peX|414VibN!K{-VoU!nGV%wMmL#omq8 zu_{g11c_fD1=z(_JK{xFadV1~Xud`UHzl~IIa#pIfXfc%gX->3B~&NilO?zCV4@l% zo_>h@cp*Pu<16sb_PW7RuF5F#4B{%3tS*-+YEgm7-6dJ*ZDB=AT7UOAGsMkO|4ZbF z)KD_fQp9m$cm35+qfH8uef3gNGRdCO2gkq|n12^=eJmpEhU~@hci&+J16Fe)_ajb;rZ;(-nqUhtjTcS+sSssm zIgirZ5ANqVxT>79HgjeWZB%5>I<+?cqpWeaeDtoU%gV-vL1h&sWLUT|ab87U2SZ-h z%`Hq=U7b+uR`#8O-L|Ky16Ea=8ELR0?pXdNt zofGMT$rINclBH)+`7WLuan!}Lz?dcX_;@HhfEnrMlw;@f!=!FHaVj}H_}aqx1J?iv zWl2W-EhLz9Fn@!kqZ5j&G%8rG2;tdHi)q08#eF8L7^T8FwJNu}gNd?<#`CiP&{N`@ zc^!)7?V!l38}ChKOjrJ8=u0fOCe~KW#PYGFC4{D%j#Dd#8s^Gyp;nCDXE4LCYQh0g zJ|1zsj&d>N`Wqd#OjM1K$G4QNVTN}IBobwXQPZcp~2 zDOYJME;Xj2hD#TJx2oaNfy({!pxJy^K|)ZQS;UED2iS;z&yT--XMg-ngN={DeW!~Z zG)XoKdAEDNIX~Nc{BUYlxTUJuf5GDbQ*!&%a>W_055MdzwSL#Ce33mn*UpjRPa-Q# zk8Nq$RDX><7~;b2Xhp44i;S|2(#aSMXFC=yxZ|LY4yv5y5cK0QShkp-C9L97Mp71T9K zFI4(8Uhs5=E0Rd8WoEHuKj3IFN%Tgo*+CzEGH$lK;Q)FQdg1eb2GE_u*crUaltRuf zdbP22XfE!ZpA?qqJPu)yGhJ?*E`C1W%%`!*>kV8p!3q^$^ePLfkKyWWCaa}O6XsRt zsDF^;83lD06sY3Wxl5H7epx_ZzfZ5wuG(ei{&uq)Rp7#9fx@QMUw2?ZAgPbBUYs6E zC*4o?ZT4uG9a2eE0b|5qoiF;aF+dVf_X|ju7rWPlCfh^5>K3xAKs2FN08TQDQj-ck z77k@L**wV614niR?KOCY{7%v7&U0g7#DB|WM`KNPR4DAkwN4AgNhGvs#~uu4N4$U1 zM7#%?M%AHW;+rmYG47vwF>X~NWvMbw0@m46p#8HF65xCE1Rz>Nfgry!9SmwMr;A}zRC6Jg!;&_IptveyP@P85GL1l_YV75 zmvgpIGO@RQaR2BR;Ud}o-G_@S+w)xtUATalG}Bk-@Yc(m$S~DcG6lx^s&k*GU0k!p z(cil865)nnXx&k&I*lsDWnDJLFn_tXAjf_{&EwgnWeq~N_E}Z0vdn!b z>a+cw`-~=}q6W`oNmcGP#yvkgW>p*`>PEaV=W0iGO^^F)3RL_-MbGucpWiyI6k^H~ z1kG(pk{!PhFPy%nIP&@}zit~$xW_wq>Rey^>t}-^wMKyTb+M9MkWpM#U4LI-lZ^-< zQG7AdnPig4mm4XDK_9T8P=gS@lL6sgE{?w69(}(V8vyf!1AAXOdAzQ9xjQJea^2&>b%vdkXjR+sO| z2h>RzbeW586$eKayTx1)D$rGtE_gpZsd1nt*X%=?Ekyq>8_*cE&CO2~p_3lTOiEof z+@ZSpWPw`=H0LmTe(6h`#L<>6Se6sO18|8G9NR!?8ChI1rgYI?Vt*=li40kez^+(z zW_^ow4r(C(v`FQNsa#q5B<=9M>SH-)8yl=Fff(N;yEt;q7|UHOb%Qj6n|NvT6~Y$6 z!>qM$Ma4sPhl~<$`WwZi%MmPPP5=H#t8h{uPGQ>oUy-GSzWjeIPAdGZon?;kt0JYH zP`OP&fJ6Cv^x((3q<_sB7As2zA;s=gDI3zEd5)~jo?8_)Q}f+R@Ly}px!XR+R&8QZ zOFG%yyHJE` x^2, +, A))\n\nA faster 2-norm.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_utilities/#DuctAPE.cross2mag","page":"Utilities","title":"DuctAPE.cross2mag","text":"cross2mag(A, B) = A[1] * B[2] - A[2] * B[1]\n\n2D \"cross product\" magnitude\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_utilities/#DuctAPE.linear_transform","page":"Utilities","title":"DuctAPE.linear_transform","text":"linear_transform(range1, range2, values)\n\nLinear transfrom of values from range (source_range[1], source_range[end]) to (target_range[1], target_range[end])\n\nArguments\n\nsource_range::Vector{Float} : range values come from (can also be a Tuple)\ntarget_range::Vector{Float} : range onto which we are transforming (can also be a Tuple)\nsource_values::Array{Float} : array of source values to transform\n\nReturns\n\ntarget_values::Array{Float} : array of transformed sourcevalues onto target range\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_utilities/#DuctAPE.extract_primals!","page":"Utilities","title":"DuctAPE.extract_primals!","text":"extract_primals!(Avalue, A::AbstractMatrix{T}) where {T}\n\nExtracts primals of A and places them in Avalue.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_utilities/#DuctAPE.lfs","page":"Utilities","title":"DuctAPE.lfs","text":"lfs(shape)\n\nDetermines length from shape (output of size function).\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_utilities/#DuctAPE.reset_containers!","page":"Utilities","title":"DuctAPE.reset_containers!","text":"reset_containers!(containers; exception_keys=[])\n\nResets all fields (not incluing any contained in exception keys) of containers–-which must be arrays, structs of arrays, or tuples of arrays–-to zeros.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_utilities/#DuctAPE.cache_dims!","page":"Utilities","title":"DuctAPE.cache_dims!","text":"cache_dims!(total_length, l, s)\n\nA function that returns a named tuple containing an index range and shape and increases total_length by l.\n\nThis function is used heavily in the cache allocation functions for setting up the dimension maps used to access the vectorized caches.\n\nArguments\n\ntotal_length::Vector{Int} : single element vector containing the current total length of the eventual cache vector. Modified in place.\nl::Int : total length of the object in question\ns::Int : size of the object in question\n\nReturns\n\ndims::NamedTuple : A named tuple containing index and shape fields\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_utilities/#DuctAPE.write_data","page":"Utilities","title":"DuctAPE.write_data","text":"write_data(outs, filename; checkoutfileexists=false)\n\nWrites NamedTuples, specifically for writing out the output of the post_procces() function.\n\nArguments:\n\nouts::NamedTuple : Named tuple to write to file.\nfilename::String : file name (including full desired path and file type) for file to write\n\nKeyword Arguments:\n\noutput_tuple_name::String : desired variable name of written NamedTuple\ncheckoutfileexists::Bool=false : boolean for whether to check if the outfile already exists and whether or not to overwrite it.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_process/#Analysis","page":"Process","title":"Analysis","text":"","category":"section"},{"location":"DuctAPE/api/private_process/","page":"Process","title":"Process","text":"DuctAPE.analyze_multipoint","category":"page"},{"location":"DuctAPE/api/private_process/#DuctAPE.analyze_multipoint","page":"Process","title":"DuctAPE.analyze_multipoint","text":"analyze_multipoint(\n ducted_rotor::DuctedRotor,\n operating_point::OperatingPoint,\n reference_parameters::ReferenceParameters\n prepost_containers,\n solve_parameter_cache_vector,\n solve_parameter_cache_dims,\n airfoils,\n A_bb_LU,\n idmaps,\n problem_dimensions,\n options::Options;\n solve_container_caching=nothing,\n return_inputs=false,\n)\n\nIdentical 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 ducted_rotor with the explicit operating point input.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_process/#Process","page":"Process","title":"Process","text":"","category":"section"},{"location":"DuctAPE/api/private_process/","page":"Process","title":"Process","text":"DuctAPE.process\nDuctAPE.solve","category":"page"},{"location":"DuctAPE/api/private_process/#DuctAPE.process","page":"Process","title":"DuctAPE.process","text":"process(\n solver_options::SolverOptionsType,\n solve_parameter_cache_vector,\n solve_parameter_cache_dims,\n airfoils,\n A_bb_LU,\n solve_container_caching,\n idmaps,\n options,\n)\n\nProcess (the step between pre-process and post-process) the solution, in other words: call the solver(s).\n\nArguments\n\nsolver_options::SolverOptionsType : the solver options contained in the options object, used for dispatch.\nsolve_parameter_cache_vector::Vector{Float} : The vector cache for parameters used in the solve.\nsolve_parameter_cache_dims::NamedTuple : A named tuple containing the dimensions of the solve parameters.\nairfoils::NamedTuple : The airfoils to be interpolated that are associated with each blade element\nA_bb_LU::LinearAlgebra.LU : The LU decomposition of the panel method LHS matrix\nsolve_container_caching::NamedTuple : A named tuple containing the cache and dimensions for the intermediate solve values.\nidmaps::NamedTuple : The set of index maps used in various solve sub-functions\noptions::Options : User options\n\nReturns\n\nconverged_states::Vector{Float} : The output of a call to ImplicitAD.implicit\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_process/#DuctAPE.solve","page":"Process","title":"DuctAPE.solve","text":"solve(sensitivity_parameters, const_cache; initial_guess=nothing)\n\nA compact dispatch of solve that automatically dispatches based on the solveroptions contained in constcache.\n\n\n\n\n\nsolve(\n solver_options::SolverOptionsType,\n sensitivity_parameters,\n const_cache;\n initial_guess=nothing,\n)\n\nConverge the residual, solving for the state variables that do so.\n\nArguments\n\nsolver_options::SolverOptionsType : SolverOptionsType used for dispatch\nsensitivity_parameters::Vector{Float} : Sensitivity parameters for solve (parameters passed in through ImplicitAD)\nconst_cache::NamedTuple : A named tuple containing constants and caching helpers.\n\nKeyword Arguments\n\ninitial_guess=nothing::Vector{Float} : An optional manually provided initial guess (contained in the sensitivity parameters anyway).\n\nReturns\n\nconverged_states::Vector{Float} : the states for which the residual has converged.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_process/#Solvers","page":"Process","title":"Solvers","text":"","category":"section"},{"location":"DuctAPE/api/private_process/#ModCSOR","page":"Process","title":"ModCSOR","text":"","category":"section"},{"location":"DuctAPE/api/private_process/","page":"Process","title":"Process","text":"DuctAPE.mod_COR_solver\nDuctAPE.relax_Gamr_mod!\nDuctAPE.relax_gamw_mod!\nDuctAPE.update_states!","category":"page"},{"location":"DuctAPE/api/private_process/#DuctAPE.mod_COR_solver","page":"Process","title":"DuctAPE.mod_COR_solver","text":"mod_COR_solver(\n r_fun!,\n states,\n B,\n state_dims;\n convergence_tolerance=1e-10,\n iteration_limit=500,\n relaxation_parameters=(; nrf=0.4, bt1=0.2, bt2=0.6, pf1=0.4, pf2=0.5, btw=0.6, pfw=1.2),\n)\n\nModified DFDC-like CSOR solver that updates all states before relaxing Gamr and gamw.\n\nArguments:\n\nr_fun!::function handle : the residual function for the solver to use\ninitial_states::Vector{Float} : the inital guess for the states\nB::Vector{Float} : number of blades on each rotor (used in state relaxation)\nstate_dims::NamedTuple : dimensions of the states (used in state relaxation)\n\nKeyword Arguments\n\nconvergence_tolerance::type=1e-10 : absolute convergence tolerance\niteration_limit::type=500 : maximum number of iterations\nrelaxation_parameters::type=(; nrf=0.4, bt1=0.2, bt2=0.6, pf1=0.4, pf2=0.5, btw=0.6, pfw=1.2) : parameters used in state relaxation\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_process/#DuctAPE.relax_Gamr_mod!","page":"Process","title":"DuctAPE.relax_Gamr_mod!","text":"relax_Gamr_mod!(\n Gamr,\n r_Gamr_current,\n r_Gamr_previous,\n B;\n nrf=0.4,\n bt1=0.2,\n bt2=0.6,\n pf1=0.4,\n pf2=0.5,\n test=false,\n)\n\nApply relaxed step to Gamr.\n\nArguments\n\nGamr::Array{Float} : Array of rotor circulations (columns = rotors, rows = blade elements), updated in place\nB::Vector{Float} : number of blades on each rotor\nr_Gamr_current::Array{Float} : Array of current iteration's differences in circulation values\nr_Gamr_previous::Array{Float} : Array of previous iteration's differences in circulation values, updated in place\n\nKeyword Arguments:\n\nnrf::Float=0.4 : nominal relaxation factor\nbt1::Float=0.2 : backtrack factor 1\nbt2::Float=0.6 : backtrack factor 2\npf1::Float=0.4 : press forward factor 1\npf2::Float=0.5 : press forward factor 2\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_process/#DuctAPE.relax_gamw_mod!","page":"Process","title":"DuctAPE.relax_gamw_mod!","text":"relax_gamw_mod!(gamw, r_gamw_current, r_gamw_previous; nrf=0.4, btw=0.6, pfw=1.2)\n\nApply relaxed step to gamw.\n\nArguments\n\ngamw::Array{Float} : Array of rotor circulations (columns = rotors, rows = blade elements), updated in place\nr_gamw_current::Array{Float} : Array of current iteration's differences in circulation values\nr_gamw_previous::Array{Float} : Array of previous iteration's differences in circulation values, updated in place\n\nKeyword Arguments\n\nnrf::Float=0.4 : nominal relaxation factor\nbt1::Float=0.2 : backtrack factor 1\nbt2::Float=0.6 : backtrack factor 2\npf1::Float=0.4 : press forward factor 1\npf2::Float=0.5 : press forward factor 2\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_process/#DuctAPE.update_states!","page":"Process","title":"DuctAPE.update_states!","text":"update_states!(states, r_current, r_previous, B, relaxation_parameters, state_dims)\n\nUpdate states using DFDC-like relaxation methods.\n\nArguments\n\nstates::Vector{Float} : current iteration states to update\nr_current::Vector{Float} : current iteration residual values\nr_previous::Vector{Float} : previous iteration residual values\nB::Vector{Float} : number of blades for each rotor\nrelaxation_parameters::NamedTuple : relaxation parameters\nstate_dims::NamedTuple : dimensions of the state variables\nsolver_options::SolverOptionsType : used for dispatch\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_process/#CSOR","page":"Process","title":"CSOR","text":"","category":"section"},{"location":"DuctAPE/api/private_process/","page":"Process","title":"Process","text":"DuctAPE.apply_relaxation_schedule\nDuctAPE.update_CSOR_residual_values!\nDuctAPE.check_CSOR_convergence!\nDuctAPE.relax_Gamr!\nDuctAPE.relax_gamw!","category":"page"},{"location":"DuctAPE/api/private_process/#DuctAPE.apply_relaxation_schedule","page":"Process","title":"DuctAPE.apply_relaxation_schedule","text":"apply_relaxation_schedule(\n resid::AbstractVector, solver_options::TS\n) where {TS<:SolverOptionsType}\n\nApply custom relaxation schedule to all relaxation factor inputs based on residual values.\n\nArguments\n\nresid::AbstractVector{Float} : current residual values\nsolver_options::SolverOptionsType : SolverOptions containing relaxation schedule\n\nReturns\n\nnrf::Float : nominal relaxation factor\nbt1::Float : backtrack factor 1\nbt2::Float : backtrack factor 2\npf1::Float : press forward factor 1\npf2::Float : press forward factor 2\n\n\n\n\n\napply_relaxation_schedule(resid, nominal, schedule)\n\nApply custom relaxation schedule to a single relaxation factor input.\n\nArguments\n\nresid::Float : residual value\nnominal::Float : nominal relaxation value\nschedule::AbstractVector{AbstractVector{Float}} : values between which to interpolate to scale the nominal relaxation value.\n\nReturns\n\nrf::Float : the updated relaxation factor\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_process/#DuctAPE.update_CSOR_residual_values!","page":"Process","title":"DuctAPE.update_CSOR_residual_values!","text":"update_CSOR_residual_values!(\n convergence_type::ConvergenceType, resid, maxBGamr, maxdeltaBGamr, maxdeltagamw, Vconv\n)\n\nUpdate CSOR residual values in place.\n\nArguments\n\nconvergence_type::ConvergenceType : used for dispatch of relative or absolute residual values.\nresid::Vector{Float} : residual values modified in place\nmaxBGamr::Float : Maximum value of B*Gamr among all blade elements\nmaxdeltaBGamr::Float : Maximum change in B*Gamr between iterations among all blade elements\nmaxdeltagamw::Vector{Float} : Maximum change in gamw among all wake nodes (one element)\nVconv::Float : Reference velocity upon which the relative convergence criteria is based (one element)\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_process/#DuctAPE.check_CSOR_convergence!","page":"Process","title":"DuctAPE.check_CSOR_convergence!","text":"check_CSOR_convergence!(\n conv, resid; f_circ=1e-3, f_dgamw=2e-4, convergence_type=Relative(), verbose=false\n)\n\nDescription\n\nArguments\n\nconv::Vector{Float} : container holding convergence flag\nresid::Vector{Float} : residual vector\n\nKeyword Arguments\n\nf_circ::Float=1e-3 : convergence criteria for circulation residual\nf_dgamw::Float=2e-4 : convergence criteria for wake strength residual\nconvergence_type::ConvergenceType=Relative() : convergence type (absolute or relative) for print statements\nverbose::Bool=false : flag for verbose print statements\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_process/#DuctAPE.relax_Gamr!","page":"Process","title":"DuctAPE.relax_Gamr!","text":"relax_Gamr!(\n Gamr,\n delta_prev_mat,\n delta_mat,\n maxBGamr,\n maxdeltaBGamr,\n B;\n nrf=0.4,\n bt1=0.2,\n bt2=0.6,\n pf1=0.4,\n pf2=0.5,\n test=false,\n)\n\nApply relaxed step to Gamr.\n\nArguments\n\nGamr::Array{Float} : Array of rotor circulations (columns = rotors, rows = blade elements), updated in place\ndelta_prev_mat::Array{Float} : Array of previous iteration's differences in circulation values, updated in place\ndelta_mat::Array{Float} : Array of current iteration's differences in circulation values\nmaxBGamr::Array{Float} : stores value of maximum B*Gamr for each rotor\nmaxdeltaBGamr::Array{Float} : stores value of maximum change in B*Gamr for each rotor\nB::Vector{Float} : number of blades on each rotor\nnrf::Float=0.4 : nominal relaxation factor\nbt1::Float=0.2 : backtrack factor 1\nbt2::Float=0.6 : backtrack factor 2\npf1::Float=0.4 : press forward factor 1\npf2::Float=0.5 : press forward factor 2\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_process/#DuctAPE.relax_gamw!","page":"Process","title":"DuctAPE.relax_gamw!","text":"relax_gamw!(\n gamw, delta_prev, delta, maxdeltagamw; nrf=0.4, btw=0.6, pfw=1.2, test=false\n)\n\nApply relaxed step to gamw.\n\nArguments\n\ngamw::Array{Float} : Array of rotor circulations (columns = rotors, rows = blade elements), updated in place\ndelta_prev_mat::Array{Float} : Array of previous iteration's differences in circulation values, updated in place\ndelta_mat::Array{Float} : Array of current iteration's differences in circulation values\nmaxdeltagamw::Array{Float} : Single element array that gets updated with the new maximum change in gamw.\n\nKeyword Arguments:\n\nnrf::Float=0.4 : nominal relaxation factor\nbt1::Float=0.2 : backtrack factor 1\nbt2::Float=0.6 : backtrack factor 2\npf1::Float=0.4 : press forward factor 1\npf2::Float=0.5 : press forward factor 2\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_process/#Residuals","page":"Process","title":"Residuals","text":"","category":"section"},{"location":"DuctAPE/api/private_process/#ModCSOR-2","page":"Process","title":"ModCSOR","text":"","category":"section"},{"location":"DuctAPE/api/private_process/","page":"Process","title":"Process","text":"DuctAPE.mod_CSOR_residual!\nDuctAPE.estimate_CSOR_states!","category":"page"},{"location":"DuctAPE/api/private_process/#DuctAPE.mod_CSOR_residual!","page":"Process","title":"DuctAPE.mod_CSOR_residual!","text":"mod_CSOR_residual!(r, current_states, inputs, constants)\n\nModified DFDC-like CSOR residual that does not include any relaxation within the residual calculation.\n\nArguments\n\nr::Vector{Float} : solve residual\ncurrent_states::Vector{Float} : solve states\ninputs::Vector{Float} : solve inputs\nconstants::Vector{Float} : solve constants\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_process/#DuctAPE.estimate_CSOR_states!","page":"Process","title":"DuctAPE.estimate_CSOR_states!","text":"estimate_CSOR_states!(\n solve_containers,\n Gamr,\n sigr,\n gamw,\n operating_point,\n ivr,\n ivw,\n linsys,\n blade_elements,\n wakeK,\n idmaps;\n verbose=false,\n)\n\nEstimate states for modified CSOR solver.\n\nArguments:\n\nsolve_containers::NamedTuple : cache for intermediate solve values\nGamr::type : Blade element circulation strengths\nsigr::type : Rotor source panel strengths\ngamw::type : Wake vortex panel strengths\noperating_point::NamedTuple : Named tuple containing operating_point information\nivr::NamedTuple : unit induced velocities on rotor(s)\nivw::NamedTuple : unit induced velocities on wake\nlinsys::NamedTuple : vectors and matricies comprising the panel method linear system\nblade_elements::NamedTuple : blade element geometry and airfoil polar information\nwakeK::Vector{Float} : geometric constants used in caculating wake strengths\nidmaps::NamedTuple : index maps used throughout solve\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_process/#CSOR-2","page":"Process","title":"CSOR","text":"","category":"section"},{"location":"DuctAPE/api/private_process/","page":"Process","title":"Process","text":"DuctAPE.CSOR_residual!\nDuctAPE.compute_CSOR_residual!","category":"page"},{"location":"DuctAPE/api/private_process/#DuctAPE.CSOR_residual!","page":"Process","title":"DuctAPE.CSOR_residual!","text":"CSOR_residual!(resid, state_variables, sensitivity_parameters, constants)\n\nThe in-place residual used for the CSOR solve method.\n\nArguments\n\nresid::Vector{Float} : In-place residual.\nstate_variables::Vector{Float} : The state variables\nsensitivity_parameters::Vector{Float} : The parameters to which the solution is sensitive.\nconstants::NamedTuple : Various constants required in the solve\n\nReturns\n\nstate_variables::Vector{Float} : The state variables (modified in place)\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_process/#DuctAPE.compute_CSOR_residual!","page":"Process","title":"DuctAPE.compute_CSOR_residual!","text":"compute_CSOR_residual!(\n resid,\n solver_options,\n solve_containers,\n Gamr,\n sigr,\n gamw,\n operating_point,\n ivr,\n ivw,\n linsys,\n blade_elements,\n wakeK,\n idmaps;\n verbose=false,\n)\n\nDescription\n\nArguments\n\nresid::Vector{Float} : the residual vector\nsolver_options::SolverOptionsType : solver options (used for convergence criteria)\nsolve_containers::NamedTuple : cache for intermediate solve values\nGamr::type : Blade element circulation strengths\nsigr::type : Rotor source panel strengths\ngamw::type : Wake vortex panel strengths\noperating_point::NamedTuple : Named tuple containing operating_point information\nivr::NamedTuple : unit induced velocities on rotor(s)\nivw::NamedTuple : unit induced velocities on wake\nlinsys::NamedTuple : vectors and matricies comprising the panel method linear system\nblade_elements::NamedTuple : blade element geometry and airfoil polar information\nwakeK::Vector{Float} : geometric constants used in caculating wake strengths\nidmaps::NamedTuple : index maps used throughout solve\n\nKeyword Arguments\n\nverbose::Bool=false : Flag to print verbose statements\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_process/#External-Solvers","page":"Process","title":"External Solvers","text":"","category":"section"},{"location":"DuctAPE/api/private_process/","page":"Process","title":"Process","text":"DuctAPE.system_residual\nDuctAPE.system_residual!\nDuctAPE.update_system_residual!\nDuctAPE.estimate_states!","category":"page"},{"location":"DuctAPE/api/private_process/#DuctAPE.system_residual","page":"Process","title":"DuctAPE.system_residual","text":"system_residual(state_variables, sensitivity_parameters, constants)\n\nThe residual function for external solvers.\n\nArguments\n\nstate_variables::Vector{Float} : the state variables\nsensitivity_parameters::Vector{Float} : parameters to which the solution derivatives are sensitive\nconstants::NamedTuple : parameters to which the solution derivatives are constant\n\nReturs\n\nresid::Vector{Float} : residual vector\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_process/#DuctAPE.system_residual!","page":"Process","title":"DuctAPE.system_residual!","text":"system_residual!(resid, state_variables, sensitivity_parameters, constants)\n\nIn-place version of system_residual.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_process/#DuctAPE.update_system_residual!","page":"Process","title":"DuctAPE.update_system_residual!","text":"update_system_residual!(\n solver_options::SolverOptionsType\n resid,\n vz_est,\n vz_rotor,\n vtheta_est,\n vtheta_rotor,\n Cm_est,\n Cm_wake,\n solve_parameter_cache_dims,\n)\n\nUpdate the residual for external solvers.\n\nArguments\n\n`solver_options::SolverOptionsType\nresid::Vector{Float} : residual vector\nvz_est::Vector{Float} : axial induced rotor velocity estimate container\nvz_rotor::Vector{Float} : axial induced rotor velocity state container\nvtheta_est::Vector{Float} : tangential induced rotor velocity estimate container\nvtheta_rotor::Vector{Float} : tangential induced rotor velocity state container\nCm_est::Vector{Float} : absolute meridional wake control point velocity estimate container\nCm_wake::Vector{Float} : absolute meridional wake control point velocity state container\nsolve_parameter_cache_dims::Vector{Float} : dimensions of state vectors to use in accessing the residual vector\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_process/#DuctAPE.estimate_states!","page":"Process","title":"DuctAPE.estimate_states!","text":"estimate_states!(\n solve_containers,\n vz_rotor,\n vtheta_rotor,\n Cm_wake,\n operating_point,\n ivr,\n ivw,\n linsys,\n blade_elements,\n wakeK,\n idmaps;\n verbose=false,\n)\n\nEstimate velocity states.\n\nArguments\n\nsolve_containers::NamedTuple : cache for intermediate values in solve\nvz_rotor::Vector{Float} : axial induced rotor velocity state container\nvtheta_rotor::Vector{Float} : tangential induced rotor velocity state container\nCm_wake::Vector{Float} : absolute meridional wake control point velocity state container\noperating_point::NamedTuple : Named tuple containing operating_point information\nivr::NamedTuple : unit induced velocities on rotor(s)\nivw::NamedTuple : unit induced velocities on wake\nlinsys::NamedTuple : vectors and matricies comprising the panel method linear system\nblade_elements::NamedTuple : blade element geometry and airfoil polar information\nwakeK::Vector{Float} : geometric constants used in caculating wake strengths\nidmaps::NamedTuple : index maps used throughout solve\n\nKeyword Arguments\n\nverbose::Bool=false : flag for verbose print statements\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_process/#Solve-Utilities","page":"Process","title":"Solve Utilities","text":"","category":"section"},{"location":"DuctAPE/api/private_process/","page":"Process","title":"Process","text":"DuctAPE.extract_initial_guess\nDuctAPE.extract_state_variables","category":"page"},{"location":"DuctAPE/api/private_process/#DuctAPE.extract_initial_guess","page":"Process","title":"DuctAPE.extract_initial_guess","text":"extract_initial_guess(\n solver_options::SolverOptionsType, sensitivity_parameters, state_dims\n)\n\nExtract initial guess from the solve parameters cache vector.\n\nArguments\n\nsolver_options::SolverOptionsType : used for dispatch\nsensitivity_parameters::Vector{Float} : vector form of solve parameter cache passed into the solver.\nstate_dims::NamedTuple : dimensions and indices of state variables within the solve parameter cache vector\n\nReturns\n\ninitial_guess::Vector{Float}` : a vector of the solver initial guess\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_process/#DuctAPE.extract_state_variables","page":"Process","title":"DuctAPE.extract_state_variables","text":"extract_state_variables(solver_options::SolverOptionsType, vars, dims)\n\nReshape the state variables from a single vector, to multiple arrays.\n\nArguments\n\nReturns if solver_options <: CSORSolverOptions\n\nGamr::type : Blade element circulation strengths\nsigr::type : Rotor source panel strengths\ngamw::type : Wake vortex panel strengths\n\nReturns if solver_options <: Union{ExternalSolverOptions, PolyAlgorithmOptions}\n\nvz_rotor::Vector{Float} : axial induced rotor velocity state container\nvtheta_rotor::Vector{Float} : tangential induced rotor velocity state container\nCm_wake::Vector{Float} : absolute meridional wake control point velocity state container\n\n\n\n\n\n","category":"function"},{"location":"C4Blade/api/#Index","page":"API Reference","title":"Index","text":"","category":"section"},{"location":"C4Blade/api/","page":"API Reference","title":"API Reference","text":"Pages = [\"C4Blade/api.md\"]\nDepth = 5","category":"page"},{"location":"C4Blade/api/","page":"API Reference","title":"API Reference","text":"Modules=[DuctAPE.C4Blade]","category":"page"},{"location":"DuctAPE/api/private_preprocess/#General","page":"Preprocess","title":"General","text":"","category":"section"},{"location":"DuctAPE/api/private_preprocess/","page":"Preprocess","title":"Preprocess","text":"DuctAPE.set_index_maps\nDuctAPE.precompute_parameters\nDuctAPE.precompute_parameters!","category":"page"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.set_index_maps","page":"Preprocess","title":"DuctAPE.set_index_maps","text":"set_index_maps(\n npanels,\n ncenterbody_inlet,\n nwake_sheets,\n dte_minus_cbte,\n wnm,\n wenids,\n nwp,\n nwsp,\n nbn,\n ndp,\n riiw,\n nrotor,\n)\n\nSet values for index map to be used throughout solve and post-process.\n\nArguments\n\nnpanels : paneling_constants.npanels\nncenterbody_inlet : paneling_constants.ncenterbody_inlet\nnwake_sheets : paneling_constants.nwake_sheets\ndte_minus_cbte : paneling_constants.dte_minus_cbte\nwnm : wake_vortex_panels.nodemap\nwenids : wake_vortex_panels.endnodeidxs\nnwp : problem_dimensions.nwp\nnwsp : problem_dimensions.nwsp\nnbn : problem_dimensions.nbn\nndp : body_vortex_panels.npanel[1]\nriiw : rotor_indices_in_wake\nnrotor : problem_dimensions.nrotor\n\nReturns\n\nidmaps::NamedTuple : A named tuple containing index mapping used in bookkeeping throughout solve and post-process\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.precompute_parameters","page":"Preprocess","title":"DuctAPE.precompute_parameters","text":"precompute_parameters(\n ducted_rotor,\n operating_point;\n grid_solver_options=GridSolverOptions(),\n integration_options=IntegrationOptions(),\n autoshiftduct=true,\n itcpshift=0.05,\n axistol=1e-15,\n tegaptol=1e1 * eps(),\n finterp=(x,y,xp)->FLOWMath.akima(x,y,xp,2.0*eps(),eps()),\n silence_warnings=true,\n verbose=false,\n)\n\nOut of place main pre-processing function that computes all the required parameters for the solve.\n\nArguments\n\nducted_rotor::DuctedRotor : A DuctedRotor object\noperating_point::OperatingPoint : A OperatingPoint object\n\nKeyword Arguments\n\ngrid_solver_options::GridSolverOptionsType=GridSolverOptions() : A GridSolverOptionsType object\nintegration_options::IntegrationMethod=IntegrationOptions() : An IntegrationMethod object\nautoshiftduct::Bool=true : flag to shift duct geometry based on rotor tip radius\nitcpshift::Float=0.05 : value used in positioning the internal pseudo control point in the solid bodies. Default is DFDC hard-coded value.\naxistol::Float=1e-15 : tolerance for how close to the axis of rotation to be considered on the axis.\ntegaptol::Float=1e1 * eps() : tolerance for how large of a trailing edge gap is considered a gap.\nfinterp::Function=FLOWMath.akima : interpolation method for re-interpolating body coordinates\nsilence_warnings::Bool=true : flag to silence warnings\nverbose::Bool=false : flag to print verbose statements\n\nReturns\n\nivr::NamedTuple : A named tuple containing arrays of induced velocities on the rotors\nivw::NamedTuple : A named tuple containing arrays of induced velocities on the wake\nivb::NamedTuple : A named tuple containing arrays of induced velocities on the bodies\nlinsys::NamedTuple : A named tuple containing cacheable data for the linear system, including:\nA_bb::Array{Float} : AIC (LHS) matrix for the panel method system\nb_bf::Array{Float} : Initial system RHS vector based on freestrem magnitude\nA_br::Array{Float} : Unit normal velocity from rotors onto body panels\nA_pr::Array{Float} : Unit normal velocity from rotors onto body internal psuedo control points\nA_bw::Array{Float} : Unit normal velocity from wake onto body panels\nA_pw::Array{Float} : Unit normal velocity from wake onto body internal psuedo control points\nA_bb_LU::LinearAlgebra.LU : LinearAlgebra LU factorization of the LHS matrix\nlu_decomp_flag::Vector{Bool} : flag for whether factorization was successful\nblade_elements::NamedTuple : A named tuple containing cacheable blade element information (see docs for interpolate_blade_elements)\nairfoils::Vector{AFType} : A matrix of airfoil types associated with each of the blade elements\nwakeK::Matrix{Float} : A matrix of precomputed geometric constants used in the calculation of the wake vortex strengths\nidmaps::NamedTuple : A named tuple containing index mapping used in bookkeeping throughout solve and post-process\npanels::NamedTuple : A named tuple of panel objects including:\nbody_vortex_panels::NamedTuple : the named tuple containing the body vortex panel information\nrotor_source_panels::NamedTuple : the named tuple containing the rotor source panel information\nwake_vortex_panels::NamedTuple : the named tuple containing the wake vortex panel information\nproblem_dimensions::ProblemDimensions : A ProblemDimensions object\n\n\n\n\n\nprecompute_parameters(\n rp_duct_coordinates,\n rp_centerbody_coordinates,\n wake_grid,\n rotor_indices_in_wake,\n Rtips,\n Rhubs,\n rotor,\n paneling_constants,\n operating_point,\n integration_options,\n problem_dimensions=nothing;\n itcpshift=0.05,\n axistol=1e-15,\n tegaptol=1e1 * eps(),\n silence_warnings=true,\n verbose=false,\n)\n\nAn alternate version of precompute_parameters allowing for user defined geometry that does not go through a re-panling step (use with caution).\n\nThe first inputs are the outputs of the reinterpolate_geometry and get_blade_ends_from_body_geometry functions.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.precompute_parameters!","page":"Preprocess","title":"DuctAPE.precompute_parameters!","text":"precompute_parameters!(\n ivr,\n ivw,\n blade_element_cache,\n linsys,\n wakeK,\n ducted_rotor,\n operating_point,\n prepost_containers,\n problem_dimensions;\n grid_solver_options=GridSolverOptions(),\n integration_options=IntegrationOptions(),\n autoshiftduct=true,\n itcpshift=0.05,\n axistol=1e-15,\n tegaptol=1e1 * eps(),\n finterp=(x,y,xp)->FLOWMath.akima(x,y,xp,2.0*eps(),eps()),\n silence_warnings=true,\n verbose=false,\n)\n\nIn-place version of precompute_parameters.\n\n\n\n\n\nprecompute_parameters!(\n ivr,\n ivw,\n blade_element_cache,\n linsys,\n wakeK,\n wake_grid,\n rp_duct_coordinates,\n rp_centerbody_coordinates,\n rotor_indices_in_wake,\n rotor,\n paneling_constants,\n operating_point,\n prepost_containers,\n problem_dimensions=nothing;\n integration_options=IntegrationOptions(),\n itcpshift=0.05,\n axistol=1e-15,\n tegaptol=1e1 * eps(),\n finterp=(x,y,xp)->FLOWMath.akima(x,y,xp,2.0*eps(),eps()),\n silence_warnings=true,\n verbose=false,\n)\n\nIn-place version of the precompute_parameters function by-passing the geometry reinterpolateion. (Use with caution)\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#Geometry","page":"Preprocess","title":"Geometry","text":"","category":"section"},{"location":"DuctAPE/api/private_preprocess/","page":"Preprocess","title":"Preprocess","text":"DuctAPE.reinterpolate_geometry\nDuctAPE.reinterpolate_geometry!\nDuctAPE.generate_all_panels\nDuctAPE.generate_all_panels!","category":"page"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.reinterpolate_geometry","page":"Preprocess","title":"DuctAPE.reinterpolate_geometry","text":"reinterpolate_geometry(\n problem_dimensions,\n duct_coordinates,\n centerbody_coordinates,\n rotor,\n paneling_constants;\n autoshiftduct=true,\n grid_solver_options=GridSolverOptions(),\n finterp=(x,y,xp)->FLOWMath.akima(x,y,xp,2.0*eps(),eps()),\n verbose=false,\n silence_warnings=true,\n)\n\nRe-interpolate the body geometry and return compatible body and way geometry.\n\nArguments\n\nproblem_dimensions::ProblemDimensions : A ProblemDimensions object\nduct_coordinates::Matrix{Float} : [z,r] coordinates of duct geometry\ncenterbody_coordinates::Matrix{Float} : [z,r] coordinates of centerbody geometry\nrotor::Rotor : A Rotor object\npaneling_constants::PanelingConstants : A PanelingConstants object\n\nKeyword Arguments\n\nautoshiftduct::Bool=true : flag to shift duct geometry based on rotor tip radius\ngrid_solver_options::SolverOptionsType=GridSolverOptions() : options for the wake grid position solver\nfinterp::Function=FLOWMath.akima : interpolation method for re-interpolating body coordinates\nverbose::Bool=false : flag to print verbose statements\nsilence_warnings::Bool=true : flag to silence warnings\n\nReturns\n\nwake_grid::Array{Float} : array containig the z and r elliptic grid points defning the wake geometry.\nrp_duct_coordinates::Matrix{Float} : matrix containing the re-paneled duct coordinates\nrp_centerbody_coordinates::Matrix{Float} : matrix containing the re-paneled centerbody coordinates\nrotor_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).\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.reinterpolate_geometry!","page":"Preprocess","title":"DuctAPE.reinterpolate_geometry!","text":"reinterpolate_geometry!(\n wake_grid,\n rp_duct_coordinates,\n rp_centerbody_coordinates,\n rotor_indices_in_wake,\n duct_coordinates,\n centerbody_coordinates,\n rotor,\n blade_element_cache,\n paneling_constants;\n autoshiftduct=true,\n grid_solver_options=GridSolverOptions(),\n finterp=(x,y,xp)->FLOWMath.akima(x,y,xp,2.0*eps(),eps()),\n verbose=false,\n silence_warnings=true,\n)\n\nIn-place version of reinterpolate_geometry.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.generate_all_panels","page":"Preprocess","title":"DuctAPE.generate_all_panels","text":"generate_all_panels(\n rp_duct_coordinates,\n rp_centerbody_coordinates,\n nwake_sheets,\n rotor_indices_in_wake,\n rotorzloc,\n wake_grid;\n itcpshift=0.05,\n axistol=1e-15,\n tegaptol=1e1 * eps(),\n silence_warnings=true,\n)\n\nFunction that calls all of the various panel generation functions are returns a named tuple containing all the panels\n\nArguments\n\nrp_duct_coordinates::Matrix{Float} : matrix containing the re-paneled duct coordinates\nrp_centerbody_coordinates::Matrix{Float} : matrix containing the re-paneled centerbody coordinates\nnwake_sheets::Int : number of wake sheets\nrotor_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).\nrotorzloc:Vector{Float} : axial locations of rotor lifting lines (contained in Rotor)\nwake_grid::Array{Float} : array containig the z and r elliptic grid points defning the wake geometry.\n\nKeyword Arguments\n\nitcpshift::Float=0.05 : value used in positioning the internal pseudo control point in the solid bodies. Default is DFDC hard-coded value.\naxistol::Float=1e-15 : tolerance for how close to the axis of rotation to be considered on the axis.\ntegaptol::Float=1e1 * eps() : tolerance for how large of a trailing edge gap is considered a gap.\nsilence_warnings::Bool=true : flag to silence warnings\n\nReturns\n\npanels::NamedTuple : A named tuple of named tuples containing paneling information, including:\nbody_vortex_panels::NamedTuple\nrotor_source_panels::NamedTuple\nwake_vortex_panels::NamedTuple\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.generate_all_panels!","page":"Preprocess","title":"DuctAPE.generate_all_panels!","text":"generate_all_panels!(\n panels,\n wake_grid,\n rp_duct_coordinates,\n rp_centerbody_coordinates,\n rotor_indices_in_wake,\n rotorzloc,\n nwake_sheets;\n itcpshift=0.05,\n axistol=1e-15,\n tegaptol=1e1 * eps(),\n silence_warnings=true,\n)\n\nIn-place version of generate_all_panels.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#Wake","page":"Preprocess","title":"Wake","text":"","category":"section"},{"location":"DuctAPE/api/private_preprocess/","page":"Preprocess","title":"Preprocess","text":"DuctAPE.discretize_wake\nDuctAPE.generate_wake_grid\nDuctAPE.generate_wake_grid!\nDuctAPE.initialize_wake_grid\nDuctAPE.initialize_wake_grid!\nDuctAPE.relax_grid!\nDuctAPE.solve_elliptic_grid!\nDuctAPE.solve_elliptic_grid\nDuctAPE.elliptic_grid_residual!\nDuctAPE.backward_stencil_1\nDuctAPE.center_stencil_1\nDuctAPE.center_stencil_2\nDuctAPE.center_stencil_2_mixed\nDuctAPE.generate_wake_panels\nDuctAPE.generate_wake_panels!\nDuctAPE.get_wake_k\nDuctAPE.get_wake_k!","category":"page"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.discretize_wake","page":"Preprocess","title":"DuctAPE.discretize_wake","text":"discretize_wake(\n duct_coordinates,\n centerbody_coordinates,\n rotorzloc, # rotor axial locations\n wake_length,\n npanels,\n dte_minus_cbte;\n)\n\nCalculate wake sheet panel node z-coordinates.\n\nArguments\n\nduct_coordinates::Matrix{Float} : Array of input duct coordinates\ncenterbody_coordinates::Matrix{Float} : Array of input centerbody_coordinates coordinates\nrotorzloc ::Vector{Float} : rotor axial locations\nwake_length::Float : non-dimensional length of wake to extend beyond aft-most body trailing edge.\nnpanels::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]\ndte_minus_cbte::Float : indicator as to whether the duct trailing edge minus the centerbody trailing edge is positive, zero, or negative.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.generate_wake_grid","page":"Preprocess","title":"DuctAPE.generate_wake_grid","text":"generate_wake_grid(\n problem_dimensions,\n rp_duct_coordinates,\n rp_centerbody_coordinates,\n Rhub1,\n Rtip1,\n tip_gap1,\n zwake;\n grid_solver_options=GridSolverOptions(),\n verbose=false,\n silence_warnings=true,\n)\n\nInitialize and solve for elliptic grid on which wake sheets are defined.\n\nArguments\n\nproblem_dimensions:: : A ProblemDimensions object\nrp_duct_coordinates:: : repaneled duct coordinates\nrp_centerbody_coordinates:: : repaneled centerbody coordinates\nRhub1:: : Hub radius of first rotor\nRtip1:: : Tip radius of first rotor\ntip_gap1:: : Tip gap of first rotor (MUST BE ZERO for now)\nzwake:: : axial positions of wake sheet panel nodes\n\nKeyword Arguments\n\ngrid_solver_options::GridSolverOptionsType=GridSolverOptions() : options for solving the elliptic grid.\nverbose::Bool=false : flag to print verbose statements\nsilence_warnings::Bool=true : flag to supress warnings\n\nReturns\n\nwake_grid::Array{Float,3} : 3D Array of axial and radial wake_grid points after solution of elliptic system.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.generate_wake_grid!","page":"Preprocess","title":"DuctAPE.generate_wake_grid!","text":"generate_wake_grid!(\n wake_grid,\n rp_duct_coordinates,\n rp_centerbody_coordinates,\n Rhub1,\n Rtip1,\n tip_gap1,\n zwake;\n grid_solver_options=grid_solver_options,\n verbose=false,\n silence_warnings=true,\n)\n\nIn-place version of generate_wake_grid.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.initialize_wake_grid","page":"Preprocess","title":"DuctAPE.initialize_wake_grid","text":"initialize_wake_grid(rp_duct_coordinates, rp_centerbody_coordinates, zwake, rwake)\n\nInitialize the wake grid.\n\nArguments:\n\nrp_duct_coordinates::Matrix{Float} : The re-paneled duct coordinates\nrp_centerbody_coordinates::Matrix{Float} : The re-paneled centerbody coordinates\nzwake::Vector{Float} : The axial positions of the wake sheet panel nodes\nrwake::Vector{Float} : The radial positions of the blade elements for the foremost rotor\n\nReturns:\n\nwake_grid::Array{Float,3} : 3D Array of axial and radial wake_grid points\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.initialize_wake_grid!","page":"Preprocess","title":"DuctAPE.initialize_wake_grid!","text":"initialize_wake_grid!(\n wake_grid, rp_duct_coordinates, rp_centerbody_coordinates, zwake, rwake\n)\n\nIn-place version of initialize_wake_grid.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.relax_grid!","page":"Preprocess","title":"DuctAPE.relax_grid!","text":"relax_grid!(\n grid_solver_options::GridSolverOptionsType,\n wake_grid;\n verbose=false,\n silence_warnings=true,\n tabchar=\" \",\n ntab=1,\n)\n\nRelax/Solve initial wake grid according to elliptic system of equations.\n\nArguments\n\n`gridsolveroptions::GridSolverOptionsType' : options for elliptic grid solver\nwake_grid::Array{Float,3} : Initialized wake grid\n\nKeyword Arguments\n\n`verbose=false::' : flag for printing verbose statements\n`silence_warnings=true::' : flag for supressing warnings\n`tabchar::String=\" \"::' : string to use for tabbing over verbose statements.\n`ntab::Int=1' : number of tabs for printing verbose statements\n\n\n\n\n\nrelax_grid!(xg, rg, nxi, neta; iteration_limit, atol)\n\nRelax wakegrid using elliptic wakegrid solver.\n\nArguments:\n\nwake_grid::Array{Float} : initial guess for grid points.\n\nKeyword Arguments:\n\niteration_limit::Int : maximum number of iterations to run, default=100\natol::Float : convergence tolerance, default = 1e-9\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.solve_elliptic_grid!","page":"Preprocess","title":"DuctAPE.solve_elliptic_grid!","text":"solve_elliptic_grid!(\n wake_grid;\n algorithm=:trust_region,\n autodiff=:forward,\n atol=1e-14,\n iteration_limit=10,\n converged=[false],\n verbose=false,\n)\n\nSolve for elliptic grid using a non-SLOR approach that is compatible with ImplicitAD\n\nArguments:\n\nwake_grid::Array{Float} : initial guess for grid points.\n\nKeyword Arguments:\n\nalgorithm::Symbol=:trust_region : NLsolve algorithm type\nautodiff::Symbol=:forward : NLsolve derivatives option\natol::Float=1e-10 : convergence tolerance, default = 1e-9\niteration_limit::Int=10 : maximum number of iterations to run, default=100\nconverged::Vector{Bool}=[false] : convergence flag\nverbose::Bool=false : flag to print verbose statements\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.solve_elliptic_grid","page":"Preprocess","title":"DuctAPE.solve_elliptic_grid","text":"solve_elliptic_grid!(x,p)\n\nSolve for elliptic grid using a non-SLOR approach that is compatible with ImplicitAD\n\nArguments:\n\nx::Vector{Float} : inputs (including initial guess for wake grid points)\np::NamedTuple : constant parameters\n\nReturns:\n\nconverged_states::Vector{Float} : converged states for grid solver\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.elliptic_grid_residual!","page":"Preprocess","title":"DuctAPE.elliptic_grid_residual!","text":"elliptic_grid_residual!(r, y, x, p)\n\nResidual function for elliptic grid solver.\n\nNote: We assume grid has radial lines of constant axial position (as is done in the grid initialization) such that z'(ξ)=1.0 and z''(ξ)=z'(η)=z''(η)=0.0.\n\nArguments\n\nr::Vector{Float} : residual values\ny::Vector{Float} : states\nx::Vector{Float} : inputs (to which derivatives are sensitive)\np::Vector{Float} : constants\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.backward_stencil_1","page":"Preprocess","title":"DuctAPE.backward_stencil_1","text":"backward_stencil_1(f, x)\n\nThree-point, backward difference scheme on a non-uniform grid.\n\nArguments:\n\nf::AbstractMatrix{Float} : f(x) for x{i-2}:x{i}\nx::AbstractVector{Float} : [x{i-2}:x{i}]\n\nReturns:\n\nf'(x)::Float : ∂f/∂x at x_i\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.center_stencil_1","page":"Preprocess","title":"DuctAPE.center_stencil_1","text":"center_stencil_1(f, x)\n\nThree-point, central difference scheme on a non-uniform grid, for first derivatives.\n\nArguments:\n\nf::AbstractMatrix{Float} : f(x) for x{i-1}:x{i+1}\nx::AbstractVector{Float} : [x{i-1}:x{i+1}]\n\nReturns:\n\nf'(x)::Float : ∂f/∂x at x_i\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.center_stencil_2","page":"Preprocess","title":"DuctAPE.center_stencil_2","text":"center_stencil_2(f, x)\n\nThree-point, central difference scheme on a non-uniform grid, for second derivatives.\n\nArguments:\n\nf::AbstractMatrix{Float} : f(x) for x{i-1}:x{i+1}\nx::AbstractVector{Float} : [x{i-1}:x{i+1}]\n\nReturns:\n\nf''(x)::Float : ∂^2f/∂x^2 at x_i\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.center_stencil_2_mixed","page":"Preprocess","title":"DuctAPE.center_stencil_2_mixed","text":"center_stencil_2_mixed(f, x, y)\n\nThree-point, central difference scheme on a non-uniform grid, for mixed derivatives. Uses a consecutive first derivative central difference (center_stencil_1) in the x-dimension then another centeral difference of the f'(x) values in the y-dimension.\n\nArguments:\n\nf::AbstractMatrix{Float} : f(x,y) for x{i-1}:x{i+1} and y{i-1}:y{i+1}\nx::AbstractVector{Float} : [x{i-1}:x{i+1}]\ny::AbstractVector{Float} : [y{i-1}:y{i+1}]\n\nReturns:\n\nf'(x,y)::Float : ∂^2f/∂x∂y at x_ij\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.generate_wake_panels","page":"Preprocess","title":"DuctAPE.generate_wake_panels","text":"generate_wake_panels(wake_grid)\n\nGenerate paneling for each wake sheet emanating from the rotor blade elements.\n\nArguments:\n\nwake_grid::Array{Float,3} : axial and radial locations of each wake_grid point (after relaxation/solution)\n\nReturns:\n\nwake_vortex_panels::NamedTuple : A named tuple of panel values describing the wake vortex panels\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.generate_wake_panels!","page":"Preprocess","title":"DuctAPE.generate_wake_panels!","text":"generate_wake_panels!(wake_panels, wake_grid)\n\nIn-place version of generate_wake_panels.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.get_wake_k","page":"Preprocess","title":"DuctAPE.get_wake_k","text":"get_wake_k(r, nwn)\n\nCalculate geometric constant for use in later calculation of wake panel node strengths.\n\nArguments\n\nr::Vector{Float} : Vector of wake panel node radial positions\n\nReturns\n\nK::Vector{Float} : Vector of geometric constants used in calculation of panel node strengths.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.get_wake_k!","page":"Preprocess","title":"DuctAPE.get_wake_k!","text":"get_wake_k!(K, r)\n\nIn-place version of get_wake_k.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#Bodies","page":"Preprocess","title":"Bodies","text":"","category":"section"},{"location":"DuctAPE/api/private_preprocess/","page":"Preprocess","title":"Preprocess","text":"DuctAPE.reinterpolate_bodies!\nDuctAPE.place_duct!","category":"page"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.reinterpolate_bodies!","page":"Preprocess","title":"DuctAPE.reinterpolate_bodies!","text":"reinterpolate_bodies!(\n rp_duct_coordinates,\n rp_centerbody_coordinates,\n duct_coordinates,\n centerbody_coordinates,\n zwake,\n ncenterbody_inlet,\n nduct_inlet;\n finterp=FLOWMath.akima,\n)\n\nReinterpolate duct and centerbody coordinates in order to make them compatible with the calculated wake sheet panel axial positions.\n\nArguments\n\nrp_duct_coordinates::Matrix{Float} : the re-paneled duct coordinates\nrp_centerbody_coordinates::Matrix{Float} : the re-paneled centerbody coordinates\nduct_coordinates::Matrix{Float} : the input duct coordinates\ncenterbody_coordinates::Matrix{Float} : the input centerbody coordinates\nzwake::Matrix{Float} : the wake sheet panel node axial positions\nncenterbody_inlet::Matrix{Float} : the number of panels to use for the centerbody inlet\nnduct_inlet::Matrix{Float} : the number of panels to use for the duct inlet\n\nKeyword Arguments\n\nfinterp::Function=FLOWMath.akima : interpolation method\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.place_duct!","page":"Preprocess","title":"DuctAPE.place_duct!","text":"place_duct!(rp_duct_coordinates, Rtip, rotorzloc, tip_gap)\n\nTransform the duct radial coordinates such that the leading rotor radius touches the duct wall.\n\nNote 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.\n\nArguments\n\nrp_duct_coordinates::Matrix{Float} : the re-paneled duct coordinates\nRtip::Vector{Float} : Tip radii for the rotor(s)\nrotorzloc::Vector{Float} : axial position(s) of the rotor(s)\ntip_gap::Vector{Float} : tip gap for the fore-most rotor (MUST BE ZERO for now)\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#Rotors","page":"Preprocess","title":"Rotors","text":"","category":"section"},{"location":"DuctAPE/api/private_preprocess/","page":"Preprocess","title":"Preprocess","text":"DuctAPE.interpolate_blade_elements\nDuctAPE.interpolate_blade_elements!\nDuctAPE.get_blade_ends_from_body_geometry\nDuctAPE.get_blade_ends_from_body_geometry!\nDuctAPE.get_local_solidity\nDuctAPE.get_stagger\nDuctAPE.generate_rotor_panels\nDuctAPE.generate_rotor_panels!","category":"page"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.interpolate_blade_elements","page":"Preprocess","title":"DuctAPE.interpolate_blade_elements","text":"interpolate_blade_elements(\n rsp, Rtips, Rhubs, rotor_panel_centers, nbe; finterp=FLOWMath.linear\n)\n\nInterpolate blade elements based on Rotor inputs and number of desired blade elements (from number of wake sheet in PanelingConstants input)\n\nArguments\n\nrsp::Rotor : A Rotor object\n`Rtips::Vector{Float}' : Vector of rotor tip radii\n`Rhubs::Vector{Float}' : Vector of rotor hub radii\n`rotorpanelcenters::Vector{Float}' : Vector of rotor panel centers\nnbe::Int : number of blade elements per rotor\n\nKeyword Arguments\n\nfinterp::Function=FLOWMath.linear : interpolation method (note, using Akima splines as is done for the body geometry can lead to negative chord in some cases)\n\nReturns\n\nblade_element_cache::NamedTuple : A named tuple containing the cacheable blade element information excluding the airfoil data.\nairfoils::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.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.interpolate_blade_elements!","page":"Preprocess","title":"DuctAPE.interpolate_blade_elements!","text":"interpolate_blade_elements!(\n blade_element_cache, rsp, rotor_panel_centers, nbe; finterp=FLOWMath.linear\n)\n\nIn-place version of interpolate_blade_elements.\n\nReturns\n\nairfoils::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.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.get_blade_ends_from_body_geometry","page":"Preprocess","title":"DuctAPE.get_blade_ends_from_body_geometry","text":"get_blade_ends_from_body_geometry(\n rp_duct_coordinates, rp_centerbody_coordinates, tip_gaps, rotorzloc\n)\n\nObtain rotor hub and tip radii based on duct and centerbody geometry.\n\nArguments\n\nvar::type :\nrp_duct_coordinates::Matrix{Float} : re-paneled duct coordinates\nrp_centerbody_coordinates::Matrix{Float} : re-paneled centerbody coordinates\ntip_gaps::Vector{Float} : gaps between blade tips and duct surface (MUST BE ZEROS for now)\nrotorzloc::Vector{Float} : rotor lifting line axial positions.\n\nReturns\n\nRtips::Vector{Float} : rotor tip radii\nRhubs::Vector{Float} : rotor hub radii\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.get_blade_ends_from_body_geometry!","page":"Preprocess","title":"DuctAPE.get_blade_ends_from_body_geometry!","text":"get_blade_ends_from_body_geometry!(\n Rtip,\n Rhub,\n rp_duct_coordinates,\n rp_centerbody_coordinates,\n tip_gaps,\n rotorzloc;\n silence_warnings=true,\n)\n\nIn-place version of get_blade_ends_from_body_geometry.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.get_local_solidity","page":"Preprocess","title":"DuctAPE.get_local_solidity","text":"get_local_solidity(B, chord, r)\n\nCalculate local solidity from local chord, radial position, and number of blades.\n\nArguments\n\nB::Float : number of blades on rotor (usually an integer, but not necessarily).\nchord::Vector{Float} : chord lengths at each radial station.\nr::Vector{Float} : dimensional radial positions.\n\nReturns\n\nsolidity::Vector{Float} : local solidity at each radial station\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.get_stagger","page":"Preprocess","title":"DuctAPE.get_stagger","text":"get_stagger(twists)\n\nConvert twist angle to stagger angle\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.generate_rotor_panels","page":"Preprocess","title":"DuctAPE.generate_rotor_panels","text":"generate_rotor_panels(rotorzloc, wake_grid, rotor_indices_in_wake, nwake_sheets)\n\nGenerate rotor panel objects.\n\nArguments\n\nrotorzloc::Vector{Float} : rotor lifting line axial position\nwake_grid::Array{Float,3} : wake elliptic grid axial and radial locations\nrotor_indices_in_wake::Vector{Int} : indices of where along wake the rotors are placed\nnwake_sheets::Int : number of wake sheets\n\nReturns\n\nrotor_source_panels::NamedTuple : A named tuple containing the rotor source panel variables.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.generate_rotor_panels!","page":"Preprocess","title":"DuctAPE.generate_rotor_panels!","text":"generate_rotor_panels!(\n rotor_source_panels, rotorzloc, wake_grid, rotor_indices_in_wake, nwake_sheets\n)\n\nIn-place version of generate_rotor_panels.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#Induced-Velocities","page":"Preprocess","title":"Induced Velocities","text":"","category":"section"},{"location":"DuctAPE/api/private_preprocess/","page":"Preprocess","title":"Preprocess","text":"DuctAPE.calculate_unit_induced_velocities\nDuctAPE.calculate_unit_induced_velocities!\nDuctAPE.initialize_linear_system\nDuctAPE.initialize_linear_system!","category":"page"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.calculate_unit_induced_velocities","page":"Preprocess","title":"DuctAPE.calculate_unit_induced_velocities","text":"calculate_unit_induced_velocities(problem_dimensions, panels, integration_options)\n\nCalculate all the unit-induced velocties of all panels on all control points\n\nArguments\n\nproblem_dimensions::ProblemDimensions : A ProblemDimensions object\npanels::NamedTuple : A named tuple containing all the paneling information\nintegration_options::IntegrationOptions : Options used for integration of velocity kernals across panels\n\nReturns\n\nivr::NamedTuple : A named tuple containing arrays of induced velocities on the rotors\nivw::NamedTuple : A named tuple containing arrays of induced velocities on the wake\nivb::NamedTuple : A named tuple containing arrays of induced velocities on the bodies\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.calculate_unit_induced_velocities!","page":"Preprocess","title":"DuctAPE.calculate_unit_induced_velocities!","text":"calculate_unit_induced_velocities!(ivr, ivw, ivb, panels, integration_options)\n\nIn-place version of calculate_unit_induced_velocities.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.initialize_linear_system","page":"Preprocess","title":"DuctAPE.initialize_linear_system","text":"initialize_linear_system(\n ivb,\n body_vortex_panels,\n rotor_source_panels,\n wake_vortex_panels,\n Vinf,\n integration_options,\n)\n\nSet up the linear system used in the panel method solve.\n\nArguments\n\nivb::NamedTuple : the named tuple containing all the unit induced velocities on the bodies\nbody_vortex_panels::NamedTuple : the named tuple containing the body vortex panel information\nrotor_source_panels::NamedTuple : the named tuple containing the rotor source panel information\nwake_vortex_panels::NamedTuple : the named tuple containing the wake vortex panel information\nVinf::Vector{Float} : the one-element vector containing the Freestream velocity magnitude\nintegration_options::IntegrationOptions : the integration options used in integrating the panel induced velocities\n\nReturns\n\nlinsys::NamedTuple : A named tuple containing cacheable data for the linear system, including:\nA_bb::Array{Float} : AIC (LHS) matrix for the panel method system\nb_bf::Array{Float} : Initial system RHS vector based on freestrem magnitude\nA_br::Array{Float} : Unit normal velocity from rotors onto body panels\nA_pr::Array{Float} : Unit normal velocity from rotors onto body internal psuedo control points\nA_bw::Array{Float} : Unit normal velocity from wake onto body panels\nA_pw::Array{Float} : Unit normal velocity from wake onto body internal psuedo control points\nA_bb_LU::LinearAlgebra.LU : LinearAlgebra LU factorization of the LHS matrix\nlu_decomp_flag::Vector{Bool} : flag for whether factorization was successful\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.initialize_linear_system!","page":"Preprocess","title":"DuctAPE.initialize_linear_system!","text":"initialize_linear_system!(\n linsys,\n ivb,\n body_vortex_panels,\n rotor_source_panels,\n wake_vortex_panels,\n Vinf,\n intermediate_containers,\n integration_options,\n)\n\nIn-place version of initialize_linear_system.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#Unit-Induced-Velocities","page":"Preprocess","title":"Unit Induced Velocities","text":"","category":"section"},{"location":"DuctAPE/api/private_preprocess/","page":"Preprocess","title":"Preprocess","text":"DuctAPE.calculate_xrm\nDuctAPE.calculate_xrm!\nDuctAPE.get_elliptics\nDuctAPE.vortex_ring_vz\nDuctAPE.vortex_ring_vz!\nDuctAPE.smoke_ring_vz\nDuctAPE.vortex_ring_vr\nDuctAPE.vortex_ring_vr!\nDuctAPE.source_ring_vz\nDuctAPE.source_ring_vz!\nDuctAPE.source_ring_vr\nDuctAPE.source_ring_vr!","category":"page"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.calculate_xrm","page":"Preprocess","title":"DuctAPE.calculate_xrm","text":"calculate_xrm(controlpoint, node)\n\nCalculate xi, rho, and m for vortex and/or source ring induced velocity calculation.\n\nReturns zeros if ring is on (or approximately on) the axis of rotation (zero radius).\n\nArguments\n\ncontrolpoint::Vector{Float} [z r] coordinates of point being influenced\nnode::Vector{Float} : [z r] coordinates of singularity ring\n\nReturns\n\nxi::Float : normalized relative axial position\nrho::Float : normalized relative radial position\nm::Float : Elliptic integral input\nrj::Float : radial position of the ring\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.calculate_xrm!","page":"Preprocess","title":"DuctAPE.calculate_xrm!","text":"calculate_xrm!(cache_vec, controlpoint, node)\n\nIn-place version of calculate_xrm.\n\nCache_vec is a vector used to hold intermediate values as well as the outputs.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.get_elliptics","page":"Preprocess","title":"DuctAPE.get_elliptics","text":"get_elliptics(m)\n\nCalculate value of elliptic functions for the given geometry parameter.\n\nArguments\n\nm::Float : Elliptic Function parameter\n\nReturns\n\nK::Float : K(m), value of elliptic function of the first kind at m.\nE::Float : E(m), value of eeliptic function of the second kind at m.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.vortex_ring_vz","page":"Preprocess","title":"DuctAPE.vortex_ring_vz","text":"vortex_ring_vz(xi, rho, m, r_influence, influence_length)\n\nAxial velocity induced by axisymmetric vortex ring.\n\nUses equivalent smoke ring induced velocity for self-induction, and returns zero if vortex ring is on axis of rotation (zero radius).\n\nArguments\n\nxi::Float : normalized z-coordinate, (z-zo)/ro\nrho::Float : normalized r-coordinate, r/ro\nm::Float : Elliptic Integral parameter, 4rho/sqrt(xi^2+(rho+1)^2)\nr_influence::Float : radial location of vortex ring, ro\ninfluence_length::Float : length of panel used in calculating self-induction\n\nReturns\n\nvz::Float : axially induced velocity of vortex ring\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.vortex_ring_vz!","page":"Preprocess","title":"DuctAPE.vortex_ring_vz!","text":"vortex_ring_vz!(xi, rho, m, r_influence, influence_length, cache_vec)\n\nSame as vortexringvz, but uses the cache_vec to store intermediate calculations.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.smoke_ring_vz","page":"Preprocess","title":"DuctAPE.smoke_ring_vz","text":"smoke_ring_vz(r_influence, influence_length)\n\nEquivalent \"smoke\" ring self-induced velocity.\n\nArguments\n\nr_influence::Float : radial position of ring (i.e. the ring raidus)\ninfluence_length::Float : length of influencing panel\n\nReturs\n\nvz::Float : axially induced velocity of vortex ring\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.vortex_ring_vr","page":"Preprocess","title":"DuctAPE.vortex_ring_vr","text":"vortex_ring_vr(xi, rho, m, r_influence)\n\nRadial velocity induced by axisymmetric vortex ring.\n\nReturns zero if vortex ring is on axis of rotation (zero radius), the point of influence is on the axis, or if self-inducing velocity.\n\nArguments\n\nxi::Float : normalized z-coordinate, (z-zo)/ro\nrho::Float : normalized r-coordinate, r/ro\nm::Float : Elliptic Integral parameter, 4rho/sqrt(xi^2+(rho+1)^2)\nr_influence::Float : radial location of vortex ring, ro\n\nReturns\n\nvr::Float : radially induced velocity of vortex ring\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.vortex_ring_vr!","page":"Preprocess","title":"DuctAPE.vortex_ring_vr!","text":"vortex_ring_vr!(xi, rho, m, r_influence, cache_vec)\n\nSame as vortexringvr, but uses the cache_vec to store intermediate calculations.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.source_ring_vz","page":"Preprocess","title":"DuctAPE.source_ring_vz","text":"source_ring_vz(xi, rho, m, r_influence)\n\nAxial velocity induced by axisymmetric source ring.\n\nReturns zero if source ring is on axis of rotation (zero radius), the point of influence is on the axis, or if self-inducing velocity.\n\nArguments:\n\nxi::Float : normalized z-coordinate, (z-zo)/ro\nrho::Float : normalized r-coordinate, r/ro\nm::Float : Elliptic Integral parameter, 4rho/sqrt(xi^2+(rho+1)^2)\nr_influence::Float : radial location of vortex ring, ro\n\nReturns:\n\nvz::Float : axially induced velocity of source ring\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.source_ring_vz!","page":"Preprocess","title":"DuctAPE.source_ring_vz!","text":"source_ring_vz!(xi, rho, m, r_influence, cache_vec)\n\nSame as sourceringvz, but uses cache_vec to store intermediate values.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.source_ring_vr","page":"Preprocess","title":"DuctAPE.source_ring_vr","text":"source_ring_vr(xi, rho, m, r_influence)\n\nRadial velocity induced by axisymmetric source ring.\n\nReturns zero if source ring is on axis of rotation (zero radius), the point of influence is on the axis, or if self-inducing velocity.\n\nArguments:\n\nxi::Float : normalized z-coordinate, (z-zo)/ro\nrho::Float : normalized r-coordinate, r/ro\nm::Float : Elliptic Integral parameter, 4rho/sqrt(xi^2+(rho+1)^2)\nr_influence::Float : radial location of vortex ring, ro\n\nReturns:\n\nvr::Float : radially induced velocity of source ring\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.source_ring_vr!","page":"Preprocess","title":"DuctAPE.source_ring_vr!","text":"source_ring_vr!(xi, rho, m, r_influence, cache_vec)\n\nSame as sourceringvr, but uses cache_vec to store intermediate values.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#Unit-Induced-Velocity-Matrices","page":"Preprocess","title":"Unit Induced Velocity Matrices","text":"","category":"section"},{"location":"DuctAPE/api/private_preprocess/","page":"Preprocess","title":"Preprocess","text":"DuctAPE.induced_velocities_from_vortex_panels_on_points\nDuctAPE.induced_velocities_from_vortex_panels_on_points!\nDuctAPE.induced_velocities_from_source_panels_on_points\nDuctAPE.induced_velocities_from_source_panels_on_points!\nDuctAPE.induced_velocities_from_trailing_edge_gap_panel!","category":"page"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.induced_velocities_from_vortex_panels_on_points","page":"Preprocess","title":"DuctAPE.induced_velocities_from_vortex_panels_on_points","text":"induced_velocities_from_vortex_panels_on_points(\n controlpoints,\n nodes,\n nodemap,\n influence_lengths,\n integration_options;\n integration_caches=nothing,\n)\n\nCalculate axial and radial components of induced velocity for a set of control points due to a set of axisymmetric vortex panels (bands).\n\nUsed 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.\n\nArguments\n\ncontrolpoints::Matrix{Float} [z r] coordinates of points being influenced\nnodes::Matrix{Float} : [z r] coordinates of vortex rings\nnodemap::Matrix{Int} : mapping from panel index to associated node indices\ninfluence_lengths::Vector{Float} : lengths over which vortex ring influence is applied on the surface.\nintegration_options::IntegrationOptions : integration options\n\nKeyword Arguments\n\nintegration_caches::NamedTuple=nothing : cache used in in-place quadrature functions.\n\nReturns\n\nVEL::Array{Float} : N-controlpoint x N-node x [vz, vr] array of induced velocity components\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.induced_velocities_from_vortex_panels_on_points!","page":"Preprocess","title":"DuctAPE.induced_velocities_from_vortex_panels_on_points!","text":"induced_velocities_from_vortex_panels_on_points!(\n VEL,\n controlpoint,\n node,\n nodemap,\n influence_length,\n integration_options;\n integration_caches=nothing,\n)\n\nIn-place version of induced_velocities_from_vortex_panels_on_points.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.induced_velocities_from_source_panels_on_points","page":"Preprocess","title":"DuctAPE.induced_velocities_from_source_panels_on_points","text":"induced_velocities_from_source_panels_on_points(\n controlpoints,\n nodes,\n nodemap,\n influence_lengths,\n integration_options;\n integration_caches=nothing,\n)\n\nCalculate axial and radial components of induced velocity for a set of control points due to a set of axisymmetric source panels (bands)\n\nUsed 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.\n\nArguments\n\ncontrolpoints::Matrix{Float} [z r] coordinates of points being influenced\nnodes::Matrix{Float} : [z r] coordinates of vortex rings\nnodemap::Matrix{Int} : mapping from panel index to associated node indices\ninfluence_lengths::Vector{Float} : lengths over which vortex ring influence is applied on the surface.\nintegration_options::IntegrationOptions : integration options\n\nReturns:\n\nVEL::Array{Float} : N-controlpoint x N-node x [vz, vr] array of induced velocity components\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.induced_velocities_from_source_panels_on_points!","page":"Preprocess","title":"DuctAPE.induced_velocities_from_source_panels_on_points!","text":"induced_velocities_from_source_panels_on_points!(\n VEL,\n controlpoint,\n node,\n nodemap,\n influence_length,\n integration_options;\n integration_caches=nothing,\n)\n\nIn-place version of induced_velocities_from_source_panels_on_points.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.induced_velocities_from_trailing_edge_gap_panel!","page":"Preprocess","title":"DuctAPE.induced_velocities_from_trailing_edge_gap_panel!","text":"induced_velocities_from_trailing_edge_gap_panel!(\n VEL,\n controlpoint,\n tenode,\n teinfluence_length,\n tendotn,\n tencrossn,\n teadjnodeidxs,\n integration_options;\n wake=false,\n integration_caches=nothing,\n)\n\nCalculate axial and radial components of induced velocity for a set of control points due to any trailing edge gap panels.\n\nUsed for getting the unit induced velocities due to the body body trailing edge gap panels on the body/rotor/wake.\n\nNote, this function is also used to calculate the influence of the wake ends rather than modeling a semi-infinite fortex sheet.\n\nArguments\n\nVEL::Array{Float} : N-controlpoint x N-node x [vz, vr] array of induced velocity components (modified in place)\ncontrolpoints::Matrix{Float} [z r] coordinates of points being influenced\nnodes::Matrix{Float} : [z r] coordinates of vortex rings\nnodemap::Matrix{Int} : mapping from panel index to associated node indices\ninfluence_lengths::Vector{Float} : lengths over which vortex ring influence is applied on the surface.\nstrengths::Matrix{Float} : vortex constant circulation values\nintegration_options::IntegrationOptions : integration options\n\nKeyword Arguments\n\nwake::Bool=false : flag to indicate if this is being used for a wake sheet.\nintegration_caches::NamedTuple=nothing : cache used in in-place quadrature functions.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#Panel-Method-Velocity-Functions","page":"Preprocess","title":"Panel Method Velocity Functions","text":"","category":"section"},{"location":"DuctAPE/api/private_preprocess/","page":"Preprocess","title":"Preprocess","text":"DuctAPE.vortex_aic_boundary_on_boundary\nDuctAPE.vortex_aic_boundary_on_boundary!\nDuctAPE.vortex_aic_boundary_on_field\nDuctAPE.vortex_aic_boundary_on_field!\nDuctAPE.add_kutta!\nDuctAPE.add_te_gap_aic!\nDuctAPE.source_aic\nDuctAPE.source_aic!\nDuctAPE.freestream_influence_vector\nDuctAPE.freestream_influence_vector!\nDuctAPE.assemble_lhs_matrix\nDuctAPE.assemble_lhs_matrix!\nDuctAPE.factorize_LHS\nDuctAPE.factorize_LHS!\nDuctAPE.assemble_rhs_matrix\nDuctAPE.assemble_rhs_matrix!\nDuctAPE.calculate_normal_velocity\nDuctAPE.calculate_normal_velocity!","category":"page"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.vortex_aic_boundary_on_boundary","page":"Preprocess","title":"DuctAPE.vortex_aic_boundary_on_boundary","text":"vortex_aic_boundary_on_boundary(\n controlpoint, normal, node, nodemap, influence_length, integration_options\n)\n\nCalculate 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)\n\nCan be used for constructing the LHS influence Matrix for the panel method system.\n\nArguments\n\ncontrolpoint::Matrix{Float} [z r] coordinates of points being influenced\nnormal::Matrix{Float} : unit normal vectors of the panels on which the control points are situated.\nnode::Matrix{Float} : [z r] coordinates of panel nodes (edges)\nnodemap::Matrix{Int} : [1 2] node indices for each panel\ninfluence_length::Vector{Float} : lengths of influencing panels\nintegration_options::IntegrationOptions : integration options\n\nReturns\n\nAICn::Matrix{Float} : N controlpoint x N+1 node array of V dot nhat values\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.vortex_aic_boundary_on_boundary!","page":"Preprocess","title":"DuctAPE.vortex_aic_boundary_on_boundary!","text":"vortex_aic_boundary_on_boundary!(\n AICn,\n controlpoint,\n normal,\n node,\n nodemap,\n influence_length,\n integration_options;\n integration_caches=nothing,\n)\n\nIn-place verion of vortex_aic_boundary_on_boundary.\n\nintegration_caches is a named tuple containing caching for intermediate calculation values.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.vortex_aic_boundary_on_field","page":"Preprocess","title":"DuctAPE.vortex_aic_boundary_on_field","text":"vortex_aic_boundary_on_field(\n controlpoint,\n normal,\n node,\n nodemap,\n influence_length,\n integration_options;\n integration_caches=nothing,\n)\n\nCalculate 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)\n\nUsed for constructing portions of the panel method LHS matrix related to the pseudo control points in the bodies.\n\nArguments:\n\ncontrolpoint::Matrix{Float} [z r] coordinates of points being influenced\nnormal::Matrix{Float} : unit normal vectors of the panels on which the control points are situated.\nnode::Matrix{Float} : [z r] coordinates of panel nodes (edges)\nnodemap::Matrix{Int} : [1 2] node indices for each panel\ninfluence_length::Vector{Float} : lengths of influencing panels\nintegration_options::IntegrationOptions : integration options\n\nKeyword Arguments\n\nintegration_caches::NamedTuple=nothing : caches for intermediate values in integration.\n\nReturns:\n\nAICn::Matrix{Float} : N controlpoint x N+1 node array of V dot nhat values\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.vortex_aic_boundary_on_field!","page":"Preprocess","title":"DuctAPE.vortex_aic_boundary_on_field!","text":"vortex_aic_boundary_on_field!(\n AICn,\n controlpoint,\n normal,\n node,\n nodemap,\n influence_length,\n integration_options;\n integration_caches=nothing,\n)\n\nIn-place version of vortex_aic_boundary_on_field.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.add_kutta!","page":"Preprocess","title":"DuctAPE.add_kutta!","text":"add_kutta!(LHS, AICn, kids)\n\nAdd Kutta condition (γ1 + γN = 0) to LHS matrix.\n\nLHS::Matrix{Float} : a pre-allocated (zeros) full size left-hand side matrix\nAICn::Matrix{Float} : influence coefficients for panels/nodes\nkids::Vector{Int} : [1 2] indices of where to put 1's for kutta condition\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.add_te_gap_aic!","page":"Preprocess","title":"DuctAPE.add_te_gap_aic!","text":"add_te_gap_aic!(\n AICn,\n controlpoint,\n normal,\n tenode,\n teinfluence_length,\n tendotn,\n tencrossn,\n teadjnodeidxs,\n integration_options;\n wake=false,\n integration_caches=nothing,\n)\n\nAdd trailing edge gap aerodynmic influence coefficient contributions to the AIC matrix.\n\nArguments\n\nAICn::Matrix{Float} : N controlpoint x N+1 node array of V dot nhat values\ncontrolpoint::Matrix{Float} [z r] coordinates of points being influenced\nnormal::Matrix{Float} : unit normal vectors of the panels on which the control points are situated.\ntenode::Matrix{Float} : [z r] coordinates of trailing edge panel nodes (edges)\nteinfluence_length::Vector{Float} : lengths of influencing trailing edge panels\ntendotn::Matrix{Float} : nhat of trailing edge panel dotted with nhat of adjacent panels\ntencrossn::Matrix{Float} : nhat of trailing edge panel crossed with nhat of adjacent panels\nteadjnodeidxs::Matrix{Float} : indices of nodes adjacent to trailing edge panel\nintegration_options::IntegrationOptions : integration options\n\nKeyword Arguments\n\nwake::Bool=false : flag as to whether this function is being applied to a wake sheet.\nintegration_caches::NamedTuple=nothing : caches for intermediate values in integration.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.source_aic","page":"Preprocess","title":"DuctAPE.source_aic","text":"source_aic(\n controlpoint,\n normal,\n node,\n nodemap,\n influence_length,\n integration_options;\n integration_caches=nothing,\n)\n\nCalculate 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.\n\nCan be used for constructing the RHS boundary conditions due to rotor source panels.\n\nArguments\n\ncontrolpoint::Matrix{Float} [z r] coordinates of points being influenced\nnormal::Matrix{Float} : unit normal vectors of the panels on which the control points are situated.\nnode::Matrix{Float} : [z r] coordinates of panel nodes (edges)\nnodemap::Matrix{Int} : [1 2] node indices for each panel\ninfluence_length::Vector{Float} : lengths of influencing panels\nintegration_options::IntegrationOptions : integration options\n\nKeyword Arguments\n\nintegration_caches::NamedTuple=nothing : caches for intermediate values in integration.\n\nReturns\n\nAICn::Matrix{Float} : N controlpoint x N+1 node array of V dot nhat values\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.source_aic!","page":"Preprocess","title":"DuctAPE.source_aic!","text":"source_aic!(\n AICn,\n controlpoint,\n normal,\n node,\n nodemap,\n influence_length,\n integration_options;\n integration_caches=nothing,\n)\n\nIn-place version of source_aic.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.freestream_influence_vector","page":"Preprocess","title":"DuctAPE.freestream_influence_vector","text":"freestream_influence_vector(normals, Vinfmat)\n\nCalculate RHS contributions due to freestream.\n\nNote 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.\n\nArguments\n\nnormals::Matrix{Float} : unit normal vectors of the panels on which the control points are situated.\nVinfmat::Matrix{Float} : [z r] components of freestream velocity (r's should be zero)\n\nReturns\n\nRHS::Vector{Float} : vector of normal components of freestream velocity on input panels\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.freestream_influence_vector!","page":"Preprocess","title":"DuctAPE.freestream_influence_vector!","text":"freestream_influence_vector!(RHS, normals, Vinfmat)\n\nIn-place version of freestream_influence_vector.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.assemble_lhs_matrix","page":"Preprocess","title":"DuctAPE.assemble_lhs_matrix","text":"assemble_lhs_matrix(\n AICn, AICpcp, npanel, nnode, totpanel, totnode, prescribednodeidxs; dummyval=1.0\n)\n\nAssemble the LHS matrix of the panel method.\n\nArguments\n\nAICn::Matrix{Float} : N controlpoint x N+1 node array of V dot nhat values\nAICpcp::Matrix{Float} : Nbodies controlpoint x N+1 node array of V dot nhat values (influence on psuedo control points)\nnpanel::Vector{Int} : number of panels comprising each body\nnnode::Vector{Int} : number of nodes comprising each body\ntotpanel::Int : total number of panels\ntotnode::Int : total number of nodes\nprescribednodeidxs::Vector{Int} : indices of nodes with prescribed strengths (those on the axis of rotation).\n\nKeyword Arguments\n\ndummyval::Float=1.0 : value for dummy input for prescribed and internal control points in the system. Do not change except for debugging purposes.\n\nReturns\n\nLHS::Matrix{Float} : The full LHS matrix for the panel method.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.assemble_lhs_matrix!","page":"Preprocess","title":"DuctAPE.assemble_lhs_matrix!","text":"assemble_lhs_matrix!(\n LHS, AICn, AICpcp, npanel, nnode, totpanel, totnode, prescribednodeidxs; dummyval=1.0\n)\n\nIn-place version of assemble_lhs_matrix.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.factorize_LHS","page":"Preprocess","title":"DuctAPE.factorize_LHS","text":"factorize_LHS(A::AbstractMatrix)\n\nReturns the LU decomposition of A.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.factorize_LHS!","page":"Preprocess","title":"DuctAPE.factorize_LHS!","text":"factorize_LHS!(Apivot::AbstractMatrix, A::AbstractMatrix)\n\nReturns the LU decomposition of A using Apivot as storage memory to pivot leaving A unchanged.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.assemble_rhs_matrix","page":"Preprocess","title":"DuctAPE.assemble_rhs_matrix","text":"assemble_rhs_matrix(\n vdnb, vdnpcp, npanel, nnode, totpanel, totnode, prescribednodeidxs\n)\n\nArguments\n\nvdnb::Vector{Float} : V dot nhat for body panels\nvdnpcp::Vector{Float} : V dot nhat for pseudo control points\nnpanel::Vector{Int} : number of panels comprising each body\nnnode::Vector{Int} : number of nodes comprising each body\ntotpanel::Int : total number of body panels\ntotnode::Int : total number of body nodes\nprescribednodeidxs::Vector{Int} : indices of nodes with prescribed strengths (those on the axis of rotation)\n\nReturns\n\nRHS::Vector{Float} : the RHS vector of the panel method.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.assemble_rhs_matrix!","page":"Preprocess","title":"DuctAPE.assemble_rhs_matrix!","text":"assemble_rhs_matrix!(\n RHS, vdnb, vdnpcp, npanel, nnode, totpanel, totnode, prescribednodeidxs\n)\n\nIn-place version of assemble_rhs_matrix.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.calculate_normal_velocity","page":"Preprocess","title":"DuctAPE.calculate_normal_velocity","text":"calculate_normal_velocity(velocity_vector, normal)\n\nCalculate normal velocity_vector (V dot nhat).\n\nArguments\n\nvelocity_vector::Matrix{Float} : velocity vector [z r] on each panel\nnormal::Matrix{Float} : the panel unit normals\n\nReturns\n\nAIC::Matrix{Float} : V dot n on each panel\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.calculate_normal_velocity!","page":"Preprocess","title":"DuctAPE.calculate_normal_velocity!","text":"calculate_normal_velocity!(AIC, velocity_vector, normal)\n\nIn-place version of calculate_normal_velocity.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#Quadrature","page":"Preprocess","title":"Quadrature","text":"","category":"section"},{"location":"DuctAPE/api/private_preprocess/#Integrands","page":"Preprocess","title":"Integrands","text":"","category":"section"},{"location":"DuctAPE/api/private_preprocess/","page":"Preprocess","title":"Preprocess","text":"DuctAPE.nominal_vortex_induced_velocity_sample\nDuctAPE.nominal_vortex_induced_velocity_sample!\nDuctAPE.subtracted_singular_vortex_influence\nDuctAPE.subtracted_singular_vortex_influence!\nDuctAPE.analytically_integrated_vortex_influence\nDuctAPE.analytically_integrated_vortex_influence!\nDuctAPE.self_vortex_induced_velocity_sample\nDuctAPE.self_vortex_induced_velocity_sample!\nDuctAPE.nominal_source_induced_velocity_sample\nDuctAPE.nominal_source_induced_velocity_sample!\nDuctAPE.subtracted_singular_source_influence\nDuctAPE.subtracted_singular_source_influence!\nDuctAPE.analytically_integrated_source_influence\nDuctAPE.analytically_integrated_source_influence!\nDuctAPE.self_source_induced_velocity_sample\nDuctAPE.self_source_induced_velocity_sample!","category":"page"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.nominal_vortex_induced_velocity_sample","page":"Preprocess","title":"DuctAPE.nominal_vortex_induced_velocity_sample","text":"nominal_vortex_induced_velocity_sample(\n t, node1, node2, influence_length, controlpoint, cache_vec; nondimrange=(0.0, 1.0)\n)\n\nCalculate the velocity induced by a linear vortex panel on a point.\n\nArguments\n\nt::Float : sample point in range (0,1) selected by quadrature method.\nnode1::Vector{Float} : first panel node (edge) position.\nnode2::Vector{Float} : second panel node (edge) position.\ninfluence_length::Float : dimensional length of panel.\ncontrolpoint::Vector{Float} : controlpoint position\ncache_vec::Vector{Float} : cache for intermediate calculations\n\nKeyword Arguments\n\nnondimrange::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.\n\nReturns\n\nV::Matrix{Float} : 2x2 matrix of axial and radial induced velocities from each of the nodes.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.nominal_vortex_induced_velocity_sample!","page":"Preprocess","title":"DuctAPE.nominal_vortex_induced_velocity_sample!","text":"nominal_vortex_induced_velocity_sample!(\n V, t, node1, node2, influence_length, controlpoint, cache_vec; nondimrange=(0.0, 1.0)\n)\n\nIn-place version of nominal_vortex_induced_velocity_sample.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.subtracted_singular_vortex_influence","page":"Preprocess","title":"DuctAPE.subtracted_singular_vortex_influence","text":"subtracted_singular_vortex_influence(node, controlpoint)\n\nCalculate the singular portions of the self-induced vortex panel influence to subtract off the integral in the separation of singularity method.\n\nArguments\n\nnode::Vector{Float} : node position\ncontrolpoint::Vector{Float} : controlpoint position\n\nReturns\n\naxial::Float : axial direction influence\nradial::Float : radial direction influence\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.subtracted_singular_vortex_influence!","page":"Preprocess","title":"DuctAPE.subtracted_singular_vortex_influence!","text":"subtracted_singular_vortex_influence!(node, controlpoint, cache_vec)\n\nSomewhat in-place version of subtracted_singular_vortex_influence.\n\nArguments\n\nnode::Vector{Float} : node position\ncontrolpoint::Vector{Float} : controlpoint position\ncache_vec::Vector{Float} : used to store intermediate values.\n\nReturns\n\naxial::Float : axial direction influence\nradial::Float : radial direction influence\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.analytically_integrated_vortex_influence","page":"Preprocess","title":"DuctAPE.analytically_integrated_vortex_influence","text":"analytically_integrated_vortex_influence(r, influence_length)\n\nAnalytical 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.\n\nArguments\n\nr::Float : radial position of self-induced control point\ninfluence_length::Float : dimensional length of the panel\n\nReturns\n\nV::Vector{Float} : axial and radial induced velocities\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.analytically_integrated_vortex_influence!","page":"Preprocess","title":"DuctAPE.analytically_integrated_vortex_influence!","text":"analytically_integrated_vortex_influence!(V, r, influence_length)\n\nIn-place version of analytically_integrated_vortex_influence.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.self_vortex_induced_velocity_sample","page":"Preprocess","title":"DuctAPE.self_vortex_induced_velocity_sample","text":"self_vortex_induced_velocity_sample(\n t, node1, node2, influence_length, controlpoint, cache_vec; nondimrange=(0.0, 1.0)\n)\n\nCalculate the velocity induced by a linear vortex panel on a point at the midpoint between the panel edges.\n\nArguments\n\nt::Float : sample point in range (0,1) selected by quadrature method.\nnode1::Vector{Float} : first panel node (edge) position.\nnode2::Vector{Float} : second panel node (edge) position.\ninfluence_length::Float : dimensional length of panel.\ncontrolpoint::Vector{Float} : controlpoint position\ncache_vec::Vector{Float} : cache for intermediate calculations\n\nKeyword Arguments\n\nnondimrange::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.\n\nReturns\n\nV::Matrix{Float} : 2x2 matrix of axial and radial induced velocities from each of the nodes.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.self_vortex_induced_velocity_sample!","page":"Preprocess","title":"DuctAPE.self_vortex_induced_velocity_sample!","text":"self_vortex_induced_velocity_sample!(\n V, t, node1, node2, influence_length, controlpoint, cache_vec; nondimrange=(0.0, 1.0)\n)\n\nIn-place version of self_vortex_induced_velocity_sample.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.nominal_source_induced_velocity_sample","page":"Preprocess","title":"DuctAPE.nominal_source_induced_velocity_sample","text":"nominal_source_induced_velocity_sample(\n t, node1, node2, influence_length, controlpoint, cache_vec; nondimrange=(0.0, 1.0)\n)\n\nCalculate the velocity induced by a source panel on a point.\n\nArguments\n\nt::Float : sample point in range (0,1) selected by quadrature method.\nnode1::Vector{Float} : first panel node (edge) position.\nnode2::Vector{Float} : second panel node (edge) position.\ninfluence_length::Float : dimensional length of panel.\ncontrolpoint::Vector{Float} : controlpoint position\ncache_vec::Vector{Float} : cache for intermediate calculations\n\nKeyword Arguments\n\nnondimrange::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.\n\nReturns\n\nV::Matrix{Float} : 2x2 matrix of axial and radial induced velocities from each of the nodes.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.nominal_source_induced_velocity_sample!","page":"Preprocess","title":"DuctAPE.nominal_source_induced_velocity_sample!","text":"nominal_source_induced_velocity_sample!(\n V, t, node1, node2, influence_length, controlpoint, cache_vec; nondimrange=(0.0,1.0)\n)\n\nIn-place version of nominal_source_induced_velocity_sample.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.subtracted_singular_source_influence","page":"Preprocess","title":"DuctAPE.subtracted_singular_source_influence","text":"subtracted_singular_source_influence(node, controlpoint)\n\nCalculate the singular portions of the self-induced source panel influence to subtract off the integral in the separation of singularity method.\n\nArguments\n\nnode::Vector{Float} : node position\ncontrolpoint::Vector{Float} : controlpoint position\n\nReturns\n\naxial::Float : axial direction influence\nradial::Float : radial direction influence\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.subtracted_singular_source_influence!","page":"Preprocess","title":"DuctAPE.subtracted_singular_source_influence!","text":"subtracted_singular_source_influence!(node, controlpoint, cache_vec)\n\nIn-place version of subtracted_singular_source_influence.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.analytically_integrated_source_influence","page":"Preprocess","title":"DuctAPE.analytically_integrated_source_influence","text":"analytically_integrated_source_influence(r, influence_length)\n\nIn-place version of analytically_integrated_source_influence.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.analytically_integrated_source_influence!","page":"Preprocess","title":"DuctAPE.analytically_integrated_source_influence!","text":"analytically_integrated_source_influence(r, influence_length)\n\nAnalytical 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.\n\nArguments\n\nr::Float : radial position of self-induced control point\ninfluence_length::Float : dimensional length of the panel\n\nReturns\n\nV::Vector{Float} : axial and radial induced velocities\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.self_source_induced_velocity_sample","page":"Preprocess","title":"DuctAPE.self_source_induced_velocity_sample","text":"self_source_induced_velocity_sample(\n t, node1, node2, influence_length, controlpoint, cache_vec; nondimrange=(0.0, 1.0)\n)\n\nCalculate the velocity induced by a linear source panel on a point at the midpoint between the panel edges.\n\nArguments\n\nt::Float : sample point in range (0,1) selected by quadrature method.\nnode1::Vector{Float} : first panel node (edge) position.\nnode2::Vector{Float} : second panel node (edge) position.\ninfluence_length::Float : dimensional length of panel.\ncontrolpoint::Vector{Float} : controlpoint position\ncache_vec::Vector{Float} : cache for intermediate calculations\n\nKeyword Arguments\n\nnondimrange::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.\n\nReturns\n\nV::Matrix{Float} : 2x2 matrix of axial and radial induced velocities from each of the nodes.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.self_source_induced_velocity_sample!","page":"Preprocess","title":"DuctAPE.self_source_induced_velocity_sample!","text":"self_source_induced_velocity_sample!(\n V, t, node1, node2, influence_length, controlpoint, cache_vec; nondimrange=(0.0, 1.0)\n)\n\nIn-place version of self_source_induced_velocity_sample.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#Integrals","page":"Preprocess","title":"Integrals","text":"","category":"section"},{"location":"DuctAPE/api/private_preprocess/","page":"Preprocess","title":"Preprocess","text":"DuctAPE.nominal_vortex_panel_integration\nDuctAPE.nominal_vortex_panel_integration!\nDuctAPE.self_vortex_panel_integration\nDuctAPE.self_vortex_panel_integration!\nDuctAPE.nominal_source_panel_integration\nDuctAPE.nominal_source_panel_integration!\nDuctAPE.self_source_panel_integration\nDuctAPE.self_source_panel_integration!\nDuctAPE.extrapolate!","category":"page"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.nominal_vortex_panel_integration","page":"Preprocess","title":"DuctAPE.nominal_vortex_panel_integration","text":"nominal_vortex_panel_integration(\n integration_options,\n node1,\n node2,\n influence_length,\n controlpoint,\n containers;\n debug=false,\n)\n\nIntegration of vortex panel induced velocity on a point far away.\n\nArguments\n\nintegration_options::IntegrationMethod : options for itegration methods\nnode1::Vector{Float} : first panel node (edge) position.\nnode2::Vector{Float} : second panel node (edge) position.\ninfluence_length::Float : dimensional length of panel.\ncontrolpoint::Vector{Float} : controlpoint position\ncontainers::NamedTuple : cache for intermediate calculations\n\nKeyword Arguments\n\ndebug::Bool=false : if true, some methods will return the estimation error.\n\nReturns\n\nV::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}]\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.nominal_vortex_panel_integration!","page":"Preprocess","title":"DuctAPE.nominal_vortex_panel_integration!","text":"nominal_vortex_panel_integration!(\n integration_options,\n V,\n node1,\n node2,\n influence_length,\n controlpoint,\n containers;\n debug=false,\n)\n\nIn-place version of nominal_vortex_panel_integration.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.self_vortex_panel_integration","page":"Preprocess","title":"DuctAPE.self_vortex_panel_integration","text":"self_vortex_panel_integration(\n integration_options,\n node1,\n node2,\n influence_length,\n controlpoint,\n containers;\n debug=false,\n)\n\nIntegration of linear vortex panel self-induced velocity.\n\nArguments\n\nintegration_options::IntegrationMethod : options for itegration methods\nnode1::Vector{Float} : first panel node (edge) position.\nnode2::Vector{Float} : second panel node (edge) position.\ninfluence_length::Float : dimensional length of panel.\ncontrolpoint::Vector{Float} : controlpoint position\ncontainers::NamedTuple : cache for intermediate calculations\n\nKeyword Arguments\n\ndebug::Bool=false : if true, some methods will return the estimation error.\n\nReturns\n\nV::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}]\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.self_vortex_panel_integration!","page":"Preprocess","title":"DuctAPE.self_vortex_panel_integration!","text":"self_vortex_panel_integration!(\n integration_options,\n V,\n node1,\n node2,\n influence_length,\n controlpoint,\n containers;\n debug=false,\n)\n\nIn-place version of self_vortex_panel_integration.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.nominal_source_panel_integration","page":"Preprocess","title":"DuctAPE.nominal_source_panel_integration","text":"nominal_source_panel_integration(\n integration_options,\n node1,\n node2,\n influence_length,\n controlpoint,\n containers;\n debug=false,\n)\n\nIntegration of source panel induced velocity on a point far away.\n\nArguments\n\nintegration_options::IntegrationMethod : options for itegration methods\nnode1::Vector{Float} : first panel node (edge) position.\nnode2::Vector{Float} : second panel node (edge) position.\ninfluence_length::Float : dimensional length of panel.\ncontrolpoint::Vector{Float} : controlpoint position\ncontainers::NamedTuple : cache for intermediate calculations\n\nKeyword Arguments\n\ndebug::Bool=false : if true, some methods will return the estimation error.\n\nReturns\n\nV::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}]\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.nominal_source_panel_integration!","page":"Preprocess","title":"DuctAPE.nominal_source_panel_integration!","text":"nominal_source_panel_integration!(\n integration_options,\n V,\n node1,\n node2,\n influence_length,\n controlpoint,\n containers;\n debug=false,\n)\n\nIn-place version of nominal_source_panel_integration.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.self_source_panel_integration","page":"Preprocess","title":"DuctAPE.self_source_panel_integration","text":"self_source_panel_integration(\n integration_options,\n node1,\n node2,\n influence_length,\n controlpoint,\n containers;\n debug=false,\n)\n\nIntegration of linear source panel self-induced velocity.\n\nArguments\n\nintegration_options::IntegrationMethod : options for itegration methods\nnode1::Vector{Float} : first panel node (edge) position.\nnode2::Vector{Float} : second panel node (edge) position.\ninfluence_length::Float : dimensional length of panel.\ncontrolpoint::Vector{Float} : controlpoint position\ncontainers::NamedTuple : cache for intermediate calculations\n\nKeyword Arguments\n\ndebug::Bool=false : if true, some methods will return the estimation error.\n\nReturns\n\nV::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}]\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.self_source_panel_integration!","page":"Preprocess","title":"DuctAPE.self_source_panel_integration!","text":"self_source_panel_integration!(\n integration_options,\n V,\n node1,\n node2,\n influence_length,\n controlpoint,\n containers;\n debug=false,\n)\n\nIn-place version of self_source_panel_integration.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.extrapolate!","page":"Preprocess","title":"DuctAPE.extrapolate!","text":"extrapolate!(V, err, fh; power=2, atol=1e-6)\n\nPerforms Richardson extrapolation on an array fh for use in Romberg integration.\n\nArguments\n\nV::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}]\nerr::Vector{Float} : estimated errors in velocity approximation\nfh::Tuple : (f(h), h) tuples (in order of decreasing |h|)\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#State-Initialization","page":"Preprocess","title":"State Initialization","text":"","category":"section"},{"location":"DuctAPE/api/private_preprocess/","page":"Preprocess","title":"Preprocess","text":"DuctAPE.initialize_velocities\nDuctAPE.initialize_velocities!\nDuctAPE.initialize_strengths!","category":"page"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.initialize_velocities","page":"Preprocess","title":"DuctAPE.initialize_velocities","text":"initialize_velocities(\n solver_options::SolverOptionsType,\n operating_point,\n blade_elements,\n linsys,\n ivr,\n ivw,\n body_totnodes,\n wake_panel_sheet_be_map,\n)\n\nInitialize velocity state variables.\n\nArguments\n\nsolver_options::SolverOptionsType : solver options type for dispatch\noperating_point::OperatingPoint : an OperatingPoint object\nblade_elements::NamedTuple : A named tuple containing the blade element geometry and airfoil information.\nlinsys::NamedTuple : A named tuple containing the panel method linear system information.\nivr::NamedTuple : A named tuple containing the unit induced velocities on the rotors\nivw::NamedTuple : A named tuple containing the unit induced velocities on the wake\nbody_totnodes::Int : the total number of panel nodes comprising the duct and centerbody geometry\nwake_panel_sheet_be_map::Matrix{Int} : An index map from the wake panels to the nearest ahead rotor blade element along the wake sheets\n\nReturns\n\nvz_rotor::Vector{Float} : a vector of the velocity state variables associated with the rotor axially induced velocity\nvtheta_rotor::Vector{Float} : a vector of the velocity state variables associated with the rotor tangentially induced velocity\nCm_wake::Vector{Float} : a vector of the velocity state variables associated with the wake control point meridional velocity\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.initialize_velocities!","page":"Preprocess","title":"DuctAPE.initialize_velocities!","text":"function initializevelocities!( solveroptions::SolverOptionsType, vzrotor, vthetarotor, Cmwake, operatingpoint, bladeelements, linsys, ivr, ivw, bodytotnodes, wakepanelsheetbemap, )\n\nIn-place version of initialize_velocities.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.initialize_strengths!","page":"Preprocess","title":"DuctAPE.initialize_strengths!","text":"initialize_strengths!(\n solver_options::SolverOptionsType,\n Gamr,\n sigr,\n gamw,\n operating_point,\n blade_elements,\n linsys,\n ivr,\n ivw,\n wakeK,\n body_totnodes,\n wake_nodemap,\n wake_endnodeidxs,\n wake_panel_sheet_be_map,\n wake_node_sheet_be_map,\n wake_node_ids_along_casing_wake_interface,\n wake_node_ids_along_centerbody_wake_interface,\n)\n\nInitialize strength state variables.\n\nArguments\n\nsolver_options::SolverOptionsType : solver options type for dispatch\nGamr::Vector{Float} : Rotor circulation state variables (modified in place)\nsigr::Vector{Float} : Rotor panel strength state variables (modified in place)\ngamw::Vector{Float} : Wake panel strength state variables (modified in place)\noperating_point::OperatingPoint : an OperatingPoint object\nblade_elements::NamedTuple : A named tuple containing the blade element geometry and airfoil information.\nlinsys::NamedTuple : A named tuple containing the panel method linear system information.\nivr::NamedTuple : A named tuple containing the unit induced velocities on the rotors\nivw::NamedTuple : A named tuple containing the unit induced velocities on the wake\nwakeK::Vector{Float} : geometric constants of wake nodes used in calculating wake strengths\nbody_totnodes::Int : the total number of panel nodes comprising the duct and centerbody geometry\nwake_nodemap::Matrix{Int} : an index map of wake panel to the associated node indices\nwake_endnodeidxs::Matrix{Int} : the node indices of the start and end of the wake sheets.\nwake_panel_sheet_be_map::Matrix{Int} : An index map from the wake panels to the nearest ahead rotor blade element along the wake sheets\nwake_node_sheet_be_map::Matrix{Int} : An index map from the wake nodes to the nearest ahead rotor blade element along the wake sheets\nwake_node_ids_along_casing_wake_interface::type : An index map indicating which wake nodes interface with the duct wall\nwake_node_ids_along_centerbody_wake_interface::type : An index map indicating which wake nodes interface with the centerbody wall\n\n\n\n\n\nfunction initialize_strengths!(\n solver_options::CSORSolverOptions,\n Gamr,\n sigr,\n gamw,\n solve_containers,\n operating_point,\n blade_elements,\n wakeK,\n wake_nodemap,\n wake_endnodeidxs,\n wake_panel_sheet_be_map,\n wake_node_sheet_be_map,\n wake_node_ids_along_casing_wake_interface,\n wake_node_ids_along_centerbody_wake_interface;\n niter=10,\n rlx=0.5,\n)\n\nRefactored from DFDC SUBROUTINE ROTINITBLD\n\nFrom 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\n\nArguments\n\nsolver_options::SolverOptionsType : solver options type for dispatch\nGamr::Vector{Float} : Rotor circulation state variables (modified in place)\nsigr::Vector{Float} : Rotor panel strength state variables (modified in place)\ngamw::Vector{Float} : Wake panel strength state variables (modified in place)\noperating_point::OperatingPoint : an OperatingPoint object\nblade_elements::NamedTuple : A named tuple containing the blade element geometry and airfoil information.\nwakeK::Vector{Float} : geometric constants of wake nodes used in calculating wake strengths\nwake_nodemap::Matrix{Int} : an index map of wake panel to the associated node indices\nwake_endnodeidxs::Matrix{Int} : the node indices of the start and end of the wake sheets.\nwake_panel_sheet_be_map::Matrix{Int} : An index map from the wake panels to the nearest ahead rotor blade element along the wake sheets\nwake_node_sheet_be_map::Matrix{Int} : An index map from the wake nodes to the nearest ahead rotor blade element along the wake sheets\nwake_node_ids_along_casing_wake_interface::type : An index map indicating which wake nodes interface with the duct wall\nwake_node_ids_along_centerbody_wake_interface::type : An index map indicating which wake nodes interface with the centerbody wall\n\nKeyword Arguments\n\nrlx::Float=0.5 : factor for under-relaxation to reduce transients in CL\n\nReturns\n\n\n\n\n\n","category":"function"},{"location":"C4Blade/airfoil_types/CCBlade/#CCBlade-Airfoil-Types","page":"CCBlade Airfoil Types","title":"CCBlade Airfoil Types","text":"","category":"section"},{"location":"C4Blade/airfoil_types/CCBlade/","page":"CCBlade Airfoil Types","title":"CCBlade Airfoil Types","text":"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.","category":"page"},{"location":"C4Blade/airfoil_types/CCBlade/","page":"CCBlade Airfoil Types","title":"CCBlade Airfoil Types","text":"Modules = [DuctAPE.C4Blade]\nPages = [\"C4Blade/airfoils.jl\"]","category":"page"},{"location":"C4Blade/airfoil_types/CCBlade/#DuctAPE.C4Blade.AlphaAF","page":"CCBlade Airfoil Types","title":"DuctAPE.C4Blade.AlphaAF","text":"AlphaAF(alpha, cl, cd, info, Re, Mach)\nAlphaAF(alpha, cl, cd, info, Re=0.0, Mach=0.0)\nAlphaAF(alpha, cl, cd, info=\"CCBlade generated airfoil\", Re=0.0, Mach=0.0)\nAlphaAF(filename::String; radians=true)\n\nAirfoil data that varies with angle of attack. Data is fit with an Akima spline.\n\nArguments:\n\nalpha::Vector{Float64}: angles of attack\ncl::Vector{Float64}: corresponding lift coefficients\ncd::Vector{Float64}: corresponding drag coefficients\ninfo::String: a description of this airfoil data (just informational)\nRe::Float64: Reynolds number data was taken at (just informational)\nMach::Float64: Mach number data was taken at (just informational)\n\nor\n\na file\n\nArguments:\n\nfilename::String: name/path of file to read in\nradians::Bool: true if angle of attack in file is given in radians\n\n\n\n\n\n","category":"type"},{"location":"C4Blade/airfoil_types/CCBlade/#DuctAPE.C4Blade.AlphaMachAF","page":"CCBlade Airfoil Types","title":"DuctAPE.C4Blade.AlphaMachAF","text":"AlphaMachAF(alpha, Mach, cl, cd, info, Re)\nAlphaMachAF(alpha, Mach, cl, cd, info)\nAlphaMachAF(alpha, Mach, cl, cd)\nAlphaMachAF(filenames::Vector{String}; radians=true)\n\nAirfoil data that varies with angle of attack and Mach number. Data is fit with a recursive Akima spline.\n\nArguments:\n\nalpha::Vector{Float64}: angles of attack\nMach::Vector{Float64}: Mach numbers\ncl::Matrix{Float64}: lift coefficients where cl[i, j] corresponds to alpha[i], Mach[j]\ncd::Matrix{Float64}: drag coefficients where cd[i, j] corresponds to alpha[i], Mach[j]\ninfo::String: a description of this airfoil data (just informational)\nRe::Float64: Reynolds number data was taken at (just informational)\n\nor\n\nfilenames with one file per Mach number.\n\nArguments:\n\nfilenames::Vector{String}: name/path of files to read in, each at a different Mach number in ascending order\nradians::Bool: true if angle of attack in file is given in radians\n\n\n\n\n\n","category":"type"},{"location":"C4Blade/airfoil_types/CCBlade/#DuctAPE.C4Blade.AlphaReAF","page":"CCBlade Airfoil Types","title":"DuctAPE.C4Blade.AlphaReAF","text":"AlphaReAF(alpha, Re, cl, cd, info, Mach)\nAlphaReAF(alpha, Re, cl, cd, info)\nAlphaReAF(alpha, Re, cl, cd)\nread_AlphaReAF(filenames::Vector{String}; radians=true)\n\nAirfoil data that varies with angle of attack and Reynolds number. Data is fit with a recursive Akima spline.\n\nArguments:\n\nalpha::Vector{Float64}: angles of attack\nRe::Vector{Float64}: Reynolds numbers\ncl::Matrix{Float64}: lift coefficients where cl[i, j] corresponds to alpha[i], Re[j]\ncd::Matrix{Float64}: drag coefficients where cd[i, j] corresponds to alpha[i], Re[j]\ninfo::String: a description of this airfoil data (just informational)\nMach::Float64: Mach number data was taken at (just informational)\n\nor\n\nfilenames with one file per Reynolds number.\n\nArguments:\n\nfilenames::Vector{String}: name/path of files to read in, each at a different Reynolds number in ascending order\nradians::Bool: true if angle of attack in file is given in radians\n\n\n\n\n\n","category":"type"},{"location":"C4Blade/airfoil_types/CCBlade/#DuctAPE.C4Blade.AlphaReMachAF","page":"CCBlade Airfoil Types","title":"DuctAPE.C4Blade.AlphaReMachAF","text":"AlphaReMachAF(alpha, Re, Mach, cl, cd, info)\nAlphaReMachAF(alpha, Re, Mach, cl, cd)\nAlphaReMachAF(filenames::Matrix{String}; radians=true)\n\nAirfoil data that varies with angle of attack, Reynolds number, and Mach number. Data is fit with a recursive Akima spline.\n\nArguments:\n\nalpha::Vector{Float64}: angles of attack\nRe::Vector{Float64}: Reynolds numbers\nMach::Vector{Float64}: Mach numbers\ncl::Array{Float64}: lift coefficients where cl[i, j, k] corresponds to alpha[i], Re[j], Mach[k]\ncd::Array{Float64}: drag coefficients where cd[i, j, k] corresponds to alpha[i], Re[j], Mach[k]\ninfo::String: a description of this airfoil data (just informational)\n\nor files with one per Re/Mach combination\n\nArguments:\n\nfilenames::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.\nradians::Bool: true if angle of attack in file is given in radians\n\n\n\n\n\n","category":"type"},{"location":"C4Blade/airfoil_types/CCBlade/#DuctAPE.C4Blade.DuSeligEggers","page":"CCBlade Airfoil Types","title":"DuctAPE.C4Blade.DuSeligEggers","text":"DuSeligEggers(a, b, d, m, alpha0)\nDuSeligEggers(a=1.0, b=1.0, d=1.0, m=2*pi, alpha0=0.0) # uses defaults\n\nDuSelig correction for lift an Eggers correction for drag.\n\nArguments:\n\na, b, d::Float64: parameters in Du-Selig paper. Normally just 1.0 for each.\nm::Float64: lift curve slope. Defaults to 2 pi for zero argument version.\nalpha0::Float64: zero-lift angle of attack. Defaults to 0 for zero argument version.\n\n\n\n\n\n","category":"type"},{"location":"C4Blade/airfoil_types/CCBlade/#DuctAPE.C4Blade.PrandtlTip","page":"CCBlade Airfoil Types","title":"DuctAPE.C4Blade.PrandtlTip","text":"PrandtlTip()\n\nStandard Prandtl tip loss correction.\n\n\n\n\n\n","category":"type"},{"location":"C4Blade/airfoil_types/CCBlade/#DuctAPE.C4Blade.PrandtlTipHub","page":"CCBlade Airfoil Types","title":"DuctAPE.C4Blade.PrandtlTipHub","text":"PrandtlTipHub()\n\nStandard Prandtl tip loss correction plus hub loss correction of same form.\n\n\n\n\n\n","category":"type"},{"location":"C4Blade/airfoil_types/CCBlade/#DuctAPE.C4Blade.SimpleAF","page":"CCBlade Airfoil Types","title":"DuctAPE.C4Blade.SimpleAF","text":"SimpleAF(m, alpha0, clmax, clmin, cd0, cd2)\n\nA simple parameterized lift and drag curve.\n\ncl = m (alpha - alpha0) (capped by clmax/clmin)\ncd = cd0 + cd2 * cl^2\n\nArguments:\n\nm::Float64: lift curve slope\nalpha0::Float64: zero-lift angle of attack\nclmax::Float64: maximum lift coefficient\nclmin::Float64: minimum lift coefficient\ncd0::Float64: zero lift drag\ncd2::Float64: quadratic drag term\n\n\n\n\n\n","category":"type"},{"location":"C4Blade/airfoil_types/CCBlade/#DuctAPE.C4Blade.SkinFriction","page":"CCBlade Airfoil Types","title":"DuctAPE.C4Blade.SkinFriction","text":"SkinFriction(Re0, p)\n\nSkin friction model for a flat plate. cd *= (Re0 / Re)^p\n\nArguments:\n\nRe0::Float64: reference Reynolds number (i.e., no corrections at this number)\np::Float64: exponent in flat plate model. 0.5 for laminar (Blasius solution), ~0.2 for fully turbulent (Schlichting empirical fit)\n\n\n\n\n\n","category":"type"},{"location":"C4Blade/airfoil_types/CCBlade/#DuctAPE.C4Blade.afeval-Tuple{DuctAPE.C4Blade.AFType, Any, Any, Any}","page":"CCBlade Airfoil Types","title":"DuctAPE.C4Blade.afeval","text":"afeval(af::AFType, alpha, Re, Mach)\n\nEvaluate airfoil aerodynamic performance\n\nArguments:\n\naf::AFType or Function: dispatch on AFType or if function call: cl, cd = af(alpha, Re, Mach)\nalpha::Float64: angle of attack in radians\nRe::Float64: Reynolds number\nMach::Float64: Mach number\n\nReturns:\n\ncl::Float64: lift coefficient\ncd::Float64: drag coefficient\n\n\n\n\n\n","category":"method"},{"location":"C4Blade/airfoil_types/CCBlade/#DuctAPE.C4Blade.mach_correction-Tuple{DuctAPE.C4Blade.MachCorrection, Any, Any, Any}","page":"CCBlade Airfoil Types","title":"DuctAPE.C4Blade.mach_correction","text":"mach_correction(::MachCorrection, cl, cd, Mach)\n\nMach number correction for lift/drag coefficient\n\nArguments:\n\nmc::MachCorrection: used for dispatch\ncl::Float64: lift coefficient before correction\ncd::Float64: drag coefficient before correction\nMach::Float64: Mach number\n\nReturns:\n\ncl::Float64: lift coefficient after correction\ncd::Float64: drag coefficient after correction\n\n\n\n\n\n","category":"method"},{"location":"C4Blade/airfoil_types/CCBlade/#DuctAPE.C4Blade.mach_correction-Tuple{DuctAPE.C4Blade.PrandtlGlauert, Any, Any, Any}","page":"CCBlade Airfoil Types","title":"DuctAPE.C4Blade.mach_correction","text":"mach_correction(::PrandtlGlauert, cl, cd, Mach)\n\nPrandtl/Glauert Mach number correction for lift coefficient\n\n\n\n\n\n","category":"method"},{"location":"C4Blade/airfoil_types/CCBlade/#DuctAPE.C4Blade.parsefile-Tuple{Any, Any}","page":"CCBlade Airfoil Types","title":"DuctAPE.C4Blade.parsefile","text":"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.\n\nformat:\n\ninformational header\n\nRe\n\nMach\n\nalpha1 cl1 cd1 ...\n\nalpha2 cl2 cd2\n\nalpha3 cl3 cd3\n\n...\n\n\n\n\n\n","category":"method"},{"location":"C4Blade/airfoil_types/CCBlade/#DuctAPE.C4Blade.re_correction-Tuple{DuctAPE.C4Blade.ReCorrection, Any, Any, Any}","page":"CCBlade Airfoil Types","title":"DuctAPE.C4Blade.re_correction","text":"re_correction(re::ReCorrection, cl, cd, Re)\n\nReynolds number correction for lift/drag coefficient\n\nArguments:\n\nre::ReCorrection: used for dispatch\ncl::Float64: lift coefficient before correction\ncd::Float64: drag coefficient before correction\nRe::Float64: Reynolds number\n\nReturns:\n\ncl::Float64: lift coefficient after correction\ncd::Float64: drag coefficient after correction\n\n\n\n\n\n","category":"method"},{"location":"C4Blade/airfoil_types/CCBlade/#DuctAPE.C4Blade.re_correction-Tuple{DuctAPE.C4Blade.SkinFriction, Any, Any, Any}","page":"CCBlade Airfoil Types","title":"DuctAPE.C4Blade.re_correction","text":"re_correction(sf::SkinFriction, cl, cd, Re)\n\nSkin friction coefficient correction based on flat plat drag increases with Reynolds number.\n\n\n\n\n\n","category":"method"},{"location":"C4Blade/airfoil_types/CCBlade/#DuctAPE.C4Blade.rotation_correction","page":"CCBlade Airfoil Types","title":"DuctAPE.C4Blade.rotation_correction","text":"rotation_correction(rc::RotationCorrection, cl, cd, cr, rR, tsr, alpha, phi=alpha, alpha_max_corr=30*pi/180)\n\nRotation correction (3D stall delay).\n\nArguments:\n\nrc::RotationCorrection: used for dispatch\ncl::Float64: lift coefficient before correction\ncd::Float64: drag coefficient before correction\ncr::Float64: local chord / local radius\nrR::Float64: local radius / tip radius\ntsr::Float64: local tip speed ratio (Omega r / Vinf)\nalpha::Float64: local angle of attack\nphi::Float64: local inflow angles (defaults to angle of attack is precomputing since it is only known for on-the-fly computations)\nalpha_max_corr::Float64: angle of attack for maximum correction (tapers off to zero by 90 degrees)\n\nReturns:\n\ncl::Float64: lift coefficient after correction\ncd::Float64: drag coefficient after correction\n\n\n\n\n\n","category":"function"},{"location":"C4Blade/airfoil_types/CCBlade/#DuctAPE.C4Blade.tip_correction-Tuple{DuctAPE.C4Blade.TipCorrection, Vararg{Any, 5}}","page":"CCBlade Airfoil Types","title":"DuctAPE.C4Blade.tip_correction","text":"tip_correction(::TipCorrection, r, Rhub, Rtip, phi, B)\n\nTip corrections for 3D flow.\n\nArguments:\n\ntc::TipCorrection: used for dispatch\nr::Float64: local radius\nRhub::Float64: hub radius\nRtip::Float64: tip radius\nphi::Float64: inflow angle\nB::Integer: number of blades\n\nReturns:\n\nF::Float64: tip loss factor to multiple against loads.\n\n\n\n\n\n","category":"method"},{"location":"C4Blade/airfoil_types/CCBlade/#DuctAPE.C4Blade.viterna","page":"CCBlade Airfoil Types","title":"DuctAPE.C4Blade.viterna","text":"viterna(alpha, cl, cd, cr75, nalpha=50)\n\nViterna extrapolation. Follows Viterna paper and somewhat follows NREL version of AirfoilPrep, but with some modifications for better robustness and smoothness.\n\nArguments:\n\nalpha::Vector{Float64}: angles of attack\ncl::Vector{Float64}: correspnding lift coefficients\ncd::Vector{Float64}: correspnding drag coefficients\ncr75::Float64: chord/Rtip at 75% Rtip\nnalpha::Int64: number of discrete points (angles of attack) to include in extrapolation\n\nReturns:\n\nalpha::Vector{Float64}: angle of attack from -pi to pi\ncl::Vector{Float64}: correspnding extrapolated lift coefficients\ncd::Vector{Float64}: correspnding extrapolated drag coefficients\n\n\n\n\n\n","category":"function"},{"location":"C4Blade/airfoil_types/CCBlade/#DuctAPE.C4Blade.write_af-Tuple{Any, DuctAPE.C4Blade.AlphaAF}","page":"CCBlade Airfoil Types","title":"DuctAPE.C4Blade.write_af","text":"write_af(filename(s), af::AFType; radians=true)\n\nWrite airfoil data to file\n\nArguments:\n\nfilename(s)::String or Vector{String} or Matrix{String}: name/path of file to write to\naf::AFType: writing is dispatched based on type (AlphaAF, AlphaReAF, etc.)\nradians::Bool: true if you want angle of attack to be written in radians\n\n\n\n\n\n","category":"method"},{"location":"DuctAPE/api/private_prelims/#Option-Types","page":"Prelims","title":"Option Types","text":"","category":"section"},{"location":"DuctAPE/api/private_prelims/","page":"Prelims","title":"Prelims","text":"DuctAPE.DFDC_options\nDuctAPE.ConvergenceType\nDuctAPE.Relative\nDuctAPE.Absolute\nDuctAPE.SolverOptionsType\nDuctAPE.InternalSolverOptions\nDuctAPE.InternalPolyAlgorithmOptions\nDuctAPE.ExternalSolverOptions\nDuctAPE.ExternalPolyAlgorithmOptions\nDuctAPE.GridSolverOptionsType\nDuctAPE.IntegrationMethod","category":"page"},{"location":"DuctAPE/api/private_prelims/#DuctAPE.DFDC_options","page":"Prelims","title":"DuctAPE.DFDC_options","text":"function DFDC_options(;\n grid_solver_options=SLORGridSolverOptions(),\n solver_options=CSORSolverOptions(),\n kwargs...,\n)\n\nConvenience function to select options used in DFDC.\n\n\n\n\n\nfunction DFDC_options(\n multipoint;\n grid_solver_options=SLORGridSolverOptions(),\n solver_options=CSORSolverOptions(),\n kwargs...,\n)\n\nConvenience function to select options used in DFDC and run multipoint analysis.\n\nArguments\n\nmultipoint::Vector : doesn't need to be anything but a vector of the length of multipoints.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_prelims/#DuctAPE.ConvergenceType","page":"Prelims","title":"DuctAPE.ConvergenceType","text":"abstract type ConvergenceType\n\nUsed in dispatching the CSOR (controlled successive over relaxation) residual as relative or absolute.\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/api/private_prelims/#DuctAPE.Relative","page":"Prelims","title":"DuctAPE.Relative","text":"struct Relative <: ConvergenceType\n\nUsed to dispatch the relative residual for CSOR (controlled successive over relaxation) method\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/api/private_prelims/#DuctAPE.Absolute","page":"Prelims","title":"DuctAPE.Absolute","text":"struct Absolute <: ConvergenceType\n\nUsed to dispatch the absolute residual for CSOR (controlled successive over relaxation) method\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/api/private_prelims/#DuctAPE.SolverOptionsType","page":"Prelims","title":"DuctAPE.SolverOptionsType","text":"abstract type SolverOptionsType\n\nUsed for solver dispatch.\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/api/private_prelims/#DuctAPE.InternalSolverOptions","page":"Prelims","title":"DuctAPE.InternalSolverOptions","text":"abstract type InternalSolverOptions <: SolverOptionsType\n\nUsed for solver dispatch.\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/api/private_prelims/#DuctAPE.InternalPolyAlgorithmOptions","page":"Prelims","title":"DuctAPE.InternalPolyAlgorithmOptions","text":"abstract type InternalPolyAlgorithmOptions <: SolverOptionsType\n\nUsed for solver dispatch.\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/api/private_prelims/#DuctAPE.ExternalSolverOptions","page":"Prelims","title":"DuctAPE.ExternalSolverOptions","text":"abstract type ExternalSolverOptions <: SolverOptionsType\n\nUsed for solver dispatch.\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/api/private_prelims/#DuctAPE.ExternalPolyAlgorithmOptions","page":"Prelims","title":"DuctAPE.ExternalPolyAlgorithmOptions","text":"abstract type ExternalPolyAlgorithmOptions <: SolverOptionsType\n\nUsed for solver dispatch.\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/api/private_prelims/#DuctAPE.GridSolverOptionsType","page":"Prelims","title":"DuctAPE.GridSolverOptionsType","text":"abstract type GridSolverOptionsType\n\nUsed for elliptic grid solver dispatch\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/api/private_prelims/#DuctAPE.IntegrationMethod","page":"Prelims","title":"DuctAPE.IntegrationMethod","text":"abstract type IntegrationMethod\n\nUsed in integration method dispatch\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/api/private_prelims/#Bookkeeping","page":"Prelims","title":"Bookkeeping","text":"","category":"section"},{"location":"DuctAPE/api/private_prelims/","page":"Prelims","title":"Prelims","text":"DuctAPE.get_problem_dimensions","category":"page"},{"location":"DuctAPE/api/private_prelims/#DuctAPE.get_problem_dimensions","page":"Prelims","title":"DuctAPE.get_problem_dimensions","text":"get_problem_dimensions(paneling_constants::PanelingConstants)\nget_problem_dimensions(body_vortex_panels, rotor_source_panels, wake_vortex_panels)\n\nDetermine all relevant dimensions to the problem based either on the paneling_constants or the panels themselves.\n\nArguments\n\npaneling_constants::PanelingConstants : Rotor (and possibly stator) geometric paramters.\n\nReturns\n\nproblem_dimensions::ProblemDimensions : ProblemDimensions object.\n\n\n\n\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_prelims/#Caching","page":"Prelims","title":"Caching","text":"","category":"section"},{"location":"DuctAPE/api/private_prelims/#Allocation","page":"Prelims","title":"Allocation","text":"","category":"section"},{"location":"DuctAPE/api/private_prelims/","page":"Prelims","title":"Prelims","text":"The following are various helper functions used in preallocating the various caches.","category":"page"},{"location":"DuctAPE/api/private_prelims/","page":"Prelims","title":"Prelims","text":"DuctAPE.initialize_all_caches\nDuctAPE.allocate_wake_panel_container!\nDuctAPE.allocate_panel_containers!\nDuctAPE.allocate_panel_container!\nDuctAPE.allocate_body_panel_container!\nDuctAPE.allocate_rotor_panel_container!\nDuctAPE.allocate_solve_parameter_extras!\nDuctAPE.allocate_grid_parameter_cache\nDuctAPE.allocate_integration_containers","category":"page"},{"location":"DuctAPE/api/private_prelims/#DuctAPE.initialize_all_caches","page":"Prelims","title":"DuctAPE.initialize_all_caches","text":"initialize_all_caches(solver_options, paneling_constants)\n\nConvenience function to initialize all caches before calling analysis.\n\nArguments\n\nsolver_options::SolverOptionsType : solver options used for cache allocation dispatch\npaneling_constants::PanelingConstants : PanelingConstants object upon which all cache sizing depends\n\nKeyword Arguments\n\nfd_chunk_size::Int=12 : chunk size to use for PreallocationTools caches. Note that the automated chunk 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.\nlevels::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.\n\nReturns\n\nprepost_container_caching::NamedTuple : A named tuple containing the PreallocationTools DiffCache and a named tuple with relevant dimensions for accessing the cache.\nsolve_parameter_caching::NamedTuple : A named tuple containing the PreallocationTools DiffCache and a named tuple with relevant dimensions for accessing the cache.\nsolve_container_caching::NamedTuple : A named tuple containing the PreallocationTools DiffCache and a named tuple with relevant dimensions for accessing the cache.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_prelims/#DuctAPE.allocate_wake_panel_container!","page":"Prelims","title":"DuctAPE.allocate_wake_panel_container!","text":"allocate_wake_panel_containers!(total_length, problem_dimensions::ProblemDimensions)\n\nA helper function is assembling the prepostcontainercache.\n\nArguments\n\ntotal_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.\nproblem_dimensions::ProblemDimensions : a ProblemDimensions object\n\nReturns\n\nwake_vortex_panels::NamedTuple : A named containing the dimensions needed to reshape the cache with regards to the wake vortex panel object\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_prelims/#DuctAPE.allocate_panel_containers!","page":"Prelims","title":"DuctAPE.allocate_panel_containers!","text":"allocate_panel_containers!(total_length, problem_dimensions::ProblemDimensions)\n\nA helper function is assembling the prepostcontainercache.\n\nArguments\n\ntotal_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.\nproblem_dimensions::ProblemDimensions : a ProblemDimensions object\n\nReturns\n\npanels::NamedTuple : A named tuple of named tuples containing the dimensions needed to reshape the cache with regards to the panel objects\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_prelims/#DuctAPE.allocate_panel_container!","page":"Prelims","title":"DuctAPE.allocate_panel_container!","text":"allocate_panel_container!(total_length, nn, np, tn, tp, nb)\n\nA helper function is assembling the prepostcontainercache.\n\nArguments\n\ntotal_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.\nnn::Int : number of nodes in each body, rotor, or wake sheet\nnp::Int : number of panels in each body, rotor, or wake sheet\ntn::Int : number of total nodes among the bodies, rotors, or wake sheets\ntp::Int : number of total panels among the bodies, rotors, or wake sheets\nnb::Int : number of bodies, rotors, or wake sheets\n\nReturns\n\npanel::NamedTuple : A named containing the dimensions needed to reshape the cache with regards to an arbitrary panel set\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_prelims/#DuctAPE.allocate_body_panel_container!","page":"Prelims","title":"DuctAPE.allocate_body_panel_container!","text":"allocate_body_panel_containers!(total_length, problem_dimensions::ProblemDimensions)\n\nA helper function is assembling the prepostcontainercache.\n\nArguments\n\ntotal_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.\nproblem_dimensions::ProblemDimensions : a ProblemDimensions object\n\nReturns\n\nbody_vortex_panels::NamedTuple : A named tuple containing the dimensions needed to reshape the cache with regards to the body vortex panel object\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_prelims/#DuctAPE.allocate_rotor_panel_container!","page":"Prelims","title":"DuctAPE.allocate_rotor_panel_container!","text":"allocate_rotor_panel_containers!(total_length, problem_dimensions::ProblemDimensions)\n\nA helper function is assembling the prepostcontainercache.\n\nArguments\n\ntotal_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.\nproblem_dimensions::ProblemDimensions : a ProblemDimensions object\n\nReturns\n\nrotor_source_panels::NamedTuple : A named containing the dimensions needed to reshape the cache with regards to the rotor source panel object\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_prelims/#DuctAPE.allocate_solve_parameter_extras!","page":"Prelims","title":"DuctAPE.allocate_solve_parameter_extras!","text":"allocate_solve_parameter_extras!(\n solver_options::SolverOptionsType, input_length, total_length\n)\n\nIncludes additional caching for various solvers. Currently only does anything for SIAMFANLEOptions types.\n\nArguments\n\ninput_length::Int : the number of state variables in the solver\ntotal_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.\n\nReturns\n\nsolve_parameter_extras::NamedTuple : A named tuple containing dimensions related to extra caching parameters used in various solvers.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_prelims/#DuctAPE.allocate_grid_parameter_cache","page":"Prelims","title":"DuctAPE.allocate_grid_parameter_cache","text":"allocate_grid_parameter_cache(pg, x, n)\n\nAllocate a cache used inside the elliptic grid solve.\n\nArguments\n\npg::AbstractArray{Float,3} : the proposed grid array\nx::AbstractVector{Float} : the array of ξ values used in the solve\nn::AbstractVector{Float} : the array of η values used in the solve\n\nReturns\n\ngrid_parameter_cache::NamedTuple : A named tuple containing the PreallocationTools DiffCache and dimensions for accessing it.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_prelims/#DuctAPE.allocate_integration_containers","page":"Prelims","title":"DuctAPE.allocate_integration_containers","text":"allocate_integration_containers(\n integration_options::IntegrationMethod, dispatch_type; cache_size=20\n)\n\nDescription\n\nArguments\n\nintegration_options::IntegrationMethod : options for integration used for dispatch and to size cache\ndispatch_type:: : an object with eltype(dispatch_type) with which to define the type for cache initialization.\n\nKeyword Arguments\n\ncache_size::Int=20 : size needed for intermediate calculations for integration.\n\nReturns\n\nintegration_containers::NamedTuple : A named tuple containing the cache(s) needed for integration.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_prelims/#Reshaping","page":"Prelims","title":"Reshaping","text":"","category":"section"},{"location":"DuctAPE/api/private_prelims/","page":"Prelims","title":"Prelims","text":"The following are used internally to reshape the cache vectors into more usable formats.","category":"page"},{"location":"DuctAPE/api/private_prelims/","page":"Prelims","title":"Prelims","text":"DuctAPE.withdraw_prepost_container_cache\nDuctAPE.withdraw_solve_parameter_cache\nDuctAPE.withdraw_solve_container_cache\nDuctAPE.withdraw_grid_parameter_cache","category":"page"},{"location":"DuctAPE/api/private_prelims/#DuctAPE.withdraw_prepost_container_cache","page":"Prelims","title":"DuctAPE.withdraw_prepost_container_cache","text":"withdraw_prepost_container_cache(vec, dims)\n\nReshape the prepost cache vector using the saved dimensions tuple.\n\nArguments\n\nvec::Vector{Float} : vector cache of pre- and post-processing intermediate containers.\ndims::NamedTuple : Named tuple containing the indices and shape of the various items stored in the cache vector.\n\nReturns\n\nprepost_container_caching::NamedTuple : Named tuple containing reshaped views of sections of the cache vector.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_prelims/#DuctAPE.withdraw_solve_parameter_cache","page":"Prelims","title":"DuctAPE.withdraw_solve_parameter_cache","text":"withdraw_solve_parameter_cache(solver_options::SolverOptionsType, vec, dims)\n\nReshape the solve parameter cache vector using the saved dimensions tuple.\n\nArguments\n\nsolver_options::SolverOptionsType : Solver options type for dispatch.\nvec::Vector{Float} : vector cache of pre- and post-processing intermediate containers.\ndims::NamedTuple : Named tuple containing the indices and shape of the various items stored in the cache vector.\n\nReturns\n\nsolve_parameter_caching::NamedTuple : Named tuple containing reshaped views of sections of the cache vector.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_prelims/#DuctAPE.withdraw_solve_container_cache","page":"Prelims","title":"DuctAPE.withdraw_solve_container_cache","text":"withdraw_solve_container_cache(solver_options::SolverOptionsType, vec, dims)\n\nReshape the intermediate solve container cache vector using the saved dimensions tuple.\n\nArguments\n\nsolver_options::SolverOptionsType : Solver options type for dispatch.\nvec::Vector{Float} : vector cache of pre- and post-processing intermediate containers.\ndims::NamedTuple : Named tuple containing the indices and shape of the various items stored in the cache vector.\n\nReturns\n\nsolve_container_caching::NamedTuple : Named tuple containing reshaped views of sections of the cache vector.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_prelims/#DuctAPE.withdraw_grid_parameter_cache","page":"Prelims","title":"DuctAPE.withdraw_grid_parameter_cache","text":"withdraw_grid_parameter_cache(vec, dims)\n\nReshape the cache used inside the elliptic grid solve.\n\nArguments\n\nvec::Vector{Float} : the cache vector\ndims::NamedTuple : the named tuple of dimensions used to reshape the cache vector\n\nReturns\n\nproposed_grid::AbstractArray{Float,3} : the proposed grid array\nxi::AbstractVector{Float} : the array of ξ values used in the solve\neta::AbstractVector{Float} : the array of η values used in the solve\n\n\n\n\n\n","category":"function"},{"location":"C4Blade/airfoil_types/DFDC/#DFDC-Airfoil-Type","page":"DFDC Airfoil Type","title":"DFDC Airfoil Type","text":"","category":"section"},{"location":"C4Blade/airfoil_types/DFDC/","page":"DFDC Airfoil Type","title":"DFDC Airfoil Type","text":"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.","category":"page"},{"location":"C4Blade/airfoil_types/DFDC/","page":"DFDC Airfoil Type","title":"DFDC Airfoil Type","text":"DuctAPE.C4Blade.DFDCairfoil","category":"page"},{"location":"C4Blade/airfoil_types/DFDC/#DuctAPE.C4Blade.DFDCairfoil","page":"DFDC Airfoil Type","title":"DuctAPE.C4Blade.DFDCairfoil","text":"Fields:\n\nalpha0::Float : zero lift angle of attack\nclmax::Float : maximum cl\nclmin::Float : minimum cl\ndclda::Float : lift curve slope (1/radians)\ndclda_stall::Float : lift curve slope post-stall (1/radians)\ndcl_stall::Float : cl increment from initial to total stall.\ncdmin::Float : minimum cd\ncldmin::Float : cl at cdmin\ndcddcl2::Float : quadratic curve factor for cl vs cd curve left(fracd(c_d)d(c_l^2)right)\ncmcon::Float : pitching moment constant (unused right now)\nRe_ref::Float : reference Reynolds number at which cd values apply\nRe_exp::Float : Reynolds number exponent scaling left( c_d = c_d(ReRe_ref)^Re_expright) should be 0.2 for fully laminar and 0.5 for fully turbulent\nmcrit::Float : critical Mach number\ncorrect_for_mach::Bool : flag to add Prandtl-Glauert correction\ncorrect_for_cascade::Bool : flag to add cascade corrections\ncorrect_for_reynolds::Bool : flag to add reynolds drag correction\ncorrect_for_transonic::Bool : flag to add drag correction above critical mach number\n\n\n\n\n\n","category":"type"},{"location":"C4Blade/airfoil_types/actuator_disk/#Actuator-Disk-Type","page":"Actuator Disk Type","title":"Actuator Disk Type","text":"","category":"section"},{"location":"C4Blade/airfoil_types/actuator_disk/","page":"Actuator Disk Type","title":"Actuator Disk Type","text":"warning: Warning\nActuator disk types are currently in development and not ready for general use.","category":"page"},{"location":"C4Blade/airfoil_types/actuator_disk/","page":"Actuator Disk Type","title":"Actuator Disk Type","text":"DuctAPE currently implements an actuator disk type that can be used to directly define the rotor blade circulation.","category":"page"},{"location":"C4Blade/airfoil_types/actuator_disk/","page":"Actuator Disk Type","title":"Actuator Disk Type","text":"DuctAPE.C4Blade.ADM","category":"page"},{"location":"C4Blade/airfoil_types/actuator_disk/#DuctAPE.C4Blade.ADM","page":"Actuator Disk Type","title":"DuctAPE.C4Blade.ADM","text":"Fields:\n\nprescribed_circulation::Float=0.0 : Prescribed circulation strength\nprescribed_source_strength::Float=0.0 : Prescribed source panel strength\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/api/private_api/#Private-API","page":"Private API","title":"Private API","text":"","category":"section"},{"location":"DuctAPE/api/private_api/","page":"Private API","title":"Private API","text":"Pages = [\"private_api.md\",\n\"private_prelims.md\",\n\"private_preprocess.md\",\n\"private_process.md\",\n\"private_postprocess.md\",\n\"private_utlities.md\"]\nDepth = 5","category":"page"},{"location":"DuctAPE/advanced_usage/option/#Advanced-Option-Selection","page":"Options","title":"Advanced Option Selection","text":"","category":"section"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"DuctAPE has been written in an attempt to make as many of the available options exposed to the user as possible. This means that there are quite a few options to select from if not using the option convenience functions. To help the user, the majority of overarching option types are defined using the @kwdef macro and have default values that should be reasonable in most cases. We will introduce some of the available options here that may be of common interest.","category":"page"},{"location":"DuctAPE/advanced_usage/option/#General-Option-Selection","page":"Options","title":"General Option Selection","text":"","category":"section"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"In general, options are all accessed through the options argument of the analysis function being called. Said options are passed via an Options struct.","category":"page"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"DuctAPE.Options","category":"page"},{"location":"DuctAPE/advanced_usage/option/#DuctAPE.Options-DuctAPE-advanced_usage-option","page":"Options","title":"DuctAPE.Options","text":"struct Options\n\nType containing (nearly) all the available user options.\n\nFields\n\nGeneral Options\n\nverbose::Bool = false : flag to print verbose statements\nsilence_warnings::Bool = true : flag to silence warnings\nmultipoint_index::Int = [1] : holds current index of multi-point solver (no need for user to change this usually)\n\nPre-processing Options\n\nGeometry interpolation and generation options :\n\nfinterp::Interplation Method = FLOWMath.akima : interpolation method used for re-paneling bodies\nautoshiftduct::Bool = true : flag as to whether duct geometry should be shifted based on rotor tip location\nlu_decomp_flag::Bool = false : flag indicating if panel method LHS matrix factorization was successful\n\npaneling options\n\nitcpshift::Float = 0.05 : factor for internal trailing edge psuedo-panel placement (default is DFDC hard-coded value)\naxistol::Float = 1e-15 : tolerance for how close the the axis of rotation should be considered on the axis\ntegaptol::Float = 1e1 * eps() : tolerance for how large of a trailing edge gap should be considered a gap\n\nIntegration Options\n\nintegration_options::IntegrationOptions type = IntegrationOptions() : integration options\n\nPost-processing Options\n\nwrite_outputs::AbstractArray{Bool} = [false] : Bool for whether to write the outputs of the analysis to an external file (slow)\noutfile::AbstractArray{String} = [\"outputs.jl\"] : External output file name (including path information) for files to write\ncheckoutfileexists::Bool = false : Flag for whether to check if file exists before overwriting\noutput_tuple_name::AbstractArray{String} = [\"outs\"] : variable name for named tuple written to out file\n\nSolving Options\n\ngrid_solver_options::GridSolverOptionsType = GridSolverOptions() : elliptic grid solver options\nsolver_options::SolverOptionsType = ChainSolverOptions() : solver options\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"Options are selected through the set_options function","category":"page"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"DuctAPE.set_options","category":"page"},{"location":"DuctAPE/advanced_usage/option/#DuctAPE.set_options-DuctAPE-advanced_usage-option","page":"Options","title":"DuctAPE.set_options","text":"set_options(; kwargs...)\nset_options(multipoint; kwargs...)\n\nSet the options for DuctAPE to use.\n\nNote that the vast majority of the available options are defined through keyword arguments. See the documentation for the various option types for more information.\n\nArguments\n\nmultipoint::AbstractArray{OperatingPoint} : a vector of operating points to use if running a multi-point analysis.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"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.","category":"page"},{"location":"DuctAPE/advanced_usage/option/#Quadrature","page":"Options","title":"Quadrature","text":"","category":"section"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"There are several implementations for different quadrature approaches depending on user desires; they include:","category":"page"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"Gauss-Legendre quadature (default),\nGauss-Kronrod Quadrature, and\nRomberg Quadrature methods.","category":"page"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"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.","category":"page"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"DuctAPE.IntegrationOptions","category":"page"},{"location":"DuctAPE/advanced_usage/option/#DuctAPE.IntegrationOptions-DuctAPE-advanced_usage-option","page":"Options","title":"DuctAPE.IntegrationOptions","text":"struct IntegrationOptions\n\nA struct used to hold the integration options for both the nominal and singular cases.\n\nFields\n\nnominal::IntegrationMethod=GaussLegendre(8) : the integration options to use for the nominal case.\nsingular::IntegrationMethod=GaussLegendre(8) : the integration options to use for the self-induced case.\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"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.","category":"page"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"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:","category":"page"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"# set nominal options using a GaussLegendre object (which is an InterationMethod type)\n# note that a convenience method is used here that takes in the number of points and\n#calculates the appropriate sample locations and weights.\nnominal_integration_method = DuctAPE.GaussLegendre(10)\n\n# set singular options using a GaussKronrod object (which is an InterationMethod type)\n# note that like most option structs, these are defined using @kwdef allowing the fields\n#to be treated as keyword arguments.\n# also note that we haven't changed the evaluation limit (default 10^7)\nsingular_integration_method = DuctAPE.GaussKronrod(; order=7, atol=2e-16)\n\n# put the quadrature options together\nintegration_options = DuctAPE.IntegrationOptions(;\n nominal=nominal_integration_method, singular=singular_integration_method\n)\n\n# example of calling the set_options function\noptions = DuctAPE.set_options(; integration_options=integration_options)","category":"page"},{"location":"DuctAPE/advanced_usage/option/#Elliptic-Grid-Solvers","page":"Options","title":"Elliptic Grid Solvers","text":"","category":"section"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"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:","category":"page"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"SLOR: DFDC grid solver\nDefault: Default method compatible with ImplicitAD","category":"page"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"The SLOR (successive line over relaxation) is the method employed by DFDC.","category":"page"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"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.","category":"page"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"For the SLOR method alone, the type is","category":"page"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"DuctAPE.SLORGridSolverOptions","category":"page"},{"location":"DuctAPE/advanced_usage/option/#DuctAPE.SLORGridSolverOptions-DuctAPE-advanced_usage-option","page":"Options","title":"DuctAPE.SLORGridSolverOptions","text":"struct SLORGridSolverOptions <: GridSolverOptionsType\n\nOptions for SLOR (successive line over relaxation) elliptic grid solver.\n\nFields\n\niteration_limit::Int = 100 : maximum number of iterations\natol::Float = 1e-9 : absolute convergence tolerance\nconverged::AbstractArray{Bool} = [false]\niterations::AbstractArray{Int} = [0] : iteration counter\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"And for the default method compatible with ImplicitAD, the type is","category":"page"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"DuctAPE.GridSolverOptions","category":"page"},{"location":"DuctAPE/advanced_usage/option/#DuctAPE.GridSolverOptions-DuctAPE-advanced_usage-option","page":"Options","title":"DuctAPE.GridSolverOptions","text":"struct GridSolverOptions <: GridSolverOptionsType\n\nOptions for SLOR + Newton elliptic grid solver.\n\nFields\n\niteration_limit::Int = 10 : maximum number of iterations\natol::Float = 1e-14 : absolute convergence tolerance\nalgorithm::Symbol = :newton : algorithm to use in NLsolve.jl\nautodiff::Symbol = :forward : differentiation method to use in NLsolve.jl\nconverged::AbstractArray{Bool} = [false]\niterations::AbstractArray{Int} = [0] : iteration counter\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"As an example, this is the input that would be required to use the default method with an absolute convergence tolerance of 1e-10, and also including the quadrature settings from above:","category":"page"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"# define wake grid solver settings\nwake_solve_options = DuctAPE.GridSolverOptions(; atol=1e-10)\n\n# set all options\noptions = DuctAPE.set_options(;\n integration_options=integration_options, grid_solver_options=wake_solve_options\n)","category":"page"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"note: Convergence Flags\nThe convergence flags default to false, and in general should be left alone as they are modified in-place in the various solves by the analysis.","category":"page"},{"location":"DuctAPE/advanced_usage/option/#Aerodynamics-Solvers","page":"Options","title":"Aerodynamics Solvers","text":"","category":"section"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"There are two general types of solvers available in DuctAPE, the first is very similar to the solver in DFDC and converges a residual very similar to DFDC's. The other type is for external solvers that converge an alternate residual that is default in DuctAPE. The various solver options include:","category":"page"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"CSOR: the DFDC solver\nModCSOR: modified DFDC solver for ImplicitAD compatibility\nFixedPoint.jl\nSpeedMapping.jl\nMINPACK.jl\nSIAMFANLEquations.jl\nNLsolve.jl\nSimpleNonlinearSolve.jl","category":"page"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"Note that the CSOR, ModCSOR, FixedPoint.jl, and SpeedMapping.jl are all different fixed-point iteration solvers, MINPACK.jl and SIAMFANLEquations.jl are primarily quasi-newton solvers, and NLsolve.jl and SimpleNonlinearSolve.jl have various solver options.","category":"page"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"DuctAPE also has some poly-algorithm solvers that employ more than one solver. The Chain Solver option is the default which starts with a fixed-point iteration, and if it doesn't converge, moves on to a quasi-, then full Newton solver until either convergence is reached, or no convergence is found. The other poly-algorithm that is available, but is less robust is the Composite Solver which partially converges with one solver, and finishes with another.","category":"page"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"Each of the solve methods have a variety of different settings associated with them, detailed in their respective docstrings. The following example should contain all the principles required to be able to adapt to the most complex use cases.","category":"page"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"# Define settings for NLsolve's newton method\naero_solver_options = DuctAPE.NLsolveOptions(;\n algorithm=:newton,\n atol=1e-10,\n iteration_limite=30,\n linesearch_method=LineSearches.BackTracking, #don't include parentheses on method handle\n linesearch_kwargs=(; order=3, maxstep=1e6),\n additional_kwargs=(; autoscale=false),\n)\n\n# set all the options\nDuctAPE.set_options(;\n integration_options=integration_options,\n grid_solver_options=wake_solve_options,\n solver_options=aero_solver_options,\n)","category":"page"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"note: Iteration Counters\nThe iterations field (not to be confused with the iterations_limit field) in the solver options should generally not be changed. They automatically save (in-place) the number of iterations the solver performs and can be accessed after the analysis is run.","category":"page"},{"location":"DuctAPE/advanced_usage/option/#Advanced-Options-for-Multi-point-analyses","page":"Options","title":"Advanced Options for Multi-point analyses","text":"","category":"section"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"For using advanced options in multi-point analyses, there are various changes that need to be made to avoid run-time errors. Here is an example for setting options with the CSOR solver.","category":"page"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"# number of operating points to analyze\nnop = 3\n\noptions = DuctAPE.set_options(;\n solver_options=DuctAPE.ModCSORSolverOptions(;\n converged=fill(false, (1, nop)), # need a convergence flag for each operating point\n iterations=zeros(Int, (1, nop)), # need a iteration count for each operating point\n ),\n write_outputs=fill(false, nop), # we need to know which of the operating point outputs to write\n outfile=fill(\"\", nop), # we need to include names, even if they won't be used.\n output_tuple_name=fill(\"outs\", nop), # we need to include names, even if they won't be used.\n)","category":"page"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"If using a poly-algorithm with a multi-point solve, then each of the solvers needs to have the multiple converged and iterations fields for each operating point, and the overall solve type needs to have a converged and iterations field for each solver and each operating point.","category":"page"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"options = DuctAPE.set_options(;\n solver_options=DuctAPE.ChainSolverOptions(;\n solvers=[ # vector of solvers to use in poly-algorithm\n DuctAPE.NLsolveOptions(;\n algorithm=:anderson,\n atol=1e-12,\n iteration_limit=200,\n converged=fill(false, (1, nop)), # flags for each operating point\n iterations=zeros(Int, (1, nop)), # counters for each operating point\n ),\n DuctAPE.MinpackOptions(;\n atol=1e-12,\n iteration_limit=100,\n converged=fill(false, (1, nop)),\n iterations=zeros(Int, (1, nop)),\n ),\n ],\n converged=fill(false, (2, nop)), # flags for each solver and each operating point\n iterations=zeros(Int, (2, nop)), # counts for each solver and each operating point\n ),\n)","category":"page"},{"location":"C4Blade/airfoil_types/cascade/#Cascade-Types","page":"Cascade Types","title":"Cascade Types","text":"","category":"section"},{"location":"C4Blade/airfoil_types/cascade/","page":"Cascade Types","title":"Cascade Types","text":"warning: Warning\nCascade types are currently in development and not ready for general use.","category":"page"},{"location":"C4Blade/airfoil_types/cascade/","page":"Cascade Types","title":"Cascade Types","text":"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.","category":"page"},{"location":"C4Blade/airfoil_types/cascade/","page":"Cascade Types","title":"Cascade Types","text":"Modules = [DuctAPE.C4Blade]\nPages = [\"C4Blade/cascades.jl\"]","category":"page"},{"location":"C4Blade/airfoil_types/cascade/#DuctAPE.C4Blade.InReStSoMaCAS","page":"Cascade Types","title":"DuctAPE.C4Blade.InReStSoMaCAS","text":"InReStSoMaCAS(inflow, Re, stagger, solidity, Mach, cl, cd, info)\nInReStSoMaCAS(inflow, Re, stagger, solidity, Mach, cl, cd)\nInReStSoMaCAS(filenames::Matrix{String}; radians=true)\n\nData is fit recursively with Akima splines.\n\nArguments:\n\ninflow::Vector{Float64}: inflow angles\nRe::Vector{Float64}: Reynolds numbers\nstagger::Vector{Float64}: stagger angles\nsolidity::Vector{Float64}: local solidity\nMach::Vector{Float64}: Mach numbers\ncl::Array{Float64}: lift coefficients where cl[i, j, k, ell] corresponds to stagger[i], Re[j], Mach[k], solidity[ell]\ncd::Array{Float64}: drag coefficients where cd[i, j, k, ell] corresponds to stagger[i], Re[j], Mach[k], solidity[ell]\ninfo::String: a description of this airfoil data (just informational)\n\nor files with one per Re/Stagger/Solidty/Mach combination\n\nArguments:\n\nfilenames::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.\nradians::Bool: true if angle of attack in file is given in radians\n\n\n\n\n\n","category":"type"},{"location":"C4Blade/airfoil_types/cascade/#DuctAPE.C4Blade.interp5d-NTuple{12, Any}","page":"Cascade Types","title":"DuctAPE.C4Blade.interp5d","text":" interp5d(interp1d, x1data, x2data, x3data, x4data, fdata, x1pt, x2pt, x3pt, x4pt)\n\nSame as FLOWMath.interp4d, ex1cept in five dimensions.\n\n\n\n\n\n","category":"method"},{"location":"C4Blade/airfoil_types/cascade/#DuctAPE.C4Blade.parsecascadefile-Tuple{Any, Any}","page":"Cascade Types","title":"DuctAPE.C4Blade.parsecascadefile","text":"parsefile(filename, radians, solidity)\n\nCascade version of parsefile function from CCBlade. Assumes stagger is given before reynolds and Mach number, and solidity is given after\n\n\n\n\n\n","category":"method"},{"location":"C4Blade/airfoil_types/cascade/#DuctAPE.C4Blade.writecascadefile-NTuple{10, Any}","page":"Cascade Types","title":"DuctAPE.C4Blade.writecascadefile","text":"writecascadefile(filename, info, Re, Mach, stagger, inflow, cl, cd, radians)\n\nCascade version of writecascadefile function from CCBlade. Writes solidity after Mach number\n\n\n\n\n\n","category":"method"},{"location":"C4Blade/corrections/#Airfoil-Polar-Corrections","page":"Polar Modification","title":"Airfoil Polar Corrections","text":"","category":"section"},{"location":"C4Blade/corrections/","page":"Polar Modification","title":"Polar Modification","text":"In some cases various airfoil polar corrections may be required. Of specific note are modifications to airfoil polars for post-stall behavior. Thus far, DuctAPE is much more robust if the post-stall behavior in the lift polars does not exhibit a decrease in lift at angles of attack beyond that of the maximum lift coefficient. Therefore a function is provided to help modify polars as needed:","category":"page"},{"location":"C4Blade/corrections/","page":"Polar Modification","title":"Polar Modification","text":"DuctAPE.C4Blade.stall_limiters","category":"page"},{"location":"C4Blade/corrections/#DuctAPE.C4Blade.stall_limiters","page":"Polar Modification","title":"DuctAPE.C4Blade.stall_limiters","text":"stall_limiters(\n aoa,\n cl,\n cd;\n clminid=nothing,\n clmaxid=nothing,\n cl_cutoff_slope=0.1,\n cd_cutoff_slope=0.9,\n N=20,\n blend_hardness=50\n)\n\nCuts 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)\n\nArguments:\n\naoa::AbstractVector{Float} : input angles of attack, in radians\ncl::AbstractVector{Float} : input lift coefficients\ncd::AbstractVector{Float} : input drag coefficients\n\nKeyword Arguments:\n\nclminid::Float=nothing : manually set index for minimum cl\nclmaxid::Float=nothing : manually set index for maximum cl\ncl_cutoff_slope::Float=0.1 : \"post-stall\" slope for cl\ncd_cutoff_slope::Float=0.1 : \"post-stall\" slope for cd\nblend_hardness::Float=50 : hardenss of blend between nominal polar and post-stall modifications.\n\nReturns:\n\naoa_ext::AbstractVector{Float} : angles of attack for modified polar, in radians\ncl_ext::AbstractVector{Float} : modified lift coefficients\ncd_ext::AbstractVector{Float} : modified drag coefficients\n\n\n\n\n\n","category":"function"},{"location":"C4Blade/corrections/","page":"Polar Modification","title":"Polar Modification","text":"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.","category":"page"},{"location":"C4Blade/corrections/","page":"Polar Modification","title":"Polar Modification","text":"Modules = [DuctAPE.C4Blade]\nPages = [\"C4Blade/airfoil_corrections.jl\"]","category":"page"},{"location":"C4Blade/corrections/#DuctAPE.C4Blade.corrected_clcd-Tuple{DuctAPE.C4Blade.AlphaReAF, Vararg{Any, 9}}","page":"Polar Modification","title":"DuctAPE.C4Blade.corrected_clcd","text":"corrected_clcd(af::AlphaReAF, alpha, Re, Mach, solidity, stagger; kwargs...)\n\nEvaluates 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.\n\ncorrected_clcd!(cl, cd, af::AlphaReAF, Re, alpha, Mach, solidity, stagger; kwargs...)\n\nEvaluates and applies on-the-fly corrections for airfoil lift and drag in place.\n\ncorrected_clcd!(cl, cd, Mach, solidity, stagger; kwargs...)\n\nApplies on-the-fly corrections for airfoil lift and drag in place.\n\ncorrected_clcd!(cl, cd, af::AlphaAF, alpha, Re, Mach, solidity, stagger; kwargs...)\n\nEvaluates and applies on-the-fly corrections, including Reynolds corrections, for airfoil lift and drag in place\n\ncorrected_clcd(cas::InReStSoMaCAS, inflow, Re, Mach, solidity, stagger)\n\nEvaluates cascade lift and drag.\n\nArguments:\n\nCoefficients\n\ncl::Float : local lift coefficient\ncd::Float : local drag coefficient\n\nAirfoil Object\n\naf::AlphaReAF : airfoil object of CCBlade type dependent on angle of attack and Reynolds number\n\nor\n\naf::AlphaAF : airfoil object of CCBlade type dependent on angle of attack only\n\nor\n\ncas::InReStSoMaCAS : cascade object depentent on inflow angle, Reynolds number, stagger, solidity, and Mach number.\n\nFlow Angle\n\nalpha::Float : angle of attack, radians. Used with airfoil types\n\nor\n\ninflow::Float : inflow angle, radians. Used with cascade types\n\nFlow Conditions\n\nRe::Float : Reynolds number\nMach::Float : Mach number\n\nGeometry\n\nsolidity::Float : Local solidity\nstagger::Float : Stagger angle, radians\n\nKeyword Arguments:\n\nmcrit::Float=0.7 : Critical Mach number\n\nrotorzloc airfoil type parameters for post-stall behavior\n\ndcl_stall::Float=0.1 : change in cl from incipient to total stall, used in transonic lift limiter correction\ndclda_stall::Float=0.1 : Post-stall lift curve slope\n\nCorrection factors that were hard coded in rotorzloc and DFDC\n\ncdmfactor::Float=10.0 :\nclmfactor::Float=0.25 :\nmexp::Float=3.0 :\ncdmstall::Float=0.1 :\ncdmdd::Float=0.0020 :\n\nSmoothing Paramters\n\nssblend_hardness::Float=100.0 : sigmoid blending hardness for solidity/stagger corrections\ntransblendhardness::Float=75.0 : sigmoid blending hardness for transonic corrections\nabsdx::Float=0.0625 : smooth absolute value Δα (radians) for transonic drag addition\n\nMiscellaneous\n\nverbose::Bool=false : Boolean of whether to print warnings, etc.\n\n\n\n\n\n","category":"method"},{"location":"C4Blade/corrections/#DuctAPE.C4Blade.prandtl_glauert!-Tuple{Any, Any}","page":"Polar Modification","title":"DuctAPE.C4Blade.prandtl_glauert!","text":"prandtl_glauert!(cl, ma)\n\nIn place version of pradtl_glauert.\n\n\n\n\n\n","category":"method"},{"location":"C4Blade/corrections/#DuctAPE.C4Blade.prandtl_glauert-Tuple{Any, Any}","page":"Polar Modification","title":"DuctAPE.C4Blade.prandtl_glauert","text":"prandtl_glauert(cl, ma)\n\nApplies Prandtl-Glauert correction\n\nArguments:\n\ncl::Float : local lift coefficient\n\nReturns\n\ncl_corr::AbstractVector{Float} : corrected lift coefficients\n\n\n\n\n\n","category":"method"},{"location":"C4Blade/corrections/#DuctAPE.C4Blade.prandtl_glauert_factor-Tuple{Any}","page":"Polar Modification","title":"DuctAPE.C4Blade.prandtl_glauert_factor","text":"prandtl_glauert_factor(mach; verbose=false, blend_range=0.02)\n\nSmoothed Prandtl-Glauert Mach correction factor\n\nArguments:\n\nmach::Float : Mach number\n\nKeyword Arguments:\n\nblend_range::Float=0.02 : range for blending factor and max cutoff (allowing Mach >= 1.0 for continuity)\n\n\n\n\n\n","category":"method"},{"location":"C4Blade/corrections/#DuctAPE.C4Blade.quadspline-Tuple{Any, Any, Any}","page":"Polar Modification","title":"DuctAPE.C4Blade.quadspline","text":"quadspline(xdata, ydata, xpoint)\n\nSample data in quadratic spline at give point.\n\n\n\n\n\n","category":"method"},{"location":"C4Blade/corrections/#DuctAPE.C4Blade.re_drag!-Tuple{Any, Any, Any}","page":"Polar Modification","title":"DuctAPE.C4Blade.re_drag!","text":"re_drag!(cd, re, re_ref; re_exp=0.5)\n\nIn-place version of re_drag.\n\n\n\n\n\n","category":"method"},{"location":"C4Blade/corrections/#DuctAPE.C4Blade.re_drag-Tuple{Any, Any, Any}","page":"Polar Modification","title":"DuctAPE.C4Blade.re_drag","text":"re_drag(cd, re, re_ref; re_exp=0.5)\n\nArguments:\n\ncd::AbstractVector{Float} : input drag coefficients\nre::Float : Current Reynolds number\nre_ref::Float : Reference Reynolds number (at which the cd's were generated)\n\nKeyword Arguments:\n\nre_exp::Float=0.5 : should be 0.2 for laminar and 0.5 for turbulent flow\n\nReturns:\n\ncd_corr::AbstractVector{Float} : Reynolds corrected drag coefficients\n\n\n\n\n\n","category":"method"},{"location":"C4Blade/corrections/#DuctAPE.C4Blade.solidity_and_stagger!-Tuple{Any, Any, Any}","page":"Polar Modification","title":"DuctAPE.C4Blade.solidity_and_stagger!","text":"solidity_and_stagger!(cl, solidity, stagger; blend_hardness=100)\n\nIn-place version of solidity_and_stagger.\n\n\n\n\n\n","category":"method"},{"location":"C4Blade/corrections/#DuctAPE.C4Blade.solidity_and_stagger-Tuple{Any, Any, Any}","page":"Polar Modification","title":"DuctAPE.C4Blade.solidity_and_stagger","text":"solidity_and_stagger(cl, solidity, stagger; blend_hardness=100)\n\nApply smoothed Wallis' cascade correction (see solidity_and_stagger_factor_smooth) to local lift.\n\nArguments:\n\ncl::AbstractVector{Float} : input lift coefficients\nsolidity::Float : local solidity\nstagger::Float : local stagger (in radians)\n\nKeyword Arguments:\n\nblend_hardness::Float=100 : hardness of smoothing blends\n\nReturns:\n\ncl_corr::AbstractVector{Float} : corrected lift coefficients.\n\n\n\n\n\n","category":"method"},{"location":"C4Blade/corrections/#DuctAPE.C4Blade.solidity_and_stagger_factor-Tuple{Any, Any}","page":"Polar Modification","title":"DuctAPE.C4Blade.solidity_and_stagger_factor","text":"solidity_and_stagger_factor(solidity, stagger; blend_hardness=100)\n\nCorrection 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.\n\nArguments:\n\nsolidity::Float : local solidity\nstagger::Float : local stagger (in radians)\n\nKeyword Arguments:\n\nblend_hardness::Float=100 : hardness for smoothing blends\n\n\n\n\n\n","category":"method"},{"location":"C4Blade/corrections/#DuctAPE.C4Blade.solidity_and_stagger_factor_smooth-Tuple{Any, Any}","page":"Polar Modification","title":"DuctAPE.C4Blade.solidity_and_stagger_factor_smooth","text":"solidity_and_stagger_factor_smooth(solidity, stagger; blend_hardness=100)\n\nA smoothed version of solidity_and_stagger_factor.\n\nArguments:\n\nsolidity::Float : local solidity\nstagger::Float : local stagger (in radians)\n\nKeyword Arguments:\n\nblend_hardness::Float=100 : hardness for smoothing blends\n\n\n\n\n\n","category":"method"},{"location":"C4Blade/corrections/#DuctAPE.C4Blade.stall_limiters-Tuple{Any, Any, Any}","page":"Polar Modification","title":"DuctAPE.C4Blade.stall_limiters","text":"stall_limiters(\n aoa,\n cl,\n cd;\n clminid=nothing,\n clmaxid=nothing,\n cl_cutoff_slope=0.1,\n cd_cutoff_slope=0.9,\n N=20,\n blend_hardness=50\n)\n\nCuts 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)\n\nArguments:\n\naoa::AbstractVector{Float} : input angles of attack, in radians\ncl::AbstractVector{Float} : input lift coefficients\ncd::AbstractVector{Float} : input drag coefficients\n\nKeyword Arguments:\n\nclminid::Float=nothing : manually set index for minimum cl\nclmaxid::Float=nothing : manually set index for maximum cl\ncl_cutoff_slope::Float=0.1 : \"post-stall\" slope for cl\ncd_cutoff_slope::Float=0.1 : \"post-stall\" slope for cd\nblend_hardness::Float=50 : hardenss of blend between nominal polar and post-stall modifications.\n\nReturns:\n\naoa_ext::AbstractVector{Float} : angles of attack for modified polar, in radians\ncl_ext::AbstractVector{Float} : modified lift coefficients\ncd_ext::AbstractVector{Float} : modified drag coefficients\n\n\n\n\n\n","category":"method"},{"location":"C4Blade/corrections/#DuctAPE.C4Blade.transonic_drag_addition!-NTuple{4, Any}","page":"Polar Modification","title":"DuctAPE.C4Blade.transonic_drag_addition!","text":"transonic_drag_addition!(\n cd,\n cl,\n clcdmin,\n mach;\n mcrit=0.7,\n cdmfactor=10.0,\n clmfactor=0.25,\n mexp=3.0,\n cdmdd=0.0020,\n cdmstall=0.1000,\n absdx=0.0625,\n blend_hardness=50,\n)\n\nSmoothed, vecotrized, in-place version of transonic_drag_addition.\n\nDifferent Arguments:\n\ncd::AbstractVector{Float} : vector of drag coefficients\ncl::AbstractVector{Float} : vector of lift coefficients\n\nAdditional Keyword Argument:\n\nblend_hardness::Float=50 : hardenss of smoothing blends\n\n\n\n\n\n","category":"method"},{"location":"C4Blade/corrections/#DuctAPE.C4Blade.transonic_drag_addition-NTuple{4, Any}","page":"Polar Modification","title":"DuctAPE.C4Blade.transonic_drag_addition","text":"transonic_drag_addition(\n cd,\n cl,\n clcdmin,\n mach;\n mcrit=0.7,\n cdmfactor=10.0,\n clmfactor=0.25,\n mexp=3.0,\n cdmdd=0.0020,\n cdmstall=0.1000,\n absdx=0.0625,\n)\n\nDrag augmentation due to transonic effects as found in XROTOR and DFDC. Note this is nominally applied to DFDC airfoil evaluation.\n\nArguments:\n\ncd::Float : input drag coefficient\ncl::Float : input lift coefficient\nclcdmin::Float : lift coefficient at minimum drag coefficient.\nmach::Float : Mach number\n\nKeyword Arguments\n\nmcrit::Float=0.7 : critical Mach number\ncdmfactor::Float=10.0 : factor hard coded in XROTOR and DFDC\nclmfactor::Float=0.25 : factor hard coded in XROTOR and DFDC\nmexp::Float=3.0 : factor hard coded in XROTOR and DFDC\ncdmstall::Float=0.1000 : factor hard coded in XROTOR and DFDC\nabsdx::Float=0.0625 : smoothing factor for smooth absolute value function\n\nReturns:\n\ncl_corr:Float : corrected lift coefficient\n\n\n\n\n\n","category":"method"},{"location":"C4Blade/corrections/#DuctAPE.C4Blade.transonic_lift_limiter-NTuple{6, Any}","page":"Polar Modification","title":"DuctAPE.C4Blade.transonic_lift_limiter","text":"transonic_lift_limiter(\n cl,\n mach,\n clcdmin,\n clmax,\n clmin,\n dclda;\n mcrit=0.7,\n dcl_stall=0.1,\n dclda_stall=0.1,\n cdmfactor=10.0,\n clmfactor=0.25,\n mexp=3.0,\n cdmstall=0.1000,\n)\n\nAirfoil polar corrections due to transonic effects as found in XROTOR and DFDC. Note that this correction is done nominally in the DFDC airfoil evaluation.\n\nArguments:\n\ncl::Float : input lift coefficient\nmach::Float : Mach number\nclcdmin::Float : lift coefficient at minimum drag coefficient.\nclmax::Float : maximum lift coefficient\nclmin::Float : minimum lift coefficient\ndclda::Float : lift-curve slope\nmcrit::Float=0.7 : critical Mach number\ndcl_stall::Float=0.1 : cl increment from initial to total stall\ndclda_stall::Float=0.1 : lift curve slope post-stall (1/radians)\ncdmfactor::Float=10.0 : factor hard coded in XROTOR and DFDC\nclmfactor::Float=0.25 : factor hard coded in XROTOR and DFDC\nmexp::Float=3.0 : factor hard coded in XROTOR and DFDC\ncdmstall::Float=0.1000 : factor hard coded in XROTOR and DFDC\n\nReturns:\n\ncl_corr:Float : corrected lift coefficient\n\n\n\n\n\n","category":"method"},{"location":"C4Blade/corrections/#DuctAPE.C4Blade.transonic_lift_limiter_smooth!-NTuple{6, Any}","page":"Polar Modification","title":"DuctAPE.C4Blade.transonic_lift_limiter_smooth!","text":"transonic_lift_limiter_smooth!(\n cl,\n mach,\n clcdmin,\n clmax,\n clmin,\n dclda;\n mcrit=0.7,\n dcl_stall=0.1,\n dclda_stall=0.1,\n cdmfactor=10.0,\n clmfactor=0.25,\n mexp=3.0,\n cdmstall=0.1000,\n blend_hardness=50,\n)\n\nSmoothed, vectorized, in-place version of transonic_lift_limiter.\n\nDifferent Arguments:\n\ncl::AbstractVector{Float} : vector of lift coefficients\n\nAdditional Keyword Argument:\n\nblend_hardness::Float=50 : hardenss of smoothing blends\n\n\n\n\n\n","category":"method"},{"location":"DuctAPE/api/private_postprocess/","page":"Postprocess","title":"Postprocess","text":"DuctAPE.post_process","category":"page"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.post_process","page":"Postprocess","title":"DuctAPE.post_process","text":"post_process(\n solver_options,\n converged_states,\n prepost_containers,\n solve_container_caching,\n solve_parameter_cache_vector,\n solve_parameter_cache_dims,\n operating_point,\n reference_parameters,\n A_bb_LU,\n airfoils,\n idmaps,\n problem_dimensions,\n multipoint_index;\n write_outputs=options.write_outputs,\n outfile=options.outfile,\n checkoutfileexists=options.checkoutfileexists,\n output_tuple_name=options.output_tuple_name,\n verbose=options.verbose,\n)\n\nPost-process a converged nonlinear solve solution.\n\nArguments\n\nsolver_options::SolverOptionsType : A SolverOptionsType object (also used for dispatch)\nconverged_states::Vector{Float} : the converged state variables\nprepost_containers::NamedTuple : the named tuple containing pre-allocated containers for the pre- and post-processing intermediate calculations\nsolve_container_cache::NamedTuple : the cache and dimensions for intermediate values in the residual calculation\nsolve_parameter_cache_vector::Vector{Float} : the applicably typed cache vector for the solve parameters\nsolve_parameter_cache_dims::NamedTuple : the dimensions of the solver parameters\noperating_point::OperatingPoint : the operating point being analyzed\nreference_parameters::ReferenceParameters : a ReferenceParameters object\nA_bb_LU::LinearAlgebra.LU : LinearAlgebra LU factorization of the LHS matrix\nairfoils::Vector{AFType} : A matrix of airfoil types associated with each of the blade elements\nidmaps::NamedTuple : A named tuple containing index mapping used in bookkeeping throughout solve and post-process\nproblem_dimensions::ProblemDimensions : A ProblemDimensions object\n\nKeyword Arguments\n\nmultipoint_index::Vector{Int} : a one-dimensional vector containing the index of which multipoint analysis operating point is being analyzed.\nwrite_outputs=options.write_outputs::Vector{Bool} : a vector with the same length as number of multipoints indicating if the outputs should be saved.\noutfile=options.outfile::Vector{String} : a vector of file paths/names for where outputs should be written\ncheckoutfileexists=options.checkoutfileexists::Bool : a flag for whether existing files should be checked for or if blind overwriting is okay.\noutput_tuple_name=options.output_tuple_name::Vector{String} : the variable name(s) of the named tuple of outputs to be written.\nverbose::Bool=false : flag to print verbose statements\n\nReturns\n\nouts::NamedTuple : A named tuple containing all the output values including\n\nbodies\npanel_strengths\ntotal_thrust\nthrust_comp\ninduced_efficiency\ncp_in\ncp_out\ncp_casing_in\ncp_casing_out\ncasing_zpts\ncp_nacelle_in\ncp_nacelle_out\nnacelle_zpts\ncp_centerbody_in\ncp_centerbody_out\ncenterbody_zpts\nVtot_in\nVtot_out\nVtot_prejump\nvtot_body\nvtot_jump\nvtot_wake\nvtot_rotors\nVtan_in\nVtan_out\nvtan_casing_in\nvtan_casing_out\nvtan_nacelle_in\nvtan_nacelle_out\nvtan_centerbody_in\nvtan_centerbody_out\nrotors\ncirculation\npanel_strengths\nefficiency\ninviscid_thrust\ninviscid_thrust_dist\nviscous_thrust\nviscous_thrust_dist\nthrust\nCT\ninviscid_torque\ninviscid_torque_dist\nviscous_torque\nviscous_torque_dist\ntorque\nCQ\ninviscid_power\ninviscid_power_dist\nviscous_power\nviscous_power_dist\npower\nCP\ncl\ncd\nalpha\nbeta1\nblade_normal_force_per_unit_span\nblade_tangential_force_per_unit_span\nwake\npanel_strengths\ntotals\nthrust\ntorque\npower\nCT\nCQ\nCP\ntotal_efficiency\nideal_efficiency\nintermediate_solve_values\nvz_rotor\nvtheta_rotor\nCm_wake\nreynolds\nmach\nCz_rotor\nCtheta_rotor\nCmag_rotor\nGamma_tilde\nH_tilde\ndeltaGamma2\ndeltaH\nvz_wake\nvr_wake\nCm_avg\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#Velocities","page":"Postprocess","title":"Velocities","text":"","category":"section"},{"location":"DuctAPE/api/private_postprocess/","page":"Postprocess","title":"Postprocess","text":"DuctAPE.get_body_tangential_velocities\nDuctAPE.get_body_tangential_velocities!\nDuctAPE.calculate_vtheta\nDuctAPE.calculate_induced_velocities_on_bodywake","category":"page"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.get_body_tangential_velocities","page":"Postprocess","title":"DuctAPE.get_body_tangential_velocities","text":"get_body_tangential_velocities(\n gamb,\n gamw,\n sigr,\n ivb,\n Vinf,\n totnode,\n totpanel,\n nnode,\n npanel,\n tangent,\n controlpoints,\n endpanelidxs,\n wake_panel_ids_along_centerbody_wake_interface,\n wake_panel_ids_along_casing_wake_interface,\n centerbody_panel_ids_along_centerbody_wake_interface,\n duct_panel_ids_along_casing_wake_interface,\n num_casing_panels,\n)\n\nGet the tangential velocities along the body surfaces.\n\nArguments\n\ngamb::Vector{Float} : the body panel strengths\ngamw::Vector{Float} : the wake panel strengths\nsigr::Vector{Float} : the rotor panel strengths\nivb::NamedTuple : the unit induced velocities on the bodies\nVinf::Vector{Float} : one element vector containing the freestream magnitude\ntotnode::Int : total number of nodes between all bodies\ntotpanel::Int : total number of panels between all bodies\nnnode::Vector{Int} : number of nodes in each body\nnpanel::Vector{Int} : number of panels in each body.\ntangent::Matrix{Float} : unit tangent vectors for each panel\ncontrolpoints::Matrix{Float} : control point locations for each panel\nendpanelidxs::Matrix{Int} : the indices of the first and last panels for each body\nwake_panel_ids_along_centerbody_wake_interface::Vector{Int} : the indices of the wake panels coincident with the centerbody panels\nwake_panel_ids_along_casing_wake_interface::Vector{Int} : the indices of the wake panels coincident with the duct casing (inner surface) panels\ncenterbody_panel_ids_along_centerbody_wake_interface::Vector{Int} : the indices of the centerbody panels coincident with the wake panels\nduct_panel_ids_along_casing_wake_interface::Vector{Int} : the indices of the duct panels coincident with the wake panels\nnum_casing_panels::Int : the number of panels between the leading and trailing edge of the duct on the duct inner side (casing)\n\nReturns\n\nvtan_tuple::NamedTuple : a named tuple containing the body tangential surface velocities and various useful breakdowns thereof.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.get_body_tangential_velocities!","page":"Postprocess","title":"DuctAPE.get_body_tangential_velocities!","text":"function getbodytangentialvelocities!( vtantuple, gamb, gamw, sigr, ivb, Vinf, totnode, totpanel, nnode, npanel, tangent, controlpoints, endpanelidxs, wakepanelidsalongcenterbodywakeinterface, wakepanelidsalongcasingwakeinterface, centerbodypanelidsalongcenterbodywakeinterface, ductpanelidsalongcasingwakeinterface, zpts, )\n\nIn-place version of get_body_tangential_velocities.\n\nAdditional Arguments\n\nzpts::NamedTuple : a named tuple containing the z-coordinates of the control points of the duct casing, duct nacelle, and centerbody.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.calculate_vtheta","page":"Postprocess","title":"DuctAPE.calculate_vtheta","text":"calculate_vtheta(Gamma_tilde, r)\n\nCalculate tangential velocity for a given net circulation and radial location\n\nArguments\n\nGamma_tilde::Matrix{Float} : Sum of upstream circulation values\nr::Matrix{Float} : blade element radial positions\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.calculate_induced_velocities_on_bodywake","page":"Postprocess","title":"DuctAPE.calculate_induced_velocities_on_bodywake","text":"calculate_induced_velocities_on_bodywake(\n vz_w, vr_w, gamw, vz_r, vr_r, sigr, vz_b, vr_b, gamb, Vinf\n)\n\nCalculate the induced velocities on one of the body wakes (unit velocity inputs determine which one)\n\nArguments\n\nvz_w::Matrix{Float} : unit axial induced velocity of the wake onto the body wake\nvr_w::Matrix{Float} : unit radial induced velocity of the wake onto the body wake\ngamw::Vector{Float} : wake panel strengths\nvz_r::Matrix{Float} : unit axial induced velocity of the rotor onto the body wake\nvr_r::Matrix{Float} : unit radial induced velocity of the rotor onto the body wake\nsigr::Vector{Float} : rotor panel strengths\nvz_b::Matrix{Float} : unit axial induced velocity of the bodies onto the body wake\nvr_b::Matrix{Float} : unit radial induced velocity of the bodies onto the body wake\ngamb::Vector{Float} : body panel strengths\nVinf::Vector{Float} : one element vector containing the velocity magnitude\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#Pressures","page":"Postprocess","title":"Pressures","text":"","category":"section"},{"location":"DuctAPE/api/private_postprocess/","page":"Postprocess","title":"Postprocess","text":"DuctAPE.steady_cp\nDuctAPE.steady_cp!\nDuctAPE.calculate_entropy_jumps\nDuctAPE.calculate_rotor_jumps\nDuctAPE.delta_cp\nDuctAPE.calculate_body_delta_cp!\nDuctAPE.calculate_bodywake_delta_cp\nDuctAPE.get_body_cps\nDuctAPE.get_body_cps!\nDuctAPE.get_bodywake_cps\nDuctAPE.forces_from_pressure\nDuctAPE.forces_from_pressure!\nDuctAPE.forces_from_TEpanels!","category":"page"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.steady_cp","page":"Postprocess","title":"DuctAPE.steady_cp","text":"steady_cp(Vs, Vinf, Vref)\n\nCalculate steady pressure coefficients for a given surface velocity.\n\nArguments\n\nVs::Vector{Float} : the surface velocities\nVinf::Vector{Float} : one element vector with freestream mangnitude\nVref::Vector{Float} : one element vector with reference velocity used for non-dimensionalization\n\nReturns\n\ncp::Vector{Float} : the steady pressure coefficients\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.steady_cp!","page":"Postprocess","title":"DuctAPE.steady_cp!","text":"steady_cp!(cp, Vs, Vinf, Vref)\n\nIn-place verison of steady_cp.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.calculate_entropy_jumps","page":"Postprocess","title":"DuctAPE.calculate_entropy_jumps","text":"calculate_entropy_jumps(sigr, Cz_rotor)\n\nCalculate jumps in entropy across the disks.\n\nArguments\n\nsigr::Matrix{Float} : rotor source panel strengths\nCz_rotor::Vector{Float} : absolute axial velocity on rotor blade elements\n\nReturns\n\ndeltaS::Vector{Float} : entropy jump across rotor disks\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.calculate_rotor_jumps","page":"Postprocess","title":"DuctAPE.calculate_rotor_jumps","text":"calculate_rotor_jumps(Gamr, Omega, B, sigr, Cz_rotor)\n\nCalculate net circulation and enthalpy and entropy disk jumps\n\nArguments\n\nGamr::Matrix{Float} : Blade element circulation strengths\nOmega::Vector{Float} : rotor rotation rates\nB::Vector{Float} : blade count for each rotor (usually integers but could be a float)\nsigr::Matrix{Float} : rotor source panel strengths\nCz_rotor::Vector{Float} : absolute axial velocity on rotor blade elements\n\nReturns\n\nGamma_tilde::Matrix{Float} : net upstream circulation\nHtilde::Matrix{Float} : net upstream enthalpy jumps\nStilde::Matrix{Float} : net upstream entropy jumps\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.delta_cp","page":"Postprocess","title":"DuctAPE.delta_cp","text":"delta_cp(deltaH, deltaS, Ctheta, Vref)\n\nCalculate change in pressure coefficient aft of rotor, due to rotor\n\nArguments\n\ndeltaH::Vector{Float} : Enthalpy jumps across disks\ndeltaS::Vector{Float} : Entropy jumps across disks`\nCtheta::Vector{Float} : tangenetial velocity\nVref::Vector{Float} : reference velocity for non-dimensionalization\n\nReturns\n\ndelta_cp::Vector{Float} : pressure rises due to rotor disks\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.calculate_body_delta_cp!","page":"Postprocess","title":"DuctAPE.calculate_body_delta_cp!","text":"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)\n\nAugment surface pressure by change in pressure coefficient due to rotors specifically on the body panels aft of the rotors.\n\nArguments\n\ncp::Vector{Float} : steady pressure coeffients, modified in-place to include rotor effects.\nGamr::Matrix{Float} : Blade element circulation strengths\nsigr::Matrix{Float} : rotor source panel strengths\nCz_rotor::Vector{Float} : absolute axial velocity on rotor blade elements\nVref::Vector{Float} : one element vector with reference velocity used for non-dimensionalization\nOmega::Vector{Float} : rotor rotation rates\nB::Vector{Float} : blade count for each rotor (usually integers but could be a float)\ncpr::Vector{Float} : control point radial positions of body panels\ncasing_panel_ids_aft_of_rotors::Vector{Int} : duct indices of control point radial positions aft of rotors\ncenterbody_panel_ids_aft_of_rotors::Vector{Int} : centerbody indices of control point radial positions aft of rotors\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.calculate_bodywake_delta_cp","page":"Postprocess","title":"DuctAPE.calculate_bodywake_delta_cp","text":"calculate_bodywake_delta_cp(Gamr, sigr, Cz_rotor, Vref, Omega, B, cpr; body=\"duct\")\n\nCalculate change in pressure coefficient due to rotors specifically on the body wakes\n\nArguments\n\nGamr::Matrix{Float} : Blade element circulation strengths\nsigr::Matrix{Float} : rotor source panel strengths\nCz_rotor::Vector{Float} : absolute axial velocity on rotor blade elements\nVref::Vector{Float} : one element vector with reference velocity used for non-dimensionalization\nOmega::Vector{Float} : rotor rotation rates\nB::Vector{Float} : blade count for each rotor (usually integers but could be a float)\ncpr::Vector{Float} : control point radial positions of body wake \"panels\"\n\nKeyword Arguments\n\nbody::String=\"duct\" : flag as to whether the body in question is a duct or centerbody.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.get_body_cps","page":"Postprocess","title":"DuctAPE.get_body_cps","text":"getbodycps( Vtanin, Vtanout, Gamr, sigr, Czrotor, Vinf, Vref, B, Omega, casingpanelidsaftofrotors, centerbodypanelidsaftof_rotors, controlpoints, endpanelidxs, zpts, )\n\nDescription\n\nArguments\n\nVtan_in::Vector{Float} : Tangential velocity on the inside of the body panels\nVtan_out::Vector{Float} : Tangential velocity on the outside of the body panels\nGamr::Matrix{Float} : Blade element circulation strengths\nsigr::Matrix{Float} : rotor source panel strengths\nCz_rotor::Vector{Float} : absolute axial velocity on rotor blade elements\nVinf::Vector{Float} : one element vector with freestream mangnitude\nVref::Vector{Float} : one element vector with reference velocity used for non-dimensionalization\nB::Vector{Float} : blade count for each rotor (usually integers but could be a float)\nOmega::Vector{Float} : rotor rotation rates\ncasing_panel_ids_aft_of_rotors::Vector{Int} : duct indices of control point radial positions aft of rotors\ncenterbody_panel_ids_aft_of_rotors::Vector{Int} : centerbody indices of control point radial positions aft of rotors\ncontrolpoints::Matrix{Float} : control point locations for each panel\nendpanelidxs::Matrix{Int} : the indices of the first and last panels for each body\nzpts::NamedTuple : a named tuple containing the z-coordinates of the control points of the duct casing, duct nacelle, and centerbody.\n\nReturns\n\ncp_tuple::NamedTuple : body surface velocities and various useful breakdowns thereof.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.get_body_cps!","page":"Postprocess","title":"DuctAPE.get_body_cps!","text":"get_body_cps!(\n cp_tuple,\n Vtan_in,\n Vtan_out,\n Gamr,\n sigr,\n Cz_rotor,\n Vinf,\n Vref,\n B,\n Omega,\n duct_panel_ids_aft_of_rotors,\n centerbody_panel_ids_aft_of_rotors,\n controlpoints,\n endpanelidxs,\n zpts,\n)\n\nIn-place version of get_body_cps.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.get_bodywake_cps","page":"Postprocess","title":"DuctAPE.get_bodywake_cps","text":"get_bodywake_cps(\n Gamr,\n vz_w,\n vr_w,\n gamw,\n vz_r,\n vr_r,\n sigr,\n vz_b,\n vr_b,\n gamb,\n panels,\n Cz_rotor,\n Omega,\n B,\n Vinf,\n Vref;\n body=\"duct\",\n)\n\nCalculate the pressure coefficient distributions on one of the body wakes\n\nArguments\n\nGamr::Matrix{Float} : Blade element circulation strengths\nvz_w::Matrix{Float} : unit axial induced velocity of the wake onto the body wake\nvr_w::Matrix{Float} : unit radial induced velocity of the wake onto the body wake\ngamw::Vector{Float} : wake panel strengths\nvz_r::Matrix{Float} : unit axial induced velocity of the rotor onto the body wake\nvr_r::Matrix{Float} : unit radial induced velocity of the rotor onto the body wake\nsigr::Vector{Float} : rotor panel strengths\nvz_b::Matrix{Float} : unit axial induced velocity of the bodies onto the body wake\nvr_b::Matrix{Float} : unit radial induced velocity of the bodies onto the body wake\ngamb::Vector{Float} : body panel strengths\npanels::NamedTuple : A named tuple containing bodywake \"panel\" geometries\nCz_rotor::Vector{Float} : absolute axial velocity on rotor blade elements\nOmega::Vector{Float} : rotor rotation rates\nB::Vector{Float} : blade count for each rotor (usually integers but could be a float)\nVinf::Vector{Float} : one element vector containing the velocity magnitude\nVref::Vector{Float} : one element vector with reference velocity used for non-dimensionalization\n\nKeyword Arguments\n\nbody::String=\"duct\" : flag as to whether the body in question is a duct or centerbody.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.forces_from_pressure","page":"Postprocess","title":"DuctAPE.forces_from_pressure","text":"forces_from_pressure(cp_in, cp_out, panels; rhoinf=1.225, Vref=1.0)\n\nCalculate dimensional and non-dimensional axial force on a single body\n\nArguments\n\ncp_in::Vector{Float} : pressure coefficient on inside of body surfaces\ncp_out::Vector{Float} : pressure coefficients on outside of body surfaces\npanels::NamedTuple : A named tuple containing panel geometry information\n\nKeyword Arguments\n\nrhoinf::Float=1.225 : reference density for non-dimensionalization\nVref::Float=1.0 : reference velocity for non-dimensionalization\n\nReturns\n\nthrust::Vector{Float} : dimensional axial force\nforce_coeff::Vector{Float} : non-dimensional axial force\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.forces_from_pressure!","page":"Postprocess","title":"DuctAPE.forces_from_pressure!","text":"forces_from_pressure!(CFx, cfx, cp_in, cp_out, panels; rhoinf=1.225, Vref=1.0)\n\nIn-place version of forces_from_pressure.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.forces_from_TEpanels!","page":"Postprocess","title":"DuctAPE.forces_from_TEpanels!","text":"forces_from_TEpanels!(\n thrust, force_coeff, cp_in, cp_out, panels; rhoinf=1.225, Vref=1.0\n)\n\nAdd force induced by trailing edge gap panels to total forces.\n\nArguments\n\nthrust::Vector{Float} : dimensional axial force\nforce_coeff::Vector{Float} : non-dimensional axial force\ncp_in::Vector{Float} : pressure coefficient on inside of body surfaces\ncp_out::Vector{Float} : pressure coefficients on outside of body surfaces\npanels::NamedTuple : A named tuple containing panel geometry information\n\nKeyword Arguments\n\nrhoinf::Float=1.225 : reference density for non-dimensionalization\nVref::Float=1.0 : reference velocity for non-dimensionalization\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#Rotor-Performance","page":"Postprocess","title":"Rotor Performance","text":"","category":"section"},{"location":"DuctAPE/api/private_postprocess/","page":"Postprocess","title":"Postprocess","text":"DuctAPE.inviscid_rotor_thrust\nDuctAPE.inviscid_rotor_thrust!\nDuctAPE.viscous_rotor_thrust\nDuctAPE.viscous_rotor_thrust!\nDuctAPE.inviscid_rotor_torque\nDuctAPE.inviscid_rotor_torque!\nDuctAPE.viscous_rotor_torque\nDuctAPE.viscous_rotor_torque!\nDuctAPE.rotor_power\nDuctAPE.rotor_power!\nDuctAPE.get_total_efficiency\nDuctAPE.get_total_efficiency!\nDuctAPE.get_induced_efficiency\nDuctAPE.get_induced_efficiency!\nDuctAPE.get_ideal_efficiency\nDuctAPE.tqpcoeff\nDuctAPE.tqpcoeff!\nDuctAPE.get_blade_loads\nDuctAPE.get_blade_loads!","category":"page"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.inviscid_rotor_thrust","page":"Postprocess","title":"DuctAPE.inviscid_rotor_thrust","text":"inviscid_rotor_thrust(Ctheta_rotor, Gamma_tilde, rotor_panel_length, rhoinf)\n\nCalculate inviscid rotor thrust.\n\nArguments\n\nCtheta_rotor::Vector{Float} : Absolute tangential velocity on rotor blade elements\nGamma_tilde::Matrix{Float} : net upstream rotor circulation\nrotor_panel_length::Vector{Float} : dimensional lengths on which blade element values apply\nrhoinf::Float : freestream density\n\nReturns\n\nTinv::Vector{Float} : inviscid dimensional thrust\ndTi::Vector{Float} : inviscid dimensional thrust distribution\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.inviscid_rotor_thrust!","page":"Postprocess","title":"DuctAPE.inviscid_rotor_thrust!","text":"inviscid_rotor_thrust!(\n Tinv, dTi, Ctheta_rotor, Gamma_tilde, rotor_panel_length, rhoinf\n)\n\nIn-place version of inviscid_rotor_thrust.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.viscous_rotor_thrust","page":"Postprocess","title":"DuctAPE.viscous_rotor_thrust","text":"viscous_rotor_thrust(\n Cz_rotor, Cmag_rotor, B, chord, rotor_panel_length, cd, rhoinf\n)\n\nCalculate visous rotor \"thrust.\"\n\nArguments\n\nCz_rotor::Vector{Float} : Absolute axial velocity on rotor blade elements\nCmag_rotor::Vector{Float} : Absolute inflow velocity magnitude on rotor blade elements\nB::Vector{Float} : blade count for each rotor (usually integers but could be a float)\nchord::Vector{Float} : blade element chord lengths\nrotor_panel_length::Vector{Float} : dimensional lengths on which blade element values apply\ncd::Vector{Float} : drag coefficient for each blade element\nrhoinf::Float : freestream density\n\nReturns\n\nTvisc::Vector{Float} : viscous dimensional thrust\ndTv::Vector{Float} : viscous dimensional thrust distribution\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.viscous_rotor_thrust!","page":"Postprocess","title":"DuctAPE.viscous_rotor_thrust!","text":"viscous_rotor_thrust!(\n Tvisc, dTv, Cz_rotor, Cmag_rotor, B, chord, rotor_panel_length, cd, rhoinf\n)\n\nIn-place version of viscous_rotor_thrust.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.inviscid_rotor_torque","page":"Postprocess","title":"DuctAPE.inviscid_rotor_torque","text":"inviscid_rotor_torque(\n Cz_rotor, rotor_panel_center, rotor_panel_length, Gamma_tilde, rhoinf\n)\n\nCalculate inviscid rotor torque.\n\nArguments\n\nCz_rotor::Vector{Float} : Absolute axial velocity on rotor blade elements\nrotor_panel_center::Vector{Float} : radial location of rotor blade elements\nrotor_panel_length::Vector{Float} : dimensional lengths on which blade element values apply\nGamma_tilde::Matrix{Float} : net upstream rotor circulation\nrhoinf::Float : freestream density\n\nReturns\n\nQinv::Vector{Float} : inviscid dimensional thrust\ndQi::Vector{Float} : inviscid dimensional thrust distribution\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.inviscid_rotor_torque!","page":"Postprocess","title":"DuctAPE.inviscid_rotor_torque!","text":"inviscid_rotor_torque!(\n Qinv, dQi, Cz_rotor, rotor_panel_center, rotor_panel_length, Gamma_tilde, rhoinf\n)\n\nIn-place version of inviscid_rotor_torque.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.viscous_rotor_torque","page":"Postprocess","title":"DuctAPE.viscous_rotor_torque","text":"viscous_rotor_torque(\n Ctheta_rotor, Cmag_rotor, B, chord, rotor_panel_center, rotor_panel_length, cd, rhoinf\n)\n\nCalculate viscous rotor torque.\n\nArguments\n\nCtheta_rotor::Vector{Float} : Absolute tangential velocity on rotor blade elements\nCmag_rotor::Vector{Float} : Absolute inflow velocity magnitude on rotor blade elements\nB::Vector{Float} : blade count for each rotor (usually integers but could be a float)\nchord::Vector{Float} : blade element chord lengths\nrotor_panel_center::Vector{Float} : radial location of rotor blade elements\nrotor_panel_length::Vector{Float} : dimensional lengths on which blade element values apply\ncd::Vector{Float} : drag coefficient for each blade element\nrhoinf::Float : freestream density\n\nReturns\n\nQvisc::Vector{Float} : viscous dimensional thrust\ndQv::Vector{Float} : viscous dimensional thrust distribution\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.viscous_rotor_torque!","page":"Postprocess","title":"DuctAPE.viscous_rotor_torque!","text":"viscous_rotor_torque!(\n Qvisc,\n dQv,\n Ctheta_rotor,\n Cmag_rotor,\n B,\n chord,\n rotor_panel_center,\n rotor_panel_length,\n cd,\n rhoinf\n)\n\nIn-place version of viscous_rotor_torque.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.rotor_power","page":"Postprocess","title":"DuctAPE.rotor_power","text":"rotor_power(Q, dQ, Omega)\n\nCalculate power from torque and rotation rate.\n\nArguments\n\nQ::Vector{Float} : dimensional thrust\ndQ::Vector{Float} : dimensional thrust distribution\nOmega::Vector{Float} : rotor rotation rates\n\nReturns\n\nP::Vector{Float} : dimensional power\ndP::Vector{Float} : dimensional thrust distribution\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.rotor_power!","page":"Postprocess","title":"DuctAPE.rotor_power!","text":"rotor_power!(P, dP, Q, dQ, Omega)\n\nIn-place version of rotor_power.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.get_total_efficiency","page":"Postprocess","title":"DuctAPE.get_total_efficiency","text":"get_total_efficiency(total_thrust, total_power, Vinf)\n\nGet total efficiency.\n\nArguments\n\ntotal_thrust::Vector{Float} : total thrust\ntotal_power::Vector{Float} : total power\nVinf::Vector{Float} : one element vector freestream velocity magnitude\n\nReturns\n\n`total_efficiency::Vector{Float} : total efficiency\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.get_total_efficiency!","page":"Postprocess","title":"DuctAPE.get_total_efficiency!","text":"get_total_efficiency!(eta, total_thrust, total_power, Vinf)\n\nIn-place version of get_total_efficiency.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.get_induced_efficiency","page":"Postprocess","title":"DuctAPE.get_induced_efficiency","text":"get_induced_efficiency(Tinv, Tduct, Pinv, Vinf)\n\nGet rotor efficiency induced by presence of the duct.\n\nArguments\n\nTinv::Vector{Float} : inviscid dimensional thrust\nTduct::Vector{Float} : duct thrust\nPinv::Vector{Float} : inviscid dimensional power\nVinf::Vector{Float} : one element vector freestream velocity magnitude\n\nReturns\n\ninduced_efficiency::Vector{Float} : rotor efficiency induced by duct\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.get_induced_efficiency!","page":"Postprocess","title":"DuctAPE.get_induced_efficiency!","text":"get_induced_efficiency!(eta_inv, Tinv, Tduct, Pinv, Vinf)\n\nIn-place version of get_induced_efficiency.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.get_ideal_efficiency","page":"Postprocess","title":"DuctAPE.get_ideal_efficiency","text":"get_ideal_efficiency(total_thrust, rhoinf, Vinf, Rref)\n\nCompute ducted fan ideal efficiency\n\nArguments\n\ntotal_thrust::Vector{Float} : total thrust from rotors and duct\nrhoinf::Float : freestream density\nVinf::Vector{Float} : one element vector freestream velocity magnitude\nRref::Vector{Float} : one element vector reference rotor tip radius\n\nReturns\n\nideal_efficiency::Vector{Float} : ideal ducted fan efficiency\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.tqpcoeff","page":"Postprocess","title":"DuctAPE.tqpcoeff","text":"tqpcoeff(thrust, torque, power, rhoinf, Omega, Rref)\n\nCalculate non-dimensional thrust, torque, and power coefficients\n\nArguments\n\nthrust::Vector{Float} : dimensional thrust\ntorque::Vector{Float} : dimensional torque\npower::Vector{Float} : dimensional power\nrhoinf::Float : freestream density\nOmega::Vector{Float} : rotor rotation rates\nRref::Vector{Float} : one element vector reference rotor tip radius\n\nReturns\n\nCT::Vector{Float} : thrust coefficient\nCQ::Vector{Float} : torque coefficient\nCP::Vector{Float} : power coefficient\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.tqpcoeff!","page":"Postprocess","title":"DuctAPE.tqpcoeff!","text":"tqpcoeff!(CT, CQ, CP, thrust, torque, power, rhoinf, Omega, Rref)\n\nIn-place version of tqpcoeff.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.get_blade_loads","page":"Postprocess","title":"DuctAPE.get_blade_loads","text":"get_blade_loads(Cmag_rotor, beta1, cl, cd, chords, rhoinf)\n\nGet loading along blades.\n\nArguments\n\nCmag_rotor::Vector{Float} : blade element inflow magnitudes\nbeta1::Vector{Float} : blade element inflow angles\ncl::Vector{Float} : blade element lift coefficients\ncd::Vector{Float} : blade element drag coefficients\nchords::Vector{Float} : blade element chord lengths\nrhoinf::Vector{Float} : one element freestream density\n\nReturns\n\nNp::Vector{Float} : blade loading per unit length in the normal direction: N'\nTp::Vector{Float} : blade loading per unit length in the tangential direction: T'\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.get_blade_loads!","page":"Postprocess","title":"DuctAPE.get_blade_loads!","text":"get_blade_loads!(Np, Tp, Cmag_rotor, beta1, cl, cd, chords, rhoinf, cache)\n\nIn-place version of get_blade_loads.\n\n\n\n\n\n","category":"function"},{"location":"C4Blade/intro/#C\\textrm{4}Blade-[[C](#)ascade-[C](#)ompatible-[CCBlade](https://flow.byu.edu/CCBlade.jl/stable/)]","page":"Intro","title":"C^textrm4Blade [Cascade Compatible CCBlade]","text":"","category":"section"},{"location":"C4Blade/intro/","page":"Intro","title":"Intro","text":"C^4Blade is a DuctAPE submodule containing a modified version of CCBlade that includes capabilities for cascade types.","category":"page"},{"location":"DuctAPE/theory/#Theory","page":"Theory","title":"Theory","text":"","category":"section"},{"location":"DuctAPE/theory/","page":"Theory","title":"Theory","text":"For a brief overview of the theory behind DuctAPE, see:","category":"page"},{"location":"DuctAPE/theory/","page":"Theory","title":"Theory","text":"Mehr, J. and Ning, A., \"DuctAPE: A steady-state, axisymmetric ducted fan analysis code designed for gradient-based optimization.,\" AIAA Aviation Forum, July 2024.","category":"page"},{"location":"DuctAPE/theory/","page":"Theory","title":"Theory","text":"For a more thorough dive into the details see this pdf document.","category":"page"},{"location":"#DuctAPE.jl-[[Duct](#)ed-[A](#)xisymmetric-[P](#)ropulsor-[E](#)valuation]","page":"Home","title":"DuctAPE.jl [Ducted Axisymmetric Propulsor Evaluation]","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Author: Judd Mehr","category":"page"},{"location":"","page":"Home","title":"Home","text":"Contributer: Taylor McDonnell","category":"page"},{"location":"","page":"Home","title":"Home","text":"DuctAPE is a code for the aerodynamic evaluation of axisymmetric ducted ducted_rotors 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.","category":"page"},{"location":"#Installation","page":"Home","title":"Installation","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"pkg> add https://github.com/byuflowlab/DuctAPE.jl.git","category":"page"},{"location":"#Documentation","page":"Home","title":"Documentation","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Getting Started will have you up and running quickly.\nThe Advanced Usage tab includes several pages of additional information for customizing your usage.\nThe API tab contains public and private method descriptions.\nThe Theory tab contain several pages on the underlying theory of DuctAPE.\nThe C^4Blade tab contains documentation for the C^4Blade submodule used for airfoil/cascade management within DuctAPE as well as state initialization.","category":"page"},{"location":"#Citing","page":"Home","title":"Citing","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Mehr, J. and Ning, A., \"DuctAPE: A steady-state, axisymmetric ducted fan analysis code designed for gradient-based optimization.,\" AIAA Aviation Forum, July 2024.","category":"page"},{"location":"DuctAPE/tutorial/#Getting-Started","page":"Getting Started","title":"Getting Started","text":"","category":"section"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"Pages = [\"tutorial.md\"]\nDepth = 5","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"The following is a basic tutorial on how to set up and run an analysis of a ducted fan in DuctAPE.","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"include(\"../assets/plots_default.jl\")\ngr()","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"We begin by loading the package:","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"using DuctAPE\nnothing # hide","category":"page"},{"location":"DuctAPE/tutorial/#Assemble-Inputs","page":"Getting Started","title":"Assemble Inputs","text":"","category":"section"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"The next step is to create the input object of type DuctedRotor.","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"DuctAPE.DuctedRotor","category":"page"},{"location":"DuctAPE/tutorial/#DuctAPE.DuctedRotor-DuctAPE-tutorial","page":"Getting Started","title":"DuctAPE.DuctedRotor","text":"DuctedRotor(duct_coordinates, centerbody_coordinates, rotor, paneling_constants)\n\nArguments\n\nduct_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.\ncenterbody_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.\npaneling_constants::PanelingConstants : Constants used in re-paneling the geometry.\nrotor::Rotor : Rotor (and possibly stator) geometric paramters.\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/tutorial/#Body-Geometry","page":"Getting Started","title":"Body Geometry","text":"","category":"section"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"We begin by defining a matrix of coordinates for the duct and another for the centerbody geometries. For example:","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"duct_coordinates = [\n 0.304466 0.158439\n 0.294972 0.158441\n 0.28113 0.158423\n 0.266505 0.158365\n 0.251898 0.158254\n 0.237332 0.158088\n 0.222751 0.157864\n 0.208123 0.157586\n 0.193399 0.157258\n 0.178507 0.156897\n 0.16349 0.156523\n 0.148679 0.156177\n 0.134222 0.155902\n 0.12 0.155721\n 0.106044 0.155585\n 0.092531 0.155498\n 0.079836 0.155546\n 0.067995 0.155792\n 0.057025 0.156294\n 0.046983 0.157103\n 0.037937 0.158256\n 0.029956 0.159771\n 0.02311 0.161648\n 0.017419 0.163862\n 0.012842 0.166404\n 0.009324 0.169289\n 0.006854 0.172546\n 0.005484 0.176154\n 0.005242 0.180005\n 0.006112 0.184067\n 0.00809 0.188086\n 0.011135 0.192004\n 0.015227 0.19579\n 0.020339 0.199393\n 0.026403 0.202735\n 0.033312 0.205736\n 0.040949 0.208332\n 0.049193 0.210487\n 0.057935 0.212174\n 0.067113 0.21339\n 0.076647 0.214136\n 0.086499 0.214421\n 0.09661 0.214255\n 0.10695 0.213649\n 0.117508 0.212618\n 0.12838 0.211153\n 0.139859 0.209267\n 0.151644 0.207051\n 0.163586 0.204547\n 0.175647 0.201771\n 0.187807 0.198746\n 0.20002 0.19549\n 0.212269 0.192017\n 0.224549 0.188335\n 0.236794 0.18447\n 0.249026 0.180416\n 0.261206 0.176188\n 0.273301 0.171796\n 0.28524 0.16727\n 0.29644 0.162842\n 0.304542 0.159526\n]\nnothing # hide","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"centerbody_coordinates = [\n 0.0 0.0\n 0.000586 0.005293\n 0.002179 0.010047\n 0.004736 0.014551\n 0.008231 0.018825\n 0.012632 0.022848\n 0.01788 0.026585\n 0.023901 0.030001\n 0.030604 0.033068\n 0.0379 0.035771\n 0.045705 0.038107\n 0.053933 0.040075\n 0.06254 0.04169\n 0.071451 0.042966\n 0.08063 0.043916\n 0.090039 0.044561\n 0.09968 0.044922\n 0.109361 0.044999\n 0.12 0.044952\n 0.135773 0.04495\n 0.151899 0.04493\n 0.16806 0.044913\n 0.184232 0.044898\n 0.200407 0.044882\n 0.21658 0.044866\n 0.232723 0.044847\n 0.248578 0.044839\n 0.262095 0.044564\n 0.274184 0.043576\n 0.285768 0.041795\n 0.296701 0.039168\n 0.306379 0.035928\n]\nnothing # hide","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"pg = plot( # hide\n duct_coordinates[:, 1], # hide\n duct_coordinates[:, 2]; # hide\n aspectratio=1, # hide\n color=1, # hide\n linewidth=2, # hide\n label=\"Duct\", # hide\n xlabel=\"z\", # hide\n ylabel=\"r\", # hide\n legend=:left, # hide\n) # hide\nplot!( # hide\n pg, # hide\n centerbody_coordinates[:, 1], # hide\n centerbody_coordinates[:, 2]; # hide\n color=2, # hide\n linewidth=2, # hide\n label=\"Center Body\", # hide\n) # hide","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"note: Note\nThe body geometry coordinates must be input as columns of z (axial) and r (radial) coordinates, in that order.","category":"page"},{"location":"DuctAPE/tutorial/#Rotor-Geometry","page":"Getting Started","title":"Rotor Geometry","text":"","category":"section"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"The next step is to assemble an object of type Rotor which contains the geometric information required to define the rotor(s) and their respective blade elements.","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"DuctAPE.Rotor","category":"page"},{"location":"DuctAPE/tutorial/#DuctAPE.Rotor-DuctAPE-tutorial","page":"Getting Started","title":"DuctAPE.Rotor","text":"Rotor(\n B, rotorzloc, r, Rhub, Rtip, chords, twists, tip_gap, airfoils, fliplift\n)\n\nComposite type containing the rotor(s) geometric properties.\n\nNote 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.\n\nArguments\n\nB::AbstractVector{Float} : The number of blades for each rotor. May not be an integer, but usually is.\nrotorzloc::AbstractVector{Float} : Dimensional, axial position of each rotor.\nr::AbstractArray{Float} : Non-dimensional radial locations of each blade element.\nRhub::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.\nRtip::AbstractVector{Float} : Dimensional tip radius of rotor. Is used to determine the radial position of the duct if the autoshiftduct option is selected.\nchords::AbstractArray{Float} : Dimensional chord lengths of the blade elements.\ntwists::AbstractArray{Float} : Blade element angles, in radians.\ntip_gap::AbstractVector{Float} : Currently unused, do not set to anything other than zeros.\nairfoils::AbstractArray{AFType} : Airfoil types describing the airfoil polars for each blade element. Currently only fully tested with C4Blade.DFDCairfoil types.\nfliplift::AbstractVector{Bool} : Flag to indicate if the airfoil lift values should be flipped or not.\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"In this example, we have a single rotor defined as follows.","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"# number of rotors\nB = 5\n\n# rotor axial location\nrotorzloc = 0.12\n\n# rotor tip radius\nRtip = 0.15572081487373543\n\n# rotor hub radius\nRhub = 0.04495252299071941\n\n# non-dimensional blade element radial stations\nr = [\n 0.050491\n 0.061567\n 0.072644\n 0.083721\n 0.094798\n 0.10587\n 0.11695\n 0.12803\n 0.13911\n 0.15018\n] ./ Rtip\n\n# dimensional chord lengths\nchords = [\n 0.089142\n 0.079785\n 0.0713\n 0.063979\n 0.057777\n 0.052541\n 0.048103\n 0.044316\n 0.041061\n 0.038243\n]\n\n# twist angles (from plane of rotation) in radians\ntwists = [\n 69.012\n 59.142\n 51.825\n 46.272\n 41.952\n 38.509\n 35.699\n 33.354\n 31.349\n 29.596\n] .* pi / 180.0\n\n# DFDC-type airfoil object\nafparams = DuctAPE.c4b.DFDCairfoil(;\n alpha0=0.0,\n clmax=1.5,\n clmin=-1.0,\n dclda=6.28,\n dclda_stall=0.5,\n dcl_stall=0.2,\n cdmin=0.012,\n clcdmin=0.1,\n dcddcl2=0.005,\n cmcon=0.0,\n Re_ref=2e5,\n Re_exp=0.35,\n mcrit=0.7,\n)\n\n# all airfoils are the same\nairfoils = fill(afparams, length(r)) # specify the airfoil array\n\n# assemble rotor parameters\nrotor = DuctAPE.Rotor(\n [B],\n [rotorzloc],\n r,\n [Rhub],\n [Rtip],\n chords,\n twists,\n [0.0], # currently only zero tip gaps work.\n airfoils,\n [0.0], # can flip the cl lookups on the fly if desired, say, for stator sections\n)\nnothing # hide","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"plot!( # hide\n pg, # hide\n rotorzloc * ones(length(r)), # hide\n r .* Rtip; # hide\n seriestype=:scatter, # hide\n markersize=3, # hide\n markerstrokewidth=0, # hide\n label=\"Blade Elements\", # hide\n) # hide","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"note: Airfoils\nAirfoil 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.","category":"page"},{"location":"DuctAPE/tutorial/#Paneling-Constants","page":"Getting Started","title":"Paneling Constants","text":"","category":"section"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"The PanelingConstants object contains the constants required for DuctAPE to re-panel the provided geometry into a format compatible with the solve structure. Specifically, the DuctAPE solver makes some assumptions on the relative positioning of the body surfaces relative to the wakes and each other; and this is most easily guarenteed by a re-paneling of the provided body surface geometry. The PanelingConstants object is also used to build all of the preallocated caches inside DuctAPE, which can be done up-front if desired. Note that there is some functionality in place for cases when the user wants to keep their own specified geometry, but this functionality should be used with caution and only by users who are certain their provided geometry is in the compatible format. See the Examples for an example.","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"DuctAPE.PanelingConstants","category":"page"},{"location":"DuctAPE/tutorial/#DuctAPE.PanelingConstants-DuctAPE-tutorial","page":"Getting Started","title":"DuctAPE.PanelingConstants","text":"PanelingConstants(\n nduct_inlet,\n ncenterbody_inlet,\n npanels,\n dte_minus_cbte,\n nwake_sheets,\n wake_length=1.0,\n)\n\nConstants used in re-paneling geometry.\n\nNote 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.\n\nArguments\n\nnduct_inlet::Int : The number of panels to use for the duct inlet (this number is used for both the casing and nacelle re-paneling)\nncenterbody_inlet::Int : The number of panels to use for the centerbody inlet.\nnpanels::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.\ndte_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.\nnwake_sheets::Int : The number of wake sheets to use. Note this will also be setting the number of blade elements to use.\nwake_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.\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"# number of panels for the duct inlet\nnduct_inlet = 30\n\n# number of panels for the center body inlet\nncenterbody_inlet = 30\n\n# number of panels from:\n# - rotor to duct trailing edge\n# - duct trailing edge to center body trailing edge\n# - center body trailing edge to end of wake\nnpanels = [30, 1, 30]\n\n# the duct trailing edge is ahead of the centerbody trailing edge.\ndte_minus_cbte = -1.0\n\n# number of wake sheets (one more than blade elements to use)\nnwake_sheets = 11\n\n# non-dimensional wake length aft of rear-most trailing edge\nwake_length = 0.8\n\n# assemble paneling constants\npaneling_constants = DuctAPE.PanelingConstants(\n nduct_inlet, ncenterbody_inlet, npanels, dte_minus_cbte, nwake_sheets, wake_length\n)\nnothing # hide","category":"page"},{"location":"DuctAPE/tutorial/#Assembling-the-DuctedRotor","page":"Getting Started","title":"Assembling the DuctedRotor","text":"","category":"section"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"We are now posed to construct the DuctedRotor input type.","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"# assemble ducted_rotor object\nducted_rotor = DuctAPE.DuctedRotor(\n duct_coordinates,\n centerbody_coordinates,\n rotor,\n paneling_constants,\n)\nnothing # hide","category":"page"},{"location":"DuctAPE/tutorial/#Operating-Point","page":"Getting Started","title":"Operating Point","text":"","category":"section"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"Next we will assemble the operating point which contains information about the freestream as well as the rotor rotation rate(s).","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"DuctAPE.OperatingPoint","category":"page"},{"location":"DuctAPE/tutorial/#DuctAPE.OperatingPoint-DuctAPE-tutorial","page":"Getting Started","title":"DuctAPE.OperatingPoint","text":"OperatingPoint(Vinf, rhoinf, muinf, asound, Omega)\n\nDuctedRotor operating point information.\n\nArguments\n\nVinf::AbstractVector{Float} : Freestream velocity magnitude (which is only in the axial direction).\nrhoinf::AbstractVector{Float} : Freestream density\nmuinf::AbstractVector{Float} : Freestream viscosity\nasound::AbstractVector{Float} : Freestream speed of sound\nOmega::AbstractVector{Float} : Rotor rototation rate(s)\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"# Freestream\nVinf = 0.0 # hover condition\nrhoinf = 1.226\nasound = 340.0\nmuinf = 1.78e-5\n\n# Rotation Rate\nRPM = 8000.0\nOmega = RPM * pi / 30 # if using RPM, be sure to convert to rad/s\n\n# utilizing the constructor function to put things in vector types\noperating_point = DuctAPE.OperatingPoint(Vinf, rhoinf, muinf, asound, Omega)\nnothing # hide","category":"page"},{"location":"DuctAPE/tutorial/#Reference-Parameters","page":"Getting Started","title":"Reference Parameters","text":"","category":"section"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"The reference parameters are used in the post-processing non-dimensionalizations.","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"DuctAPE.ReferenceParameters","category":"page"},{"location":"DuctAPE/tutorial/#DuctAPE.ReferenceParameters-DuctAPE-tutorial","page":"Getting Started","title":"DuctAPE.ReferenceParameters","text":"ReferenceParameters(Vref, Rref)\n\nReference parameters for post-process non-dimensionalization.\n\nNote 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.\n\nArguments\n\nVref::AbstractVector{Float} : Reference velocity.\nRref::AbstractVector{Float} : Reference rotor tip radius.\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"# reference velocity (close to average axial velocity at rotor in this case)\nVref = 50.0\n\n# reference radius (usually tip radius of rotor)\nRref = Rtip\n\n# assemble reference parameters\nreference_parameters = DuctAPE.ReferenceParameters([Vref], [Rref])\nnothing # hide","category":"page"},{"location":"DuctAPE/tutorial/#Set-Options","page":"Getting Started","title":"Set Options","text":"","category":"section"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"The default options should be sufficient for just starting out and are set through the set_options function.","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"DuctAPE.set_options","category":"page"},{"location":"DuctAPE/tutorial/#DuctAPE.set_options-DuctAPE-tutorial","page":"Getting Started","title":"DuctAPE.set_options","text":"set_options(; kwargs...)\nset_options(multipoint; kwargs...)\n\nSet the options for DuctAPE to use.\n\nNote that the vast majority of the available options are defined through keyword arguments. See the documentation for the various option types for more information.\n\nArguments\n\nmultipoint::AbstractArray{OperatingPoint} : a vector of operating points to use if running a multi-point analysis.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"options = DuctAPE.set_options()","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"For more advanced option selection, see the examples and API reference.","category":"page"},{"location":"DuctAPE/tutorial/#Run-a-Single-Analysis","page":"Getting Started","title":"Run a Single Analysis","text":"","category":"section"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"With the ducted_rotor 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.","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"DuctAPE.analyze(::DuctAPE.DuctedRotor, ::DuctAPE.OperatingPoint, ::DuctAPE.ReferenceParameters, ::DuctAPE.Options)","category":"page"},{"location":"DuctAPE/tutorial/#DuctAPE.analyze-Tuple{DuctedRotor, OperatingPoint, ReferenceParameters, Options}-DuctAPE-tutorial","page":"Getting Started","title":"DuctAPE.analyze","text":"analyze(\n ducted_rotor::DuctedRotor,\n operating_point::OperatingPoint,\n reference_parameters::ReferenceParameters,\n options::Options=set_options();\n prepost_container_caching=nothing,\n solve_parameter_caching=nothing,\n solve_container_caching=nothing,\n return_inputs=false,\n)\n\nAnalyze ducted_rotor, including preprocessing.\n\nArguments\n\nducted_rotor::DuctedRotor : DuctedRotor input object (see docstring for DuctedRotor type)\noperating_point::OperatingPoint : OperatingPoint input object (see docstring for OperatingPoint type)\nreference_parameters::ReferenceParameters : ReferenceParameters input object (see docstring for ReferenceParameters type)\noptions::Options=set_options() : Options object (see set_options and related functions)\n\nKeyword Arguments\n\nprepost_container_caching=nothing : Output of allocate_prepost_container_cache\nsolve_parameter_caching=nothing : Output of allocate_solve_parameter_container_cache\nsolve_container_caching=nothing : Output of allocate_solve_container_cache\nreturn_inputs=false : flag as to whether or not to return the pre-processed inputs\n\nReturns\n\nouts::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.\nins::NamedTuple : Named Tuple of various pre-processed inputs (e.g. panels and body linear system), will only be returned if return_inputs=true\nconvergence_flag : Flag for successful solve convergence\n\n\n\n\n\n","category":"method"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"outs, success_flag = DuctAPE.analyze(ducted_rotor, operating_point, reference_parameters, options)\nnothing # hide","category":"page"},{"location":"DuctAPE/tutorial/#Single-Run-Outputs","page":"Getting Started","title":"Single Run Outputs","text":"","category":"section"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"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:","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"# Total Thrust Coefficient\nouts.totals.CT","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"# Total Torque Coefficient\nouts.totals.CQ","category":"page"},{"location":"DuctAPE/tutorial/#Run-a-Multi-Point-Analysis","page":"Getting Started","title":"Run a Multi-Point Analysis","text":"","category":"section"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"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 accepts an input, multipoint, that is a vector of operating points.","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"DuctAPE.analyze(ducted_rotor::DuctedRotor,operating_point::AbstractVector{TO},reference_parameters::ReferenceParameters,options::Options) where TO<:OperatingPoint","category":"page"},{"location":"DuctAPE/tutorial/#DuctAPE.analyze-Union{Tuple{TO}, Tuple{DuctedRotor, AbstractVector{TO}, ReferenceParameters, Options}} where TO<:OperatingPoint-DuctAPE-tutorial","page":"Getting Started","title":"DuctAPE.analyze","text":"analyze(\n ducted_rotor::DuctedRotor,\n operating_point::AbstractVector{OperatingPoint},\n reference_parameters::ReferenceParameters,\n options::Options=set_options();\n prepost_container_caching=nothing,\n solve_parameter_caching=nothing,\n solve_container_caching=nothing,\n return_inputs=false,\n)\n\nAnalyze ducted_rotor, including preprocessing, for a set of operating points.\n\nArguments\n\nducted_rotor::DuctedRotor : DuctedRotor input object\noperating_point::AbstractVector{OperatingPoint} : Vector of Operating Points at which to analyze the ducted_rotor\nreference_parameters::ReferenceParameters : ReferenceParameters input object (see docstring for ReferenceParameters type)\noptions::Options=set_options() : Options object\n\nKeyword Arguments\n\nprepost_container_caching=nothing : Output of allocate_prepost_container_cache\nsolve_parameter_caching=nothing : Output of allocate_solve_parameter_container_cache\nsolve_container_caching=nothing : Output of allocate_solve_container_cache\nreturn_inputs=false : flag as to whether or not to return the pre-processed inputs\n\nReturns\n\nouts::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.\nins::NamedTuple : Named Tuple of various pre-processed inputs (e.g. panels and body linear system), will only be returned if return_inputs=true\nconvergence_flag : Flag for successful solve convergence\n\n\n\n\n\n","category":"method"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"Running a multi-point analysis on the example geometry given there, it might look something like this:","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"# - Advance Ratio Range - #\nJs = range(0.0, 2.0; step=0.01)\n\n# - Calculate Vinfs - #\nD = 2.0 * rotor.Rtip[1] # rotor diameter\nn = RPM / 60.0 # rotation rate in revolutions per second\nVinfs = Js * n * D\n\n# - Set Operating Points - #\noperating_points = [deepcopy(operating_point) for i in 1:length(Vinfs)]\nfor (iv, v) in enumerate(Vinfs)\n operating_points[iv].Vinf[] = v\nend\n\n# - Run Multi-point Analysis - #\nouts_vec, success_flags = DuctAPE.analyze(ducted_rotor, operating_points, reference_parameters, DuctAPE.set_options(operating_points))\nnothing #hide","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"There are a few things to note here.","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"We want to make sure that the operating point objects we put into the input vector are unique instances.\nWe need to use the dispatch of set_options that accepts the operating point vector to set up the right number of things in the background (like convergence flags for each operating point).\nThe outputs of the analysis are vectors of the same outputs for a single analysis.","category":"page"},{"location":"DuctAPE/tutorial/#Multi-point-Outputs","page":"Getting Started","title":"Multi-point Outputs","text":"","category":"section"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"For multi-point analysis outputs, which are given as a vector of output objects, we might access and plot things as follows. We also take the opportunity to present some verification against DFDC, showing that DuctAPE matches remarkably well (within 0.5%) of DFDC. We therefore first provide data from DFDC analyses of the above example geometry at various advance ratios.","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"# Verification Data From DFDC\n\ndfdc_jept = [\n 0.0 0.0 0.64763 0.96692\n 0.1 0.1366 0.64716 0.88394\n 0.2 0.2506 0.6448 0.80785\n 0.3 0.3457 0.64044 0.73801\n 0.4 0.4251 0.63401 0.67382\n 0.5 0.4915 0.62534 0.61468\n 0.6 0.547 0.61428 0.56001\n 0.7 0.5935 0.6006 0.50925\n 0.8 0.6326 0.58411 0.46187\n 0.9 0.6654 0.56452 0.41738\n 1.0 0.693 0.54158 0.37531\n 1.1 0.716 0.51499 0.33522\n 1.2 0.7349 0.48446 0.2967\n 1.3 0.7499 0.44966 0.25937\n 1.4 0.7606 0.41031 0.2229\n 1.5 0.7661 0.36604 0.18694\n 1.6 0.7643 0.31654 0.15121\n 1.7 0.7506 0.26153 0.11547\n 1.8 0.7126 0.20061 0.07941\n 1.9 0.61 0.13355 0.04287\n 2.0 0.1861 0.05993 0.00558\n]\n\ndfdc_J = dfdc_jept[:,1]\ndfdc_eta = dfdc_jept[:,2]\ndfdc_cp = dfdc_jept[:,3]\ndfdc_ct = dfdc_jept[:,4]\nnothing #hide","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"We can then access the various multi-point analysis outputs however is convenient, we choose a broadcasting approach here:","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"\n# - extract efficiency, power, and thrust coefficients - #\n# efficiency\neta = (p->p.totals.total_efficiency[1]).(outs_vec)\n# power\ncp = (p->p.totals.CP[1]).(outs_vec)\n# thrust\nct = (p->p.totals.CT[1]).(outs_vec)\nnothing #hide","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"And then we can plot the data to compare DFDC and DuctAPE.","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"using Plots\n\n# set up efficiency plot\npe = plot(; xlabel=\"Advance Ratio\", ylabel=\"Efficiency\")\n\n# plot DFDC data\nplot!(\n pe,\n dfdc_J,\n dfdc_eta;\n seriestype=:scatter,\n markersize=5,\n markercolor=plotsgray,\n markerstrokecolor=plotsgray,\n label=\"DFDC\"\n)\n\n# Plot DuctAPE outputs\nplot!(pe, Js, eta; linewidth=2, color=primary, label = \"DuctAPE\")\n\n# setup cp/ct plot\nppt = plot(; xlabel=\"Advance Ratio\")\n\n# plot DFDC data\nplot!(\n ppt,\n dfdc_J,\n dfdc_cp;\n seriestype=:scatter,\n markersize=5,\n markercolor=plotsgray,\n markerstrokecolor=primary,\n markerstrokewidth=2,\n label=\"DFDC Cp\"\n)\nplot!(\n ppt,\n dfdc_J,\n dfdc_ct;\n seriestype=:scatter,\n markersize=5,\n markercolor=plotsgray,\n markerstrokecolor=secondary,\n markerstrokewidth=2,\n label=\"DFDC Ct\"\n)\n\n# plot DuctAPE outputs\nplot!(\n ppt,\n Js,\n cp;\n linewidth=1.5,\n color=primary,\n label=\"DuctAPE Cp\"\n)\nplot!(\n ppt,\n Js,\n ct;\n linewidth=1.5,\n color=secondary,\n label=\"DuctAPE Ct\"\n)\n\nplot(pe, ppt; size=(700,350), layout=(1,2), margin=2mm)","category":"page"},{"location":"DuctAPE/api/api_index/#Index","page":"API Index","title":"Index","text":"","category":"section"},{"location":"DuctAPE/api/api_index/","page":"API Index","title":"API Index","text":"Modules=[DuctAPE]","category":"page"}] +[{"location":"DuctAPE/advanced_usage/outputs/","page":"Outputs","title":"Outputs","text":"The output tuple contains many items. The post_process function docstring lists them. The purpose of showing this function here is not for you to manually run the fuction or apply any advanced usage, but simply rather for you to see what the available outputs are, as several of them may apply to advanced usage cases.","category":"page"},{"location":"DuctAPE/advanced_usage/outputs/","page":"Outputs","title":"Outputs","text":"DuctAPE.post_process","category":"page"},{"location":"DuctAPE/advanced_usage/outputs/#DuctAPE.post_process-DuctAPE-advanced_usage-outputs","page":"Outputs","title":"DuctAPE.post_process","text":"post_process(\n solver_options,\n converged_states,\n prepost_containers,\n solve_container_caching,\n solve_parameter_cache_vector,\n solve_parameter_cache_dims,\n operating_point,\n reference_parameters,\n A_bb_LU,\n airfoils,\n idmaps,\n problem_dimensions,\n multipoint_index;\n write_outputs=options.write_outputs,\n outfile=options.outfile,\n checkoutfileexists=options.checkoutfileexists,\n output_tuple_name=options.output_tuple_name,\n verbose=options.verbose,\n)\n\nPost-process a converged nonlinear solve solution.\n\nArguments\n\nsolver_options::SolverOptionsType : A SolverOptionsType object (also used for dispatch)\nconverged_states::Vector{Float} : the converged state variables\nprepost_containers::NamedTuple : the named tuple containing pre-allocated containers for the pre- and post-processing intermediate calculations\nsolve_container_cache::NamedTuple : the cache and dimensions for intermediate values in the residual calculation\nsolve_parameter_cache_vector::Vector{Float} : the applicably typed cache vector for the solve parameters\nsolve_parameter_cache_dims::NamedTuple : the dimensions of the solver parameters\noperating_point::OperatingPoint : the operating point being analyzed\nreference_parameters::ReferenceParameters : a ReferenceParameters object\nA_bb_LU::LinearAlgebra.LU : LinearAlgebra LU factorization of the LHS matrix\nairfoils::Vector{AFType} : A matrix of airfoil types associated with each of the blade elements\nidmaps::NamedTuple : A named tuple containing index mapping used in bookkeeping throughout solve and post-process\nproblem_dimensions::ProblemDimensions : A ProblemDimensions object\n\nKeyword Arguments\n\nmultipoint_index::Vector{Int} : a one-dimensional vector containing the index of which multipoint analysis operating point is being analyzed.\nwrite_outputs=options.write_outputs::Vector{Bool} : a vector with the same length as number of multipoints indicating if the outputs should be saved.\noutfile=options.outfile::Vector{String} : a vector of file paths/names for where outputs should be written\ncheckoutfileexists=options.checkoutfileexists::Bool : a flag for whether existing files should be checked for or if blind overwriting is okay.\noutput_tuple_name=options.output_tuple_name::Vector{String} : the variable name(s) of the named tuple of outputs to be written.\nverbose::Bool=false : flag to print verbose statements\n\nReturns\n\nouts::NamedTuple : A named tuple containing all the output values including\n\nbodies\npanel_strengths\ntotal_thrust\nthrust_comp\ninduced_efficiency\ncp_in\ncp_out\ncp_casing_in\ncp_casing_out\ncasing_zpts\ncp_nacelle_in\ncp_nacelle_out\nnacelle_zpts\ncp_centerbody_in\ncp_centerbody_out\ncenterbody_zpts\nVtot_in\nVtot_out\nVtot_prejump\nvtot_body\nvtot_jump\nvtot_wake\nvtot_rotors\nVtan_in\nVtan_out\nvtan_casing_in\nvtan_casing_out\nvtan_nacelle_in\nvtan_nacelle_out\nvtan_centerbody_in\nvtan_centerbody_out\nrotors\ncirculation\npanel_strengths\nefficiency\ninviscid_thrust\ninviscid_thrust_dist\nviscous_thrust\nviscous_thrust_dist\nthrust\nCT\ninviscid_torque\ninviscid_torque_dist\nviscous_torque\nviscous_torque_dist\ntorque\nCQ\ninviscid_power\ninviscid_power_dist\nviscous_power\nviscous_power_dist\npower\nCP\ncl\ncd\nalpha\nbeta1\nblade_normal_force_per_unit_span\nblade_tangential_force_per_unit_span\nwake\npanel_strengths\ntotals\nthrust\ntorque\npower\nCT\nCQ\nCP\ntotal_efficiency\nideal_efficiency\nintermediate_solve_values\nvz_rotor\nvtheta_rotor\nCm_wake\nreynolds\nmach\nCz_rotor\nCtheta_rotor\nCmag_rotor\nGamma_tilde\nH_tilde\ndeltaGamma2\ndeltaH\nvz_wake\nvr_wake\nCm_avg\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/advanced_usage/outputs/#Returning-the-Pre-process-Objects","page":"Outputs","title":"Returning the Pre-process Objects","text":"","category":"section"},{"location":"DuctAPE/advanced_usage/outputs/","page":"Outputs","title":"Outputs","text":"Sometimes, it may be desireable to return the pre-process objects, including:","category":"page"},{"location":"DuctAPE/advanced_usage/outputs/","page":"Outputs","title":"Outputs","text":"panels which is a named tuple containing the body, rotor, and wake panel objects\nivb which are the unit induced velocities on the body panels\nsolve_parameter_tuple which contains all of the solver parameters\nblade_elements which contains all of the blade element geometry and airfoil information\nlinsys which contains all the linear system objects for the panel method\nidmaps which contains all the index mapping used throughout the solve and post-process.","category":"page"},{"location":"DuctAPE/advanced_usage/outputs/","page":"Outputs","title":"Outputs","text":"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.","category":"page"},{"location":"DuctAPE/advanced_usage/outputs/","page":"Outputs","title":"Outputs","text":"outs, ins, success_flag = dt.analyze(ducted_rotor, operating_point, reference_parameters; return_inputs=true)","category":"page"},{"location":"DuctAPE/advanced_usage/manual_repaneling/#Circumventing-the-Automated-Geometry-Re-paneling","page":"-","title":"Circumventing the Automated Geometry Re-paneling","text":"","category":"section"},{"location":"DuctAPE/advanced_usage/manual_repaneling/","page":"-","title":"-","text":"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.","category":"page"},{"location":"DuctAPE/advanced_usage/manual_repaneling/","page":"-","title":"-","text":"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.","category":"page"},{"location":"DuctAPE/advanced_usage/precompilation/#Pre-compiling-the-Caches","page":"Preallocation","title":"Pre-compiling the Caches","text":"","category":"section"},{"location":"DuctAPE/advanced_usage/precompilation/","page":"Preallocation","title":"Preallocation","text":"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","category":"page"},{"location":"DuctAPE/advanced_usage/precompilation/","page":"Preallocation","title":"Preallocation","text":"DuctAPE.allocate_prepost_container_cache","category":"page"},{"location":"DuctAPE/advanced_usage/precompilation/#DuctAPE.allocate_prepost_container_cache-DuctAPE-advanced_usage-precompilation","page":"Preallocation","title":"DuctAPE.allocate_prepost_container_cache","text":"allocate_prepost_container_cache(paneling_constants::PanelingConstants)\nallocate_prepost_container_cache(problem_dimensions::ProblemDimensions)\n\nAllocate the pre- and post-processing cache (used for intermediate calculations) based on paneling constants or problem dimensions.\n\nArguments\n\npaneling_constants::PanelingConstants : a PanelingConstants object\n\nOR\n\nproblem_dimensions::ProblemDimensions : a ProblemDimensions object\n\nKeyword Arguments\n\nfd_chunk_size::Int=12 : chunk size to use for PreallocationTools caches. Note that the automated chunk 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.\nlevels::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.\n\nReturns\n\nprepost_container_caching::NamedTuple : a Named Tuple containing:\nprepost_container_cache::PreallocationTools.DiffCache : the cache\nprepost_container_cache_dims::NamedTuple : a named tuple containing the dimensions used for reshaping the cache when needed.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/advanced_usage/precompilation/","page":"Preallocation","title":"Preallocation","text":"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.","category":"page"},{"location":"DuctAPE/advanced_usage/precompilation/","page":"Preallocation","title":"Preallocation","text":"DuctAPE.allocate_solve_parameter_cache","category":"page"},{"location":"DuctAPE/advanced_usage/precompilation/#DuctAPE.allocate_solve_parameter_cache-DuctAPE-advanced_usage-precompilation","page":"Preallocation","title":"DuctAPE.allocate_solve_parameter_cache","text":"allocate_solve_parameter_cache(\n solve_type::SolverOptionsType,\n paneling_constants::PanelingConstants;\n fd_chunk_size=12,\n levels=1,\n)\nallocate_solve_parameter_cache(\n solve_type::SolverOptionsType,\n problem_dimensions::ProblemDimensions;\n fd_chunk_size=12,\n levels=1\n)\n\nAllocate the solve parameter cache for parameters passed into the solver(s).\n\nArguments\n\nsolve_type::SolverOptionsType : Solver options type used for dispatch\npaneling_constants::PanelingConstants : a PanlingConstants object used for sizing\n\nOR\n\nproblem_dimensions::ProblemDimensions : a ProblemDimensions object used for sizing\n\nKeyword Arguments\n\nfd_chunk_size::Int=12 : chunk size to use for PreallocationTools caches. Note that the automated chunk 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.\nlevels::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.\n\nReturns\n\nsolve_parameter_caching::NamedTuple : a Named Tuple containing:\nsolve_parameter_cache::PreallocationTools.DiffCache : the cache\nsolve_parameter_cache_dims::NamedTuple : a named tuple containing the dimensions used for reshaping the cache when needed.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/advanced_usage/precompilation/","page":"Preallocation","title":"Preallocation","text":"The final precompileable cache is for intermediate calculations within the solve and can be preallocated using allocate_solve_container_cache","category":"page"},{"location":"DuctAPE/advanced_usage/precompilation/","page":"Preallocation","title":"Preallocation","text":"DuctAPE.allocate_solve_container_cache","category":"page"},{"location":"DuctAPE/advanced_usage/precompilation/#DuctAPE.allocate_solve_container_cache-DuctAPE-advanced_usage-precompilation","page":"Preallocation","title":"DuctAPE.allocate_solve_container_cache","text":"allocate_solve_container_cache(\n solve_type::SolverOptionsType,\n paneling_constants::PanelingConstants;\n fd_chunk_size=12,\n levels=1,\n)\nallocate_solve_container_cache(\n solve_type::SolverOptionsType,\n problem_dimensions::ProblemDimensions;\n fd_chunk_size=12,\n levels=1,\n)\n\nAllocate the solve cache (used for intermediate calculations) based on paneling constants or problem dimensions.\n\nArguments\n\npaneling_constants::PanelingConstants : a PanelingConstants object\n\nOR\n\nproblem_dimensions::ProblemDimensions : a ProblemDimensions object\n\nKeyword Arguments\n\nfd_chunk_size::Int=12 : chunk size to use for PreallocationTools caches. Note that the automated chunk 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.\nlevels::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.\n\nReturns\n\nsolve_container_caching::NamedTuple : a Named Tuple containing:\nsolve_container_cache::PreallocationTools.DiffCache : the cache\nsolve_container_cache_dims::NamedTuple : a named tuple containing the dimensions used for reshaping the cache when needed.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/advanced_usage/precompilation/","page":"Preallocation","title":"Preallocation","text":"You may run all these simultaneously using the initialize_all_caches function.","category":"page"},{"location":"DuctAPE/advanced_usage/precompilation/","page":"Preallocation","title":"Preallocation","text":"DuctAPE.initialize_all_caches","category":"page"},{"location":"DuctAPE/advanced_usage/precompilation/#DuctAPE.initialize_all_caches-DuctAPE-advanced_usage-precompilation","page":"Preallocation","title":"DuctAPE.initialize_all_caches","text":"initialize_all_caches(solver_options, paneling_constants)\n\nConvenience function to initialize all caches before calling analysis.\n\nArguments\n\nsolver_options::SolverOptionsType : solver options used for cache allocation dispatch\npaneling_constants::PanelingConstants : PanelingConstants object upon which all cache sizing depends\n\nKeyword Arguments\n\nfd_chunk_size::Int=12 : chunk size to use for PreallocationTools caches. Note that the automated chunk 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.\nlevels::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.\n\nReturns\n\nprepost_container_caching::NamedTuple : A named tuple containing the PreallocationTools DiffCache and a named tuple with relevant dimensions for accessing the cache.\nsolve_parameter_caching::NamedTuple : A named tuple containing the PreallocationTools DiffCache and a named tuple with relevant dimensions for accessing the cache.\nsolve_container_caching::NamedTuple : A named tuple containing the PreallocationTools DiffCache and a named tuple with relevant dimensions for accessing the cache.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/advanced_usage/precompilation/","page":"Preallocation","title":"Preallocation","text":"As an example of how to run this function, we'll grab solver options and oaneling constants from previous examples","category":"page"},{"location":"DuctAPE/advanced_usage/precompilation/","page":"Preallocation","title":"Preallocation","text":"# - grab an object of SolverOptionsType defined in a previous example - #\naero_solver_options = DuctAPE.NLsolveOptions(;\n algorithm=:newton,\n atol=1e-10,\n iteration_limite=30,\n linesearch_method=LineSearches.BackTracking, #don't include parentheses on method handle\n linesearch_kwargs=(; order=3, maxstep=1e6),\n additional_kwargs=(; autoscale=false),\n)\n\n# - grab an object of PanelingConstants type from the Getting Started tutorial - #\n# number of panels for the duct inlet\nnduct_inlet = 30\n\n# number of panels for the center body inlet\nncenterbody_inlet = 30\n\n# number of panels from:\n# - rotor to duct trailing edge\n# - duct trailing edge to center body trailing edge\n# - center body trailing edge to end of wake\nnpanels = [30, 1, 30]\n\n# the duct trailing edge is ahead of the centerbody trailing edge.\ndte_minus_cbte = -1.0\n\n# number of wake sheets (one more than blade elements to use)\nnwake_sheets = 11\n\n# non-dimensional wake length aft of rear-most trailing edge\nwake_length = 0.8\n\n# assemble paneling constants\npaneling_constants = DuctAPE.PanelingConstants(\n nduct_inlet, ncenterbody_inlet, npanels, dte_minus_cbte, nwake_sheets, wake_length\n)\n\n# - Initialize Caches - #\nprepost_container_caching, solve_parameter_caching, solve_container_caching = DuctAPE.initialize_all_caches(aero_solver_options, paneling_constants)","category":"page"},{"location":"DuctAPE/advanced_usage/precompilation/#How-to-pass-the-caches-into-an-analysis","page":"Preallocation","title":"How to pass the caches into an analysis","text":"","category":"section"},{"location":"DuctAPE/advanced_usage/precompilation/","page":"Preallocation","title":"Preallocation","text":"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.","category":"page"},{"location":"DuctAPE/advanced_usage/precompilation/","page":"Preallocation","title":"Preallocation","text":"DuctAPE.analyze(\n ducted_rotor::DuctedRotor,\n operating_point::OperatingPoint,\n reference_parameters::ReferenceParameters,\n options::Options=set_options())","category":"page"},{"location":"DuctAPE/advanced_usage/precompilation/#DuctAPE.analyze-DuctAPE-advanced_usage-precompilation","page":"Preallocation","title":"DuctAPE.analyze","text":"analyze(\n ducted_rotor::DuctedRotor,\n operating_point::OperatingPoint,\n reference_parameters::ReferenceParameters,\n options::Options=set_options();\n prepost_container_caching=nothing,\n solve_parameter_caching=nothing,\n solve_container_caching=nothing,\n return_inputs=false,\n)\n\nAnalyze ducted_rotor, including preprocessing.\n\nArguments\n\nducted_rotor::DuctedRotor : DuctedRotor input object (see docstring for DuctedRotor type)\noperating_point::OperatingPoint : OperatingPoint input object (see docstring for OperatingPoint type)\nreference_parameters::ReferenceParameters : ReferenceParameters input object (see docstring for ReferenceParameters type)\noptions::Options=set_options() : Options object (see set_options and related functions)\n\nKeyword Arguments\n\nprepost_container_caching=nothing : Output of allocate_prepost_container_cache\nsolve_parameter_caching=nothing : Output of allocate_solve_parameter_container_cache\nsolve_container_caching=nothing : Output of allocate_solve_container_cache\nreturn_inputs=false : flag as to whether or not to return the pre-processed inputs\n\nReturns\n\nouts::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.\nins::NamedTuple : Named Tuple of various pre-processed inputs (e.g. panels and body linear system), will only be returned if return_inputs=true\nconvergence_flag : Flag for successful solve convergence\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/public_api/#Public-API","page":"Public API Reference","title":"Public API","text":"","category":"section"},{"location":"DuctAPE/api/public_api/","page":"Public API Reference","title":"Public API Reference","text":"Pages = [\"public_api.md\"]\nDepth = 5","category":"page"},{"location":"DuctAPE/api/public_api/#Input-Types","page":"Public API Reference","title":"Input Types","text":"","category":"section"},{"location":"DuctAPE/api/public_api/","page":"Public API Reference","title":"Public API Reference","text":"DuctAPE.PanelingConstants\nDuctAPE.Rotor\nDuctAPE.DuctedRotor\nDuctAPE.OperatingPoint\nDuctAPE.ReferenceParameters","category":"page"},{"location":"DuctAPE/api/public_api/#DuctAPE.PanelingConstants","page":"Public API Reference","title":"DuctAPE.PanelingConstants","text":"PanelingConstants(\n nduct_inlet,\n ncenterbody_inlet,\n npanels,\n dte_minus_cbte,\n nwake_sheets,\n wake_length=1.0,\n)\n\nConstants used in re-paneling geometry.\n\nNote 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.\n\nArguments\n\nnduct_inlet::Int : The number of panels to use for the duct inlet (this number is used for both the casing and nacelle re-paneling)\nncenterbody_inlet::Int : The number of panels to use for the centerbody inlet.\nnpanels::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.\ndte_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.\nnwake_sheets::Int : The number of wake sheets to use. Note this will also be setting the number of blade elements to use.\nwake_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.\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/api/public_api/#DuctAPE.Rotor","page":"Public API Reference","title":"DuctAPE.Rotor","text":"Rotor(\n B, rotorzloc, r, Rhub, Rtip, chords, twists, tip_gap, airfoils, fliplift\n)\n\nComposite type containing the rotor(s) geometric properties.\n\nNote 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.\n\nArguments\n\nB::AbstractVector{Float} : The number of blades for each rotor. May not be an integer, but usually is.\nrotorzloc::AbstractVector{Float} : Dimensional, axial position of each rotor.\nr::AbstractArray{Float} : Non-dimensional radial locations of each blade element.\nRhub::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.\nRtip::AbstractVector{Float} : Dimensional tip radius of rotor. Is used to determine the radial position of the duct if the autoshiftduct option is selected.\nchords::AbstractArray{Float} : Dimensional chord lengths of the blade elements.\ntwists::AbstractArray{Float} : Blade element angles, in radians.\ntip_gap::AbstractVector{Float} : Currently unused, do not set to anything other than zeros.\nairfoils::AbstractArray{AFType} : Airfoil types describing the airfoil polars for each blade element. Currently only fully tested with C4Blade.DFDCairfoil types.\nfliplift::AbstractVector{Bool} : Flag to indicate if the airfoil lift values should be flipped or not.\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/api/public_api/#DuctAPE.DuctedRotor","page":"Public API Reference","title":"DuctAPE.DuctedRotor","text":"DuctedRotor(duct_coordinates, centerbody_coordinates, rotor, paneling_constants)\n\nArguments\n\nduct_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.\ncenterbody_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.\npaneling_constants::PanelingConstants : Constants used in re-paneling the geometry.\nrotor::Rotor : Rotor (and possibly stator) geometric paramters.\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/api/public_api/#DuctAPE.OperatingPoint","page":"Public API Reference","title":"DuctAPE.OperatingPoint","text":"OperatingPoint(Vinf, rhoinf, muinf, asound, Omega)\n\nDuctedRotor operating point information.\n\nArguments\n\nVinf::AbstractVector{Float} : Freestream velocity magnitude (which is only in the axial direction).\nrhoinf::AbstractVector{Float} : Freestream density\nmuinf::AbstractVector{Float} : Freestream viscosity\nasound::AbstractVector{Float} : Freestream speed of sound\nOmega::AbstractVector{Float} : Rotor rototation rate(s)\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/api/public_api/#DuctAPE.ReferenceParameters","page":"Public API Reference","title":"DuctAPE.ReferenceParameters","text":"ReferenceParameters(Vref, Rref)\n\nReference parameters for post-process non-dimensionalization.\n\nNote 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.\n\nArguments\n\nVref::AbstractVector{Float} : Reference velocity.\nRref::AbstractVector{Float} : Reference rotor tip radius.\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/api/public_api/#Preallocations","page":"Public API Reference","title":"Preallocations","text":"","category":"section"},{"location":"DuctAPE/api/public_api/","page":"Public API Reference","title":"Public API Reference","text":"DuctAPE.allocate_prepost_container_cache\nDuctAPE.allocate_solve_parameter_cache\nDuctAPE.allocate_solve_container_cache","category":"page"},{"location":"DuctAPE/api/public_api/#DuctAPE.allocate_prepost_container_cache","page":"Public API Reference","title":"DuctAPE.allocate_prepost_container_cache","text":"allocate_prepost_container_cache(paneling_constants::PanelingConstants)\nallocate_prepost_container_cache(problem_dimensions::ProblemDimensions)\n\nAllocate the pre- and post-processing cache (used for intermediate calculations) based on paneling constants or problem dimensions.\n\nArguments\n\npaneling_constants::PanelingConstants : a PanelingConstants object\n\nOR\n\nproblem_dimensions::ProblemDimensions : a ProblemDimensions object\n\nKeyword Arguments\n\nfd_chunk_size::Int=12 : chunk size to use for PreallocationTools caches. Note that the automated chunk 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.\nlevels::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.\n\nReturns\n\nprepost_container_caching::NamedTuple : a Named Tuple containing:\nprepost_container_cache::PreallocationTools.DiffCache : the cache\nprepost_container_cache_dims::NamedTuple : a named tuple containing the dimensions used for reshaping the cache when needed.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/public_api/#DuctAPE.allocate_solve_parameter_cache","page":"Public API Reference","title":"DuctAPE.allocate_solve_parameter_cache","text":"allocate_solve_parameter_cache(\n solve_type::SolverOptionsType,\n paneling_constants::PanelingConstants;\n fd_chunk_size=12,\n levels=1,\n)\nallocate_solve_parameter_cache(\n solve_type::SolverOptionsType,\n problem_dimensions::ProblemDimensions;\n fd_chunk_size=12,\n levels=1\n)\n\nAllocate the solve parameter cache for parameters passed into the solver(s).\n\nArguments\n\nsolve_type::SolverOptionsType : Solver options type used for dispatch\npaneling_constants::PanelingConstants : a PanlingConstants object used for sizing\n\nOR\n\nproblem_dimensions::ProblemDimensions : a ProblemDimensions object used for sizing\n\nKeyword Arguments\n\nfd_chunk_size::Int=12 : chunk size to use for PreallocationTools caches. Note that the automated chunk 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.\nlevels::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.\n\nReturns\n\nsolve_parameter_caching::NamedTuple : a Named Tuple containing:\nsolve_parameter_cache::PreallocationTools.DiffCache : the cache\nsolve_parameter_cache_dims::NamedTuple : a named tuple containing the dimensions used for reshaping the cache when needed.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/public_api/#DuctAPE.allocate_solve_container_cache","page":"Public API Reference","title":"DuctAPE.allocate_solve_container_cache","text":"allocate_solve_container_cache(\n solve_type::SolverOptionsType,\n paneling_constants::PanelingConstants;\n fd_chunk_size=12,\n levels=1,\n)\nallocate_solve_container_cache(\n solve_type::SolverOptionsType,\n problem_dimensions::ProblemDimensions;\n fd_chunk_size=12,\n levels=1,\n)\n\nAllocate the solve cache (used for intermediate calculations) based on paneling constants or problem dimensions.\n\nArguments\n\npaneling_constants::PanelingConstants : a PanelingConstants object\n\nOR\n\nproblem_dimensions::ProblemDimensions : a ProblemDimensions object\n\nKeyword Arguments\n\nfd_chunk_size::Int=12 : chunk size to use for PreallocationTools caches. Note that the automated chunk 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.\nlevels::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.\n\nReturns\n\nsolve_container_caching::NamedTuple : a Named Tuple containing:\nsolve_container_cache::PreallocationTools.DiffCache : the cache\nsolve_container_cache_dims::NamedTuple : a named tuple containing the dimensions used for reshaping the cache when needed.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/public_api/#Options","page":"Public API Reference","title":"Options","text":"","category":"section"},{"location":"DuctAPE/api/public_api/#General-Options","page":"Public API Reference","title":"General Options","text":"","category":"section"},{"location":"DuctAPE/api/public_api/","page":"Public API Reference","title":"Public API Reference","text":"DuctAPE.Options\nDuctAPE.set_options","category":"page"},{"location":"DuctAPE/api/public_api/#DuctAPE.Options","page":"Public API Reference","title":"DuctAPE.Options","text":"struct Options\n\nType containing (nearly) all the available user options.\n\nFields\n\nGeneral Options\n\nverbose::Bool = false : flag to print verbose statements\nsilence_warnings::Bool = true : flag to silence warnings\nmultipoint_index::Int = [1] : holds current index of multi-point solver (no need for user to change this usually)\n\nPre-processing Options\n\nGeometry interpolation and generation options :\n\nfinterp::Interplation Method = FLOWMath.akima : interpolation method used for re-paneling bodies\nautoshiftduct::Bool = true : flag as to whether duct geometry should be shifted based on rotor tip location\nlu_decomp_flag::Bool = false : flag indicating if panel method LHS matrix factorization was successful\n\npaneling options\n\nitcpshift::Float = 0.05 : factor for internal trailing edge psuedo-panel placement (default is DFDC hard-coded value)\naxistol::Float = 1e-15 : tolerance for how close the the axis of rotation should be considered on the axis\ntegaptol::Float = 1e1 * eps() : tolerance for how large of a trailing edge gap should be considered a gap\n\nIntegration Options\n\nintegration_options::IntegrationOptions type = IntegrationOptions() : integration options\n\nPost-processing Options\n\nwrite_outputs::AbstractArray{Bool} = [false] : Bool for whether to write the outputs of the analysis to an external file (slow)\noutfile::AbstractArray{String} = [\"outputs.jl\"] : External output file name (including path information) for files to write\ncheckoutfileexists::Bool = false : Flag for whether to check if file exists before overwriting\noutput_tuple_name::AbstractArray{String} = [\"outs\"] : variable name for named tuple written to out file\n\nSolving Options\n\ngrid_solver_options::GridSolverOptionsType = GridSolverOptions() : elliptic grid solver options\nsolver_options::SolverOptionsType = ChainSolverOptions() : solver options\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/api/public_api/#DuctAPE.set_options","page":"Public API Reference","title":"DuctAPE.set_options","text":"set_options(; kwargs...)\nset_options(multipoint; kwargs...)\n\nSet the options for DuctAPE to use.\n\nNote that the vast majority of the available options are defined through keyword arguments. See the documentation for the various option types for more information.\n\nArguments\n\nmultipoint::AbstractArray{OperatingPoint} : a vector of operating points to use if running a multi-point analysis.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/public_api/#Integration-Options","page":"Public API Reference","title":"Integration Options","text":"","category":"section"},{"location":"DuctAPE/api/public_api/","page":"Public API Reference","title":"Public API Reference","text":"DuctAPE.IntegrationOptions\nDuctAPE.GaussLegendre\nDuctAPE.GaussKronrod\nDuctAPE.Romberg","category":"page"},{"location":"DuctAPE/api/public_api/#DuctAPE.IntegrationOptions","page":"Public API Reference","title":"DuctAPE.IntegrationOptions","text":"struct IntegrationOptions\n\nA struct used to hold the integration options for both the nominal and singular cases.\n\nFields\n\nnominal::IntegrationMethod=GaussLegendre(8) : the integration options to use for the nominal case.\nsingular::IntegrationMethod=GaussLegendre(8) : the integration options to use for the self-induced case.\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/api/public_api/#DuctAPE.GaussLegendre","page":"Public API Reference","title":"DuctAPE.GaussLegendre","text":"struct GaussLegendre <: IntegrationMethod\n\nOptions for Gauss-Legendre integration method\n\nFields\n\nsample_points::Int : Sample Points\nweights::Int : Gauss weights\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/api/public_api/#DuctAPE.GaussKronrod","page":"Public API Reference","title":"DuctAPE.GaussKronrod","text":"struct GaussKronrod <: IntegrationMethod\n\nOptions for Gauss-Kronrod integration method\n\nFields\n\norder::Int = 7 : order of Legendre polynomial to use on each interval\nmaxevales::Int = 10^7 : maximum number of evaluations in the adaptive method\natol::Float = 0.0 : absolute error tolerance. (note, if zero, QuadGK uses sqrt(eps()) relative tolerance).\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/api/public_api/#DuctAPE.Romberg","page":"Public API Reference","title":"DuctAPE.Romberg","text":"struct Romberg <: IntegrationMethod\n\nOptions for Romberg integration method\n\nFields\n\nmax_subdivisions::Int = 10 : maximum number of subdivisions. Note, total number of internvals is 2^N, where N is number of subdivisions.\natol::Float = 1e-6 : absolute error tolerance.\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/api/public_api/#Solver-Options","page":"Public API Reference","title":"Solver Options","text":"","category":"section"},{"location":"DuctAPE/api/public_api/#Elliptic-Grid-Solve","page":"Public API Reference","title":"Elliptic Grid Solve","text":"","category":"section"},{"location":"DuctAPE/api/public_api/","page":"Public API Reference","title":"Public API Reference","text":"DuctAPE.SLORGridSolverOptions\nDuctAPE.GridSolverOptions","category":"page"},{"location":"DuctAPE/api/public_api/#DuctAPE.SLORGridSolverOptions","page":"Public API Reference","title":"DuctAPE.SLORGridSolverOptions","text":"struct SLORGridSolverOptions <: GridSolverOptionsType\n\nOptions for SLOR (successive line over relaxation) elliptic grid solver.\n\nFields\n\niteration_limit::Int = 100 : maximum number of iterations\natol::Float = 1e-9 : absolute convergence tolerance\nconverged::AbstractArray{Bool} = [false]\niterations::AbstractArray{Int} = [0] : iteration counter\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/api/public_api/#DuctAPE.GridSolverOptions","page":"Public API Reference","title":"DuctAPE.GridSolverOptions","text":"struct GridSolverOptions <: GridSolverOptionsType\n\nOptions for SLOR + Newton elliptic grid solver.\n\nFields\n\niteration_limit::Int = 10 : maximum number of iterations\natol::Float = 1e-14 : absolute convergence tolerance\nalgorithm::Symbol = :newton : algorithm to use in NLsolve.jl\nautodiff::Symbol = :forward : differentiation method to use in NLsolve.jl\nconverged::AbstractArray{Bool} = [false]\niterations::AbstractArray{Int} = [0] : iteration counter\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/api/public_api/#Aerodynamics-Solve","page":"Public API Reference","title":"Aerodynamics Solve","text":"","category":"section"},{"location":"DuctAPE/api/public_api/","page":"Public API Reference","title":"Public API Reference","text":"DuctAPE.ChainSolverOptions\nDuctAPE.CompositeSolverOptions\nDuctAPE.NLsolveOptions\nDuctAPE.NonlinearSolveOptions\nDuctAPE.MinpackOptions\nDuctAPE.SIAMFANLEOptions\nDuctAPE.SpeedMappingOptions\nDuctAPE.FixedPointOptions\nDuctAPE.CSORSolverOptions\nDuctAPE.ModCSORSolverOptions","category":"page"},{"location":"DuctAPE/api/public_api/#DuctAPE.ChainSolverOptions","page":"Public API Reference","title":"DuctAPE.ChainSolverOptions","text":"struct ChainSolverOptions <:ExternalPolyAlgorithmOptions\n\nOptions for Chain Solvers (try one solver, if it doesn't converge, try another)\n\nFields\n\n`solvers::AbstractArray{SolverOptionsType} = [ 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.\nconverged::AbstractArray{Bool} = [false] : flag to track if convergence took place.\niterations::AbstractArray{Int} = [0] : iteration counter\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/api/public_api/#DuctAPE.CompositeSolverOptions","page":"Public API Reference","title":"DuctAPE.CompositeSolverOptions","text":"struct CompositeSolverOptions <: ExternalPolyAlgorithmOptions\n\nOptions for Composite Solvers (start with a partial solve of one solve, then finish with another starting where the first left off).\n\nFields\n\n`solvers::AbstractArray{SolverOptionsType} = [ NLsolveOptions(; algorithm=:newton, iteration_limit=3), NLsolveOptions(; algorithm=:anderson, atol=1e-12), ]' : Vector of solver options to use.\nconverged::AbstractArray{Bool} = [false] : flag to track if convergence took place.\niterations::AbstractArray{Int} = [0] : iteration counter\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/api/public_api/#DuctAPE.NLsolveOptions","page":"Public API Reference","title":"DuctAPE.NLsolveOptions","text":"struct NLsolveOptions <: ExternalSolverOptions\n\nOptions for the NLsolve pacakge solvers\n\nFields\n\nalgorithm::Symbol = :anderson : algorithm to use\nadditional_kwargs = (;) : any additional keyword arguments for the solver\natol::Float = 1e-12 : absolute convergence tolerance\niteration_limit::Int = 25 : maximum number of iterations\nlinesearch_method::LineSearches method = LineSearches.MoreThuente : line search method to use\nlinesearch_kwargs = (;) : any additional lineseach keyword arguments\nconverged::AbstractArray{Bool} = [false] : flag to track if convergence took place.\niterations::AbstractArray{Int} = [0] : iteration counter\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/api/public_api/#DuctAPE.NonlinearSolveOptions","page":"Public API Reference","title":"DuctAPE.NonlinearSolveOptions","text":"struct NonlinearSolveOptions <: ExternalSolverOptions\n\nOptions for the SimpleNonlinearSolve pacakge solvers\n\nFields\n\nalgorithm::SimpleNonlinearSolve algorithm = SimpleNonlinearSolve.SimpleNewtonRaphson : algorithm to use\nadditional_kwargs = (;) : any additional keyword arguments for the solver\natol::Float = 1e-12 : absolute convergence tolerance\niteration_limit::Float = 25 : maximum number of iterations\nconverged::AbstractArray{Bool} = [false] : flag to track if convergence took place.\niterations::AbstractArray{Int} = [0] : iteration counter\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/api/public_api/#DuctAPE.MinpackOptions","page":"Public API Reference","title":"DuctAPE.MinpackOptions","text":"struct MinpackOptions <: ExternalSolverOptions\n\nOptions for the MINPACK's HYBRJ solver\n\nFields\n\nalgorithm::Symbol = :hybr : algorithm to use in MINPACK.jl (hybr is HYBRJ when the jacobian is provided)\natol::FLoat = 1e-12 : absolute convergence tolerance\niteration_limit::FLoat = 100 : maximum number of iterations\nconverged::AbstractArray{Bool} = [false] : flag to track if convergence took place.\niterations::AbstractArray{Int} = [0] : iteration counter\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/api/public_api/#DuctAPE.SIAMFANLEOptions","page":"Public API Reference","title":"DuctAPE.SIAMFANLEOptions","text":"struct SIAMFANLEOptions <: ExternalSolverOptions\n\nOptions for the SIAMFANLEquations pacakge solvers\n\nFields\n\nalgorithm::SIAMFANLEquations algorithm = SIAMFANLEquations.nsoli : algorithm to use\nrtol::Float = 0.0 : relative convergence tolerance\natol::Float = 1e-10 : absolute convergence tolerance\niteration_limit::Int = 1000 : maximum number of iterations\nlinear_iteration_limit::Float = 5 : maximum number of linear solve iterations (GMRES)\nadditional_kwargs = (;) : any additional keyword arguments for the solver\nconverged::AbstractArray{Bool} = [false] : flag to track if convergence took place.\niterations::AbstractArray{Int} = [0] : iteration counter\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/api/public_api/#DuctAPE.SpeedMappingOptions","page":"Public API Reference","title":"DuctAPE.SpeedMappingOptions","text":"struct SpeedMappingOptions <: ExternalSolverOptions\n\nOptions for the SpeedMapping.jl package solver\n\nFields\n\n`orders::AbstractArray{Int} = [3, 2]\nsig_min::Int = 0 : maybe set to 1?\nstabilize::Bool = false : stabilizes before extrapolation\ncheck_obj::Bool = false : checks for inf's and nan's and starts from previous finite point\natol::Float = 1e-10 : absolute convergence tolerance\niteration_limit::Float = 1000 : maximum number of iterations\ntime_limit::Float = Inf : time limit in seconds\nlower::Float = nothing : box lower bounds\nupper::Float = nothing : box upper bounds\nbuffer::Float = 0.01 : if using bounds, buffer brings x inside bounds by buffer amountd\nLp::Float = Inf : p value for p-norm for convergence criteria\nconverged::AbstractArray{Bool} = [false] : flag to track if convergence took place.\niterations::AbstractArray{Int} = [0] : iteration counter\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/api/public_api/#DuctAPE.FixedPointOptions","page":"Public API Reference","title":"DuctAPE.FixedPointOptions","text":"struct FixedPointOptions <: ExternalSolverOptions\n\nOptions for the FixedPoint.jl package solver\n\nFields\n\niteration_limit::Int = 1000 : maximum number of iterations\nvel::Float = 0.9 : vel keyword argument, default is package default\nep::Float = 0.01 : ep keyword argument, default is package default\natol::Float = 1e-12 : absolute convergence tolerance\nconverged::AbstractArray{Bool} = [false] : flag to track if convergence took place.\niterations::AbstractArray{Int} = [0] : iteration counter\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/api/public_api/#DuctAPE.CSORSolverOptions","page":"Public API Reference","title":"DuctAPE.CSORSolverOptions","text":"struct CSORSolverOptions <: InternalSolverOptions\n\nType containing all the options for the CSOR (controlled successive over relaxation) solver.\n\nNote that the defaults match DFDC with the exception of the relaxation schedule, which is an experimental feature.\n\nFields\n\nverbose::Bool = false : flag to print verbose statements\niteration_limit::Float = 1e2 : maximum number of iterations\nnrf::Float = 0.4 : nominal relaxation factor\nbt1::Float = 0.2 : backtracking factor 1\nbt2::Float = 0.6 : backtracking factor 2\npf1::Float = 0.4 : press forward factor 1\npf2::Float = 0.5 : press forward factor 2\nbtw::Float = 0.6 : backtracking factor for wake\npfw::Float = 1.2 : press forward factor for wake\nrelaxation_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).\nf_circ::Float = 1e-3 : convergence tolerance for rotor circulation\nf_dgamw::Float = 2e-4 : convergence tolerance for wake vortex strength\nconvergence_type::ConvergenceType = Relative() : dispatch for relative or absolute convergence criteria.\nVconv::AbstractArray{Float} = [1.0] : velocity used in relative convergence criteria (should be set to Vref).\nconverged::AbstractArray{Bool} = [false] : flag to track if convergence took place.\niterations::AbstractArray{Int} = [0] : iteration counter\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/api/public_api/#DuctAPE.ModCSORSolverOptions","page":"Public API Reference","title":"DuctAPE.ModCSORSolverOptions","text":"struct ModCSORSolverOptions <: InternalSolverOptions\n\nType containing all the options for the modified CSOR solver.\n\nFields\n\nverbose::Bool = false : flag to print verbose statements\niteration_limit::Float = 1e3 : maximum number of iterations\nrelaxation_parameters::NamedTuple = (;\nnrf::Float = 0.4 : nominal relaxation factor\nbt1::Float = 0.2 : backtracking factor 1\nbt2::Float = 0.6 : backtracking factor 2\npf1::Float = 0.4 : press forward factor 1\npf2::Float = 0.5 : press forward factor 2\nbtw::Float = 0.6 : backtracking factor for wake\npfw::Float = 1.2 : press forward factor for wake\n) : parameters for determining relaxation level of states in each iteration.\nconverged::AbstractArray{Bool} = [false] : flag to track if convergence took place.\niterations::AbstractArray{Int} = [0] : iteration counter\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/api/public_api/#Preprocess","page":"Public API Reference","title":"Preprocess","text":"","category":"section"},{"location":"DuctAPE/api/public_api/","page":"Public API Reference","title":"Public API Reference","text":"DuctAPE.setup_analysis","category":"page"},{"location":"DuctAPE/api/public_api/#DuctAPE.setup_analysis","page":"Public API Reference","title":"DuctAPE.setup_analysis","text":"setup_analysis(\n ducted_rotor::DuctedRotor,\n operating_point::OperatingPoint,\n options::Options=set_options();\n prepost_container_caching=nothing,\n solve_parameter_caching=nothing,\n solve_container_caching=nothing,\n)\n\nPerform pre-processing and cache setup (as needed) for propuslor analysis.\n\nArguments\n\nducted_rotor::DuctedRotor : DuctedRotor input object (see docstring for DuctedRotor type)\noperating_point::OperatingPoint : OperatingPoint input object (see docstring for OperatingPoint type)\noptions::Options=set_options() : Options object (see set_options and related functions)\n\nKeyword Arguments\n\nprepost_container_caching=nothing : Output of allocate_prepost_container_cache\nsolve_parameter_caching=nothing : Output of allocate_solve_parameter_container_cache\nsolve_container_caching=nothing : Output of allocate_solve_container_cache\n\nReturns\n\nproblem_dimensions::NamedTuple : Named Tuple contiaining bookkeeping information (problem dimensions)\nprepost_containers::NamedTuple : Named Tuple containing reshaped views into the prepost cache\nsolve_parameter_cache_vector::Vector : Vector containing the relevant typed cache vector of solve parameters\nsolve_parameter_cache_dims::NamedTuple : Named Tuple containing dimensions used for reshaping the solve parameter cache\nA_bb_LU::LinearAlgebra.LU : The LU factorization of the AIC matrix used in the panel method\nlu_decomp_flag::Bool : flag indicating if the LU decomposition was successful\nairfoils::Matrix{AFType} : Matrix contiaining the blade element airfoil polar objects\nidmaps::NamedTuple : Named Tuple containing bookkeeping information (index mappings)\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/public_api/#Analysis","page":"Public API Reference","title":"Analysis","text":"","category":"section"},{"location":"DuctAPE/api/public_api/","page":"Public API Reference","title":"Public API Reference","text":"DuctAPE.analyze","category":"page"},{"location":"DuctAPE/api/public_api/#DuctAPE.analyze","page":"Public API Reference","title":"DuctAPE.analyze","text":"analyze(\n ducted_rotor::DuctedRotor,\n operating_point::OperatingPoint,\n reference_parameters::ReferenceParameters,\n options::Options=set_options();\n prepost_container_caching=nothing,\n solve_parameter_caching=nothing,\n solve_container_caching=nothing,\n return_inputs=false,\n)\n\nAnalyze ducted_rotor, including preprocessing.\n\nArguments\n\nducted_rotor::DuctedRotor : DuctedRotor input object (see docstring for DuctedRotor type)\noperating_point::OperatingPoint : OperatingPoint input object (see docstring for OperatingPoint type)\nreference_parameters::ReferenceParameters : ReferenceParameters input object (see docstring for ReferenceParameters type)\noptions::Options=set_options() : Options object (see set_options and related functions)\n\nKeyword Arguments\n\nprepost_container_caching=nothing : Output of allocate_prepost_container_cache\nsolve_parameter_caching=nothing : Output of allocate_solve_parameter_container_cache\nsolve_container_caching=nothing : Output of allocate_solve_container_cache\nreturn_inputs=false : flag as to whether or not to return the pre-processed inputs\n\nReturns\n\nouts::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.\nins::NamedTuple : Named Tuple of various pre-processed inputs (e.g. panels and body linear system), will only be returned if return_inputs=true\nconvergence_flag : Flag for successful solve convergence\n\n\n\n\n\nanalyze(\n ducted_rotor::DuctedRotor,\n operating_point::OperatingPoint,\n reference_parameters::ReferenceParameters,\n prepost_containers,\n solve_parameter_cache_vector,\n solve_parameter_cache_dims,\n airfoils,\n A_bb_LU,\n idmaps,\n problem_dimensions,\n options::Options=set_options();\n return_inputs=false,\n solve_container_caching=nothing,\n)\n\nAnalyze ductedrotor, assuming `setupanalysis` has been called and the outputs thereof are being passed in here.\n\nArguments\n\nducted_rotor::DuctedRotor : DuctedRotor input object (see docstring for DuctedRotor type)\noperating_point::OperatingPoint : OperatingPoint input object (see docstring for OperatingPoint type)\nreference_parameters::ReferenceParameters : ReferenceParameters input object (see docstring for ReferenceParameters type)\nprepost_containers::NamedTuple : An output from setup_analysis containing reshaped views into the prepost cache\nsolve_parameter_cache_vector::Vector : An output from setup_analysis containing the relevant typed cache vector of solve parameters\nsolve_parameter_cache_dims::NamedTuple : An output from setup_analysis containing dimensions used for reshaping the solve parameter cache\nairfoils::Vector{AFType} : An output from setup_analysis contiaining the blade element airfoil polar objects\nA_bb_LU::LinearAlgebra.LU : An output from setup_analysis that is the LU decomposition of the AIC matrix used in the panel method\nidmaps::NamedTuple : An output from setup_analysis containing bookkeeping information (index mappings)\nproblem_dimensions::NamedTuple : An output from setup_analysis contiaining bookkeeping information (problem dimensions)\noptions::Options=set_options() : Options object\n\nKeyword Arguments\n\nsolve_container_caching=nothing : Output of allocate_solve_container_cache\nreturn_inputs=false : flag as to whether or not to return the pre-processed inputs\n\nReturns\n\nouts::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.\nins::NamedTuple : Named Tuple of various pre-processed inputs (e.g. panels and body linear system), will only be returned if return_inputs=true\nconvergence_flag : Flag for successful solve convergence\n\n\n\n\n\nanalyze(\n ducted_rotor::DuctedRotor,\n operating_point::AbstractVector{OperatingPoint},\n reference_parameters::ReferenceParameters,\n options::Options=set_options();\n prepost_container_caching=nothing,\n solve_parameter_caching=nothing,\n solve_container_caching=nothing,\n return_inputs=false,\n)\n\nAnalyze ducted_rotor, including preprocessing, for a set of operating points.\n\nArguments\n\nducted_rotor::DuctedRotor : DuctedRotor input object\noperating_point::AbstractVector{OperatingPoint} : Vector of Operating Points at which to analyze the ducted_rotor\nreference_parameters::ReferenceParameters : ReferenceParameters input object (see docstring for ReferenceParameters type)\noptions::Options=set_options() : Options object\n\nKeyword Arguments\n\nprepost_container_caching=nothing : Output of allocate_prepost_container_cache\nsolve_parameter_caching=nothing : Output of allocate_solve_parameter_container_cache\nsolve_container_caching=nothing : Output of allocate_solve_container_cache\nreturn_inputs=false : flag as to whether or not to return the pre-processed inputs\n\nReturns\n\nouts::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.\nins::NamedTuple : Named Tuple of various pre-processed inputs (e.g. panels and body linear system), will only be returned if return_inputs=true\nconvergence_flag : Flag for successful solve convergence\n\n\n\n\n\nanalyze(\n ducted_rotor::DuctedRotor,\n operating_point::Vector{OperatingPoint},\n reference_parameters::ReferenceParameters,\n prepost_containers,\n solve_parameter_cache_vector,\n solve_parameter_cache_dims,\n airfoils,\n A_bb_LU,\n idmaps,\n problem_dimensions,\n options::Options=set_options();\n return_inputs=false,\n solve_container_caching=nothing,\n)\n\nAnalyze ductedrotor, assuming `setupanalysis` has been called and the inputs are being passed in here.\n\nArguments\n\nducted_rotor::DuctedRotor : DuctedRotor input object\noperating_point::AbstractVector{OperatingPoint} : Vector of Operating Points at which to analyze the ducted_rotor\nreference_parameters::ReferenceParameters : ReferenceParameters input object (see docstring for ReferenceParameters type)\nprepost_containers::NamedTuple : An output from setup_analysis containing reshaped views into the prepost cache\nsolve_parameter_cache_vector::Vector : An output from setup_analysis containing the relevant typed cache vector of solve parameters\nsolve_parameter_cache_dims::NamedTuple : An output from setup_analysis containing dimensions used for reshaping the solve parameter cache\nairfoils::Vector{AFType} : An output from setup_analysis contiaining the blade element airfoil polar objects\nA_bb_LU::LinearAlgebra.LU : An output from setup_analysis that is the LU decomposition of the AIC matrix used in the panel method\nidmaps::NamedTuple : An output from setup_analysis containing bookkeeping information (index mappings)\nproblem_dimensions::NamedTuple : An output from setup_analysis contiaining bookkeeping information (problem dimensions)\noptions::Options=set_options() : Options object\n\nKeyword Arguments\n\nsolve_container_caching=nothing : Output of allocate_solve_container_cache\nreturn_inputs=false : flag as to whether or not to return the pre-processed inputs\n\nReturns\n\nouts::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.\nins::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.\nconvergence_flag : Flag for successful solve convergence\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/public_api/#Miscellaneous","page":"Public API Reference","title":"Miscellaneous","text":"","category":"section"},{"location":"DuctAPE/api/public_api/#Airfoil/Geometry-Manipulation","page":"Public API Reference","title":"Airfoil/Geometry Manipulation","text":"","category":"section"},{"location":"DuctAPE/api/public_api/#NACA-6-Series-Cascade-Geometry-Generation","page":"Public API Reference","title":"NACA 6-Series Cascade Geometry Generation","text":"","category":"section"},{"location":"DuctAPE/api/private_utilities/","page":"Utilities","title":"Utilities","text":"DuctAPE.promote_ducted_rotor_type\nDuctAPE.isscalar\nDuctAPE.dot\nDuctAPE.norm\nDuctAPE.cross2mag\nDuctAPE.linear_transform\nDuctAPE.extract_primals!\nDuctAPE.lfs\nDuctAPE.reset_containers!\nDuctAPE.cache_dims!\nDuctAPE.write_data","category":"page"},{"location":"DuctAPE/api/private_utilities/#DuctAPE.promote_ducted_rotor_type","page":"Utilities","title":"DuctAPE.promote_ducted_rotor_type","text":"promote_ducted_rotor_type(ducted_rotor)\n\nConvenience function for promoting types based on any potential elements of the ducted_rotor object dependent on optimization design variables.\n\nArguments\n\nducted_rotor::DuctedRotor : the ducted_rotor input\n\nReturns\n\nTP::Type : the promoted type\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_utilities/#DuctAPE.isscalar","page":"Utilities","title":"DuctAPE.isscalar","text":"isscalar(x::T) where {T} = isscalar(T)\nisscalar(::Type{T}) where {T} = BroadcastStyle(T) isa Broadcast.DefaultArrayStyle{0}\n\nDetermines if the input is a scalar. Note that Base.BroadcastStyle is imported.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_utilities/#DuctAPE.dot","page":"Utilities","title":"DuctAPE.dot","text":"dot(A, B) = sum(a * b for (a, b) in zip(A, B))\n\nA faster dot product.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_utilities/#DuctAPE.norm","page":"Utilities","title":"DuctAPE.norm","text":"norm(A) = sqrt(mapreduce(x -> x^2, +, A))\n\nA faster 2-norm.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_utilities/#DuctAPE.cross2mag","page":"Utilities","title":"DuctAPE.cross2mag","text":"cross2mag(A, B) = A[1] * B[2] - A[2] * B[1]\n\n2D \"cross product\" magnitude\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_utilities/#DuctAPE.linear_transform","page":"Utilities","title":"DuctAPE.linear_transform","text":"linear_transform(range1, range2, values)\n\nLinear transfrom of values from range (source_range[1], source_range[end]) to (target_range[1], target_range[end])\n\nArguments\n\nsource_range::Vector{Float} : range values come from (can also be a Tuple)\ntarget_range::Vector{Float} : range onto which we are transforming (can also be a Tuple)\nsource_values::Array{Float} : array of source values to transform\n\nReturns\n\ntarget_values::Array{Float} : array of transformed sourcevalues onto target range\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_utilities/#DuctAPE.extract_primals!","page":"Utilities","title":"DuctAPE.extract_primals!","text":"extract_primals!(Avalue, A::AbstractMatrix{T}) where {T}\n\nExtracts primals of A and places them in Avalue.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_utilities/#DuctAPE.lfs","page":"Utilities","title":"DuctAPE.lfs","text":"lfs(shape)\n\nDetermines length from shape (output of size function).\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_utilities/#DuctAPE.reset_containers!","page":"Utilities","title":"DuctAPE.reset_containers!","text":"reset_containers!(containers; exception_keys=[])\n\nResets all fields (not incluing any contained in exception keys) of containers–-which must be arrays, structs of arrays, or tuples of arrays–-to zeros.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_utilities/#DuctAPE.cache_dims!","page":"Utilities","title":"DuctAPE.cache_dims!","text":"cache_dims!(total_length, l, s)\n\nA function that returns a named tuple containing an index range and shape and increases total_length by l.\n\nThis function is used heavily in the cache allocation functions for setting up the dimension maps used to access the vectorized caches.\n\nArguments\n\ntotal_length::Vector{Int} : single element vector containing the current total length of the eventual cache vector. Modified in place.\nl::Int : total length of the object in question\ns::Int : size of the object in question\n\nReturns\n\ndims::NamedTuple : A named tuple containing index and shape fields\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_utilities/#DuctAPE.write_data","page":"Utilities","title":"DuctAPE.write_data","text":"write_data(outs, filename; checkoutfileexists=false)\n\nWrites NamedTuples, specifically for writing out the output of the post_procces() function.\n\nArguments:\n\nouts::NamedTuple : Named tuple to write to file.\nfilename::String : file name (including full desired path and file type) for file to write\n\nKeyword Arguments:\n\noutput_tuple_name::String : desired variable name of written NamedTuple\ncheckoutfileexists::Bool=false : boolean for whether to check if the outfile already exists and whether or not to overwrite it.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_process/","page":"Process","title":"Process","text":"Pages = [\"private_process.md\"]\nDepth = 5","category":"page"},{"location":"DuctAPE/api/private_process/#Analysis","page":"Process","title":"Analysis","text":"","category":"section"},{"location":"DuctAPE/api/private_process/","page":"Process","title":"Process","text":"DuctAPE.analyze_multipoint","category":"page"},{"location":"DuctAPE/api/private_process/#DuctAPE.analyze_multipoint","page":"Process","title":"DuctAPE.analyze_multipoint","text":"analyze_multipoint(\n ducted_rotor::DuctedRotor,\n operating_point::OperatingPoint,\n reference_parameters::ReferenceParameters\n prepost_containers,\n solve_parameter_cache_vector,\n solve_parameter_cache_dims,\n airfoils,\n A_bb_LU,\n idmaps,\n problem_dimensions,\n options::Options;\n solve_container_caching=nothing,\n return_inputs=false,\n)\n\nIdentical 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 ducted_rotor with the explicit operating point input.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_process/#Process","page":"Process","title":"Process","text":"","category":"section"},{"location":"DuctAPE/api/private_process/","page":"Process","title":"Process","text":"DuctAPE.process\nDuctAPE.solve","category":"page"},{"location":"DuctAPE/api/private_process/#DuctAPE.process","page":"Process","title":"DuctAPE.process","text":"process(\n solver_options::SolverOptionsType,\n solve_parameter_cache_vector,\n solve_parameter_cache_dims,\n airfoils,\n A_bb_LU,\n solve_container_caching,\n idmaps,\n options,\n)\n\nProcess (the step between pre-process and post-process) the solution, in other words: call the solver(s).\n\nArguments\n\nsolver_options::SolverOptionsType : the solver options contained in the options object, used for dispatch.\nsolve_parameter_cache_vector::Vector{Float} : The vector cache for parameters used in the solve.\nsolve_parameter_cache_dims::NamedTuple : A named tuple containing the dimensions of the solve parameters.\nairfoils::NamedTuple : The airfoils to be interpolated that are associated with each blade element\nA_bb_LU::LinearAlgebra.LU : The LU decomposition of the panel method LHS matrix\nsolve_container_caching::NamedTuple : A named tuple containing the cache and dimensions for the intermediate solve values.\nidmaps::NamedTuple : The set of index maps used in various solve sub-functions\noptions::Options : User options\n\nReturns\n\nconverged_states::Vector{Float} : The output of a call to ImplicitAD.implicit\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_process/#DuctAPE.solve","page":"Process","title":"DuctAPE.solve","text":"solve(sensitivity_parameters, const_cache; initial_guess=nothing)\n\nA compact dispatch of solve that automatically dispatches based on the solveroptions contained in constcache.\n\n\n\n\n\nsolve(\n solver_options::SolverOptionsType,\n sensitivity_parameters,\n const_cache;\n initial_guess=nothing,\n)\n\nConverge the residual, solving for the state variables that do so.\n\nArguments\n\nsolver_options::SolverOptionsType : SolverOptionsType used for dispatch\nsensitivity_parameters::Vector{Float} : Sensitivity parameters for solve (parameters passed in through ImplicitAD)\nconst_cache::NamedTuple : A named tuple containing constants and caching helpers.\n\nKeyword Arguments\n\ninitial_guess=nothing::Vector{Float} : An optional manually provided initial guess (contained in the sensitivity parameters anyway).\n\nReturns\n\nconverged_states::Vector{Float} : the states for which the residual has converged.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_process/#Internal-Solvers","page":"Process","title":"Internal Solvers","text":"","category":"section"},{"location":"DuctAPE/api/private_process/#ModCSOR","page":"Process","title":"ModCSOR","text":"","category":"section"},{"location":"DuctAPE/api/private_process/","page":"Process","title":"Process","text":"DuctAPE.mod_COR_solver\nDuctAPE.relax_Gamr_mod!\nDuctAPE.relax_gamw_mod!\nDuctAPE.update_states!","category":"page"},{"location":"DuctAPE/api/private_process/#DuctAPE.mod_COR_solver","page":"Process","title":"DuctAPE.mod_COR_solver","text":"mod_COR_solver(\n r_fun!,\n states,\n B,\n state_dims;\n convergence_tolerance=1e-10,\n iteration_limit=500,\n relaxation_parameters=(; nrf=0.4, bt1=0.2, bt2=0.6, pf1=0.4, pf2=0.5, btw=0.6, pfw=1.2),\n)\n\nModified DFDC-like CSOR solver that updates all states before relaxing Gamr and gamw.\n\nArguments:\n\nr_fun!::function handle : the residual function for the solver to use\ninitial_states::Vector{Float} : the inital guess for the states\nB::Vector{Float} : number of blades on each rotor (used in state relaxation)\nstate_dims::NamedTuple : dimensions of the states (used in state relaxation)\n\nKeyword Arguments\n\nconvergence_tolerance::type=1e-10 : absolute convergence tolerance\niteration_limit::type=500 : maximum number of iterations\nrelaxation_parameters::type=(; nrf=0.4, bt1=0.2, bt2=0.6, pf1=0.4, pf2=0.5, btw=0.6, pfw=1.2) : parameters used in state relaxation\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_process/#DuctAPE.relax_Gamr_mod!","page":"Process","title":"DuctAPE.relax_Gamr_mod!","text":"relax_Gamr_mod!(\n Gamr,\n r_Gamr_current,\n r_Gamr_previous,\n B;\n nrf=0.4,\n bt1=0.2,\n bt2=0.6,\n pf1=0.4,\n pf2=0.5,\n test=false,\n)\n\nApply relaxed step to Gamr.\n\nArguments\n\nGamr::Array{Float} : Array of rotor circulations (columns = rotors, rows = blade elements), updated in place\nB::Vector{Float} : number of blades on each rotor\nr_Gamr_current::Array{Float} : Array of current iteration's differences in circulation values\nr_Gamr_previous::Array{Float} : Array of previous iteration's differences in circulation values, updated in place\n\nKeyword Arguments:\n\nnrf::Float=0.4 : nominal relaxation factor\nbt1::Float=0.2 : backtrack factor 1\nbt2::Float=0.6 : backtrack factor 2\npf1::Float=0.4 : press forward factor 1\npf2::Float=0.5 : press forward factor 2\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_process/#DuctAPE.relax_gamw_mod!","page":"Process","title":"DuctAPE.relax_gamw_mod!","text":"relax_gamw_mod!(gamw, r_gamw_current, r_gamw_previous; nrf=0.4, btw=0.6, pfw=1.2)\n\nApply relaxed step to gamw.\n\nArguments\n\ngamw::Array{Float} : Array of rotor circulations (columns = rotors, rows = blade elements), updated in place\nr_gamw_current::Array{Float} : Array of current iteration's differences in circulation values\nr_gamw_previous::Array{Float} : Array of previous iteration's differences in circulation values, updated in place\n\nKeyword Arguments\n\nnrf::Float=0.4 : nominal relaxation factor\nbt1::Float=0.2 : backtrack factor 1\nbt2::Float=0.6 : backtrack factor 2\npf1::Float=0.4 : press forward factor 1\npf2::Float=0.5 : press forward factor 2\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_process/#DuctAPE.update_states!","page":"Process","title":"DuctAPE.update_states!","text":"update_states!(states, r_current, r_previous, B, relaxation_parameters, state_dims)\n\nUpdate states using DFDC-like relaxation methods.\n\nArguments\n\nstates::Vector{Float} : current iteration states to update\nr_current::Vector{Float} : current iteration residual values\nr_previous::Vector{Float} : previous iteration residual values\nB::Vector{Float} : number of blades for each rotor\nrelaxation_parameters::NamedTuple : relaxation parameters\nstate_dims::NamedTuple : dimensions of the state variables\nsolver_options::SolverOptionsType : used for dispatch\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_process/#CSOR","page":"Process","title":"CSOR","text":"","category":"section"},{"location":"DuctAPE/api/private_process/","page":"Process","title":"Process","text":"DuctAPE.apply_relaxation_schedule\nDuctAPE.update_CSOR_residual_values!\nDuctAPE.check_CSOR_convergence!\nDuctAPE.relax_Gamr!\nDuctAPE.relax_gamw!","category":"page"},{"location":"DuctAPE/api/private_process/#DuctAPE.apply_relaxation_schedule","page":"Process","title":"DuctAPE.apply_relaxation_schedule","text":"apply_relaxation_schedule(\n resid::AbstractVector, solver_options::TS\n) where {TS<:SolverOptionsType}\n\nApply custom relaxation schedule to all relaxation factor inputs based on residual values.\n\nArguments\n\nresid::AbstractVector{Float} : current residual values\nsolver_options::SolverOptionsType : SolverOptions containing relaxation schedule\n\nReturns\n\nnrf::Float : nominal relaxation factor\nbt1::Float : backtrack factor 1\nbt2::Float : backtrack factor 2\npf1::Float : press forward factor 1\npf2::Float : press forward factor 2\n\n\n\n\n\napply_relaxation_schedule(resid, nominal, schedule)\n\nApply custom relaxation schedule to a single relaxation factor input.\n\nArguments\n\nresid::Float : residual value\nnominal::Float : nominal relaxation value\nschedule::AbstractVector{AbstractVector{Float}} : values between which to interpolate to scale the nominal relaxation value.\n\nReturns\n\nrf::Float : the updated relaxation factor\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_process/#DuctAPE.update_CSOR_residual_values!","page":"Process","title":"DuctAPE.update_CSOR_residual_values!","text":"update_CSOR_residual_values!(\n convergence_type::ConvergenceType, resid, maxBGamr, maxdeltaBGamr, maxdeltagamw, Vconv\n)\n\nUpdate CSOR residual values in place.\n\nArguments\n\nconvergence_type::ConvergenceType : used for dispatch of relative or absolute residual values.\nresid::Vector{Float} : residual values modified in place\nmaxBGamr::Float : Maximum value of B*Gamr among all blade elements\nmaxdeltaBGamr::Float : Maximum change in B*Gamr between iterations among all blade elements\nmaxdeltagamw::Vector{Float} : Maximum change in gamw among all wake nodes (one element)\nVconv::Float : Reference velocity upon which the relative convergence criteria is based (one element)\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_process/#DuctAPE.check_CSOR_convergence!","page":"Process","title":"DuctAPE.check_CSOR_convergence!","text":"check_CSOR_convergence!(\n conv, resid; f_circ=1e-3, f_dgamw=2e-4, convergence_type=Relative(), verbose=false\n)\n\nDescription\n\nArguments\n\nconv::Vector{Float} : container holding convergence flag\nresid::Vector{Float} : residual vector\n\nKeyword Arguments\n\nf_circ::Float=1e-3 : convergence criteria for circulation residual\nf_dgamw::Float=2e-4 : convergence criteria for wake strength residual\nconvergence_type::ConvergenceType=Relative() : convergence type (absolute or relative) for print statements\nverbose::Bool=false : flag for verbose print statements\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_process/#DuctAPE.relax_Gamr!","page":"Process","title":"DuctAPE.relax_Gamr!","text":"relax_Gamr!(\n Gamr,\n delta_prev_mat,\n delta_mat,\n maxBGamr,\n maxdeltaBGamr,\n B;\n nrf=0.4,\n bt1=0.2,\n bt2=0.6,\n pf1=0.4,\n pf2=0.5,\n test=false,\n)\n\nApply relaxed step to Gamr.\n\nArguments\n\nGamr::Array{Float} : Array of rotor circulations (columns = rotors, rows = blade elements), updated in place\ndelta_prev_mat::Array{Float} : Array of previous iteration's differences in circulation values, updated in place\ndelta_mat::Array{Float} : Array of current iteration's differences in circulation values\nmaxBGamr::Array{Float} : stores value of maximum B*Gamr for each rotor\nmaxdeltaBGamr::Array{Float} : stores value of maximum change in B*Gamr for each rotor\nB::Vector{Float} : number of blades on each rotor\nnrf::Float=0.4 : nominal relaxation factor\nbt1::Float=0.2 : backtrack factor 1\nbt2::Float=0.6 : backtrack factor 2\npf1::Float=0.4 : press forward factor 1\npf2::Float=0.5 : press forward factor 2\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_process/#DuctAPE.relax_gamw!","page":"Process","title":"DuctAPE.relax_gamw!","text":"relax_gamw!(\n gamw, delta_prev, delta, maxdeltagamw; nrf=0.4, btw=0.6, pfw=1.2, test=false\n)\n\nApply relaxed step to gamw.\n\nArguments\n\ngamw::Array{Float} : Array of rotor circulations (columns = rotors, rows = blade elements), updated in place\ndelta_prev_mat::Array{Float} : Array of previous iteration's differences in circulation values, updated in place\ndelta_mat::Array{Float} : Array of current iteration's differences in circulation values\nmaxdeltagamw::Array{Float} : Single element array that gets updated with the new maximum change in gamw.\n\nKeyword Arguments:\n\nnrf::Float=0.4 : nominal relaxation factor\nbt1::Float=0.2 : backtrack factor 1\nbt2::Float=0.6 : backtrack factor 2\npf1::Float=0.4 : press forward factor 1\npf2::Float=0.5 : press forward factor 2\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_process/#Residuals","page":"Process","title":"Residuals","text":"","category":"section"},{"location":"DuctAPE/api/private_process/#ModCSOR-2","page":"Process","title":"ModCSOR","text":"","category":"section"},{"location":"DuctAPE/api/private_process/","page":"Process","title":"Process","text":"DuctAPE.mod_CSOR_residual!\nDuctAPE.estimate_CSOR_states!","category":"page"},{"location":"DuctAPE/api/private_process/#DuctAPE.mod_CSOR_residual!","page":"Process","title":"DuctAPE.mod_CSOR_residual!","text":"mod_CSOR_residual!(r, current_states, inputs, constants)\n\nModified DFDC-like CSOR residual that does not include any relaxation within the residual calculation.\n\nArguments\n\nr::Vector{Float} : solve residual\ncurrent_states::Vector{Float} : solve states\ninputs::Vector{Float} : solve inputs\nconstants::Vector{Float} : solve constants\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_process/#DuctAPE.estimate_CSOR_states!","page":"Process","title":"DuctAPE.estimate_CSOR_states!","text":"estimate_CSOR_states!(\n solve_containers,\n Gamr,\n sigr,\n gamw,\n operating_point,\n ivr,\n ivw,\n linsys,\n blade_elements,\n wakeK,\n idmaps;\n verbose=false,\n)\n\nEstimate states for modified CSOR solver.\n\nArguments:\n\nsolve_containers::NamedTuple : cache for intermediate solve values\nGamr::type : Blade element circulation strengths\nsigr::type : Rotor source panel strengths\ngamw::type : Wake vortex panel strengths\noperating_point::NamedTuple : Named tuple containing operating_point information\nivr::NamedTuple : unit induced velocities on rotor(s)\nivw::NamedTuple : unit induced velocities on wake\nlinsys::NamedTuple : vectors and matricies comprising the panel method linear system\nblade_elements::NamedTuple : blade element geometry and airfoil polar information\nwakeK::Vector{Float} : geometric constants used in caculating wake strengths\nidmaps::NamedTuple : index maps used throughout solve\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_process/#CSOR-2","page":"Process","title":"CSOR","text":"","category":"section"},{"location":"DuctAPE/api/private_process/","page":"Process","title":"Process","text":"DuctAPE.CSOR_residual!\nDuctAPE.compute_CSOR_residual!","category":"page"},{"location":"DuctAPE/api/private_process/#DuctAPE.CSOR_residual!","page":"Process","title":"DuctAPE.CSOR_residual!","text":"CSOR_residual!(resid, state_variables, sensitivity_parameters, constants)\n\nThe in-place residual used for the CSOR solve method.\n\nArguments\n\nresid::Vector{Float} : In-place residual.\nstate_variables::Vector{Float} : The state variables\nsensitivity_parameters::Vector{Float} : The parameters to which the solution is sensitive.\nconstants::NamedTuple : Various constants required in the solve\n\nReturns\n\nstate_variables::Vector{Float} : The state variables (modified in place)\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_process/#DuctAPE.compute_CSOR_residual!","page":"Process","title":"DuctAPE.compute_CSOR_residual!","text":"compute_CSOR_residual!(\n resid,\n solver_options,\n solve_containers,\n Gamr,\n sigr,\n gamw,\n operating_point,\n ivr,\n ivw,\n linsys,\n blade_elements,\n wakeK,\n idmaps;\n verbose=false,\n)\n\nDescription\n\nArguments\n\nresid::Vector{Float} : the residual vector\nsolver_options::SolverOptionsType : solver options (used for convergence criteria)\nsolve_containers::NamedTuple : cache for intermediate solve values\nGamr::type : Blade element circulation strengths\nsigr::type : Rotor source panel strengths\ngamw::type : Wake vortex panel strengths\noperating_point::NamedTuple : Named tuple containing operating_point information\nivr::NamedTuple : unit induced velocities on rotor(s)\nivw::NamedTuple : unit induced velocities on wake\nlinsys::NamedTuple : vectors and matricies comprising the panel method linear system\nblade_elements::NamedTuple : blade element geometry and airfoil polar information\nwakeK::Vector{Float} : geometric constants used in caculating wake strengths\nidmaps::NamedTuple : index maps used throughout solve\n\nKeyword Arguments\n\nverbose::Bool=false : Flag to print verbose statements\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_process/#External-Solvers","page":"Process","title":"External Solvers","text":"","category":"section"},{"location":"DuctAPE/api/private_process/","page":"Process","title":"Process","text":"DuctAPE.system_residual\nDuctAPE.system_residual!\nDuctAPE.update_system_residual!\nDuctAPE.estimate_states!","category":"page"},{"location":"DuctAPE/api/private_process/#DuctAPE.system_residual","page":"Process","title":"DuctAPE.system_residual","text":"system_residual(state_variables, sensitivity_parameters, constants)\n\nThe residual function for external solvers.\n\nArguments\n\nstate_variables::Vector{Float} : the state variables\nsensitivity_parameters::Vector{Float} : parameters to which the solution derivatives are sensitive\nconstants::NamedTuple : parameters to which the solution derivatives are constant\n\nReturs\n\nresid::Vector{Float} : residual vector\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_process/#DuctAPE.system_residual!","page":"Process","title":"DuctAPE.system_residual!","text":"system_residual!(resid, state_variables, sensitivity_parameters, constants)\n\nIn-place version of system_residual.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_process/#DuctAPE.update_system_residual!","page":"Process","title":"DuctAPE.update_system_residual!","text":"update_system_residual!(\n solver_options::SolverOptionsType\n resid,\n vz_est,\n vz_rotor,\n vtheta_est,\n vtheta_rotor,\n Cm_est,\n Cm_wake,\n solve_parameter_cache_dims,\n)\n\nUpdate the residual for external solvers.\n\nArguments\n\n`solver_options::SolverOptionsType\nresid::Vector{Float} : residual vector\nvz_est::Vector{Float} : axial induced rotor velocity estimate container\nvz_rotor::Vector{Float} : axial induced rotor velocity state container\nvtheta_est::Vector{Float} : tangential induced rotor velocity estimate container\nvtheta_rotor::Vector{Float} : tangential induced rotor velocity state container\nCm_est::Vector{Float} : absolute meridional wake control point velocity estimate container\nCm_wake::Vector{Float} : absolute meridional wake control point velocity state container\nsolve_parameter_cache_dims::Vector{Float} : dimensions of state vectors to use in accessing the residual vector\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_process/#DuctAPE.estimate_states!","page":"Process","title":"DuctAPE.estimate_states!","text":"estimate_states!(\n solve_containers,\n vz_rotor,\n vtheta_rotor,\n Cm_wake,\n operating_point,\n ivr,\n ivw,\n linsys,\n blade_elements,\n wakeK,\n idmaps;\n verbose=false,\n)\n\nEstimate velocity states.\n\nArguments\n\nsolve_containers::NamedTuple : cache for intermediate values in solve\nvz_rotor::Vector{Float} : axial induced rotor velocity state container\nvtheta_rotor::Vector{Float} : tangential induced rotor velocity state container\nCm_wake::Vector{Float} : absolute meridional wake control point velocity state container\noperating_point::NamedTuple : Named tuple containing operating_point information\nivr::NamedTuple : unit induced velocities on rotor(s)\nivw::NamedTuple : unit induced velocities on wake\nlinsys::NamedTuple : vectors and matricies comprising the panel method linear system\nblade_elements::NamedTuple : blade element geometry and airfoil polar information\nwakeK::Vector{Float} : geometric constants used in caculating wake strengths\nidmaps::NamedTuple : index maps used throughout solve\n\nKeyword Arguments\n\nverbose::Bool=false : flag for verbose print statements\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_process/#Solve-Utilities","page":"Process","title":"Solve Utilities","text":"","category":"section"},{"location":"DuctAPE/api/private_process/","page":"Process","title":"Process","text":"DuctAPE.extract_initial_guess\nDuctAPE.extract_state_variables","category":"page"},{"location":"DuctAPE/api/private_process/#DuctAPE.extract_initial_guess","page":"Process","title":"DuctAPE.extract_initial_guess","text":"extract_initial_guess(\n solver_options::SolverOptionsType, sensitivity_parameters, state_dims\n)\n\nExtract initial guess from the solve parameters cache vector.\n\nArguments\n\nsolver_options::SolverOptionsType : used for dispatch\nsensitivity_parameters::Vector{Float} : vector form of solve parameter cache passed into the solver.\nstate_dims::NamedTuple : dimensions and indices of state variables within the solve parameter cache vector\n\nReturns\n\ninitial_guess::Vector{Float}` : a vector of the solver initial guess\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_process/#DuctAPE.extract_state_variables","page":"Process","title":"DuctAPE.extract_state_variables","text":"extract_state_variables(solver_options::SolverOptionsType, vars, dims)\n\nReshape the state variables from a single vector, to multiple arrays.\n\nArguments\n\nReturns if solver_options <: CSORSolverOptions\n\nGamr::type : Blade element circulation strengths\nsigr::type : Rotor source panel strengths\ngamw::type : Wake vortex panel strengths\n\nReturns if solver_options <: Union{ExternalSolverOptions, PolyAlgorithmOptions}\n\nvz_rotor::Vector{Float} : axial induced rotor velocity state container\nvtheta_rotor::Vector{Float} : tangential induced rotor velocity state container\nCm_wake::Vector{Float} : absolute meridional wake control point velocity state container\n\n\n\n\n\n","category":"function"},{"location":"C4Blade/api/#Index","page":"API Reference","title":"Index","text":"","category":"section"},{"location":"C4Blade/api/","page":"API Reference","title":"API Reference","text":"Pages = [\"C4Blade/api.md\"]\nDepth = 5","category":"page"},{"location":"C4Blade/api/","page":"API Reference","title":"API Reference","text":"Modules=[DuctAPE.C4Blade]","category":"page"},{"location":"DuctAPE/api/private_preprocess/","page":"Preprocess","title":"Preprocess","text":"Pages = [\"private_preprocess.md\"]\nDepth = 5","category":"page"},{"location":"DuctAPE/api/private_preprocess/#General","page":"Preprocess","title":"General","text":"","category":"section"},{"location":"DuctAPE/api/private_preprocess/","page":"Preprocess","title":"Preprocess","text":"DuctAPE.set_index_maps\nDuctAPE.precompute_parameters\nDuctAPE.precompute_parameters!","category":"page"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.set_index_maps","page":"Preprocess","title":"DuctAPE.set_index_maps","text":"set_index_maps(\n npanels,\n ncenterbody_inlet,\n nwake_sheets,\n dte_minus_cbte,\n wnm,\n wenids,\n nwp,\n nwsp,\n nbn,\n ndp,\n riiw,\n nrotor,\n)\n\nSet values for index map to be used throughout solve and post-process.\n\nArguments\n\nnpanels : paneling_constants.npanels\nncenterbody_inlet : paneling_constants.ncenterbody_inlet\nnwake_sheets : paneling_constants.nwake_sheets\ndte_minus_cbte : paneling_constants.dte_minus_cbte\nwnm : wake_vortex_panels.nodemap\nwenids : wake_vortex_panels.endnodeidxs\nnwp : problem_dimensions.nwp\nnwsp : problem_dimensions.nwsp\nnbn : problem_dimensions.nbn\nndp : body_vortex_panels.npanel[1]\nriiw : rotor_indices_in_wake\nnrotor : problem_dimensions.nrotor\n\nReturns\n\nidmaps::NamedTuple : A named tuple containing index mapping used in bookkeeping throughout solve and post-process\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.precompute_parameters","page":"Preprocess","title":"DuctAPE.precompute_parameters","text":"precompute_parameters(\n ducted_rotor,\n operating_point;\n grid_solver_options=GridSolverOptions(),\n integration_options=IntegrationOptions(),\n autoshiftduct=true,\n itcpshift=0.05,\n axistol=1e-15,\n tegaptol=1e1 * eps(),\n finterp=(x,y,xp)->FLOWMath.akima(x,y,xp,2.0*eps(),eps()),\n silence_warnings=true,\n verbose=false,\n)\n\nOut of place main pre-processing function that computes all the required parameters for the solve.\n\nArguments\n\nducted_rotor::DuctedRotor : A DuctedRotor object\noperating_point::OperatingPoint : A OperatingPoint object\n\nKeyword Arguments\n\ngrid_solver_options::GridSolverOptionsType=GridSolverOptions() : A GridSolverOptionsType object\nintegration_options::IntegrationMethod=IntegrationOptions() : An IntegrationMethod object\nautoshiftduct::Bool=true : flag to shift duct geometry based on rotor tip radius\nitcpshift::Float=0.05 : value used in positioning the internal pseudo control point in the solid bodies. Default is DFDC hard-coded value.\naxistol::Float=1e-15 : tolerance for how close to the axis of rotation to be considered on the axis.\ntegaptol::Float=1e1 * eps() : tolerance for how large of a trailing edge gap is considered a gap.\nfinterp::Function=FLOWMath.akima : interpolation method for re-interpolating body coordinates\nsilence_warnings::Bool=true : flag to silence warnings\nverbose::Bool=false : flag to print verbose statements\n\nReturns\n\nivr::NamedTuple : A named tuple containing arrays of induced velocities on the rotors\nivw::NamedTuple : A named tuple containing arrays of induced velocities on the wake\nivb::NamedTuple : A named tuple containing arrays of induced velocities on the bodies\nlinsys::NamedTuple : A named tuple containing cacheable data for the linear system, including:\nA_bb::Array{Float} : AIC (LHS) matrix for the panel method system\nb_bf::Array{Float} : Initial system RHS vector based on freestrem magnitude\nA_br::Array{Float} : Unit normal velocity from rotors onto body panels\nA_pr::Array{Float} : Unit normal velocity from rotors onto body internal psuedo control points\nA_bw::Array{Float} : Unit normal velocity from wake onto body panels\nA_pw::Array{Float} : Unit normal velocity from wake onto body internal psuedo control points\nA_bb_LU::LinearAlgebra.LU : LinearAlgebra LU factorization of the LHS matrix\nlu_decomp_flag::Vector{Bool} : flag for whether factorization was successful\nblade_elements::NamedTuple : A named tuple containing cacheable blade element information (see docs for interpolate_blade_elements)\nairfoils::Vector{AFType} : A matrix of airfoil types associated with each of the blade elements\nwakeK::Matrix{Float} : A matrix of precomputed geometric constants used in the calculation of the wake vortex strengths\nidmaps::NamedTuple : A named tuple containing index mapping used in bookkeeping throughout solve and post-process\npanels::NamedTuple : A named tuple of panel objects including:\nbody_vortex_panels::NamedTuple : the named tuple containing the body vortex panel information\nrotor_source_panels::NamedTuple : the named tuple containing the rotor source panel information\nwake_vortex_panels::NamedTuple : the named tuple containing the wake vortex panel information\nproblem_dimensions::ProblemDimensions : A ProblemDimensions object\n\n\n\n\n\nprecompute_parameters(\n rp_duct_coordinates,\n rp_centerbody_coordinates,\n wake_grid,\n rotor_indices_in_wake,\n Rtips,\n Rhubs,\n rotor,\n paneling_constants,\n operating_point,\n integration_options,\n problem_dimensions=nothing;\n itcpshift=0.05,\n axistol=1e-15,\n tegaptol=1e1 * eps(),\n silence_warnings=true,\n verbose=false,\n)\n\nAn alternate version of precompute_parameters allowing for user defined geometry that does not go through a re-panling step (use with caution).\n\nThe first inputs are the outputs of the reinterpolate_geometry and get_blade_ends_from_body_geometry functions.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.precompute_parameters!","page":"Preprocess","title":"DuctAPE.precompute_parameters!","text":"precompute_parameters!(\n ivr,\n ivw,\n blade_element_cache,\n linsys,\n wakeK,\n ducted_rotor,\n operating_point,\n prepost_containers,\n problem_dimensions;\n grid_solver_options=GridSolverOptions(),\n integration_options=IntegrationOptions(),\n autoshiftduct=true,\n itcpshift=0.05,\n axistol=1e-15,\n tegaptol=1e1 * eps(),\n finterp=(x,y,xp)->FLOWMath.akima(x,y,xp,2.0*eps(),eps()),\n silence_warnings=true,\n verbose=false,\n)\n\nIn-place version of precompute_parameters.\n\n\n\n\n\nprecompute_parameters!(\n ivr,\n ivw,\n blade_element_cache,\n linsys,\n wakeK,\n wake_grid,\n rp_duct_coordinates,\n rp_centerbody_coordinates,\n rotor_indices_in_wake,\n rotor,\n paneling_constants,\n operating_point,\n prepost_containers,\n problem_dimensions=nothing;\n integration_options=IntegrationOptions(),\n itcpshift=0.05,\n axistol=1e-15,\n tegaptol=1e1 * eps(),\n finterp=(x,y,xp)->FLOWMath.akima(x,y,xp,2.0*eps(),eps()),\n silence_warnings=true,\n verbose=false,\n)\n\nIn-place version of the precompute_parameters function by-passing the geometry reinterpolateion. (Use with caution)\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#Geometry","page":"Preprocess","title":"Geometry","text":"","category":"section"},{"location":"DuctAPE/api/private_preprocess/","page":"Preprocess","title":"Preprocess","text":"DuctAPE.reinterpolate_geometry\nDuctAPE.reinterpolate_geometry!\nDuctAPE.generate_all_panels\nDuctAPE.generate_all_panels!","category":"page"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.reinterpolate_geometry","page":"Preprocess","title":"DuctAPE.reinterpolate_geometry","text":"reinterpolate_geometry(\n problem_dimensions,\n duct_coordinates,\n centerbody_coordinates,\n rotor,\n paneling_constants;\n autoshiftduct=true,\n grid_solver_options=GridSolverOptions(),\n finterp=(x,y,xp)->FLOWMath.akima(x,y,xp,2.0*eps(),eps()),\n verbose=false,\n silence_warnings=true,\n)\n\nRe-interpolate the body geometry and return compatible body and way geometry.\n\nArguments\n\nproblem_dimensions::ProblemDimensions : A ProblemDimensions object\nduct_coordinates::Matrix{Float} : [z,r] coordinates of duct geometry\ncenterbody_coordinates::Matrix{Float} : [z,r] coordinates of centerbody geometry\nrotor::Rotor : A Rotor object\npaneling_constants::PanelingConstants : A PanelingConstants object\n\nKeyword Arguments\n\nautoshiftduct::Bool=true : flag to shift duct geometry based on rotor tip radius\ngrid_solver_options::SolverOptionsType=GridSolverOptions() : options for the wake grid position solver\nfinterp::Function=FLOWMath.akima : interpolation method for re-interpolating body coordinates\nverbose::Bool=false : flag to print verbose statements\nsilence_warnings::Bool=true : flag to silence warnings\n\nReturns\n\nwake_grid::Array{Float} : array containig the z and r elliptic grid points defning the wake geometry.\nrp_duct_coordinates::Matrix{Float} : matrix containing the re-paneled duct coordinates\nrp_centerbody_coordinates::Matrix{Float} : matrix containing the re-paneled centerbody coordinates\nrotor_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).\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.reinterpolate_geometry!","page":"Preprocess","title":"DuctAPE.reinterpolate_geometry!","text":"reinterpolate_geometry!(\n wake_grid,\n rp_duct_coordinates,\n rp_centerbody_coordinates,\n rotor_indices_in_wake,\n duct_coordinates,\n centerbody_coordinates,\n rotor,\n blade_element_cache,\n paneling_constants;\n autoshiftduct=true,\n grid_solver_options=GridSolverOptions(),\n finterp=(x,y,xp)->FLOWMath.akima(x,y,xp,2.0*eps(),eps()),\n verbose=false,\n silence_warnings=true,\n)\n\nIn-place version of reinterpolate_geometry.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.generate_all_panels","page":"Preprocess","title":"DuctAPE.generate_all_panels","text":"generate_all_panels(\n rp_duct_coordinates,\n rp_centerbody_coordinates,\n nwake_sheets,\n rotor_indices_in_wake,\n rotorzloc,\n wake_grid;\n itcpshift=0.05,\n axistol=1e-15,\n tegaptol=1e1 * eps(),\n silence_warnings=true,\n)\n\nFunction that calls all of the various panel generation functions are returns a named tuple containing all the panels\n\nArguments\n\nrp_duct_coordinates::Matrix{Float} : matrix containing the re-paneled duct coordinates\nrp_centerbody_coordinates::Matrix{Float} : matrix containing the re-paneled centerbody coordinates\nnwake_sheets::Int : number of wake sheets\nrotor_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).\nrotorzloc:Vector{Float} : axial locations of rotor lifting lines (contained in Rotor)\nwake_grid::Array{Float} : array containig the z and r elliptic grid points defning the wake geometry.\n\nKeyword Arguments\n\nitcpshift::Float=0.05 : value used in positioning the internal pseudo control point in the solid bodies. Default is DFDC hard-coded value.\naxistol::Float=1e-15 : tolerance for how close to the axis of rotation to be considered on the axis.\ntegaptol::Float=1e1 * eps() : tolerance for how large of a trailing edge gap is considered a gap.\nsilence_warnings::Bool=true : flag to silence warnings\n\nReturns\n\npanels::NamedTuple : A named tuple of named tuples containing paneling information, including:\nbody_vortex_panels::NamedTuple\nrotor_source_panels::NamedTuple\nwake_vortex_panels::NamedTuple\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.generate_all_panels!","page":"Preprocess","title":"DuctAPE.generate_all_panels!","text":"generate_all_panels!(\n panels,\n wake_grid,\n rp_duct_coordinates,\n rp_centerbody_coordinates,\n rotor_indices_in_wake,\n rotorzloc,\n nwake_sheets;\n itcpshift=0.05,\n axistol=1e-15,\n tegaptol=1e1 * eps(),\n silence_warnings=true,\n)\n\nIn-place version of generate_all_panels.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#Wake","page":"Preprocess","title":"Wake","text":"","category":"section"},{"location":"DuctAPE/api/private_preprocess/","page":"Preprocess","title":"Preprocess","text":"DuctAPE.discretize_wake\nDuctAPE.generate_wake_grid\nDuctAPE.generate_wake_grid!\nDuctAPE.initialize_wake_grid\nDuctAPE.initialize_wake_grid!\nDuctAPE.relax_grid!\nDuctAPE.solve_elliptic_grid!\nDuctAPE.solve_elliptic_grid\nDuctAPE.elliptic_grid_residual!\nDuctAPE.backward_stencil_1\nDuctAPE.center_stencil_1\nDuctAPE.center_stencil_2\nDuctAPE.center_stencil_2_mixed\nDuctAPE.generate_wake_panels\nDuctAPE.generate_wake_panels!\nDuctAPE.get_wake_k\nDuctAPE.get_wake_k!","category":"page"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.discretize_wake","page":"Preprocess","title":"DuctAPE.discretize_wake","text":"discretize_wake(\n duct_coordinates,\n centerbody_coordinates,\n rotorzloc, # rotor axial locations\n wake_length,\n npanels,\n dte_minus_cbte;\n)\n\nCalculate wake sheet panel node z-coordinates.\n\nArguments\n\nduct_coordinates::Matrix{Float} : Array of input duct coordinates\ncenterbody_coordinates::Matrix{Float} : Array of input centerbody_coordinates coordinates\nrotorzloc ::Vector{Float} : rotor axial locations\nwake_length::Float : non-dimensional length of wake to extend beyond aft-most body trailing edge.\nnpanels::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]\ndte_minus_cbte::Float : indicator as to whether the duct trailing edge minus the centerbody trailing edge is positive, zero, or negative.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.generate_wake_grid","page":"Preprocess","title":"DuctAPE.generate_wake_grid","text":"generate_wake_grid(\n problem_dimensions,\n rp_duct_coordinates,\n rp_centerbody_coordinates,\n Rhub1,\n Rtip1,\n tip_gap1,\n zwake;\n grid_solver_options=GridSolverOptions(),\n verbose=false,\n silence_warnings=true,\n)\n\nInitialize and solve for elliptic grid on which wake sheets are defined.\n\nArguments\n\nproblem_dimensions:: : A ProblemDimensions object\nrp_duct_coordinates:: : repaneled duct coordinates\nrp_centerbody_coordinates:: : repaneled centerbody coordinates\nRhub1:: : Hub radius of first rotor\nRtip1:: : Tip radius of first rotor\ntip_gap1:: : Tip gap of first rotor (MUST BE ZERO for now)\nzwake:: : axial positions of wake sheet panel nodes\n\nKeyword Arguments\n\ngrid_solver_options::GridSolverOptionsType=GridSolverOptions() : options for solving the elliptic grid.\nverbose::Bool=false : flag to print verbose statements\nsilence_warnings::Bool=true : flag to supress warnings\n\nReturns\n\nwake_grid::Array{Float,3} : 3D Array of axial and radial wake_grid points after solution of elliptic system.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.generate_wake_grid!","page":"Preprocess","title":"DuctAPE.generate_wake_grid!","text":"generate_wake_grid!(\n wake_grid,\n rp_duct_coordinates,\n rp_centerbody_coordinates,\n Rhub1,\n Rtip1,\n tip_gap1,\n zwake;\n grid_solver_options=grid_solver_options,\n verbose=false,\n silence_warnings=true,\n)\n\nIn-place version of generate_wake_grid.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.initialize_wake_grid","page":"Preprocess","title":"DuctAPE.initialize_wake_grid","text":"initialize_wake_grid(rp_duct_coordinates, rp_centerbody_coordinates, zwake, rwake)\n\nInitialize the wake grid.\n\nArguments:\n\nrp_duct_coordinates::Matrix{Float} : The re-paneled duct coordinates\nrp_centerbody_coordinates::Matrix{Float} : The re-paneled centerbody coordinates\nzwake::Vector{Float} : The axial positions of the wake sheet panel nodes\nrwake::Vector{Float} : The radial positions of the blade elements for the foremost rotor\n\nReturns:\n\nwake_grid::Array{Float,3} : 3D Array of axial and radial wake_grid points\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.initialize_wake_grid!","page":"Preprocess","title":"DuctAPE.initialize_wake_grid!","text":"initialize_wake_grid!(\n wake_grid, rp_duct_coordinates, rp_centerbody_coordinates, zwake, rwake\n)\n\nIn-place version of initialize_wake_grid.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.relax_grid!","page":"Preprocess","title":"DuctAPE.relax_grid!","text":"relax_grid!(\n grid_solver_options::GridSolverOptionsType,\n wake_grid;\n verbose=false,\n silence_warnings=true,\n tabchar=\" \",\n ntab=1,\n)\n\nRelax/Solve initial wake grid according to elliptic system of equations.\n\nArguments\n\n`gridsolveroptions::GridSolverOptionsType' : options for elliptic grid solver\nwake_grid::Array{Float,3} : Initialized wake grid\n\nKeyword Arguments\n\n`verbose=false::' : flag for printing verbose statements\n`silence_warnings=true::' : flag for supressing warnings\n`tabchar::String=\" \"::' : string to use for tabbing over verbose statements.\n`ntab::Int=1' : number of tabs for printing verbose statements\n\n\n\n\n\nrelax_grid!(xg, rg, nxi, neta; iteration_limit, atol)\n\nRelax wakegrid using elliptic wakegrid solver.\n\nArguments:\n\nwake_grid::Array{Float} : initial guess for grid points.\n\nKeyword Arguments:\n\niteration_limit::Int : maximum number of iterations to run, default=100\natol::Float : convergence tolerance, default = 1e-9\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.solve_elliptic_grid!","page":"Preprocess","title":"DuctAPE.solve_elliptic_grid!","text":"solve_elliptic_grid!(\n wake_grid;\n algorithm=:trust_region,\n autodiff=:forward,\n atol=1e-14,\n iteration_limit=10,\n converged=[false],\n verbose=false,\n)\n\nSolve for elliptic grid using a non-SLOR approach that is compatible with ImplicitAD\n\nArguments:\n\nwake_grid::Array{Float} : initial guess for grid points.\n\nKeyword Arguments:\n\nalgorithm::Symbol=:trust_region : NLsolve algorithm type\nautodiff::Symbol=:forward : NLsolve derivatives option\natol::Float=1e-10 : convergence tolerance, default = 1e-9\niteration_limit::Int=10 : maximum number of iterations to run, default=100\nconverged::Vector{Bool}=[false] : convergence flag\nverbose::Bool=false : flag to print verbose statements\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.solve_elliptic_grid","page":"Preprocess","title":"DuctAPE.solve_elliptic_grid","text":"solve_elliptic_grid!(x,p)\n\nSolve for elliptic grid using a non-SLOR approach that is compatible with ImplicitAD\n\nArguments:\n\nx::Vector{Float} : inputs (including initial guess for wake grid points)\np::NamedTuple : constant parameters\n\nReturns:\n\nconverged_states::Vector{Float} : converged states for grid solver\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.elliptic_grid_residual!","page":"Preprocess","title":"DuctAPE.elliptic_grid_residual!","text":"elliptic_grid_residual!(r, y, x, p)\n\nResidual function for elliptic grid solver.\n\nNote: We assume grid has radial lines of constant axial position (as is done in the grid initialization) such that z'(ξ)=1.0 and z''(ξ)=z'(η)=z''(η)=0.0.\n\nArguments\n\nr::Vector{Float} : residual values\ny::Vector{Float} : states\nx::Vector{Float} : inputs (to which derivatives are sensitive)\np::Vector{Float} : constants\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.backward_stencil_1","page":"Preprocess","title":"DuctAPE.backward_stencil_1","text":"backward_stencil_1(f, x)\n\nThree-point, backward difference scheme on a non-uniform grid.\n\nArguments:\n\nf::AbstractMatrix{Float} : f(x) for x{i-2}:x{i}\nx::AbstractVector{Float} : [x{i-2}:x{i}]\n\nReturns:\n\nf'(x)::Float : ∂f/∂x at x_i\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.center_stencil_1","page":"Preprocess","title":"DuctAPE.center_stencil_1","text":"center_stencil_1(f, x)\n\nThree-point, central difference scheme on a non-uniform grid, for first derivatives.\n\nArguments:\n\nf::AbstractMatrix{Float} : f(x) for x{i-1}:x{i+1}\nx::AbstractVector{Float} : [x{i-1}:x{i+1}]\n\nReturns:\n\nf'(x)::Float : ∂f/∂x at x_i\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.center_stencil_2","page":"Preprocess","title":"DuctAPE.center_stencil_2","text":"center_stencil_2(f, x)\n\nThree-point, central difference scheme on a non-uniform grid, for second derivatives.\n\nArguments:\n\nf::AbstractMatrix{Float} : f(x) for x{i-1}:x{i+1}\nx::AbstractVector{Float} : [x{i-1}:x{i+1}]\n\nReturns:\n\nf''(x)::Float : ∂^2f/∂x^2 at x_i\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.center_stencil_2_mixed","page":"Preprocess","title":"DuctAPE.center_stencil_2_mixed","text":"center_stencil_2_mixed(f, x, y)\n\nThree-point, central difference scheme on a non-uniform grid, for mixed derivatives. Uses a consecutive first derivative central difference (center_stencil_1) in the x-dimension then another centeral difference of the f'(x) values in the y-dimension.\n\nArguments:\n\nf::AbstractMatrix{Float} : f(x,y) for x{i-1}:x{i+1} and y{i-1}:y{i+1}\nx::AbstractVector{Float} : [x{i-1}:x{i+1}]\ny::AbstractVector{Float} : [y{i-1}:y{i+1}]\n\nReturns:\n\nf'(x,y)::Float : ∂^2f/∂x∂y at x_ij\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.generate_wake_panels","page":"Preprocess","title":"DuctAPE.generate_wake_panels","text":"generate_wake_panels(wake_grid)\n\nGenerate paneling for each wake sheet emanating from the rotor blade elements.\n\nArguments:\n\nwake_grid::Array{Float,3} : axial and radial locations of each wake_grid point (after relaxation/solution)\n\nReturns:\n\nwake_vortex_panels::NamedTuple : A named tuple of panel values describing the wake vortex panels\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.generate_wake_panels!","page":"Preprocess","title":"DuctAPE.generate_wake_panels!","text":"generate_wake_panels!(wake_panels, wake_grid)\n\nIn-place version of generate_wake_panels.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.get_wake_k","page":"Preprocess","title":"DuctAPE.get_wake_k","text":"get_wake_k(r, nwn)\n\nCalculate geometric constant for use in later calculation of wake panel node strengths.\n\nArguments\n\nr::Vector{Float} : Vector of wake panel node radial positions\n\nReturns\n\nK::Vector{Float} : Vector of geometric constants used in calculation of panel node strengths.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.get_wake_k!","page":"Preprocess","title":"DuctAPE.get_wake_k!","text":"get_wake_k!(K, r)\n\nIn-place version of get_wake_k.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#Bodies","page":"Preprocess","title":"Bodies","text":"","category":"section"},{"location":"DuctAPE/api/private_preprocess/","page":"Preprocess","title":"Preprocess","text":"DuctAPE.reinterpolate_bodies!\nDuctAPE.place_duct!","category":"page"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.reinterpolate_bodies!","page":"Preprocess","title":"DuctAPE.reinterpolate_bodies!","text":"reinterpolate_bodies!(\n rp_duct_coordinates,\n rp_centerbody_coordinates,\n duct_coordinates,\n centerbody_coordinates,\n zwake,\n ncenterbody_inlet,\n nduct_inlet;\n finterp=FLOWMath.akima,\n)\n\nReinterpolate duct and centerbody coordinates in order to make them compatible with the calculated wake sheet panel axial positions.\n\nArguments\n\nrp_duct_coordinates::Matrix{Float} : the re-paneled duct coordinates\nrp_centerbody_coordinates::Matrix{Float} : the re-paneled centerbody coordinates\nduct_coordinates::Matrix{Float} : the input duct coordinates\ncenterbody_coordinates::Matrix{Float} : the input centerbody coordinates\nzwake::Matrix{Float} : the wake sheet panel node axial positions\nncenterbody_inlet::Matrix{Float} : the number of panels to use for the centerbody inlet\nnduct_inlet::Matrix{Float} : the number of panels to use for the duct inlet\n\nKeyword Arguments\n\nfinterp::Function=FLOWMath.akima : interpolation method\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.place_duct!","page":"Preprocess","title":"DuctAPE.place_duct!","text":"place_duct!(rp_duct_coordinates, Rtip, rotorzloc, tip_gap)\n\nTransform the duct radial coordinates such that the leading rotor radius touches the duct wall.\n\nNote 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.\n\nArguments\n\nrp_duct_coordinates::Matrix{Float} : the re-paneled duct coordinates\nRtip::Vector{Float} : Tip radii for the rotor(s)\nrotorzloc::Vector{Float} : axial position(s) of the rotor(s)\ntip_gap::Vector{Float} : tip gap for the fore-most rotor (MUST BE ZERO for now)\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#Rotors","page":"Preprocess","title":"Rotors","text":"","category":"section"},{"location":"DuctAPE/api/private_preprocess/","page":"Preprocess","title":"Preprocess","text":"DuctAPE.interpolate_blade_elements\nDuctAPE.interpolate_blade_elements!\nDuctAPE.get_blade_ends_from_body_geometry\nDuctAPE.get_blade_ends_from_body_geometry!\nDuctAPE.get_local_solidity\nDuctAPE.get_stagger\nDuctAPE.generate_rotor_panels\nDuctAPE.generate_rotor_panels!","category":"page"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.interpolate_blade_elements","page":"Preprocess","title":"DuctAPE.interpolate_blade_elements","text":"interpolate_blade_elements(\n rsp, Rtips, Rhubs, rotor_panel_centers, nbe; finterp=FLOWMath.linear\n)\n\nInterpolate blade elements based on Rotor inputs and number of desired blade elements (from number of wake sheet in PanelingConstants input)\n\nArguments\n\nrsp::Rotor : A Rotor object\n`Rtips::Vector{Float}' : Vector of rotor tip radii\n`Rhubs::Vector{Float}' : Vector of rotor hub radii\n`rotorpanelcenters::Vector{Float}' : Vector of rotor panel centers\nnbe::Int : number of blade elements per rotor\n\nKeyword Arguments\n\nfinterp::Function=FLOWMath.linear : interpolation method (note, using Akima splines as is done for the body geometry can lead to negative chord in some cases)\n\nReturns\n\nblade_element_cache::NamedTuple : A named tuple containing the cacheable blade element information excluding the airfoil data.\nairfoils::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.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.interpolate_blade_elements!","page":"Preprocess","title":"DuctAPE.interpolate_blade_elements!","text":"interpolate_blade_elements!(\n blade_element_cache, rsp, rotor_panel_centers, nbe; finterp=FLOWMath.linear\n)\n\nIn-place version of interpolate_blade_elements.\n\nReturns\n\nairfoils::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.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.get_blade_ends_from_body_geometry","page":"Preprocess","title":"DuctAPE.get_blade_ends_from_body_geometry","text":"get_blade_ends_from_body_geometry(\n rp_duct_coordinates, rp_centerbody_coordinates, tip_gaps, rotorzloc\n)\n\nObtain rotor hub and tip radii based on duct and centerbody geometry.\n\nArguments\n\nvar::type :\nrp_duct_coordinates::Matrix{Float} : re-paneled duct coordinates\nrp_centerbody_coordinates::Matrix{Float} : re-paneled centerbody coordinates\ntip_gaps::Vector{Float} : gaps between blade tips and duct surface (MUST BE ZEROS for now)\nrotorzloc::Vector{Float} : rotor lifting line axial positions.\n\nReturns\n\nRtips::Vector{Float} : rotor tip radii\nRhubs::Vector{Float} : rotor hub radii\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.get_blade_ends_from_body_geometry!","page":"Preprocess","title":"DuctAPE.get_blade_ends_from_body_geometry!","text":"get_blade_ends_from_body_geometry!(\n Rtip,\n Rhub,\n rp_duct_coordinates,\n rp_centerbody_coordinates,\n tip_gaps,\n rotorzloc;\n silence_warnings=true,\n)\n\nIn-place version of get_blade_ends_from_body_geometry.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.get_local_solidity","page":"Preprocess","title":"DuctAPE.get_local_solidity","text":"get_local_solidity(B, chord, r)\n\nCalculate local solidity from local chord, radial position, and number of blades.\n\nArguments\n\nB::Float : number of blades on rotor (usually an integer, but not necessarily).\nchord::Vector{Float} : chord lengths at each radial station.\nr::Vector{Float} : dimensional radial positions.\n\nReturns\n\nsolidity::Vector{Float} : local solidity at each radial station\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.get_stagger","page":"Preprocess","title":"DuctAPE.get_stagger","text":"get_stagger(twists)\n\nConvert twist angle to stagger angle\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.generate_rotor_panels","page":"Preprocess","title":"DuctAPE.generate_rotor_panels","text":"generate_rotor_panels(rotorzloc, wake_grid, rotor_indices_in_wake, nwake_sheets)\n\nGenerate rotor panel objects.\n\nArguments\n\nrotorzloc::Vector{Float} : rotor lifting line axial position\nwake_grid::Array{Float,3} : wake elliptic grid axial and radial locations\nrotor_indices_in_wake::Vector{Int} : indices of where along wake the rotors are placed\nnwake_sheets::Int : number of wake sheets\n\nReturns\n\nrotor_source_panels::NamedTuple : A named tuple containing the rotor source panel variables.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.generate_rotor_panels!","page":"Preprocess","title":"DuctAPE.generate_rotor_panels!","text":"generate_rotor_panels!(\n rotor_source_panels, rotorzloc, wake_grid, rotor_indices_in_wake, nwake_sheets\n)\n\nIn-place version of generate_rotor_panels.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#Induced-Velocities","page":"Preprocess","title":"Induced Velocities","text":"","category":"section"},{"location":"DuctAPE/api/private_preprocess/","page":"Preprocess","title":"Preprocess","text":"DuctAPE.calculate_unit_induced_velocities\nDuctAPE.calculate_unit_induced_velocities!\nDuctAPE.initialize_linear_system\nDuctAPE.initialize_linear_system!","category":"page"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.calculate_unit_induced_velocities","page":"Preprocess","title":"DuctAPE.calculate_unit_induced_velocities","text":"calculate_unit_induced_velocities(problem_dimensions, panels, integration_options)\n\nCalculate all the unit-induced velocties of all panels on all control points\n\nArguments\n\nproblem_dimensions::ProblemDimensions : A ProblemDimensions object\npanels::NamedTuple : A named tuple containing all the paneling information\nintegration_options::IntegrationOptions : Options used for integration of velocity kernals across panels\n\nReturns\n\nivr::NamedTuple : A named tuple containing arrays of induced velocities on the rotors\nivw::NamedTuple : A named tuple containing arrays of induced velocities on the wake\nivb::NamedTuple : A named tuple containing arrays of induced velocities on the bodies\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.calculate_unit_induced_velocities!","page":"Preprocess","title":"DuctAPE.calculate_unit_induced_velocities!","text":"calculate_unit_induced_velocities!(ivr, ivw, ivb, panels, integration_options)\n\nIn-place version of calculate_unit_induced_velocities.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.initialize_linear_system","page":"Preprocess","title":"DuctAPE.initialize_linear_system","text":"initialize_linear_system(\n ivb,\n body_vortex_panels,\n rotor_source_panels,\n wake_vortex_panels,\n Vinf,\n integration_options,\n)\n\nSet up the linear system used in the panel method solve.\n\nArguments\n\nivb::NamedTuple : the named tuple containing all the unit induced velocities on the bodies\nbody_vortex_panels::NamedTuple : the named tuple containing the body vortex panel information\nrotor_source_panels::NamedTuple : the named tuple containing the rotor source panel information\nwake_vortex_panels::NamedTuple : the named tuple containing the wake vortex panel information\nVinf::Vector{Float} : the one-element vector containing the Freestream velocity magnitude\nintegration_options::IntegrationOptions : the integration options used in integrating the panel induced velocities\n\nReturns\n\nlinsys::NamedTuple : A named tuple containing cacheable data for the linear system, including:\nA_bb::Array{Float} : AIC (LHS) matrix for the panel method system\nb_bf::Array{Float} : Initial system RHS vector based on freestrem magnitude\nA_br::Array{Float} : Unit normal velocity from rotors onto body panels\nA_pr::Array{Float} : Unit normal velocity from rotors onto body internal psuedo control points\nA_bw::Array{Float} : Unit normal velocity from wake onto body panels\nA_pw::Array{Float} : Unit normal velocity from wake onto body internal psuedo control points\nA_bb_LU::LinearAlgebra.LU : LinearAlgebra LU factorization of the LHS matrix\nlu_decomp_flag::Vector{Bool} : flag for whether factorization was successful\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.initialize_linear_system!","page":"Preprocess","title":"DuctAPE.initialize_linear_system!","text":"initialize_linear_system!(\n linsys,\n ivb,\n body_vortex_panels,\n rotor_source_panels,\n wake_vortex_panels,\n Vinf,\n intermediate_containers,\n integration_options,\n)\n\nIn-place version of initialize_linear_system.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#Unit-Induced-Velocities","page":"Preprocess","title":"Unit Induced Velocities","text":"","category":"section"},{"location":"DuctAPE/api/private_preprocess/","page":"Preprocess","title":"Preprocess","text":"DuctAPE.calculate_xrm\nDuctAPE.calculate_xrm!\nDuctAPE.get_elliptics\nDuctAPE.vortex_ring_vz\nDuctAPE.vortex_ring_vz!\nDuctAPE.smoke_ring_vz\nDuctAPE.vortex_ring_vr\nDuctAPE.vortex_ring_vr!\nDuctAPE.source_ring_vz\nDuctAPE.source_ring_vz!\nDuctAPE.source_ring_vr\nDuctAPE.source_ring_vr!","category":"page"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.calculate_xrm","page":"Preprocess","title":"DuctAPE.calculate_xrm","text":"calculate_xrm(controlpoint, node)\n\nCalculate xi, rho, and m for vortex and/or source ring induced velocity calculation.\n\nReturns zeros if ring is on (or approximately on) the axis of rotation (zero radius).\n\nArguments\n\ncontrolpoint::Vector{Float} [z r] coordinates of point being influenced\nnode::Vector{Float} : [z r] coordinates of singularity ring\n\nReturns\n\nxi::Float : normalized relative axial position\nrho::Float : normalized relative radial position\nm::Float : Elliptic integral input\nrj::Float : radial position of the ring\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.calculate_xrm!","page":"Preprocess","title":"DuctAPE.calculate_xrm!","text":"calculate_xrm!(cache_vec, controlpoint, node)\n\nIn-place version of calculate_xrm.\n\nCache_vec is a vector used to hold intermediate values as well as the outputs.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.get_elliptics","page":"Preprocess","title":"DuctAPE.get_elliptics","text":"get_elliptics(m)\n\nCalculate value of elliptic functions for the given geometry parameter.\n\nArguments\n\nm::Float : Elliptic Function parameter\n\nReturns\n\nK::Float : K(m), value of elliptic function of the first kind at m.\nE::Float : E(m), value of eeliptic function of the second kind at m.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.vortex_ring_vz","page":"Preprocess","title":"DuctAPE.vortex_ring_vz","text":"vortex_ring_vz(xi, rho, m, r_influence, influence_length)\n\nAxial velocity induced by axisymmetric vortex ring.\n\nUses equivalent smoke ring induced velocity for self-induction, and returns zero if vortex ring is on axis of rotation (zero radius).\n\nArguments\n\nxi::Float : normalized z-coordinate, (z-zo)/ro\nrho::Float : normalized r-coordinate, r/ro\nm::Float : Elliptic Integral parameter, 4rho/sqrt(xi^2+(rho+1)^2)\nr_influence::Float : radial location of vortex ring, ro\ninfluence_length::Float : length of panel used in calculating self-induction\n\nReturns\n\nvz::Float : axially induced velocity of vortex ring\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.vortex_ring_vz!","page":"Preprocess","title":"DuctAPE.vortex_ring_vz!","text":"vortex_ring_vz!(xi, rho, m, r_influence, influence_length, cache_vec)\n\nSame as vortexringvz, but uses the cache_vec to store intermediate calculations.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.smoke_ring_vz","page":"Preprocess","title":"DuctAPE.smoke_ring_vz","text":"smoke_ring_vz(r_influence, influence_length)\n\nEquivalent \"smoke\" ring self-induced velocity.\n\nArguments\n\nr_influence::Float : radial position of ring (i.e. the ring raidus)\ninfluence_length::Float : length of influencing panel\n\nReturs\n\nvz::Float : axially induced velocity of vortex ring\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.vortex_ring_vr","page":"Preprocess","title":"DuctAPE.vortex_ring_vr","text":"vortex_ring_vr(xi, rho, m, r_influence)\n\nRadial velocity induced by axisymmetric vortex ring.\n\nReturns zero if vortex ring is on axis of rotation (zero radius), the point of influence is on the axis, or if self-inducing velocity.\n\nArguments\n\nxi::Float : normalized z-coordinate, (z-zo)/ro\nrho::Float : normalized r-coordinate, r/ro\nm::Float : Elliptic Integral parameter, 4rho/sqrt(xi^2+(rho+1)^2)\nr_influence::Float : radial location of vortex ring, ro\n\nReturns\n\nvr::Float : radially induced velocity of vortex ring\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.vortex_ring_vr!","page":"Preprocess","title":"DuctAPE.vortex_ring_vr!","text":"vortex_ring_vr!(xi, rho, m, r_influence, cache_vec)\n\nSame as vortexringvr, but uses the cache_vec to store intermediate calculations.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.source_ring_vz","page":"Preprocess","title":"DuctAPE.source_ring_vz","text":"source_ring_vz(xi, rho, m, r_influence)\n\nAxial velocity induced by axisymmetric source ring.\n\nReturns zero if source ring is on axis of rotation (zero radius), the point of influence is on the axis, or if self-inducing velocity.\n\nArguments:\n\nxi::Float : normalized z-coordinate, (z-zo)/ro\nrho::Float : normalized r-coordinate, r/ro\nm::Float : Elliptic Integral parameter, 4rho/sqrt(xi^2+(rho+1)^2)\nr_influence::Float : radial location of vortex ring, ro\n\nReturns:\n\nvz::Float : axially induced velocity of source ring\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.source_ring_vz!","page":"Preprocess","title":"DuctAPE.source_ring_vz!","text":"source_ring_vz!(xi, rho, m, r_influence, cache_vec)\n\nSame as sourceringvz, but uses cache_vec to store intermediate values.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.source_ring_vr","page":"Preprocess","title":"DuctAPE.source_ring_vr","text":"source_ring_vr(xi, rho, m, r_influence)\n\nRadial velocity induced by axisymmetric source ring.\n\nReturns zero if source ring is on axis of rotation (zero radius), the point of influence is on the axis, or if self-inducing velocity.\n\nArguments:\n\nxi::Float : normalized z-coordinate, (z-zo)/ro\nrho::Float : normalized r-coordinate, r/ro\nm::Float : Elliptic Integral parameter, 4rho/sqrt(xi^2+(rho+1)^2)\nr_influence::Float : radial location of vortex ring, ro\n\nReturns:\n\nvr::Float : radially induced velocity of source ring\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.source_ring_vr!","page":"Preprocess","title":"DuctAPE.source_ring_vr!","text":"source_ring_vr!(xi, rho, m, r_influence, cache_vec)\n\nSame as sourceringvr, but uses cache_vec to store intermediate values.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#Unit-Induced-Velocity-Matrices","page":"Preprocess","title":"Unit Induced Velocity Matrices","text":"","category":"section"},{"location":"DuctAPE/api/private_preprocess/","page":"Preprocess","title":"Preprocess","text":"DuctAPE.induced_velocities_from_vortex_panels_on_points\nDuctAPE.induced_velocities_from_vortex_panels_on_points!\nDuctAPE.induced_velocities_from_source_panels_on_points\nDuctAPE.induced_velocities_from_source_panels_on_points!\nDuctAPE.induced_velocities_from_trailing_edge_gap_panel!","category":"page"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.induced_velocities_from_vortex_panels_on_points","page":"Preprocess","title":"DuctAPE.induced_velocities_from_vortex_panels_on_points","text":"induced_velocities_from_vortex_panels_on_points(\n controlpoints,\n nodes,\n nodemap,\n influence_lengths,\n integration_options;\n integration_caches=nothing,\n)\n\nCalculate axial and radial components of induced velocity for a set of control points due to a set of axisymmetric vortex panels (bands).\n\nUsed 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.\n\nArguments\n\ncontrolpoints::Matrix{Float} [z r] coordinates of points being influenced\nnodes::Matrix{Float} : [z r] coordinates of vortex rings\nnodemap::Matrix{Int} : mapping from panel index to associated node indices\ninfluence_lengths::Vector{Float} : lengths over which vortex ring influence is applied on the surface.\nintegration_options::IntegrationOptions : integration options\n\nKeyword Arguments\n\nintegration_caches::NamedTuple=nothing : cache used in in-place quadrature functions.\n\nReturns\n\nVEL::Array{Float} : N-controlpoint x N-node x [vz, vr] array of induced velocity components\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.induced_velocities_from_vortex_panels_on_points!","page":"Preprocess","title":"DuctAPE.induced_velocities_from_vortex_panels_on_points!","text":"induced_velocities_from_vortex_panels_on_points!(\n VEL,\n controlpoint,\n node,\n nodemap,\n influence_length,\n integration_options;\n integration_caches=nothing,\n)\n\nIn-place version of induced_velocities_from_vortex_panels_on_points.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.induced_velocities_from_source_panels_on_points","page":"Preprocess","title":"DuctAPE.induced_velocities_from_source_panels_on_points","text":"induced_velocities_from_source_panels_on_points(\n controlpoints,\n nodes,\n nodemap,\n influence_lengths,\n integration_options;\n integration_caches=nothing,\n)\n\nCalculate axial and radial components of induced velocity for a set of control points due to a set of axisymmetric source panels (bands)\n\nUsed 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.\n\nArguments\n\ncontrolpoints::Matrix{Float} [z r] coordinates of points being influenced\nnodes::Matrix{Float} : [z r] coordinates of vortex rings\nnodemap::Matrix{Int} : mapping from panel index to associated node indices\ninfluence_lengths::Vector{Float} : lengths over which vortex ring influence is applied on the surface.\nintegration_options::IntegrationOptions : integration options\n\nReturns:\n\nVEL::Array{Float} : N-controlpoint x N-node x [vz, vr] array of induced velocity components\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.induced_velocities_from_source_panels_on_points!","page":"Preprocess","title":"DuctAPE.induced_velocities_from_source_panels_on_points!","text":"induced_velocities_from_source_panels_on_points!(\n VEL,\n controlpoint,\n node,\n nodemap,\n influence_length,\n integration_options;\n integration_caches=nothing,\n)\n\nIn-place version of induced_velocities_from_source_panels_on_points.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.induced_velocities_from_trailing_edge_gap_panel!","page":"Preprocess","title":"DuctAPE.induced_velocities_from_trailing_edge_gap_panel!","text":"induced_velocities_from_trailing_edge_gap_panel!(\n VEL,\n controlpoint,\n tenode,\n teinfluence_length,\n tendotn,\n tencrossn,\n teadjnodeidxs,\n integration_options;\n wake=false,\n integration_caches=nothing,\n)\n\nCalculate axial and radial components of induced velocity for a set of control points due to any trailing edge gap panels.\n\nUsed for getting the unit induced velocities due to the body body trailing edge gap panels on the body/rotor/wake.\n\nNote, this function is also used to calculate the influence of the wake ends rather than modeling a semi-infinite fortex sheet.\n\nArguments\n\nVEL::Array{Float} : N-controlpoint x N-node x [vz, vr] array of induced velocity components (modified in place)\ncontrolpoints::Matrix{Float} [z r] coordinates of points being influenced\nnodes::Matrix{Float} : [z r] coordinates of vortex rings\nnodemap::Matrix{Int} : mapping from panel index to associated node indices\ninfluence_lengths::Vector{Float} : lengths over which vortex ring influence is applied on the surface.\nstrengths::Matrix{Float} : vortex constant circulation values\nintegration_options::IntegrationOptions : integration options\n\nKeyword Arguments\n\nwake::Bool=false : flag to indicate if this is being used for a wake sheet.\nintegration_caches::NamedTuple=nothing : cache used in in-place quadrature functions.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#Panel-Method-Velocity-Functions","page":"Preprocess","title":"Panel Method Velocity Functions","text":"","category":"section"},{"location":"DuctAPE/api/private_preprocess/","page":"Preprocess","title":"Preprocess","text":"DuctAPE.vortex_aic_boundary_on_boundary\nDuctAPE.vortex_aic_boundary_on_boundary!\nDuctAPE.vortex_aic_boundary_on_field\nDuctAPE.vortex_aic_boundary_on_field!\nDuctAPE.add_kutta!\nDuctAPE.add_te_gap_aic!\nDuctAPE.source_aic\nDuctAPE.source_aic!\nDuctAPE.freestream_influence_vector\nDuctAPE.freestream_influence_vector!\nDuctAPE.assemble_lhs_matrix\nDuctAPE.assemble_lhs_matrix!\nDuctAPE.factorize_LHS\nDuctAPE.factorize_LHS!\nDuctAPE.assemble_rhs_matrix\nDuctAPE.assemble_rhs_matrix!\nDuctAPE.calculate_normal_velocity\nDuctAPE.calculate_normal_velocity!","category":"page"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.vortex_aic_boundary_on_boundary","page":"Preprocess","title":"DuctAPE.vortex_aic_boundary_on_boundary","text":"vortex_aic_boundary_on_boundary(\n controlpoint, normal, node, nodemap, influence_length, integration_options\n)\n\nCalculate 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)\n\nCan be used for constructing the LHS influence Matrix for the panel method system.\n\nArguments\n\ncontrolpoint::Matrix{Float} [z r] coordinates of points being influenced\nnormal::Matrix{Float} : unit normal vectors of the panels on which the control points are situated.\nnode::Matrix{Float} : [z r] coordinates of panel nodes (edges)\nnodemap::Matrix{Int} : [1 2] node indices for each panel\ninfluence_length::Vector{Float} : lengths of influencing panels\nintegration_options::IntegrationOptions : integration options\n\nReturns\n\nAICn::Matrix{Float} : N controlpoint x N+1 node array of V dot nhat values\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.vortex_aic_boundary_on_boundary!","page":"Preprocess","title":"DuctAPE.vortex_aic_boundary_on_boundary!","text":"vortex_aic_boundary_on_boundary!(\n AICn,\n controlpoint,\n normal,\n node,\n nodemap,\n influence_length,\n integration_options;\n integration_caches=nothing,\n)\n\nIn-place verion of vortex_aic_boundary_on_boundary.\n\nintegration_caches is a named tuple containing caching for intermediate calculation values.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.vortex_aic_boundary_on_field","page":"Preprocess","title":"DuctAPE.vortex_aic_boundary_on_field","text":"vortex_aic_boundary_on_field(\n controlpoint,\n normal,\n node,\n nodemap,\n influence_length,\n integration_options;\n integration_caches=nothing,\n)\n\nCalculate 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)\n\nUsed for constructing portions of the panel method LHS matrix related to the pseudo control points in the bodies.\n\nArguments:\n\ncontrolpoint::Matrix{Float} [z r] coordinates of points being influenced\nnormal::Matrix{Float} : unit normal vectors of the panels on which the control points are situated.\nnode::Matrix{Float} : [z r] coordinates of panel nodes (edges)\nnodemap::Matrix{Int} : [1 2] node indices for each panel\ninfluence_length::Vector{Float} : lengths of influencing panels\nintegration_options::IntegrationOptions : integration options\n\nKeyword Arguments\n\nintegration_caches::NamedTuple=nothing : caches for intermediate values in integration.\n\nReturns:\n\nAICn::Matrix{Float} : N controlpoint x N+1 node array of V dot nhat values\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.vortex_aic_boundary_on_field!","page":"Preprocess","title":"DuctAPE.vortex_aic_boundary_on_field!","text":"vortex_aic_boundary_on_field!(\n AICn,\n controlpoint,\n normal,\n node,\n nodemap,\n influence_length,\n integration_options;\n integration_caches=nothing,\n)\n\nIn-place version of vortex_aic_boundary_on_field.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.add_kutta!","page":"Preprocess","title":"DuctAPE.add_kutta!","text":"add_kutta!(LHS, AICn, kids)\n\nAdd Kutta condition (γ1 + γN = 0) to LHS matrix.\n\nLHS::Matrix{Float} : a pre-allocated (zeros) full size left-hand side matrix\nAICn::Matrix{Float} : influence coefficients for panels/nodes\nkids::Vector{Int} : [1 2] indices of where to put 1's for kutta condition\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.add_te_gap_aic!","page":"Preprocess","title":"DuctAPE.add_te_gap_aic!","text":"add_te_gap_aic!(\n AICn,\n controlpoint,\n normal,\n tenode,\n teinfluence_length,\n tendotn,\n tencrossn,\n teadjnodeidxs,\n integration_options;\n wake=false,\n integration_caches=nothing,\n)\n\nAdd trailing edge gap aerodynmic influence coefficient contributions to the AIC matrix.\n\nArguments\n\nAICn::Matrix{Float} : N controlpoint x N+1 node array of V dot nhat values\ncontrolpoint::Matrix{Float} [z r] coordinates of points being influenced\nnormal::Matrix{Float} : unit normal vectors of the panels on which the control points are situated.\ntenode::Matrix{Float} : [z r] coordinates of trailing edge panel nodes (edges)\nteinfluence_length::Vector{Float} : lengths of influencing trailing edge panels\ntendotn::Matrix{Float} : nhat of trailing edge panel dotted with nhat of adjacent panels\ntencrossn::Matrix{Float} : nhat of trailing edge panel crossed with nhat of adjacent panels\nteadjnodeidxs::Matrix{Float} : indices of nodes adjacent to trailing edge panel\nintegration_options::IntegrationOptions : integration options\n\nKeyword Arguments\n\nwake::Bool=false : flag as to whether this function is being applied to a wake sheet.\nintegration_caches::NamedTuple=nothing : caches for intermediate values in integration.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.source_aic","page":"Preprocess","title":"DuctAPE.source_aic","text":"source_aic(\n controlpoint,\n normal,\n node,\n nodemap,\n influence_length,\n integration_options;\n integration_caches=nothing,\n)\n\nCalculate 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.\n\nCan be used for constructing the RHS boundary conditions due to rotor source panels.\n\nArguments\n\ncontrolpoint::Matrix{Float} [z r] coordinates of points being influenced\nnormal::Matrix{Float} : unit normal vectors of the panels on which the control points are situated.\nnode::Matrix{Float} : [z r] coordinates of panel nodes (edges)\nnodemap::Matrix{Int} : [1 2] node indices for each panel\ninfluence_length::Vector{Float} : lengths of influencing panels\nintegration_options::IntegrationOptions : integration options\n\nKeyword Arguments\n\nintegration_caches::NamedTuple=nothing : caches for intermediate values in integration.\n\nReturns\n\nAICn::Matrix{Float} : N controlpoint x N+1 node array of V dot nhat values\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.source_aic!","page":"Preprocess","title":"DuctAPE.source_aic!","text":"source_aic!(\n AICn,\n controlpoint,\n normal,\n node,\n nodemap,\n influence_length,\n integration_options;\n integration_caches=nothing,\n)\n\nIn-place version of source_aic.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.freestream_influence_vector","page":"Preprocess","title":"DuctAPE.freestream_influence_vector","text":"freestream_influence_vector(normals, Vinfmat)\n\nCalculate RHS contributions due to freestream.\n\nNote 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.\n\nArguments\n\nnormals::Matrix{Float} : unit normal vectors of the panels on which the control points are situated.\nVinfmat::Matrix{Float} : [z r] components of freestream velocity (r's should be zero)\n\nReturns\n\nRHS::Vector{Float} : vector of normal components of freestream velocity on input panels\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.freestream_influence_vector!","page":"Preprocess","title":"DuctAPE.freestream_influence_vector!","text":"freestream_influence_vector!(RHS, normals, Vinfmat)\n\nIn-place version of freestream_influence_vector.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.assemble_lhs_matrix","page":"Preprocess","title":"DuctAPE.assemble_lhs_matrix","text":"assemble_lhs_matrix(\n AICn, AICpcp, npanel, nnode, totpanel, totnode, prescribednodeidxs; dummyval=1.0\n)\n\nAssemble the LHS matrix of the panel method.\n\nArguments\n\nAICn::Matrix{Float} : N controlpoint x N+1 node array of V dot nhat values\nAICpcp::Matrix{Float} : Nbodies controlpoint x N+1 node array of V dot nhat values (influence on psuedo control points)\nnpanel::Vector{Int} : number of panels comprising each body\nnnode::Vector{Int} : number of nodes comprising each body\ntotpanel::Int : total number of panels\ntotnode::Int : total number of nodes\nprescribednodeidxs::Vector{Int} : indices of nodes with prescribed strengths (those on the axis of rotation).\n\nKeyword Arguments\n\ndummyval::Float=1.0 : value for dummy input for prescribed and internal control points in the system. Do not change except for debugging purposes.\n\nReturns\n\nLHS::Matrix{Float} : The full LHS matrix for the panel method.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.assemble_lhs_matrix!","page":"Preprocess","title":"DuctAPE.assemble_lhs_matrix!","text":"assemble_lhs_matrix!(\n LHS, AICn, AICpcp, npanel, nnode, totpanel, totnode, prescribednodeidxs; dummyval=1.0\n)\n\nIn-place version of assemble_lhs_matrix.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.factorize_LHS","page":"Preprocess","title":"DuctAPE.factorize_LHS","text":"factorize_LHS(A::AbstractMatrix)\n\nReturns the LU decomposition of A.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.factorize_LHS!","page":"Preprocess","title":"DuctAPE.factorize_LHS!","text":"factorize_LHS!(Apivot::AbstractMatrix, A::AbstractMatrix)\n\nReturns the LU decomposition of A using Apivot as storage memory to pivot leaving A unchanged.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.assemble_rhs_matrix","page":"Preprocess","title":"DuctAPE.assemble_rhs_matrix","text":"assemble_rhs_matrix(\n vdnb, vdnpcp, npanel, nnode, totpanel, totnode, prescribednodeidxs\n)\n\nArguments\n\nvdnb::Vector{Float} : V dot nhat for body panels\nvdnpcp::Vector{Float} : V dot nhat for pseudo control points\nnpanel::Vector{Int} : number of panels comprising each body\nnnode::Vector{Int} : number of nodes comprising each body\ntotpanel::Int : total number of body panels\ntotnode::Int : total number of body nodes\nprescribednodeidxs::Vector{Int} : indices of nodes with prescribed strengths (those on the axis of rotation)\n\nReturns\n\nRHS::Vector{Float} : the RHS vector of the panel method.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.assemble_rhs_matrix!","page":"Preprocess","title":"DuctAPE.assemble_rhs_matrix!","text":"assemble_rhs_matrix!(\n RHS, vdnb, vdnpcp, npanel, nnode, totpanel, totnode, prescribednodeidxs\n)\n\nIn-place version of assemble_rhs_matrix.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.calculate_normal_velocity","page":"Preprocess","title":"DuctAPE.calculate_normal_velocity","text":"calculate_normal_velocity(velocity_vector, normal)\n\nCalculate normal velocity_vector (V dot nhat).\n\nArguments\n\nvelocity_vector::Matrix{Float} : velocity vector [z r] on each panel\nnormal::Matrix{Float} : the panel unit normals\n\nReturns\n\nAIC::Matrix{Float} : V dot n on each panel\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.calculate_normal_velocity!","page":"Preprocess","title":"DuctAPE.calculate_normal_velocity!","text":"calculate_normal_velocity!(AIC, velocity_vector, normal)\n\nIn-place version of calculate_normal_velocity.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#Quadrature","page":"Preprocess","title":"Quadrature","text":"","category":"section"},{"location":"DuctAPE/api/private_preprocess/#Integrands","page":"Preprocess","title":"Integrands","text":"","category":"section"},{"location":"DuctAPE/api/private_preprocess/","page":"Preprocess","title":"Preprocess","text":"DuctAPE.nominal_vortex_induced_velocity_sample\nDuctAPE.nominal_vortex_induced_velocity_sample!\nDuctAPE.subtracted_singular_vortex_influence\nDuctAPE.subtracted_singular_vortex_influence!\nDuctAPE.analytically_integrated_vortex_influence\nDuctAPE.analytically_integrated_vortex_influence!\nDuctAPE.self_vortex_induced_velocity_sample\nDuctAPE.self_vortex_induced_velocity_sample!\nDuctAPE.nominal_source_induced_velocity_sample\nDuctAPE.nominal_source_induced_velocity_sample!\nDuctAPE.subtracted_singular_source_influence\nDuctAPE.subtracted_singular_source_influence!\nDuctAPE.analytically_integrated_source_influence\nDuctAPE.analytically_integrated_source_influence!\nDuctAPE.self_source_induced_velocity_sample\nDuctAPE.self_source_induced_velocity_sample!","category":"page"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.nominal_vortex_induced_velocity_sample","page":"Preprocess","title":"DuctAPE.nominal_vortex_induced_velocity_sample","text":"nominal_vortex_induced_velocity_sample(\n t, node1, node2, influence_length, controlpoint, cache_vec; nondimrange=(0.0, 1.0)\n)\n\nCalculate the velocity induced by a linear vortex panel on a point.\n\nArguments\n\nt::Float : sample point in range (0,1) selected by quadrature method.\nnode1::Vector{Float} : first panel node (edge) position.\nnode2::Vector{Float} : second panel node (edge) position.\ninfluence_length::Float : dimensional length of panel.\ncontrolpoint::Vector{Float} : controlpoint position\ncache_vec::Vector{Float} : cache for intermediate calculations\n\nKeyword Arguments\n\nnondimrange::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.\n\nReturns\n\nV::Matrix{Float} : 2x2 matrix of axial and radial induced velocities from each of the nodes.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.nominal_vortex_induced_velocity_sample!","page":"Preprocess","title":"DuctAPE.nominal_vortex_induced_velocity_sample!","text":"nominal_vortex_induced_velocity_sample!(\n V, t, node1, node2, influence_length, controlpoint, cache_vec; nondimrange=(0.0, 1.0)\n)\n\nIn-place version of nominal_vortex_induced_velocity_sample.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.subtracted_singular_vortex_influence","page":"Preprocess","title":"DuctAPE.subtracted_singular_vortex_influence","text":"subtracted_singular_vortex_influence(node, controlpoint)\n\nCalculate the singular portions of the self-induced vortex panel influence to subtract off the integral in the separation of singularity method.\n\nArguments\n\nnode::Vector{Float} : node position\ncontrolpoint::Vector{Float} : controlpoint position\n\nReturns\n\naxial::Float : axial direction influence\nradial::Float : radial direction influence\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.subtracted_singular_vortex_influence!","page":"Preprocess","title":"DuctAPE.subtracted_singular_vortex_influence!","text":"subtracted_singular_vortex_influence!(node, controlpoint, cache_vec)\n\nSomewhat in-place version of subtracted_singular_vortex_influence.\n\nArguments\n\nnode::Vector{Float} : node position\ncontrolpoint::Vector{Float} : controlpoint position\ncache_vec::Vector{Float} : used to store intermediate values.\n\nReturns\n\naxial::Float : axial direction influence\nradial::Float : radial direction influence\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.analytically_integrated_vortex_influence","page":"Preprocess","title":"DuctAPE.analytically_integrated_vortex_influence","text":"analytically_integrated_vortex_influence(r, influence_length)\n\nAnalytical 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.\n\nArguments\n\nr::Float : radial position of self-induced control point\ninfluence_length::Float : dimensional length of the panel\n\nReturns\n\nV::Vector{Float} : axial and radial induced velocities\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.analytically_integrated_vortex_influence!","page":"Preprocess","title":"DuctAPE.analytically_integrated_vortex_influence!","text":"analytically_integrated_vortex_influence!(V, r, influence_length)\n\nIn-place version of analytically_integrated_vortex_influence.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.self_vortex_induced_velocity_sample","page":"Preprocess","title":"DuctAPE.self_vortex_induced_velocity_sample","text":"self_vortex_induced_velocity_sample(\n t, node1, node2, influence_length, controlpoint, cache_vec; nondimrange=(0.0, 1.0)\n)\n\nCalculate the velocity induced by a linear vortex panel on a point at the midpoint between the panel edges.\n\nArguments\n\nt::Float : sample point in range (0,1) selected by quadrature method.\nnode1::Vector{Float} : first panel node (edge) position.\nnode2::Vector{Float} : second panel node (edge) position.\ninfluence_length::Float : dimensional length of panel.\ncontrolpoint::Vector{Float} : controlpoint position\ncache_vec::Vector{Float} : cache for intermediate calculations\n\nKeyword Arguments\n\nnondimrange::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.\n\nReturns\n\nV::Matrix{Float} : 2x2 matrix of axial and radial induced velocities from each of the nodes.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.self_vortex_induced_velocity_sample!","page":"Preprocess","title":"DuctAPE.self_vortex_induced_velocity_sample!","text":"self_vortex_induced_velocity_sample!(\n V, t, node1, node2, influence_length, controlpoint, cache_vec; nondimrange=(0.0, 1.0)\n)\n\nIn-place version of self_vortex_induced_velocity_sample.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.nominal_source_induced_velocity_sample","page":"Preprocess","title":"DuctAPE.nominal_source_induced_velocity_sample","text":"nominal_source_induced_velocity_sample(\n t, node1, node2, influence_length, controlpoint, cache_vec; nondimrange=(0.0, 1.0)\n)\n\nCalculate the velocity induced by a source panel on a point.\n\nArguments\n\nt::Float : sample point in range (0,1) selected by quadrature method.\nnode1::Vector{Float} : first panel node (edge) position.\nnode2::Vector{Float} : second panel node (edge) position.\ninfluence_length::Float : dimensional length of panel.\ncontrolpoint::Vector{Float} : controlpoint position\ncache_vec::Vector{Float} : cache for intermediate calculations\n\nKeyword Arguments\n\nnondimrange::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.\n\nReturns\n\nV::Matrix{Float} : 2x2 matrix of axial and radial induced velocities from each of the nodes.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.nominal_source_induced_velocity_sample!","page":"Preprocess","title":"DuctAPE.nominal_source_induced_velocity_sample!","text":"nominal_source_induced_velocity_sample!(\n V, t, node1, node2, influence_length, controlpoint, cache_vec; nondimrange=(0.0,1.0)\n)\n\nIn-place version of nominal_source_induced_velocity_sample.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.subtracted_singular_source_influence","page":"Preprocess","title":"DuctAPE.subtracted_singular_source_influence","text":"subtracted_singular_source_influence(node, controlpoint)\n\nCalculate the singular portions of the self-induced source panel influence to subtract off the integral in the separation of singularity method.\n\nArguments\n\nnode::Vector{Float} : node position\ncontrolpoint::Vector{Float} : controlpoint position\n\nReturns\n\naxial::Float : axial direction influence\nradial::Float : radial direction influence\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.subtracted_singular_source_influence!","page":"Preprocess","title":"DuctAPE.subtracted_singular_source_influence!","text":"subtracted_singular_source_influence!(node, controlpoint, cache_vec)\n\nIn-place version of subtracted_singular_source_influence.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.analytically_integrated_source_influence","page":"Preprocess","title":"DuctAPE.analytically_integrated_source_influence","text":"analytically_integrated_source_influence(r, influence_length)\n\nIn-place version of analytically_integrated_source_influence.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.analytically_integrated_source_influence!","page":"Preprocess","title":"DuctAPE.analytically_integrated_source_influence!","text":"analytically_integrated_source_influence(r, influence_length)\n\nAnalytical 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.\n\nArguments\n\nr::Float : radial position of self-induced control point\ninfluence_length::Float : dimensional length of the panel\n\nReturns\n\nV::Vector{Float} : axial and radial induced velocities\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.self_source_induced_velocity_sample","page":"Preprocess","title":"DuctAPE.self_source_induced_velocity_sample","text":"self_source_induced_velocity_sample(\n t, node1, node2, influence_length, controlpoint, cache_vec; nondimrange=(0.0, 1.0)\n)\n\nCalculate the velocity induced by a linear source panel on a point at the midpoint between the panel edges.\n\nArguments\n\nt::Float : sample point in range (0,1) selected by quadrature method.\nnode1::Vector{Float} : first panel node (edge) position.\nnode2::Vector{Float} : second panel node (edge) position.\ninfluence_length::Float : dimensional length of panel.\ncontrolpoint::Vector{Float} : controlpoint position\ncache_vec::Vector{Float} : cache for intermediate calculations\n\nKeyword Arguments\n\nnondimrange::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.\n\nReturns\n\nV::Matrix{Float} : 2x2 matrix of axial and radial induced velocities from each of the nodes.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.self_source_induced_velocity_sample!","page":"Preprocess","title":"DuctAPE.self_source_induced_velocity_sample!","text":"self_source_induced_velocity_sample!(\n V, t, node1, node2, influence_length, controlpoint, cache_vec; nondimrange=(0.0, 1.0)\n)\n\nIn-place version of self_source_induced_velocity_sample.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#Integrals","page":"Preprocess","title":"Integrals","text":"","category":"section"},{"location":"DuctAPE/api/private_preprocess/","page":"Preprocess","title":"Preprocess","text":"DuctAPE.nominal_vortex_panel_integration\nDuctAPE.nominal_vortex_panel_integration!\nDuctAPE.self_vortex_panel_integration\nDuctAPE.self_vortex_panel_integration!\nDuctAPE.nominal_source_panel_integration\nDuctAPE.nominal_source_panel_integration!\nDuctAPE.self_source_panel_integration\nDuctAPE.self_source_panel_integration!\nDuctAPE.extrapolate!","category":"page"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.nominal_vortex_panel_integration","page":"Preprocess","title":"DuctAPE.nominal_vortex_panel_integration","text":"nominal_vortex_panel_integration(\n integration_options,\n node1,\n node2,\n influence_length,\n controlpoint,\n containers;\n debug=false,\n)\n\nIntegration of vortex panel induced velocity on a point far away.\n\nArguments\n\nintegration_options::IntegrationMethod : options for itegration methods\nnode1::Vector{Float} : first panel node (edge) position.\nnode2::Vector{Float} : second panel node (edge) position.\ninfluence_length::Float : dimensional length of panel.\ncontrolpoint::Vector{Float} : controlpoint position\ncontainers::NamedTuple : cache for intermediate calculations\n\nKeyword Arguments\n\ndebug::Bool=false : if true, some methods will return the estimation error.\n\nReturns\n\nV::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}]\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.nominal_vortex_panel_integration!","page":"Preprocess","title":"DuctAPE.nominal_vortex_panel_integration!","text":"nominal_vortex_panel_integration!(\n integration_options,\n V,\n node1,\n node2,\n influence_length,\n controlpoint,\n containers;\n debug=false,\n)\n\nIn-place version of nominal_vortex_panel_integration.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.self_vortex_panel_integration","page":"Preprocess","title":"DuctAPE.self_vortex_panel_integration","text":"self_vortex_panel_integration(\n integration_options,\n node1,\n node2,\n influence_length,\n controlpoint,\n containers;\n debug=false,\n)\n\nIntegration of linear vortex panel self-induced velocity.\n\nArguments\n\nintegration_options::IntegrationMethod : options for itegration methods\nnode1::Vector{Float} : first panel node (edge) position.\nnode2::Vector{Float} : second panel node (edge) position.\ninfluence_length::Float : dimensional length of panel.\ncontrolpoint::Vector{Float} : controlpoint position\ncontainers::NamedTuple : cache for intermediate calculations\n\nKeyword Arguments\n\ndebug::Bool=false : if true, some methods will return the estimation error.\n\nReturns\n\nV::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}]\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.self_vortex_panel_integration!","page":"Preprocess","title":"DuctAPE.self_vortex_panel_integration!","text":"self_vortex_panel_integration!(\n integration_options,\n V,\n node1,\n node2,\n influence_length,\n controlpoint,\n containers;\n debug=false,\n)\n\nIn-place version of self_vortex_panel_integration.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.nominal_source_panel_integration","page":"Preprocess","title":"DuctAPE.nominal_source_panel_integration","text":"nominal_source_panel_integration(\n integration_options,\n node1,\n node2,\n influence_length,\n controlpoint,\n containers;\n debug=false,\n)\n\nIntegration of source panel induced velocity on a point far away.\n\nArguments\n\nintegration_options::IntegrationMethod : options for itegration methods\nnode1::Vector{Float} : first panel node (edge) position.\nnode2::Vector{Float} : second panel node (edge) position.\ninfluence_length::Float : dimensional length of panel.\ncontrolpoint::Vector{Float} : controlpoint position\ncontainers::NamedTuple : cache for intermediate calculations\n\nKeyword Arguments\n\ndebug::Bool=false : if true, some methods will return the estimation error.\n\nReturns\n\nV::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}]\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.nominal_source_panel_integration!","page":"Preprocess","title":"DuctAPE.nominal_source_panel_integration!","text":"nominal_source_panel_integration!(\n integration_options,\n V,\n node1,\n node2,\n influence_length,\n controlpoint,\n containers;\n debug=false,\n)\n\nIn-place version of nominal_source_panel_integration.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.self_source_panel_integration","page":"Preprocess","title":"DuctAPE.self_source_panel_integration","text":"self_source_panel_integration(\n integration_options,\n node1,\n node2,\n influence_length,\n controlpoint,\n containers;\n debug=false,\n)\n\nIntegration of linear source panel self-induced velocity.\n\nArguments\n\nintegration_options::IntegrationMethod : options for itegration methods\nnode1::Vector{Float} : first panel node (edge) position.\nnode2::Vector{Float} : second panel node (edge) position.\ninfluence_length::Float : dimensional length of panel.\ncontrolpoint::Vector{Float} : controlpoint position\ncontainers::NamedTuple : cache for intermediate calculations\n\nKeyword Arguments\n\ndebug::Bool=false : if true, some methods will return the estimation error.\n\nReturns\n\nV::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}]\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.self_source_panel_integration!","page":"Preprocess","title":"DuctAPE.self_source_panel_integration!","text":"self_source_panel_integration!(\n integration_options,\n V,\n node1,\n node2,\n influence_length,\n controlpoint,\n containers;\n debug=false,\n)\n\nIn-place version of self_source_panel_integration.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.extrapolate!","page":"Preprocess","title":"DuctAPE.extrapolate!","text":"extrapolate!(V, err, fh; power=2, atol=1e-6)\n\nPerforms Richardson extrapolation on an array fh for use in Romberg integration.\n\nArguments\n\nV::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}]\nerr::Vector{Float} : estimated errors in velocity approximation\nfh::Tuple : (f(h), h) tuples (in order of decreasing |h|)\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#State-Initialization","page":"Preprocess","title":"State Initialization","text":"","category":"section"},{"location":"DuctAPE/api/private_preprocess/","page":"Preprocess","title":"Preprocess","text":"DuctAPE.initialize_velocities\nDuctAPE.initialize_velocities!\nDuctAPE.initialize_strengths!","category":"page"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.initialize_velocities","page":"Preprocess","title":"DuctAPE.initialize_velocities","text":"initialize_velocities(\n solver_options::SolverOptionsType,\n operating_point,\n blade_elements,\n linsys,\n ivr,\n ivw,\n body_totnodes,\n wake_panel_sheet_be_map,\n)\n\nInitialize velocity state variables.\n\nArguments\n\nsolver_options::SolverOptionsType : solver options type for dispatch\noperating_point::OperatingPoint : an OperatingPoint object\nblade_elements::NamedTuple : A named tuple containing the blade element geometry and airfoil information.\nlinsys::NamedTuple : A named tuple containing the panel method linear system information.\nivr::NamedTuple : A named tuple containing the unit induced velocities on the rotors\nivw::NamedTuple : A named tuple containing the unit induced velocities on the wake\nbody_totnodes::Int : the total number of panel nodes comprising the duct and centerbody geometry\nwake_panel_sheet_be_map::Matrix{Int} : An index map from the wake panels to the nearest ahead rotor blade element along the wake sheets\n\nReturns\n\nvz_rotor::Vector{Float} : a vector of the velocity state variables associated with the rotor axially induced velocity\nvtheta_rotor::Vector{Float} : a vector of the velocity state variables associated with the rotor tangentially induced velocity\nCm_wake::Vector{Float} : a vector of the velocity state variables associated with the wake control point meridional velocity\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.initialize_velocities!","page":"Preprocess","title":"DuctAPE.initialize_velocities!","text":"function initializevelocities!( solveroptions::SolverOptionsType, vzrotor, vthetarotor, Cmwake, operatingpoint, bladeelements, linsys, ivr, ivw, bodytotnodes, wakepanelsheetbemap, )\n\nIn-place version of initialize_velocities.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_preprocess/#DuctAPE.initialize_strengths!","page":"Preprocess","title":"DuctAPE.initialize_strengths!","text":"initialize_strengths!(\n solver_options::SolverOptionsType,\n Gamr,\n sigr,\n gamw,\n operating_point,\n blade_elements,\n linsys,\n ivr,\n ivw,\n wakeK,\n body_totnodes,\n wake_nodemap,\n wake_endnodeidxs,\n wake_panel_sheet_be_map,\n wake_node_sheet_be_map,\n wake_node_ids_along_casing_wake_interface,\n wake_node_ids_along_centerbody_wake_interface,\n)\n\nInitialize strength state variables.\n\nArguments\n\nsolver_options::SolverOptionsType : solver options type for dispatch\nGamr::Vector{Float} : Rotor circulation state variables (modified in place)\nsigr::Vector{Float} : Rotor panel strength state variables (modified in place)\ngamw::Vector{Float} : Wake panel strength state variables (modified in place)\noperating_point::OperatingPoint : an OperatingPoint object\nblade_elements::NamedTuple : A named tuple containing the blade element geometry and airfoil information.\nlinsys::NamedTuple : A named tuple containing the panel method linear system information.\nivr::NamedTuple : A named tuple containing the unit induced velocities on the rotors\nivw::NamedTuple : A named tuple containing the unit induced velocities on the wake\nwakeK::Vector{Float} : geometric constants of wake nodes used in calculating wake strengths\nbody_totnodes::Int : the total number of panel nodes comprising the duct and centerbody geometry\nwake_nodemap::Matrix{Int} : an index map of wake panel to the associated node indices\nwake_endnodeidxs::Matrix{Int} : the node indices of the start and end of the wake sheets.\nwake_panel_sheet_be_map::Matrix{Int} : An index map from the wake panels to the nearest ahead rotor blade element along the wake sheets\nwake_node_sheet_be_map::Matrix{Int} : An index map from the wake nodes to the nearest ahead rotor blade element along the wake sheets\nwake_node_ids_along_casing_wake_interface::type : An index map indicating which wake nodes interface with the duct wall\nwake_node_ids_along_centerbody_wake_interface::type : An index map indicating which wake nodes interface with the centerbody wall\n\n\n\n\n\nfunction initialize_strengths!(\n solver_options::CSORSolverOptions,\n Gamr,\n sigr,\n gamw,\n solve_containers,\n operating_point,\n blade_elements,\n wakeK,\n wake_nodemap,\n wake_endnodeidxs,\n wake_panel_sheet_be_map,\n wake_node_sheet_be_map,\n wake_node_ids_along_casing_wake_interface,\n wake_node_ids_along_centerbody_wake_interface;\n niter=10,\n rlx=0.5,\n)\n\nRefactored from DFDC SUBROUTINE ROTINITBLD\n\nFrom 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\n\nArguments\n\nsolver_options::SolverOptionsType : solver options type for dispatch\nGamr::Vector{Float} : Rotor circulation state variables (modified in place)\nsigr::Vector{Float} : Rotor panel strength state variables (modified in place)\ngamw::Vector{Float} : Wake panel strength state variables (modified in place)\noperating_point::OperatingPoint : an OperatingPoint object\nblade_elements::NamedTuple : A named tuple containing the blade element geometry and airfoil information.\nwakeK::Vector{Float} : geometric constants of wake nodes used in calculating wake strengths\nwake_nodemap::Matrix{Int} : an index map of wake panel to the associated node indices\nwake_endnodeidxs::Matrix{Int} : the node indices of the start and end of the wake sheets.\nwake_panel_sheet_be_map::Matrix{Int} : An index map from the wake panels to the nearest ahead rotor blade element along the wake sheets\nwake_node_sheet_be_map::Matrix{Int} : An index map from the wake nodes to the nearest ahead rotor blade element along the wake sheets\nwake_node_ids_along_casing_wake_interface::type : An index map indicating which wake nodes interface with the duct wall\nwake_node_ids_along_centerbody_wake_interface::type : An index map indicating which wake nodes interface with the centerbody wall\n\nKeyword Arguments\n\nrlx::Float=0.5 : factor for under-relaxation to reduce transients in CL\n\nReturns\n\n\n\n\n\n","category":"function"},{"location":"C4Blade/airfoil_types/CCBlade/#CCBlade-Airfoil-Types","page":"CCBlade Airfoil Types","title":"CCBlade Airfoil Types","text":"","category":"section"},{"location":"C4Blade/airfoil_types/CCBlade/","page":"CCBlade Airfoil Types","title":"CCBlade Airfoil Types","text":"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.","category":"page"},{"location":"C4Blade/airfoil_types/CCBlade/","page":"CCBlade Airfoil Types","title":"CCBlade Airfoil Types","text":"Modules = [DuctAPE.C4Blade]\nPages = [\"C4Blade/airfoils.jl\"]","category":"page"},{"location":"C4Blade/airfoil_types/CCBlade/#DuctAPE.C4Blade.AlphaAF","page":"CCBlade Airfoil Types","title":"DuctAPE.C4Blade.AlphaAF","text":"AlphaAF(alpha, cl, cd, info, Re, Mach)\nAlphaAF(alpha, cl, cd, info, Re=0.0, Mach=0.0)\nAlphaAF(alpha, cl, cd, info=\"CCBlade generated airfoil\", Re=0.0, Mach=0.0)\nAlphaAF(filename::String; radians=true)\n\nAirfoil data that varies with angle of attack. Data is fit with an Akima spline.\n\nArguments:\n\nalpha::Vector{Float64}: angles of attack\ncl::Vector{Float64}: corresponding lift coefficients\ncd::Vector{Float64}: corresponding drag coefficients\ninfo::String: a description of this airfoil data (just informational)\nRe::Float64: Reynolds number data was taken at (just informational)\nMach::Float64: Mach number data was taken at (just informational)\n\nor\n\na file\n\nArguments:\n\nfilename::String: name/path of file to read in\nradians::Bool: true if angle of attack in file is given in radians\n\n\n\n\n\n","category":"type"},{"location":"C4Blade/airfoil_types/CCBlade/#DuctAPE.C4Blade.AlphaMachAF","page":"CCBlade Airfoil Types","title":"DuctAPE.C4Blade.AlphaMachAF","text":"AlphaMachAF(alpha, Mach, cl, cd, info, Re)\nAlphaMachAF(alpha, Mach, cl, cd, info)\nAlphaMachAF(alpha, Mach, cl, cd)\nAlphaMachAF(filenames::Vector{String}; radians=true)\n\nAirfoil data that varies with angle of attack and Mach number. Data is fit with a recursive Akima spline.\n\nArguments:\n\nalpha::Vector{Float64}: angles of attack\nMach::Vector{Float64}: Mach numbers\ncl::Matrix{Float64}: lift coefficients where cl[i, j] corresponds to alpha[i], Mach[j]\ncd::Matrix{Float64}: drag coefficients where cd[i, j] corresponds to alpha[i], Mach[j]\ninfo::String: a description of this airfoil data (just informational)\nRe::Float64: Reynolds number data was taken at (just informational)\n\nor\n\nfilenames with one file per Mach number.\n\nArguments:\n\nfilenames::Vector{String}: name/path of files to read in, each at a different Mach number in ascending order\nradians::Bool: true if angle of attack in file is given in radians\n\n\n\n\n\n","category":"type"},{"location":"C4Blade/airfoil_types/CCBlade/#DuctAPE.C4Blade.AlphaReAF","page":"CCBlade Airfoil Types","title":"DuctAPE.C4Blade.AlphaReAF","text":"AlphaReAF(alpha, Re, cl, cd, info, Mach)\nAlphaReAF(alpha, Re, cl, cd, info)\nAlphaReAF(alpha, Re, cl, cd)\nread_AlphaReAF(filenames::Vector{String}; radians=true)\n\nAirfoil data that varies with angle of attack and Reynolds number. Data is fit with a recursive Akima spline.\n\nArguments:\n\nalpha::Vector{Float64}: angles of attack\nRe::Vector{Float64}: Reynolds numbers\ncl::Matrix{Float64}: lift coefficients where cl[i, j] corresponds to alpha[i], Re[j]\ncd::Matrix{Float64}: drag coefficients where cd[i, j] corresponds to alpha[i], Re[j]\ninfo::String: a description of this airfoil data (just informational)\nMach::Float64: Mach number data was taken at (just informational)\n\nor\n\nfilenames with one file per Reynolds number.\n\nArguments:\n\nfilenames::Vector{String}: name/path of files to read in, each at a different Reynolds number in ascending order\nradians::Bool: true if angle of attack in file is given in radians\n\n\n\n\n\n","category":"type"},{"location":"C4Blade/airfoil_types/CCBlade/#DuctAPE.C4Blade.AlphaReMachAF","page":"CCBlade Airfoil Types","title":"DuctAPE.C4Blade.AlphaReMachAF","text":"AlphaReMachAF(alpha, Re, Mach, cl, cd, info)\nAlphaReMachAF(alpha, Re, Mach, cl, cd)\nAlphaReMachAF(filenames::Matrix{String}; radians=true)\n\nAirfoil data that varies with angle of attack, Reynolds number, and Mach number. Data is fit with a recursive Akima spline.\n\nArguments:\n\nalpha::Vector{Float64}: angles of attack\nRe::Vector{Float64}: Reynolds numbers\nMach::Vector{Float64}: Mach numbers\ncl::Array{Float64}: lift coefficients where cl[i, j, k] corresponds to alpha[i], Re[j], Mach[k]\ncd::Array{Float64}: drag coefficients where cd[i, j, k] corresponds to alpha[i], Re[j], Mach[k]\ninfo::String: a description of this airfoil data (just informational)\n\nor files with one per Re/Mach combination\n\nArguments:\n\nfilenames::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.\nradians::Bool: true if angle of attack in file is given in radians\n\n\n\n\n\n","category":"type"},{"location":"C4Blade/airfoil_types/CCBlade/#DuctAPE.C4Blade.DuSeligEggers","page":"CCBlade Airfoil Types","title":"DuctAPE.C4Blade.DuSeligEggers","text":"DuSeligEggers(a, b, d, m, alpha0)\nDuSeligEggers(a=1.0, b=1.0, d=1.0, m=2*pi, alpha0=0.0) # uses defaults\n\nDuSelig correction for lift an Eggers correction for drag.\n\nArguments:\n\na, b, d::Float64: parameters in Du-Selig paper. Normally just 1.0 for each.\nm::Float64: lift curve slope. Defaults to 2 pi for zero argument version.\nalpha0::Float64: zero-lift angle of attack. Defaults to 0 for zero argument version.\n\n\n\n\n\n","category":"type"},{"location":"C4Blade/airfoil_types/CCBlade/#DuctAPE.C4Blade.PrandtlTip","page":"CCBlade Airfoil Types","title":"DuctAPE.C4Blade.PrandtlTip","text":"PrandtlTip()\n\nStandard Prandtl tip loss correction.\n\n\n\n\n\n","category":"type"},{"location":"C4Blade/airfoil_types/CCBlade/#DuctAPE.C4Blade.PrandtlTipHub","page":"CCBlade Airfoil Types","title":"DuctAPE.C4Blade.PrandtlTipHub","text":"PrandtlTipHub()\n\nStandard Prandtl tip loss correction plus hub loss correction of same form.\n\n\n\n\n\n","category":"type"},{"location":"C4Blade/airfoil_types/CCBlade/#DuctAPE.C4Blade.SimpleAF","page":"CCBlade Airfoil Types","title":"DuctAPE.C4Blade.SimpleAF","text":"SimpleAF(m, alpha0, clmax, clmin, cd0, cd2)\n\nA simple parameterized lift and drag curve.\n\ncl = m (alpha - alpha0) (capped by clmax/clmin)\ncd = cd0 + cd2 * cl^2\n\nArguments:\n\nm::Float64: lift curve slope\nalpha0::Float64: zero-lift angle of attack\nclmax::Float64: maximum lift coefficient\nclmin::Float64: minimum lift coefficient\ncd0::Float64: zero lift drag\ncd2::Float64: quadratic drag term\n\n\n\n\n\n","category":"type"},{"location":"C4Blade/airfoil_types/CCBlade/#DuctAPE.C4Blade.SkinFriction","page":"CCBlade Airfoil Types","title":"DuctAPE.C4Blade.SkinFriction","text":"SkinFriction(Re0, p)\n\nSkin friction model for a flat plate. cd *= (Re0 / Re)^p\n\nArguments:\n\nRe0::Float64: reference Reynolds number (i.e., no corrections at this number)\np::Float64: exponent in flat plate model. 0.5 for laminar (Blasius solution), ~0.2 for fully turbulent (Schlichting empirical fit)\n\n\n\n\n\n","category":"type"},{"location":"C4Blade/airfoil_types/CCBlade/#DuctAPE.C4Blade.afeval-Tuple{DuctAPE.C4Blade.AFType, Any, Any, Any}","page":"CCBlade Airfoil Types","title":"DuctAPE.C4Blade.afeval","text":"afeval(af::AFType, alpha, Re, Mach)\n\nEvaluate airfoil aerodynamic performance\n\nArguments:\n\naf::AFType or Function: dispatch on AFType or if function call: cl, cd = af(alpha, Re, Mach)\nalpha::Float64: angle of attack in radians\nRe::Float64: Reynolds number\nMach::Float64: Mach number\n\nReturns:\n\ncl::Float64: lift coefficient\ncd::Float64: drag coefficient\n\n\n\n\n\n","category":"method"},{"location":"C4Blade/airfoil_types/CCBlade/#DuctAPE.C4Blade.mach_correction-Tuple{DuctAPE.C4Blade.MachCorrection, Any, Any, Any}","page":"CCBlade Airfoil Types","title":"DuctAPE.C4Blade.mach_correction","text":"mach_correction(::MachCorrection, cl, cd, Mach)\n\nMach number correction for lift/drag coefficient\n\nArguments:\n\nmc::MachCorrection: used for dispatch\ncl::Float64: lift coefficient before correction\ncd::Float64: drag coefficient before correction\nMach::Float64: Mach number\n\nReturns:\n\ncl::Float64: lift coefficient after correction\ncd::Float64: drag coefficient after correction\n\n\n\n\n\n","category":"method"},{"location":"C4Blade/airfoil_types/CCBlade/#DuctAPE.C4Blade.mach_correction-Tuple{DuctAPE.C4Blade.PrandtlGlauert, Any, Any, Any}","page":"CCBlade Airfoil Types","title":"DuctAPE.C4Blade.mach_correction","text":"mach_correction(::PrandtlGlauert, cl, cd, Mach)\n\nPrandtl/Glauert Mach number correction for lift coefficient\n\n\n\n\n\n","category":"method"},{"location":"C4Blade/airfoil_types/CCBlade/#DuctAPE.C4Blade.parsefile-Tuple{Any, Any}","page":"CCBlade Airfoil Types","title":"DuctAPE.C4Blade.parsefile","text":"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.\n\nformat:\n\ninformational header\n\nRe\n\nMach\n\nalpha1 cl1 cd1 ...\n\nalpha2 cl2 cd2\n\nalpha3 cl3 cd3\n\n...\n\n\n\n\n\n","category":"method"},{"location":"C4Blade/airfoil_types/CCBlade/#DuctAPE.C4Blade.re_correction-Tuple{DuctAPE.C4Blade.ReCorrection, Any, Any, Any}","page":"CCBlade Airfoil Types","title":"DuctAPE.C4Blade.re_correction","text":"re_correction(re::ReCorrection, cl, cd, Re)\n\nReynolds number correction for lift/drag coefficient\n\nArguments:\n\nre::ReCorrection: used for dispatch\ncl::Float64: lift coefficient before correction\ncd::Float64: drag coefficient before correction\nRe::Float64: Reynolds number\n\nReturns:\n\ncl::Float64: lift coefficient after correction\ncd::Float64: drag coefficient after correction\n\n\n\n\n\n","category":"method"},{"location":"C4Blade/airfoil_types/CCBlade/#DuctAPE.C4Blade.re_correction-Tuple{DuctAPE.C4Blade.SkinFriction, Any, Any, Any}","page":"CCBlade Airfoil Types","title":"DuctAPE.C4Blade.re_correction","text":"re_correction(sf::SkinFriction, cl, cd, Re)\n\nSkin friction coefficient correction based on flat plat drag increases with Reynolds number.\n\n\n\n\n\n","category":"method"},{"location":"C4Blade/airfoil_types/CCBlade/#DuctAPE.C4Blade.rotation_correction","page":"CCBlade Airfoil Types","title":"DuctAPE.C4Blade.rotation_correction","text":"rotation_correction(rc::RotationCorrection, cl, cd, cr, rR, tsr, alpha, phi=alpha, alpha_max_corr=30*pi/180)\n\nRotation correction (3D stall delay).\n\nArguments:\n\nrc::RotationCorrection: used for dispatch\ncl::Float64: lift coefficient before correction\ncd::Float64: drag coefficient before correction\ncr::Float64: local chord / local radius\nrR::Float64: local radius / tip radius\ntsr::Float64: local tip speed ratio (Omega r / Vinf)\nalpha::Float64: local angle of attack\nphi::Float64: local inflow angles (defaults to angle of attack is precomputing since it is only known for on-the-fly computations)\nalpha_max_corr::Float64: angle of attack for maximum correction (tapers off to zero by 90 degrees)\n\nReturns:\n\ncl::Float64: lift coefficient after correction\ncd::Float64: drag coefficient after correction\n\n\n\n\n\n","category":"function"},{"location":"C4Blade/airfoil_types/CCBlade/#DuctAPE.C4Blade.tip_correction-Tuple{DuctAPE.C4Blade.TipCorrection, Vararg{Any, 5}}","page":"CCBlade Airfoil Types","title":"DuctAPE.C4Blade.tip_correction","text":"tip_correction(::TipCorrection, r, Rhub, Rtip, phi, B)\n\nTip corrections for 3D flow.\n\nArguments:\n\ntc::TipCorrection: used for dispatch\nr::Float64: local radius\nRhub::Float64: hub radius\nRtip::Float64: tip radius\nphi::Float64: inflow angle\nB::Integer: number of blades\n\nReturns:\n\nF::Float64: tip loss factor to multiple against loads.\n\n\n\n\n\n","category":"method"},{"location":"C4Blade/airfoil_types/CCBlade/#DuctAPE.C4Blade.viterna","page":"CCBlade Airfoil Types","title":"DuctAPE.C4Blade.viterna","text":"viterna(alpha, cl, cd, cr75, nalpha=50)\n\nViterna extrapolation. Follows Viterna paper and somewhat follows NREL version of AirfoilPrep, but with some modifications for better robustness and smoothness.\n\nArguments:\n\nalpha::Vector{Float64}: angles of attack\ncl::Vector{Float64}: correspnding lift coefficients\ncd::Vector{Float64}: correspnding drag coefficients\ncr75::Float64: chord/Rtip at 75% Rtip\nnalpha::Int64: number of discrete points (angles of attack) to include in extrapolation\n\nReturns:\n\nalpha::Vector{Float64}: angle of attack from -pi to pi\ncl::Vector{Float64}: correspnding extrapolated lift coefficients\ncd::Vector{Float64}: correspnding extrapolated drag coefficients\n\n\n\n\n\n","category":"function"},{"location":"C4Blade/airfoil_types/CCBlade/#DuctAPE.C4Blade.write_af-Tuple{Any, DuctAPE.C4Blade.AlphaAF}","page":"CCBlade Airfoil Types","title":"DuctAPE.C4Blade.write_af","text":"write_af(filename(s), af::AFType; radians=true)\n\nWrite airfoil data to file\n\nArguments:\n\nfilename(s)::String or Vector{String} or Matrix{String}: name/path of file to write to\naf::AFType: writing is dispatched based on type (AlphaAF, AlphaReAF, etc.)\nradians::Bool: true if you want angle of attack to be written in radians\n\n\n\n\n\n","category":"method"},{"location":"DuctAPE/api/private_prelims/#Option-Types","page":"Prelims","title":"Option Types","text":"","category":"section"},{"location":"DuctAPE/api/private_prelims/","page":"Prelims","title":"Prelims","text":"DuctAPE.DFDC_options\nDuctAPE.ConvergenceType\nDuctAPE.Relative\nDuctAPE.Absolute\nDuctAPE.SolverOptionsType\nDuctAPE.InternalSolverOptions\nDuctAPE.InternalPolyAlgorithmOptions\nDuctAPE.ExternalSolverOptions\nDuctAPE.ExternalPolyAlgorithmOptions\nDuctAPE.GridSolverOptionsType\nDuctAPE.IntegrationMethod","category":"page"},{"location":"DuctAPE/api/private_prelims/#DuctAPE.DFDC_options","page":"Prelims","title":"DuctAPE.DFDC_options","text":"function DFDC_options(;\n grid_solver_options=SLORGridSolverOptions(),\n solver_options=CSORSolverOptions(),\n kwargs...,\n)\n\nConvenience function to select options used in DFDC.\n\n\n\n\n\nfunction DFDC_options(\n multipoint;\n grid_solver_options=SLORGridSolverOptions(),\n solver_options=CSORSolverOptions(),\n kwargs...,\n)\n\nConvenience function to select options used in DFDC and run multipoint analysis.\n\nArguments\n\nmultipoint::Vector : doesn't need to be anything but a vector of the length of multipoints.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_prelims/#DuctAPE.ConvergenceType","page":"Prelims","title":"DuctAPE.ConvergenceType","text":"abstract type ConvergenceType\n\nUsed in dispatching the CSOR (controlled successive over relaxation) residual as relative or absolute.\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/api/private_prelims/#DuctAPE.Relative","page":"Prelims","title":"DuctAPE.Relative","text":"struct Relative <: ConvergenceType\n\nUsed to dispatch the relative residual for CSOR (controlled successive over relaxation) method\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/api/private_prelims/#DuctAPE.Absolute","page":"Prelims","title":"DuctAPE.Absolute","text":"struct Absolute <: ConvergenceType\n\nUsed to dispatch the absolute residual for CSOR (controlled successive over relaxation) method\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/api/private_prelims/#DuctAPE.SolverOptionsType","page":"Prelims","title":"DuctAPE.SolverOptionsType","text":"abstract type SolverOptionsType\n\nUsed for solver dispatch.\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/api/private_prelims/#DuctAPE.InternalSolverOptions","page":"Prelims","title":"DuctAPE.InternalSolverOptions","text":"abstract type InternalSolverOptions <: SolverOptionsType\n\nUsed for solver dispatch.\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/api/private_prelims/#DuctAPE.InternalPolyAlgorithmOptions","page":"Prelims","title":"DuctAPE.InternalPolyAlgorithmOptions","text":"abstract type InternalPolyAlgorithmOptions <: SolverOptionsType\n\nUsed for solver dispatch.\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/api/private_prelims/#DuctAPE.ExternalSolverOptions","page":"Prelims","title":"DuctAPE.ExternalSolverOptions","text":"abstract type ExternalSolverOptions <: SolverOptionsType\n\nUsed for solver dispatch.\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/api/private_prelims/#DuctAPE.ExternalPolyAlgorithmOptions","page":"Prelims","title":"DuctAPE.ExternalPolyAlgorithmOptions","text":"abstract type ExternalPolyAlgorithmOptions <: SolverOptionsType\n\nUsed for solver dispatch.\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/api/private_prelims/#DuctAPE.GridSolverOptionsType","page":"Prelims","title":"DuctAPE.GridSolverOptionsType","text":"abstract type GridSolverOptionsType\n\nUsed for elliptic grid solver dispatch\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/api/private_prelims/#DuctAPE.IntegrationMethod","page":"Prelims","title":"DuctAPE.IntegrationMethod","text":"abstract type IntegrationMethod\n\nUsed in integration method dispatch\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/api/private_prelims/#Bookkeeping","page":"Prelims","title":"Bookkeeping","text":"","category":"section"},{"location":"DuctAPE/api/private_prelims/","page":"Prelims","title":"Prelims","text":"DuctAPE.get_problem_dimensions","category":"page"},{"location":"DuctAPE/api/private_prelims/#DuctAPE.get_problem_dimensions","page":"Prelims","title":"DuctAPE.get_problem_dimensions","text":"get_problem_dimensions(paneling_constants::PanelingConstants)\nget_problem_dimensions(body_vortex_panels, rotor_source_panels, wake_vortex_panels)\n\nDetermine all relevant dimensions to the problem based either on the paneling_constants or the panels themselves.\n\nArguments\n\npaneling_constants::PanelingConstants : Rotor (and possibly stator) geometric paramters.\n\nReturns\n\nproblem_dimensions::ProblemDimensions : ProblemDimensions object.\n\n\n\n\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_prelims/#Caching","page":"Prelims","title":"Caching","text":"","category":"section"},{"location":"DuctAPE/api/private_prelims/#Allocation","page":"Prelims","title":"Allocation","text":"","category":"section"},{"location":"DuctAPE/api/private_prelims/","page":"Prelims","title":"Prelims","text":"The following are various helper functions used in preallocating the various caches.","category":"page"},{"location":"DuctAPE/api/private_prelims/","page":"Prelims","title":"Prelims","text":"DuctAPE.initialize_all_caches\nDuctAPE.allocate_wake_panel_container!\nDuctAPE.allocate_panel_containers!\nDuctAPE.allocate_panel_container!\nDuctAPE.allocate_body_panel_container!\nDuctAPE.allocate_rotor_panel_container!\nDuctAPE.allocate_solve_parameter_extras!\nDuctAPE.allocate_grid_parameter_cache\nDuctAPE.allocate_integration_containers","category":"page"},{"location":"DuctAPE/api/private_prelims/#DuctAPE.initialize_all_caches","page":"Prelims","title":"DuctAPE.initialize_all_caches","text":"initialize_all_caches(solver_options, paneling_constants)\n\nConvenience function to initialize all caches before calling analysis.\n\nArguments\n\nsolver_options::SolverOptionsType : solver options used for cache allocation dispatch\npaneling_constants::PanelingConstants : PanelingConstants object upon which all cache sizing depends\n\nKeyword Arguments\n\nfd_chunk_size::Int=12 : chunk size to use for PreallocationTools caches. Note that the automated chunk 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.\nlevels::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.\n\nReturns\n\nprepost_container_caching::NamedTuple : A named tuple containing the PreallocationTools DiffCache and a named tuple with relevant dimensions for accessing the cache.\nsolve_parameter_caching::NamedTuple : A named tuple containing the PreallocationTools DiffCache and a named tuple with relevant dimensions for accessing the cache.\nsolve_container_caching::NamedTuple : A named tuple containing the PreallocationTools DiffCache and a named tuple with relevant dimensions for accessing the cache.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_prelims/#DuctAPE.allocate_wake_panel_container!","page":"Prelims","title":"DuctAPE.allocate_wake_panel_container!","text":"allocate_wake_panel_containers!(total_length, problem_dimensions::ProblemDimensions)\n\nA helper function is assembling the prepostcontainercache.\n\nArguments\n\ntotal_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.\nproblem_dimensions::ProblemDimensions : a ProblemDimensions object\n\nReturns\n\nwake_vortex_panels::NamedTuple : A named containing the dimensions needed to reshape the cache with regards to the wake vortex panel object\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_prelims/#DuctAPE.allocate_panel_containers!","page":"Prelims","title":"DuctAPE.allocate_panel_containers!","text":"allocate_panel_containers!(total_length, problem_dimensions::ProblemDimensions)\n\nA helper function is assembling the prepostcontainercache.\n\nArguments\n\ntotal_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.\nproblem_dimensions::ProblemDimensions : a ProblemDimensions object\n\nReturns\n\npanels::NamedTuple : A named tuple of named tuples containing the dimensions needed to reshape the cache with regards to the panel objects\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_prelims/#DuctAPE.allocate_panel_container!","page":"Prelims","title":"DuctAPE.allocate_panel_container!","text":"allocate_panel_container!(total_length, nn, np, tn, tp, nb)\n\nA helper function is assembling the prepostcontainercache.\n\nArguments\n\ntotal_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.\nnn::Int : number of nodes in each body, rotor, or wake sheet\nnp::Int : number of panels in each body, rotor, or wake sheet\ntn::Int : number of total nodes among the bodies, rotors, or wake sheets\ntp::Int : number of total panels among the bodies, rotors, or wake sheets\nnb::Int : number of bodies, rotors, or wake sheets\n\nReturns\n\npanel::NamedTuple : A named containing the dimensions needed to reshape the cache with regards to an arbitrary panel set\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_prelims/#DuctAPE.allocate_body_panel_container!","page":"Prelims","title":"DuctAPE.allocate_body_panel_container!","text":"allocate_body_panel_containers!(total_length, problem_dimensions::ProblemDimensions)\n\nA helper function is assembling the prepostcontainercache.\n\nArguments\n\ntotal_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.\nproblem_dimensions::ProblemDimensions : a ProblemDimensions object\n\nReturns\n\nbody_vortex_panels::NamedTuple : A named tuple containing the dimensions needed to reshape the cache with regards to the body vortex panel object\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_prelims/#DuctAPE.allocate_rotor_panel_container!","page":"Prelims","title":"DuctAPE.allocate_rotor_panel_container!","text":"allocate_rotor_panel_containers!(total_length, problem_dimensions::ProblemDimensions)\n\nA helper function is assembling the prepostcontainercache.\n\nArguments\n\ntotal_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.\nproblem_dimensions::ProblemDimensions : a ProblemDimensions object\n\nReturns\n\nrotor_source_panels::NamedTuple : A named containing the dimensions needed to reshape the cache with regards to the rotor source panel object\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_prelims/#DuctAPE.allocate_solve_parameter_extras!","page":"Prelims","title":"DuctAPE.allocate_solve_parameter_extras!","text":"allocate_solve_parameter_extras!(\n solver_options::SolverOptionsType, input_length, total_length\n)\n\nIncludes additional caching for various solvers. Currently only does anything for SIAMFANLEOptions types.\n\nArguments\n\ninput_length::Int : the number of state variables in the solver\ntotal_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.\n\nReturns\n\nsolve_parameter_extras::NamedTuple : A named tuple containing dimensions related to extra caching parameters used in various solvers.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_prelims/#DuctAPE.allocate_grid_parameter_cache","page":"Prelims","title":"DuctAPE.allocate_grid_parameter_cache","text":"allocate_grid_parameter_cache(pg, x, n)\n\nAllocate a cache used inside the elliptic grid solve.\n\nArguments\n\npg::AbstractArray{Float,3} : the proposed grid array\nx::AbstractVector{Float} : the array of ξ values used in the solve\nn::AbstractVector{Float} : the array of η values used in the solve\n\nReturns\n\ngrid_parameter_cache::NamedTuple : A named tuple containing the PreallocationTools DiffCache and dimensions for accessing it.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_prelims/#DuctAPE.allocate_integration_containers","page":"Prelims","title":"DuctAPE.allocate_integration_containers","text":"allocate_integration_containers(\n integration_options::IntegrationMethod, dispatch_type; cache_size=20\n)\n\nDescription\n\nArguments\n\nintegration_options::IntegrationMethod : options for integration used for dispatch and to size cache\ndispatch_type:: : an object with eltype(dispatch_type) with which to define the type for cache initialization.\n\nKeyword Arguments\n\ncache_size::Int=20 : size needed for intermediate calculations for integration.\n\nReturns\n\nintegration_containers::NamedTuple : A named tuple containing the cache(s) needed for integration.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_prelims/#Reshaping","page":"Prelims","title":"Reshaping","text":"","category":"section"},{"location":"DuctAPE/api/private_prelims/","page":"Prelims","title":"Prelims","text":"The following are used internally to reshape the cache vectors into more usable formats.","category":"page"},{"location":"DuctAPE/api/private_prelims/","page":"Prelims","title":"Prelims","text":"DuctAPE.withdraw_prepost_container_cache\nDuctAPE.withdraw_solve_parameter_cache\nDuctAPE.withdraw_solve_container_cache\nDuctAPE.withdraw_grid_parameter_cache","category":"page"},{"location":"DuctAPE/api/private_prelims/#DuctAPE.withdraw_prepost_container_cache","page":"Prelims","title":"DuctAPE.withdraw_prepost_container_cache","text":"withdraw_prepost_container_cache(vec, dims)\n\nReshape the prepost cache vector using the saved dimensions tuple.\n\nArguments\n\nvec::Vector{Float} : vector cache of pre- and post-processing intermediate containers.\ndims::NamedTuple : Named tuple containing the indices and shape of the various items stored in the cache vector.\n\nReturns\n\nprepost_container_caching::NamedTuple : Named tuple containing reshaped views of sections of the cache vector.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_prelims/#DuctAPE.withdraw_solve_parameter_cache","page":"Prelims","title":"DuctAPE.withdraw_solve_parameter_cache","text":"withdraw_solve_parameter_cache(solver_options::SolverOptionsType, vec, dims)\n\nReshape the solve parameter cache vector using the saved dimensions tuple.\n\nArguments\n\nsolver_options::SolverOptionsType : Solver options type for dispatch.\nvec::Vector{Float} : vector cache of pre- and post-processing intermediate containers.\ndims::NamedTuple : Named tuple containing the indices and shape of the various items stored in the cache vector.\n\nReturns\n\nsolve_parameter_caching::NamedTuple : Named tuple containing reshaped views of sections of the cache vector.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_prelims/#DuctAPE.withdraw_solve_container_cache","page":"Prelims","title":"DuctAPE.withdraw_solve_container_cache","text":"withdraw_solve_container_cache(solver_options::SolverOptionsType, vec, dims)\n\nReshape the intermediate solve container cache vector using the saved dimensions tuple.\n\nArguments\n\nsolver_options::SolverOptionsType : Solver options type for dispatch.\nvec::Vector{Float} : vector cache of pre- and post-processing intermediate containers.\ndims::NamedTuple : Named tuple containing the indices and shape of the various items stored in the cache vector.\n\nReturns\n\nsolve_container_caching::NamedTuple : Named tuple containing reshaped views of sections of the cache vector.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_prelims/#DuctAPE.withdraw_grid_parameter_cache","page":"Prelims","title":"DuctAPE.withdraw_grid_parameter_cache","text":"withdraw_grid_parameter_cache(vec, dims)\n\nReshape the cache used inside the elliptic grid solve.\n\nArguments\n\nvec::Vector{Float} : the cache vector\ndims::NamedTuple : the named tuple of dimensions used to reshape the cache vector\n\nReturns\n\nproposed_grid::AbstractArray{Float,3} : the proposed grid array\nxi::AbstractVector{Float} : the array of ξ values used in the solve\neta::AbstractVector{Float} : the array of η values used in the solve\n\n\n\n\n\n","category":"function"},{"location":"C4Blade/airfoil_types/DFDC/#DFDC-Airfoil-Type","page":"DFDC Airfoil Type","title":"DFDC Airfoil Type","text":"","category":"section"},{"location":"C4Blade/airfoil_types/DFDC/","page":"DFDC Airfoil Type","title":"DFDC Airfoil Type","text":"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.","category":"page"},{"location":"C4Blade/airfoil_types/DFDC/","page":"DFDC Airfoil Type","title":"DFDC Airfoil Type","text":"DuctAPE.C4Blade.DFDCairfoil","category":"page"},{"location":"C4Blade/airfoil_types/DFDC/#DuctAPE.C4Blade.DFDCairfoil","page":"DFDC Airfoil Type","title":"DuctAPE.C4Blade.DFDCairfoil","text":"Fields:\n\nalpha0::Float : zero lift angle of attack\nclmax::Float : maximum cl\nclmin::Float : minimum cl\ndclda::Float : lift curve slope (1/radians)\ndclda_stall::Float : lift curve slope post-stall (1/radians)\ndcl_stall::Float : cl increment from initial to total stall.\ncdmin::Float : minimum cd\ncldmin::Float : cl at cdmin\ndcddcl2::Float : quadratic curve factor for cl vs cd curve left(fracd(c_d)d(c_l^2)right)\ncmcon::Float : pitching moment constant (unused right now)\nRe_ref::Float : reference Reynolds number at which cd values apply\nRe_exp::Float : Reynolds number exponent scaling left( c_d = c_d(ReRe_ref)^Re_expright) should be 0.2 for fully laminar and 0.5 for fully turbulent\nmcrit::Float : critical Mach number\ncorrect_for_mach::Bool : flag to add Prandtl-Glauert correction\ncorrect_for_cascade::Bool : flag to add cascade corrections\ncorrect_for_reynolds::Bool : flag to add reynolds drag correction\ncorrect_for_transonic::Bool : flag to add drag correction above critical mach number\n\n\n\n\n\n","category":"type"},{"location":"C4Blade/airfoil_types/actuator_disk/#Actuator-Disk-Type","page":"Actuator Disk Type","title":"Actuator Disk Type","text":"","category":"section"},{"location":"C4Blade/airfoil_types/actuator_disk/","page":"Actuator Disk Type","title":"Actuator Disk Type","text":"warning: Warning\nActuator disk types are currently in development and not ready for general use.","category":"page"},{"location":"C4Blade/airfoil_types/actuator_disk/","page":"Actuator Disk Type","title":"Actuator Disk Type","text":"DuctAPE currently implements an actuator disk type that can be used to directly define the rotor blade circulation.","category":"page"},{"location":"C4Blade/airfoil_types/actuator_disk/","page":"Actuator Disk Type","title":"Actuator Disk Type","text":"DuctAPE.C4Blade.ADM","category":"page"},{"location":"C4Blade/airfoil_types/actuator_disk/#DuctAPE.C4Blade.ADM","page":"Actuator Disk Type","title":"DuctAPE.C4Blade.ADM","text":"Fields:\n\nprescribed_circulation::Float=0.0 : Prescribed circulation strength\nprescribed_source_strength::Float=0.0 : Prescribed source panel strength\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/api/private_api/#Private-API","page":"Private API","title":"Private API","text":"","category":"section"},{"location":"DuctAPE/api/private_api/","page":"Private API","title":"Private API","text":"Pages = [\"private_api.md\",\n\"private_prelims.md\",\n\"private_preprocess.md\",\n\"private_process.md\",\n\"private_postprocess.md\",\n\"private_utlities.md\"]\nDepth = 5","category":"page"},{"location":"DuctAPE/advanced_usage/option/#Advanced-Option-Selection","page":"Options","title":"Advanced Option Selection","text":"","category":"section"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"DuctAPE has been written in an attempt to make as many of the available options exposed to the user as possible. This means that there are quite a few options to select from if not using the option convenience functions. To help the user, the majority of overarching option types are defined using the @kwdef macro and have default values that should be reasonable in most cases. We will introduce some of the available options here that may be of common interest.","category":"page"},{"location":"DuctAPE/advanced_usage/option/#General-Option-Selection","page":"Options","title":"General Option Selection","text":"","category":"section"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"In general, options are all accessed through the options argument of the analysis function being called. Said options are passed via an Options struct.","category":"page"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"DuctAPE.Options","category":"page"},{"location":"DuctAPE/advanced_usage/option/#DuctAPE.Options-DuctAPE-advanced_usage-option","page":"Options","title":"DuctAPE.Options","text":"struct Options\n\nType containing (nearly) all the available user options.\n\nFields\n\nGeneral Options\n\nverbose::Bool = false : flag to print verbose statements\nsilence_warnings::Bool = true : flag to silence warnings\nmultipoint_index::Int = [1] : holds current index of multi-point solver (no need for user to change this usually)\n\nPre-processing Options\n\nGeometry interpolation and generation options :\n\nfinterp::Interplation Method = FLOWMath.akima : interpolation method used for re-paneling bodies\nautoshiftduct::Bool = true : flag as to whether duct geometry should be shifted based on rotor tip location\nlu_decomp_flag::Bool = false : flag indicating if panel method LHS matrix factorization was successful\n\npaneling options\n\nitcpshift::Float = 0.05 : factor for internal trailing edge psuedo-panel placement (default is DFDC hard-coded value)\naxistol::Float = 1e-15 : tolerance for how close the the axis of rotation should be considered on the axis\ntegaptol::Float = 1e1 * eps() : tolerance for how large of a trailing edge gap should be considered a gap\n\nIntegration Options\n\nintegration_options::IntegrationOptions type = IntegrationOptions() : integration options\n\nPost-processing Options\n\nwrite_outputs::AbstractArray{Bool} = [false] : Bool for whether to write the outputs of the analysis to an external file (slow)\noutfile::AbstractArray{String} = [\"outputs.jl\"] : External output file name (including path information) for files to write\ncheckoutfileexists::Bool = false : Flag for whether to check if file exists before overwriting\noutput_tuple_name::AbstractArray{String} = [\"outs\"] : variable name for named tuple written to out file\n\nSolving Options\n\ngrid_solver_options::GridSolverOptionsType = GridSolverOptions() : elliptic grid solver options\nsolver_options::SolverOptionsType = ChainSolverOptions() : solver options\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"Options are selected through the set_options function","category":"page"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"DuctAPE.set_options","category":"page"},{"location":"DuctAPE/advanced_usage/option/#DuctAPE.set_options-DuctAPE-advanced_usage-option","page":"Options","title":"DuctAPE.set_options","text":"set_options(; kwargs...)\nset_options(multipoint; kwargs...)\n\nSet the options for DuctAPE to use.\n\nNote that the vast majority of the available options are defined through keyword arguments. See the documentation for the various option types for more information.\n\nArguments\n\nmultipoint::AbstractArray{OperatingPoint} : a vector of operating points to use if running a multi-point analysis.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"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.","category":"page"},{"location":"DuctAPE/advanced_usage/option/#Quadrature","page":"Options","title":"Quadrature","text":"","category":"section"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"There are several implementations for different quadrature approaches depending on user desires; they include:","category":"page"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"Gauss-Legendre quadature (default),\nGauss-Kronrod Quadrature, and\nRomberg Quadrature methods.","category":"page"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"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.","category":"page"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"DuctAPE.IntegrationOptions","category":"page"},{"location":"DuctAPE/advanced_usage/option/#DuctAPE.IntegrationOptions-DuctAPE-advanced_usage-option","page":"Options","title":"DuctAPE.IntegrationOptions","text":"struct IntegrationOptions\n\nA struct used to hold the integration options for both the nominal and singular cases.\n\nFields\n\nnominal::IntegrationMethod=GaussLegendre(8) : the integration options to use for the nominal case.\nsingular::IntegrationMethod=GaussLegendre(8) : the integration options to use for the self-induced case.\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"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.","category":"page"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"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:","category":"page"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"# set nominal options using a GaussLegendre object (which is an InterationMethod type)\n# note that a convenience method is used here that takes in the number of points and\n#calculates the appropriate sample locations and weights.\nnominal_integration_method = DuctAPE.GaussLegendre(10)\n\n# set singular options using a GaussKronrod object (which is an InterationMethod type)\n# note that like most option structs, these are defined using @kwdef allowing the fields\n#to be treated as keyword arguments.\n# also note that we haven't changed the evaluation limit (default 10^7)\nsingular_integration_method = DuctAPE.GaussKronrod(; order=7, atol=2e-16)\n\n# put the quadrature options together\nintegration_options = DuctAPE.IntegrationOptions(;\n nominal=nominal_integration_method, singular=singular_integration_method\n)\n\n# example of calling the set_options function\noptions = DuctAPE.set_options(; integration_options=integration_options)","category":"page"},{"location":"DuctAPE/advanced_usage/option/#Elliptic-Grid-Solvers","page":"Options","title":"Elliptic Grid Solvers","text":"","category":"section"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"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:","category":"page"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"SLOR: DFDC grid solver\nDefault: Default method compatible with ImplicitAD","category":"page"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"The SLOR (successive line over relaxation) is the method employed by DFDC.","category":"page"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"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.","category":"page"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"For the SLOR method alone, the type is","category":"page"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"DuctAPE.SLORGridSolverOptions","category":"page"},{"location":"DuctAPE/advanced_usage/option/#DuctAPE.SLORGridSolverOptions-DuctAPE-advanced_usage-option","page":"Options","title":"DuctAPE.SLORGridSolverOptions","text":"struct SLORGridSolverOptions <: GridSolverOptionsType\n\nOptions for SLOR (successive line over relaxation) elliptic grid solver.\n\nFields\n\niteration_limit::Int = 100 : maximum number of iterations\natol::Float = 1e-9 : absolute convergence tolerance\nconverged::AbstractArray{Bool} = [false]\niterations::AbstractArray{Int} = [0] : iteration counter\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"And for the default method compatible with ImplicitAD, the type is","category":"page"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"DuctAPE.GridSolverOptions","category":"page"},{"location":"DuctAPE/advanced_usage/option/#DuctAPE.GridSolverOptions-DuctAPE-advanced_usage-option","page":"Options","title":"DuctAPE.GridSolverOptions","text":"struct GridSolverOptions <: GridSolverOptionsType\n\nOptions for SLOR + Newton elliptic grid solver.\n\nFields\n\niteration_limit::Int = 10 : maximum number of iterations\natol::Float = 1e-14 : absolute convergence tolerance\nalgorithm::Symbol = :newton : algorithm to use in NLsolve.jl\nautodiff::Symbol = :forward : differentiation method to use in NLsolve.jl\nconverged::AbstractArray{Bool} = [false]\niterations::AbstractArray{Int} = [0] : iteration counter\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"As an example, this is the input that would be required to use the default method with an absolute convergence tolerance of 1e-10, and also including the quadrature settings from above:","category":"page"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"# define wake grid solver settings\nwake_solve_options = DuctAPE.GridSolverOptions(; atol=1e-10)\n\n# set all options\noptions = DuctAPE.set_options(;\n integration_options=integration_options, grid_solver_options=wake_solve_options\n)","category":"page"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"note: Convergence Flags\nThe convergence flags default to false, and in general should be left alone as they are modified in-place in the various solves by the analysis.","category":"page"},{"location":"DuctAPE/advanced_usage/option/#Aerodynamics-Solvers","page":"Options","title":"Aerodynamics Solvers","text":"","category":"section"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"There are two general types of solvers available in DuctAPE, the first is very similar to the solver in DFDC and converges a residual very similar to DFDC's. The other type is for external solvers that converge an alternate residual that is default in DuctAPE. The various solver options include:","category":"page"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"CSOR: the DFDC solver\nModCSOR: modified DFDC solver for ImplicitAD compatibility\nFixedPoint.jl\nSpeedMapping.jl\nMINPACK.jl\nSIAMFANLEquations.jl\nNLsolve.jl\nSimpleNonlinearSolve.jl","category":"page"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"Note that the CSOR, ModCSOR, FixedPoint.jl, and SpeedMapping.jl are all different fixed-point iteration solvers, MINPACK.jl and SIAMFANLEquations.jl are primarily quasi-newton solvers, and NLsolve.jl and SimpleNonlinearSolve.jl have various solver options.","category":"page"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"DuctAPE also has some poly-algorithm solvers that employ more than one solver. The Chain Solver option is the default which starts with a fixed-point iteration, and if it doesn't converge, moves on to a quasi-, then full Newton solver until either convergence is reached, or no convergence is found. The other poly-algorithm that is available, but is less robust is the Composite Solver which partially converges with one solver, and finishes with another.","category":"page"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"Each of the solve methods have a variety of different settings associated with them, detailed in their respective docstrings. The following example should contain all the principles required to be able to adapt to the most complex use cases.","category":"page"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"# Define settings for NLsolve's newton method\naero_solver_options = DuctAPE.NLsolveOptions(;\n algorithm=:newton,\n atol=1e-10,\n iteration_limite=30,\n linesearch_method=LineSearches.BackTracking, #don't include parentheses on method handle\n linesearch_kwargs=(; order=3, maxstep=1e6),\n additional_kwargs=(; autoscale=false),\n)\n\n# set all the options\nDuctAPE.set_options(;\n integration_options=integration_options,\n grid_solver_options=wake_solve_options,\n solver_options=aero_solver_options,\n)","category":"page"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"note: Iteration Counters\nThe iterations field (not to be confused with the iterations_limit field) in the solver options should generally not be changed. They automatically save (in-place) the number of iterations the solver performs and can be accessed after the analysis is run.","category":"page"},{"location":"DuctAPE/advanced_usage/option/#Advanced-Options-for-Multi-point-analyses","page":"Options","title":"Advanced Options for Multi-point analyses","text":"","category":"section"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"For using advanced options in multi-point analyses, there are various changes that need to be made to avoid run-time errors. Here is an example for setting options with the CSOR solver.","category":"page"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"# number of operating points to analyze\nnop = 3\n\noptions = DuctAPE.set_options(;\n solver_options=DuctAPE.ModCSORSolverOptions(;\n converged=fill(false, (1, nop)), # need a convergence flag for each operating point\n iterations=zeros(Int, (1, nop)), # need a iteration count for each operating point\n ),\n write_outputs=fill(false, nop), # we need to know which of the operating point outputs to write\n outfile=fill(\"\", nop), # we need to include names, even if they won't be used.\n output_tuple_name=fill(\"outs\", nop), # we need to include names, even if they won't be used.\n)","category":"page"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"If using a poly-algorithm with a multi-point solve, then each of the solvers needs to have the multiple converged and iterations fields for each operating point, and the overall solve type needs to have a converged and iterations field for each solver and each operating point.","category":"page"},{"location":"DuctAPE/advanced_usage/option/","page":"Options","title":"Options","text":"options = DuctAPE.set_options(;\n solver_options=DuctAPE.ChainSolverOptions(;\n solvers=[ # vector of solvers to use in poly-algorithm\n DuctAPE.NLsolveOptions(;\n algorithm=:anderson,\n atol=1e-12,\n iteration_limit=200,\n converged=fill(false, (1, nop)), # flags for each operating point\n iterations=zeros(Int, (1, nop)), # counters for each operating point\n ),\n DuctAPE.MinpackOptions(;\n atol=1e-12,\n iteration_limit=100,\n converged=fill(false, (1, nop)),\n iterations=zeros(Int, (1, nop)),\n ),\n ],\n converged=fill(false, (2, nop)), # flags for each solver and each operating point\n iterations=zeros(Int, (2, nop)), # counts for each solver and each operating point\n ),\n)","category":"page"},{"location":"C4Blade/airfoil_types/cascade/#Cascade-Types","page":"Cascade Types","title":"Cascade Types","text":"","category":"section"},{"location":"C4Blade/airfoil_types/cascade/","page":"Cascade Types","title":"Cascade Types","text":"warning: Warning\nCascade types are currently in development and not ready for general use.","category":"page"},{"location":"C4Blade/airfoil_types/cascade/","page":"Cascade Types","title":"Cascade Types","text":"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.","category":"page"},{"location":"C4Blade/airfoil_types/cascade/","page":"Cascade Types","title":"Cascade Types","text":"Modules = [DuctAPE.C4Blade]\nPages = [\"C4Blade/cascades.jl\"]","category":"page"},{"location":"C4Blade/airfoil_types/cascade/#DuctAPE.C4Blade.InReStSoMaCAS","page":"Cascade Types","title":"DuctAPE.C4Blade.InReStSoMaCAS","text":"InReStSoMaCAS(inflow, Re, stagger, solidity, Mach, cl, cd, info)\nInReStSoMaCAS(inflow, Re, stagger, solidity, Mach, cl, cd)\nInReStSoMaCAS(filenames::Matrix{String}; radians=true)\n\nData is fit recursively with Akima splines.\n\nArguments:\n\ninflow::Vector{Float64}: inflow angles\nRe::Vector{Float64}: Reynolds numbers\nstagger::Vector{Float64}: stagger angles\nsolidity::Vector{Float64}: local solidity\nMach::Vector{Float64}: Mach numbers\ncl::Array{Float64}: lift coefficients where cl[i, j, k, ell] corresponds to stagger[i], Re[j], Mach[k], solidity[ell]\ncd::Array{Float64}: drag coefficients where cd[i, j, k, ell] corresponds to stagger[i], Re[j], Mach[k], solidity[ell]\ninfo::String: a description of this airfoil data (just informational)\n\nor files with one per Re/Stagger/Solidty/Mach combination\n\nArguments:\n\nfilenames::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.\nradians::Bool: true if angle of attack in file is given in radians\n\n\n\n\n\n","category":"type"},{"location":"C4Blade/airfoil_types/cascade/#DuctAPE.C4Blade.interp5d-NTuple{12, Any}","page":"Cascade Types","title":"DuctAPE.C4Blade.interp5d","text":" interp5d(interp1d, x1data, x2data, x3data, x4data, fdata, x1pt, x2pt, x3pt, x4pt)\n\nSame as FLOWMath.interp4d, ex1cept in five dimensions.\n\n\n\n\n\n","category":"method"},{"location":"C4Blade/airfoil_types/cascade/#DuctAPE.C4Blade.parsecascadefile-Tuple{Any, Any}","page":"Cascade Types","title":"DuctAPE.C4Blade.parsecascadefile","text":"parsefile(filename, radians, solidity)\n\nCascade version of parsefile function from CCBlade. Assumes stagger is given before reynolds and Mach number, and solidity is given after\n\n\n\n\n\n","category":"method"},{"location":"C4Blade/airfoil_types/cascade/#DuctAPE.C4Blade.writecascadefile-NTuple{10, Any}","page":"Cascade Types","title":"DuctAPE.C4Blade.writecascadefile","text":"writecascadefile(filename, info, Re, Mach, stagger, inflow, cl, cd, radians)\n\nCascade version of writecascadefile function from CCBlade. Writes solidity after Mach number\n\n\n\n\n\n","category":"method"},{"location":"C4Blade/corrections/#Airfoil-Polar-Corrections","page":"Polar Modification","title":"Airfoil Polar Corrections","text":"","category":"section"},{"location":"C4Blade/corrections/","page":"Polar Modification","title":"Polar Modification","text":"In some cases various airfoil polar corrections may be required. Of specific note are modifications to airfoil polars for post-stall behavior. Thus far, DuctAPE is much more robust if the post-stall behavior in the lift polars does not exhibit a decrease in lift at angles of attack beyond that of the maximum lift coefficient. Therefore a function is provided to help modify polars as needed:","category":"page"},{"location":"C4Blade/corrections/","page":"Polar Modification","title":"Polar Modification","text":"DuctAPE.C4Blade.stall_limiters","category":"page"},{"location":"C4Blade/corrections/#DuctAPE.C4Blade.stall_limiters","page":"Polar Modification","title":"DuctAPE.C4Blade.stall_limiters","text":"stall_limiters(\n aoa,\n cl,\n cd;\n clminid=nothing,\n clmaxid=nothing,\n cl_cutoff_slope=0.1,\n cd_cutoff_slope=0.9,\n N=20,\n blend_hardness=50\n)\n\nCuts 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)\n\nArguments:\n\naoa::AbstractVector{Float} : input angles of attack, in radians\ncl::AbstractVector{Float} : input lift coefficients\ncd::AbstractVector{Float} : input drag coefficients\n\nKeyword Arguments:\n\nclminid::Float=nothing : manually set index for minimum cl\nclmaxid::Float=nothing : manually set index for maximum cl\ncl_cutoff_slope::Float=0.1 : \"post-stall\" slope for cl\ncd_cutoff_slope::Float=0.1 : \"post-stall\" slope for cd\nblend_hardness::Float=50 : hardenss of blend between nominal polar and post-stall modifications.\n\nReturns:\n\naoa_ext::AbstractVector{Float} : angles of attack for modified polar, in radians\ncl_ext::AbstractVector{Float} : modified lift coefficients\ncd_ext::AbstractVector{Float} : modified drag coefficients\n\n\n\n\n\n","category":"function"},{"location":"C4Blade/corrections/","page":"Polar Modification","title":"Polar Modification","text":"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.","category":"page"},{"location":"C4Blade/corrections/","page":"Polar Modification","title":"Polar Modification","text":"Modules = [DuctAPE.C4Blade]\nPages = [\"C4Blade/airfoil_corrections.jl\"]","category":"page"},{"location":"C4Blade/corrections/#DuctAPE.C4Blade.corrected_clcd-Tuple{DuctAPE.C4Blade.AlphaReAF, Vararg{Any, 9}}","page":"Polar Modification","title":"DuctAPE.C4Blade.corrected_clcd","text":"corrected_clcd(af::AlphaReAF, alpha, Re, Mach, solidity, stagger; kwargs...)\n\nEvaluates 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.\n\ncorrected_clcd!(cl, cd, af::AlphaReAF, Re, alpha, Mach, solidity, stagger; kwargs...)\n\nEvaluates and applies on-the-fly corrections for airfoil lift and drag in place.\n\ncorrected_clcd!(cl, cd, Mach, solidity, stagger; kwargs...)\n\nApplies on-the-fly corrections for airfoil lift and drag in place.\n\ncorrected_clcd!(cl, cd, af::AlphaAF, alpha, Re, Mach, solidity, stagger; kwargs...)\n\nEvaluates and applies on-the-fly corrections, including Reynolds corrections, for airfoil lift and drag in place\n\ncorrected_clcd(cas::InReStSoMaCAS, inflow, Re, Mach, solidity, stagger)\n\nEvaluates cascade lift and drag.\n\nArguments:\n\nCoefficients\n\ncl::Float : local lift coefficient\ncd::Float : local drag coefficient\n\nAirfoil Object\n\naf::AlphaReAF : airfoil object of CCBlade type dependent on angle of attack and Reynolds number\n\nor\n\naf::AlphaAF : airfoil object of CCBlade type dependent on angle of attack only\n\nor\n\ncas::InReStSoMaCAS : cascade object depentent on inflow angle, Reynolds number, stagger, solidity, and Mach number.\n\nFlow Angle\n\nalpha::Float : angle of attack, radians. Used with airfoil types\n\nor\n\ninflow::Float : inflow angle, radians. Used with cascade types\n\nFlow Conditions\n\nRe::Float : Reynolds number\nMach::Float : Mach number\n\nGeometry\n\nsolidity::Float : Local solidity\nstagger::Float : Stagger angle, radians\n\nKeyword Arguments:\n\nmcrit::Float=0.7 : Critical Mach number\n\nrotorzloc airfoil type parameters for post-stall behavior\n\ndcl_stall::Float=0.1 : change in cl from incipient to total stall, used in transonic lift limiter correction\ndclda_stall::Float=0.1 : Post-stall lift curve slope\n\nCorrection factors that were hard coded in rotorzloc and DFDC\n\ncdmfactor::Float=10.0 :\nclmfactor::Float=0.25 :\nmexp::Float=3.0 :\ncdmstall::Float=0.1 :\ncdmdd::Float=0.0020 :\n\nSmoothing Paramters\n\nssblend_hardness::Float=100.0 : sigmoid blending hardness for solidity/stagger corrections\ntransblendhardness::Float=75.0 : sigmoid blending hardness for transonic corrections\nabsdx::Float=0.0625 : smooth absolute value Δα (radians) for transonic drag addition\n\nMiscellaneous\n\nverbose::Bool=false : Boolean of whether to print warnings, etc.\n\n\n\n\n\n","category":"method"},{"location":"C4Blade/corrections/#DuctAPE.C4Blade.prandtl_glauert!-Tuple{Any, Any}","page":"Polar Modification","title":"DuctAPE.C4Blade.prandtl_glauert!","text":"prandtl_glauert!(cl, ma)\n\nIn place version of pradtl_glauert.\n\n\n\n\n\n","category":"method"},{"location":"C4Blade/corrections/#DuctAPE.C4Blade.prandtl_glauert-Tuple{Any, Any}","page":"Polar Modification","title":"DuctAPE.C4Blade.prandtl_glauert","text":"prandtl_glauert(cl, ma)\n\nApplies Prandtl-Glauert correction\n\nArguments:\n\ncl::Float : local lift coefficient\n\nReturns\n\ncl_corr::AbstractVector{Float} : corrected lift coefficients\n\n\n\n\n\n","category":"method"},{"location":"C4Blade/corrections/#DuctAPE.C4Blade.prandtl_glauert_factor-Tuple{Any}","page":"Polar Modification","title":"DuctAPE.C4Blade.prandtl_glauert_factor","text":"prandtl_glauert_factor(mach; verbose=false, blend_range=0.02)\n\nSmoothed Prandtl-Glauert Mach correction factor\n\nArguments:\n\nmach::Float : Mach number\n\nKeyword Arguments:\n\nblend_range::Float=0.02 : range for blending factor and max cutoff (allowing Mach >= 1.0 for continuity)\n\n\n\n\n\n","category":"method"},{"location":"C4Blade/corrections/#DuctAPE.C4Blade.quadspline-Tuple{Any, Any, Any}","page":"Polar Modification","title":"DuctAPE.C4Blade.quadspline","text":"quadspline(xdata, ydata, xpoint)\n\nSample data in quadratic spline at give point.\n\n\n\n\n\n","category":"method"},{"location":"C4Blade/corrections/#DuctAPE.C4Blade.re_drag!-Tuple{Any, Any, Any}","page":"Polar Modification","title":"DuctAPE.C4Blade.re_drag!","text":"re_drag!(cd, re, re_ref; re_exp=0.5)\n\nIn-place version of re_drag.\n\n\n\n\n\n","category":"method"},{"location":"C4Blade/corrections/#DuctAPE.C4Blade.re_drag-Tuple{Any, Any, Any}","page":"Polar Modification","title":"DuctAPE.C4Blade.re_drag","text":"re_drag(cd, re, re_ref; re_exp=0.5)\n\nArguments:\n\ncd::AbstractVector{Float} : input drag coefficients\nre::Float : Current Reynolds number\nre_ref::Float : Reference Reynolds number (at which the cd's were generated)\n\nKeyword Arguments:\n\nre_exp::Float=0.5 : should be 0.2 for laminar and 0.5 for turbulent flow\n\nReturns:\n\ncd_corr::AbstractVector{Float} : Reynolds corrected drag coefficients\n\n\n\n\n\n","category":"method"},{"location":"C4Blade/corrections/#DuctAPE.C4Blade.solidity_and_stagger!-Tuple{Any, Any, Any}","page":"Polar Modification","title":"DuctAPE.C4Blade.solidity_and_stagger!","text":"solidity_and_stagger!(cl, solidity, stagger; blend_hardness=100)\n\nIn-place version of solidity_and_stagger.\n\n\n\n\n\n","category":"method"},{"location":"C4Blade/corrections/#DuctAPE.C4Blade.solidity_and_stagger-Tuple{Any, Any, Any}","page":"Polar Modification","title":"DuctAPE.C4Blade.solidity_and_stagger","text":"solidity_and_stagger(cl, solidity, stagger; blend_hardness=100)\n\nApply smoothed Wallis' cascade correction (see solidity_and_stagger_factor_smooth) to local lift.\n\nArguments:\n\ncl::AbstractVector{Float} : input lift coefficients\nsolidity::Float : local solidity\nstagger::Float : local stagger (in radians)\n\nKeyword Arguments:\n\nblend_hardness::Float=100 : hardness of smoothing blends\n\nReturns:\n\ncl_corr::AbstractVector{Float} : corrected lift coefficients.\n\n\n\n\n\n","category":"method"},{"location":"C4Blade/corrections/#DuctAPE.C4Blade.solidity_and_stagger_factor-Tuple{Any, Any}","page":"Polar Modification","title":"DuctAPE.C4Blade.solidity_and_stagger_factor","text":"solidity_and_stagger_factor(solidity, stagger; blend_hardness=100)\n\nCorrection 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.\n\nArguments:\n\nsolidity::Float : local solidity\nstagger::Float : local stagger (in radians)\n\nKeyword Arguments:\n\nblend_hardness::Float=100 : hardness for smoothing blends\n\n\n\n\n\n","category":"method"},{"location":"C4Blade/corrections/#DuctAPE.C4Blade.solidity_and_stagger_factor_smooth-Tuple{Any, Any}","page":"Polar Modification","title":"DuctAPE.C4Blade.solidity_and_stagger_factor_smooth","text":"solidity_and_stagger_factor_smooth(solidity, stagger; blend_hardness=100)\n\nA smoothed version of solidity_and_stagger_factor.\n\nArguments:\n\nsolidity::Float : local solidity\nstagger::Float : local stagger (in radians)\n\nKeyword Arguments:\n\nblend_hardness::Float=100 : hardness for smoothing blends\n\n\n\n\n\n","category":"method"},{"location":"C4Blade/corrections/#DuctAPE.C4Blade.stall_limiters-Tuple{Any, Any, Any}","page":"Polar Modification","title":"DuctAPE.C4Blade.stall_limiters","text":"stall_limiters(\n aoa,\n cl,\n cd;\n clminid=nothing,\n clmaxid=nothing,\n cl_cutoff_slope=0.1,\n cd_cutoff_slope=0.9,\n N=20,\n blend_hardness=50\n)\n\nCuts 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)\n\nArguments:\n\naoa::AbstractVector{Float} : input angles of attack, in radians\ncl::AbstractVector{Float} : input lift coefficients\ncd::AbstractVector{Float} : input drag coefficients\n\nKeyword Arguments:\n\nclminid::Float=nothing : manually set index for minimum cl\nclmaxid::Float=nothing : manually set index for maximum cl\ncl_cutoff_slope::Float=0.1 : \"post-stall\" slope for cl\ncd_cutoff_slope::Float=0.1 : \"post-stall\" slope for cd\nblend_hardness::Float=50 : hardenss of blend between nominal polar and post-stall modifications.\n\nReturns:\n\naoa_ext::AbstractVector{Float} : angles of attack for modified polar, in radians\ncl_ext::AbstractVector{Float} : modified lift coefficients\ncd_ext::AbstractVector{Float} : modified drag coefficients\n\n\n\n\n\n","category":"method"},{"location":"C4Blade/corrections/#DuctAPE.C4Blade.transonic_drag_addition!-NTuple{4, Any}","page":"Polar Modification","title":"DuctAPE.C4Blade.transonic_drag_addition!","text":"transonic_drag_addition!(\n cd,\n cl,\n clcdmin,\n mach;\n mcrit=0.7,\n cdmfactor=10.0,\n clmfactor=0.25,\n mexp=3.0,\n cdmdd=0.0020,\n cdmstall=0.1000,\n absdx=0.0625,\n blend_hardness=50,\n)\n\nSmoothed, vecotrized, in-place version of transonic_drag_addition.\n\nDifferent Arguments:\n\ncd::AbstractVector{Float} : vector of drag coefficients\ncl::AbstractVector{Float} : vector of lift coefficients\n\nAdditional Keyword Argument:\n\nblend_hardness::Float=50 : hardenss of smoothing blends\n\n\n\n\n\n","category":"method"},{"location":"C4Blade/corrections/#DuctAPE.C4Blade.transonic_drag_addition-NTuple{4, Any}","page":"Polar Modification","title":"DuctAPE.C4Blade.transonic_drag_addition","text":"transonic_drag_addition(\n cd,\n cl,\n clcdmin,\n mach;\n mcrit=0.7,\n cdmfactor=10.0,\n clmfactor=0.25,\n mexp=3.0,\n cdmdd=0.0020,\n cdmstall=0.1000,\n absdx=0.0625,\n)\n\nDrag augmentation due to transonic effects as found in XROTOR and DFDC. Note this is nominally applied to DFDC airfoil evaluation.\n\nArguments:\n\ncd::Float : input drag coefficient\ncl::Float : input lift coefficient\nclcdmin::Float : lift coefficient at minimum drag coefficient.\nmach::Float : Mach number\n\nKeyword Arguments\n\nmcrit::Float=0.7 : critical Mach number\ncdmfactor::Float=10.0 : factor hard coded in XROTOR and DFDC\nclmfactor::Float=0.25 : factor hard coded in XROTOR and DFDC\nmexp::Float=3.0 : factor hard coded in XROTOR and DFDC\ncdmstall::Float=0.1000 : factor hard coded in XROTOR and DFDC\nabsdx::Float=0.0625 : smoothing factor for smooth absolute value function\n\nReturns:\n\ncl_corr:Float : corrected lift coefficient\n\n\n\n\n\n","category":"method"},{"location":"C4Blade/corrections/#DuctAPE.C4Blade.transonic_lift_limiter-NTuple{6, Any}","page":"Polar Modification","title":"DuctAPE.C4Blade.transonic_lift_limiter","text":"transonic_lift_limiter(\n cl,\n mach,\n clcdmin,\n clmax,\n clmin,\n dclda;\n mcrit=0.7,\n dcl_stall=0.1,\n dclda_stall=0.1,\n cdmfactor=10.0,\n clmfactor=0.25,\n mexp=3.0,\n cdmstall=0.1000,\n)\n\nAirfoil polar corrections due to transonic effects as found in XROTOR and DFDC. Note that this correction is done nominally in the DFDC airfoil evaluation.\n\nArguments:\n\ncl::Float : input lift coefficient\nmach::Float : Mach number\nclcdmin::Float : lift coefficient at minimum drag coefficient.\nclmax::Float : maximum lift coefficient\nclmin::Float : minimum lift coefficient\ndclda::Float : lift-curve slope\nmcrit::Float=0.7 : critical Mach number\ndcl_stall::Float=0.1 : cl increment from initial to total stall\ndclda_stall::Float=0.1 : lift curve slope post-stall (1/radians)\ncdmfactor::Float=10.0 : factor hard coded in XROTOR and DFDC\nclmfactor::Float=0.25 : factor hard coded in XROTOR and DFDC\nmexp::Float=3.0 : factor hard coded in XROTOR and DFDC\ncdmstall::Float=0.1000 : factor hard coded in XROTOR and DFDC\n\nReturns:\n\ncl_corr:Float : corrected lift coefficient\n\n\n\n\n\n","category":"method"},{"location":"C4Blade/corrections/#DuctAPE.C4Blade.transonic_lift_limiter_smooth!-NTuple{6, Any}","page":"Polar Modification","title":"DuctAPE.C4Blade.transonic_lift_limiter_smooth!","text":"transonic_lift_limiter_smooth!(\n cl,\n mach,\n clcdmin,\n clmax,\n clmin,\n dclda;\n mcrit=0.7,\n dcl_stall=0.1,\n dclda_stall=0.1,\n cdmfactor=10.0,\n clmfactor=0.25,\n mexp=3.0,\n cdmstall=0.1000,\n blend_hardness=50,\n)\n\nSmoothed, vectorized, in-place version of transonic_lift_limiter.\n\nDifferent Arguments:\n\ncl::AbstractVector{Float} : vector of lift coefficients\n\nAdditional Keyword Argument:\n\nblend_hardness::Float=50 : hardenss of smoothing blends\n\n\n\n\n\n","category":"method"},{"location":"DuctAPE/api/private_postprocess/","page":"Postprocess","title":"Postprocess","text":"DuctAPE.post_process","category":"page"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.post_process","page":"Postprocess","title":"DuctAPE.post_process","text":"post_process(\n solver_options,\n converged_states,\n prepost_containers,\n solve_container_caching,\n solve_parameter_cache_vector,\n solve_parameter_cache_dims,\n operating_point,\n reference_parameters,\n A_bb_LU,\n airfoils,\n idmaps,\n problem_dimensions,\n multipoint_index;\n write_outputs=options.write_outputs,\n outfile=options.outfile,\n checkoutfileexists=options.checkoutfileexists,\n output_tuple_name=options.output_tuple_name,\n verbose=options.verbose,\n)\n\nPost-process a converged nonlinear solve solution.\n\nArguments\n\nsolver_options::SolverOptionsType : A SolverOptionsType object (also used for dispatch)\nconverged_states::Vector{Float} : the converged state variables\nprepost_containers::NamedTuple : the named tuple containing pre-allocated containers for the pre- and post-processing intermediate calculations\nsolve_container_cache::NamedTuple : the cache and dimensions for intermediate values in the residual calculation\nsolve_parameter_cache_vector::Vector{Float} : the applicably typed cache vector for the solve parameters\nsolve_parameter_cache_dims::NamedTuple : the dimensions of the solver parameters\noperating_point::OperatingPoint : the operating point being analyzed\nreference_parameters::ReferenceParameters : a ReferenceParameters object\nA_bb_LU::LinearAlgebra.LU : LinearAlgebra LU factorization of the LHS matrix\nairfoils::Vector{AFType} : A matrix of airfoil types associated with each of the blade elements\nidmaps::NamedTuple : A named tuple containing index mapping used in bookkeeping throughout solve and post-process\nproblem_dimensions::ProblemDimensions : A ProblemDimensions object\n\nKeyword Arguments\n\nmultipoint_index::Vector{Int} : a one-dimensional vector containing the index of which multipoint analysis operating point is being analyzed.\nwrite_outputs=options.write_outputs::Vector{Bool} : a vector with the same length as number of multipoints indicating if the outputs should be saved.\noutfile=options.outfile::Vector{String} : a vector of file paths/names for where outputs should be written\ncheckoutfileexists=options.checkoutfileexists::Bool : a flag for whether existing files should be checked for or if blind overwriting is okay.\noutput_tuple_name=options.output_tuple_name::Vector{String} : the variable name(s) of the named tuple of outputs to be written.\nverbose::Bool=false : flag to print verbose statements\n\nReturns\n\nouts::NamedTuple : A named tuple containing all the output values including\n\nbodies\npanel_strengths\ntotal_thrust\nthrust_comp\ninduced_efficiency\ncp_in\ncp_out\ncp_casing_in\ncp_casing_out\ncasing_zpts\ncp_nacelle_in\ncp_nacelle_out\nnacelle_zpts\ncp_centerbody_in\ncp_centerbody_out\ncenterbody_zpts\nVtot_in\nVtot_out\nVtot_prejump\nvtot_body\nvtot_jump\nvtot_wake\nvtot_rotors\nVtan_in\nVtan_out\nvtan_casing_in\nvtan_casing_out\nvtan_nacelle_in\nvtan_nacelle_out\nvtan_centerbody_in\nvtan_centerbody_out\nrotors\ncirculation\npanel_strengths\nefficiency\ninviscid_thrust\ninviscid_thrust_dist\nviscous_thrust\nviscous_thrust_dist\nthrust\nCT\ninviscid_torque\ninviscid_torque_dist\nviscous_torque\nviscous_torque_dist\ntorque\nCQ\ninviscid_power\ninviscid_power_dist\nviscous_power\nviscous_power_dist\npower\nCP\ncl\ncd\nalpha\nbeta1\nblade_normal_force_per_unit_span\nblade_tangential_force_per_unit_span\nwake\npanel_strengths\ntotals\nthrust\ntorque\npower\nCT\nCQ\nCP\ntotal_efficiency\nideal_efficiency\nintermediate_solve_values\nvz_rotor\nvtheta_rotor\nCm_wake\nreynolds\nmach\nCz_rotor\nCtheta_rotor\nCmag_rotor\nGamma_tilde\nH_tilde\ndeltaGamma2\ndeltaH\nvz_wake\nvr_wake\nCm_avg\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#Velocities","page":"Postprocess","title":"Velocities","text":"","category":"section"},{"location":"DuctAPE/api/private_postprocess/","page":"Postprocess","title":"Postprocess","text":"DuctAPE.get_body_tangential_velocities\nDuctAPE.get_body_tangential_velocities!\nDuctAPE.calculate_vtheta\nDuctAPE.calculate_induced_velocities_on_bodywake","category":"page"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.get_body_tangential_velocities","page":"Postprocess","title":"DuctAPE.get_body_tangential_velocities","text":"get_body_tangential_velocities(\n gamb,\n gamw,\n sigr,\n ivb,\n Vinf,\n totnode,\n totpanel,\n nnode,\n npanel,\n tangent,\n controlpoints,\n endpanelidxs,\n wake_panel_ids_along_centerbody_wake_interface,\n wake_panel_ids_along_casing_wake_interface,\n centerbody_panel_ids_along_centerbody_wake_interface,\n duct_panel_ids_along_casing_wake_interface,\n num_casing_panels,\n)\n\nGet the tangential velocities along the body surfaces.\n\nArguments\n\ngamb::Vector{Float} : the body panel strengths\ngamw::Vector{Float} : the wake panel strengths\nsigr::Vector{Float} : the rotor panel strengths\nivb::NamedTuple : the unit induced velocities on the bodies\nVinf::Vector{Float} : one element vector containing the freestream magnitude\ntotnode::Int : total number of nodes between all bodies\ntotpanel::Int : total number of panels between all bodies\nnnode::Vector{Int} : number of nodes in each body\nnpanel::Vector{Int} : number of panels in each body.\ntangent::Matrix{Float} : unit tangent vectors for each panel\ncontrolpoints::Matrix{Float} : control point locations for each panel\nendpanelidxs::Matrix{Int} : the indices of the first and last panels for each body\nwake_panel_ids_along_centerbody_wake_interface::Vector{Int} : the indices of the wake panels coincident with the centerbody panels\nwake_panel_ids_along_casing_wake_interface::Vector{Int} : the indices of the wake panels coincident with the duct casing (inner surface) panels\ncenterbody_panel_ids_along_centerbody_wake_interface::Vector{Int} : the indices of the centerbody panels coincident with the wake panels\nduct_panel_ids_along_casing_wake_interface::Vector{Int} : the indices of the duct panels coincident with the wake panels\nnum_casing_panels::Int : the number of panels between the leading and trailing edge of the duct on the duct inner side (casing)\n\nReturns\n\nvtan_tuple::NamedTuple : a named tuple containing the body tangential surface velocities and various useful breakdowns thereof.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.get_body_tangential_velocities!","page":"Postprocess","title":"DuctAPE.get_body_tangential_velocities!","text":"function getbodytangentialvelocities!( vtantuple, gamb, gamw, sigr, ivb, Vinf, totnode, totpanel, nnode, npanel, tangent, controlpoints, endpanelidxs, wakepanelidsalongcenterbodywakeinterface, wakepanelidsalongcasingwakeinterface, centerbodypanelidsalongcenterbodywakeinterface, ductpanelidsalongcasingwakeinterface, zpts, )\n\nIn-place version of get_body_tangential_velocities.\n\nAdditional Arguments\n\nzpts::NamedTuple : a named tuple containing the z-coordinates of the control points of the duct casing, duct nacelle, and centerbody.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.calculate_vtheta","page":"Postprocess","title":"DuctAPE.calculate_vtheta","text":"calculate_vtheta(Gamma_tilde, r)\n\nCalculate tangential velocity for a given net circulation and radial location\n\nArguments\n\nGamma_tilde::Matrix{Float} : Sum of upstream circulation values\nr::Matrix{Float} : blade element radial positions\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.calculate_induced_velocities_on_bodywake","page":"Postprocess","title":"DuctAPE.calculate_induced_velocities_on_bodywake","text":"calculate_induced_velocities_on_bodywake(\n vz_w, vr_w, gamw, vz_r, vr_r, sigr, vz_b, vr_b, gamb, Vinf\n)\n\nCalculate the induced velocities on one of the body wakes (unit velocity inputs determine which one)\n\nArguments\n\nvz_w::Matrix{Float} : unit axial induced velocity of the wake onto the body wake\nvr_w::Matrix{Float} : unit radial induced velocity of the wake onto the body wake\ngamw::Vector{Float} : wake panel strengths\nvz_r::Matrix{Float} : unit axial induced velocity of the rotor onto the body wake\nvr_r::Matrix{Float} : unit radial induced velocity of the rotor onto the body wake\nsigr::Vector{Float} : rotor panel strengths\nvz_b::Matrix{Float} : unit axial induced velocity of the bodies onto the body wake\nvr_b::Matrix{Float} : unit radial induced velocity of the bodies onto the body wake\ngamb::Vector{Float} : body panel strengths\nVinf::Vector{Float} : one element vector containing the velocity magnitude\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#Pressures","page":"Postprocess","title":"Pressures","text":"","category":"section"},{"location":"DuctAPE/api/private_postprocess/","page":"Postprocess","title":"Postprocess","text":"DuctAPE.steady_cp\nDuctAPE.steady_cp!\nDuctAPE.calculate_entropy_jumps\nDuctAPE.calculate_rotor_jumps\nDuctAPE.delta_cp\nDuctAPE.calculate_body_delta_cp!\nDuctAPE.calculate_bodywake_delta_cp\nDuctAPE.get_body_cps\nDuctAPE.get_body_cps!\nDuctAPE.get_bodywake_cps\nDuctAPE.forces_from_pressure\nDuctAPE.forces_from_pressure!\nDuctAPE.forces_from_TEpanels!","category":"page"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.steady_cp","page":"Postprocess","title":"DuctAPE.steady_cp","text":"steady_cp(Vs, Vinf, Vref)\n\nCalculate steady pressure coefficients for a given surface velocity.\n\nArguments\n\nVs::Vector{Float} : the surface velocities\nVinf::Vector{Float} : one element vector with freestream mangnitude\nVref::Vector{Float} : one element vector with reference velocity used for non-dimensionalization\n\nReturns\n\ncp::Vector{Float} : the steady pressure coefficients\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.steady_cp!","page":"Postprocess","title":"DuctAPE.steady_cp!","text":"steady_cp!(cp, Vs, Vinf, Vref)\n\nIn-place verison of steady_cp.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.calculate_entropy_jumps","page":"Postprocess","title":"DuctAPE.calculate_entropy_jumps","text":"calculate_entropy_jumps(sigr, Cz_rotor)\n\nCalculate jumps in entropy across the disks.\n\nArguments\n\nsigr::Matrix{Float} : rotor source panel strengths\nCz_rotor::Vector{Float} : absolute axial velocity on rotor blade elements\n\nReturns\n\ndeltaS::Vector{Float} : entropy jump across rotor disks\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.calculate_rotor_jumps","page":"Postprocess","title":"DuctAPE.calculate_rotor_jumps","text":"calculate_rotor_jumps(Gamr, Omega, B, sigr, Cz_rotor)\n\nCalculate net circulation and enthalpy and entropy disk jumps\n\nArguments\n\nGamr::Matrix{Float} : Blade element circulation strengths\nOmega::Vector{Float} : rotor rotation rates\nB::Vector{Float} : blade count for each rotor (usually integers but could be a float)\nsigr::Matrix{Float} : rotor source panel strengths\nCz_rotor::Vector{Float} : absolute axial velocity on rotor blade elements\n\nReturns\n\nGamma_tilde::Matrix{Float} : net upstream circulation\nHtilde::Matrix{Float} : net upstream enthalpy jumps\nStilde::Matrix{Float} : net upstream entropy jumps\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.delta_cp","page":"Postprocess","title":"DuctAPE.delta_cp","text":"delta_cp(deltaH, deltaS, Ctheta, Vref)\n\nCalculate change in pressure coefficient aft of rotor, due to rotor\n\nArguments\n\ndeltaH::Vector{Float} : Enthalpy jumps across disks\ndeltaS::Vector{Float} : Entropy jumps across disks`\nCtheta::Vector{Float} : tangenetial velocity\nVref::Vector{Float} : reference velocity for non-dimensionalization\n\nReturns\n\ndelta_cp::Vector{Float} : pressure rises due to rotor disks\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.calculate_body_delta_cp!","page":"Postprocess","title":"DuctAPE.calculate_body_delta_cp!","text":"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)\n\nAugment surface pressure by change in pressure coefficient due to rotors specifically on the body panels aft of the rotors.\n\nArguments\n\ncp::Vector{Float} : steady pressure coeffients, modified in-place to include rotor effects.\nGamr::Matrix{Float} : Blade element circulation strengths\nsigr::Matrix{Float} : rotor source panel strengths\nCz_rotor::Vector{Float} : absolute axial velocity on rotor blade elements\nVref::Vector{Float} : one element vector with reference velocity used for non-dimensionalization\nOmega::Vector{Float} : rotor rotation rates\nB::Vector{Float} : blade count for each rotor (usually integers but could be a float)\ncpr::Vector{Float} : control point radial positions of body panels\ncasing_panel_ids_aft_of_rotors::Vector{Int} : duct indices of control point radial positions aft of rotors\ncenterbody_panel_ids_aft_of_rotors::Vector{Int} : centerbody indices of control point radial positions aft of rotors\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.calculate_bodywake_delta_cp","page":"Postprocess","title":"DuctAPE.calculate_bodywake_delta_cp","text":"calculate_bodywake_delta_cp(Gamr, sigr, Cz_rotor, Vref, Omega, B, cpr; body=\"duct\")\n\nCalculate change in pressure coefficient due to rotors specifically on the body wakes\n\nArguments\n\nGamr::Matrix{Float} : Blade element circulation strengths\nsigr::Matrix{Float} : rotor source panel strengths\nCz_rotor::Vector{Float} : absolute axial velocity on rotor blade elements\nVref::Vector{Float} : one element vector with reference velocity used for non-dimensionalization\nOmega::Vector{Float} : rotor rotation rates\nB::Vector{Float} : blade count for each rotor (usually integers but could be a float)\ncpr::Vector{Float} : control point radial positions of body wake \"panels\"\n\nKeyword Arguments\n\nbody::String=\"duct\" : flag as to whether the body in question is a duct or centerbody.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.get_body_cps","page":"Postprocess","title":"DuctAPE.get_body_cps","text":"getbodycps( Vtanin, Vtanout, Gamr, sigr, Czrotor, Vinf, Vref, B, Omega, casingpanelidsaftofrotors, centerbodypanelidsaftof_rotors, controlpoints, endpanelidxs, zpts, )\n\nDescription\n\nArguments\n\nVtan_in::Vector{Float} : Tangential velocity on the inside of the body panels\nVtan_out::Vector{Float} : Tangential velocity on the outside of the body panels\nGamr::Matrix{Float} : Blade element circulation strengths\nsigr::Matrix{Float} : rotor source panel strengths\nCz_rotor::Vector{Float} : absolute axial velocity on rotor blade elements\nVinf::Vector{Float} : one element vector with freestream mangnitude\nVref::Vector{Float} : one element vector with reference velocity used for non-dimensionalization\nB::Vector{Float} : blade count for each rotor (usually integers but could be a float)\nOmega::Vector{Float} : rotor rotation rates\ncasing_panel_ids_aft_of_rotors::Vector{Int} : duct indices of control point radial positions aft of rotors\ncenterbody_panel_ids_aft_of_rotors::Vector{Int} : centerbody indices of control point radial positions aft of rotors\ncontrolpoints::Matrix{Float} : control point locations for each panel\nendpanelidxs::Matrix{Int} : the indices of the first and last panels for each body\nzpts::NamedTuple : a named tuple containing the z-coordinates of the control points of the duct casing, duct nacelle, and centerbody.\n\nReturns\n\ncp_tuple::NamedTuple : body surface velocities and various useful breakdowns thereof.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.get_body_cps!","page":"Postprocess","title":"DuctAPE.get_body_cps!","text":"get_body_cps!(\n cp_tuple,\n Vtan_in,\n Vtan_out,\n Gamr,\n sigr,\n Cz_rotor,\n Vinf,\n Vref,\n B,\n Omega,\n duct_panel_ids_aft_of_rotors,\n centerbody_panel_ids_aft_of_rotors,\n controlpoints,\n endpanelidxs,\n zpts,\n)\n\nIn-place version of get_body_cps.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.get_bodywake_cps","page":"Postprocess","title":"DuctAPE.get_bodywake_cps","text":"get_bodywake_cps(\n Gamr,\n vz_w,\n vr_w,\n gamw,\n vz_r,\n vr_r,\n sigr,\n vz_b,\n vr_b,\n gamb,\n panels,\n Cz_rotor,\n Omega,\n B,\n Vinf,\n Vref;\n body=\"duct\",\n)\n\nCalculate the pressure coefficient distributions on one of the body wakes\n\nArguments\n\nGamr::Matrix{Float} : Blade element circulation strengths\nvz_w::Matrix{Float} : unit axial induced velocity of the wake onto the body wake\nvr_w::Matrix{Float} : unit radial induced velocity of the wake onto the body wake\ngamw::Vector{Float} : wake panel strengths\nvz_r::Matrix{Float} : unit axial induced velocity of the rotor onto the body wake\nvr_r::Matrix{Float} : unit radial induced velocity of the rotor onto the body wake\nsigr::Vector{Float} : rotor panel strengths\nvz_b::Matrix{Float} : unit axial induced velocity of the bodies onto the body wake\nvr_b::Matrix{Float} : unit radial induced velocity of the bodies onto the body wake\ngamb::Vector{Float} : body panel strengths\npanels::NamedTuple : A named tuple containing bodywake \"panel\" geometries\nCz_rotor::Vector{Float} : absolute axial velocity on rotor blade elements\nOmega::Vector{Float} : rotor rotation rates\nB::Vector{Float} : blade count for each rotor (usually integers but could be a float)\nVinf::Vector{Float} : one element vector containing the velocity magnitude\nVref::Vector{Float} : one element vector with reference velocity used for non-dimensionalization\n\nKeyword Arguments\n\nbody::String=\"duct\" : flag as to whether the body in question is a duct or centerbody.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.forces_from_pressure","page":"Postprocess","title":"DuctAPE.forces_from_pressure","text":"forces_from_pressure(cp_in, cp_out, panels; rhoinf=1.225, Vref=1.0)\n\nCalculate dimensional and non-dimensional axial force on a single body\n\nArguments\n\ncp_in::Vector{Float} : pressure coefficient on inside of body surfaces\ncp_out::Vector{Float} : pressure coefficients on outside of body surfaces\npanels::NamedTuple : A named tuple containing panel geometry information\n\nKeyword Arguments\n\nrhoinf::Float=1.225 : reference density for non-dimensionalization\nVref::Float=1.0 : reference velocity for non-dimensionalization\n\nReturns\n\nthrust::Vector{Float} : dimensional axial force\nforce_coeff::Vector{Float} : non-dimensional axial force\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.forces_from_pressure!","page":"Postprocess","title":"DuctAPE.forces_from_pressure!","text":"forces_from_pressure!(CFx, cfx, cp_in, cp_out, panels; rhoinf=1.225, Vref=1.0)\n\nIn-place version of forces_from_pressure.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.forces_from_TEpanels!","page":"Postprocess","title":"DuctAPE.forces_from_TEpanels!","text":"forces_from_TEpanels!(\n thrust, force_coeff, cp_in, cp_out, panels; rhoinf=1.225, Vref=1.0\n)\n\nAdd force induced by trailing edge gap panels to total forces.\n\nArguments\n\nthrust::Vector{Float} : dimensional axial force\nforce_coeff::Vector{Float} : non-dimensional axial force\ncp_in::Vector{Float} : pressure coefficient on inside of body surfaces\ncp_out::Vector{Float} : pressure coefficients on outside of body surfaces\npanels::NamedTuple : A named tuple containing panel geometry information\n\nKeyword Arguments\n\nrhoinf::Float=1.225 : reference density for non-dimensionalization\nVref::Float=1.0 : reference velocity for non-dimensionalization\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#Rotor-Performance","page":"Postprocess","title":"Rotor Performance","text":"","category":"section"},{"location":"DuctAPE/api/private_postprocess/","page":"Postprocess","title":"Postprocess","text":"DuctAPE.inviscid_rotor_thrust\nDuctAPE.inviscid_rotor_thrust!\nDuctAPE.viscous_rotor_thrust\nDuctAPE.viscous_rotor_thrust!\nDuctAPE.inviscid_rotor_torque\nDuctAPE.inviscid_rotor_torque!\nDuctAPE.viscous_rotor_torque\nDuctAPE.viscous_rotor_torque!\nDuctAPE.rotor_power\nDuctAPE.rotor_power!\nDuctAPE.get_total_efficiency\nDuctAPE.get_total_efficiency!\nDuctAPE.get_induced_efficiency\nDuctAPE.get_induced_efficiency!\nDuctAPE.get_ideal_efficiency\nDuctAPE.tqpcoeff\nDuctAPE.tqpcoeff!\nDuctAPE.get_blade_loads\nDuctAPE.get_blade_loads!","category":"page"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.inviscid_rotor_thrust","page":"Postprocess","title":"DuctAPE.inviscid_rotor_thrust","text":"inviscid_rotor_thrust(Ctheta_rotor, Gamma_tilde, rotor_panel_length, rhoinf)\n\nCalculate inviscid rotor thrust.\n\nArguments\n\nCtheta_rotor::Vector{Float} : Absolute tangential velocity on rotor blade elements\nGamma_tilde::Matrix{Float} : net upstream rotor circulation\nrotor_panel_length::Vector{Float} : dimensional lengths on which blade element values apply\nrhoinf::Float : freestream density\n\nReturns\n\nTinv::Vector{Float} : inviscid dimensional thrust\ndTi::Vector{Float} : inviscid dimensional thrust distribution\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.inviscid_rotor_thrust!","page":"Postprocess","title":"DuctAPE.inviscid_rotor_thrust!","text":"inviscid_rotor_thrust!(\n Tinv, dTi, Ctheta_rotor, Gamma_tilde, rotor_panel_length, rhoinf\n)\n\nIn-place version of inviscid_rotor_thrust.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.viscous_rotor_thrust","page":"Postprocess","title":"DuctAPE.viscous_rotor_thrust","text":"viscous_rotor_thrust(\n Cz_rotor, Cmag_rotor, B, chord, rotor_panel_length, cd, rhoinf\n)\n\nCalculate visous rotor \"thrust.\"\n\nArguments\n\nCz_rotor::Vector{Float} : Absolute axial velocity on rotor blade elements\nCmag_rotor::Vector{Float} : Absolute inflow velocity magnitude on rotor blade elements\nB::Vector{Float} : blade count for each rotor (usually integers but could be a float)\nchord::Vector{Float} : blade element chord lengths\nrotor_panel_length::Vector{Float} : dimensional lengths on which blade element values apply\ncd::Vector{Float} : drag coefficient for each blade element\nrhoinf::Float : freestream density\n\nReturns\n\nTvisc::Vector{Float} : viscous dimensional thrust\ndTv::Vector{Float} : viscous dimensional thrust distribution\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.viscous_rotor_thrust!","page":"Postprocess","title":"DuctAPE.viscous_rotor_thrust!","text":"viscous_rotor_thrust!(\n Tvisc, dTv, Cz_rotor, Cmag_rotor, B, chord, rotor_panel_length, cd, rhoinf\n)\n\nIn-place version of viscous_rotor_thrust.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.inviscid_rotor_torque","page":"Postprocess","title":"DuctAPE.inviscid_rotor_torque","text":"inviscid_rotor_torque(\n Cz_rotor, rotor_panel_center, rotor_panel_length, Gamma_tilde, rhoinf\n)\n\nCalculate inviscid rotor torque.\n\nArguments\n\nCz_rotor::Vector{Float} : Absolute axial velocity on rotor blade elements\nrotor_panel_center::Vector{Float} : radial location of rotor blade elements\nrotor_panel_length::Vector{Float} : dimensional lengths on which blade element values apply\nGamma_tilde::Matrix{Float} : net upstream rotor circulation\nrhoinf::Float : freestream density\n\nReturns\n\nQinv::Vector{Float} : inviscid dimensional thrust\ndQi::Vector{Float} : inviscid dimensional thrust distribution\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.inviscid_rotor_torque!","page":"Postprocess","title":"DuctAPE.inviscid_rotor_torque!","text":"inviscid_rotor_torque!(\n Qinv, dQi, Cz_rotor, rotor_panel_center, rotor_panel_length, Gamma_tilde, rhoinf\n)\n\nIn-place version of inviscid_rotor_torque.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.viscous_rotor_torque","page":"Postprocess","title":"DuctAPE.viscous_rotor_torque","text":"viscous_rotor_torque(\n Ctheta_rotor, Cmag_rotor, B, chord, rotor_panel_center, rotor_panel_length, cd, rhoinf\n)\n\nCalculate viscous rotor torque.\n\nArguments\n\nCtheta_rotor::Vector{Float} : Absolute tangential velocity on rotor blade elements\nCmag_rotor::Vector{Float} : Absolute inflow velocity magnitude on rotor blade elements\nB::Vector{Float} : blade count for each rotor (usually integers but could be a float)\nchord::Vector{Float} : blade element chord lengths\nrotor_panel_center::Vector{Float} : radial location of rotor blade elements\nrotor_panel_length::Vector{Float} : dimensional lengths on which blade element values apply\ncd::Vector{Float} : drag coefficient for each blade element\nrhoinf::Float : freestream density\n\nReturns\n\nQvisc::Vector{Float} : viscous dimensional thrust\ndQv::Vector{Float} : viscous dimensional thrust distribution\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.viscous_rotor_torque!","page":"Postprocess","title":"DuctAPE.viscous_rotor_torque!","text":"viscous_rotor_torque!(\n Qvisc,\n dQv,\n Ctheta_rotor,\n Cmag_rotor,\n B,\n chord,\n rotor_panel_center,\n rotor_panel_length,\n cd,\n rhoinf\n)\n\nIn-place version of viscous_rotor_torque.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.rotor_power","page":"Postprocess","title":"DuctAPE.rotor_power","text":"rotor_power(Q, dQ, Omega)\n\nCalculate power from torque and rotation rate.\n\nArguments\n\nQ::Vector{Float} : dimensional thrust\ndQ::Vector{Float} : dimensional thrust distribution\nOmega::Vector{Float} : rotor rotation rates\n\nReturns\n\nP::Vector{Float} : dimensional power\ndP::Vector{Float} : dimensional thrust distribution\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.rotor_power!","page":"Postprocess","title":"DuctAPE.rotor_power!","text":"rotor_power!(P, dP, Q, dQ, Omega)\n\nIn-place version of rotor_power.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.get_total_efficiency","page":"Postprocess","title":"DuctAPE.get_total_efficiency","text":"get_total_efficiency(total_thrust, total_power, Vinf)\n\nGet total efficiency.\n\nArguments\n\ntotal_thrust::Vector{Float} : total thrust\ntotal_power::Vector{Float} : total power\nVinf::Vector{Float} : one element vector freestream velocity magnitude\n\nReturns\n\n`total_efficiency::Vector{Float} : total efficiency\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.get_total_efficiency!","page":"Postprocess","title":"DuctAPE.get_total_efficiency!","text":"get_total_efficiency!(eta, total_thrust, total_power, Vinf)\n\nIn-place version of get_total_efficiency.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.get_induced_efficiency","page":"Postprocess","title":"DuctAPE.get_induced_efficiency","text":"get_induced_efficiency(Tinv, Tduct, Pinv, Vinf)\n\nGet rotor efficiency induced by presence of the duct.\n\nArguments\n\nTinv::Vector{Float} : inviscid dimensional thrust\nTduct::Vector{Float} : duct thrust\nPinv::Vector{Float} : inviscid dimensional power\nVinf::Vector{Float} : one element vector freestream velocity magnitude\n\nReturns\n\ninduced_efficiency::Vector{Float} : rotor efficiency induced by duct\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.get_induced_efficiency!","page":"Postprocess","title":"DuctAPE.get_induced_efficiency!","text":"get_induced_efficiency!(eta_inv, Tinv, Tduct, Pinv, Vinf)\n\nIn-place version of get_induced_efficiency.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.get_ideal_efficiency","page":"Postprocess","title":"DuctAPE.get_ideal_efficiency","text":"get_ideal_efficiency(total_thrust, rhoinf, Vinf, Rref)\n\nCompute ducted fan ideal efficiency\n\nArguments\n\ntotal_thrust::Vector{Float} : total thrust from rotors and duct\nrhoinf::Float : freestream density\nVinf::Vector{Float} : one element vector freestream velocity magnitude\nRref::Vector{Float} : one element vector reference rotor tip radius\n\nReturns\n\nideal_efficiency::Vector{Float} : ideal ducted fan efficiency\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.tqpcoeff","page":"Postprocess","title":"DuctAPE.tqpcoeff","text":"tqpcoeff(thrust, torque, power, rhoinf, Omega, Rref)\n\nCalculate non-dimensional thrust, torque, and power coefficients\n\nArguments\n\nthrust::Vector{Float} : dimensional thrust\ntorque::Vector{Float} : dimensional torque\npower::Vector{Float} : dimensional power\nrhoinf::Float : freestream density\nOmega::Vector{Float} : rotor rotation rates\nRref::Vector{Float} : one element vector reference rotor tip radius\n\nReturns\n\nCT::Vector{Float} : thrust coefficient\nCQ::Vector{Float} : torque coefficient\nCP::Vector{Float} : power coefficient\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.tqpcoeff!","page":"Postprocess","title":"DuctAPE.tqpcoeff!","text":"tqpcoeff!(CT, CQ, CP, thrust, torque, power, rhoinf, Omega, Rref)\n\nIn-place version of tqpcoeff.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.get_blade_loads","page":"Postprocess","title":"DuctAPE.get_blade_loads","text":"get_blade_loads(Cmag_rotor, beta1, cl, cd, chords, rhoinf)\n\nGet loading along blades.\n\nArguments\n\nCmag_rotor::Vector{Float} : blade element inflow magnitudes\nbeta1::Vector{Float} : blade element inflow angles\ncl::Vector{Float} : blade element lift coefficients\ncd::Vector{Float} : blade element drag coefficients\nchords::Vector{Float} : blade element chord lengths\nrhoinf::Vector{Float} : one element freestream density\n\nReturns\n\nNp::Vector{Float} : blade loading per unit length in the normal direction: N'\nTp::Vector{Float} : blade loading per unit length in the tangential direction: T'\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/api/private_postprocess/#DuctAPE.get_blade_loads!","page":"Postprocess","title":"DuctAPE.get_blade_loads!","text":"get_blade_loads!(Np, Tp, Cmag_rotor, beta1, cl, cd, chords, rhoinf, cache)\n\nIn-place version of get_blade_loads.\n\n\n\n\n\n","category":"function"},{"location":"C4Blade/intro/#C\\textrm{4}Blade-[[C](#)ascade-[C](#)ompatible-[CCBlade](https://flow.byu.edu/CCBlade.jl/stable/)]","page":"Intro","title":"C^textrm4Blade [Cascade Compatible CCBlade]","text":"","category":"section"},{"location":"C4Blade/intro/","page":"Intro","title":"Intro","text":"C^4Blade is a DuctAPE submodule containing a modified version of CCBlade that includes capabilities for cascade types.","category":"page"},{"location":"DuctAPE/theory/#Theory","page":"Theory","title":"Theory","text":"","category":"section"},{"location":"DuctAPE/theory/","page":"Theory","title":"Theory","text":"For a brief overview of the theory behind DuctAPE, see:","category":"page"},{"location":"DuctAPE/theory/","page":"Theory","title":"Theory","text":"Mehr, J. and Ning, A., \"DuctAPE: A steady-state, axisymmetric ducted fan analysis code designed for gradient-based optimization.,\" AIAA Aviation Forum, July 2024.","category":"page"},{"location":"DuctAPE/theory/","page":"Theory","title":"Theory","text":"For a more thorough dive into the details see this pdf document.","category":"page"},{"location":"#DuctAPE.jl-[[Duct](#)ed-[A](#)xisymmetric-[P](#)ropulsor-[E](#)valuation]","page":"Home","title":"DuctAPE.jl [Ducted Axisymmetric Propulsor Evaluation]","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Author: Judd Mehr","category":"page"},{"location":"","page":"Home","title":"Home","text":"Contributer: Taylor McDonnell","category":"page"},{"location":"","page":"Home","title":"Home","text":"DuctAPE is a code for the aerodynamic evaluation of axisymmetric ducted ducted_rotors 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.","category":"page"},{"location":"#Installation","page":"Home","title":"Installation","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"pkg> add https://github.com/byuflowlab/DuctAPE.jl.git","category":"page"},{"location":"#Documentation","page":"Home","title":"Documentation","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Getting Started will have you up and running quickly.\nThe Advanced Usage tab includes several pages of additional information for customizing your usage.\nThe API tab contains public and private method descriptions.\nThe Theory tab contain several pages on the underlying theory of DuctAPE.\nThe C^4Blade tab contains documentation for the C^4Blade submodule used for airfoil/cascade management within DuctAPE as well as state initialization.","category":"page"},{"location":"#Citing","page":"Home","title":"Citing","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Mehr, J. and Ning, A., \"DuctAPE: A steady-state, axisymmetric ducted fan analysis code designed for gradient-based optimization.,\" AIAA Aviation Forum, July 2024.","category":"page"},{"location":"DuctAPE/tutorial/#Getting-Started","page":"Getting Started","title":"Getting Started","text":"","category":"section"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"Pages = [\"tutorial.md\"]\nDepth = 5","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"The following is a basic tutorial on how to set up and run an analysis of a ducted fan in DuctAPE.","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"include(\"../assets/plots_default.jl\")\ngr()","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"We begin by loading the package:","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"using DuctAPE\nnothing # hide","category":"page"},{"location":"DuctAPE/tutorial/#Assemble-Inputs","page":"Getting Started","title":"Assemble Inputs","text":"","category":"section"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"The next step is to create the input object of type DuctedRotor.","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"DuctAPE.DuctedRotor","category":"page"},{"location":"DuctAPE/tutorial/#DuctAPE.DuctedRotor-DuctAPE-tutorial","page":"Getting Started","title":"DuctAPE.DuctedRotor","text":"DuctedRotor(duct_coordinates, centerbody_coordinates, rotor, paneling_constants)\n\nArguments\n\nduct_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.\ncenterbody_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.\npaneling_constants::PanelingConstants : Constants used in re-paneling the geometry.\nrotor::Rotor : Rotor (and possibly stator) geometric paramters.\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/tutorial/#Body-Geometry","page":"Getting Started","title":"Body Geometry","text":"","category":"section"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"We begin by defining a matrix of coordinates for the duct and another for the centerbody geometries. For example:","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"duct_coordinates = [\n 0.304466 0.158439\n 0.294972 0.158441\n 0.28113 0.158423\n 0.266505 0.158365\n 0.251898 0.158254\n 0.237332 0.158088\n 0.222751 0.157864\n 0.208123 0.157586\n 0.193399 0.157258\n 0.178507 0.156897\n 0.16349 0.156523\n 0.148679 0.156177\n 0.134222 0.155902\n 0.12 0.155721\n 0.106044 0.155585\n 0.092531 0.155498\n 0.079836 0.155546\n 0.067995 0.155792\n 0.057025 0.156294\n 0.046983 0.157103\n 0.037937 0.158256\n 0.029956 0.159771\n 0.02311 0.161648\n 0.017419 0.163862\n 0.012842 0.166404\n 0.009324 0.169289\n 0.006854 0.172546\n 0.005484 0.176154\n 0.005242 0.180005\n 0.006112 0.184067\n 0.00809 0.188086\n 0.011135 0.192004\n 0.015227 0.19579\n 0.020339 0.199393\n 0.026403 0.202735\n 0.033312 0.205736\n 0.040949 0.208332\n 0.049193 0.210487\n 0.057935 0.212174\n 0.067113 0.21339\n 0.076647 0.214136\n 0.086499 0.214421\n 0.09661 0.214255\n 0.10695 0.213649\n 0.117508 0.212618\n 0.12838 0.211153\n 0.139859 0.209267\n 0.151644 0.207051\n 0.163586 0.204547\n 0.175647 0.201771\n 0.187807 0.198746\n 0.20002 0.19549\n 0.212269 0.192017\n 0.224549 0.188335\n 0.236794 0.18447\n 0.249026 0.180416\n 0.261206 0.176188\n 0.273301 0.171796\n 0.28524 0.16727\n 0.29644 0.162842\n 0.304542 0.159526\n]\nnothing # hide","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"centerbody_coordinates = [\n 0.0 0.0\n 0.000586 0.005293\n 0.002179 0.010047\n 0.004736 0.014551\n 0.008231 0.018825\n 0.012632 0.022848\n 0.01788 0.026585\n 0.023901 0.030001\n 0.030604 0.033068\n 0.0379 0.035771\n 0.045705 0.038107\n 0.053933 0.040075\n 0.06254 0.04169\n 0.071451 0.042966\n 0.08063 0.043916\n 0.090039 0.044561\n 0.09968 0.044922\n 0.109361 0.044999\n 0.12 0.044952\n 0.135773 0.04495\n 0.151899 0.04493\n 0.16806 0.044913\n 0.184232 0.044898\n 0.200407 0.044882\n 0.21658 0.044866\n 0.232723 0.044847\n 0.248578 0.044839\n 0.262095 0.044564\n 0.274184 0.043576\n 0.285768 0.041795\n 0.296701 0.039168\n 0.306379 0.035928\n]\nnothing # hide","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"pg = plot( # hide\n duct_coordinates[:, 1], # hide\n duct_coordinates[:, 2]; # hide\n aspectratio=1, # hide\n color=1, # hide\n linewidth=2, # hide\n label=\"Duct\", # hide\n xlabel=\"z\", # hide\n ylabel=\"r\", # hide\n legend=:left, # hide\n) # hide\nplot!( # hide\n pg, # hide\n centerbody_coordinates[:, 1], # hide\n centerbody_coordinates[:, 2]; # hide\n color=2, # hide\n linewidth=2, # hide\n label=\"Center Body\", # hide\n) # hide","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"note: Note\nThe body geometry coordinates must be input as columns of z (axial) and r (radial) coordinates, in that order.","category":"page"},{"location":"DuctAPE/tutorial/#Rotor-Geometry","page":"Getting Started","title":"Rotor Geometry","text":"","category":"section"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"The next step is to assemble an object of type Rotor which contains the geometric information required to define the rotor(s) and their respective blade elements.","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"DuctAPE.Rotor","category":"page"},{"location":"DuctAPE/tutorial/#DuctAPE.Rotor-DuctAPE-tutorial","page":"Getting Started","title":"DuctAPE.Rotor","text":"Rotor(\n B, rotorzloc, r, Rhub, Rtip, chords, twists, tip_gap, airfoils, fliplift\n)\n\nComposite type containing the rotor(s) geometric properties.\n\nNote 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.\n\nArguments\n\nB::AbstractVector{Float} : The number of blades for each rotor. May not be an integer, but usually is.\nrotorzloc::AbstractVector{Float} : Dimensional, axial position of each rotor.\nr::AbstractArray{Float} : Non-dimensional radial locations of each blade element.\nRhub::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.\nRtip::AbstractVector{Float} : Dimensional tip radius of rotor. Is used to determine the radial position of the duct if the autoshiftduct option is selected.\nchords::AbstractArray{Float} : Dimensional chord lengths of the blade elements.\ntwists::AbstractArray{Float} : Blade element angles, in radians.\ntip_gap::AbstractVector{Float} : Currently unused, do not set to anything other than zeros.\nairfoils::AbstractArray{AFType} : Airfoil types describing the airfoil polars for each blade element. Currently only fully tested with C4Blade.DFDCairfoil types.\nfliplift::AbstractVector{Bool} : Flag to indicate if the airfoil lift values should be flipped or not.\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"In this example, we have a single rotor defined as follows.","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"# number of rotors\nB = 5\n\n# rotor axial location\nrotorzloc = 0.12\n\n# rotor tip radius\nRtip = 0.15572081487373543\n\n# rotor hub radius\nRhub = 0.04495252299071941\n\n# non-dimensional blade element radial stations\nr = [\n 0.050491\n 0.061567\n 0.072644\n 0.083721\n 0.094798\n 0.10587\n 0.11695\n 0.12803\n 0.13911\n 0.15018\n] ./ Rtip\n\n# dimensional chord lengths\nchords = [\n 0.089142\n 0.079785\n 0.0713\n 0.063979\n 0.057777\n 0.052541\n 0.048103\n 0.044316\n 0.041061\n 0.038243\n]\n\n# twist angles (from plane of rotation) in radians\ntwists = [\n 69.012\n 59.142\n 51.825\n 46.272\n 41.952\n 38.509\n 35.699\n 33.354\n 31.349\n 29.596\n] .* pi / 180.0\n\n# DFDC-type airfoil object\nafparams = DuctAPE.c4b.DFDCairfoil(;\n alpha0=0.0,\n clmax=1.5,\n clmin=-1.0,\n dclda=6.28,\n dclda_stall=0.5,\n dcl_stall=0.2,\n cdmin=0.012,\n clcdmin=0.1,\n dcddcl2=0.005,\n cmcon=0.0,\n Re_ref=2e5,\n Re_exp=0.35,\n mcrit=0.7,\n)\n\n# all airfoils are the same\nairfoils = fill(afparams, length(r)) # specify the airfoil array\n\n# assemble rotor parameters\nrotor = DuctAPE.Rotor(\n [B],\n [rotorzloc],\n r,\n [Rhub],\n [Rtip],\n chords,\n twists,\n [0.0], # currently only zero tip gaps work.\n airfoils,\n [0.0], # can flip the cl lookups on the fly if desired, say, for stator sections\n)\nnothing # hide","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"plot!( # hide\n pg, # hide\n rotorzloc * ones(length(r)), # hide\n r .* Rtip; # hide\n seriestype=:scatter, # hide\n markersize=3, # hide\n markerstrokewidth=0, # hide\n label=\"Blade Elements\", # hide\n) # hide","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"note: Airfoils\nAirfoil 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.","category":"page"},{"location":"DuctAPE/tutorial/#Paneling-Constants","page":"Getting Started","title":"Paneling Constants","text":"","category":"section"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"The PanelingConstants object contains the constants required for DuctAPE to re-panel the provided geometry into a format compatible with the solve structure. Specifically, the DuctAPE solver makes some assumptions on the relative positioning of the body surfaces relative to the wakes and each other; and this is most easily guarenteed by a re-paneling of the provided body surface geometry. The PanelingConstants object is also used to build all of the preallocated caches inside DuctAPE, which can be done up-front if desired. Note that there is some functionality in place for cases when the user wants to keep their own specified geometry, but this functionality should be used with caution and only by users who are certain their provided geometry is in the compatible format. See the Examples for an example.","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"DuctAPE.PanelingConstants","category":"page"},{"location":"DuctAPE/tutorial/#DuctAPE.PanelingConstants-DuctAPE-tutorial","page":"Getting Started","title":"DuctAPE.PanelingConstants","text":"PanelingConstants(\n nduct_inlet,\n ncenterbody_inlet,\n npanels,\n dte_minus_cbte,\n nwake_sheets,\n wake_length=1.0,\n)\n\nConstants used in re-paneling geometry.\n\nNote 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.\n\nArguments\n\nnduct_inlet::Int : The number of panels to use for the duct inlet (this number is used for both the casing and nacelle re-paneling)\nncenterbody_inlet::Int : The number of panels to use for the centerbody inlet.\nnpanels::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.\ndte_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.\nnwake_sheets::Int : The number of wake sheets to use. Note this will also be setting the number of blade elements to use.\nwake_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.\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"# number of panels for the duct inlet\nnduct_inlet = 30\n\n# number of panels for the center body inlet\nncenterbody_inlet = 30\n\n# number of panels from:\n# - rotor to duct trailing edge\n# - duct trailing edge to center body trailing edge\n# - center body trailing edge to end of wake\nnpanels = [30, 1, 30]\n\n# the duct trailing edge is ahead of the centerbody trailing edge.\ndte_minus_cbte = -1.0\n\n# number of wake sheets (one more than blade elements to use)\nnwake_sheets = 11\n\n# non-dimensional wake length aft of rear-most trailing edge\nwake_length = 0.8\n\n# assemble paneling constants\npaneling_constants = DuctAPE.PanelingConstants(\n nduct_inlet, ncenterbody_inlet, npanels, dte_minus_cbte, nwake_sheets, wake_length\n)\nnothing # hide","category":"page"},{"location":"DuctAPE/tutorial/#Assembling-the-DuctedRotor","page":"Getting Started","title":"Assembling the DuctedRotor","text":"","category":"section"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"We are now posed to construct the DuctedRotor input type.","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"# assemble ducted_rotor object\nducted_rotor = DuctAPE.DuctedRotor(\n duct_coordinates,\n centerbody_coordinates,\n rotor,\n paneling_constants,\n)\nnothing # hide","category":"page"},{"location":"DuctAPE/tutorial/#Operating-Point","page":"Getting Started","title":"Operating Point","text":"","category":"section"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"Next we will assemble the operating point which contains information about the freestream as well as the rotor rotation rate(s).","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"DuctAPE.OperatingPoint","category":"page"},{"location":"DuctAPE/tutorial/#DuctAPE.OperatingPoint-DuctAPE-tutorial","page":"Getting Started","title":"DuctAPE.OperatingPoint","text":"OperatingPoint(Vinf, rhoinf, muinf, asound, Omega)\n\nDuctedRotor operating point information.\n\nArguments\n\nVinf::AbstractVector{Float} : Freestream velocity magnitude (which is only in the axial direction).\nrhoinf::AbstractVector{Float} : Freestream density\nmuinf::AbstractVector{Float} : Freestream viscosity\nasound::AbstractVector{Float} : Freestream speed of sound\nOmega::AbstractVector{Float} : Rotor rototation rate(s)\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"# Freestream\nVinf = 0.0 # hover condition\nrhoinf = 1.226\nasound = 340.0\nmuinf = 1.78e-5\n\n# Rotation Rate\nRPM = 8000.0\nOmega = RPM * pi / 30 # if using RPM, be sure to convert to rad/s\n\n# utilizing the constructor function to put things in vector types\noperating_point = DuctAPE.OperatingPoint(Vinf, rhoinf, muinf, asound, Omega)\nnothing # hide","category":"page"},{"location":"DuctAPE/tutorial/#Reference-Parameters","page":"Getting Started","title":"Reference Parameters","text":"","category":"section"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"The reference parameters are used in the post-processing non-dimensionalizations.","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"DuctAPE.ReferenceParameters","category":"page"},{"location":"DuctAPE/tutorial/#DuctAPE.ReferenceParameters-DuctAPE-tutorial","page":"Getting Started","title":"DuctAPE.ReferenceParameters","text":"ReferenceParameters(Vref, Rref)\n\nReference parameters for post-process non-dimensionalization.\n\nNote 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.\n\nArguments\n\nVref::AbstractVector{Float} : Reference velocity.\nRref::AbstractVector{Float} : Reference rotor tip radius.\n\n\n\n\n\n","category":"type"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"# reference velocity (close to average axial velocity at rotor in this case)\nVref = 50.0\n\n# reference radius (usually tip radius of rotor)\nRref = Rtip\n\n# assemble reference parameters\nreference_parameters = DuctAPE.ReferenceParameters([Vref], [Rref])\nnothing # hide","category":"page"},{"location":"DuctAPE/tutorial/#Set-Options","page":"Getting Started","title":"Set Options","text":"","category":"section"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"The default options should be sufficient for just starting out and are set through the set_options function.","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"DuctAPE.set_options","category":"page"},{"location":"DuctAPE/tutorial/#DuctAPE.set_options-DuctAPE-tutorial","page":"Getting Started","title":"DuctAPE.set_options","text":"set_options(; kwargs...)\nset_options(multipoint; kwargs...)\n\nSet the options for DuctAPE to use.\n\nNote that the vast majority of the available options are defined through keyword arguments. See the documentation for the various option types for more information.\n\nArguments\n\nmultipoint::AbstractArray{OperatingPoint} : a vector of operating points to use if running a multi-point analysis.\n\n\n\n\n\n","category":"function"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"options = DuctAPE.set_options()","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"For more advanced option selection, see the examples and API reference.","category":"page"},{"location":"DuctAPE/tutorial/#Run-a-Single-Analysis","page":"Getting Started","title":"Run a Single Analysis","text":"","category":"section"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"With the ducted_rotor 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.","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"DuctAPE.analyze(::DuctAPE.DuctedRotor, ::DuctAPE.OperatingPoint, ::DuctAPE.ReferenceParameters, ::DuctAPE.Options)","category":"page"},{"location":"DuctAPE/tutorial/#DuctAPE.analyze-Tuple{DuctedRotor, OperatingPoint, ReferenceParameters, Options}-DuctAPE-tutorial","page":"Getting Started","title":"DuctAPE.analyze","text":"analyze(\n ducted_rotor::DuctedRotor,\n operating_point::OperatingPoint,\n reference_parameters::ReferenceParameters,\n options::Options=set_options();\n prepost_container_caching=nothing,\n solve_parameter_caching=nothing,\n solve_container_caching=nothing,\n return_inputs=false,\n)\n\nAnalyze ducted_rotor, including preprocessing.\n\nArguments\n\nducted_rotor::DuctedRotor : DuctedRotor input object (see docstring for DuctedRotor type)\noperating_point::OperatingPoint : OperatingPoint input object (see docstring for OperatingPoint type)\nreference_parameters::ReferenceParameters : ReferenceParameters input object (see docstring for ReferenceParameters type)\noptions::Options=set_options() : Options object (see set_options and related functions)\n\nKeyword Arguments\n\nprepost_container_caching=nothing : Output of allocate_prepost_container_cache\nsolve_parameter_caching=nothing : Output of allocate_solve_parameter_container_cache\nsolve_container_caching=nothing : Output of allocate_solve_container_cache\nreturn_inputs=false : flag as to whether or not to return the pre-processed inputs\n\nReturns\n\nouts::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.\nins::NamedTuple : Named Tuple of various pre-processed inputs (e.g. panels and body linear system), will only be returned if return_inputs=true\nconvergence_flag : Flag for successful solve convergence\n\n\n\n\n\n","category":"method"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"outs, success_flag = DuctAPE.analyze(ducted_rotor, operating_point, reference_parameters, options)\nnothing # hide","category":"page"},{"location":"DuctAPE/tutorial/#Single-Run-Outputs","page":"Getting Started","title":"Single Run Outputs","text":"","category":"section"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"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:","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"# Total Thrust Coefficient\nouts.totals.CT","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"# Total Torque Coefficient\nouts.totals.CQ","category":"page"},{"location":"DuctAPE/tutorial/#Run-a-Multi-Point-Analysis","page":"Getting Started","title":"Run a Multi-Point Analysis","text":"","category":"section"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"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 accepts an input, multipoint, that is a vector of operating points.","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"DuctAPE.analyze(ducted_rotor::DuctedRotor,operating_point::AbstractVector{TO},reference_parameters::ReferenceParameters,options::Options) where TO<:OperatingPoint","category":"page"},{"location":"DuctAPE/tutorial/#DuctAPE.analyze-Union{Tuple{TO}, Tuple{DuctedRotor, AbstractVector{TO}, ReferenceParameters, Options}} where TO<:OperatingPoint-DuctAPE-tutorial","page":"Getting Started","title":"DuctAPE.analyze","text":"analyze(\n ducted_rotor::DuctedRotor,\n operating_point::AbstractVector{OperatingPoint},\n reference_parameters::ReferenceParameters,\n options::Options=set_options();\n prepost_container_caching=nothing,\n solve_parameter_caching=nothing,\n solve_container_caching=nothing,\n return_inputs=false,\n)\n\nAnalyze ducted_rotor, including preprocessing, for a set of operating points.\n\nArguments\n\nducted_rotor::DuctedRotor : DuctedRotor input object\noperating_point::AbstractVector{OperatingPoint} : Vector of Operating Points at which to analyze the ducted_rotor\nreference_parameters::ReferenceParameters : ReferenceParameters input object (see docstring for ReferenceParameters type)\noptions::Options=set_options() : Options object\n\nKeyword Arguments\n\nprepost_container_caching=nothing : Output of allocate_prepost_container_cache\nsolve_parameter_caching=nothing : Output of allocate_solve_parameter_container_cache\nsolve_container_caching=nothing : Output of allocate_solve_container_cache\nreturn_inputs=false : flag as to whether or not to return the pre-processed inputs\n\nReturns\n\nouts::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.\nins::NamedTuple : Named Tuple of various pre-processed inputs (e.g. panels and body linear system), will only be returned if return_inputs=true\nconvergence_flag : Flag for successful solve convergence\n\n\n\n\n\n","category":"method"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"Running a multi-point analysis on the example geometry given there, it might look something like this:","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"# - Advance Ratio Range - #\nJs = range(0.0, 2.0; step=0.01)\n\n# - Calculate Vinfs - #\nD = 2.0 * rotor.Rtip[1] # rotor diameter\nn = RPM / 60.0 # rotation rate in revolutions per second\nVinfs = Js * n * D\n\n# - Set Operating Points - #\noperating_points = [deepcopy(operating_point) for i in 1:length(Vinfs)]\nfor (iv, v) in enumerate(Vinfs)\n operating_points[iv].Vinf[] = v\nend\n\n# - Run Multi-point Analysis - #\nouts_vec, success_flags = DuctAPE.analyze(ducted_rotor, operating_points, reference_parameters, DuctAPE.set_options(operating_points))\nnothing #hide","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"There are a few things to note here.","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"We want to make sure that the operating point objects we put into the input vector are unique instances.\nWe need to use the dispatch of set_options that accepts the operating point vector to set up the right number of things in the background (like convergence flags for each operating point).\nThe outputs of the analysis are vectors of the same outputs for a single analysis.","category":"page"},{"location":"DuctAPE/tutorial/#Multi-point-Outputs","page":"Getting Started","title":"Multi-point Outputs","text":"","category":"section"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"For multi-point analysis outputs, which are given as a vector of output objects, we might access and plot things as follows. We also take the opportunity to present some verification against DFDC, showing that DuctAPE matches remarkably well (within 0.5%) of DFDC. We therefore first provide data from DFDC analyses of the above example geometry at various advance ratios.","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"# Verification Data From DFDC\n\ndfdc_jept = [\n 0.0 0.0 0.64763 0.96692\n 0.1 0.1366 0.64716 0.88394\n 0.2 0.2506 0.6448 0.80785\n 0.3 0.3457 0.64044 0.73801\n 0.4 0.4251 0.63401 0.67382\n 0.5 0.4915 0.62534 0.61468\n 0.6 0.547 0.61428 0.56001\n 0.7 0.5935 0.6006 0.50925\n 0.8 0.6326 0.58411 0.46187\n 0.9 0.6654 0.56452 0.41738\n 1.0 0.693 0.54158 0.37531\n 1.1 0.716 0.51499 0.33522\n 1.2 0.7349 0.48446 0.2967\n 1.3 0.7499 0.44966 0.25937\n 1.4 0.7606 0.41031 0.2229\n 1.5 0.7661 0.36604 0.18694\n 1.6 0.7643 0.31654 0.15121\n 1.7 0.7506 0.26153 0.11547\n 1.8 0.7126 0.20061 0.07941\n 1.9 0.61 0.13355 0.04287\n 2.0 0.1861 0.05993 0.00558\n]\n\ndfdc_J = dfdc_jept[:,1]\ndfdc_eta = dfdc_jept[:,2]\ndfdc_cp = dfdc_jept[:,3]\ndfdc_ct = dfdc_jept[:,4]\nnothing #hide","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"We can then access the various multi-point analysis outputs however is convenient, we choose a broadcasting approach here:","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"\n# - extract efficiency, power, and thrust coefficients - #\n# efficiency\neta = (p->p.totals.total_efficiency[1]).(outs_vec)\n# power\ncp = (p->p.totals.CP[1]).(outs_vec)\n# thrust\nct = (p->p.totals.CT[1]).(outs_vec)\nnothing #hide","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"And then we can plot the data to compare DFDC and DuctAPE.","category":"page"},{"location":"DuctAPE/tutorial/","page":"Getting Started","title":"Getting Started","text":"using Plots\n\n# set up efficiency plot\npe = plot(; xlabel=\"Advance Ratio\", ylabel=\"Efficiency\")\n\n# plot DFDC data\nplot!(\n pe,\n dfdc_J,\n dfdc_eta;\n seriestype=:scatter,\n markersize=5,\n markercolor=plotsgray,\n markerstrokecolor=plotsgray,\n label=\"DFDC\"\n)\n\n# Plot DuctAPE outputs\nplot!(pe, Js, eta; linewidth=2, color=primary, label = \"DuctAPE\")\n\n# setup cp/ct plot\nppt = plot(; xlabel=\"Advance Ratio\")\n\n# plot DFDC data\nplot!(\n ppt,\n dfdc_J,\n dfdc_cp;\n seriestype=:scatter,\n markersize=5,\n markercolor=plotsgray,\n markerstrokecolor=primary,\n markerstrokewidth=2,\n label=\"DFDC Cp\"\n)\nplot!(\n ppt,\n dfdc_J,\n dfdc_ct;\n seriestype=:scatter,\n markersize=5,\n markercolor=plotsgray,\n markerstrokecolor=secondary,\n markerstrokewidth=2,\n label=\"DFDC Ct\"\n)\n\n# plot DuctAPE outputs\nplot!(\n ppt,\n Js,\n cp;\n linewidth=1.5,\n color=primary,\n label=\"DuctAPE Cp\"\n)\nplot!(\n ppt,\n Js,\n ct;\n linewidth=1.5,\n color=secondary,\n label=\"DuctAPE Ct\"\n)\n\nplot(pe, ppt; size=(700,350), layout=(1,2), margin=2mm)","category":"page"},{"location":"DuctAPE/api/api_index/#Index","page":"API Index","title":"Index","text":"","category":"section"},{"location":"DuctAPE/api/api_index/","page":"API Index","title":"API Index","text":"Modules=[DuctAPE]","category":"page"}] }