From e76ba5fa8f651147f0b7f4010a7cbd6f9d2f243e Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Wed, 7 Feb 2024 14:41:59 +0000 Subject: [PATCH] build based on 2defd94 --- dev/.documenter-siteinfo.json | 2 +- dev/aero/drag/index.html | 14 +-- dev/aero/geometry/index.html | 2 +- dev/aero/lift/index.html | 4 +- dev/aero/moment/index.html | 2 +- dev/aero/theory_fuse_profile_drag/index.html | 2 +- dev/aero/theory_geometry/index.html | 2 +- dev/aero/theory_lifting/index.html | 2 +- dev/aero/theory_pitching/index.html | 2 +- dev/aero/theory_trefftz_plane/index.html | 2 +- dev/atmos/atmos/index.html | 4 +- dev/balance/balance/index.html | 2 +- dev/examples/loadingrunning/index.html | 2 +- dev/examples/optimization/index.html | 2 +- dev/examples/payload_range/index.html | 120 ++++++++----------- dev/index.html | 2 +- dev/misc/dreladocs/index.html | 2 +- dev/misc/fordevs/index.html | 2 +- dev/misc/misc/index.html | 2 +- dev/misc/structs/index.html | 2 +- dev/propulsion/PEMfuelcell/index.html | 2 +- dev/propulsion/gascalc/index.html | 8 +- dev/propulsion/hxfun/index.html | 2 +- dev/propulsion/propsys/index.html | 8 +- dev/search_index.js | 2 +- dev/sizing/sizing/index.html | 6 +- dev/sizing/weightmodels/index.html | 2 +- dev/structures/fueltanks/index.html | 6 +- dev/structures/fuselage/index.html | 2 +- dev/structures/theory_wingstruct/index.html | 2 +- dev/structures/wing/index.html | 2 +- 31 files changed, 100 insertions(+), 116 deletions(-) diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index 43b4a621..292f01f0 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.10.0","generation_timestamp":"2024-02-07T11:46:16","documenter_version":"1.2.1"}} \ No newline at end of file +{"documenter":{"julia_version":"1.10.0","generation_timestamp":"2024-02-07T14:41:55","documenter_version":"1.2.1"}} \ No newline at end of file diff --git a/dev/aero/drag/index.html b/dev/aero/drag/index.html index b707c54f..420b46a8 100644 --- a/dev/aero/drag/index.html +++ b/dev/aero/drag/index.html @@ -85,7 +85,7 @@ \end{aligned}\]

TASOPT.aerodynamics.axisol!Method
axisol!(xnose, xend, xblend1, xblend2, Amax, 
       anose, btail, iclose,
       Mach, nc, nldim,
-        xl, zl, sl, dyl, ql)

Calculates compressible potential flow about a quasi-axisymmetric body, using a simple piecewise-constant source line.

🔃 Inputs and Outputs

Inputs:

  • xnose::Float64: X (axial) location of nose point.
  • xend::Float64: X location of tail point.
  • xblend1::Float64: X location of nose-section blend point.
  • xblend2::Float64: X location of tail-section blend point.
  • Amax::Float64: Maximum cross-sectional area.
  • anose::Float64: Nose-section shape exponent.
  • btail::Float64: Tail-section shape exponent.
  • iclose::Integer: If 0, tail tapers to a point, otherwise to an edge.
  • Mach::Float64: Freestream Mach number for Prandtl-Glauert.
  • nc::Integer: Number of control points to be used.
  • nldim::Integer: Max dimension of passed arrays.

Outputs:

  • nl::Integer: Number of output surface and wake points.
  • ilte::Integer: Index of TE point.
  • xl::Array{Float64}: X (axial) locations of surface segment endpoints.
  • zl::Array{Float64}: Z (vertical) locations of surface segment endpoints.
  • sl::Array{Float64}: Arc lengths along surface and wake.
  • dyl::Array{Float64}: Half-width of edge-type tail section.
  • ql::Array{Float64}: Velocities V/V_inf along surface and wake.

See theory above or Section 3 of Simplified Viscous/Inviscid Analysis for Nearly-Axisymmetric Bodies. See also fusebl!.

source
TASOPT.aerodynamics.blsysMethod
blsys(simi, lami, wake, direct, Mach, uinv, hksep,
+        xl, zl, sl, dyl, ql)

Calculates compressible potential flow about a quasi-axisymmetric body, using a simple piecewise-constant source line.

🔃 Inputs and Outputs

Inputs:

  • xnose::Float64: X (axial) location of nose point.
  • xend::Float64: X location of tail point.
  • xblend1::Float64: X location of nose-section blend point.
  • xblend2::Float64: X location of tail-section blend point.
  • Amax::Float64: Maximum cross-sectional area.
  • anose::Float64: Nose-section shape exponent.
  • btail::Float64: Tail-section shape exponent.
  • iclose::Integer: If 0, tail tapers to a point, otherwise to an edge.
  • Mach::Float64: Freestream Mach number for Prandtl-Glauert.
  • nc::Integer: Number of control points to be used.
  • nldim::Integer: Max dimension of passed arrays.

Outputs:

  • nl::Integer: Number of output surface and wake points.
  • ilte::Integer: Index of TE point.
  • xl::Array{Float64}: X (axial) locations of surface segment endpoints.
  • zl::Array{Float64}: Z (vertical) locations of surface segment endpoints.
  • sl::Array{Float64}: Arc lengths along surface and wake.
  • dyl::Array{Float64}: Half-width of edge-type tail section.
  • ql::Array{Float64}: Velocities V/V_inf along surface and wake.

See theory above or Section 3 of Simplified Viscous/Inviscid Analysis for Nearly-Axisymmetric Bodies. See also fusebl!.

source
TASOPT.aerodynamics.blsysMethod
blsys(simi, lami, wake, direct, Mach, uinv, hksep,
       x, b, rn, th, ds, ue,
       h , h_th, h_ds,
       hk, hk_th, hk_ds, hk_ue,
@@ -99,7 +99,7 @@
       hcm, hcm_thm, hcm_dsm, hcm_uem,
       hsm, hsm_thm, hsm_dsm, hsm_uem,
       cfm, cfm_thm, cfm_dsm, cfm_uem,
-      dim, dim_thm, dim_dsm, dim_uem)

Computes Jacobian matrices for BL solution at an axial station. Called repeatedly by blax.

🔃 Inputs and Outputs

Inputs:

  • simi::Integer: Self-similar BL profile flag.
  • lami::Integer: Laminar flow flag.
  • wake::Integer: In wake? Flag.
  • direct::Integer: Direct solution flag.
  • Mach::Float64: Mach number for compressibility.
  • uinv::Float64: Inviscid velocity.
  • x::Float64: Arc length.
  • b::Float64: Lateral width of BL.
  • rn::Float64: $dr/dn$, $= 0$ for 2D.
  • th::Float64: Momentum thickness.
  • ds::Float64: Displacement thickness.
  • ue::Float64: Edge velocity.
  • h::Float64: Shape parameter.
  • hk::Float64: Kinematic shape parameter.
  • hc::Float64: density shape parameter (Whitfield).
  • hs::Float64: kinetic energy shape parameter.
  • cf::Float64: Skin friction factor.
  • di::Float64: Dissipation factor.

m denotes the previous point (minus one) in the upstream. _z denotes partial derivative with respect to z (z = th, ds, ue).

Outputs:

  • aa::Array{Float64, 3, 3}: Jacobian matrix (wrt current point vars).
  • bb::Array{Float64, 3, 3}: Jacobian matrix (wrt previous point vars).
  • rr::Array{Float64, 3}: Residual.

See Section 4 of Simplified Viscous/Inviscid Analysis for Nearly-Axisymmetric Bodies.

source
TASOPT.aerodynamics.blaxMethod
blax(ndim, n,ite, xi, bi, rni, uinv, Reyn, Mach, fexcr)

Axisymmetric boundary layer + wake calculation routine. Uses specified inviscid velocity, corrects for viscous displacement to allow calculation of separated flow.

🔃 Inputs and Outputs

Inputs:

  • ndim::Integer: physical array dimension.
  • n::Integer: number of boundary layer + wake points.
  • ite::Integer: index of trailing edge point, start of wake.
  • xi::Array{Float64}: arc length array (BL coordinate).
  • bi::Array{Float64}: lateral width of BL at surface (i.e., body perimeter). $b_i$ = 0 for wake, 1 for 2D.
  • rni::Array{Float64}: $dr/dn$ to account for near-axisymmetric bodies, 0 for 2D.
  • uinv::Array{Float64}: inviscid velocity, $u_{inv}$.
  • Reyn::Float64: Reynolds number, $\rho_{ref} u_{ref} l_{ref} / \mu_{ref}$.
  • Mach::Float64: Mach number, $M = u_{ref} / a_{ref}$.
  • fexcr::Float64: excrescence multiplier applied to wall $c_f$, 1 for smooth wall.

Assumed units for all quantities:

  • l_ref: same unit as used for input xi,bi.
  • u_ref: freestream velocity.
  • a_ref: freestream speed of sound.
  • rho_ref: freestream density.
  • mu_ref: freestream viscosity.

Outputs:

  • uei::Array{Float64}: edge velocity, ($u_{e,i} = u_{inv,i} +$ {displacement correction}).
  • dsi::Array{Float64}: displacement thickness ($\delta^*$).
  • thi::Array{Float64}: momentum thickness ($\theta$).
  • tsi::Array{Float64}: kinetic energy thickness ($\theta^*$).
  • dci::Array{Float64}: density flux thickness ($\delta^{**}$).
  • cfi::Array{Float64}: skin friction coefficient, normalized with local $\rho$, $u$ ($c_{f,i}$).
  • cdi::Array{Float64}: dissipation coefficient , normalized with local $\rho$,$u$ ($c_{\mathcal{D},i}$).
  • cti::Array{Float64}: max shear-stress coefficient, normalized with local $\rho$,$u$ ($c_{t,i}$).
  • hki::Array{Float64}: kinematic shape parameter ($H_{K,i}$).
  • phi::Array{Float64}: integrated dissipation ($\Phi$).

Other outputs of interest can be computed as follows. These are in units of l_ref, rho_ref, u_ref

  • beffi: Effective perimeter, $b_{eff,i} = b_i + 2 \pi \delta^* dr/dn$.
  • rhi: Edge density, $\rho_i = (1 + \frac{(\gamma-1)}{2}M^2 (1.0-u_{e,i}^2))^\frac{1}{(\gamma-1)}$.
  • mdef: Total mass defect, $\rho_i u_{e,i} \delta^* b_{eff}$.
  • Pdef: Total momentum defect, $\rho_i u_{e,i}^2 \theta b_{eff}$.
  • Edef: Total kinetic energy defect, $\frac{1}{2} \rho_i u_{e,i}^3 \theta^* b_{eff}$.
  • tauwb: Wall shear force/span, $\frac{\tau_w}{b} = \frac{1}{2} u_{e,i}^2 c_{f,i} b_{eff}$.
  • Diss: Dissipation integral, $\rho_i u_{e,i}^3 c_{\mathcal{D},i} b_{eff,i}$.

Body profile drag D_p is the far-downstream momentum defect $P_\infty$, best obtained by applying Squire-Young to the last wake point, $i = n$ :

  • $P_{end} = \rho_i u_{e,i}^2 \theta b_{eff}$
  • $H_{end} = \delta^*/\theta$
  • $H_{\infty} = 1 + (\gamma-1) M^2$
  • $H_{avg} = \frac{1}{2} (H_{end} + H_{inf})$
  • $P_{inf} = P_{end} u_{e,i}^{H_{avg}} = D_p$

See Section 4 of Simplified Viscous/Inviscid Analysis for Nearly-Axisymmetric Bodies. See also blsys and blvar. Deprecates blax.

source
TASOPT.aerodynamics.blvarMethod
blvar(simi, lami, wake, Reyn, Mach, fexcr, x, θ, δs, ue)

Returns the boundary layer variables needed for solution.

🔃 Inputs and Outputs

Inputs:

  • simi::Integer: Self-similar BL profile flag.
  • lami::Integer: Laminar flow flag.
  • wake::Integer: In wake flag.
  • Reyn::Float64: Reynolds number.
  • Mach::Float64: Mach number for compressibility.
  • fexcr::Float64: Excrescence factor.

Outputs:

  • h::Float64 : Shape parameter.
  • hk::Float64: Kinematic shape parameter.
  • hc::Float64: Density shape parameter (Whitfield).
  • hs::Float64: Kinetic energy shape parameter.
  • cf::Float64: Skin friction factor.
  • cd::Float64: Dissipation factor and their derivatives.
source
TASOPT.aerodynamics.fusebl!Method
fusebl!(pari, parg, para, ip)

Calculates surface velocities, boundary layer, wake for a quasi-axisymmetric body in compressible flow.

A compressible source line represents the potential flow. An integral BL formulation with lateral divergence represents the surface BL and wake. An added-source distribution represents the viscous displacement influence on the potential flow. The body shape is defined by its area and perimeter distributions A(x), b0(x), which are defined by the various geometric parameters in parg.

🔃 Inputs and Outputs

Inputs:

  • pari::AbstractVector{Int64}: Vector of aircraft model integer/flag parameters.
  • parg::AbstractArray{Float64}: Vector of aircraft model geometry parameters.
  • para::AbstractArray{Float64}: Vector of aircraft model aerodynamic parameters.
  • ip::Integer: Index of flight point in par arrays.

Outputs:

  • No explicit outputs. Computed drag values are saved to para of aircraft model.

See Simplified Viscous/Inviscid Analysis for Nearly-Axisymmetric Bodies. See also blax and axisol!.

Future Changes

In an upcoming revision, an aircraft struct and auxiliary indices will be passed in lieu of pre-sliced par arrays.

source

Trefftz plane drag calculation

Trefftz plane analysis computes the induced drag from lifting surfaces. The lift distributions are propagated downstream, accounting for streamline contraction from fuselage thickness variation as shown in the Figure below.

Two shaded streamtubes are shown. Wake center radius $y'_o$ is nonzero due to the fuselage viscous wake displacement area.

The vorticity in the wake is numerially integrated at collocation points to determine the overall induced drag.

T

Trefftz Plane vortices $i,i\!+\!1 \ldots$ and collocation points $i\!+\!1/2$ used for velocity, impulse, and kinetic energy calculations. Left/right symmetry is exploited.

📖 Theory - induced drag $C_{d,i}$

The induced drag is calculated using a discrete vortex Trefftz-Plane analysis. The circulation of the wing wake immediately behind the trailing edge is

\[\begin{aligned} + dim, dim_thm, dim_dsm, dim_uem)

Computes Jacobian matrices for BL solution at an axial station. Called repeatedly by blax.

🔃 Inputs and Outputs

Inputs:

  • simi::Integer: Self-similar BL profile flag.
  • lami::Integer: Laminar flow flag.
  • wake::Integer: In wake? Flag.
  • direct::Integer: Direct solution flag.
  • Mach::Float64: Mach number for compressibility.
  • uinv::Float64: Inviscid velocity.
  • x::Float64: Arc length.
  • b::Float64: Lateral width of BL.
  • rn::Float64: $dr/dn$, $= 0$ for 2D.
  • th::Float64: Momentum thickness.
  • ds::Float64: Displacement thickness.
  • ue::Float64: Edge velocity.
  • h::Float64: Shape parameter.
  • hk::Float64: Kinematic shape parameter.
  • hc::Float64: density shape parameter (Whitfield).
  • hs::Float64: kinetic energy shape parameter.
  • cf::Float64: Skin friction factor.
  • di::Float64: Dissipation factor.

m denotes the previous point (minus one) in the upstream. _z denotes partial derivative with respect to z (z = th, ds, ue).

Outputs:

  • aa::Array{Float64, 3, 3}: Jacobian matrix (wrt current point vars).
  • bb::Array{Float64, 3, 3}: Jacobian matrix (wrt previous point vars).
  • rr::Array{Float64, 3}: Residual.

See Section 4 of Simplified Viscous/Inviscid Analysis for Nearly-Axisymmetric Bodies.

source
TASOPT.aerodynamics.blaxMethod
blax(ndim, n,ite, xi, bi, rni, uinv, Reyn, Mach, fexcr)

Axisymmetric boundary layer + wake calculation routine. Uses specified inviscid velocity, corrects for viscous displacement to allow calculation of separated flow.

🔃 Inputs and Outputs

Inputs:

  • ndim::Integer: physical array dimension.
  • n::Integer: number of boundary layer + wake points.
  • ite::Integer: index of trailing edge point, start of wake.
  • xi::Array{Float64}: arc length array (BL coordinate).
  • bi::Array{Float64}: lateral width of BL at surface (i.e., body perimeter). $b_i$ = 0 for wake, 1 for 2D.
  • rni::Array{Float64}: $dr/dn$ to account for near-axisymmetric bodies, 0 for 2D.
  • uinv::Array{Float64}: inviscid velocity, $u_{inv}$.
  • Reyn::Float64: Reynolds number, $\rho_{ref} u_{ref} l_{ref} / \mu_{ref}$.
  • Mach::Float64: Mach number, $M = u_{ref} / a_{ref}$.
  • fexcr::Float64: excrescence multiplier applied to wall $c_f$, 1 for smooth wall.

Assumed units for all quantities:

  • l_ref: same unit as used for input xi,bi.
  • u_ref: freestream velocity.
  • a_ref: freestream speed of sound.
  • rho_ref: freestream density.
  • mu_ref: freestream viscosity.

Outputs:

  • uei::Array{Float64}: edge velocity, ($u_{e,i} = u_{inv,i} +$ {displacement correction}).
  • dsi::Array{Float64}: displacement thickness ($\delta^*$).
  • thi::Array{Float64}: momentum thickness ($\theta$).
  • tsi::Array{Float64}: kinetic energy thickness ($\theta^*$).
  • dci::Array{Float64}: density flux thickness ($\delta^{**}$).
  • cfi::Array{Float64}: skin friction coefficient, normalized with local $\rho$, $u$ ($c_{f,i}$).
  • cdi::Array{Float64}: dissipation coefficient , normalized with local $\rho$,$u$ ($c_{\mathcal{D},i}$).
  • cti::Array{Float64}: max shear-stress coefficient, normalized with local $\rho$,$u$ ($c_{t,i}$).
  • hki::Array{Float64}: kinematic shape parameter ($H_{K,i}$).
  • phi::Array{Float64}: integrated dissipation ($\Phi$).

Other outputs of interest can be computed as follows. These are in units of l_ref, rho_ref, u_ref

  • beffi: Effective perimeter, $b_{eff,i} = b_i + 2 \pi \delta^* dr/dn$.
  • rhi: Edge density, $\rho_i = (1 + \frac{(\gamma-1)}{2}M^2 (1.0-u_{e,i}^2))^\frac{1}{(\gamma-1)}$.
  • mdef: Total mass defect, $\rho_i u_{e,i} \delta^* b_{eff}$.
  • Pdef: Total momentum defect, $\rho_i u_{e,i}^2 \theta b_{eff}$.
  • Edef: Total kinetic energy defect, $\frac{1}{2} \rho_i u_{e,i}^3 \theta^* b_{eff}$.
  • tauwb: Wall shear force/span, $\frac{\tau_w}{b} = \frac{1}{2} u_{e,i}^2 c_{f,i} b_{eff}$.
  • Diss: Dissipation integral, $\rho_i u_{e,i}^3 c_{\mathcal{D},i} b_{eff,i}$.

Body profile drag D_p is the far-downstream momentum defect $P_\infty$, best obtained by applying Squire-Young to the last wake point, $i = n$ :

  • $P_{end} = \rho_i u_{e,i}^2 \theta b_{eff}$
  • $H_{end} = \delta^*/\theta$
  • $H_{\infty} = 1 + (\gamma-1) M^2$
  • $H_{avg} = \frac{1}{2} (H_{end} + H_{inf})$
  • $P_{inf} = P_{end} u_{e,i}^{H_{avg}} = D_p$

See Section 4 of Simplified Viscous/Inviscid Analysis for Nearly-Axisymmetric Bodies. See also blsys and blvar. Deprecates blax.

source
TASOPT.aerodynamics.blvarMethod
blvar(simi, lami, wake, Reyn, Mach, fexcr, x, θ, δs, ue)

Returns the boundary layer variables needed for solution.

🔃 Inputs and Outputs

Inputs:

  • simi::Integer: Self-similar BL profile flag.
  • lami::Integer: Laminar flow flag.
  • wake::Integer: In wake flag.
  • Reyn::Float64: Reynolds number.
  • Mach::Float64: Mach number for compressibility.
  • fexcr::Float64: Excrescence factor.

Outputs:

  • h::Float64 : Shape parameter.
  • hk::Float64: Kinematic shape parameter.
  • hc::Float64: Density shape parameter (Whitfield).
  • hs::Float64: Kinetic energy shape parameter.
  • cf::Float64: Skin friction factor.
  • cd::Float64: Dissipation factor and their derivatives.
source
TASOPT.aerodynamics.fusebl!Method
fusebl!(pari, parg, para, ip)

Calculates surface velocities, boundary layer, wake for a quasi-axisymmetric body in compressible flow.

A compressible source line represents the potential flow. An integral BL formulation with lateral divergence represents the surface BL and wake. An added-source distribution represents the viscous displacement influence on the potential flow. The body shape is defined by its area and perimeter distributions A(x), b0(x), which are defined by the various geometric parameters in parg.

🔃 Inputs and Outputs

Inputs:

  • pari::AbstractVector{Int64}: Vector of aircraft model integer/flag parameters.
  • parg::AbstractArray{Float64}: Vector of aircraft model geometry parameters.
  • para::AbstractArray{Float64}: Vector of aircraft model aerodynamic parameters.
  • ip::Integer: Index of flight point in par arrays.

Outputs:

  • No explicit outputs. Computed drag values are saved to para of aircraft model.

See Simplified Viscous/Inviscid Analysis for Nearly-Axisymmetric Bodies. See also blax and axisol!.

Future Changes

In an upcoming revision, an aircraft struct and auxiliary indices will be passed in lieu of pre-sliced par arrays.

source

Trefftz plane drag calculation

Trefftz plane analysis computes the induced drag from lifting surfaces. The lift distributions are propagated downstream, accounting for streamline contraction from fuselage thickness variation as shown in the Figure below.

Two shaded streamtubes are shown. Wake center radius $y'_o$ is nonzero due to the fuselage viscous wake displacement area.

The vorticity in the wake is numerially integrated at collocation points to determine the overall induced drag.

T

Trefftz Plane vortices $i,i\!+\!1 \ldots$ and collocation points $i\!+\!1/2$ used for velocity, impulse, and kinetic energy calculations. Left/right symmetry is exploited.

📖 Theory - induced drag $C_{d,i}$

The induced drag is calculated using a discrete vortex Trefftz-Plane analysis. The circulation of the wing wake immediately behind the trailing edge is

\[\begin{aligned} \Gamma_{\!{\rm wing}} {\scriptstyle (\eta)} & = \frac{\tilde{p} {\scriptstyle (\eta)}}{\rho_{\scriptscriptstyle \infty}V_{\!{\scriptscriptstyle \infty}}} \; \simeq \; \frac{p {\scriptstyle (\eta)}}{\rho_{\scriptscriptstyle \infty}V_{\!{\scriptscriptstyle \infty}}} \, \sqrt{1 \!-\! \eta^{k_t}} @@ -181,10 +181,10 @@ \:-\:v_{i+1/2} \,(z'_{i+1}\!-\!z'_i) \right] \end{aligned}\]

To minimize any modeling and numerical errors incurred in the wake contraction model and the point-vortex summations, the final induced drag value is scaled by the square of the surface-integral and Trefftz-Plane drag values.

\[\begin{aligned} C_{\!D_i} & = & C_{\!D_{\scriptscriptstyle T\!P}} \left(\frac{C_{\!L}}{C_{\!L_{\scriptscriptstyle T\!P}}} \right)^{\!2} -\end{aligned}\]

This is equivalent to using the Trefftz Plane analysis to calculate the span efficiency rather than the actual induced drag coefficient.

TASOPT.aerodynamics.cditrpMethod
  cditrp(pari,parg,para)

Computes the induced drag via the Trefftz plane. Calls trefftz1.

🔃 Inputs and Outputs

Inputs:

  • pari::AbstractVector{Int64}: Vector of aircraft model integer/flag parameters.
  • parg::AbstractArray{Float64}: Vector of aircraft model geometry parameters.
  • para::AbstractArray{Float64}: Vector of aircraft model aerodynamic parameters.

Outputs:

  • No explicit outputs. Computed induced drag value and span efficiency are saved to para of aircraft model.
Future Changes

In an upcoming revision, an aircraft struct and auxiliary indices will be passed in lieu of pre-sliced par arrays.

source
TASOPT.aerodynamics.trefftz1Method
trefftz1(nsurf, npout, npinn, npimg, 
+\end{aligned}\]

This is equivalent to using the Trefftz Plane analysis to calculate the span efficiency rather than the actual induced drag coefficient.

TASOPT.aerodynamics.cditrpMethod
  cditrp(pari,parg,para)

Computes the induced drag via the Trefftz plane. Calls trefftz1.

🔃 Inputs and Outputs

Inputs:

  • pari::AbstractVector{Int64}: Vector of aircraft model integer/flag parameters.
  • parg::AbstractArray{Float64}: Vector of aircraft model geometry parameters.
  • para::AbstractArray{Float64}: Vector of aircraft model aerodynamic parameters.

Outputs:

  • No explicit outputs. Computed induced drag value and span efficiency are saved to para of aircraft model.
Future Changes

In an upcoming revision, an aircraft struct and auxiliary indices will be passed in lieu of pre-sliced par arrays.

source
TASOPT.aerodynamics.trefftz1Method
trefftz1(nsurf, npout, npinn, npimg, 
       Sref, bref, b, bs, bo, bop, 
       zcent, po, gammat, gammas, 
-      fLo,ktip, Lspec, CLsurfsp)

Trefftz plane routine for the induced drag computation of nsurf number of surfaces.

🔃 Inputs and Outputs

Inputs:

  • nsurf::Integer: Number of surfaces (typically wing and horizontal tail).
  • npout::Integer: Number of spanwise intervals (outer panel).
  • npinn::Integer: " " (inner panel).
  • npimg::Integer: " " (image inside fuselage).
  • b::Float64: Span.
  • bs::Float64: Wing-break span.
  • bo::Float64: Wing-root span.
  • bop::Float64: Span of wing-root streamline in Trefftz plane
  • zcent::Vector{Float64}: Vertical position at centerline for each surface.
  • gammat::Vector{Float64}, gammas::Vector{Float64}`: Wing lift distribution "taper" ratios for outer and inner wing sections, respectively.
  • fLo: wing root load adjustment factors (currently not implemented).
  • ktip::Float64: wing tip load adjustment factors.
  • Lspec::Integer: Flag for specified lift calculation (scales vorticities to achieve CLsurfsp before computing induced drag).
  • CLsurfsp::Vector{Float64}: Prescribed surface lift coefficient.

Outputs: -CLsurf::Vector{Float64}: Lift coefficients for each surface. -CL::Float64: Sum of lift coefficients of all surfaces. -CD::Float64: Sum of induced drag coefficients of all surfaces. -spanef::Float64: Span efficiency of combined surfaces ($= (CL^2 / (π*AR))/CD$).

See theory above or Sections 2.14.7 and 3.8.1 of the TASOPT Technical Desc.

source

Wing and tail surfaces

Lifting surface drag is determined via surfcd (when constant airfoil section cdf and cdp are already determined), and surfcd2 (when an explicit modelling and integration is desired). Airfoil performance is accessed via a lookup of precomputed airfoil data, airfun.

TASOPT.aerodynamics.surfcd2Method
surfcd2(S,
+      fLo,ktip, Lspec, CLsurfsp)

Trefftz plane routine for the induced drag computation of nsurf number of surfaces.

🔃 Inputs and Outputs

Inputs:

  • nsurf::Integer: Number of surfaces (typically wing and horizontal tail).
  • npout::Integer: Number of spanwise intervals (outer panel).
  • npinn::Integer: " " (inner panel).
  • npimg::Integer: " " (image inside fuselage).
  • b::Float64: Span.
  • bs::Float64: Wing-break span.
  • bo::Float64: Wing-root span.
  • bop::Float64: Span of wing-root streamline in Trefftz plane
  • zcent::Vector{Float64}: Vertical position at centerline for each surface.
  • gammat::Vector{Float64}, gammas::Vector{Float64}`: Wing lift distribution "taper" ratios for outer and inner wing sections, respectively.
  • fLo: wing root load adjustment factors (currently not implemented).
  • ktip::Float64: wing tip load adjustment factors.
  • Lspec::Integer: Flag for specified lift calculation (scales vorticities to achieve CLsurfsp before computing induced drag).
  • CLsurfsp::Vector{Float64}: Prescribed surface lift coefficient.

Outputs: -CLsurf::Vector{Float64}: Lift coefficients for each surface. -CL::Float64: Sum of lift coefficients of all surfaces. -CD::Float64: Sum of induced drag coefficients of all surfaces. -spanef::Float64: Span efficiency of combined surfaces ($= (CL^2 / (π*AR))/CD$).

See theory above or Sections 2.14.7 and 3.8.1 of the TASOPT Technical Desc.

source

Wing and tail surfaces

Lifting surface drag is determined via surfcd (when constant airfoil section cdf and cdp are already determined), and surfcd2 (when an explicit modelling and integration is desired). Airfoil performance is accessed via a lookup of precomputed airfoil data, airfun.

TASOPT.aerodynamics.surfcd2Method
surfcd2(S,
         b, bs, bo,
         λt, λs, γt, γs,
         toco, tocs, toct,
@@ -192,10 +192,10 @@
         CL, CLhtail, fLo, fLt,
         Reco, aRexp, kSuns, fexcd,
         AMa, Acl, Atau, ARe, A,
-        fduo, fdus, fdut)

Calculates wing or tail surface profile CD by calculating the performance of wing segments explicitly via airfoil data (found in [./src/air/C.air] and accessed by [airfun], [airtable]). Called by cdsum! if icdfun flag set to 1.

🔃 Inputs and Outputs

Inputs:

  • S::Float64: Reference area.
  • b::Float64: Span.
  • bs::Float64: Outer panel break span.
  • bo::Float64: Wing-root (fuselage) span.
  • λt::Float64: Outer-panel chord taper ratio ct/co.
  • λs::Float64: Inner-panel chord taper ratio cs/co.
  • γt::Float64: Outer-panel load taper ratio pt/po.
  • γs::Float64: Inner-panel load taper ratio ps/po.
  • toco::Float64: Root airfoil t/c.
  • tocs::Float64: Break airfoil t/c.
  • toct::Float64: Tip airfoil t/c.
  • sweep::Float64: Wing sweep, degrees.
  • co::Float64: Wing root chord.
  • Reco::Float64: Reynolds number for co.
  • aRexp::Float64: Re-scaling exponent.
  • kSuns::Float64: Shock-unsweep area constant.
  • fexcd::Float64: Excrescence cd scaling factor.
  • fduo::Float64, fdus::Float64, fdut::Float64: Velocity-change fractions at wing root, break ("snag"), and tip due to fuselage flow.

Outputs:

  • clpo::Float64,clps::Float64,clpt::Float64: Perpendicular sectional lift coefficient at wing root, break ("snag"), and tip.
  • CDfwing::Float64: Friction profile cd in perp. plane.
  • CDpwing::Float64: Pressure profile cd in perp. plane.
  • CDwing::Float64: Overall profile CD.
  • CDover::Float64: Fuselage added CD due to lift carryover.

See Sections 2.14.3 and 3.8.3 of TASOPT Technical Desc. See also cdsum!, surfcd, [surfcm], and [airfun].

Future Changes

This function will be renamed for clarity of use.

source
TASOPT.aerodynamics.surfcdMethod
surfcd(S, 
+        fduo, fdus, fdut)

Calculates wing or tail surface profile CD by calculating the performance of wing segments explicitly via airfoil data (found in [./src/air/C.air] and accessed by [airfun], [airtable]). Called by cdsum! if icdfun flag set to 1.

🔃 Inputs and Outputs

Inputs:

  • S::Float64: Reference area.
  • b::Float64: Span.
  • bs::Float64: Outer panel break span.
  • bo::Float64: Wing-root (fuselage) span.
  • λt::Float64: Outer-panel chord taper ratio ct/co.
  • λs::Float64: Inner-panel chord taper ratio cs/co.
  • γt::Float64: Outer-panel load taper ratio pt/po.
  • γs::Float64: Inner-panel load taper ratio ps/po.
  • toco::Float64: Root airfoil t/c.
  • tocs::Float64: Break airfoil t/c.
  • toct::Float64: Tip airfoil t/c.
  • sweep::Float64: Wing sweep, degrees.
  • co::Float64: Wing root chord.
  • Reco::Float64: Reynolds number for co.
  • aRexp::Float64: Re-scaling exponent.
  • kSuns::Float64: Shock-unsweep area constant.
  • fexcd::Float64: Excrescence cd scaling factor.
  • fduo::Float64, fdus::Float64, fdut::Float64: Velocity-change fractions at wing root, break ("snag"), and tip due to fuselage flow.

Outputs:

  • clpo::Float64,clps::Float64,clpt::Float64: Perpendicular sectional lift coefficient at wing root, break ("snag"), and tip.
  • CDfwing::Float64: Friction profile cd in perp. plane.
  • CDpwing::Float64: Pressure profile cd in perp. plane.
  • CDwing::Float64: Overall profile CD.
  • CDover::Float64: Fuselage added CD due to lift carryover.

See Sections 2.14.3 and 3.8.3 of TASOPT Technical Desc. See also cdsum!, surfcd, [surfcm], and [airfun].

Future Changes

This function will be renamed for clarity of use.

source
TASOPT.aerodynamics.surfcdMethod
surfcd(S, 
 b, bs, bo, 
 λt, λs, sweep, 
 co, cdf, cdp, 
 Reco, Reref, 
-aRexp, kSuns, fCDcen)

Computes wing or tail surface profile CD from pre-computed chord quantities and corrections. Called by cdsum! if icdfun flag set to 0.

Future Changes

This function may be renamed for clarity of use.

🔃 Inputs and Outputs

Inputs:

  • S::Float64: reference area.
  • b::Float64: span.
  • bs::Float64: outer panel break span.
  • bo::Float64: wing-root (fuselage) span.
  • λt::Float64: outer-panel taper ratio $ct/co$.
  • λs::Float64: inner-panel taper ratio $cs/co$.
  • sweep::Float64: wing sweep, degrees.
  • co::Float64: wing root chord.
  • cdf::Float64: friction profile cd.
  • cdp::Float64: pressure profile cd.
  • Reco::Float64: Reynolds number for co.
  • Reref::Float64: reference Reynolds number for cd scaling.
  • aRexp::Float64: Re-scaling exponent.
  • kSuns::Float64: shock-unsweep area constant.
  • fCDcen::Float64 : related to fraction of wing BLI (see Eqns. 619 - 621).

Outputs:

  • CDsurf: overall profile CD.
  • CDover: fuselage added CD due to lift carryover.

See Sections 2.14.3 and 3.8.3 of the TASOPT Technical Desc.

source
TASOPT.aerodynamics.airtableMethod
airtable(fname)

Reads airfoil file and outputs the matrix and splines as an airfoil.

The airfoil data is stored as a function of three variables, typically Mach number $\mathrm{Ma}$, lift coefficient $c_l$, and thickness to chord ratio $\tau$.

cdf(Ma, cl, τ), cdp(Ma, cl, τ), cm(Ma, cl, τ)
🔃 Inputs and Outputs

Inputs:

  • fname::String: Path to file.

Outputs:

  • airf::TASOPT.aerodynamics.airfoil: struct with airfoil performance characteristics.
source
TASOPT.aerodynamics.airfunMethod
airfun(cl, τ, Mach, air::airfoil)

Looks up airfoil performance data at specified conditions, as precomputed and found in ./src/airfoil_data/.

🔃 Inputs and Outputs

Inputs:

  • cl::Float64: Airfoil section lift coefficient.
  • τ::Float64: Airfoil section thickness-to-chord ratio.
  • Mach::Float64: Mach number.
  • air::TASOPT.aerodynamics.airfoil: airfoil structure with performance data.

Outputs:

  • cdf::Float64: Airfoil section skin friction drag.
  • cdp::Float64: Airfoil section pressure drag.
  • cdw::Float64: Airfoil section wave drag (unused and assumed 0 here; placeholder left for future implementation).
  • cm::Float64: Airfoil section pitching moment.
source

Total drag calculation

TASOPT.aerodynamics.cdsum!Method
cdsum!(pari,parg,para,pare,icdfun)

Calculates aircraft CD components for operating point, ipoint. If icdfun=1, computes wing cdf,cdp from airfoil database # iairf, otherwise uses default values in para array. Called by mission!, wsize, takeoff!, and odperf!.

The total drag is computed by

\[C_{D} = C_{D, i} + C_{D,fuse} + C_{D,wing} + C_{D,over} + C_{D,htail} + C_{D,vtail} + C_{D,strut} + C_{D,nace} + \Delta C_{D,BLI,f} + \Delta C_{D,BLI,w}\]

where:

  • $C_{D,i}$ (CDi) is the total induced drag including the wing and tail,
  • $C_{D,fuse}$ (CDfuse) is the fuselage profile drage computed by solving a boundary layer integral equation,
  • $C_{D,wing}$ (CDwing) is the wing profile drag (viscous + pressure) computed using airfoil data obtained from CFD,
  • $C_{D,over}$ (CDover) is the fuselage added CD due to lift carryover,
  • $C_{D,htail}$ (CDhtail) is the horizontal tail profile drag computed in a similar manner with CDwing,
  • $C_{D,vtail}$ (CDvtail) is the vertical tail profile drag computed in a similar manner with CDwing,
  • $C_{D,strut}$ (CDstrut) is the struct profile drag,
  • $C_{D,nace}$ (CDnace) is the nacelle profile drag,
  • $\Delta C_{D,BLI,f}$ (dCDBLIf) is related to the boundary layer ingestion on the fuselage,
  • and $\Delta C_{D,BLI,w}$ (dCDBLIw) is related to the boundary layer ingestion on the wing.
🔃 Inputs and Outputs

Inputs:

  • pari::AbstractVector{Int64}: Vector of aircraft model integer/flag parameters.
  • parg::AbstractArray{Float64}: Vector of aircraft model geometry parameters.
  • para::AbstractArray{Float64}: Vector of aircraft model aerodynamic parameters.
  • pare::AbstractArray{Float64}: Vector of aircraft model engine parameters.
  • icdfun::Integer: Flag if drag should be computed (=1) or if para values should be used (=0).

Outputs:

  • No explicit outputs. Computed drag values are saved to para of aircraft model.

See Section 2.14 of the TASOPT Technical Desc. See also trefftz1, fusebl!, surfcd2, surfcd, cfturb, and cditrp.

Future Changes

In an upcoming revision, an aircraft struct and auxiliary indices will be passed in lieu of pre-sliced par arrays.

source

Other utilities

TASOPT.aerodynamics.cfturbFunction
  cfturb(Re)

Returns the total $C_f$ for turbulent flat plate (one side) as a function of $\mathrm{Re}_l$

\[C_{f, turb} = \frac{0.523}{(\log(0.06\mathrm{Re}))^2} \]

source

For example, the turbulent flat plate $C_f$ for a $Re$ of $10e6$ can be calculated as follows:

Re = 10e6
-cfturb(Re)
0.002954557862895432
+aRexp, kSuns, fCDcen)

Computes wing or tail surface profile CD from pre-computed chord quantities and corrections. Called by cdsum! if icdfun flag set to 0.

Future Changes

This function may be renamed for clarity of use.

🔃 Inputs and Outputs

Inputs:

  • S::Float64: reference area.
  • b::Float64: span.
  • bs::Float64: outer panel break span.
  • bo::Float64: wing-root (fuselage) span.
  • λt::Float64: outer-panel taper ratio $ct/co$.
  • λs::Float64: inner-panel taper ratio $cs/co$.
  • sweep::Float64: wing sweep, degrees.
  • co::Float64: wing root chord.
  • cdf::Float64: friction profile cd.
  • cdp::Float64: pressure profile cd.
  • Reco::Float64: Reynolds number for co.
  • Reref::Float64: reference Reynolds number for cd scaling.
  • aRexp::Float64: Re-scaling exponent.
  • kSuns::Float64: shock-unsweep area constant.
  • fCDcen::Float64 : related to fraction of wing BLI (see Eqns. 619 - 621).

Outputs:

  • CDsurf: overall profile CD.
  • CDover: fuselage added CD due to lift carryover.

See Sections 2.14.3 and 3.8.3 of the TASOPT Technical Desc.

source
TASOPT.aerodynamics.airtableMethod
airtable(fname)

Reads airfoil file and outputs the matrix and splines as an airfoil.

The airfoil data is stored as a function of three variables, typically Mach number $\mathrm{Ma}$, lift coefficient $c_l$, and thickness to chord ratio $\tau$.

cdf(Ma, cl, τ), cdp(Ma, cl, τ), cm(Ma, cl, τ)
🔃 Inputs and Outputs

Inputs:

  • fname::String: Path to file.

Outputs:

  • airf::TASOPT.aerodynamics.airfoil: struct with airfoil performance characteristics.
source
TASOPT.aerodynamics.airfunMethod
airfun(cl, τ, Mach, air::airfoil)

Looks up airfoil performance data at specified conditions, as precomputed and found in ./src/airfoil_data/.

🔃 Inputs and Outputs

Inputs:

  • cl::Float64: Airfoil section lift coefficient.
  • τ::Float64: Airfoil section thickness-to-chord ratio.
  • Mach::Float64: Mach number.
  • air::TASOPT.aerodynamics.airfoil: airfoil structure with performance data.

Outputs:

  • cdf::Float64: Airfoil section skin friction drag.
  • cdp::Float64: Airfoil section pressure drag.
  • cdw::Float64: Airfoil section wave drag (unused and assumed 0 here; placeholder left for future implementation).
  • cm::Float64: Airfoil section pitching moment.
source

Total drag calculation

TASOPT.aerodynamics.cdsum!Method
cdsum!(pari,parg,para,pare,icdfun)

Calculates aircraft CD components for operating point, ipoint. If icdfun=1, computes wing cdf,cdp from airfoil database # iairf, otherwise uses default values in para array. Called by mission!, wsize, takeoff!, and odperf!.

The total drag is computed by

\[C_{D} = C_{D, i} + C_{D,fuse} + C_{D,wing} + C_{D,over} + C_{D,htail} + C_{D,vtail} + C_{D,strut} + C_{D,nace} + \Delta C_{D,BLI,f} + \Delta C_{D,BLI,w}\]

where:

  • $C_{D,i}$ (CDi) is the total induced drag including the wing and tail,
  • $C_{D,fuse}$ (CDfuse) is the fuselage profile drage computed by solving a boundary layer integral equation,
  • $C_{D,wing}$ (CDwing) is the wing profile drag (viscous + pressure) computed using airfoil data obtained from CFD,
  • $C_{D,over}$ (CDover) is the fuselage added CD due to lift carryover,
  • $C_{D,htail}$ (CDhtail) is the horizontal tail profile drag computed in a similar manner with CDwing,
  • $C_{D,vtail}$ (CDvtail) is the vertical tail profile drag computed in a similar manner with CDwing,
  • $C_{D,strut}$ (CDstrut) is the struct profile drag,
  • $C_{D,nace}$ (CDnace) is the nacelle profile drag,
  • $\Delta C_{D,BLI,f}$ (dCDBLIf) is related to the boundary layer ingestion on the fuselage,
  • and $\Delta C_{D,BLI,w}$ (dCDBLIw) is related to the boundary layer ingestion on the wing.
🔃 Inputs and Outputs

Inputs:

  • pari::AbstractVector{Int64}: Vector of aircraft model integer/flag parameters.
  • parg::AbstractArray{Float64}: Vector of aircraft model geometry parameters.
  • para::AbstractArray{Float64}: Vector of aircraft model aerodynamic parameters.
  • pare::AbstractArray{Float64}: Vector of aircraft model engine parameters.
  • icdfun::Integer: Flag if drag should be computed (=1) or if para values should be used (=0).

Outputs:

  • No explicit outputs. Computed drag values are saved to para of aircraft model.

See Section 2.14 of the TASOPT Technical Desc. See also trefftz1, fusebl!, surfcd2, surfcd, cfturb, and cditrp.

Future Changes

In an upcoming revision, an aircraft struct and auxiliary indices will be passed in lieu of pre-sliced par arrays.

source

Other utilities

TASOPT.aerodynamics.cfturbFunction
  cfturb(Re)

Returns the total $C_f$ for turbulent flat plate (one side) as a function of $\mathrm{Re}_l$

\[C_{f, turb} = \frac{0.523}{(\log(0.06\mathrm{Re}))^2} \]

source

For example, the turbulent flat plate $C_f$ for a $Re$ of $10e6$ can be calculated as follows:

Re = 10e6
+cfturb(Re)
0.002954557862895432
diff --git a/dev/aero/geometry/index.html b/dev/aero/geometry/index.html index f738929e..9ef4b569 100644 --- a/dev/aero/geometry/index.html +++ b/dev/aero/geometry/index.html @@ -102,4 +102,4 @@ S_{\rm ref} &\!= (S)_{\rm wing}\\ {A\hspace{-0.5ex}R}_{\rm ref} &\!= ({A\hspace{-0.5ex}R})_{\rm wing}\\ c_{\rm ref} &\!= (c_{\rm ma})_{\rm wing} -\end{aligned}\]

TASOPT.aerodynamics.wingscMethod
wingsc(W, CL, qinf, AR, ηsi, bo, λt, λs)

Sizes wing area, span, root chord from q, CL, W, AR at given point (taken as start-of-cruise in wsize).

🔃 Inputs and Outputs

Inputs:

  • W::Float64: Aircraft weight.
  • CL::Float64: Lift coefficient.
  • qinf::Float64: Freestream dynamic head.
  • AR::Float64: Wing aspect ratio.
  • ηsi::Float64: Span fraction of inner wing break ("snag").
  • bo::Float64: Wing center box width.
  • λt::Float64: Outer or "tip" taper ratio of chord.
  • λs::Float64: Inner or break/"snag" taper ratio of chord.

Outputs:

  • S::Float64: Wing planform area (including fuselage carryover).
  • b::Float64: Wing span.
  • bs::Float64: Span of inner wing (break/"snag").
  • co::Float64: Chord at wing root, "center."

See Sections 2.5 and 3.4.1 of the TASOPT Technical Desc.

source
+\end{aligned}\]

TASOPT.aerodynamics.wingscMethod
wingsc(W, CL, qinf, AR, ηsi, bo, λt, λs)

Sizes wing area, span, root chord from q, CL, W, AR at given point (taken as start-of-cruise in wsize).

🔃 Inputs and Outputs

Inputs:

  • W::Float64: Aircraft weight.
  • CL::Float64: Lift coefficient.
  • qinf::Float64: Freestream dynamic head.
  • AR::Float64: Wing aspect ratio.
  • ηsi::Float64: Span fraction of inner wing break ("snag").
  • bo::Float64: Wing center box width.
  • λt::Float64: Outer or "tip" taper ratio of chord.
  • λs::Float64: Inner or break/"snag" taper ratio of chord.

Outputs:

  • S::Float64: Wing planform area (including fuselage carryover).
  • b::Float64: Wing span.
  • bs::Float64: Span of inner wing (break/"snag").
  • co::Float64: Chord at wing root, "center."

See Sections 2.5 and 3.4.1 of the TASOPT Technical Desc.

source
diff --git a/dev/aero/lift/index.html b/dev/aero/lift/index.html index d93fee67..d836aae5 100644 --- a/dev/aero/lift/index.html +++ b/dev/aero/lift/index.html @@ -73,7 +73,7 @@ p_t & \!=\! p_o \, \gamma_t \end{aligned}\]

TASOPT.aerodynamics.wingpoMethod
wingpo(b, bs, bo, 
     λt, λs, γt, γs, 
-    AR, N, W, Lhtail, fLo, fLt)

Computes wing root ("center") loading $p_o$ to balance the net load.

\[N*W - L_{h tail} \times 2*∫p(η) dy + 2ΔL₀ + 2ΔLₜ = N*W - (L_{htail}).\]

🔃 Inputs and Outputs

Inputs:

  • b::Float64: Wing span.
  • bs::Float64: Span of inner wing section.
  • bo::Float64: Span of wing box (span at wing root).
  • λt::Float64, λs::Float64 : Wing chord taper ratios at tip and break ("snag"), respectively.
  • γt::Float64,γs::Float64 : Wing lift distribution "taper" ratios for outer and inner wing sections, respectively.
  • AR::Float64, N::Float64, W::Float64, Lhtail : Aspect ratio, Load factor, weight and H-tail lift.
  • fLo::Float64, fLt::Float64 : Wing root and tip load adjustment factors.

Outputs:

  • po::Float64: Wing root loading magnitude.

See Section 2.6.2 of the TASOPT Technical Desc.

source
TASOPT.aerodynamics.wingclMethod
wingcl(b,bs,bo,
+    AR, N, W, Lhtail, fLo, fLt)

Computes wing root ("center") loading $p_o$ to balance the net load.

\[N*W - L_{h tail} \times 2*∫p(η) dy + 2ΔL₀ + 2ΔLₜ = N*W - (L_{htail}).\]

🔃 Inputs and Outputs

Inputs:

  • b::Float64: Wing span.
  • bs::Float64: Span of inner wing section.
  • bo::Float64: Span of wing box (span at wing root).
  • λt::Float64, λs::Float64 : Wing chord taper ratios at tip and break ("snag"), respectively.
  • γt::Float64,γs::Float64 : Wing lift distribution "taper" ratios for outer and inner wing sections, respectively.
  • AR::Float64, N::Float64, W::Float64, Lhtail : Aspect ratio, Load factor, weight and H-tail lift.
  • fLo::Float64, fLt::Float64 : Wing root and tip load adjustment factors.

Outputs:

  • po::Float64: Wing root loading magnitude.

See Section 2.6.2 of the TASOPT Technical Desc.

source
TASOPT.aerodynamics.wingclMethod
wingcl(b,bs,bo,
     λt,λs,γt,γs,
     sweep,AR,CL,CLhtail,fLo,fLt,
-    duo,dus,dut)

Calculates section cl at eta = ηo,ηs,1

🔃 Inputs and Outputs

Inputs:

  • b::Float64, bs::Float64, bo::Float64: Span of wing, inner wing section (up to "snag"), and wing root, respectively.
  • λt::Float64, λs::Float64: Wing chord taper ratios at tip and break ("snag"), respectively.
  • γt::Float64, γs::Float64: Wing lift distribution "taper" ratios for outer and inner wing sections, respectively.
  • sweep::Float64: Wing sweep for reference axis.
  • AR::Float64: Wing aspect ratio, $AR = b^2/S$.
  • CL::Float64, CLhtail::Float64: Overall lift coefficient of wing and horizontal tail, respectively.
  • fLo::Float64, fLt::Float64: Correction factors for lift of wingbox and tip.
  • duo::Float64, dus::Float64, dut::Float64: Velocity-change fractions at wing root, break ("snag"), and tip due to fuselage flow.

Outputs:

  • clo::Float64, cls::Float64, clt::Float64: Section lift coefficient at root, wing break ("snag"), and tip.

See Sections 2.5 and 2.6 of the TASOPT Technical Desc. Called by cdsum!.

source
+ duo,dus,dut)

Calculates section cl at eta = ηo,ηs,1

🔃 Inputs and Outputs

Inputs:

  • b::Float64, bs::Float64, bo::Float64: Span of wing, inner wing section (up to "snag"), and wing root, respectively.
  • λt::Float64, λs::Float64: Wing chord taper ratios at tip and break ("snag"), respectively.
  • γt::Float64, γs::Float64: Wing lift distribution "taper" ratios for outer and inner wing sections, respectively.
  • sweep::Float64: Wing sweep for reference axis.
  • AR::Float64: Wing aspect ratio, $AR = b^2/S$.
  • CL::Float64, CLhtail::Float64: Overall lift coefficient of wing and horizontal tail, respectively.
  • fLo::Float64, fLt::Float64: Correction factors for lift of wingbox and tip.
  • duo::Float64, dus::Float64, dut::Float64: Velocity-change fractions at wing root, break ("snag"), and tip due to fuselage flow.

Outputs:

  • clo::Float64, cls::Float64, clt::Float64: Section lift coefficient at root, wing break ("snag"), and tip.

See Sections 2.5 and 2.6 of the TASOPT Technical Desc. Called by cdsum!.

source diff --git a/dev/aero/moment/index.html b/dev/aero/moment/index.html index 2400967b..007e9efc 100644 --- a/dev/aero/moment/index.html +++ b/dev/aero/moment/index.html @@ -173,4 +173,4 @@ \hspace{2em} \end{aligned}\]

Wing pitching moment quantities.

TASOPT.aerodynamics.surfcmMethod
surfcm(b, bs, bo, sweep, Xaxis, 
 	λt, λs, γt, γs, 
-	AR, fLo, fLt, cmpo, cmps, cmpt)

Calculates components of wing pitching moment ($C_M$) about wing root axis:

$C_M = C_{M,0} + C_{M,1} (C_L - C_{L,surf})$

$ΔC_{m, surf} = ΔC_{m, 0} + dCₘ/dCL × (C_L - C_{L,h})$

🔃 Inputs and Outputs

Inputs:

  • b::Float64: Span.
  • bs::Float64: Outer panel break span.
  • bo::Float64: Root (fuselage) span.
  • sweep::Float64: Sweep, degrees. - Xaxis::Float64: Surface axis position.
  • λt::Float64: Outer-panel chord taper ratio ct/co.
  • λs::Float64: Inner-panel chord taper ratio cs/co.
  • γt::Float64: Outer-panel load taper ratio pt/po.
  • γs::Float64: Inner-panel load taper ratio ps/po.
  • AR::Float64: Surface aspect ratio.
  • fLo::Float64, fLt::Float64 : Wing root and tip load adjustment factors.
  • cmpo::Float64,cmps::Float64,cmpt::Float64: Perpendicular sectional lift coefficient at wing root, break ("snag"), and tip.

Outputs:

  • CM0::Float64: Zero-lift surface pitching moment.
  • CM1::Float64: Surface pitching moment including lift contribution.

See Section 2.6.3 of the TASOPT Technical Desc. See also surfcd and surfcd2.

source
+ AR, fLo, fLt, cmpo, cmps, cmpt)

Calculates components of wing pitching moment ($C_M$) about wing root axis:

$C_M = C_{M,0} + C_{M,1} (C_L - C_{L,surf})$

$ΔC_{m, surf} = ΔC_{m, 0} + dCₘ/dCL × (C_L - C_{L,h})$

🔃 Inputs and Outputs

Inputs:

  • b::Float64: Span.
  • bs::Float64: Outer panel break span.
  • bo::Float64: Root (fuselage) span.
  • sweep::Float64: Sweep, degrees. - Xaxis::Float64: Surface axis position.
  • λt::Float64: Outer-panel chord taper ratio ct/co.
  • λs::Float64: Inner-panel chord taper ratio cs/co.
  • γt::Float64: Outer-panel load taper ratio pt/po.
  • γs::Float64: Inner-panel load taper ratio ps/po.
  • AR::Float64: Surface aspect ratio.
  • fLo::Float64, fLt::Float64 : Wing root and tip load adjustment factors.
  • cmpo::Float64,cmps::Float64,cmpt::Float64: Perpendicular sectional lift coefficient at wing root, break ("snag"), and tip.

Outputs:

  • CM0::Float64: Zero-lift surface pitching moment.
  • CM1::Float64: Surface pitching moment including lift contribution.

See Section 2.6.3 of the TASOPT Technical Desc. See also surfcd and surfcd2.

source diff --git a/dev/aero/theory_fuse_profile_drag/index.html b/dev/aero/theory_fuse_profile_drag/index.html index 69da5fee..9993a7ea 100644 --- a/dev/aero/theory_fuse_profile_drag/index.html +++ b/dev/aero/theory_fuse_profile_drag/index.html @@ -82,4 +82,4 @@ \rm{where} \hspace{3ex} C_{\Phi_{\rm wake}} & \!=\! & \frac{2 \Theta_{\scriptscriptstyle \infty}}{S} \:-\: \frac{\Theta^*_{\scriptscriptstyle T\!E}}{S} -\end{aligned}\]

+\end{aligned}\]

diff --git a/dev/aero/theory_geometry/index.html b/dev/aero/theory_geometry/index.html index 82393055..f28cd46d 100644 --- a/dev/aero/theory_geometry/index.html +++ b/dev/aero/theory_geometry/index.html @@ -102,4 +102,4 @@ S_{\rm ref} &\!= (S)_{\rm wing}\\ {A\hspace{-0.5ex}R}_{\rm ref} &\!= ({A\hspace{-0.5ex}R})_{\rm wing}\\ c_{\rm ref} &\!= (c_{\rm ma})_{\rm wing} -\end{aligned}\]

+\end{aligned}\]

diff --git a/dev/aero/theory_lifting/index.html b/dev/aero/theory_lifting/index.html index 83f2a42c..63a180b3 100644 --- a/dev/aero/theory_lifting/index.html +++ b/dev/aero/theory_lifting/index.html @@ -71,4 +71,4 @@ p_s & \!=\! p_o \, \gamma_s \\ p_t & \!=\! p_o \, \gamma_t -\end{aligned}\]

+\end{aligned}\]

diff --git a/dev/aero/theory_pitching/index.html b/dev/aero/theory_pitching/index.html index 57a9de15..a0fcf55c 100644 --- a/dev/aero/theory_pitching/index.html +++ b/dev/aero/theory_pitching/index.html @@ -171,4 +171,4 @@ \hspace{3em} %\label{CM0wing} \hspace{2em} -\end{aligned}\]

Wing pitching moment quantities.

+\end{aligned}\]

Wing pitching moment quantities.

diff --git a/dev/aero/theory_trefftz_plane/index.html b/dev/aero/theory_trefftz_plane/index.html index 009049a3..05c93a16 100644 --- a/dev/aero/theory_trefftz_plane/index.html +++ b/dev/aero/theory_trefftz_plane/index.html @@ -81,4 +81,4 @@ \:-\:v_{i+1/2} \,(z'_{i+1}\!-\!z'_i) \right] \end{aligned}\]

To minimize any modeling and numerical errors incurred in the wake contraction model and the point-vortex summations, the final induced drag value is scaled by the square of the surface-integral and Trefftz-Plane drag values.

\[\begin{aligned} C_{\!D_i} & = & C_{\!D_{\scriptscriptstyle T\!P}} \left(\frac{C_{\!L}}{C_{\!L_{\scriptscriptstyle T\!P}}} \right)^{\!2} -\end{aligned}\]

This is equivalent to using the Trefftz Plane analysis to calculate the span efficiency rather than the actual induced drag coefficient.

+\end{aligned}\]

This is equivalent to using the Trefftz Plane analysis to calculate the span efficiency rather than the actual induced drag coefficient.

diff --git a/dev/atmos/atmos/index.html b/dev/atmos/atmos/index.html index c7e72c1a..e47f6c57 100644 --- a/dev/atmos/atmos/index.html +++ b/dev/atmos/atmos/index.html @@ -1,4 +1,4 @@ -Atmospheric properties · TASOPT.jl

Atmospheric properties

TASOPT.atmosphere.atmosFunction
atmos(h)

Atmospheric functions T(h), ρ(h) etc valid to h=20km, p(h) valid to h=70km.

Also calculates viscosity using Sutherland's law.

Units:

  • [h] = km ASL
  • [T] = Kelvin
  • [p] = Pa
  • [ρ] = kg/m^3
  • [a] = m/s
  • [μ] = kg/m-s
source

This function can be used to return the atmospheric properties at a given altitude as follows:

h = 10.0 # km
+Atmospheric properties · TASOPT.jl

Atmospheric properties

TASOPT.atmosphere.atmosFunction
atmos(h)

Atmospheric functions T(h), ρ(h) etc valid to h=20km, p(h) valid to h=70km.

Also calculates viscosity using Sutherland's law.

Units:

  • [h] = km ASL
  • [T] = Kelvin
  • [p] = Pa
  • [ρ] = kg/m^3
  • [a] = m/s
  • [μ] = kg/m-s
source

This function can be used to return the atmospheric properties at a given altitude as follows:

h = 10.0 # km
 T,p,ρ,a,μ = atmos(h)
-T,p,ρ,a,μ
(223.2742386852347, 26433.407009283186, 0.4127136733296332, 299.4443758964096, 1.4502286282162577e-5)
+T,p,ρ,a,μ
(223.2742386852347, 26433.407009283186, 0.4127136733296332, 299.4443758964096, 1.4502286282162577e-5)
diff --git a/dev/balance/balance/index.html b/dev/balance/balance/index.html index 4a0503bc..5c645593 100644 --- a/dev/balance/balance/index.html +++ b/dev/balance/balance/index.html @@ -1,2 +1,2 @@ -Stability · TASOPT.jl

Stability and balance

TASOPT.balanceFunction
  balance(pari, parg, para, rfuel, rpay, ξpay, itrim)

Makes one of three (or none) changes to achieve pitch trim calculates resulting CG, CP, NP locations.

Inputs:

  • pari[.] integer flag array
  • parg[.] geometry parameter array
  • para[.] aero parameter array
  • rfuel fuel fraction Wfuelactual/WfuelMTOW
  • rpay payload fraction Wpayactual/WpayMTOW
  • ξpay partial-payload packing location
    • = 0.0 all the way in front of cabin
    • = 0.5 all the way in middle of cabin
    • = 1.0 all the way in back of cabin
  • iengloc engine location index
  • itrim = 0 no changes
    • = 1 adjust CLh (horizontal tail cl)
    • = 2 adjust Sh (horizontal tail area)
    • = 3 adjust xwbox (wing box location)

Outputs:

  • para[iaxCG] center of gravity
  • para[iaxCP] center of pressure ( = xCG if itrim=1,2,3 )
  • para[iaxNP] neutral point location
Future Changes

In an upcoming revision, an aircraft struct and auxiliary indices will be passed in lieu of pre-sliced par arrays.

source
TASOPT.cglpayFunction

Calculates min and max xCG locations from payload extremes, and corresponding payload fractions.

rfuelF,rpayF give most-forward location xcgF rfuelB,rpayB give most-rearward location xcgB

This version always returns rfuelF = rfuelB = 0.0 which gives an explicit solution for rpayF,rpayB.

The alternative 2D search for rfuel,rpay is kinda ugly, and unwarranted in practice.

source
TASOPT.htsizeFunction

Sets horizontal tail area and wing position to simultaneously:

  1. Meet pitch trim requirement with forward CG
  2. Meet stability requirement with aft CG

Calculates resulting CG, CP, NP locations

Inputs:

  • pari[.] integer fla array
  • parg[.] geometry parameter array
  • paraF[.] aero parameter array for fwdCG case
  • paraB[.] aero parameter array for aft CG case
  • paraC[.] aero parameter array for cruise tail CL case

Outputs:

  • parg[igSh] HT area
  • parg[igxwbox] wingbox location
  • parg[igxwing] wing centroid location
source
+Stability · TASOPT.jl

Stability and balance

TASOPT.balanceFunction
  balance(pari, parg, para, rfuel, rpay, ξpay, itrim)

Makes one of three (or none) changes to achieve pitch trim calculates resulting CG, CP, NP locations.

Inputs:

  • pari[.] integer flag array
  • parg[.] geometry parameter array
  • para[.] aero parameter array
  • rfuel fuel fraction Wfuelactual/WfuelMTOW
  • rpay payload fraction Wpayactual/WpayMTOW
  • ξpay partial-payload packing location
    • = 0.0 all the way in front of cabin
    • = 0.5 all the way in middle of cabin
    • = 1.0 all the way in back of cabin
  • iengloc engine location index
  • itrim = 0 no changes
    • = 1 adjust CLh (horizontal tail cl)
    • = 2 adjust Sh (horizontal tail area)
    • = 3 adjust xwbox (wing box location)

Outputs:

  • para[iaxCG] center of gravity
  • para[iaxCP] center of pressure ( = xCG if itrim=1,2,3 )
  • para[iaxNP] neutral point location
Future Changes

In an upcoming revision, an aircraft struct and auxiliary indices will be passed in lieu of pre-sliced par arrays.

source
TASOPT.cglpayFunction

Calculates min and max xCG locations from payload extremes, and corresponding payload fractions.

rfuelF,rpayF give most-forward location xcgF rfuelB,rpayB give most-rearward location xcgB

This version always returns rfuelF = rfuelB = 0.0 which gives an explicit solution for rpayF,rpayB.

The alternative 2D search for rfuel,rpay is kinda ugly, and unwarranted in practice.

source
TASOPT.htsizeFunction

Sets horizontal tail area and wing position to simultaneously:

  1. Meet pitch trim requirement with forward CG
  2. Meet stability requirement with aft CG

Calculates resulting CG, CP, NP locations

Inputs:

  • pari[.] integer fla array
  • parg[.] geometry parameter array
  • paraF[.] aero parameter array for fwdCG case
  • paraB[.] aero parameter array for aft CG case
  • paraC[.] aero parameter array for cruise tail CL case

Outputs:

  • parg[igSh] HT area
  • parg[igxwbox] wingbox location
  • parg[igxwing] wing centroid location
source
diff --git a/dev/examples/loadingrunning/index.html b/dev/examples/loadingrunning/index.html index 5feb8404..63141572 100644 --- a/dev/examples/loadingrunning/index.html +++ b/dev/examples/loadingrunning/index.html @@ -18,4 +18,4 @@ # lTO l1 lBF dmax 1 6474.360 5179.488 8416.667 355.380 2 6474.360 5534.868 8485.441 3.718 - 3 6474.360 5538.586 8485.689 0.000 + 3 6474.360 5538.586 8485.689 0.000 diff --git a/dev/examples/optimization/index.html b/dev/examples/optimization/index.html index 972f8750..9a11b69f 100644 --- a/dev/examples/optimization/index.html +++ b/dev/examples/optimization/index.html @@ -109,4 +109,4 @@ ax[4].set_ylabel("OPR") plt.suptitle("Optimization outputs") figname2 = "Opt_tutorial_iterations" -fig.savefig(savedir*figname2*".png") +fig.savefig(savedir*figname2*".png") diff --git a/dev/examples/payload_range/index.html b/dev/examples/payload_range/index.html index 478ece58..658c0764 100644 --- a/dev/examples/payload_range/index.html +++ b/dev/examples/payload_range/index.html @@ -1,5 +1,5 @@ -Payload-range diagram · TASOPT.jl

Example for a Payload-Range diagram

PayloadRangePlot

Choosing a design mission

To plot a payload-range diagram with a fleet of missions you must first load a model with >=1 non design mission

Start by choosing a design mission. Your design mission should be what you want the second corner point in your Payload Range plot to be. Once you have a chosen a specific design range and payload weight (For eg: 3500 nmi and 195 pax) you can add it to the input toml file: default_input.toml

[Mission]
+Payload-range diagram · TASOPT.jl

Example for a Payload-Range diagram

PayloadRangePlot

Choosing a design mission

To plot a payload-range diagram with a fleet of missions you must first load any aircraft model

Start by choosing a design mission. Your design mission should be what you want the second corner point in your Payload Range plot to be. Once you have a chosen a specific design range and payload weight (For eg: 3500 nmi and 195 pax) you can add it to the input toml file for eg: default_input.toml

[Mission]
     N_missions = 5 # Number of missions to be modeled (first mission is the design mission)
     pax = 195       # Number of passengers in each mission
     range = "3500.0 nmi" # Design Range + second mission range
@@ -11,79 +11,63 @@
 # you can optionally define
 # const tas = TASOPT 
 # to use as a shorthand
-include("../src/misc/index.inc")
+include(joinpath(TASOPT.__TASOPTroot__, "./src/misc/index.inc"))
 # import indices for calling parameters
 
 # Load aircraft using default module
 ac = TASOPT.read_aircraft_model(joinpath(TASOPT.__TASOPTroot__, "../example/PRD_input.toml"))
-time_wsize = @elapsed size_aircraft!(ac)

Initialize some variables for mission range and payloads

nmis = size(ac.parm)[2] # Get number of missions
-MAX_PAYLOAD = 230 * 215 * 4.448222 # Starting Payload, #Passengers * 215 lb * lb_to_N
-# Ranges:
-Range_arr_nmi = LinRange(100, 1000, nmis-1) # Starting range array (in nmi)
-Range_arr = Range_arr_nmi .* 1852.0 # Convert to SI units
-Max_range = Range_arr[nmis-1]
-curr_range = Range_arr[1]
-prev_range = 0.1

Initialize variables for mission iterations

NPSS = Base.Process
-NPSS_PT = true
-itermax = 15
-initeng = 0
-Ldebug = false
-saveOD = false
-SEC_B = false
-x_range = []
-y_payload = []
-y_Wemtpy = []

Main iteration loop

while MAX_PAYLOAD >= 0
-    println("-----------------------")
-    println("Starting new set of missions, \n Ranges: ", Range_arr, "\n Payload: ", MAX_PAYLOAD./(215*4.448222))
-    try
-        # Set non design mission ranges and payloads
-        ac.parm[imRange, 2:5] .= Range_arr
-        ac.parm[imWpay, 2:5] .= MAX_PAYLOAD
-        # Analyze each mission
-        for mi in 2:size(ac.parm)[2]
-            prev_range = curr_range
-            curr_range = ac.parm[imRange, mi]
-            # Call TASOPT woper function
-            @views TASOPT.woper(ac.pari,ac.parg,ac.parm[:,mi:mi],ac.para[:,:,mi:mi],ac.pare[:,:,mi:mi], ac.para[:,:,1:1],ac.pare[:,:,1:1], itermax,initeng, NPSS_PT, NPSS)
-            # Check if mission fuel and MTO weight is greater than design fuel and MTO weight
-            if (ac.parm[imWfuel,mi] - ac.parg[igWfuel] > 1) || (ac.parm[imWTO,mi] - ac.parg[igWMTO] > 1 )
-                printstyled("Mission designed beyond capacity!", "\n"; color=:red)
-                println([ac.parg[igWfuel], ac.parm[imWfuel,mi], ac.parg[igWMTO], ac.parm[imWTO,mi]])
-                throw(UndefVarError([ac.parg[igWfuel], ac.parm[imWfuel,mi], ac.parg[igWMTO], ac.parm[imWTO,mi]]))
-            end
+time_wsize = @elapsed size_aircraft!(ac)

One way is to call the PayloadRange function:

TASOPT.PayloadRange(ac)

If you want a more customizable diagram, first initialize some variables for mission range and payloads

# Copy aircraft structure as we will be changing range and payloads
+ac = deepcopy(ac_og)
+# Make an array of ranges to plot
+RangeArray = ac.parm[imRange] * LinRange(0.1,1.2,Rpts)
+# Store constant values to compare later
+Wmax = ac.parg[igWMTO]
+Fuelmax = ac.parg[igWfmax]
+Wempty = ac.parg[igWMTO] - ac.parg[igWfuel] - ac.parg[igWpay]
+# Arrays for plotting
+RangesToPlot = []
+PayloadToPlot = []
+maxPay = ac.parm[imWpay ]

Main iteration loop

for Range = RangeArray
+    # Make an array of payloads to plot
+    Payloads = (maxPay) * LinRange(1, 0.1, Ppts)
+    ac.parm[imRange] = Range
+    for mWpay = Payloads
+        println("Checking for Range (nmi): ",Range/1852.0, " and Pax = ", mWpay/(215*4.44822))
+        ac.parm[imWpay ] = mWpay
+        # Try woper after setting new range and payload
+        try
+            @views TASOPT.woper(ac.pari,ac.parg,ac.parm[:,1:1],ac.para[:,:,1:1],ac.pare[:,:,1:1], ac.para[:,:,1:1],ac.pare[:,:,1:1], itermax,0.0)
+            # woper success: store maxPay, break loop
+            WTO = Wempty + mWpay + ac.parm[imWfuel]
+            mWfuel = ac.parm[imWfuel]
 
-            # Add to dataframes
-            append!(x_range, curr_range)
-            append!(y_payload, MAX_PAYLOAD)
-            append!(y_WTO,  ac.parm[imWTO,mi])
-
-            # If in section B of Payload Range plot, decrease payload by 1 passenger
-            if SEC_B
-                println("decreasing payload since Section B")
-                MAX_PAYLOAD = max(0, MAX_PAYLOAD-(1*215*4.448222))
-            end
-        end
-        println("PRD converged for all: Increasing Ranges")
-        prev_range = curr_range
-        Max_range = prev_range+ (500* 1852.0) #Increase range array by 500 nmi
+            # Compare with previously stored constants
+            if WTO > Wmax || mWfuel > Fuelmax || WTO < 0.0 || mWfuel < 0.0 
+                WTO = 0.0
+                mWfuel = 0.0
+                println("Max out error!")
+            else
+                maxPay = mWpay
+                println("Converged - moving to next range...")
+                break
+            end     
         catch
-            println("PRD failed: Decreasing Payload and range")
-            prev_range = curr_range
-            Max_range = prev_range+ ((Max_range-prev_range)*0.75)
-            MAX_PAYLOAD = MAX_PAYLOAD-pax2N(5)
-            SEC_B = true
+            println("Not Converged - moving to lower payload...")      
         end
-    Range_arr = LinRange(prev_range, Max_range, nmis-1)
-    println("-----------------------")
+    end
+    append!(RangesToPlot, Range)
+    if OEW
+        append!(PayloadToPlot, maxPay+Wempty)
+    else
+        append!(PayloadToPlot, maxPay)
+    end
 end

Plot Payload Range diagram

using PyPlot
-figure()
-y_OEW = y_Wemtpy .+ y_payload
-plot(x_range ./ (1852.0*1000), y_OEW./ (4.448222* 1000), linestyle="-",  color="b", label="OEW + Payload ")
-
-xlabel("Range (1000 nmi)")
-ylabel("Weight (1000 lbs)")
-title("Payload Range Plot")
+fig, ax = plt.subplots(figsize=(8,5), dpi = 300)
+ax.plot(RangesToPlot ./ (1000*1852.0), PayloadToPlot./ (9.8*1000), linestyle="-",  color="b", label="Payload ")
+ax.set_xlabel("Range (1000 nmi)")
+ax.set_ylabel("Weight (1000 kg)")
+ax.legend()
+ax.set_title("Payload Range Plot")
+ax.grid()
 
-legend()
-grid()
-savefig("./PayloadRangeExample.png")
+fig.savefig("./PayloadRangeExample.png")
diff --git a/dev/index.html b/dev/index.html index 16588183..bc14de73 100644 --- a/dev/index.html +++ b/dev/index.html @@ -1,3 +1,3 @@ Home · TASOPT.jl

TASOPT.jl Documentation

TASOPT.jl is a multi-disciplinary aircraft design and optimization code implemented in Julia based on TASOPT by Mark Drela.

It can currently model tube-and-wing aircraft using 2D viscous-inviscid CFD to calculate aerodynamic performance, simple beam bending theory to size the wings, and thermodynamic cycle modeling to calculate engine performance.

New modelling capabilities are actively being developed. Please be sure to refer to the full documentation and dev notes before financing a new airframe development project.


Getting started

There are several workflows that are possible to use TASOPT.jl. We outline here the most common few.

Simple install

The easiest way to run TASOPT.jl would be to add the package using the julia package manager using the github repository.

You can do this by starting a Julia session and then activating the package manager by typing ] and then entering:

pkg> add git@github.com:MIT-LAE/TASOPT.jl.git

You can then import TASOPT as you would with any Julia package:

julia> using TASOPT

Local development

If you are going to develop the source code of TASOPT.jl you might benefit from a local clone of the git repository which can then fit into a workflow using Revise.jl for example.

Step 1: Clone the git repo locally

git clone git@github.mit.edu:LAE/TAESOPT.jl.git

Step 2: cd to the folder where TASOPT is cloned

Step 3: Use Pkg to install/ develop the package

pkg> dev .

You should now be able to import TASOPT from within any Julia script in your base environment.

We'd suggest starting with the examples.

Tip

If you are using Revise.jl be sure to first import Revise before importing TASOPT

using Revise
-using TASOPT

Units and Non-Dimensionals

All dimensional quantities are treated internally as SI.

Refer to /src/IO/default_input.toml for the input file's conversion capability and formatting. It's also useful for typical values and explaining inputs.

Non-dimensionalization follows the Drela conventions (see TASOPT Technical Description).

Documentation built 2024-02-07T11:46:04.210 with Julia 1.10.0
+using TASOPT

Units and Non-Dimensionals

All dimensional quantities are treated internally as SI.

Refer to /src/IO/default_input.toml for the input file's conversion capability and formatting. It's also useful for typical values and explaining inputs.

Non-dimensionalization follows the Drela conventions (see TASOPT Technical Description).

Documentation built 2024-02-07T14:41:42.783 with Julia 1.10.0
diff --git a/dev/misc/dreladocs/index.html b/dev/misc/dreladocs/index.html index b0d4feb4..80dd0d77 100644 --- a/dev/misc/dreladocs/index.html +++ b/dev/misc/dreladocs/index.html @@ -1,2 +1,2 @@ -Original Drela docs · TASOPT.jl
+Original Drela docs · TASOPT.jl
diff --git a/dev/misc/fordevs/index.html b/dev/misc/fordevs/index.html index 8ee6203e..15d4fd80 100644 --- a/dev/misc/fordevs/index.html +++ b/dev/misc/fordevs/index.html @@ -1,2 +1,2 @@ -Notes for devs · TASOPT.jl

Notes for devs

Info

TASOPT.jl is very much a WIP. Get at us on github, but search the issues first. Thanks! 🙂

Tips
  • Refer to the data structures to see where input file parameters end up.
  • Look out for !!! compat admonishments marking where things will likely change in the future.
  • References to NPSS are currently non-functional. We're working on replacing this functionality efficiently.
+Notes for devs · TASOPT.jl

Notes for devs

Info

TASOPT.jl is very much a WIP. Get at us on github, but search the issues first. Thanks! 🙂

Tips
  • Refer to the data structures to see where input file parameters end up.
  • Look out for !!! compat admonishments marking where things will likely change in the future.
  • References to NPSS are currently non-functional. We're working on replacing this functionality efficiently.
diff --git a/dev/misc/misc/index.html b/dev/misc/misc/index.html index e612d7ca..3f06f3a5 100644 --- a/dev/misc/misc/index.html +++ b/dev/misc/misc/index.html @@ -1,2 +1,2 @@ -Other utilities · TASOPT.jl
+Other utilities · TASOPT.jl
diff --git a/dev/misc/structs/index.html b/dev/misc/structs/index.html index b6b7af53..edf9fb17 100644 --- a/dev/misc/structs/index.html +++ b/dev/misc/structs/index.html @@ -1,2 +1,2 @@ -Data structures · TASOPT.jl

Data structures

We're incorporating structs as part of modernizing TASOPT from Fortran. Here are the main ones.

aircraftType
aircraft

A type representing a TASOPT aircraft model including, geometric, aerodynamic, propulsion system parameters. It is designed to hold information related to the aircraft's name, description, as well as different sets of parameters used for analysis and optimization.

Overloads Base.summary to print a summary of the aircraft model.

Fields:

  • name::String : Aircraft name (eg: "Boeing 777")
  • description::String : A brief description of the aircraft
  • pari::AbstractVector{Int64} : integer flag parameters
  • parg::AbstractArray{Float64} : Geometry parameters
  • parm::AbstractArray{Float64} : Mission parameters
  • para::AbstractArray{Float64} : Aero parameters
  • pare::AbstractArray{Float64} : Engine parameters

For devs: the indices for accessing specific data are defined in /src/misc/index.inc. Refer to the sample input file (/src/IO/default_input.toml and read_input.jl) for usage.

source
TASOPT.aerodynamics.airfoilType
airfoil

A type representing a database of pre-computed airfoil data for a single Reyolds number and a range of Mach numbers, sectional lift coefficients, and thickness-to-chord ratios. By default, this is the original TASOPT transonic airfoil, as modelled by M. Drela in MSES and stored in src/air/.

Overloads Base.show to print a summary of the airfoil model.

Fields:

  • Ma::AbstractVector{Float64} : Mach nos.

  • cl::AbstractVector{Float64} : Sectional lift coefficients.

  • τ::AbstractVector{Float64} : Thickness-to-chord ratios.

  • Re::Float64 : Reynolds number.

  • A::AbstractArray{Float64}: Multi-dimensional array of aero performance data.

Various views of the data:

  • A_M::AbstractArray{Float64}:
  • A_τ::AbstractArray{Float64}:
  • A_cl::AbstractArray{Float64}:
  • A_M_τ::AbstractArray{Float64}:
  • A_M_cl::AbstractArray{Float64}:
  • A_cl_τ::AbstractArray{Float64}:
  • A_M_cl_τ::AbstractArray{Float64}:

See also airfun and airtable.

source
+Data structures · TASOPT.jl

Data structures

We're incorporating structs as part of modernizing TASOPT from Fortran. Here are the main ones.

aircraftType
aircraft

A type representing a TASOPT aircraft model including, geometric, aerodynamic, propulsion system parameters. It is designed to hold information related to the aircraft's name, description, as well as different sets of parameters used for analysis and optimization.

Overloads Base.summary to print a summary of the aircraft model.

Fields:

  • name::String : Aircraft name (eg: "Boeing 777")
  • description::String : A brief description of the aircraft
  • pari::AbstractVector{Int64} : integer flag parameters
  • parg::AbstractArray{Float64} : Geometry parameters
  • parm::AbstractArray{Float64} : Mission parameters
  • para::AbstractArray{Float64} : Aero parameters
  • pare::AbstractArray{Float64} : Engine parameters

For devs: the indices for accessing specific data are defined in /src/misc/index.inc. Refer to the sample input file (/src/IO/default_input.toml and read_input.jl) for usage.

source
TASOPT.aerodynamics.airfoilType
airfoil

A type representing a database of pre-computed airfoil data for a single Reyolds number and a range of Mach numbers, sectional lift coefficients, and thickness-to-chord ratios. By default, this is the original TASOPT transonic airfoil, as modelled by M. Drela in MSES and stored in src/air/.

Overloads Base.show to print a summary of the airfoil model.

Fields:

  • Ma::AbstractVector{Float64} : Mach nos.

  • cl::AbstractVector{Float64} : Sectional lift coefficients.

  • τ::AbstractVector{Float64} : Thickness-to-chord ratios.

  • Re::Float64 : Reynolds number.

  • A::AbstractArray{Float64}: Multi-dimensional array of aero performance data.

Various views of the data:

  • A_M::AbstractArray{Float64}:
  • A_τ::AbstractArray{Float64}:
  • A_cl::AbstractArray{Float64}:
  • A_M_τ::AbstractArray{Float64}:
  • A_M_cl::AbstractArray{Float64}:
  • A_cl_τ::AbstractArray{Float64}:
  • A_M_cl_τ::AbstractArray{Float64}:

See also airfun and airtable.

source
diff --git a/dev/propulsion/PEMfuelcell/index.html b/dev/propulsion/PEMfuelcell/index.html index c3278d10..f868cd9e 100644 --- a/dev/propulsion/PEMfuelcell/index.html +++ b/dev/propulsion/PEMfuelcell/index.html @@ -3,4 +3,4 @@ 1+(0.01704T - 4.767)\mathrm{RH}_{avg} & \text{for } 373.15\leq T\leq 413.15\\ 1+(0.1432T - 56.89)\mathrm{RH}_{avg} & \text{for } 413.15 < T\leq 453.15\\ 1+(0.7T - 309.2)\mathrm{RH}_{avg} & \text{for } 453.15 < T\leq 473.15 -\end{cases}\]

where $\mathrm{RH}_{avg}$ is the average of the relative humidity in stations 2 and 3, and the relative humidity is simply $\mathrm{RH}=\frac{x_{\mathrm{H_2O}}p}{p_\mathrm{SAT}}$. To use this expression, it is necessary to calculate the water concentration is stations 2 and 3. As in the low-temperature model, this is done by solving the diffusion equations in Springer et al.[2] analytically, with the key difference that there is no water flux across the membrane.

The ohmic overvoltage, or ohmic loss, is given by

\[\eta_\mathrm{ohm} = j \mathrm{ASR}.\]

Water saturation

There are many models for the saturation partial pressure of water. A possible model valid under 383.15 K is [4]

\[p_\mathrm{SAT} = \frac{\exp\left(34.494 - \frac{4924.99}{t + 237.1}\right)}{(t + 105)^{1.57}} ,\]

where $t$ is the temperature in degrees Celsius and $p_\mathrm{SAT}$ is in pascals. A model for temperatures between 383.15 and 483 K is[3]

\[p_\mathrm{SAT} = 0.68737 T^3 - 732.39 T^2 +263390 T -31919000 ,\]

where $T$ is in kelvin.

Diffusivity

The diffusion of a species in a multi-species gas is complex. The Stefan-Maxwell expression can be used to model the derivative in space of the concentration of species $i$,

\[\frac{dx_i}{dz}= RT \sum_j \frac{x_i N_j - x_j N_i}{p D_{ij}},\]

where the sum is made over all the species that $i$ can collide with, and $N$ represents the molar flux. Equations for the spatial derivative of concentration can be found in [2]; for this particular model, there are closed-form solutions.

This equation requires determining the binary diffusivities of all the species involved. A model for binary diffusivity of species $i$ and $j$ is

\[p D_{i,j} = a \left(\frac{T}{\sqrt{T_{ci} T_{cj}}}\right)^b (p_{ci} p_{cj})^{1/3} (T_{ci} T_{cj})^{5/12}\left(\frac{1}{M_i} + \frac{1}{M_j}\right)^{1/2},\]

where the pressures are in atm and the diffusivity is in cm$^2$/s. For gas pairs involving nonpolar gases, $a=2.745\times10^{-4}$ and $b=1.823$. For pairs involving water and another nonpolar gas, $a=3.640\times10^{-4}$ and $b=2.334$. The parameters $T_c$ and $p_c$ can be found in Table 5.1 in [1].

When diffusion is occurring inside a porous material, such as a PEM electrode, the material structure affects the diffusion properties. This can be captured via an effective diffusivity, $D^\mathrm{eff}$, which is given by

\[D^\mathrm{eff} = D \varepsilon ^\tau,\]

where $\varepsilon$ is the porosity of the material (a typical value is 0.4), and $\tau$ is the tortuosity, which can vary between 1.5 and 10.

Cathode overvoltage

The fuel cell also experiences voltage drop due to activation losses, since a voltage is required to provide activation energy for the half reactions, and due to concentration losses, as the maximum current is limited by the rate of diffusion from the bulk flow to the electrodes. These losses are most significant at the cathode side; in this model, anode voltage drops are ignored. The cathode overvoltage can be calculated using the Tafel equation,

\[\eta_C = \frac{RT}{n_C \alpha F} \ln \left[\frac{j}{j_0 \frac{p_C}{p_0} x_{\mathrm{O}_2,3eff}}\right],\]

where $n_C=4$ is the number of electrons exchanged in the reduction reaction and $\alpha$ represents a symmetry parameter, typically 0.3–0.5. The effective oxygen concentration at 3, $x_{\mathrm{O}_2,3eff}$, accounts for the fact that part of the water on the cathode side is actually in liquid phase in low-temperature PEMFCs. For these, it is given by

\[x_{\mathrm{O}_2,3eff} = \frac{x_{\mathrm{O}_2,3}}{1-x_{liq}},\]

where $x_{liq} = x_{\mathrm{H_2O},3} - p_\mathrm{SAT} / p_C$ is the fraction of water in the cathode that is in liquid phase. In high-temperature PEMFCs, all water is in gaseous phase, so $x_{\mathrm{O}_2,3eff} =x_{\mathrm{O}_2,3}$.

The exchange current density, $j_0$, is related to the catalyst properties and effective surface area. A model for it is[5]

\[j_0 = j_{0,ref}\frac{A_{eff}}{A}\left(\frac{x_{\mathrm{O}_2,3eff}p_C}{p_0}\right)^\gamma \exp\left[-\frac{E_a}{RT}\left(1-\frac{T}{T_0}\right)\right],\]

where $j_{0,ref}\sim 10^{-9}$ A/m$^2$ is the reference exchange current density for a platinum catalyst at $T_0$ and $p_0$, $\frac{A_{eff}}{A}$ is the ratio of effective surface area of the catalyst to geometric area (can be of the order of 1000), $\gamma$ is a parameter in the range of 0.5–1.0, and $E_a=66$ kJ/mol is the activation energy for oxygen reduction on platinum.

Functions

Low-temperature PEM model

TASOPT.engine.LT_PEMFC_voltageFunction
LT_PEMFC_voltage(u, α_guess::Float64 = 0.25)

A 1-D model of the voltage across a low-temperature PEM fuel cell with a Nafion membrane, based on the model in Springer et al. (1991), which captures the effect of reactant depletion, multispecies diffusion and water transport in the membrane.

🔃 Inputs and Outputs

Inputs:

  • u::Struct: structure of type PEMFC_inputs with inputs
  • α_guess::Float64: guess for ratio of water flux to proton flux; default is 0.25

Outputs:

  • V::Float64: voltage across cell (V)
  • α_star::Float64: ratio of water flux to proton flux
source
TASOPT.engine.water_balanceFunction
water_balance(α_star, u, p)

This function calculates the difference between the water content at 3 from integration from the anode or cathode sides. This residual should be 0 if α_star is the correct one.

🔃 Inputs and Outputs

Inputs:

  • α_star::Float64: ratio of water flux to proton flux
  • u::Struct: structure of type PEMFC_inputs with inputs
  • p::Struct: structure of type PEMFC_params with parameters

Outputs:

  • x_end::Vector{Float64}: vector with values of x at z = d
source
TASOPT.engine.Nafion_diffusionFunction
Nafion_diffusion(T, λ)

This function estimates the diffusion coefficient of water in Nafion.

🔃 Inputs and Outputs

Inputs:

  • T::Float64: fuel cell temperature (K)
  • λ::Float64: water content; ratio of water molecules to SO3- sites

Outputs:

  • D_λ::Float64: water diffusion coefficient in Nafion (m^2/s)
source
TASOPT.engine.conductivity_NafionFunction
conductivity_Nafion(T, λ)

This function calculates the conductivity of Nafion as a function of water content.

🔃 Inputs and Outputs

Inputs:

  • T::Float64: fuel cell temperature (K)
  • λ::Float64: water content; ratio of water molecules to SO3- sites

Outputs:

  • σ::Float64: conductivity (Ohm m)^-1
source
TASOPT.engine.λ_calcFunction
λ_calc(a)

This function calculates the water content at the Nafion/electrode interface based on water activity.

🔃 Inputs and Outputs

Inputs:

  • a::Float64: water activity

Outputs:

  • λ::Float64: water content; ratio of water molecules to SO3- sites
source
TASOPT.engine.dλ_dz_membraneFunction
dλ_dz_membrane(λ, u, p)

This function evaluates the derivative in space of the water content in the membrane.

🔃 Inputs and Outputs

Inputs:

  • λ::Float64: water content; ratio of water molecules to SO3- sites
  • u::Struct: structure of type PEMFC_inputs with inputs
  • p::Struct: structure of type PEMFC_params with parameters

Outputs:

  • dλ_dz::Vector{Float64}: vector with derivative of λ in space
source

High-temperature PEM model

TASOPT.engine.HT_PEMFC_voltageFunction
HT_PEMFC_voltage(u)

A 1-D model of the voltage across a high-temperature PEM fuel cell with a PBI membrane. The code is based on the LT-PEMFC model by Springer et al. (1991), modified to eliminate water transport across the membrane and with conductivity values for PBI.

🔃 Inputs and Outputs

Inputs:

  • u::Struct: structure of type PEMFC_inputs with inputs

Outputs:

  • V::Float64: voltage across cell (V)
source
TASOPT.engine.conductivity_PBIFunction
conductivity_PBI(T, DL, RH)

This function calculates the conductivity of a PBI membrane as a function of temperature, doping level and humidity. Model from K. Jiao and X. Li (2009). A Three-Dimensional Non-isothermal Model of High Temperature Proton Exchange Membrane Fuel Cells with Phosphoric Acid Doped Polybenzimidazole Membranes.

🔃 Inputs and Outputs

Inputs:

  • T::Float64: fuel cell temperature (K)
  • DL::Float64: phosphoric acid doping level
  • RH::Float64: average relative humidity across membrane

Outputs:

  • σ::Float64: conductivity (Ohm m)^-1
source

Stack and design

TASOPT.engine.PEMsizeFunction
PEMsize(P_des, V_des, u)

Designs the fuel cell stack for the design point conditions.

🔃 Inputs and Outputs

Inputs:

  • P_des::Float64: design stack output power, ideally maximum power in mission (W)
  • V_des::Float64: design stack voltage (V)
  • u::Struct: structure of type PEMFC_inputs with inputs

Outputs:

  • n_cells::Float64: number of cells in stack
  • A_cell::Float64: cell surface area (m^2)
  • Q::Float64: waste power produced by the fuel cell at design point (W)
source
TASOPT.engine.PEMoperFunction
PEMoper(P_stack, n_cells, A_cell, u)

Evaluates fuel cell stack performance in off-design conditions.

🔃 Inputs and Outputs

Inputs:

  • P_stack::Float64: stack output power (W)
  • n_cells::Float64: number of cells in stack
  • A_cell::Float64: cell surface area (m^2)
  • u::Struct: structure of type PEMFC_inputs with inputs

Outputs:

  • V_stack::Float64: stack voltage (V)
  • Q::Float64: waste power produced by the fuel cell (W)
source
TASOPT.engine.PEMstackweightFunction
PEMstackweight(gee, u, A, n_cells, fouter)

Calculates the weight of a stack of PEM fuel cells.

🔃 Inputs and Outputs

Inputs:

  • gee::Float64: gravitational acceleration (m/s^2)
  • u::Struct: structure of type PEMFC_inputs with inputs
  • n_cells::Float64: number of cells in stack
  • A_cell::Float64: cell surface area (m^2)
  • fouter::Float64: ratio of stack structural mass (inc. bipolar plates) to membrane and electrode mass

Outputs:

  • W_stack::Float64: weight of FC stack (N)
source

Physics and mathematics

TASOPT.engine.water_sat_pressureFunction
water_sat_pressure(T)

Function to calculate the saturation partial pressure of water. It uses different models for temperatures above or below 100 degrees Celsius.

🔃 Inputs and Outputs

Inputs:

  • T::Float64: gas temperature (K)

Outputs:

  • p_SAT::Float64: saturation pressure (Pa)
source
TASOPT.engine.binary_diffusionFunction
binary_diffusion(T, p, sps)

This model estimates the binary diffusion coefficient of a gas species in a water vapor, to be used inside the electrodes. It uses the method of Slattery and Bird (1958) for low pressures.

🔃 Inputs and Outputs

Inputs:

  • T::Float64: gas temperature (K)
  • p::Float64: gas pressure (Pa)
  • sps::Vec{String}: gas species vector ("H2", "H2", "N2" or "O2")

Outputs:

  • D::Float64: diffusion coefficient (m^2/s)
source
TASOPT.engine.porous_diffusionFunction
porous_diffusion(D, ε, τ)

This model estimates the effective diffusion coefficient of a gas in a porous environment, such as a PEM electrode.

🔃 Inputs and Outputs

Inputs:

  • D::Float64: diffusion coefficient outside porous material (m^2/s)
  • ε::Float64: porosity of material
  • τ::String: tortuosity of material

Outputs:

  • Deff::Float64: effective diffusion coefficient (m^2/s)
source
TASOPT.engine.cathode_j0Function
cathode_j0(T, p, Aeff_ratio)

This function calculates the exchange current density of a PEM with a platinum catalyst.

🔃 Inputs and Outputs

Inputs:

  • T::Float64: fuel cell temperature (K)
  • p::Float64: reactant partial pressure (Pa)
  • Aeff_ratio::Float64: ratio of catalyst surface area to geometric cross-sectional area

Outputs:

  • j0::Float64: exchange current density (A/m^2)
source
TASOPT.engine.RK4Function
RK4(dy_dx, x, y0, u, p)

This function uses a 4th-order Runge-Kutta method to integrate a vector ODE in space or time.

🔃 Inputs and Outputs

Inputs:

  • dy_dx::Function: function of the form dy_dx(x, y, u, p) for derivative
  • x::Vector{Float64}: vector with the spatial coordinates for integration
  • y0::Vector{Float64}: vector with the initial conditions
  • u::Struct: structure of type PEMFC_inputs with inputs
  • p::Struct: structure of type PEMFC_params with parameters

Outputs:

  • y::Matrix{Float64}: matrix with values of y for every point in x
  • yend::Vector{Float64}: vector with final conditions at x[end]
source
TASOPT.engine.solve_diffusion_ODEFunction
solve_diffusion_ODE(M, B, x0, d)

This function uses eigendecomposition to solve a problem of the form dx/dz = M * x + B

🔃 Inputs and Outputs

Inputs:

  • M::Matrix{Float64}: matrix with coefficients
  • B::Vector{Float64}: vector with right-hand parameters
  • x0::Vector{Float64}: vector with the boundary conditions
  • d::Float64: distance at which to evaluate x, z = d

Outputs:

  • x_end::Vector{Float64}: vector with values of x at z = d
source
+\end{cases}\]

where $\mathrm{RH}_{avg}$ is the average of the relative humidity in stations 2 and 3, and the relative humidity is simply $\mathrm{RH}=\frac{x_{\mathrm{H_2O}}p}{p_\mathrm{SAT}}$. To use this expression, it is necessary to calculate the water concentration is stations 2 and 3. As in the low-temperature model, this is done by solving the diffusion equations in Springer et al.[2] analytically, with the key difference that there is no water flux across the membrane.

The ohmic overvoltage, or ohmic loss, is given by

\[\eta_\mathrm{ohm} = j \mathrm{ASR}.\]

Water saturation

There are many models for the saturation partial pressure of water. A possible model valid under 383.15 K is [4]

\[p_\mathrm{SAT} = \frac{\exp\left(34.494 - \frac{4924.99}{t + 237.1}\right)}{(t + 105)^{1.57}} ,\]

where $t$ is the temperature in degrees Celsius and $p_\mathrm{SAT}$ is in pascals. A model for temperatures between 383.15 and 483 K is[3]

\[p_\mathrm{SAT} = 0.68737 T^3 - 732.39 T^2 +263390 T -31919000 ,\]

where $T$ is in kelvin.

Diffusivity

The diffusion of a species in a multi-species gas is complex. The Stefan-Maxwell expression can be used to model the derivative in space of the concentration of species $i$,

\[\frac{dx_i}{dz}= RT \sum_j \frac{x_i N_j - x_j N_i}{p D_{ij}},\]

where the sum is made over all the species that $i$ can collide with, and $N$ represents the molar flux. Equations for the spatial derivative of concentration can be found in [2]; for this particular model, there are closed-form solutions.

This equation requires determining the binary diffusivities of all the species involved. A model for binary diffusivity of species $i$ and $j$ is

\[p D_{i,j} = a \left(\frac{T}{\sqrt{T_{ci} T_{cj}}}\right)^b (p_{ci} p_{cj})^{1/3} (T_{ci} T_{cj})^{5/12}\left(\frac{1}{M_i} + \frac{1}{M_j}\right)^{1/2},\]

where the pressures are in atm and the diffusivity is in cm$^2$/s. For gas pairs involving nonpolar gases, $a=2.745\times10^{-4}$ and $b=1.823$. For pairs involving water and another nonpolar gas, $a=3.640\times10^{-4}$ and $b=2.334$. The parameters $T_c$ and $p_c$ can be found in Table 5.1 in [1].

When diffusion is occurring inside a porous material, such as a PEM electrode, the material structure affects the diffusion properties. This can be captured via an effective diffusivity, $D^\mathrm{eff}$, which is given by

\[D^\mathrm{eff} = D \varepsilon ^\tau,\]

where $\varepsilon$ is the porosity of the material (a typical value is 0.4), and $\tau$ is the tortuosity, which can vary between 1.5 and 10.

Cathode overvoltage

The fuel cell also experiences voltage drop due to activation losses, since a voltage is required to provide activation energy for the half reactions, and due to concentration losses, as the maximum current is limited by the rate of diffusion from the bulk flow to the electrodes. These losses are most significant at the cathode side; in this model, anode voltage drops are ignored. The cathode overvoltage can be calculated using the Tafel equation,

\[\eta_C = \frac{RT}{n_C \alpha F} \ln \left[\frac{j}{j_0 \frac{p_C}{p_0} x_{\mathrm{O}_2,3eff}}\right],\]

where $n_C=4$ is the number of electrons exchanged in the reduction reaction and $\alpha$ represents a symmetry parameter, typically 0.3–0.5. The effective oxygen concentration at 3, $x_{\mathrm{O}_2,3eff}$, accounts for the fact that part of the water on the cathode side is actually in liquid phase in low-temperature PEMFCs. For these, it is given by

\[x_{\mathrm{O}_2,3eff} = \frac{x_{\mathrm{O}_2,3}}{1-x_{liq}},\]

where $x_{liq} = x_{\mathrm{H_2O},3} - p_\mathrm{SAT} / p_C$ is the fraction of water in the cathode that is in liquid phase. In high-temperature PEMFCs, all water is in gaseous phase, so $x_{\mathrm{O}_2,3eff} =x_{\mathrm{O}_2,3}$.

The exchange current density, $j_0$, is related to the catalyst properties and effective surface area. A model for it is[5]

\[j_0 = j_{0,ref}\frac{A_{eff}}{A}\left(\frac{x_{\mathrm{O}_2,3eff}p_C}{p_0}\right)^\gamma \exp\left[-\frac{E_a}{RT}\left(1-\frac{T}{T_0}\right)\right],\]

where $j_{0,ref}\sim 10^{-9}$ A/m$^2$ is the reference exchange current density for a platinum catalyst at $T_0$ and $p_0$, $\frac{A_{eff}}{A}$ is the ratio of effective surface area of the catalyst to geometric area (can be of the order of 1000), $\gamma$ is a parameter in the range of 0.5–1.0, and $E_a=66$ kJ/mol is the activation energy for oxygen reduction on platinum.

Functions

Low-temperature PEM model

TASOPT.engine.LT_PEMFC_voltageFunction
LT_PEMFC_voltage(u, α_guess::Float64 = 0.25)

A 1-D model of the voltage across a low-temperature PEM fuel cell with a Nafion membrane, based on the model in Springer et al. (1991), which captures the effect of reactant depletion, multispecies diffusion and water transport in the membrane.

🔃 Inputs and Outputs

Inputs:

  • u::Struct: structure of type PEMFC_inputs with inputs
  • α_guess::Float64: guess for ratio of water flux to proton flux; default is 0.25

Outputs:

  • V::Float64: voltage across cell (V)
  • α_star::Float64: ratio of water flux to proton flux
source
TASOPT.engine.water_balanceFunction
water_balance(α_star, u, p)

This function calculates the difference between the water content at 3 from integration from the anode or cathode sides. This residual should be 0 if α_star is the correct one.

🔃 Inputs and Outputs

Inputs:

  • α_star::Float64: ratio of water flux to proton flux
  • u::Struct: structure of type PEMFC_inputs with inputs
  • p::Struct: structure of type PEMFC_params with parameters

Outputs:

  • x_end::Vector{Float64}: vector with values of x at z = d
source
TASOPT.engine.Nafion_diffusionFunction
Nafion_diffusion(T, λ)

This function estimates the diffusion coefficient of water in Nafion.

🔃 Inputs and Outputs

Inputs:

  • T::Float64: fuel cell temperature (K)
  • λ::Float64: water content; ratio of water molecules to SO3- sites

Outputs:

  • D_λ::Float64: water diffusion coefficient in Nafion (m^2/s)
source
TASOPT.engine.conductivity_NafionFunction
conductivity_Nafion(T, λ)

This function calculates the conductivity of Nafion as a function of water content.

🔃 Inputs and Outputs

Inputs:

  • T::Float64: fuel cell temperature (K)
  • λ::Float64: water content; ratio of water molecules to SO3- sites

Outputs:

  • σ::Float64: conductivity (Ohm m)^-1
source
TASOPT.engine.λ_calcFunction
λ_calc(a)

This function calculates the water content at the Nafion/electrode interface based on water activity.

🔃 Inputs and Outputs

Inputs:

  • a::Float64: water activity

Outputs:

  • λ::Float64: water content; ratio of water molecules to SO3- sites
source
TASOPT.engine.dλ_dz_membraneFunction
dλ_dz_membrane(λ, u, p)

This function evaluates the derivative in space of the water content in the membrane.

🔃 Inputs and Outputs

Inputs:

  • λ::Float64: water content; ratio of water molecules to SO3- sites
  • u::Struct: structure of type PEMFC_inputs with inputs
  • p::Struct: structure of type PEMFC_params with parameters

Outputs:

  • dλ_dz::Vector{Float64}: vector with derivative of λ in space
source

High-temperature PEM model

TASOPT.engine.HT_PEMFC_voltageFunction
HT_PEMFC_voltage(u)

A 1-D model of the voltage across a high-temperature PEM fuel cell with a PBI membrane. The code is based on the LT-PEMFC model by Springer et al. (1991), modified to eliminate water transport across the membrane and with conductivity values for PBI.

🔃 Inputs and Outputs

Inputs:

  • u::Struct: structure of type PEMFC_inputs with inputs

Outputs:

  • V::Float64: voltage across cell (V)
source
TASOPT.engine.conductivity_PBIFunction
conductivity_PBI(T, DL, RH)

This function calculates the conductivity of a PBI membrane as a function of temperature, doping level and humidity. Model from K. Jiao and X. Li (2009). A Three-Dimensional Non-isothermal Model of High Temperature Proton Exchange Membrane Fuel Cells with Phosphoric Acid Doped Polybenzimidazole Membranes.

🔃 Inputs and Outputs

Inputs:

  • T::Float64: fuel cell temperature (K)
  • DL::Float64: phosphoric acid doping level
  • RH::Float64: average relative humidity across membrane

Outputs:

  • σ::Float64: conductivity (Ohm m)^-1
source

Stack and design

TASOPT.engine.PEMsizeFunction
PEMsize(P_des, V_des, u)

Designs the fuel cell stack for the design point conditions.

🔃 Inputs and Outputs

Inputs:

  • P_des::Float64: design stack output power, ideally maximum power in mission (W)
  • V_des::Float64: design stack voltage (V)
  • u::Struct: structure of type PEMFC_inputs with inputs

Outputs:

  • n_cells::Float64: number of cells in stack
  • A_cell::Float64: cell surface area (m^2)
  • Q::Float64: waste power produced by the fuel cell at design point (W)
source
TASOPT.engine.PEMoperFunction
PEMoper(P_stack, n_cells, A_cell, u)

Evaluates fuel cell stack performance in off-design conditions.

🔃 Inputs and Outputs

Inputs:

  • P_stack::Float64: stack output power (W)
  • n_cells::Float64: number of cells in stack
  • A_cell::Float64: cell surface area (m^2)
  • u::Struct: structure of type PEMFC_inputs with inputs

Outputs:

  • V_stack::Float64: stack voltage (V)
  • Q::Float64: waste power produced by the fuel cell (W)
source
TASOPT.engine.PEMstackweightFunction
PEMstackweight(gee, u, A, n_cells, fouter)

Calculates the weight of a stack of PEM fuel cells.

🔃 Inputs and Outputs

Inputs:

  • gee::Float64: gravitational acceleration (m/s^2)
  • u::Struct: structure of type PEMFC_inputs with inputs
  • n_cells::Float64: number of cells in stack
  • A_cell::Float64: cell surface area (m^2)
  • fouter::Float64: ratio of stack structural mass (inc. bipolar plates) to membrane and electrode mass

Outputs:

  • W_stack::Float64: weight of FC stack (N)
source

Physics and mathematics

TASOPT.engine.water_sat_pressureFunction
water_sat_pressure(T)

Function to calculate the saturation partial pressure of water. It uses different models for temperatures above or below 100 degrees Celsius.

🔃 Inputs and Outputs

Inputs:

  • T::Float64: gas temperature (K)

Outputs:

  • p_SAT::Float64: saturation pressure (Pa)
source
TASOPT.engine.binary_diffusionFunction
binary_diffusion(T, p, sps)

This model estimates the binary diffusion coefficient of a gas species in a water vapor, to be used inside the electrodes. It uses the method of Slattery and Bird (1958) for low pressures.

🔃 Inputs and Outputs

Inputs:

  • T::Float64: gas temperature (K)
  • p::Float64: gas pressure (Pa)
  • sps::Vec{String}: gas species vector ("H2", "H2", "N2" or "O2")

Outputs:

  • D::Float64: diffusion coefficient (m^2/s)
source
TASOPT.engine.porous_diffusionFunction
porous_diffusion(D, ε, τ)

This model estimates the effective diffusion coefficient of a gas in a porous environment, such as a PEM electrode.

🔃 Inputs and Outputs

Inputs:

  • D::Float64: diffusion coefficient outside porous material (m^2/s)
  • ε::Float64: porosity of material
  • τ::String: tortuosity of material

Outputs:

  • Deff::Float64: effective diffusion coefficient (m^2/s)
source
TASOPT.engine.cathode_j0Function
cathode_j0(T, p, Aeff_ratio)

This function calculates the exchange current density of a PEM with a platinum catalyst.

🔃 Inputs and Outputs

Inputs:

  • T::Float64: fuel cell temperature (K)
  • p::Float64: reactant partial pressure (Pa)
  • Aeff_ratio::Float64: ratio of catalyst surface area to geometric cross-sectional area

Outputs:

  • j0::Float64: exchange current density (A/m^2)
source
TASOPT.engine.RK4Function
RK4(dy_dx, x, y0, u, p)

This function uses a 4th-order Runge-Kutta method to integrate a vector ODE in space or time.

🔃 Inputs and Outputs

Inputs:

  • dy_dx::Function: function of the form dy_dx(x, y, u, p) for derivative
  • x::Vector{Float64}: vector with the spatial coordinates for integration
  • y0::Vector{Float64}: vector with the initial conditions
  • u::Struct: structure of type PEMFC_inputs with inputs
  • p::Struct: structure of type PEMFC_params with parameters

Outputs:

  • y::Matrix{Float64}: matrix with values of y for every point in x
  • yend::Vector{Float64}: vector with final conditions at x[end]
source
TASOPT.engine.solve_diffusion_ODEFunction
solve_diffusion_ODE(M, B, x0, d)

This function uses eigendecomposition to solve a problem of the form dx/dz = M * x + B

🔃 Inputs and Outputs

Inputs:

  • M::Matrix{Float64}: matrix with coefficients
  • B::Vector{Float64}: vector with right-hand parameters
  • x0::Vector{Float64}: vector with the boundary conditions
  • d::Float64: distance at which to evaluate x, z = d

Outputs:

  • x_end::Vector{Float64}: vector with values of x at z = d
source
diff --git a/dev/propulsion/gascalc/index.html b/dev/propulsion/gascalc/index.html index aa34ee8f..335e3ba8 100644 --- a/dev/propulsion/gascalc/index.html +++ b/dev/propulsion/gascalc/index.html @@ -1,18 +1,18 @@ Gas Calculations · TASOPT.jl

Gas Calculations

Gas calculations used with TASOPT.jl propulsion systems.

Ideal gas with variable $c_p$

TASOPT.engine.gas_tsetMethod
gas_tset(alpha, n, hspec, tguess)

Calculates temperature for a specified enthalpy. The constant-cp equivalent is

          t = (hspec - hf) /cp  
 
- where hf is the heat of formation included in h[t]
🔃 Inputs and Outputs

Input:

  • alpha(.): mass fractions for gas constituents i = 1..n
  • n: number of constituents present
  • hspec: specified enthalpy
  • tguess: first guess for temperature

Output:

  • t: temperature
source
TASOPT.engine.gas_tsetdMethod
gas_tsetd(alpha, n, hspec, tguess)

Same as gas_tset, but also returns derivative

🔃 Inputs and Outputs

Inputs:

  • alpha(.): mass fractions for gas constituents i = 1..n
  • n: number of constituents present
  • hspec: specified enthalpy
  • tguess: first guess for temperature

Outputs:

  • t: temperature
  • t_hspec: ?
  • t_al: ?
source
TASOPT.engine.gasfunFunction
gasfun(igas, t)

Computes properties of a thermally-perfect gas with some variable specific heat cp[T].

🔃 Inputs and Outputs

Input:

  • igas: index specifying the gas (see if blocks below for list)
  • t: temperature T in Kelvin

Output:

  • s: entropy-complement function s[T]
  • s_t: ds/dT
  • h: complete enthalpy function h[T]
  • h_t: dh/dT
  • cp: specific heat cp[T]
  • r: ideal-gas constant R

The adiabatic pressure change over a process 1->2 with some polytropic efficiency epol is:

$\ p2 = \ p1 exp [ epol (s2-s1)/R ]$ compression

$\ p2 = \ p1 exp [ (1/epol) (s2-s1)/R ]$ expansion

source
TASOPT.engine.gaschemMethod
gaschem(igas)

Returns number of C,H,O,N atoms in gas molecule, for the gases implemented in function gasfun above.

🔃 Inputs and Outputs

Input:

  • igas: index specifying the gas (see if blocks below for list)

Output:

  • nchon(.): number of C,H,O,N atoms in gas molecule
source
TASOPT.engine.gassumMethod
gassum(alpha, n, t)

Calculates all gas-mixture properties at specified temperature T, and mixing fractions alpha(.)

🔃 Inputs and Outputs

Inputs:

  • alpha(.): mass fractions for gas constituents i = 1..n
  • n: number of gas constituents
  • t: temperature T, Kelvin

Outputs:

  • s: entropy-complement function s[T]
  • s_t: ds/dT
  • h: complete enthalpy function h[T]
  • h_t: dh/dT
  • cp: specific heat cp[T]
  • r: ideal-gas constant R
source
TASOPT.engine.gassumdMethod
gassumd(alpha, n, t)

Same as gassum, but also returns cp_t

🔃 Inputs and Outputs

Inputs:

  • alpha(.): mass fractions for gas constituents i = 1..n
  • n: number of gas constituents
  • t: temperature T, Kelvin

Outputs:

  • s: entropy-complement function s[T]
  • s_t: ds/dT
  • h: complete enthalpy function h[T]
  • h_t: dh/dT
  • cp: specific heat cp[T]
  • r: ideal-gas constant R
  • cp_t: dcp / dT
source
TASOPT.engine.gas_pratMethod
gas_prat(alpha, n, po, to, ho, so, cpo, ro, pratio, epol)

Calculates state change for a specified pressure ratio. The constant-cp equivalent is the usual isentropic relations, but with epol included.

g = cp/(cp-r)
+ where hf is the heat of formation included in h[t]
🔃 Inputs and Outputs

Input:

  • alpha(.): mass fractions for gas constituents i = 1..n
  • n: number of constituents present
  • hspec: specified enthalpy
  • tguess: first guess for temperature

Output:

  • t: temperature
source
TASOPT.engine.gas_tsetdMethod
gas_tsetd(alpha, n, hspec, tguess)

Same as gas_tset, but also returns derivative

🔃 Inputs and Outputs

Inputs:

  • alpha(.): mass fractions for gas constituents i = 1..n
  • n: number of constituents present
  • hspec: specified enthalpy
  • tguess: first guess for temperature

Outputs:

  • t: temperature
  • t_hspec: ?
  • t_al: ?
source
TASOPT.engine.gasfunFunction
gasfun(igas, t)

Computes properties of a thermally-perfect gas with some variable specific heat cp[T].

🔃 Inputs and Outputs

Input:

  • igas: index specifying the gas (see if blocks below for list)
  • t: temperature T in Kelvin

Output:

  • s: entropy-complement function s[T]
  • s_t: ds/dT
  • h: complete enthalpy function h[T]
  • h_t: dh/dT
  • cp: specific heat cp[T]
  • r: ideal-gas constant R

The adiabatic pressure change over a process 1->2 with some polytropic efficiency epol is:

$\ p2 = \ p1 exp [ epol (s2-s1)/R ]$ compression

$\ p2 = \ p1 exp [ (1/epol) (s2-s1)/R ]$ expansion

source
TASOPT.engine.gaschemMethod
gaschem(igas)

Returns number of C,H,O,N atoms in gas molecule, for the gases implemented in function gasfun above.

🔃 Inputs and Outputs

Input:

  • igas: index specifying the gas (see if blocks below for list)

Output:

  • nchon(.): number of C,H,O,N atoms in gas molecule
source
TASOPT.engine.gassumMethod
gassum(alpha, n, t)

Calculates all gas-mixture properties at specified temperature T, and mixing fractions alpha(.)

🔃 Inputs and Outputs

Inputs:

  • alpha(.): mass fractions for gas constituents i = 1..n
  • n: number of gas constituents
  • t: temperature T, Kelvin

Outputs:

  • s: entropy-complement function s[T]
  • s_t: ds/dT
  • h: complete enthalpy function h[T]
  • h_t: dh/dT
  • cp: specific heat cp[T]
  • r: ideal-gas constant R
source
TASOPT.engine.gassumdMethod
gassumd(alpha, n, t)

Same as gassum, but also returns cp_t

🔃 Inputs and Outputs

Inputs:

  • alpha(.): mass fractions for gas constituents i = 1..n
  • n: number of gas constituents
  • t: temperature T, Kelvin

Outputs:

  • s: entropy-complement function s[T]
  • s_t: ds/dT
  • h: complete enthalpy function h[T]
  • h_t: dh/dT
  • cp: specific heat cp[T]
  • r: ideal-gas constant R
  • cp_t: dcp / dT
source
TASOPT.engine.gas_pratMethod
gas_prat(alpha, n, po, to, ho, so, cpo, ro, pratio, epol)

Calculates state change for a specified pressure ratio. The constant-cp equivalent is the usual isentropic relations, but with epol included.

g = cp/(cp-r)
 gexp = (g-1)/(g*epol)
 tau = pratio^gexp
 p = po * pratio
 t = to * tau
-(h-hf) = (ho-hf) * tau
🔃 Inputs and Outputs

Inputs:

  • alpha(.): mass fractions for gas constituents i = 1..n
  • n: number of gas constituents
  • po: starting pressure
  • to: starting temperature
  • ho: starting enthalpy
  • so: starting entropy-complement
  • cpo: starting specific heat
  • ro: starting gas constant
  • pratio: pressure ratio
  • epol: polytropic efficiency of change process , if compression
  • epol: 1/(polytropic efficiency of change process) , if expansion

Outputs:

  • p: ending pressure
  • t: ending temperature
  • h: ending enthalpy
  • s: ending entropy-complement
  • cp: ending specific heat
  • r: ending gas constant (this will be the same as starting ro)
source
TASOPT.engine.gas_pratdMethod
gas_pratd(alpha, n, po, to, ho, so, cpo, ro, pratio, epol)

Same as gas_prat, but also returns Jacobians w.r.t. po,to,pratio,epol

🔃 Inputs and Outputs

Inputs:

  • alpha(.): mass fractions for gas constituents i = 1..n
  • n: number of gas constituents
  • po: starting pressure
  • to: starting temperature
  • ho: starting enthalpy
  • so: starting entropy-complement
  • cpo: starting specific heat
  • ro: starting gas constant
  • pratio: pressure ratio
  • epol: polytropic efficiency of change process , if compression
  • epol: 1/(polytropic efficiency of change process) , if expansion

Outputs:

  • p: ending pressure
  • t: ending temperature
  • h: ending enthalpy
  • s: ending entropy-complement
  • cp: ending specific heat
  • r: ending gas constant (this will be the same as starting ro)
source
TASOPT.engine.gas_delhMethod
gas_delh(alpha, n, po, to, ho, so, cpo, ro, delh, epol)

Calculates state change for a specified enthalpy change. The constant-cp equivalent is the usual isentropic relations, but with epol included.

  t - to = delh/cp
+(h-hf) = (ho-hf) * tau
🔃 Inputs and Outputs

Inputs:

  • alpha(.): mass fractions for gas constituents i = 1..n
  • n: number of gas constituents
  • po: starting pressure
  • to: starting temperature
  • ho: starting enthalpy
  • so: starting entropy-complement
  • cpo: starting specific heat
  • ro: starting gas constant
  • pratio: pressure ratio
  • epol: polytropic efficiency of change process , if compression
  • epol: 1/(polytropic efficiency of change process) , if expansion

Outputs:

  • p: ending pressure
  • t: ending temperature
  • h: ending enthalpy
  • s: ending entropy-complement
  • cp: ending specific heat
  • r: ending gas constant (this will be the same as starting ro)
source
TASOPT.engine.gas_pratdMethod
gas_pratd(alpha, n, po, to, ho, so, cpo, ro, pratio, epol)

Same as gas_prat, but also returns Jacobians w.r.t. po,to,pratio,epol

🔃 Inputs and Outputs

Inputs:

  • alpha(.): mass fractions for gas constituents i = 1..n
  • n: number of gas constituents
  • po: starting pressure
  • to: starting temperature
  • ho: starting enthalpy
  • so: starting entropy-complement
  • cpo: starting specific heat
  • ro: starting gas constant
  • pratio: pressure ratio
  • epol: polytropic efficiency of change process , if compression
  • epol: 1/(polytropic efficiency of change process) , if expansion

Outputs:

  • p: ending pressure
  • t: ending temperature
  • h: ending enthalpy
  • s: ending entropy-complement
  • cp: ending specific heat
  • r: ending gas constant (this will be the same as starting ro)
source
TASOPT.engine.gas_delhMethod
gas_delh(alpha, n, po, to, ho, so, cpo, ro, delh, epol)

Calculates state change for a specified enthalpy change. The constant-cp equivalent is the usual isentropic relations, but with epol included.

  t - to = delh/cp
   g = cp/(cp-r)
   gexp = (g-1)/(g*epol)
   tau = t/to
   pi = tau^(1/gexp)
   p = po * pi
-  (h-hf) = (ho-hf) * tau
🔃 Inputs and Outputs

Inputs:

  • alpha(.): mass fractions for gas constituents i = 1..n
  • n: number of constituents present
  • po: starting pressure
  • to: starting temperature
  • ho: starting enthalpy
  • so: starting entropy-complement
  • cpo: starting specific heat
  • ro: starting gas constant
  • delh: enthalpy change
  • epol: polytropic efficiency of change process, if compression and 1/(polytropic efficiency of change process) , if expansion

Output:

  • p: ending pressure
  • t: ending temperature
  • h: ending enthalpy
  • s: ending entropy-complement
  • cp: ending specific heat
  • r: ending gas constant (this will be the same as starting ro)
source
TASOPT.engine.gas_delhdMethod
gas_delhd(alpha, n, po, to, ho, so, cpo, ro, delh, epol)

Same as gas_delh, but also returns Jacobians w.r.t. po,to,delh

🔃 Inputs and Outputs

Inputs:

  • alpha(.): mass fractions for gas constituents i = 1..n
  • n: number of constituents present
  • po: starting pressure
  • to: starting temperature
  • ho: starting enthalpy
  • so: starting entropy-complement
  • cpo: starting specific heat
  • ro: starting gas constant
  • delh: enthalpy change
  • epol: polytropic efficiency of change process, if compression and 1/(polytropic efficiency of change process) , if expansion

Output:

  • p: ending pressure
  • t: ending temperature
  • h: ending enthalpy
  • s: ending entropy-complement
  • cp: ending specific heat
  • r: ending gas constant (this will be the same as starting ro)
  • p_so:
  • p_po:
  • p_ep:
  • p_ho:
  • t_ho:
  • h_ho:
  • s_ho:
  • p_dh:
  • t_dh:
  • h_dh:
  • s_dh:
  • p_al:
  • t_al:
  • h_al:
  • s_al:
  • cp_al:
  • r_al:
source
TASOPT.engine.gas_burnMethod
gas_burn(alpha, beta, gamma, n, ifuel, to, tf, t)

Calculates fuel/air mass fraction in combustion with specified start and end temperatures to,t . Calculates mass fractions of post-combustion constituents

🔃 Inputs and Outputs

Input: alpha(.): mass fractions for air constituents i = 1..n

  • beta(.): mass fractions for fuel constituents i = 1..n
  • gamma(.): mass fraction changes of air constituents due to combustion
  • n: number of constituents present, air is 1..n-1, fuel is n
  • ifuel: index specifying fuel molecule
  • to: starting air temperatur
  • tf: starting fuel temperature
  • t: temperature of combustion products

Output: f: fuel/air mass fraction lambda(.): mass fractions for combustion product constituents

source
TASOPT.engine.gas_burndMethod
gas_burnd(alpha, beta, gamma, n, ifuel, to, tf, t)

Same as gas_burn, but also returns derivatives.

🔃 Inputs and Outputs

Input: alpha(.): mass fractions for air constituents i = 1..n

  • beta(.): mass fractions for fuel constituents i = 1..n
  • gamma(.): mass fraction changes of air constituents due to combustion
  • n: number of constituents present, air is 1..n-1, fuel is n
  • ifuel: index specifying fuel molecule
  • to: starting air temperatur
  • tf: starting fuel temperature
  • t: temperature of combustion products

Output: f: fuel/air mass fraction lambda(.): mass fractions for combustion product constituents f_t: l_to: l_tf: l_t:

source
TASOPT.engine.gas_machMethod
gas_mach(alpha, n, po, to, ho, so, cpo, ro, mo, m, epol)

Calculates state change for a specified Mach number change. The constant-cp equivalent is the usual isentropic relations, but with epol included.

g = cp/(cp-r)
+  (h-hf) = (ho-hf) * tau
🔃 Inputs and Outputs

Inputs:

  • alpha(.): mass fractions for gas constituents i = 1..n
  • n: number of constituents present
  • po: starting pressure
  • to: starting temperature
  • ho: starting enthalpy
  • so: starting entropy-complement
  • cpo: starting specific heat
  • ro: starting gas constant
  • delh: enthalpy change
  • epol: polytropic efficiency of change process, if compression and 1/(polytropic efficiency of change process) , if expansion

Output:

  • p: ending pressure
  • t: ending temperature
  • h: ending enthalpy
  • s: ending entropy-complement
  • cp: ending specific heat
  • r: ending gas constant (this will be the same as starting ro)
source
TASOPT.engine.gas_delhdMethod
gas_delhd(alpha, n, po, to, ho, so, cpo, ro, delh, epol)

Same as gas_delh, but also returns Jacobians w.r.t. po,to,delh

🔃 Inputs and Outputs

Inputs:

  • alpha(.): mass fractions for gas constituents i = 1..n
  • n: number of constituents present
  • po: starting pressure
  • to: starting temperature
  • ho: starting enthalpy
  • so: starting entropy-complement
  • cpo: starting specific heat
  • ro: starting gas constant
  • delh: enthalpy change
  • epol: polytropic efficiency of change process, if compression and 1/(polytropic efficiency of change process) , if expansion

Output:

  • p: ending pressure
  • t: ending temperature
  • h: ending enthalpy
  • s: ending entropy-complement
  • cp: ending specific heat
  • r: ending gas constant (this will be the same as starting ro)
  • p_so:
  • p_po:
  • p_ep:
  • p_ho:
  • t_ho:
  • h_ho:
  • s_ho:
  • p_dh:
  • t_dh:
  • h_dh:
  • s_dh:
  • p_al:
  • t_al:
  • h_al:
  • s_al:
  • cp_al:
  • r_al:
source
TASOPT.engine.gas_burnMethod
gas_burn(alpha, beta, gamma, n, ifuel, to, tf, t)

Calculates fuel/air mass fraction in combustion with specified start and end temperatures to,t . Calculates mass fractions of post-combustion constituents

🔃 Inputs and Outputs

Input: alpha(.): mass fractions for air constituents i = 1..n

  • beta(.): mass fractions for fuel constituents i = 1..n
  • gamma(.): mass fraction changes of air constituents due to combustion
  • n: number of constituents present, air is 1..n-1, fuel is n
  • ifuel: index specifying fuel molecule
  • to: starting air temperatur
  • tf: starting fuel temperature
  • t: temperature of combustion products

Output: f: fuel/air mass fraction lambda(.): mass fractions for combustion product constituents

source
TASOPT.engine.gas_burndMethod
gas_burnd(alpha, beta, gamma, n, ifuel, to, tf, t)

Same as gas_burn, but also returns derivatives.

🔃 Inputs and Outputs

Input: alpha(.): mass fractions for air constituents i = 1..n

  • beta(.): mass fractions for fuel constituents i = 1..n
  • gamma(.): mass fraction changes of air constituents due to combustion
  • n: number of constituents present, air is 1..n-1, fuel is n
  • ifuel: index specifying fuel molecule
  • to: starting air temperatur
  • tf: starting fuel temperature
  • t: temperature of combustion products

Output: f: fuel/air mass fraction lambda(.): mass fractions for combustion product constituents f_t: l_to: l_tf: l_t:

source
TASOPT.engine.gas_machMethod
gas_mach(alpha, n, po, to, ho, so, cpo, ro, mo, m, epol)

Calculates state change for a specified Mach number change. The constant-cp equivalent is the usual isentropic relations, but with epol included.

g = cp/(cp-r)
 gexp = (g-1)/(g*epol)
 tau = (1 + 0.5*(g-1)*mo^2) / (1 + 0.5*(g-1)*m^2)
 pi = tau^(1/gexp)
@@ -41,4 +41,4 @@
 `h`: ending enthalpy
 `s`: ending entropy-complement
 `cp`: ending specific heat
-`r`: ending gas constant (this will be the same as starting ro)
source
TASOPT.engine.gas_massMethod
gas_mass(alpha, n, po, to, ho, so, cpo, ro, mflux, Mguess)

Calculates state a specified mass flux. Mguess specifies the initial guess, and also selects either the subsonic or the supersonic branch.

🔃 Inputs and Outputs

Input: alpha(.) mass fractions for gas constituents i = 1..nn number of constituents present po total pressureto total temperature ho total enthalpyso total entropy-complement cpo total specific heatro total gas constant mflux specified mass flux = rho u = mdot/AMguess specifies the initial guess for the static quantities

Output: p static pressuret static temperature h static enthalpys static entropy-complement cp static specific heatr static gas constant (this will be the same as total ro)

source
TASOPT.engine.gasfuelMethod
gasfuel(ifuel, n)

Returns mass fraction of constituent changes as a result of combustion with atmospheric oxygen

🔃 Inputs and Outputs

Input:

  • `ifuel index of fuel (see function gasfun)
  • `n number of constituents in reaction

Output:

  • `gamma(.) mass fraction changes due to reaction for i = 1..n
source
TASOPT.engine.gasPrMethod
gasPr(gas, T)

This function calculates some gas thermodynamic properties of different species, including viscosity, thermal conductivity, specific heat, and Prandtl number.

🔃 Inputs and Outputs

Inputs:

  • gas::char: gas name
  • T::Float64: temperature (K)

Outputs:

  • R::Float64: gas constant (J/kg/K)
  • Pr::Float64: Prandtl number
  • γ::Float64: ratio of specific heats
  • cp::Float64: specific heat at constant pressure (J/kg/K)
  • μ::Float64: dynamic viscosity (Pa s)
  • k::Float64: thermal conductivity (W/m/K)
source
+`r`: ending gas constant (this will be the same as starting ro)source
TASOPT.engine.gas_machdMethod
gas_machd(alpha, n, po, to, ho, so, cpo, ro, mo, m, epol)

Same as gas_mach, but also returns derivatives

source
TASOPT.engine.gas_massMethod
gas_mass(alpha, n, po, to, ho, so, cpo, ro, mflux, Mguess)

Calculates state a specified mass flux. Mguess specifies the initial guess, and also selects either the subsonic or the supersonic branch.

🔃 Inputs and Outputs

Input: alpha(.) mass fractions for gas constituents i = 1..nn number of constituents present po total pressureto total temperature ho total enthalpyso total entropy-complement cpo total specific heatro total gas constant mflux specified mass flux = rho u = mdot/AMguess specifies the initial guess for the static quantities

Output: p static pressuret static temperature h static enthalpys static entropy-complement cp static specific heatr static gas constant (this will be the same as total ro)

source
TASOPT.engine.gasfuelMethod
gasfuel(ifuel, n)

Returns mass fraction of constituent changes as a result of combustion with atmospheric oxygen

🔃 Inputs and Outputs

Input:

  • `ifuel index of fuel (see function gasfun)
  • `n number of constituents in reaction

Output:

  • `gamma(.) mass fraction changes due to reaction for i = 1..n
source
TASOPT.engine.gasPrMethod
gasPr(gas, T)

This function calculates some gas thermodynamic properties of different species, including viscosity, thermal conductivity, specific heat, and Prandtl number.

🔃 Inputs and Outputs

Inputs:

  • gas::char: gas name
  • T::Float64: temperature (K)

Outputs:

  • R::Float64: gas constant (J/kg/K)
  • Pr::Float64: Prandtl number
  • γ::Float64: ratio of specific heats
  • cp::Float64: specific heat at constant pressure (J/kg/K)
  • μ::Float64: dynamic viscosity (Pa s)
  • k::Float64: thermal conductivity (W/m/K)
source
diff --git a/dev/propulsion/hxfun/index.html b/dev/propulsion/hxfun/index.html index 9bdd7c10..f585a222 100644 --- a/dev/propulsion/hxfun/index.html +++ b/dev/propulsion/hxfun/index.html @@ -1,2 +1,2 @@ -Heat exchangers · TASOPT.jl

Heat exchangers

Theory

📖 Theory - Tubular heat exchangers

Effectiveness–NTU method

There are many different heat exchanger (HX) topologies. The HX currently implemented in TASOPT consists of staggered tubes in a cross flow; this geometry was selected because it is simple to integrate into the space between two concentric cylinders. The HX is designed using the effectiveness–NTU method, described below [1].

Consider a heat exchanger in which a coolant gas is used to cool or heat gas. The minimum and maximum heat capacity rates are defined as

\[C_{\mathrm{min}} = \mathrm{min} (\dot{m}_c c_{p,c}, \dot{m}_p c_{p,p})\]

\[C_{\mathrm{max}} = \mathrm{max} (\dot{m}_c c_{p,c}, \dot{m}_p c_{p,p}),\]

where $\dot{m}$ is the mass flow rate, $c_p$ is the specific heat at constant pressure, and the subscripts $p$ and $c$ refer to the process-side and coolant streams. The capacity ratio is $C_r = \frac{C_{\mathrm{min}}}{C_{\mathrm{max}}}$.

A maximum heat transfer rate is defined as

\[\dot{Q}_{max} = C_{\mathrm{min}} (T_{i,p} - T_{i,c}),\]

where $T$ is the absolute temperature. A measure of the HX performance is the effectiveness, $\varepsilon$, defined as

\[\varepsilon = \frac{\dot{Q}}{\dot{Q}_{max}},\]

where $\dot{Q}$ is the actual heat transfer rate. The effectiveness can range between 0 and 1. A related quantity known as the number of transfer units (NTU) is defined as

\[\mathrm{NTU} = \frac{1}{C_{\mathrm{min}} R_o},\]

where $R_o$ is the overall thermal resistance. For any heat exchanger geometry, it can be shown that the effectiveness is a function of the NTU and the ratio $\frac{C_{\mathrm{min}}}{C_{\mathrm{max}}}$.

In the case of a cross flow heat exchanger, this functional relationship between $\varepsilon$ and NTU depends on whether there is internal mixing within the stream and on which stream has the minimum capacity rate. In a HX within a jet engine, it is reasonable to assume that the coolant stream has the minimum capacity rate as the fuel-air ratio is small. For tubular HX, the process stream is mixed but the coolant stream is unmixed as the tubes are independent. In this case, the relationship between $\varepsilon$ and NTU is[1]

\[\varepsilon = \frac{1}{C_{r}} [1 - \exp(-C_{r} (1 - \exp(-\mathrm{NTU})))],\]

or conversely

\[\mathrm{NTU} = -\ln\left(1 + \frac{\ln(1 - C_r\varepsilon)}{C_r}\right).\]

On the other hand, if the coolant stream has the maximum heat capacity rate, the effectiveness is given by

\[\varepsilon = 1 - \exp\left[-\frac{1}{C_{r}} (1 - \exp(-C_r \mathrm{NTU}))\right],\]

and the corresponding NTU is

\[\mathrm{NTU} = -\frac{1}{C_{r}} \ln\left[ 1 + C_r \ln(1 - \varepsilon)\right].\]

A notable property of these expressions is that there is a maximum effectiveness $\varepsilon_\mathrm{max} < 1$ as the NTU tends to infinity. In the code, there is a check to see if the desired effectiveness exceeds the maximum possible one, in which case there is no solution. The effectiveness is limited to 95% of $\varepsilon_\mathrm{max}$ to prevent a very large NTU.

Once the effectiveness is known, the outlet specific enthalpies can be computed using

\[h_{o,p} = h_{i,p} - \frac{\dot{Q}}{\dot{m}_p}\]

\[h_{o,c} = h_{i,c} + \frac{\dot{Q}}{\dot{m}_c},\]

where $h$ represents the specific enthalpy, and the outlet temperatures can be determined from these.

Recirculation

If the coolant is originally in liquid form, it needs to undergo a phase change at some point in the heat exchanger. For cryogenic liquids, such as hydrogen or methane, it is unadvisable to expose air to these cryogenic temperatures as it can result in freezing or liquefaction of some species in air. A possible approach to overcome this is to introduce recirculation in the heat exchanger: this increases the coolant mass flow rate and allows for a higher coolant temperature while still having the same heat transfer.

The way recirculation is currently modeled in TASOPT is via a virtual "mixing chamber", where the hot recirculating mass flow that comes of of the HX is mixed with the colder coolant (which may be liquid in general) and heats it up to a desired HX inlet temperature,$T_{i,c}$. Neglecting the kinetic energy in the fluids, conservation of energy requires that

\[\dot{m}_{c,\infty} (h_{c,\infty}-h_{lat}) + \dot{m}_{r} h_{o,c} = (\dot{m}_{c,\infty}+\dot{m}_{r})h_{i,c},\]

where $\dot{m}_r$ is the recirculating mass flow rate and $\dot{m}_{c,\infty}$ is the coolant mass flow rate before mixing with recirculation and, by mass conservation, the mass flow rate that leaves the system. The term $h_{lat}$ represents a latent heat and may account for vaporization or, in the case of hydrogen, the ortho- to parahydrogen conversion. The specific enthalpies into and out of the HX are related by

\[h_{o,c} = h_{i,c} + \frac{\dot{Q}}{\dot{m}_{c,\infty}+\dot{m}_{r}}.\]

As the heat transfer rate is given by $\dot{Q} = \varepsilon C_{\mathrm{min}} (T_{i,p} - T_{i,c})$, we can distinguish two cases depending on whether the coolant has the minimum or maximum heat capacity rate. If $C_{\mathrm{min}}=(\dot{m}_{c,\infty}+\dot{m}_{r}) c_{pi,c}$,

\[\dot{m}_r = \dot{m}_{c,\infty} \frac{h_{i,c} - h_{c,\infty} + h_{lat}}{\varepsilon c_{pi,c}(T_{i,p} - T_{i,c})},\]

and if $C_{\mathrm{max}}=(\dot{m}_{c,\infty}+\dot{m}_{r}) c_{pi,c}$,

\[\dot{m}_r = \dot{m}_{c,\infty}\frac{A}{1-A},\]

where

\[A = \dot{m}_{c,\infty}\frac{h_{i,c} -h_{c,\infty} + h_{lat}}{\varepsilon C_h (T_{i,p} - T_{i,c})}.\]

A failure case exists if $A\geq 1$: in this case, the hot stream does not have enough heat capacity to provide the heat needed to get the coolant to the desired $T_{i,c}$.

Heat exchanger geometry

HXfig

Two HX cross-sections are currently supported: rectangular and concentric cylinders (e.g., for a jet engine core). If the geometry is rectangular, the length of the tubes dictates the width of the rectangle, but if it is concentric, the tubes could have any length greater or equal to the distance between the cylinders as involute tubes could be used. The heat exchanger is assumed to have $N_\mathrm{stages}$ different serial stages, with each stage containing $N_\mathrm{passes}$ tube rows, each corresponding to a coolant pass. For example, the HX in the figure above with 2 stages and 3 coolant passes has a total of $N_L=N_\mathrm{stages}N_\mathrm{passes}=6$ tube rows. The number of tubes at every row is $N_t$; this parameter can be calculated from the mass flow rate through the cold side or from the geometry of the stage

\[N_t = \frac{4 \dot{m}_c}{\rho_{c,i}V_{c,i} \pi D_{t,i}^2 N_\mathrm{stages}} = \frac{b}{\frac{x_t}{D} D_{t,o}},\]

where $b$ is length across which the tubes are distributed. If the cross-section is concentric, $b=\pi D_{c,i}$ with $D_{c,i}$ being the inner cylinder diameter; if it is rectangular, $b = \frac{A_{cs}}{l}$. In this expressions, $A_{cs}=\frac{\dot{m}_p}{\rho_{p,i}V_{p,i}}$ is the freestream cross-sectional area. Since the tube inner diameter can be expressed as $D_{t,i} = D_{t,o} - 2t$, this equation can be solved for the tube outer diameter

\[D_{t,o} = \frac{4 K t + \sqrt{8 K t + 1} + 1}{2 K},\]

with $K = \frac{\pi b N_\mathrm{stages} \rho_{c,i}V_{c,i}}{4 \frac{x_t}{D} \dot{m}_c}$.

The total length of the HX is simply $L = N_L \frac{x_l}{D} D_{t,o}$.

Some calculations rely on knowing the tangential pitch between tubes. This pitch may vary in the radial direction as the circumference changes but the tube diameter remains unchaged. In addition to this, the tubes are generally involute, which makes calculating this pitch even more challenging. In the code, a mean tangential pitch $x_{t,m}$ is used to compute parameters such as the pressure drop and the Nusselt number. This mean pitch is calculated as

\[x_{t,m} = \frac{A_{cs}}{N_t l},\]

where $l$ is the length of each involute tube. The mass flow rate per unit area at the minimum free flow area is

\[G = \frac{\dot{m}_p}{A_{cs} - N_t l D_{t,o}}.\]

Note that for this expression to be valid, it is sufficient that $x_l/D\geq 1$. If the general geometry and total hot-side heat transfer area are known (e.g., from the NTU), but the number of coolant passes has not been determined yet, this can be calculated as

\[N_\mathrm{passes} = \frac{A_h}{N_t N_\mathrm{stages} \pi D_{t,o} l}.\]

Heat transfer coefficients

The above analysis relies on being able to determine the overall thermal resistance. In general, the thermal resistance has five components: hot- and cold-side gas resistances, wall resistance, and hot- and cold-side fouling resistances. The gas resistances are the aerodynamic resistances due to the thermal boundary layers, the wall resistance depends on the material conductivity and thickness, and the fouling resistances account for buildup of dirt layers during operation. The product of thermal resistance and heat transfer area (thermal insulance) is in practice easier to compute

\[R_o A_p = \frac{1}{h_p} + \frac{1}{h_c \frac{A_c}{A_p}} + \frac{t}{k_w} + R_{f,p}A_p + R_{f,c}A_c \frac{A_p}{A_c},\]

where $h$ is the the aerodynamic heat transfer coefficient, $A$ is the heat transfer area, $t$ is the wall thickness, $k$ is the thermal conductivity, $w$ denotes the wall, and $R_fA$ is the fouling factor. A list of design fouling factors can be found in [2] and [3].

The heat transfer coefficients depend on the gas temperature, which changes as heat is added to the flows. A mean gas temperature, taken as the average between the inlet and outlet temperatures, is used to calculate the gas properties,

\[T_{p,m} = \frac{T_{p,o} - T_{p,i}}{2}\]

\[T_{c,m} = \frac{T_{c,o} - T_{c,i}}{2}.\]

Coolant-side heat transfer coefficient

The flow inside the tubes can be modeled by assuming that it is fully-developed turbulent flow in a smooth pipe. In this case, the 1913 Blasisus correlation provides a method to calculate the skin-friction coefficient, $C_f$

\[C_f = \frac{\tau_w}{\frac{1}{2}\rho_{c,m} V_{c,m}^2} = 0.0791 \mathrm{Re}_{D,c}^{-1/4},\]

where $\tau_w$ is the wall shear stress, $\rho$ is the mass density, $V$ is the velocity and the cold-side diameter-based Reynolds number is defined as $\mathrm{Re}_{D,c}=\frac{V_{c,m}\rho_{c,m} D_{t,i}}{\mu_{c,m}}$, with $D_{t,i}$ being the tube inner diameter and $\mu$ being the viscosity.

When the skin-friction coefficient is known, the Colburn j-factor can be calculated using the Reynolds analogy

\[j = \mathrm{St} \mathrm{Pr}^{2/3} = \frac{C_f}{2},\]

where $\mathrm{St} = \frac{h}{\rho V c_p}$ is the Stanton number and $\mathrm{Pr} = \frac{c_p \mu}{k}$ is the Prandtl number. Once $j$ is determined, the heat transfer coefficient $h_c$ can be computed from the cold gas properties.

Process-side heat transfer coefficient

The flow past a set of staggered tubes is complex. Žkauskas[4] provides simplified correlations that can be used to model the heat transfer properties of these tubes. Generally, the Nusselt number can be expressed as

\[\mathrm{Nu} = C_1 C_2 \mathrm{Re}^m \mathrm{Pr}^n,\]

where the Rynolds number is defined as $\mathrm{Re}= \frac{G D_{t,o}}{\mu_{p,m}}$, $D_{t,o}$ is the tube outer diameter, and $G$ is the hot-side mass flow rate per unit area at the minimum free-flow area. Hence, this Reynolds number accounts for blockage effects due to the presence of the tubes.

The following table shows the value of the parameters $C_1$, $m$ and $n$ as a function of Reynolds number.

Re$C_1$$m$$n$
0–401.040.40.36
40–10000.710.50.36
1000–$2\times 10^5$ & $x_t/x_l<2$$0.35 (x_t / x_l) ^ {0.2}$0.60.36
1000–$2\times 10^5$ & $x_t/x_l\geq 2$0.40.60.36
$>2\times 10^5$$0.031 (x_t / x_l) ^ {0.2}$0.80.4

The paramters in the table can be affected by the distances $x_t$ and $x_l$, which are the distances between tubes in the tangential and longitudinal directions. Note that the distance $x_{t}$ used in the calculations is $x_{t,m}$ as the pitch varies in the radial direction. The ratios of this distances to the tube outer diameter, $\frac{x_t}{D}$ and $\frac{x_t}{D}$, are design parameters.

The parameter $C_2$ is a correction that accounts for the number of rows, $N_L$, and tends to 1 as the number of rows goes to infinity. It can be approximated as

\[C_2 = 1-\exp(-N_L^{1 / \sqrt{3}})\]

if $Re>1000$ and otherwise as

\[C_2 = 1-\exp(-\sqrt{3 N_L^{1 / \sqrt{2}}}).\]

Once the Nusselt number is known, the hot-side heat transfer coefficient can be computed as $h_p = \frac{\mathrm{Nu} k_p}{D_{t,o}}$.

Pressure drops

The pressure drop in the hot-side (across the staggered tube bank) can be estimated using the method of Gunter and Shaw[5]. The first necessary parameter is the volumetric hydraulic diameter, defined as

\[D_v = \frac{4(\mathrm{Net\,free\,volume})}{\mathrm{Friction\,surface}} = \frac{4 L \frac{\dot{m}_p}{V_{p,i}\rho_{p,i}}-N_t N_\mathrm{passes} N_\mathrm{stages} \pi D_{t,o}^2 l}{A_p}.\]

From this, the pressure drop across the process side can be computed as

\[\Delta p_p = \frac{G^2 L }{D_v \rho_{p,m}} \frac{f}{2} \left(\frac{D_v}{x_t}\right)^{0.4}\left(\frac{x_l}{x_t}\right)^{0.6},\]

where $\frac{f}{2}$ is a friction factor that can be related to the Reynolds number, $Re_{D_v} = \frac{G D_v}{\mu_{p,m}}$, as $\frac{f}{2}= 90 / Re_{D_v}$ for $Re_{D_v}<200$ and $\frac{f}{2}= 0.96 Re_{D_v}^{-0.145}$ otherwise. As in the heat transfer coefficient case, note that the distance $x_{t}$ used in the calculations is $x_{t,m}$ since the pitch varies in the radial direction.

The cold-side pressure drop can be calculated from the skin-friction coefficient, ignoring the minor losses due to flow turning at each pass,

\[\Delta p_c = \frac{4 \tau_w N_\mathrm{passes} \pi D_{t,i} l}{\pi D_{t,i}^2}= \frac{4 \tau_w N_\mathrm{passes} l}{D_{t,i}},\]

with $\tau_w = C_f \frac{1}{2}\rho_{c,m} V_{c,m}^2$.

Structures

TASOPT.engine.HX_gasType
HX_gas

Structure containing the gas properties of the process and coolant streams.

💾 Data fields

Inputs:

  • fluid_p::String: process fluid name
  • fluid_c::String: coolant fluid name
  • alpha_p::Vector{Float64}: process gas composition
  • igas_c::Float64: coolant gas index, if coolant is a gas
  • mdot_p::Float64: mass flow rate of process gas (kg/s)
  • mdot_c::Float64: mass flow rate of coolant gas (kg/s)
  • Tp_in::Float64: process gas inlet temperature (K)
  • Tc_in::Float64: coolant gas inlet temperature (K)
  • pp_in::Float64: process gas inlet pressure (Pa)
  • pc_in::Float64: coolant gas inlet pressure (Pa)
  • Mp_in::Float64: process gas inlet Mach number
  • Mc_in::Float64: coolant gas inlet Mach number
  • Tp_out::Float64: process gas outlet temperature
  • Tc_out::Float64: coolant gas outlet temperature
  • Δh_p::Float64: enthalpy change across HX (J/kg)
  • Δp_p::Float64: pressure drop of process gas across heat exchanger (Pa)
  • Δp_c::Float64: pressure drop of coolant gas across tubes (Pa)
  • Pl_p::Float64: power loss due to pressure drop in process stream (W)
  • Pl_c::Float64: power loss due to pressure drop in coolant stream (W)
  • ε::Float64: desired heat exchanger effectiveness
  • recircT::Float64: temperature of recirculating flow at HX inlet (K)
  • mdot_r::Float64: recirculating flow mass flow rate (kg/s)
  • h_lat::Float64: latent heat capacity in freestream coolant liquid (J/kg)
source
TASOPT.engine.HX_tubularType
HX_tubular

Structure containing the heat exchanger geometric and material properties.

💾 Data fields

Inputs:

  • fconc::Bool: flag for concentric geometry (1: concentric ; 0: rectangular)
  • frecirc::Bool: flag for recirculation (1: recirculation ; 0: no recirculation)
  • N_t::Float64: number of tubes per row
  • n_stages::Float64: number of different coolant stages with different coolant flows
  • n_passes::Float64: number of coolant passes
  • A_cs::Float64: process side freestream cross-sectional area (m^2)
  • l::Float64: length of tubes (m)
  • t::Float64: cooling tube wall thickness (m)
  • tD_o::Float64: tube outer diameter (m)
  • xt_D::Float64: circumferential pitch between tubes at the root over tube outer diameter
  • xl_D::Float64: longitudinal pitch between rows over tube outer diameter
  • Rfp::Float64: process-side fouling factor (m^2 K/W)
  • Rfc::Float64: coolant-side fouling factor (m^2 K/W)
  • kw::Float64: thermal conductivity of wall material (W/m/K)
  • ρw::Float64: mean density of HE (kg/m^3)
  • D_i::Float64: inner diameter of core (m)
source
TASOPT.engine.HX_structType
HX_struct

Structure containing all the heat exchanger geometry and operational information.

💾 Data fields

Inputs:

  • type::String: type of heat exchanger ("PreC": precooler; "InterC": intercooler; "Regen": regenerative; "TurbC": turbine cooling)
  • HXgeom::HX_tubular: structure containing the HX geometric information
  • HXgas_mission::Array{Any}: array containing the gas properties, of type HX_gas for each mission and segment
source

Functions

Heat exchanger sizing and off-design operations

TASOPT.engine.hxsize!Function
hxsize!(HXgas, HXgeom)

Sizes a crossflow heat exchanger and calculates the pressure drop. Uses the ε-NTU method to size the heat exchanger from a prescribed ε. For representative fouling factors see Standards of the Tubular Exchanger Manufacturers Association or https://powderprocess.net/Tools_html/Data_Diagrams/Heat_Exchanger_Fouling_Factor.html

🔃 Inputs and Outputs

Inputs:

  • HXgas::Struct: structure of type HX_gas with the gas properties
  • HXgeom::Struct: structure of type HX_tubular with the HX geometric properties

Outputs: No direct outputs. Input structures are modified with outlet gas properties and HX design geometry.

source
TASOPT.engine.hxoper!Function
hxoper!(HXgas, HXgeom)

Evaluates crossflow heat exchanger performance for off-design operation. Uses the ε-NTU method to calculate effectiveness from prescribed geometry.

🔃 Inputs and Outputs

Inputs:

  • HXgas::Struct: structure of type HX_gas with the gas properties
  • HXgeom::Struct: structure of type HX_tubular with the HX geometric properties

Outputs: No direct outputs. Input structures are modified with outlet gas properties.

source

Optimization

TASOPT.engine.hxoptim!Function
hxoptim!(HXgas, HXgeom, initial_x)

Optimizes heat exchanger design parameters for a given set of inputs. Uses the NLopt.jl package. The optimization variables are Mc_in, n_stages, xt_D and l. The length of initial_x is the flag to determine how many parameters to optimize: if it is 4, all parameters are optimized; if it is 3, the tube length l is assumed to be an input and is not optimized.

🔃 Inputs and Outputs

Inputs:

  • HXgas::Struct: structure of type HX_gas with the gas properties
  • HXgeom::Struct: structure of type HX_tubular with the HX geometric properties
  • initial_x::Vector{Float64}: vector with the initial guess for the optimization

Outputs: No direct outputs. Input structures are modified with HX design geometry.

source
TASOPT.engine.hxobjfFunction
  hxobjf(x, HXgas, HXgeom)

Objective function for HX optimization in hxoptim!(). It returns the sum of the power dissipated due to pressure drops in the process and coolant streams, with penalty factors to enforce constraints.

🔃 Inputs and Outputs

Inputs:

  • x::Vector{Float64}: state vector with [100 * Mc_in, l, n_stages, xt_D]
  • HXgas::Struct: structure of type HX_gas with the gas properties
  • HXgeom::Struct: structure of type HX_tubular with the HX geometric properties

Outputs:

  • Iobj::Float64: objective function (W)
source

Overall design and analysis

TASOPT.engine.hxdesign!Function
  hxdesign!(pare, pari, ipdes, HXs_prev)

Heat exchanger design and operation function. It calls hxoptim!() to optimize the heat exchanger at the design point and then evaluates performance for all missions and points with hxoper!().

🔃 Inputs and Outputs

Inputs:

  • pare::Array{Float64 , 3}: array with engine parameters
  • pari::Vector{Int}: vector with integer parameters
  • ipdes::Float64: index for design mission segment
  • HXs_prev::Vector{Any}: vector with heat exchanger data from the previous wsize iteration; elements are HX_struct structures

Outputs:

  • HeatExchangers::Vector{Any}: vector with heat exchanger data; elements are HX_struct structures
  • Also modifies pare with the fuel temperature and the HX enthalpy and pressure changes
source

Heating and pressure calculations

TASOPT.engine.jcalc_pipeFunction
jcalc_pipe(Re_D)

Calculates the Colburn j-factor and skin-friction coefficient for flow inside a circular pipe, assuming flow is fully developed and turbulent. Uses the 1913 Blasius correlation.

🔃 Inputs and Outputs

Inputs:

  • Re_D::Float64: Reynolds number based on pipe diameter

Outputs:

  • j::Float64: Colburn j-factor for heat calculations
  • Cf::Float64: skin-friction coefficient
source
TASOPT.engine.Nu_calc_staggered_cylFunction
Nu_calc_staggered_cyl(Re_D, Pr, N_L, xt_D, xl_D)

Calculates the Nusselt number for cross flow on a set of staggered circular cylinders. Based on the model in A. Žkauskas. Heat Transfer from Tubes in Crossflow. Advances in Heat Transfer v.18 (1987).

🔃 Inputs and Outputs

Inputs:

  • Re_D::Float64: Reynolds number based on cylinder diameter with velocity at minimum free flow area
  • Pr::Float64: Prandtl number
  • N_L::Float64: number of cylinder rows
  • n_stages::Float64: number of different coolant stages with different coolant flows
  • xt_D::Float64: circumferential pitch between tubes over tube outer diameter
  • xl_D::Float64: longitudinal pitch between rows over tube outer diameter

Outputs:

  • Nu::Float64: Nusselt number based on cylinder diameter
source
TASOPT.engine.Δp_calc_staggered_cylFunction
Δp_calc_staggered_cyl(Re, G, L, ρ, Dv, tD_o, xt_D, xl_D)

Calculates the pressure drop across a set of staggered cylinders in cross flow. Uses the method of Gunter and Shaw. A General Correlation of Friction Factors for Various Types of Surfaces in Crossflow. Journal of Fluids Engineering, 1945.

🔃 Inputs and Outputs

Inputs:

  • Re::Float64: Reynolds number based on hydraulic diameter and minimum free flow area: Re = Dv G /μ
  • G::Float64: mass flow rate divided by minimum free flow area. G = mdot / (A_min), A_min is the minimum free-flow area (kg/s/m^2)
  • L::Float64: axial channel length (m)
  • ρ::Float64: density (kg/m^3)
  • Dv::Float64: volumetric hydraulic diameter. Dv = 4 * (Net free volume) / (Friction surface)
  • tD_o::Float64: cylinder outer diameter (m)
  • xt_D::Float64: circumferential pitch between tubes over tube outer diameter
  • xl_D::Float64: longitudinal pitch between rows over tube outer diameter

Outputs:

  • Δp::Float64: pressure drop across staggered cylinders (Pa)
source

Weight estimation

TASOPT.engine.hxweightFunction
  hxweight(gee, HXgeom, fouter)

Calculates the weight of a heat exchanger with involute tubes.

🔃 Inputs and Outputs

Inputs:

  • gee::Float64: gravitational acceleration (m/s^2)
  • HXgeom::Struct: structure of type HX_tubular with the HX geometric and material properties
  • fouter::Float64: ratio of HX external mass to tube mass

Outputs:

  • W_hx::Float64: weight of heat exchanger (N)
source
  • 1Kays, W. M., & London, A. L. (1984). Compact heat exchangers.
  • 2Standards of the Tubular Exchanger Manufacturers Association
  • 3Powder Process
  • 4Žkauskas, A. (1987). Heat transfer from tubes in crossflow. In Advances in heat transfer (Vol. 18, pp. 87-159). Elsevier.
  • 5Gunter, A. Y., & Shaw, W. A. (1945). A general correlation of friction factors for various types of surfaces in crossflow. Transactions of the American Society of Mechanical Engineers, 67(8), 643-656.
+Heat exchangers · TASOPT.jl

Heat exchangers

Theory

📖 Theory - Tubular heat exchangers

Effectiveness–NTU method

There are many different heat exchanger (HX) topologies. The HX currently implemented in TASOPT consists of staggered tubes in a cross flow; this geometry was selected because it is simple to integrate into the space between two concentric cylinders. The HX is designed using the effectiveness–NTU method, described below [1].

Consider a heat exchanger in which a coolant gas is used to cool or heat gas. The minimum and maximum heat capacity rates are defined as

\[C_{\mathrm{min}} = \mathrm{min} (\dot{m}_c c_{p,c}, \dot{m}_p c_{p,p})\]

\[C_{\mathrm{max}} = \mathrm{max} (\dot{m}_c c_{p,c}, \dot{m}_p c_{p,p}),\]

where $\dot{m}$ is the mass flow rate, $c_p$ is the specific heat at constant pressure, and the subscripts $p$ and $c$ refer to the process-side and coolant streams. The capacity ratio is $C_r = \frac{C_{\mathrm{min}}}{C_{\mathrm{max}}}$.

A maximum heat transfer rate is defined as

\[\dot{Q}_{max} = C_{\mathrm{min}} (T_{i,p} - T_{i,c}),\]

where $T$ is the absolute temperature. A measure of the HX performance is the effectiveness, $\varepsilon$, defined as

\[\varepsilon = \frac{\dot{Q}}{\dot{Q}_{max}},\]

where $\dot{Q}$ is the actual heat transfer rate. The effectiveness can range between 0 and 1. A related quantity known as the number of transfer units (NTU) is defined as

\[\mathrm{NTU} = \frac{1}{C_{\mathrm{min}} R_o},\]

where $R_o$ is the overall thermal resistance. For any heat exchanger geometry, it can be shown that the effectiveness is a function of the NTU and the ratio $\frac{C_{\mathrm{min}}}{C_{\mathrm{max}}}$.

In the case of a cross flow heat exchanger, this functional relationship between $\varepsilon$ and NTU depends on whether there is internal mixing within the stream and on which stream has the minimum capacity rate. In a HX within a jet engine, it is reasonable to assume that the coolant stream has the minimum capacity rate as the fuel-air ratio is small. For tubular HX, the process stream is mixed but the coolant stream is unmixed as the tubes are independent. In this case, the relationship between $\varepsilon$ and NTU is[1]

\[\varepsilon = \frac{1}{C_{r}} [1 - \exp(-C_{r} (1 - \exp(-\mathrm{NTU})))],\]

or conversely

\[\mathrm{NTU} = -\ln\left(1 + \frac{\ln(1 - C_r\varepsilon)}{C_r}\right).\]

On the other hand, if the coolant stream has the maximum heat capacity rate, the effectiveness is given by

\[\varepsilon = 1 - \exp\left[-\frac{1}{C_{r}} (1 - \exp(-C_r \mathrm{NTU}))\right],\]

and the corresponding NTU is

\[\mathrm{NTU} = -\frac{1}{C_{r}} \ln\left[ 1 + C_r \ln(1 - \varepsilon)\right].\]

A notable property of these expressions is that there is a maximum effectiveness $\varepsilon_\mathrm{max} < 1$ as the NTU tends to infinity. In the code, there is a check to see if the desired effectiveness exceeds the maximum possible one, in which case there is no solution. The effectiveness is limited to 95% of $\varepsilon_\mathrm{max}$ to prevent a very large NTU.

Once the effectiveness is known, the outlet specific enthalpies can be computed using

\[h_{o,p} = h_{i,p} - \frac{\dot{Q}}{\dot{m}_p}\]

\[h_{o,c} = h_{i,c} + \frac{\dot{Q}}{\dot{m}_c},\]

where $h$ represents the specific enthalpy, and the outlet temperatures can be determined from these.

Recirculation

If the coolant is originally in liquid form, it needs to undergo a phase change at some point in the heat exchanger. For cryogenic liquids, such as hydrogen or methane, it is unadvisable to expose air to these cryogenic temperatures as it can result in freezing or liquefaction of some species in air. A possible approach to overcome this is to introduce recirculation in the heat exchanger: this increases the coolant mass flow rate and allows for a higher coolant temperature while still having the same heat transfer.

The way recirculation is currently modeled in TASOPT is via a virtual "mixing chamber", where the hot recirculating mass flow that comes of of the HX is mixed with the colder coolant (which may be liquid in general) and heats it up to a desired HX inlet temperature,$T_{i,c}$. Neglecting the kinetic energy in the fluids, conservation of energy requires that

\[\dot{m}_{c,\infty} (h_{c,\infty}-h_{lat}) + \dot{m}_{r} h_{o,c} = (\dot{m}_{c,\infty}+\dot{m}_{r})h_{i,c},\]

where $\dot{m}_r$ is the recirculating mass flow rate and $\dot{m}_{c,\infty}$ is the coolant mass flow rate before mixing with recirculation and, by mass conservation, the mass flow rate that leaves the system. The term $h_{lat}$ represents a latent heat and may account for vaporization or, in the case of hydrogen, the ortho- to parahydrogen conversion. The specific enthalpies into and out of the HX are related by

\[h_{o,c} = h_{i,c} + \frac{\dot{Q}}{\dot{m}_{c,\infty}+\dot{m}_{r}}.\]

As the heat transfer rate is given by $\dot{Q} = \varepsilon C_{\mathrm{min}} (T_{i,p} - T_{i,c})$, we can distinguish two cases depending on whether the coolant has the minimum or maximum heat capacity rate. If $C_{\mathrm{min}}=(\dot{m}_{c,\infty}+\dot{m}_{r}) c_{pi,c}$,

\[\dot{m}_r = \dot{m}_{c,\infty} \frac{h_{i,c} - h_{c,\infty} + h_{lat}}{\varepsilon c_{pi,c}(T_{i,p} - T_{i,c})},\]

and if $C_{\mathrm{max}}=(\dot{m}_{c,\infty}+\dot{m}_{r}) c_{pi,c}$,

\[\dot{m}_r = \dot{m}_{c,\infty}\frac{A}{1-A},\]

where

\[A = \dot{m}_{c,\infty}\frac{h_{i,c} -h_{c,\infty} + h_{lat}}{\varepsilon C_h (T_{i,p} - T_{i,c})}.\]

A failure case exists if $A\geq 1$: in this case, the hot stream does not have enough heat capacity to provide the heat needed to get the coolant to the desired $T_{i,c}$.

Heat exchanger geometry

HXfig

Two HX cross-sections are currently supported: rectangular and concentric cylinders (e.g., for a jet engine core). If the geometry is rectangular, the length of the tubes dictates the width of the rectangle, but if it is concentric, the tubes could have any length greater or equal to the distance between the cylinders as involute tubes could be used. The heat exchanger is assumed to have $N_\mathrm{stages}$ different serial stages, with each stage containing $N_\mathrm{passes}$ tube rows, each corresponding to a coolant pass. For example, the HX in the figure above with 2 stages and 3 coolant passes has a total of $N_L=N_\mathrm{stages}N_\mathrm{passes}=6$ tube rows. The number of tubes at every row is $N_t$; this parameter can be calculated from the mass flow rate through the cold side or from the geometry of the stage

\[N_t = \frac{4 \dot{m}_c}{\rho_{c,i}V_{c,i} \pi D_{t,i}^2 N_\mathrm{stages}} = \frac{b}{\frac{x_t}{D} D_{t,o}},\]

where $b$ is length across which the tubes are distributed. If the cross-section is concentric, $b=\pi D_{c,i}$ with $D_{c,i}$ being the inner cylinder diameter; if it is rectangular, $b = \frac{A_{cs}}{l}$. In this expressions, $A_{cs}=\frac{\dot{m}_p}{\rho_{p,i}V_{p,i}}$ is the freestream cross-sectional area. Since the tube inner diameter can be expressed as $D_{t,i} = D_{t,o} - 2t$, this equation can be solved for the tube outer diameter

\[D_{t,o} = \frac{4 K t + \sqrt{8 K t + 1} + 1}{2 K},\]

with $K = \frac{\pi b N_\mathrm{stages} \rho_{c,i}V_{c,i}}{4 \frac{x_t}{D} \dot{m}_c}$.

The total length of the HX is simply $L = N_L \frac{x_l}{D} D_{t,o}$.

Some calculations rely on knowing the tangential pitch between tubes. This pitch may vary in the radial direction as the circumference changes but the tube diameter remains unchaged. In addition to this, the tubes are generally involute, which makes calculating this pitch even more challenging. In the code, a mean tangential pitch $x_{t,m}$ is used to compute parameters such as the pressure drop and the Nusselt number. This mean pitch is calculated as

\[x_{t,m} = \frac{A_{cs}}{N_t l},\]

where $l$ is the length of each involute tube. The mass flow rate per unit area at the minimum free flow area is

\[G = \frac{\dot{m}_p}{A_{cs} - N_t l D_{t,o}}.\]

Note that for this expression to be valid, it is sufficient that $x_l/D\geq 1$. If the general geometry and total hot-side heat transfer area are known (e.g., from the NTU), but the number of coolant passes has not been determined yet, this can be calculated as

\[N_\mathrm{passes} = \frac{A_h}{N_t N_\mathrm{stages} \pi D_{t,o} l}.\]

Heat transfer coefficients

The above analysis relies on being able to determine the overall thermal resistance. In general, the thermal resistance has five components: hot- and cold-side gas resistances, wall resistance, and hot- and cold-side fouling resistances. The gas resistances are the aerodynamic resistances due to the thermal boundary layers, the wall resistance depends on the material conductivity and thickness, and the fouling resistances account for buildup of dirt layers during operation. The product of thermal resistance and heat transfer area (thermal insulance) is in practice easier to compute

\[R_o A_p = \frac{1}{h_p} + \frac{1}{h_c \frac{A_c}{A_p}} + \frac{t}{k_w} + R_{f,p}A_p + R_{f,c}A_c \frac{A_p}{A_c},\]

where $h$ is the the aerodynamic heat transfer coefficient, $A$ is the heat transfer area, $t$ is the wall thickness, $k$ is the thermal conductivity, $w$ denotes the wall, and $R_fA$ is the fouling factor. A list of design fouling factors can be found in [2] and [3].

The heat transfer coefficients depend on the gas temperature, which changes as heat is added to the flows. A mean gas temperature, taken as the average between the inlet and outlet temperatures, is used to calculate the gas properties,

\[T_{p,m} = \frac{T_{p,o} - T_{p,i}}{2}\]

\[T_{c,m} = \frac{T_{c,o} - T_{c,i}}{2}.\]

Coolant-side heat transfer coefficient

The flow inside the tubes can be modeled by assuming that it is fully-developed turbulent flow in a smooth pipe. In this case, the 1913 Blasisus correlation provides a method to calculate the skin-friction coefficient, $C_f$

\[C_f = \frac{\tau_w}{\frac{1}{2}\rho_{c,m} V_{c,m}^2} = 0.0791 \mathrm{Re}_{D,c}^{-1/4},\]

where $\tau_w$ is the wall shear stress, $\rho$ is the mass density, $V$ is the velocity and the cold-side diameter-based Reynolds number is defined as $\mathrm{Re}_{D,c}=\frac{V_{c,m}\rho_{c,m} D_{t,i}}{\mu_{c,m}}$, with $D_{t,i}$ being the tube inner diameter and $\mu$ being the viscosity.

When the skin-friction coefficient is known, the Colburn j-factor can be calculated using the Reynolds analogy

\[j = \mathrm{St} \mathrm{Pr}^{2/3} = \frac{C_f}{2},\]

where $\mathrm{St} = \frac{h}{\rho V c_p}$ is the Stanton number and $\mathrm{Pr} = \frac{c_p \mu}{k}$ is the Prandtl number. Once $j$ is determined, the heat transfer coefficient $h_c$ can be computed from the cold gas properties.

Process-side heat transfer coefficient

The flow past a set of staggered tubes is complex. Žkauskas[4] provides simplified correlations that can be used to model the heat transfer properties of these tubes. Generally, the Nusselt number can be expressed as

\[\mathrm{Nu} = C_1 C_2 \mathrm{Re}^m \mathrm{Pr}^n,\]

where the Rynolds number is defined as $\mathrm{Re}= \frac{G D_{t,o}}{\mu_{p,m}}$, $D_{t,o}$ is the tube outer diameter, and $G$ is the hot-side mass flow rate per unit area at the minimum free-flow area. Hence, this Reynolds number accounts for blockage effects due to the presence of the tubes.

The following table shows the value of the parameters $C_1$, $m$ and $n$ as a function of Reynolds number.

Re$C_1$$m$$n$
0–401.040.40.36
40–10000.710.50.36
1000–$2\times 10^5$ & $x_t/x_l<2$$0.35 (x_t / x_l) ^ {0.2}$0.60.36
1000–$2\times 10^5$ & $x_t/x_l\geq 2$0.40.60.36
$>2\times 10^5$$0.031 (x_t / x_l) ^ {0.2}$0.80.4

The paramters in the table can be affected by the distances $x_t$ and $x_l$, which are the distances between tubes in the tangential and longitudinal directions. Note that the distance $x_{t}$ used in the calculations is $x_{t,m}$ as the pitch varies in the radial direction. The ratios of this distances to the tube outer diameter, $\frac{x_t}{D}$ and $\frac{x_t}{D}$, are design parameters.

The parameter $C_2$ is a correction that accounts for the number of rows, $N_L$, and tends to 1 as the number of rows goes to infinity. It can be approximated as

\[C_2 = 1-\exp(-N_L^{1 / \sqrt{3}})\]

if $Re>1000$ and otherwise as

\[C_2 = 1-\exp(-\sqrt{3 N_L^{1 / \sqrt{2}}}).\]

Once the Nusselt number is known, the hot-side heat transfer coefficient can be computed as $h_p = \frac{\mathrm{Nu} k_p}{D_{t,o}}$.

Pressure drops

The pressure drop in the hot-side (across the staggered tube bank) can be estimated using the method of Gunter and Shaw[5]. The first necessary parameter is the volumetric hydraulic diameter, defined as

\[D_v = \frac{4(\mathrm{Net\,free\,volume})}{\mathrm{Friction\,surface}} = \frac{4 L \frac{\dot{m}_p}{V_{p,i}\rho_{p,i}}-N_t N_\mathrm{passes} N_\mathrm{stages} \pi D_{t,o}^2 l}{A_p}.\]

From this, the pressure drop across the process side can be computed as

\[\Delta p_p = \frac{G^2 L }{D_v \rho_{p,m}} \frac{f}{2} \left(\frac{D_v}{x_t}\right)^{0.4}\left(\frac{x_l}{x_t}\right)^{0.6},\]

where $\frac{f}{2}$ is a friction factor that can be related to the Reynolds number, $Re_{D_v} = \frac{G D_v}{\mu_{p,m}}$, as $\frac{f}{2}= 90 / Re_{D_v}$ for $Re_{D_v}<200$ and $\frac{f}{2}= 0.96 Re_{D_v}^{-0.145}$ otherwise. As in the heat transfer coefficient case, note that the distance $x_{t}$ used in the calculations is $x_{t,m}$ since the pitch varies in the radial direction.

The cold-side pressure drop can be calculated from the skin-friction coefficient, ignoring the minor losses due to flow turning at each pass,

\[\Delta p_c = \frac{4 \tau_w N_\mathrm{passes} \pi D_{t,i} l}{\pi D_{t,i}^2}= \frac{4 \tau_w N_\mathrm{passes} l}{D_{t,i}},\]

with $\tau_w = C_f \frac{1}{2}\rho_{c,m} V_{c,m}^2$.

Structures

TASOPT.engine.HX_gasType
HX_gas

Structure containing the gas properties of the process and coolant streams.

💾 Data fields

Inputs:

  • fluid_p::String: process fluid name
  • fluid_c::String: coolant fluid name
  • alpha_p::Vector{Float64}: process gas composition
  • igas_c::Float64: coolant gas index, if coolant is a gas
  • mdot_p::Float64: mass flow rate of process gas (kg/s)
  • mdot_c::Float64: mass flow rate of coolant gas (kg/s)
  • Tp_in::Float64: process gas inlet temperature (K)
  • Tc_in::Float64: coolant gas inlet temperature (K)
  • pp_in::Float64: process gas inlet pressure (Pa)
  • pc_in::Float64: coolant gas inlet pressure (Pa)
  • Mp_in::Float64: process gas inlet Mach number
  • Mc_in::Float64: coolant gas inlet Mach number
  • Tp_out::Float64: process gas outlet temperature
  • Tc_out::Float64: coolant gas outlet temperature
  • Δh_p::Float64: enthalpy change across HX (J/kg)
  • Δp_p::Float64: pressure drop of process gas across heat exchanger (Pa)
  • Δp_c::Float64: pressure drop of coolant gas across tubes (Pa)
  • Pl_p::Float64: power loss due to pressure drop in process stream (W)
  • Pl_c::Float64: power loss due to pressure drop in coolant stream (W)
  • ε::Float64: desired heat exchanger effectiveness
  • recircT::Float64: temperature of recirculating flow at HX inlet (K)
  • mdot_r::Float64: recirculating flow mass flow rate (kg/s)
  • h_lat::Float64: latent heat capacity in freestream coolant liquid (J/kg)
source
TASOPT.engine.HX_tubularType
HX_tubular

Structure containing the heat exchanger geometric and material properties.

💾 Data fields

Inputs:

  • fconc::Bool: flag for concentric geometry (1: concentric ; 0: rectangular)
  • frecirc::Bool: flag for recirculation (1: recirculation ; 0: no recirculation)
  • N_t::Float64: number of tubes per row
  • n_stages::Float64: number of different coolant stages with different coolant flows
  • n_passes::Float64: number of coolant passes
  • A_cs::Float64: process side freestream cross-sectional area (m^2)
  • l::Float64: length of tubes (m)
  • t::Float64: cooling tube wall thickness (m)
  • tD_o::Float64: tube outer diameter (m)
  • xt_D::Float64: circumferential pitch between tubes at the root over tube outer diameter
  • xl_D::Float64: longitudinal pitch between rows over tube outer diameter
  • Rfp::Float64: process-side fouling factor (m^2 K/W)
  • Rfc::Float64: coolant-side fouling factor (m^2 K/W)
  • kw::Float64: thermal conductivity of wall material (W/m/K)
  • ρw::Float64: mean density of HE (kg/m^3)
  • D_i::Float64: inner diameter of core (m)
source
TASOPT.engine.HX_structType
HX_struct

Structure containing all the heat exchanger geometry and operational information.

💾 Data fields

Inputs:

  • type::String: type of heat exchanger ("PreC": precooler; "InterC": intercooler; "Regen": regenerative; "TurbC": turbine cooling)
  • HXgeom::HX_tubular: structure containing the HX geometric information
  • HXgas_mission::Array{Any}: array containing the gas properties, of type HX_gas for each mission and segment
source

Functions

Heat exchanger sizing and off-design operations

TASOPT.engine.hxsize!Function
hxsize!(HXgas, HXgeom)

Sizes a crossflow heat exchanger and calculates the pressure drop. Uses the ε-NTU method to size the heat exchanger from a prescribed ε. For representative fouling factors see Standards of the Tubular Exchanger Manufacturers Association or https://powderprocess.net/Tools_html/Data_Diagrams/Heat_Exchanger_Fouling_Factor.html

🔃 Inputs and Outputs

Inputs:

  • HXgas::Struct: structure of type HX_gas with the gas properties
  • HXgeom::Struct: structure of type HX_tubular with the HX geometric properties

Outputs: No direct outputs. Input structures are modified with outlet gas properties and HX design geometry.

source
TASOPT.engine.hxoper!Function
hxoper!(HXgas, HXgeom)

Evaluates crossflow heat exchanger performance for off-design operation. Uses the ε-NTU method to calculate effectiveness from prescribed geometry.

🔃 Inputs and Outputs

Inputs:

  • HXgas::Struct: structure of type HX_gas with the gas properties
  • HXgeom::Struct: structure of type HX_tubular with the HX geometric properties

Outputs: No direct outputs. Input structures are modified with outlet gas properties.

source

Optimization

TASOPT.engine.hxoptim!Function
hxoptim!(HXgas, HXgeom, initial_x)

Optimizes heat exchanger design parameters for a given set of inputs. Uses the NLopt.jl package. The optimization variables are Mc_in, n_stages, xt_D and l. The length of initial_x is the flag to determine how many parameters to optimize: if it is 4, all parameters are optimized; if it is 3, the tube length l is assumed to be an input and is not optimized.

🔃 Inputs and Outputs

Inputs:

  • HXgas::Struct: structure of type HX_gas with the gas properties
  • HXgeom::Struct: structure of type HX_tubular with the HX geometric properties
  • initial_x::Vector{Float64}: vector with the initial guess for the optimization

Outputs: No direct outputs. Input structures are modified with HX design geometry.

source
TASOPT.engine.hxobjfFunction
  hxobjf(x, HXgas, HXgeom)

Objective function for HX optimization in hxoptim!(). It returns the sum of the power dissipated due to pressure drops in the process and coolant streams, with penalty factors to enforce constraints.

🔃 Inputs and Outputs

Inputs:

  • x::Vector{Float64}: state vector with [100 * Mc_in, l, n_stages, xt_D]
  • HXgas::Struct: structure of type HX_gas with the gas properties
  • HXgeom::Struct: structure of type HX_tubular with the HX geometric properties

Outputs:

  • Iobj::Float64: objective function (W)
source

Overall design and analysis

TASOPT.engine.hxdesign!Function
  hxdesign!(pare, pari, ipdes, HXs_prev)

Heat exchanger design and operation function. It calls hxoptim!() to optimize the heat exchanger at the design point and then evaluates performance for all missions and points with hxoper!().

🔃 Inputs and Outputs

Inputs:

  • pare::Array{Float64 , 3}: array with engine parameters
  • pari::Vector{Int}: vector with integer parameters
  • ipdes::Float64: index for design mission segment
  • HXs_prev::Vector{Any}: vector with heat exchanger data from the previous wsize iteration; elements are HX_struct structures

Outputs:

  • HeatExchangers::Vector{Any}: vector with heat exchanger data; elements are HX_struct structures
  • Also modifies pare with the fuel temperature and the HX enthalpy and pressure changes
source

Heating and pressure calculations

TASOPT.engine.jcalc_pipeFunction
jcalc_pipe(Re_D)

Calculates the Colburn j-factor and skin-friction coefficient for flow inside a circular pipe, assuming flow is fully developed and turbulent. Uses the 1913 Blasius correlation.

🔃 Inputs and Outputs

Inputs:

  • Re_D::Float64: Reynolds number based on pipe diameter

Outputs:

  • j::Float64: Colburn j-factor for heat calculations
  • Cf::Float64: skin-friction coefficient
source
TASOPT.engine.Nu_calc_staggered_cylFunction
Nu_calc_staggered_cyl(Re_D, Pr, N_L, xt_D, xl_D)

Calculates the Nusselt number for cross flow on a set of staggered circular cylinders. Based on the model in A. Žkauskas. Heat Transfer from Tubes in Crossflow. Advances in Heat Transfer v.18 (1987).

🔃 Inputs and Outputs

Inputs:

  • Re_D::Float64: Reynolds number based on cylinder diameter with velocity at minimum free flow area
  • Pr::Float64: Prandtl number
  • N_L::Float64: number of cylinder rows
  • n_stages::Float64: number of different coolant stages with different coolant flows
  • xt_D::Float64: circumferential pitch between tubes over tube outer diameter
  • xl_D::Float64: longitudinal pitch between rows over tube outer diameter

Outputs:

  • Nu::Float64: Nusselt number based on cylinder diameter
source
TASOPT.engine.Δp_calc_staggered_cylFunction
Δp_calc_staggered_cyl(Re, G, L, ρ, Dv, tD_o, xt_D, xl_D)

Calculates the pressure drop across a set of staggered cylinders in cross flow. Uses the method of Gunter and Shaw. A General Correlation of Friction Factors for Various Types of Surfaces in Crossflow. Journal of Fluids Engineering, 1945.

🔃 Inputs and Outputs

Inputs:

  • Re::Float64: Reynolds number based on hydraulic diameter and minimum free flow area: Re = Dv G /μ
  • G::Float64: mass flow rate divided by minimum free flow area. G = mdot / (A_min), A_min is the minimum free-flow area (kg/s/m^2)
  • L::Float64: axial channel length (m)
  • ρ::Float64: density (kg/m^3)
  • Dv::Float64: volumetric hydraulic diameter. Dv = 4 * (Net free volume) / (Friction surface)
  • tD_o::Float64: cylinder outer diameter (m)
  • xt_D::Float64: circumferential pitch between tubes over tube outer diameter
  • xl_D::Float64: longitudinal pitch between rows over tube outer diameter

Outputs:

  • Δp::Float64: pressure drop across staggered cylinders (Pa)
source

Weight estimation

TASOPT.engine.hxweightFunction
  hxweight(gee, HXgeom, fouter)

Calculates the weight of a heat exchanger with involute tubes.

🔃 Inputs and Outputs

Inputs:

  • gee::Float64: gravitational acceleration (m/s^2)
  • HXgeom::Struct: structure of type HX_tubular with the HX geometric and material properties
  • fouter::Float64: ratio of HX external mass to tube mass

Outputs:

  • W_hx::Float64: weight of heat exchanger (N)
source
  • 1Kays, W. M., & London, A. L. (1984). Compact heat exchangers.
  • 2Standards of the Tubular Exchanger Manufacturers Association
  • 3Powder Process
  • 4Žkauskas, A. (1987). Heat transfer from tubes in crossflow. In Advances in heat transfer (Vol. 18, pp. 87-159). Elsevier.
  • 5Gunter, A. Y., & Shaw, W. A. (1945). A general correlation of friction factors for various types of surfaces in crossflow. Transactions of the American Society of Mechanical Engineers, 67(8), 643-656.
diff --git a/dev/propulsion/propsys/index.html b/dev/propulsion/propsys/index.html index 019d0683..65315d63 100644 --- a/dev/propulsion/propsys/index.html +++ b/dev/propulsion/propsys/index.html @@ -1,5 +1,5 @@ -Propulsion system · TASOPT.jl

Propulsion system

A turbofan model is provided in TASOPT.jl

Turbofan model

TASOPT.engine.tfcalc!Function
tfcalc(pari,parg,para,pare, ip, icall,icool,initeng)

Calls function tfsize or tfoper for one operating point.

🔃 Inputs and Outputs

Input:

  • icall: 0 call on-design sizing routine tfsize 1 call off-design analysis routine tfoper, specified Tt4 2 call off-design analysis routine tfoper, specified Fe

  • icool: 0 use zero cooling mass flow ratio regardless 1 use specified cooling flow ratios epsrow(.), calculate Tmrow(.) 2 use specified metal temperatures Tmrow(.) , calculate epsrow(.)

  • initeng: 0 initialize variables for iteration in TFOPER 1 use current variables as initial guesses in TFOPER

source
TASOPT.engine.tfsize!Function
tfsize!(gee, M0, T0, p0, a0, M2, M25,
+Propulsion system · TASOPT.jl

Propulsion system

A turbofan model is provided in TASOPT.jl

Turbofan model

TASOPT.engine.tfcalc!Function
tfcalc(pari,parg,para,pare, ip, icall,icool,initeng)

Calls function tfsize or tfoper for one operating point.

🔃 Inputs and Outputs

Input:

  • icall: 0 call on-design sizing routine tfsize 1 call off-design analysis routine tfoper, specified Tt4 2 call off-design analysis routine tfoper, specified Fe

  • icool: 0 use zero cooling mass flow ratio regardless 1 use specified cooling flow ratios epsrow(.), calculate Tmrow(.) 2 use specified metal temperatures Tmrow(.) , calculate epsrow(.)

  • initeng: 0 initialize variables for iteration in TFOPER 1 use current variables as initial guesses in TFOPER

source
TASOPT.engine.tfsize!Function
tfsize!(gee, M0, T0, p0, a0, M2, M25,
   Feng, Phiinl, Kinl, iBLIc,
   BPR, pif, pilc, pihc,
   pid, pib, pifn, pitn,
@@ -15,8 +15,8 @@
   ncrowx, ncrow,
   epsrow, Tmrow, 
   Δh_PreC, Δh_InterC, Δh_Regen, Δh_TurbC,
-  Δp_PreC, Δp_InterC, Δp_Regen)

Turbofan performance and sizing routine.

Calculation procedure follows that of Kerrebrock, but the usual gas property formulas are replaced by function calls, which can therefore implement more general gas models. In addition, a turbine cooling model is added.

The gas routines reside in the following source files: gascalc.f Routines for various processes (compressor, turbine, combustor, etc) gasfun.f Routines for computing cp[T], h[t], sigma[T], R, called by the routines in gascalc.f

🔃 Inputs and Outputs

Inputs:

  • gee: gravity acceleration

  • M0: freestream Mach

  • T0: freestream temperature [K]

  • p0: freestream pressure [Pa]

  • M2: fan-face Mach number

  • M25: HPC-face Mach number

  • Feng: required net thrust (PKinl+PKout-Phi_jet)/u0 = sum( mdot u)

  • Phiinl: inlet ingested dissipation

  • iBLIc: 0=core in clear flow, 1=core sees Phiinl

  • BPR: bypass ratio = mdotfan/mdotcore

  • pif: fan pressure ratio ( = pt7 /pt2)

  • pilc: LP comp pressure ratio ( = pt25/pt2)

  • pihc: HP comp pressure ratio ( = pt3 /pt25)

  • pid: diffuser pressure ratio ( = pt2 /pt0)

  • pib: burner pressure ratio ( = pt4 /pt3)

  • pifn: fan nozzle pressure ratio ( = pt7/pt2.1)

  • pitn: turbine nozzle pressure ratio ( = pt5/pt4.9)

  • Ttf: fuel temperature entering combustor

  • ifuel: fuel index, see function gasfun (in gasfun.f)

  • etab: combustor efficiency (fraction of fuel burned)

  • epf0: fan max polytropic efficiency

  • eplc0: LPC max polytropic efficiency

  • ephc0: HPC max polytropic efficiency

  • epht0: HPT max polytropic efficiency

  • eplt0: LPT max polytropic efficiency

  • pifK: fan efficiency FPR offset: epolf = epf0 + epfK*(pif-pifK)

  • epfK: fan efficiency pif derivative

  • mofft: mass flow offtake at LPC discharge station 2.5

  • Pofft: low spool power offtake

  • Tt9: offtake air discharge total temperature

  • pt9: offtake air discharge total pressure

  • epsl: low spool power loss fraction

  • epsh: high spool power loss fraction

  • `icool turbine cooling flag 0 = no cooling, ignore all cooling parameters below 1 = usual cooling, using passed-in fcool 2 = usual cooling, but set (and return) fcool from Tmetal

  • Mtexit: turbine blade-row exit Mach, for setting temperature drops

  • dTstrk: hot-streak temperature delta {K}, used only if icool=2

  • StA: area-weighted Stanton number , used only if icool=2

  • M4a: effective Mach at cooling-flow outlet (start of mixing)

  • ruc: cooling-flow outlet velocity ratio, u/ue

  • ncrowx: dimension of epsrow array

  • ncrow: number of blade rows requiring cooling

  • epsrow(.): input specified cooling-flow bypass ratio if icool=1 output resulting cooling-flow bypass ratio if icool=2

  • Tmrow(.): input specified metal temperature [K] if icool=2 output resulting metal temperature [K] if icool=1

    Outputs:

  • epsrow(.): see above

  • Tmrow(.): see above

  • TSFC: thrust specific fuel consumption = mdot_fuel g / F [1/s]

  • Fsp: specific thrust = F / (mdot u0) = F / ((1+BPR) mdot_core u0)

  • hfuel: fuel heating value [J / kg K]

  • ff: fuel mass flow fraction = mdotfuel / mdotcore

  • mcore: core mass flow = mdot_core [kg/s]

  • A2: fan-face area [m^2]

  • A25: HPC-face area [m^2]

  • A5: core nozzle area [m^2]

  • A7: fan nozzle area [m^2]

  • A6: core plume area [m^2]

  • A8: fan plume area [m^2]

  • Tt?: total temperature

  • ht?: total complete enthalpy (includes heat of formation)

  • pt?: total pressure

  • cpt?: specific heat at stagnation temperature (= dh/dT)

  • Rt?: gas constant at stagnation conditions

  • T?: static temperature

  • u?: velocity

  • epf: fan polytropic efficiency

  • eplc: LPC polytropic efficiency

  • ephc: HPC polytropic efficiency

  • epht: HPT polytropic efficiency

  • eplt: LPT polytropic efficiency

  • etaf: fan overall efficiency

  • etalc: LPC overall efficiency

  • etahc: HPC overall efficiency

  • etaht: HPT overall efficiency

  • etalt: LPT overall efficiency

  • Lconv: T if convergence was successful, F otherwise

The "?" symbol denotes the station index: 0 freestream 18 fan face outside of casing BLs 19 fan face over LPC portion 2 fan face over fan portion 21 fan exit 25 LPC exit, HPC inlet 3 compressor exit 4 combustor exit before cooling air addition 41 turbine inlet after cooling air addition 45 HPT exit, LPT inlet 49 LPT exit 5 core nozzle 6 core flow downstream 7 fan nozzle 8 fan flow downstream

source
TASOPT.engine.tfweightFunction
  tfweight(iengwgt, Gearf, OPR, BPR, mdotc, dfan, rSnace,
-  dlcomp, neng, feadd, fpylon)

Engine weight estimation function using Giulia Pantalone, Drela, or Fitzgerald model.

🔃 Inputs and Outputs

Input:

  • iengwgt: Engine model index, Drela=0, Fitzgerald=1, and Pantalone>=3,
  • OPR: Overall pressure ratio.
  • BPR: By-pass ratio.
  • mdotc: Engine core mass flow rate.
  • dfan: Fan diameter.
  • rSnace:
  • dlcomp:
  • neng: Number of engines.
  • feadd: Fuel system weight ratio.
  • fpylon: Pylon weight fraction.

Output:

  • Weng: Total engine weight.
  • Wnac: Nacelle weight.
  • Webare: Bare engine weight.
  • Snace1: Nacelle area.
source

Turbofan Maps

TASOPT.engine.NcmapMethod
Ncmap(pratio, mb, piD, mbD, NbD, Cmap)

Calculates compressor or fan corrected speed as a function of pressure ratio and corrected mass flow

🔃 Inputs and Outputs

Inputs:

  • pratio: pressure ratio
  • mb: corrected mass flow
  • piD: design pressure ratio
  • mbD: design corrected mass flow
  • NbD: design corrected speed
  • Cmap(.): map constants

Outputs:

  • Nb: wheel speed
  • Nb_?: derivatives
source
TASOPT.engine.ecmapMethod
ecmap(pratio, mb, piD, mbD, Cmap, effo, piK, effK)

Calculates compressor or fan efficiency as a function of pressure ratio and corrected mass flow

🔃 Inputs and Outputs

Inputs:

  • pratio: pressure ratio
  • mb: corrected mass flow
  • piD: design pressure ratio
  • mbD: design corrected mass flow
  • Cmap(.): map constants
  • effo: maximum efficiency
  • piK: pi-dependence offset eff = effo + effK*(pi-piK)
  • effK: pi-dependence slope

Outputs:

  • eff: efficiency
  • eff_?: derivatives
source
TASOPT.engine.Ncmap1Method
Ncmap1(pratio, m, piD, mbD, NbD, ABCDm, iabcd, Tr, pr)

Calculates compressor or fan efficiency as a function of pressure ratio and corrected mass flow

🔃 Inputs and Outputs

Inputs:

  • pratio: pressure ratio
  • mb: corrected mass flow
  • piD: design pressure ratio
  • mbD: design corrected mass flow
  • NbD: design corrected speed
  • ABCDm: map constants
  • iabcd: map exponents
  • Tr: T/Tref
  • pr: p/pref

Outputs:

  • N: wheel speed
  • N_?: derivatives
source
TASOPT.engine.ecmap1Method
ecmap1(pratio, m, piD, mbD, ABCDm, iabcd, effo, Tr, pr)

Calculates compressor or fan efficiency as a function of pressure ratio and mass flow

🔃 Inputs and Outputs

Inputs:

  • pratio: pressure ratio
  • mb: corrected mass flow
  • piD: design pressure ratio
  • mbD: design corrected mass flow
  • ABCDm: map constants
  • iabcd: map exponents
  • effo: maximum efficiency
  • Tr: T/Tref
  • pr: p/pref

Outputs:

  • eff: efficiency
  • eff_?: derivatives
source
TASOPT.engine.etmapMethod
etmap(dh, mb, Nb, piD, mbD, NbD, ept0, Tmap, Tt, cpt, Rt)

Calculates turbine efficiency as a function of work and corrected mass flow

🔃 Inputs and Outputs

Inputs:

  • dh: enthalpy change
  • mb: corrected mass flow
  • Nb: corrected speed
  • piD: design pressure ratio
  • mbD: design corrected mass flow
  • NbD: design corrected speed
  • ept0: turbine polytropic efficiency estimate
  • Tmap(.): map constants

Outputs:

  • eff: efficiency
  • eff_?: derivatives
source
TASOPT.engine.PimapMethod
Pimap(mb, Nb, piD, mbD, NbD, Cmap)

Calculates compressor or fan pressure ratio as a function of pressure ratio and corrected mass flow

🔃 Inputs and Outputs

Inputs:

  • mb: corrected mass flow
  • Nb: corrected speed
  • piD: design pressure ratio
  • mbD: design corrected mass flow
  • NbD: design corrected speed
  • Cmap(.): map constants

Outputs:

  • pratio: pressure ratio
  • pi_?: derivatives
source
TASOPT.engine.tfoper!Function

function tfoper!(gee, M0, T0, p0, a0, Tref, pref, Phiinl, Kinl, iBLIc, pid, pib, pifn, pitn, Gearf, pifD, pilcD, pihcD, pihtD, piltD, mbfD, mblcD, mbhcD, mbhtD, mbltD, NbfD, NblcD, NbhcD, NbhtD, NbltD, A2, A25, A5, A7, iTFspec, Ttf, ifuel, etab, epf0, eplc0, ephc0, epht0, eplt0, pifK, epfK, mofft, Pofft, Tt9, pt9, epsl, epsh, icool, Mtexit, dTstrk, StA, efilm, tfilm, M4a, ruc, ncrowx, ncrow, epsrow, Tmrow, Feng, M2, pif, pilc, pihc, mbf, mblc, mbhc, Tt4, pt5, mcore, M25)

Turbofan operation routine

Calculation procedure follows that of Kerrebrock,
+  Δp_PreC, Δp_InterC, Δp_Regen)

Turbofan performance and sizing routine.

Calculation procedure follows that of Kerrebrock, but the usual gas property formulas are replaced by function calls, which can therefore implement more general gas models. In addition, a turbine cooling model is added.

The gas routines reside in the following source files: gascalc.f Routines for various processes (compressor, turbine, combustor, etc) gasfun.f Routines for computing cp[T], h[t], sigma[T], R, called by the routines in gascalc.f

🔃 Inputs and Outputs

Inputs:

  • gee: gravity acceleration

  • M0: freestream Mach

  • T0: freestream temperature [K]

  • p0: freestream pressure [Pa]

  • M2: fan-face Mach number

  • M25: HPC-face Mach number

  • Feng: required net thrust (PKinl+PKout-Phi_jet)/u0 = sum( mdot u)

  • Phiinl: inlet ingested dissipation

  • iBLIc: 0=core in clear flow, 1=core sees Phiinl

  • BPR: bypass ratio = mdotfan/mdotcore

  • pif: fan pressure ratio ( = pt7 /pt2)

  • pilc: LP comp pressure ratio ( = pt25/pt2)

  • pihc: HP comp pressure ratio ( = pt3 /pt25)

  • pid: diffuser pressure ratio ( = pt2 /pt0)

  • pib: burner pressure ratio ( = pt4 /pt3)

  • pifn: fan nozzle pressure ratio ( = pt7/pt2.1)

  • pitn: turbine nozzle pressure ratio ( = pt5/pt4.9)

  • Ttf: fuel temperature entering combustor

  • ifuel: fuel index, see function gasfun (in gasfun.f)

  • etab: combustor efficiency (fraction of fuel burned)

  • epf0: fan max polytropic efficiency

  • eplc0: LPC max polytropic efficiency

  • ephc0: HPC max polytropic efficiency

  • epht0: HPT max polytropic efficiency

  • eplt0: LPT max polytropic efficiency

  • pifK: fan efficiency FPR offset: epolf = epf0 + epfK*(pif-pifK)

  • epfK: fan efficiency pif derivative

  • mofft: mass flow offtake at LPC discharge station 2.5

  • Pofft: low spool power offtake

  • Tt9: offtake air discharge total temperature

  • pt9: offtake air discharge total pressure

  • epsl: low spool power loss fraction

  • epsh: high spool power loss fraction

  • `icool turbine cooling flag 0 = no cooling, ignore all cooling parameters below 1 = usual cooling, using passed-in fcool 2 = usual cooling, but set (and return) fcool from Tmetal

  • Mtexit: turbine blade-row exit Mach, for setting temperature drops

  • dTstrk: hot-streak temperature delta {K}, used only if icool=2

  • StA: area-weighted Stanton number , used only if icool=2

  • M4a: effective Mach at cooling-flow outlet (start of mixing)

  • ruc: cooling-flow outlet velocity ratio, u/ue

  • ncrowx: dimension of epsrow array

  • ncrow: number of blade rows requiring cooling

  • epsrow(.): input specified cooling-flow bypass ratio if icool=1 output resulting cooling-flow bypass ratio if icool=2

  • Tmrow(.): input specified metal temperature [K] if icool=2 output resulting metal temperature [K] if icool=1

    Outputs:

  • epsrow(.): see above

  • Tmrow(.): see above

  • TSFC: thrust specific fuel consumption = mdot_fuel g / F [1/s]

  • Fsp: specific thrust = F / (mdot u0) = F / ((1+BPR) mdot_core u0)

  • hfuel: fuel heating value [J / kg K]

  • ff: fuel mass flow fraction = mdotfuel / mdotcore

  • mcore: core mass flow = mdot_core [kg/s]

  • A2: fan-face area [m^2]

  • A25: HPC-face area [m^2]

  • A5: core nozzle area [m^2]

  • A7: fan nozzle area [m^2]

  • A6: core plume area [m^2]

  • A8: fan plume area [m^2]

  • Tt?: total temperature

  • ht?: total complete enthalpy (includes heat of formation)

  • pt?: total pressure

  • cpt?: specific heat at stagnation temperature (= dh/dT)

  • Rt?: gas constant at stagnation conditions

  • T?: static temperature

  • u?: velocity

  • epf: fan polytropic efficiency

  • eplc: LPC polytropic efficiency

  • ephc: HPC polytropic efficiency

  • epht: HPT polytropic efficiency

  • eplt: LPT polytropic efficiency

  • etaf: fan overall efficiency

  • etalc: LPC overall efficiency

  • etahc: HPC overall efficiency

  • etaht: HPT overall efficiency

  • etalt: LPT overall efficiency

  • Lconv: T if convergence was successful, F otherwise

The "?" symbol denotes the station index: 0 freestream 18 fan face outside of casing BLs 19 fan face over LPC portion 2 fan face over fan portion 21 fan exit 25 LPC exit, HPC inlet 3 compressor exit 4 combustor exit before cooling air addition 41 turbine inlet after cooling air addition 45 HPT exit, LPT inlet 49 LPT exit 5 core nozzle 6 core flow downstream 7 fan nozzle 8 fan flow downstream

source
TASOPT.engine.tfweightFunction
  tfweight(iengwgt, Gearf, OPR, BPR, mdotc, dfan, rSnace,
+  dlcomp, neng, feadd, fpylon)

Engine weight estimation function using Giulia Pantalone, Drela, or Fitzgerald model.

🔃 Inputs and Outputs

Input:

  • iengwgt: Engine model index, Drela=0, Fitzgerald=1, and Pantalone>=3,
  • OPR: Overall pressure ratio.
  • BPR: By-pass ratio.
  • mdotc: Engine core mass flow rate.
  • dfan: Fan diameter.
  • rSnace:
  • dlcomp:
  • neng: Number of engines.
  • feadd: Fuel system weight ratio.
  • fpylon: Pylon weight fraction.

Output:

  • Weng: Total engine weight.
  • Wnac: Nacelle weight.
  • Webare: Bare engine weight.
  • Snace1: Nacelle area.
source

Turbofan Maps

TASOPT.engine.NcmapMethod
Ncmap(pratio, mb, piD, mbD, NbD, Cmap)

Calculates compressor or fan corrected speed as a function of pressure ratio and corrected mass flow

🔃 Inputs and Outputs

Inputs:

  • pratio: pressure ratio
  • mb: corrected mass flow
  • piD: design pressure ratio
  • mbD: design corrected mass flow
  • NbD: design corrected speed
  • Cmap(.): map constants

Outputs:

  • Nb: wheel speed
  • Nb_?: derivatives
source
TASOPT.engine.ecmapMethod
ecmap(pratio, mb, piD, mbD, Cmap, effo, piK, effK)

Calculates compressor or fan efficiency as a function of pressure ratio and corrected mass flow

🔃 Inputs and Outputs

Inputs:

  • pratio: pressure ratio
  • mb: corrected mass flow
  • piD: design pressure ratio
  • mbD: design corrected mass flow
  • Cmap(.): map constants
  • effo: maximum efficiency
  • piK: pi-dependence offset eff = effo + effK*(pi-piK)
  • effK: pi-dependence slope

Outputs:

  • eff: efficiency
  • eff_?: derivatives
source
TASOPT.engine.Ncmap1Method
Ncmap1(pratio, m, piD, mbD, NbD, ABCDm, iabcd, Tr, pr)

Calculates compressor or fan efficiency as a function of pressure ratio and corrected mass flow

🔃 Inputs and Outputs

Inputs:

  • pratio: pressure ratio
  • mb: corrected mass flow
  • piD: design pressure ratio
  • mbD: design corrected mass flow
  • NbD: design corrected speed
  • ABCDm: map constants
  • iabcd: map exponents
  • Tr: T/Tref
  • pr: p/pref

Outputs:

  • N: wheel speed
  • N_?: derivatives
source
TASOPT.engine.ecmap1Method
ecmap1(pratio, m, piD, mbD, ABCDm, iabcd, effo, Tr, pr)

Calculates compressor or fan efficiency as a function of pressure ratio and mass flow

🔃 Inputs and Outputs

Inputs:

  • pratio: pressure ratio
  • mb: corrected mass flow
  • piD: design pressure ratio
  • mbD: design corrected mass flow
  • ABCDm: map constants
  • iabcd: map exponents
  • effo: maximum efficiency
  • Tr: T/Tref
  • pr: p/pref

Outputs:

  • eff: efficiency
  • eff_?: derivatives
source
TASOPT.engine.etmapMethod
etmap(dh, mb, Nb, piD, mbD, NbD, ept0, Tmap, Tt, cpt, Rt)

Calculates turbine efficiency as a function of work and corrected mass flow

🔃 Inputs and Outputs

Inputs:

  • dh: enthalpy change
  • mb: corrected mass flow
  • Nb: corrected speed
  • piD: design pressure ratio
  • mbD: design corrected mass flow
  • NbD: design corrected speed
  • ept0: turbine polytropic efficiency estimate
  • Tmap(.): map constants

Outputs:

  • eff: efficiency
  • eff_?: derivatives
source
TASOPT.engine.PimapMethod
Pimap(mb, Nb, piD, mbD, NbD, Cmap)

Calculates compressor or fan pressure ratio as a function of pressure ratio and corrected mass flow

🔃 Inputs and Outputs

Inputs:

  • mb: corrected mass flow
  • Nb: corrected speed
  • piD: design pressure ratio
  • mbD: design corrected mass flow
  • NbD: design corrected speed
  • Cmap(.): map constants

Outputs:

  • pratio: pressure ratio
  • pi_?: derivatives
source
TASOPT.engine.tfoper!Function

function tfoper!(gee, M0, T0, p0, a0, Tref, pref, Phiinl, Kinl, iBLIc, pid, pib, pifn, pitn, Gearf, pifD, pilcD, pihcD, pihtD, piltD, mbfD, mblcD, mbhcD, mbhtD, mbltD, NbfD, NblcD, NbhcD, NbhtD, NbltD, A2, A25, A5, A7, iTFspec, Ttf, ifuel, etab, epf0, eplc0, ephc0, epht0, eplt0, pifK, epfK, mofft, Pofft, Tt9, pt9, epsl, epsh, icool, Mtexit, dTstrk, StA, efilm, tfilm, M4a, ruc, ncrowx, ncrow, epsrow, Tmrow, Feng, M2, pif, pilc, pihc, mbf, mblc, mbhc, Tt4, pt5, mcore, M25)

Turbofan operation routine

Calculation procedure follows that of Kerrebrock,
 but the usual gas property formulas are replaced
 by function calls, which can therefore implement
 more general gas models.  
@@ -26,4 +26,4 @@
  gascalc.f  Routines for various processes 
             (compressor, turbine, combustor, etc)
  gasfun.f   Routines for computing cp[T], h[t], sigma[T], R,
-            called by the routines in gascalc.f
🔃 Inputs and Outputs

Inputs:

  • gee: gravity acceleration

  • M0: freestream Mach

  • T0: freestream temperature [K]

  • p0: freestream pressure [Pa]

  • Tref: reference temperature for corrected mass flow and speed

  • pref: reference pressure for corrected mass flow

  • Phiinl: inlet ingested dissipation Phi_inl

  • iBLIc: 0=core in clear flow, 1=core sees Phiinl

  • pid: diffuser pressure ratio ( = pt2/pt0)

  • pib: burner pressure ratio ( = pt4/pt3)

  • pifn: fan nozzle pressure ratio ( = pt7/pt6.9)

  • pitn: turbine nozzle pressure ratio ( = pt5/pt4.9)

  • Gearf: fan gear ratio ( = Nl/Nf )

  • pifD: design fan pressure ratio ( = pt21/pt2 )

  • pilcD: design LPC pressure ratio ( = pt25/pt19)

  • pihcD: design HPC pressure ratio ( = pt3 /pt25)

  • pihtD: design HPT pressure ratio ( = pt45/pt41)

  • piltD: design LPT pressure ratio ( = pt49/pt45)

  • mbfD: design corrected fan mass flow ( = mf*sqrt(Tt2 /Tref)/(pt2 /pref) )

  • mblcD: design corrected LPC mass flow ( = mc*sqrt(Tt19/Tref)/(pt19/pref) )

  • mbhcD: design corrected HLC mass flow ( = mc*sqrt(Tt25/Tref)/(pt25/pref) )

  • mbhtD: design corrected HPT mass flow ( = mt*sqrt(Tt41/Tref)/(pt41/pref) )

  • mbltD: design corrected LPT mass flow ( = mt*sqrt(Tt45/Tref)/(pt45/pref) )

  • NbfD: design corrected fan speed ( = Nf/sqrt(Tt2 /Tref) )

  • NblcD: design corrected LPC speed ( = Nl/sqrt(Tt19/Tref) )

  • NbhcD: design corrected HPC speed ( = Nh/sqrt(Tt25/Tref) )

  • NbhtD: design corrected HPT speed ( = Nh/sqrt(Tt41/Tref) )

  • NbltD: design corrected LPT speed ( = Nl/sqrt(Tt45/Tref) )

  • A2: fan-face area [m^2] mf = mcBPR, mt = mc(1+ff)

  • A25: HPC-face area [m^2]

  • A5: core nozzle area [m^2]

  • A7: fan nozzle area [m^2]

  • iTFspec: = 1 Tt4 is specified = 2 Feng is specified

  • Tt4: turbine-inlet total temperature [K]

  • Ttf: fuel temperature entering combustor

  • ifuel: fuel index, see function gasfun (in gasfun.f)

  • etab: combustor efficiency (fraction of fuel burned)

  • epf0: max fan polytropic efficiency

  • eplc0: LPC max polytropic efficiency

  • ephc0: HPC max polytropic efficiency

  • epht0: HPT max polytropic efficiency

  • eplt0: LPT max polytropic efficiency

  • pifK: fan efficiency FPR offset: epolf = epf0 + epfK*(pif-pifK)

  • epfK: fan efficiency pif derivative

  • mofft: mass flow offtake at LPC discharge station 2.5

  • Pofft: low spool power offtake

  • Tt9: offtake air discharge total temperature

  • pt9: offtake air discharge total pressure

  • epsl: low spool power loss fraction

  • epsh: high spool power loss fraction

  • icool: turbine cooling flag 0 = no cooling, ignore all cooling parameters below 1 = usual cooling, using passed-in fc 2 = usual cooling, but set (and return) fc from Tmetal

  • Mtexit: turbine blade-row exit Mach, for setting temperature drops

  • Tmetal: specified metal temperature [K], used only if icool=2

  • dTstrk: hot-streak temperature delta {K}, used only if icool=2

  • StA: area-weighted Stanton number , used only if icool=2

  • M4a: effective Mach at cooling-flow outlet (start of mixing)

  • ruc: cooling-flow outlet velocity ratio, u/ue

  • ncrowx: dimension of epsrow array

  • ncrow: number of blade rows requiring cooling

  • epsrow(.): input specified cooling-flow bypass ratio if icool=1 output resulting cooling-flow bypass ratio if icool=2

  • Tmrow(.): input specified metal temperature [K] if icool=2 output resulting metal temperature [K] if icool=1

    Output:


  • epsrow(.): see above
  • Tmrow(.): see above
  • TSFC: thrust specific fuel consumption = mdot_fuel g / F [1/s]
  • Fsp: specific thrust = F / (mdot u0) = F / ((1+BPR) mdot_core u0)
  • hfuel: fuel heating value [J / kg K]
  • ff: fuel mass flow fraction = mdotfuel / mdotcore
  • Feng: net effective thrust = (PKinl+PKout-Phi_jet)/u0 = sum( mdot u)
  • mcore: core mass flow = mdot_core [kg/s]
  • BPR: bypass ratio = mdotfan/mdotcore
  • Tt?: total temperature
  • ht?: total complete enthalpy (includes heat of formation)
  • pt?: total pressure
  • cpt?: specific heat at stagnation temperature (= dh/dT)
  • Rt?: gas constant at stagnation conditions
  • T?: static temperature
  • u?: velocity
  • etaf: fan overall efficiency
  • etac: compressor overall efficiency
  • etatf: fan-turbine overall efficiency
  • etatc: comp-turbine overall efficiency
  • Lconv: T if convergence was successful, F otherwise

The "?" symbol denotes the station index: 0 freestream 18 fan face outside of casing BLs 19 fan face over LPC portion 2 fan face over fan portion 21 fan exit, precooler inlet 19c precooler outlet, LPC inlet 25 LPC exit, intercooler inlet 25c intercooler exit, HPC inlet 3 compressor exit 4 combustor exit before cooling air addition 41 turbine inlet after cooling air addition 45 HPT exit, LPT inlet 49 LPT exit, regenerative cooler inlet 49c regenerative cooler outlet 5 core nozzle 6 core flow downstream 7 fan nozzle 8 fan flow downstream

source

Turbofan Cooling

TASOPT.engine.mcoolMethod
mcool(ncrowx, Tmrow, Tt3, Tt4, dTstreak, Trrat, efilm, tfilm, StA)

Calculates cooling mass flow requirement.

🔃 Inputs and Outputs

Inputs:

  • ncrowx: dimension of Tmrow(.),epsrow(.) arrays (max number of blade rows)
  • Tmrow(.): design metal temperature for each blade row
  • Tt3: cooling flow temperature
  • Tt4: hot gas temperature from burner
  • dTstreak: hot-streak temperature increase over Tt4, for first blade row
  • Trrat: static temperature ratio across each blade row, T4.1 / T4
  • efilm: cooling efficiency = (Tco-Tci)/(Tmetal-Tci)
  • tfilm: film effectiveness = (Tgas-Tfaw)/(Tgas-Tco) Tco = temperature of cooling air exiting blade Tci = temperature of cooling air entering blade Tfaw = film adiabatic wall temperature (for insulated-wall case) StA`: area-weighted external Stanton number = St (Asurf/Aflow) cpgas/cpcool

Output:

  • ncrow: number of blade rows which need cooling
  • epsrow(.): cooling mass flow ratio for each blade row, mcrow/m_air
source
TASOPT.engine.TmcalcMethod
Tmcalc(ncrowx, ncrow, Tt3, Tt4, dTstreak, Trrat, efilm, tfilm, StA, epsrow)

Calculates metal temperature for blade row

🔃 Inputs and Outputs

Inputs:

  • ncrowx: dimension of Tmrow(.),epsrow(.) arrays (max number of blade rows)
  • ncrow: number of blade rows which are cooled
  • epsrow(.): cooling mass flow ratio for each blade row, mcrow/m_air
  • Tt3: cooling flow temperature
  • Tt4: hot gas temperature from burner
  • dTstreak: hot-streak temperature increase over Tt4, for first blade row
  • Trrat: static temperature ratio across each blade row, T4.1 / T4
  • efilm: cooling efficiency = (Tco-Tci)/(Tmetal-Tci)
  • tfilm: film effectiveness = (Tgas-Tfaw)/(Tgas-Tco) Tco = temperature of cooling air exiting blade Tci = temperature of cooling air entering blade Tfaw = film adiabatic wall temperature (for insulated-wall case)
  • StA: area-weighted external Stanton number = St (Asurf/Aflow) cpgas/cpcoolOutput:
  • Tmrow(.): design metal temperature for each blade row
source
+ called by the routines in gascalc.f
🔃 Inputs and Outputs

Inputs:

  • gee: gravity acceleration

  • M0: freestream Mach

  • T0: freestream temperature [K]

  • p0: freestream pressure [Pa]

  • Tref: reference temperature for corrected mass flow and speed

  • pref: reference pressure for corrected mass flow

  • Phiinl: inlet ingested dissipation Phi_inl

  • iBLIc: 0=core in clear flow, 1=core sees Phiinl

  • pid: diffuser pressure ratio ( = pt2/pt0)

  • pib: burner pressure ratio ( = pt4/pt3)

  • pifn: fan nozzle pressure ratio ( = pt7/pt6.9)

  • pitn: turbine nozzle pressure ratio ( = pt5/pt4.9)

  • Gearf: fan gear ratio ( = Nl/Nf )

  • pifD: design fan pressure ratio ( = pt21/pt2 )

  • pilcD: design LPC pressure ratio ( = pt25/pt19)

  • pihcD: design HPC pressure ratio ( = pt3 /pt25)

  • pihtD: design HPT pressure ratio ( = pt45/pt41)

  • piltD: design LPT pressure ratio ( = pt49/pt45)

  • mbfD: design corrected fan mass flow ( = mf*sqrt(Tt2 /Tref)/(pt2 /pref) )

  • mblcD: design corrected LPC mass flow ( = mc*sqrt(Tt19/Tref)/(pt19/pref) )

  • mbhcD: design corrected HLC mass flow ( = mc*sqrt(Tt25/Tref)/(pt25/pref) )

  • mbhtD: design corrected HPT mass flow ( = mt*sqrt(Tt41/Tref)/(pt41/pref) )

  • mbltD: design corrected LPT mass flow ( = mt*sqrt(Tt45/Tref)/(pt45/pref) )

  • NbfD: design corrected fan speed ( = Nf/sqrt(Tt2 /Tref) )

  • NblcD: design corrected LPC speed ( = Nl/sqrt(Tt19/Tref) )

  • NbhcD: design corrected HPC speed ( = Nh/sqrt(Tt25/Tref) )

  • NbhtD: design corrected HPT speed ( = Nh/sqrt(Tt41/Tref) )

  • NbltD: design corrected LPT speed ( = Nl/sqrt(Tt45/Tref) )

  • A2: fan-face area [m^2] mf = mcBPR, mt = mc(1+ff)

  • A25: HPC-face area [m^2]

  • A5: core nozzle area [m^2]

  • A7: fan nozzle area [m^2]

  • iTFspec: = 1 Tt4 is specified = 2 Feng is specified

  • Tt4: turbine-inlet total temperature [K]

  • Ttf: fuel temperature entering combustor

  • ifuel: fuel index, see function gasfun (in gasfun.f)

  • etab: combustor efficiency (fraction of fuel burned)

  • epf0: max fan polytropic efficiency

  • eplc0: LPC max polytropic efficiency

  • ephc0: HPC max polytropic efficiency

  • epht0: HPT max polytropic efficiency

  • eplt0: LPT max polytropic efficiency

  • pifK: fan efficiency FPR offset: epolf = epf0 + epfK*(pif-pifK)

  • epfK: fan efficiency pif derivative

  • mofft: mass flow offtake at LPC discharge station 2.5

  • Pofft: low spool power offtake

  • Tt9: offtake air discharge total temperature

  • pt9: offtake air discharge total pressure

  • epsl: low spool power loss fraction

  • epsh: high spool power loss fraction

  • icool: turbine cooling flag 0 = no cooling, ignore all cooling parameters below 1 = usual cooling, using passed-in fc 2 = usual cooling, but set (and return) fc from Tmetal

  • Mtexit: turbine blade-row exit Mach, for setting temperature drops

  • Tmetal: specified metal temperature [K], used only if icool=2

  • dTstrk: hot-streak temperature delta {K}, used only if icool=2

  • StA: area-weighted Stanton number , used only if icool=2

  • M4a: effective Mach at cooling-flow outlet (start of mixing)

  • ruc: cooling-flow outlet velocity ratio, u/ue

  • ncrowx: dimension of epsrow array

  • ncrow: number of blade rows requiring cooling

  • epsrow(.): input specified cooling-flow bypass ratio if icool=1 output resulting cooling-flow bypass ratio if icool=2

  • Tmrow(.): input specified metal temperature [K] if icool=2 output resulting metal temperature [K] if icool=1

    Output:


  • epsrow(.): see above
  • Tmrow(.): see above
  • TSFC: thrust specific fuel consumption = mdot_fuel g / F [1/s]
  • Fsp: specific thrust = F / (mdot u0) = F / ((1+BPR) mdot_core u0)
  • hfuel: fuel heating value [J / kg K]
  • ff: fuel mass flow fraction = mdotfuel / mdotcore
  • Feng: net effective thrust = (PKinl+PKout-Phi_jet)/u0 = sum( mdot u)
  • mcore: core mass flow = mdot_core [kg/s]
  • BPR: bypass ratio = mdotfan/mdotcore
  • Tt?: total temperature
  • ht?: total complete enthalpy (includes heat of formation)
  • pt?: total pressure
  • cpt?: specific heat at stagnation temperature (= dh/dT)
  • Rt?: gas constant at stagnation conditions
  • T?: static temperature
  • u?: velocity
  • etaf: fan overall efficiency
  • etac: compressor overall efficiency
  • etatf: fan-turbine overall efficiency
  • etatc: comp-turbine overall efficiency
  • Lconv: T if convergence was successful, F otherwise

The "?" symbol denotes the station index: 0 freestream 18 fan face outside of casing BLs 19 fan face over LPC portion 2 fan face over fan portion 21 fan exit, precooler inlet 19c precooler outlet, LPC inlet 25 LPC exit, intercooler inlet 25c intercooler exit, HPC inlet 3 compressor exit 4 combustor exit before cooling air addition 41 turbine inlet after cooling air addition 45 HPT exit, LPT inlet 49 LPT exit, regenerative cooler inlet 49c regenerative cooler outlet 5 core nozzle 6 core flow downstream 7 fan nozzle 8 fan flow downstream

source

Turbofan Cooling

TASOPT.engine.mcoolMethod
mcool(ncrowx, Tmrow, Tt3, Tt4, dTstreak, Trrat, efilm, tfilm, StA)

Calculates cooling mass flow requirement.

🔃 Inputs and Outputs

Inputs:

  • ncrowx: dimension of Tmrow(.),epsrow(.) arrays (max number of blade rows)
  • Tmrow(.): design metal temperature for each blade row
  • Tt3: cooling flow temperature
  • Tt4: hot gas temperature from burner
  • dTstreak: hot-streak temperature increase over Tt4, for first blade row
  • Trrat: static temperature ratio across each blade row, T4.1 / T4
  • efilm: cooling efficiency = (Tco-Tci)/(Tmetal-Tci)
  • tfilm: film effectiveness = (Tgas-Tfaw)/(Tgas-Tco) Tco = temperature of cooling air exiting blade Tci = temperature of cooling air entering blade Tfaw = film adiabatic wall temperature (for insulated-wall case) StA`: area-weighted external Stanton number = St (Asurf/Aflow) cpgas/cpcool

Output:

  • ncrow: number of blade rows which need cooling
  • epsrow(.): cooling mass flow ratio for each blade row, mcrow/m_air
source
TASOPT.engine.TmcalcMethod
Tmcalc(ncrowx, ncrow, Tt3, Tt4, dTstreak, Trrat, efilm, tfilm, StA, epsrow)

Calculates metal temperature for blade row

🔃 Inputs and Outputs

Inputs:

  • ncrowx: dimension of Tmrow(.),epsrow(.) arrays (max number of blade rows)
  • ncrow: number of blade rows which are cooled
  • epsrow(.): cooling mass flow ratio for each blade row, mcrow/m_air
  • Tt3: cooling flow temperature
  • Tt4: hot gas temperature from burner
  • dTstreak: hot-streak temperature increase over Tt4, for first blade row
  • Trrat: static temperature ratio across each blade row, T4.1 / T4
  • efilm: cooling efficiency = (Tco-Tci)/(Tmetal-Tci)
  • tfilm: film effectiveness = (Tgas-Tfaw)/(Tgas-Tco) Tco = temperature of cooling air exiting blade Tci = temperature of cooling air entering blade Tfaw = film adiabatic wall temperature (for insulated-wall case)
  • StA: area-weighted external Stanton number = St (Asurf/Aflow) cpgas/cpcoolOutput:
  • Tmrow(.): design metal temperature for each blade row
source
diff --git a/dev/search_index.js b/dev/search_index.js index b1b28b6a..d5329748 100644 --- a/dev/search_index.js +++ b/dev/search_index.js @@ -1,3 +1,3 @@ var documenterSearchIndex = {"docs": -[{"location":"misc/structs/#datastructs","page":"Data structures","title":"Data structures","text":"","category":"section"},{"location":"misc/structs/","page":"Data structures","title":"Data structures","text":"We're incorporating structs as part of modernizing TASOPT from Fortran. Here are the main ones.","category":"page"},{"location":"misc/structs/","page":"Data structures","title":"Data structures","text":"aircraft\n\naerodynamics.airfoil","category":"page"},{"location":"misc/structs/#aircraft","page":"Data structures","title":"aircraft","text":"aircraft\n\nA type representing a TASOPT aircraft model including, geometric, aerodynamic, propulsion system parameters. It is designed to hold information related to the aircraft's name, description, as well as different sets of parameters used for analysis and optimization.\n\nOverloads Base.summary to print a summary of the aircraft model.\n\nFields:\n\nname::String : Aircraft name (eg: \"Boeing 777\") \ndescription::String : A brief description of the aircraft\npari::AbstractVector{Int64} : integer flag parameters \nparg::AbstractArray{Float64} : Geometry parameters \nparm::AbstractArray{Float64} : Mission parameters \npara::AbstractArray{Float64} : Aero parameters \npare::AbstractArray{Float64} : Engine parameters \n\nFor devs: the indices for accessing specific data are defined in /src/misc/index.inc. Refer to the sample input file (/src/IO/default_input.toml and read_input.jl) for usage.\n\n\n\n\n\n","category":"type"},{"location":"misc/structs/#TASOPT.aerodynamics.airfoil","page":"Data structures","title":"TASOPT.aerodynamics.airfoil","text":"airfoil\n\nA type representing a database of pre-computed airfoil data for a single Reyolds number and a range of Mach numbers, sectional lift coefficients, and thickness-to-chord ratios. By default, this is the original TASOPT transonic airfoil, as modelled by M. Drela in MSES and stored in src/air/.\n\nOverloads Base.show to print a summary of the airfoil model.\n\nFields:\n\nMa::AbstractVector{Float64} : Mach nos.\ncl::AbstractVector{Float64} : Sectional lift coefficients.\nτ::AbstractVector{Float64} : Thickness-to-chord ratios.\nRe::Float64 : Reynolds number.\nA::AbstractArray{Float64}: Multi-dimensional array of aero performance data.\n\nVarious views of the data:\n\nA_M::AbstractArray{Float64}:\nA_τ::AbstractArray{Float64}:\nA_cl::AbstractArray{Float64}:\nA_M_τ::AbstractArray{Float64}:\nA_M_cl::AbstractArray{Float64}:\nA_cl_τ::AbstractArray{Float64}:\nA_M_cl_τ::AbstractArray{Float64}:\n\nSee also airfun and airtable.\n\n\n\n\n\n","category":"type"},{"location":"aero/theory_lifting/","page":"-","title":"-","text":"details: 📖 Theory - Wing lift distribution\nThe lift distribution \"taper ratios\" are defined using local section c_ell factors r_c_ell s and r_c_ell t. beginaligned\ngamma_s = r_c_ell s lambda_s \n\ngamma_t = r_c_ell t lambda_t \n\nfracp scriptstyle (eta)p_o equiv \nP scriptstyle (eta eta_oeta_s gamma_sgamma_t)\n = \nleft\nbeginarraylcl\n 1 0 eta eta_o \n05em\ndisplaystyle\n 1 + (gamma_s- 1) fraceta - eta_oeta_s-eta_o \n eta_o eta eta_s \n025em\ndisplaystyle\ngamma_s + (gamma_t-gamma_s) fraceta - eta_s1-eta_s \n eta_s eta 1\nendarray\nright\nlabelpeta\nendalignedTo get the actual aerodynamic load tildep, lift corrections Delta L_o and Delta L_t are applied to account for the fuselage carryover and tip lift rolloff, as sketched in the figure above. The detailed shapes of these modifications are not specified, but instead only their integrated loads are defined by the following integral relation.beginaligned\nfracL_rm wing2 = \nint_0^b2 tildep rm dy = int_0^b2 p rm dy\n+ Delta L_o\n+ Delta L_t\nendalignedThe corrections are specified in terms of the center load magnitude p_o and the f_L_scriptstyle o f_L_scriptstyle t adjustment factors.beginaligned\nDelta L_o = f_L_scriptstyle o p_o fracb_o2 \n= f_L_scriptstyle o p_o fracb2 eta_o\nlabelDLo\n025em\nDelta L_t = f_L_scriptstyle t p_t c_t \n= f_L_scriptstyle t p_o c_o gamma_t lambda_t\nlabelDLt\n05em\nf_L_scriptstyle o simeq -05\n\nf_L_scriptstyle t simeq -005\nendalignedLift load magnitude (Wing only)The wing's p_o center loading magnitude is determined by requiring that the aerodynamic loading integrated over the whole span is equal to the total weight times the load factor, minus the tail lift.beginaligned\nL_rm total = 2 int_0^b2 tildepscriptstyle (eta) rm dy = \np_o b int_0^1 Pscriptstyle (eta) rm deta + 2 Delta L_o\n+ 2 Delta L_t \n= N W - (L_rm htail)_N\nhspace2em\nlabeltotlift\nendalignedFor structural sizing calculations N = N_rm lift is chosen, and the appropriate value of (L_rm htail)_N is the worst-case (most negative) tail lift expected in the critical sizing case. One possible choice is the trimmed tail load at dive speed, where N_rm lift is most likely to occur.The wing area S_def and aspect ratio AR_def definitions allow the root chord and the tip lift drop Delta L_t to be expressed as beginaligned\nc_o = b K_o\n\nDelta L_t = \nf_L_scriptstyle t p_o b K_o gamma_t lambda_t\nlabelDLt2\n\nmathrmwhere hspace2em\nK_o equiv frac1K_c Ahspace-05exR \nendalignedso that L_rm total can be evaluated to the following. The Pscriptstyle (eta) integrals have the form as for Cscriptstyle (eta), given by int_0^eta_o C rm deta – int_eta_s^1 C^2 (eta-eta_s) rm deta, but with the lambda's replaced by gamma's.beginaligned\np_o b K_p = N W - (L_rm htail)_N hspace2em\n\nmathrmwhere hspace3em\nK_p = \neta_o + textstyle frac12(1 + gamma_s) (eta_s - eta_o)\n + textstyle frac12(gamma_s + gamma_t) (1 - eta_s)\nnonumber \n + f_L_scriptstyle oeta_o + 2 f_L_scriptstyle tK_o gamma_tlambda_t \nhspace2em\nendalignedThe root and planform-break loadings can then be explicitly determined. beginaligned\np_o = fracN W - (L_rm htail)_NK_p b \nlabelpodef\n\np_s = p_o gamma_s\n\np_t = p_o gamma_t\nendaligned","category":"page"},{"location":"propulsion/propsys/#Propulsion-system","page":"Propulsion system","title":"Propulsion system","text":"","category":"section"},{"location":"propulsion/propsys/","page":"Propulsion system","title":"Propulsion system","text":"A turbofan model is provided in TASOPT.jl","category":"page"},{"location":"propulsion/propsys/#Turbofan-model","page":"Propulsion system","title":"Turbofan model","text":"","category":"section"},{"location":"propulsion/propsys/","page":"Propulsion system","title":"Propulsion system","text":"engine.tfcalc!\n\nengine.tfsize!\n\nengine.tfweight\n","category":"page"},{"location":"propulsion/propsys/#TASOPT.engine.tfcalc!","page":"Propulsion system","title":"TASOPT.engine.tfcalc!","text":"tfcalc(pari,parg,para,pare, ip, icall,icool,initeng)\n\nCalls function tfsize or tfoper for one operating point.\n\ndetails: 🔃 Inputs and Outputs\nInput:icall: 0 call on-design sizing routine tfsize 1 call off-design analysis routine tfoper, specified Tt4 2 call off-design analysis routine tfoper, specified Fe\nicool: 0 use zero cooling mass flow ratio regardless 1 use specified cooling flow ratios epsrow(.), calculate Tmrow(.) 2 use specified metal temperatures Tmrow(.) , calculate epsrow(.)\niniteng: 0 initialize variables for iteration in TFOPER 1 use current variables as initial guesses in TFOPER\n\n\n\n\n\n","category":"function"},{"location":"propulsion/propsys/#TASOPT.engine.tfsize!","page":"Propulsion system","title":"TASOPT.engine.tfsize!","text":"tfsize!(gee, M0, T0, p0, a0, M2, M25,\n Feng, Phiinl, Kinl, iBLIc,\n BPR, pif, pilc, pihc,\n pid, pib, pifn, pitn,\n Ttf, ifuel, etab,\n epf0, eplc0, ephc0, epht0, eplt0,\n pifK, epfK,\n mofft, Pofft,\n Tt9, pt9, Tt4,\n epsl, epsh,\n icool,\n Mtexit, dTstrk, StA, efilm, tfilm,\n M4a, ruc,\n ncrowx, ncrow,\n epsrow, Tmrow, \n Δh_PreC, Δh_InterC, Δh_Regen, Δh_TurbC,\n Δp_PreC, Δp_InterC, Δp_Regen)\n\nTurbofan performance and sizing routine.\n\nCalculation procedure follows that of Kerrebrock, but the usual gas property formulas are replaced by function calls, which can therefore implement more general gas models. In addition, a turbine cooling model is added.\n\nThe gas routines reside in the following source files: gascalc.f Routines for various processes (compressor, turbine, combustor, etc) gasfun.f Routines for computing cp[T], h[t], sigma[T], R, called by the routines in gascalc.f\n\ndetails: 🔃 Inputs and Outputs\nInputs:gee: gravity acceleration\nM0: freestream Mach\nT0: freestream temperature [K]\np0: freestream pressure [Pa]\nM2: fan-face Mach number\nM25: HPC-face Mach number\nFeng: required net thrust (PKinl+PKout-Phi_jet)/u0 = sum( mdot u)\nPhiinl: inlet ingested dissipation\niBLIc: 0=core in clear flow, 1=core sees Phiinl\nBPR: bypass ratio = mdotfan/mdotcore\npif: fan pressure ratio ( = pt7 /pt2)\npilc: LP comp pressure ratio ( = pt25/pt2)\npihc: HP comp pressure ratio ( = pt3 /pt25)\npid: diffuser pressure ratio ( = pt2 /pt0)\npib: burner pressure ratio ( = pt4 /pt3)\npifn: fan nozzle pressure ratio ( = pt7/pt2.1)\npitn: turbine nozzle pressure ratio ( = pt5/pt4.9)\nTtf: fuel temperature entering combustor\nifuel: fuel index, see function gasfun (in gasfun.f)\netab: combustor efficiency (fraction of fuel burned)\nepf0: fan max polytropic efficiency\neplc0: LPC max polytropic efficiency\nephc0: HPC max polytropic efficiency\nepht0: HPT max polytropic efficiency\neplt0: LPT max polytropic efficiency\npifK: fan efficiency FPR offset: epolf = epf0 + epfK*(pif-pifK)\nepfK: fan efficiency pif derivative\nmofft: mass flow offtake at LPC discharge station 2.5\nPofft: low spool power offtake\nTt9: offtake air discharge total temperature\npt9: offtake air discharge total pressure\nepsl: low spool power loss fraction\nepsh: high spool power loss fraction\n`icool turbine cooling flag 0 = no cooling, ignore all cooling parameters below 1 = usual cooling, using passed-in fcool 2 = usual cooling, but set (and return) fcool from Tmetal\nMtexit: turbine blade-row exit Mach, for setting temperature drops\ndTstrk: hot-streak temperature delta {K}, used only if icool=2\nStA: area-weighted Stanton number , used only if icool=2\nM4a: effective Mach at cooling-flow outlet (start of mixing)\nruc: cooling-flow outlet velocity ratio, u/ue\nncrowx: dimension of epsrow array\nncrow: number of blade rows requiring cooling\nepsrow(.): input specified cooling-flow bypass ratio if icool=1 output resulting cooling-flow bypass ratio if icool=2\nTmrow(.): input specified metal temperature [K] if icool=2 output resulting metal temperature [K] if icool=1\nOutputs:\nepsrow(.): see above\nTmrow(.): see above\nTSFC: thrust specific fuel consumption = mdot_fuel g / F [1/s]\nFsp: specific thrust = F / (mdot u0) = F / ((1+BPR) mdot_core u0)\nhfuel: fuel heating value [J / kg K]\nff: fuel mass flow fraction = mdotfuel / mdotcore\nmcore: core mass flow = mdot_core [kg/s]\nA2: fan-face area [m^2]\nA25: HPC-face area [m^2]\nA5: core nozzle area [m^2]\nA7: fan nozzle area [m^2]\nA6: core plume area [m^2]\nA8: fan plume area [m^2]\nTt?: total temperature\nht?: total complete enthalpy (includes heat of formation)\npt?: total pressure\ncpt?: specific heat at stagnation temperature (= dh/dT)\nRt?: gas constant at stagnation conditions\nT?: static temperature\nu?: velocity\nepf: fan polytropic efficiency\neplc: LPC polytropic efficiency\nephc: HPC polytropic efficiency\nepht: HPT polytropic efficiency\neplt: LPT polytropic efficiency\netaf: fan overall efficiency\netalc: LPC overall efficiency\netahc: HPC overall efficiency\netaht: HPT overall efficiency\netalt: LPT overall efficiency\nLconv: T if convergence was successful, F otherwiseThe \"?\" symbol denotes the station index: 0 freestream 18 fan face outside of casing BLs 19 fan face over LPC portion 2 fan face over fan portion 21 fan exit 25 LPC exit, HPC inlet 3 compressor exit 4 combustor exit before cooling air addition 41 turbine inlet after cooling air addition 45 HPT exit, LPT inlet 49 LPT exit 5 core nozzle 6 core flow downstream 7 fan nozzle 8 fan flow downstream\n\n\n\n\n\n","category":"function"},{"location":"propulsion/propsys/#TASOPT.engine.tfweight","page":"Propulsion system","title":"TASOPT.engine.tfweight","text":" tfweight(iengwgt, Gearf, OPR, BPR, mdotc, dfan, rSnace,\n dlcomp, neng, feadd, fpylon)\n\nEngine weight estimation function using Giulia Pantalone, Drela, or Fitzgerald model.\n\ndetails: 🔃 Inputs and Outputs\nInput:iengwgt: Engine model index, Drela=0, Fitzgerald=1, and Pantalone>=3, \nOPR: Overall pressure ratio.\nBPR: By-pass ratio.\nmdotc: Engine core mass flow rate.\ndfan: Fan diameter.\nrSnace: \ndlcomp:\nneng: Number of engines.\nfeadd: Fuel system weight ratio.\nfpylon: Pylon weight fraction.Output:Weng: Total engine weight.\nWnac: Nacelle weight. \nWebare: Bare engine weight.\nSnace1: Nacelle area.\n\n\n\n\n\n","category":"function"},{"location":"propulsion/propsys/#Turbofan-Maps","page":"Propulsion system","title":"Turbofan Maps","text":"","category":"section"},{"location":"propulsion/propsys/","page":"Propulsion system","title":"Propulsion system","text":"engine.Ncmap(pratio, mb, piD, mbD, NbD, Cmap)\n\nengine.ecmap(pratio, mb, piD, mbD, Cmap, effo, piK, effK)\n\nengine.Ncmap1(pratio, m, piD, mbD, NbD, ABCDm, iabcd, Tr, pr)\n\nengine.ecmap1(pratio, m, piD, mbD, ABCDm, iabcd, effo, Tr, pr)\n\nengine.etmap(dh, mb, Nb, piD, mbD, NbD, ept0, Tmap, Tt, cpt, Rt)\n\nengine.Pimap(mb, Nb, piD, mbD, NbD, Cmap)\n\nengine.tfoper!\n","category":"page"},{"location":"propulsion/propsys/#TASOPT.engine.Ncmap-NTuple{6, Any}","page":"Propulsion system","title":"TASOPT.engine.Ncmap","text":"Ncmap(pratio, mb, piD, mbD, NbD, Cmap)\n\nCalculates compressor or fan corrected speed as a function of pressure ratio and corrected mass flow\n\ndetails: 🔃 Inputs and Outputs\nInputs:pratio: pressure ratio \nmb: corrected mass flow\npiD: design pressure ratio\nmbD: design corrected mass flow\nNbD: design corrected speed\nCmap(.): map constantsOutputs:Nb: wheel speed\nNb_?: derivatives\n\n\n\n\n\n","category":"method"},{"location":"propulsion/propsys/#TASOPT.engine.ecmap-NTuple{8, Any}","page":"Propulsion system","title":"TASOPT.engine.ecmap","text":"ecmap(pratio, mb, piD, mbD, Cmap, effo, piK, effK)\n\nCalculates compressor or fan efficiency as a function of pressure ratio and corrected mass flow\n\ndetails: 🔃 Inputs and Outputs\nInputs:pratio: pressure ratio\nmb: corrected mass flow\npiD: design pressure ratio\nmbD: design corrected mass flow\nCmap(.): map constants\neffo: maximum efficiency\npiK: pi-dependence offset eff = effo + effK*(pi-piK)\neffK: pi-dependence slopeOutputs:eff: efficiency\neff_?: derivatives\n\n\n\n\n\n","category":"method"},{"location":"propulsion/propsys/#TASOPT.engine.Ncmap1-NTuple{9, Any}","page":"Propulsion system","title":"TASOPT.engine.Ncmap1","text":"Ncmap1(pratio, m, piD, mbD, NbD, ABCDm, iabcd, Tr, pr)\n\nCalculates compressor or fan efficiency as a function of pressure ratio and corrected mass flow\n\ndetails: 🔃 Inputs and Outputs\nInputs:pratio: pressure ratio\nmb: corrected mass flow\npiD: design pressure ratio\nmbD: design corrected mass flow\nNbD: design corrected speed\nABCDm: map constants\niabcd: map exponents\nTr: T/Tref\npr: p/prefOutputs:N: wheel speed\nN_?: derivatives\n\n\n\n\n\n","category":"method"},{"location":"propulsion/propsys/#TASOPT.engine.ecmap1-NTuple{9, Any}","page":"Propulsion system","title":"TASOPT.engine.ecmap1","text":"ecmap1(pratio, m, piD, mbD, ABCDm, iabcd, effo, Tr, pr)\n\nCalculates compressor or fan efficiency as a function of pressure ratio and mass flow\n\ndetails: 🔃 Inputs and Outputs\nInputs:pratio: pressure ratio\nmb: corrected mass flow\npiD: design pressure ratio\nmbD: design corrected mass flow\nABCDm: map constants\niabcd: map exponents\neffo: maximum efficiency\nTr: T/Tref\npr: p/prefOutputs:eff: efficiency\neff_?: derivatives\n\n\n\n\n\n","category":"method"},{"location":"propulsion/propsys/#TASOPT.engine.etmap-NTuple{11, Any}","page":"Propulsion system","title":"TASOPT.engine.etmap","text":"etmap(dh, mb, Nb, piD, mbD, NbD, ept0, Tmap, Tt, cpt, Rt)\n\nCalculates turbine efficiency as a function of work and corrected mass flow\n\ndetails: 🔃 Inputs and Outputs\nInputs:dh: enthalpy change\nmb: corrected mass flow\nNb: corrected speed\npiD: design pressure ratio\nmbD: design corrected mass flow\nNbD: design corrected speed\nept0: turbine polytropic efficiency estimate\nTmap(.): map constantsOutputs:eff: efficiency\neff_?: derivatives\n\n\n\n\n\n","category":"method"},{"location":"propulsion/propsys/#TASOPT.engine.Pimap-NTuple{6, Any}","page":"Propulsion system","title":"TASOPT.engine.Pimap","text":"Pimap(mb, Nb, piD, mbD, NbD, Cmap)\n\nCalculates compressor or fan pressure ratio as a function of pressure ratio and corrected mass flow\n\ndetails: 🔃 Inputs and Outputs\nInputs:mb: corrected mass flow\nNb: corrected speed\npiD: design pressure ratio\nmbD: design corrected mass flow\nNbD: design corrected speed\nCmap(.): map constantsOutputs:pratio: pressure ratio\npi_?: derivatives\n\n\n\n\n\n","category":"method"},{"location":"propulsion/propsys/#TASOPT.engine.tfoper!","page":"Propulsion system","title":"TASOPT.engine.tfoper!","text":"function tfoper!(gee, M0, T0, p0, a0, Tref, pref, Phiinl, Kinl, iBLIc, pid, pib, pifn, pitn, Gearf, pifD, pilcD, pihcD, pihtD, piltD, mbfD, mblcD, mbhcD, mbhtD, mbltD, NbfD, NblcD, NbhcD, NbhtD, NbltD, A2, A25, A5, A7, iTFspec, Ttf, ifuel, etab, epf0, eplc0, ephc0, epht0, eplt0, pifK, epfK, mofft, Pofft, Tt9, pt9, epsl, epsh, icool, Mtexit, dTstrk, StA, efilm, tfilm, M4a, ruc, ncrowx, ncrow, epsrow, Tmrow, Feng, M2, pif, pilc, pihc, mbf, mblc, mbhc, Tt4, pt5, mcore, M25)\n\nTurbofan operation routine\n\nCalculation procedure follows that of Kerrebrock,\nbut the usual gas property formulas are replaced\nby function calls, which can therefore implement\nmore general gas models. \nIn addition, a turbine cooling model is added.\n\nThe gas routines reside in the following source files:\n gascalc.f Routines for various processes \n (compressor, turbine, combustor, etc)\n gasfun.f Routines for computing cp[T], h[t], sigma[T], R,\n called by the routines in gascalc.f\n\ndetails: 🔃 Inputs and Outputs\nInputs:gee: gravity acceleration\nM0: freestream Mach\nT0: freestream temperature [K]\np0: freestream pressure [Pa]\nTref: reference temperature for corrected mass flow and speed\npref: reference pressure for corrected mass flow\nPhiinl: inlet ingested dissipation Phi_inl\niBLIc: 0=core in clear flow, 1=core sees Phiinl\npid: diffuser pressure ratio ( = pt2/pt0)\npib: burner pressure ratio ( = pt4/pt3)\npifn: fan nozzle pressure ratio ( = pt7/pt6.9)\npitn: turbine nozzle pressure ratio ( = pt5/pt4.9)\nGearf: fan gear ratio ( = Nl/Nf )\npifD: design fan pressure ratio ( = pt21/pt2 )\npilcD: design LPC pressure ratio ( = pt25/pt19)\npihcD: design HPC pressure ratio ( = pt3 /pt25)\npihtD: design HPT pressure ratio ( = pt45/pt41)\npiltD: design LPT pressure ratio ( = pt49/pt45)\nmbfD: design corrected fan mass flow ( = mf*sqrt(Tt2 /Tref)/(pt2 /pref) )\nmblcD: design corrected LPC mass flow ( = mc*sqrt(Tt19/Tref)/(pt19/pref) )\nmbhcD: design corrected HLC mass flow ( = mc*sqrt(Tt25/Tref)/(pt25/pref) )\nmbhtD: design corrected HPT mass flow ( = mt*sqrt(Tt41/Tref)/(pt41/pref) )\nmbltD: design corrected LPT mass flow ( = mt*sqrt(Tt45/Tref)/(pt45/pref) )\nNbfD: design corrected fan speed ( = Nf/sqrt(Tt2 /Tref) )\nNblcD: design corrected LPC speed ( = Nl/sqrt(Tt19/Tref) )\nNbhcD: design corrected HPC speed ( = Nh/sqrt(Tt25/Tref) )\nNbhtD: design corrected HPT speed ( = Nh/sqrt(Tt41/Tref) )\nNbltD: design corrected LPT speed ( = Nl/sqrt(Tt45/Tref) )\nA2: fan-face area [m^2] mf = mcBPR, mt = mc(1+ff)\nA25: HPC-face area [m^2]\nA5: core nozzle area [m^2]\nA7: fan nozzle area [m^2]\niTFspec: = 1 Tt4 is specified = 2 Feng is specified\nTt4: turbine-inlet total temperature [K]\nTtf: fuel temperature entering combustor\nifuel: fuel index, see function gasfun (in gasfun.f)\netab: combustor efficiency (fraction of fuel burned)\nepf0: max fan polytropic efficiency\neplc0: LPC max polytropic efficiency\nephc0: HPC max polytropic efficiency\nepht0: HPT max polytropic efficiency\neplt0: LPT max polytropic efficiency\npifK: fan efficiency FPR offset: epolf = epf0 + epfK*(pif-pifK)\nepfK: fan efficiency pif derivative\nmofft: mass flow offtake at LPC discharge station 2.5\nPofft: low spool power offtake\nTt9: offtake air discharge total temperature\npt9: offtake air discharge total pressure\nepsl: low spool power loss fraction\nepsh: high spool power loss fraction\nicool: turbine cooling flag 0 = no cooling, ignore all cooling parameters below 1 = usual cooling, using passed-in fc 2 = usual cooling, but set (and return) fc from Tmetal\nMtexit: turbine blade-row exit Mach, for setting temperature drops\nTmetal: specified metal temperature [K], used only if icool=2\ndTstrk: hot-streak temperature delta {K}, used only if icool=2\nStA: area-weighted Stanton number , used only if icool=2\nM4a: effective Mach at cooling-flow outlet (start of mixing)\nruc: cooling-flow outlet velocity ratio, u/ue\nncrowx: dimension of epsrow array\nncrow: number of blade rows requiring cooling\nepsrow(.): input specified cooling-flow bypass ratio if icool=1 output resulting cooling-flow bypass ratio if icool=2\nTmrow(.): input specified metal temperature [K] if icool=2 output resulting metal temperature [K] if icool=1\nOutput:epsrow(.): see above\nTmrow(.): see above\nTSFC: thrust specific fuel consumption = mdot_fuel g / F [1/s]\nFsp: specific thrust = F / (mdot u0) = F / ((1+BPR) mdot_core u0)\nhfuel: fuel heating value [J / kg K]\nff: fuel mass flow fraction = mdotfuel / mdotcore\nFeng: net effective thrust = (PKinl+PKout-Phi_jet)/u0 = sum( mdot u)\nmcore: core mass flow = mdot_core [kg/s]\nBPR: bypass ratio = mdotfan/mdotcore\nTt?: total temperature\nht?: total complete enthalpy (includes heat of formation)\npt?: total pressure\ncpt?: specific heat at stagnation temperature (= dh/dT)\nRt?: gas constant at stagnation conditions\nT?: static temperature\nu?: velocity\netaf: fan overall efficiency\netac: compressor overall efficiency\netatf: fan-turbine overall efficiency\netatc: comp-turbine overall efficiency\nLconv: T if convergence was successful, F otherwiseThe \"?\" symbol denotes the station index: 0 freestream 18 fan face outside of casing BLs 19 fan face over LPC portion 2 fan face over fan portion 21 fan exit, precooler inlet 19c precooler outlet, LPC inlet 25 LPC exit, intercooler inlet 25c intercooler exit, HPC inlet 3 compressor exit 4 combustor exit before cooling air addition 41 turbine inlet after cooling air addition 45 HPT exit, LPT inlet 49 LPT exit, regenerative cooler inlet 49c regenerative cooler outlet 5 core nozzle 6 core flow downstream 7 fan nozzle 8 fan flow downstream\n\n\n\n\n\n","category":"function"},{"location":"propulsion/propsys/#Turbofan-Cooling","page":"Propulsion system","title":"Turbofan Cooling","text":"","category":"section"},{"location":"propulsion/propsys/","page":"Propulsion system","title":"Propulsion system","text":"\nengine.mcool(ncrowx, Tmrow, Tt3, Tt4, dTstreak, Trrat, efilm, tfilm, StA)\n\nengine.Tmcalc(ncrowx, ncrow, Tt3, Tt4, dTstreak, Trrat, efilm, tfilm, StA, epsrow)\n\n","category":"page"},{"location":"propulsion/propsys/#TASOPT.engine.mcool-NTuple{9, Any}","page":"Propulsion system","title":"TASOPT.engine.mcool","text":"mcool(ncrowx, Tmrow, Tt3, Tt4, dTstreak, Trrat, efilm, tfilm, StA)\n\nCalculates cooling mass flow requirement.\n\ndetails: 🔃 Inputs and Outputs\nInputs:ncrowx: dimension of Tmrow(.),epsrow(.) arrays (max number of blade rows)\nTmrow(.): design metal temperature for each blade row\nTt3: cooling flow temperature\nTt4: hot gas temperature from burner\ndTstreak: hot-streak temperature increase over Tt4, for first blade row \nTrrat: static temperature ratio across each blade row, T4.1 / T4\nefilm: cooling efficiency = (Tco-Tci)/(Tmetal-Tci)\ntfilm: film effectiveness = (Tgas-Tfaw)/(Tgas-Tco) Tco = temperature of cooling air exiting blade Tci = temperature of cooling air entering blade Tfaw = film adiabatic wall temperature (for insulated-wall case) StA`: area-weighted external Stanton number = St (Asurf/Aflow) cpgas/cpcoolOutput:ncrow: number of blade rows which need cooling\nepsrow(.): cooling mass flow ratio for each blade row, mcrow/m_air\n\n\n\n\n\n","category":"method"},{"location":"propulsion/propsys/#TASOPT.engine.Tmcalc-NTuple{10, Any}","page":"Propulsion system","title":"TASOPT.engine.Tmcalc","text":"Tmcalc(ncrowx, ncrow, Tt3, Tt4, dTstreak, Trrat, efilm, tfilm, StA, epsrow)\n\nCalculates metal temperature for blade row\n\ndetails: 🔃 Inputs and Outputs\nInputs:ncrowx: dimension of Tmrow(.),epsrow(.) arrays (max number of blade rows)\nncrow: number of blade rows which are cooled\nepsrow(.): cooling mass flow ratio for each blade row, mcrow/m_air\nTt3: cooling flow temperature\nTt4: hot gas temperature from burner\ndTstreak: hot-streak temperature increase over Tt4, for first blade row \nTrrat: static temperature ratio across each blade row, T4.1 / T4\nefilm: cooling efficiency = (Tco-Tci)/(Tmetal-Tci)\ntfilm: film effectiveness = (Tgas-Tfaw)/(Tgas-Tco) Tco = temperature of cooling air exiting blade Tci = temperature of cooling air entering blade Tfaw = film adiabatic wall temperature (for insulated-wall case)\nStA: area-weighted external Stanton number = St (Asurf/Aflow) cpgas/cpcool\nOutput:\nTmrow(.): design metal temperature for each blade row\n\n\n\n\n\n","category":"method"},{"location":"propulsion/gascalc/#Gas-Calculations","page":"Gas Calculations","title":"Gas Calculations","text":"","category":"section"},{"location":"propulsion/gascalc/","page":"Gas Calculations","title":"Gas Calculations","text":"Gas calculations used with TASOPT.jl propulsion systems.","category":"page"},{"location":"propulsion/gascalc/#Ideal-gas-with-variable-c_p","page":"Gas Calculations","title":"Ideal gas with variable c_p","text":"","category":"section"},{"location":"propulsion/gascalc/","page":"Gas Calculations","title":"Gas Calculations","text":"\nengine.gas_tset(alpha, n, hspec, tguess)\n\nengine.gas_tsetd(alpha, n, hspec, tguess)\n\nengine.gasfun\n\nengine.gaschem(igas)\n\nengine.gassum(alpha, n, t)\n\nengine.gassumd(alpha, n, t)\n\nengine.gas_prat(alpha, n, po, to, ho, so, cpo, ro, pratio, epol)\n\nengine.gas_pratd(alpha, n, po, to, ho, so, cpo, ro, pratio, epol)\n\nengine.gas_delh(alpha, n, po, to, ho, so, cpo, ro, delh, epol)\n\nengine.gas_delhd(alpha, n, po, to, ho, so, cpo, ro, delh, epol)\n\nengine.gas_burn(alpha, beta, gamma, n, ifuel, to, tf, t)\n\nengine.gas_burnd(alpha, beta, gamma, n, ifuel, to, tf, t)\n\nengine.gas_mach(alpha, n, po, to, ho, so, cpo, ro, mo, m, epol)\n\nengine.gas_machd(alpha, n, po, to, ho, so, cpo, ro, mo, m, epol)\n\nengine.gas_mass(alpha, n, po, to, ho, so, cpo, ro, mflux, Mguess)\n\nengine.gasfuel(ifuel, n)\n\nengine.gasPr(gas, T)\n\n\n","category":"page"},{"location":"propulsion/gascalc/#TASOPT.engine.gas_tset-NTuple{4, Any}","page":"Gas Calculations","title":"TASOPT.engine.gas_tset","text":"gas_tset(alpha, n, hspec, tguess)\n\nCalculates temperature for a specified enthalpy. The constant-cp equivalent is\n\n t = (hspec - hf) /cp \n\n where hf is the heat of formation included in h[t]\n\ndetails: 🔃 Inputs and Outputs\nInput:alpha(.): mass fractions for gas constituents i = 1..n\nn: number of constituents present\nhspec: specified enthalpy\ntguess: first guess for temperatureOutput:t: temperature\n\n\n\n\n\n","category":"method"},{"location":"propulsion/gascalc/#TASOPT.engine.gas_tsetd-NTuple{4, Any}","page":"Gas Calculations","title":"TASOPT.engine.gas_tsetd","text":"gas_tsetd(alpha, n, hspec, tguess)\n\nSame as gas_tset, but also returns derivative\n\ndetails: 🔃 Inputs and Outputs\nInputs:alpha(.): mass fractions for gas constituents i = 1..n\nn: number of constituents present\nhspec: specified enthalpy\ntguess: first guess for temperatureOutputs:t: temperature\nt_hspec: ?\nt_al: ?\n\n\n\n\n\n","category":"method"},{"location":"propulsion/gascalc/#TASOPT.engine.gasfun","page":"Gas Calculations","title":"TASOPT.engine.gasfun","text":"gasfun(igas, t)\n\nComputes properties of a thermally-perfect gas with some variable specific heat cp[T].\n\ndetails: 🔃 Inputs and Outputs\nInput:igas: index specifying the gas (see if blocks below for list)\nt: temperature T in KelvinOutput:s: entropy-complement function s[T]\ns_t: ds/dT\nh: complete enthalpy function h[T]\nh_t: dh/dT\ncp: specific heat cp[T]\nr: ideal-gas constant R\n\nThe adiabatic pressure change over a process 1->2 with some polytropic efficiency epol is:\n\n p2 = p1 exp epol (s2-s1)R compression\n\n p2 = p1 exp (1epol) (s2-s1)R expansion\n\n\n\n\n\n","category":"function"},{"location":"propulsion/gascalc/#TASOPT.engine.gaschem-Tuple{Any}","page":"Gas Calculations","title":"TASOPT.engine.gaschem","text":"gaschem(igas)\n\nReturns number of C,H,O,N atoms in gas molecule, for the gases implemented in function gasfun above.\n\ndetails: 🔃 Inputs and Outputs\nInput:igas: index specifying the gas (see if blocks below for list)Output:nchon(.): number of C,H,O,N atoms in gas molecule\n\n\n\n\n\n","category":"method"},{"location":"propulsion/gascalc/#TASOPT.engine.gassum-Tuple{Any, Any, Any}","page":"Gas Calculations","title":"TASOPT.engine.gassum","text":"gassum(alpha, n, t)\n\nCalculates all gas-mixture properties at specified temperature T, and mixing fractions alpha(.)\n\ndetails: 🔃 Inputs and Outputs\nInputs:alpha(.): mass fractions for gas constituents i = 1..n\nn: number of gas constituents\nt: temperature T, KelvinOutputs:s: entropy-complement function s[T]\ns_t: ds/dT\nh: complete enthalpy function h[T]\nh_t: dh/dT\ncp: specific heat cp[T]\nr: ideal-gas constant R\n\n\n\n\n\n","category":"method"},{"location":"propulsion/gascalc/#TASOPT.engine.gassumd-Tuple{Any, Any, Any}","page":"Gas Calculations","title":"TASOPT.engine.gassumd","text":"gassumd(alpha, n, t)\n\nSame as gassum, but also returns cp_t\n\ndetails: 🔃 Inputs and Outputs\nInputs:alpha(.): mass fractions for gas constituents i = 1..n\nn: number of gas constituents\nt: temperature T, KelvinOutputs:s: entropy-complement function s[T]\ns_t: ds/dT\nh: complete enthalpy function h[T]\nh_t: dh/dT\ncp: specific heat cp[T]\nr: ideal-gas constant R\ncp_t: dcp / dT\n\n\n\n\n\n","category":"method"},{"location":"propulsion/gascalc/#TASOPT.engine.gas_prat-NTuple{10, Any}","page":"Gas Calculations","title":"TASOPT.engine.gas_prat","text":"gas_prat(alpha, n, po, to, ho, so, cpo, ro, pratio, epol)\n\nCalculates state change for a specified pressure ratio. The constant-cp equivalent is the usual isentropic relations, but with epol included.\n\ng = cp/(cp-r)\ngexp = (g-1)/(g*epol)\ntau = pratio^gexp\np = po * pratio\nt = to * tau\n(h-hf) = (ho-hf) * tau\n\ndetails: 🔃 Inputs and Outputs\nInputs:alpha(.): mass fractions for gas constituents i = 1..n\nn: number of gas constituents\npo: starting pressure\nto: starting temperature\nho: starting enthalpy\nso: starting entropy-complement\ncpo: starting specific heat\nro: starting gas constant\npratio: pressure ratio\nepol: polytropic efficiency of change process , if compression\nepol: 1/(polytropic efficiency of change process) , if expansionOutputs:p: ending pressure\nt: ending temperature\nh: ending enthalpy\ns: ending entropy-complement\ncp: ending specific heat\nr: ending gas constant (this will be the same as starting ro)\n\n\n\n\n\n","category":"method"},{"location":"propulsion/gascalc/#TASOPT.engine.gas_pratd-NTuple{10, Any}","page":"Gas Calculations","title":"TASOPT.engine.gas_pratd","text":"gas_pratd(alpha, n, po, to, ho, so, cpo, ro, pratio, epol)\n\nSame as gas_prat, but also returns Jacobians w.r.t. po,to,pratio,epol\n\ndetails: 🔃 Inputs and Outputs\nInputs:alpha(.): mass fractions for gas constituents i = 1..n\nn: number of gas constituents\npo: starting pressure\nto: starting temperature\nho: starting enthalpy\nso: starting entropy-complement\ncpo: starting specific heat\nro: starting gas constant\npratio: pressure ratio\nepol: polytropic efficiency of change process , if compression\nepol: 1/(polytropic efficiency of change process) , if expansionOutputs:p: ending pressure\nt: ending temperature\nh: ending enthalpy\ns: ending entropy-complement\ncp: ending specific heat\nr: ending gas constant (this will be the same as starting ro)\n\n\n\n\n\n","category":"method"},{"location":"propulsion/gascalc/#TASOPT.engine.gas_delh-NTuple{10, Any}","page":"Gas Calculations","title":"TASOPT.engine.gas_delh","text":"gas_delh(alpha, n, po, to, ho, so, cpo, ro, delh, epol)\n\nCalculates state change for a specified enthalpy change. The constant-cp equivalent is the usual isentropic relations, but with epol included.\n\n t - to = delh/cp\n g = cp/(cp-r)\n gexp = (g-1)/(g*epol)\n tau = t/to\n pi = tau^(1/gexp)\n p = po * pi\n (h-hf) = (ho-hf) * tau\n\ndetails: 🔃 Inputs and Outputs\nInputs:alpha(.): mass fractions for gas constituents i = 1..n\nn: number of constituents present\npo: starting pressure\nto: starting temperature\nho: starting enthalpy\nso: starting entropy-complement\ncpo: starting specific heat\nro: starting gas constant\ndelh: enthalpy change\nepol: polytropic efficiency of change process, if compression and 1/(polytropic efficiency of change process) , if expansionOutput:p: ending pressure\nt: ending temperature\nh: ending enthalpy\ns: ending entropy-complement\ncp: ending specific heat\nr: ending gas constant (this will be the same as starting ro)\n\n\n\n\n\n","category":"method"},{"location":"propulsion/gascalc/#TASOPT.engine.gas_delhd-NTuple{10, Any}","page":"Gas Calculations","title":"TASOPT.engine.gas_delhd","text":"gas_delhd(alpha, n, po, to, ho, so, cpo, ro, delh, epol)\n\nSame as gas_delh, but also returns Jacobians w.r.t. po,to,delh\n\ndetails: 🔃 Inputs and Outputs\nInputs:alpha(.): mass fractions for gas constituents i = 1..n\nn: number of constituents present\npo: starting pressure\nto: starting temperature\nho: starting enthalpy\nso: starting entropy-complement\ncpo: starting specific heat\nro: starting gas constant\ndelh: enthalpy change\nepol: polytropic efficiency of change process, if compression and 1/(polytropic efficiency of change process) , if expansionOutput:p: ending pressure\nt: ending temperature\nh: ending enthalpy\ns: ending entropy-complement\ncp: ending specific heat\nr: ending gas constant (this will be the same as starting ro)\np_so: \np_po: \np_ep: \np_ho: \nt_ho: \nh_ho: \ns_ho: \np_dh: \nt_dh: \nh_dh: \ns_dh: \np_al: \nt_al: \nh_al: \ns_al: \ncp_al: \nr_al: \n\n\n\n\n\n","category":"method"},{"location":"propulsion/gascalc/#TASOPT.engine.gas_burn-NTuple{8, Any}","page":"Gas Calculations","title":"TASOPT.engine.gas_burn","text":"gas_burn(alpha, beta, gamma, n, ifuel, to, tf, t)\n\nCalculates fuel/air mass fraction in combustion with specified start and end temperatures to,t . Calculates mass fractions of post-combustion constituents\n\ndetails: 🔃 Inputs and Outputs\nInput: alpha(.): mass fractions for air constituents i = 1..nbeta(.): mass fractions for fuel constituents i = 1..n\ngamma(.): mass fraction changes of air constituents due to combustion\nn: number of constituents present, air is 1..n-1, fuel is n\nifuel: index specifying fuel molecule\nto: starting air temperatur\ntf: starting fuel temperature\nt: temperature of combustion productsOutput: f: fuel/air mass fraction lambda(.): mass fractions for combustion product constituents\n\n\n\n\n\n","category":"method"},{"location":"propulsion/gascalc/#TASOPT.engine.gas_burnd-NTuple{8, Any}","page":"Gas Calculations","title":"TASOPT.engine.gas_burnd","text":"gas_burnd(alpha, beta, gamma, n, ifuel, to, tf, t)\n\nSame as gas_burn, but also returns derivatives.\n\ndetails: 🔃 Inputs and Outputs\nInput: alpha(.): mass fractions for air constituents i = 1..nbeta(.): mass fractions for fuel constituents i = 1..n\ngamma(.): mass fraction changes of air constituents due to combustion\nn: number of constituents present, air is 1..n-1, fuel is n\nifuel: index specifying fuel molecule\nto: starting air temperatur\ntf: starting fuel temperature\nt: temperature of combustion productsOutput: f: fuel/air mass fraction lambda(.): mass fractions for combustion product constituents f_t: l_to: l_tf: l_t: \n\n\n\n\n\n","category":"method"},{"location":"propulsion/gascalc/#TASOPT.engine.gas_mach-NTuple{11, Any}","page":"Gas Calculations","title":"TASOPT.engine.gas_mach","text":"gas_mach(alpha, n, po, to, ho, so, cpo, ro, mo, m, epol)\n\nCalculates state change for a specified Mach number change. The constant-cp equivalent is the usual isentropic relations, but with epol included.\n\ng = cp/(cp-r)\ngexp = (g-1)/(g*epol)\ntau = (1 + 0.5*(g-1)*mo^2) / (1 + 0.5*(g-1)*m^2)\npi = tau^(1/gexp)\np = po * pi\nt = to * tau\n(h-hf) = (ho-hf) * tau\n \n!!! details \"🔃 Inputs and Outputs\" \n**Input:**\n`alpha(.)`: mass fractions for gas constituents i = 1..n\n`n`: number of constituents present\n`po`: starting pressure\n`to`: starting temperature\n`ho`: starting enthalpy\n`so`: starting entropy-complement\n`cpo`: starting specific heat\n`ro`: starting gas constant\n`mo`: starting Mach number\n`m`: ending Mach number\n`epol`: polytropic efficiency of change process , if compression\n`epol`: 1/(polytropic efficiency of change process) , if expansion\n \n**Output:**\n`p`: ending pressure\n`t`: ending temperature\n`h`: ending enthalpy\n`s`: ending entropy-complement\n`cp`: ending specific heat\n`r`: ending gas constant (this will be the same as starting ro)\n\n\n\n\n\n","category":"method"},{"location":"propulsion/gascalc/#TASOPT.engine.gas_machd-NTuple{11, Any}","page":"Gas Calculations","title":"TASOPT.engine.gas_machd","text":"gas_machd(alpha, n, po, to, ho, so, cpo, ro, mo, m, epol)\n\nSame as gas_mach, but also returns derivatives\n\n\n\n\n\n","category":"method"},{"location":"propulsion/gascalc/#TASOPT.engine.gas_mass-NTuple{10, Any}","page":"Gas Calculations","title":"TASOPT.engine.gas_mass","text":"gas_mass(alpha, n, po, to, ho, so, cpo, ro, mflux, Mguess)\n\nCalculates state a specified mass flux. Mguess specifies the initial guess, and also selects either the subsonic or the supersonic branch.\n\ndetails: 🔃 Inputs and Outputs\nInput: alpha(.) mass fractions for gas constituents i = 1..nn number of constituents present po total pressureto total temperature ho total enthalpyso total entropy-complement cpo total specific heatro total gas constant mflux specified mass flux = rho u = mdot/AMguess specifies the initial guess for the static quantitiesOutput: p static pressuret static temperature h static enthalpys static entropy-complement cp static specific heatr static gas constant (this will be the same as total ro)\n\n\n\n\n\n","category":"method"},{"location":"propulsion/gascalc/#TASOPT.engine.gasfuel-Tuple{Any, Any}","page":"Gas Calculations","title":"TASOPT.engine.gasfuel","text":"gasfuel(ifuel, n)\n\nReturns mass fraction of constituent changes as a result of combustion with atmospheric oxygen\n\ndetails: 🔃 Inputs and Outputs\nInput:`ifuel index of fuel (see function gasfun)\n`n number of constituents in reactionOutput:`gamma(.) mass fraction changes due to reaction for i = 1..n\n\n\n\n\n\n","category":"method"},{"location":"propulsion/gascalc/#TASOPT.engine.gasPr-Tuple{Any, Any}","page":"Gas Calculations","title":"TASOPT.engine.gasPr","text":"gasPr(gas, T)\n\nThis function calculates some gas thermodynamic properties of different species, including viscosity, thermal conductivity, specific heat, and Prandtl number.\n\ndetails: 🔃 Inputs and Outputs\nInputs:gas::char: gas name\nT::Float64: temperature (K)Outputs:R::Float64: gas constant (J/kg/K)\nPr::Float64: Prandtl number\nγ::Float64: ratio of specific heats\ncp::Float64: specific heat at constant pressure (J/kg/K)\nμ::Float64: dynamic viscosity (Pa s)\nk::Float64: thermal conductivity (W/m/K) \n\n\n\n\n\n","category":"method"},{"location":"aero/theory_fuse_profile_drag/","page":"-","title":"-","text":"details: 📖 Theory - axisymmetric fuselage profile drag\nThe viscous calculation produces displacement, momentum, and kinetic energy areas Delta^* Theta Theta^* scriptstyle (x).The cross-sectional area over the center cylindrical portion is A_rm fuse, which has already been defined bybeginaligned\nA_rm fuse = left pi + n_rm fwebleft( 2theta_rm fb+ sin 2 theta_rm fbright) \n right R_rm fuse^2 + 2 left R_rm fuse+ n_rm fwebw_rm fbright Delta R_rm fuse\nendalignedThis also defines the radius of the equivalent round cylinder. beginaligned R_rm cyl = sqrtfracA_rm fusepi endaligned The equivalent radii over the tapering nose and radius are then defined via the following convenient functions.beginaligned\nR scriptstyle (x) = \nleft\nbeginarraylcl\ndisplaystyle\nR_rm cyl\nleft \n1 - left( fracx_rm blend_1 - xx_rm blend_1 - x_rm nose \n right)^ a \n right^ 1a\n x_rm nose x x_rm blend_1 \n10em\ndisplaystyle\nR_rm cyl\n x_rm blend_1 x x_rm blend_2\n05em\ndisplaystyle\nR_rm cyl\nleft \n1 - left( fracx - x_rm blend_2x_rm end - x_rm blend_ 2 \n right)^ b \n right\n x_rm blend_2 x x_rm tail\nendarray\nright\n\na simeq 16 \n\nb simeq 20 \nendalignedThe x_rm blend_1 and x_rm blend_2 locations are the nose and tailcone blend points, and do not necessarily have to be exactly the same as the x_rm shell_1 and x_rm shell_2 locations which define the loaded pressure shell. Likewise, x_rm end is the aerodynamic endpoint of the tailcone, and is distinct from its structural endpoint x_rm conend. The a and b constant values above give reasonable typical fuselage shapes.If the fuselage is nearly round, the necessary area and perimeter distributions follow immediately. beginaligned\nA scriptstyle (x) = pi Rscriptstyle (x)^2\n\nb_0 scriptstyle (x) = 2 pi R scriptstyle (x)\nendalignedThis would be suitably modified for non-circular cross-sections.With this geometry definition, the viscous/inviscid calculation procedure provides the momentum and kinetic energy area distributions along the body and wake,beginaligned\nleft Theta scriptstyle (s) Theta^* scriptstyle (s)right = \nf_rm f_excr \ncal F(M_scriptscriptstyle infty Re_ell A scriptstyle (x) b_0 scriptstyle (x))\nendalignedwhere cal F denotes the overall viscous/inviscid calculation procedure, and f_rm f_excr geq 1 is an empirical factor to allow for fuselage excrescence drag sources.Specific values of interest are the momentum area Theta_rm wake at the wake numerical endpoint s_rm wake, the far-downstream momentum area Theta_scriptscriptstyle infty, and the kinetic energy area Theta_scriptscriptstyle TE at the body endpoint or trailing edge. beginaligned\nTheta_rm wake = Theta (s_rm wake) \n\nH_rm avg = \ntextstyle frac12left H(s_rm wake) + 1 + (gamma-1) M_scriptscriptstyle infty^2 right\n\nTheta_scriptscriptstyle infty = Theta_rm wake\nleft( fracu_e (s_rm wake)V_scriptscriptstyle infty right)^H_rm avg \n\nTheta^*_scriptscriptstyle TE = Theta^*(s_scriptscriptstyle TE) \nendalignedThe equation above is the Squire-Young formula, with H_rm avg being the average shape parameter between the end of the wake and far downstream.The fuselage surface + wake dissipated power in the absence of BLI is then evaluated as follows, consistent with the usual wake momentum defect relations. beginaligned\nC_D_rm fuse equiv \nfracPhi_rm surf-P_V_rm surf + Phi_rm wake-P_V_rm wake\n textstyle frac12rho_scriptscriptstyle inftyV_scriptscriptstyle infty^3 S \nhspace6ex\nrm(without BLI)\nhspace-90ex\n\nC_D_rm fuse\n = fracD_rm fusetextstyle frac12rho_scriptscriptstyle inftyV_scriptscriptstyle infty^2 S\n= frac2 Theta_scriptscriptstyle inftyS \nhspace17ex\nrm(without BLI)\nhspace-90ex\nendalignedIf BLI is present at or near the trailing edge, the upstream boundary layer and corresponding surface dissipation Phi_rm surf will be mostly unaffected. But the viscous fluid flowing into the wake is now reduced by the ingestion fraction f_rm scriptscriptstyle BLI_scriptstyle f, so that the wake dissipation Phi_rm wake will be reduced by the same fraction. This then gives the following overall fuselage dissipation coefficient for the BLI case. beginaligned\nC_D_rm fuse = \nfracPhi_rm surf-P_V_rm surf + \n (Phi_rm wake-P_V_rm wake)(1-f_rm scriptscriptstyle BLI_scriptstyle f)\n textstyle frac12rho_scriptscriptstyle inftyV_scriptscriptstyle infty^3 S \nhspace3ex\nmathrm(with BLI)\nhspace-2ex\n\nC_D_rm fuse \n simeq \nC_D_rm fuse - C_Phi_rm wake f_rm scriptscriptstyle BLI_scriptstyle f\nhspace23ex\nmathrm(with BLI)\nhspace-2ex\n05em\nrmwhere hspace3ex\nC_Phi_rm wake = \nfrac2 Theta_scriptscriptstyle inftyS - fracTheta^*_scriptscriptstyle TES \nendaligned","category":"page"},{"location":"structures/fueltanks/#fueltanks","page":"Fuel tanks","title":"Fuel tanks","text":"","category":"section"},{"location":"structures/fueltanks/","page":"Fuel tanks","title":"Fuel tanks","text":"Liquid hydrocarbon fuel is assumed to be stored in the interior of the wings and no additional tanks are needed. The weight of the fuel is accounted for while sizing the wing structure. See structures.surfw.","category":"page"},{"location":"structures/fueltanks/","page":"Fuel tanks","title":"Fuel tanks","text":"However, alternate fuels such as cryogenic liquid hydrogen require additional storage tanks that are insulated pressure vessels.","category":"page"},{"location":"structures/fueltanks/","page":"Fuel tanks","title":"Fuel tanks","text":"structures.tanksize\nstructures.tankWmech\nstructures.tankWthermal\n","category":"page"},{"location":"structures/fueltanks/#TASOPT.structures.tanksize","page":"Fuel tanks","title":"TASOPT.structures.tanksize","text":" tanksize(gee, rhoFuel, deltap,\n Rfuse, dRfuse, hconvgas, h_LH2, Tfuel, Tair,\n h_v, t_cond, k, hconvair, time_flight, fstring,ffadd,\n wfb, nfweb, sigskin, rho_insul, rhoskin, Wfuel, threshold_percent, clearance_fuse, AR)\n\ntanksize sizes a cryogenic fuel tank for a LH-fueled aircraft\n\ndetails: 🔃 Inputs and Outputs\n**Inputs:**\n- `gee::Float64`: Gravitational acceleration (m/s^2).\n- `rhoFuel::Float64`: Density of fuel (kg/m^3).\n- `deltap::Float64`: Allowed pressure difference in vessel (Pa).\n- `Rfuse::Float64`: Fuselage radius (m).\n- `rho_insul::Array{Float64}`: Array of insulation layer densities (kg/m3).\n- `dRfuse::Float64`: Accounts for flatness at the bottom of the fuselage (m).\n- `xshell1::Float64`: Start x-coordinate of the tank (m).\n- `xshell2::Float64`: End x-coordinate of the tank (m).\n- `Thermal::Array{Float64}`: Conductivity array k (W/(m*K)) for each MLI layer.\n- `hconvgas::Float64`: Convective coefficient of insulating purged gas (e.g., N2) (W/m2*K).\n- `hconvair::Float64`: Convective coefficient of ambient air (W/m2*K).\n- `Thickness::Array{Float64}`: Thickness array t (m) for each MLI layer.\n- `h_LH2::Float64`: LH2 convective coefficient (W/m2*K).\n- `Tfuel::Float64`: Fuel temperature (K).\n- `Tair::Float64`: Ambient temperature (K).\n- `r_tank::Float64`: Tank outer radius (m).\n- `h_v::Float64`: Heat of vaporization of liquid hydrogen (J/kg).\n- `r_gas::Float64`: Inner radius of the gas-purged chamber (m).\n- `threshold_percent::Float64`: Max allowed percentage of fuel that is allowed to boil off.\n- `mode::Char`: '1' means optimize m_boiloff, '2' means find m_boiloff based on given thickness.\n\n**Outputs:**\n- `Wtank_total::Float64`: Total weight of the tank including fuel (N).\n- `thickness_insul::Float64`: Total thickness of the insulation (m).\n- `lshell::Float64`: Length of the tank (m).\n- `mdot_boiloff::Float64`: Mass boiled off during the mission flight (kg).\n- `Vfuel::Float64`: Volume of fuel (m^3).\n- `Wfuel_tot::Float64`: Weight of fuel (N).\n- `m_boiloff::Float64`: Mass boiled off (kg).\n- `tskin::Float64`: Thickness of the tank's skin (m).\n- `t_head::Float64`: Thickness of the tank's head (m).\n- `Rtank::Float64`: Radius of the tank (m).\n- `Whead::Float64`: Weight of the tank's head (N).\n- `Wcyl::Float64`: Weight of the tank's cylinder (N).\n- `Winsul_sum::Float64`: Sum of the insulation weight (N).\n- `Winsul::Float64`: Weight of insulation (N).\n- `l_tank::Float64`: Length of the tank (m).\n- `Wtank::Float64`: Weight of the tank structure (N).\n\nSee here.\n\n\n\n\n\n","category":"function"},{"location":"structures/fueltanks/#TASOPT.structures.tankWmech","page":"Fuel tanks","title":"TASOPT.structures.tankWmech","text":" tankWmech(gee, ρfuel,\n ftankstiff, ftankadd, Δp,\n Rfuse, dRfuse, wfb, nfweb,\n sigskin, rho_insul, rhoskin,\n Wfuel, m_boiloff, t_cond, clearance_fuse, AR)\n\ntankWmech calculates the weight of the cryogenic fuel tank for a LH-fueled aircraft.\n\ndetails: 🔃 Inputs and Outputs\nInputs:gee::Float64: Gravitational acceleration (m/s^2).\nρfuel::Float64: Fuel density (kg/m^3).\nftankstiff::Float64: Tank stiffness factor.\nftankadd::Float64: Additional mass factor for the tank.\nΔp::Float64: Pressure difference (Pa).\nRfuse::Float64: Fuselage radius (m).\ndRfuse::Float64: Subtraction factor accounting for fuselage flatness (m).\nwfb: Parameters for multiple-bubble configuration.\nnfweb: Number of bubbles.\nsigskin::Float64: Material property.\nrho_insul::Array{Float64}: Array of insulation layer densities (kg/m3).\nrhoskin::Float64: Material property.\nWfuel::Float64: Weight of fuel (N).\nm_boiloff::Float64: Mass boiled off during the mission flight (kg).\nt_cond::Array{Float64,1}: Thickness of insulation layers (m).\nclearance_fuse::Float64: Clearance for the fuselage (m).\nAR::Float64: Aspect ratio.Outputs:Wtank_total::Float64: Total tank weight including fuel (N).\nl_cyl::Float64: Length of the cylindrical portion (m).\ntskin::Float64: Thickness of the tank's skin (m).\nRtank_outer::Float64: Outer radius of the tank (m).\nVfuel::Float64: Volume of fuel (m^3).\nWtank::Float64: Weight of the empty tank (N).\nWfuel_tot::Float64: Total weight of fuel (N).\nWinsul_sum::Float64: Sum of insulation weight (N).\nt_head::Float64: Thickness of the tank's head (m).\nWhead::Float64: Weight of the tank's head (N).\nWcyl::Float64: Weight of the tank's cylinder (N).\nWinsul::Float64: Weight of insulation (N).\nShead_insul::Float64: Insulated surface area of the head (m^2).\nl_tank::Float64: Total length of the tank (m).\n\nNOTE: Al alloy 2219 has been recommended as tank material (from H2 tank paper in OneNote)\n\nSee here.\n\n\n\n\n\n","category":"function"},{"location":"structures/fueltanks/#TASOPT.structures.tankWthermal","page":"Fuel tanks","title":"TASOPT.structures.tankWthermal","text":" tankWthermal(l_cyl, r_tank, Shead,\n hconvgas, h_LH2, hconvair, \n t_cond, k, Tfuel, Tair, \n h_v:, time_flight)\n\ntankWthermal calculates the boil-off rate of LH2 for a given insulation thickness.\n\nThis subroutine does not size the thermal insulation layers but rather calculates the boil-off rate of fLH2, for a given insulation thickness\n\ndetails: 🔃 Inputs and Outputs\nInputs:l_cyl::Float64: Length of the tank (m).\nr_tank::Float64: Tank outer radius (m).\nShead::Array{Float64,1}: Array of surface areas of each layer of the end/head of the tank [m²].\nhconvgas::Float64: Convective coefficient of insulating purged gas (W/m²*K).\nh_LH2::Float64: LH2 convective coefficient (W/m²*K).\nhconvair::Float64: Convective coefficient of ambient air (W/m²*K).\nt_cond::Array{Float64,1}: Array of thickness of each layer in MLI (m).\nk::Array{Float64,1}: Thermal conductivity array (W/(m*K)) comprising k values for each MLI layer.\nTfuel::Float64: Fuel temperature (K).\nTair::Float64: Ambient temperature (K).\nh_v::Float64: Heat of vaporization of liquid hydrogen (J/kg).\ntime_flight::Float64: Time of flight (s).Outputs:m_boiloff::Float64: Boil-off LH2 mass (kg).\nmdot_boiloff::Float64: Boil-off rate of LH2 (kg/s).\n\nSee here.\n\n\n\n\n\n","category":"function"},{"location":"sizing/weightmodels/#weightmodels","page":"Weight models","title":"Weight models","text":"","category":"section"},{"location":"sizing/weightmodels/","page":"Weight models","title":"Weight models","text":"😬 wip","category":"page"},{"location":"sizing/weightmodels/","page":"Weight models","title":"Weight models","text":"See Chapter 2 of the TASOPT Technical Description in the interim.","category":"page"},{"location":"atmos/atmos/#Atmospheric-properties","page":"Atmospheric properties","title":"Atmospheric properties","text":"","category":"section"},{"location":"atmos/atmos/","page":"Atmospheric properties","title":"Atmospheric properties","text":"TASOPT.atmos","category":"page"},{"location":"atmos/atmos/#TASOPT.atmosphere.atmos","page":"Atmospheric properties","title":"TASOPT.atmosphere.atmos","text":"atmos(h)\n\nAtmospheric functions T(h), ρ(h) etc valid to h=20km, p(h) valid to h=70km.\n\nAlso calculates viscosity using Sutherland's law.\n\nUnits:\n\n[h] = km ASL\n[T] = Kelvin\n[p] = Pa\n[ρ] = kg/m^3\n[a] = m/s\n[μ] = kg/m-s \n\n\n\n\n\n","category":"function"},{"location":"atmos/atmos/","page":"Atmospheric properties","title":"Atmospheric properties","text":"This function can be used to return the atmospheric properties at a given altitude as follows:","category":"page"},{"location":"atmos/atmos/","page":"Atmospheric properties","title":"Atmospheric properties","text":"include(\"../../../src/atmos/atmos.jl\")\nusing .atmosphere","category":"page"},{"location":"atmos/atmos/","page":"Atmospheric properties","title":"Atmospheric properties","text":"h = 10.0 # km\nT,p,ρ,a,μ = atmos(h)\nT,p,ρ,a,μ","category":"page"},{"location":"structures/theory_wingstruct/","page":"-","title":"-","text":"details: 📖 Theory - Normal-plane Stresses\nTogether with the normal-plane coordinate and chord relations, the shear and bending moment are related to the corresponding airplane-axes quantities and to the sweep angle Lambda as follows.beginaligned\ncal S_scriptscriptstyle perp = cal S\nlabelSperp \ncal M_scriptscriptstyle perp = cal M cos Lambda\nlabelMperp\nendalignedThe box is assumed to be the only structurally-significant element, with the slats, flaps, and spoilers (if any), represented only by added weight. It is convenient to define all dimensions as ratios with the local normal-plane chord c_scriptscriptstyle perp.beginaligned\nbarh equiv frach_rm wboxc_scriptscriptstyle perp \nbarw equiv fracw_rm wboxc_scriptscriptstyle perp \nbart_rm capequiv fract_rm capc_scriptscriptstyle perp \nbart_rm webequiv fract_rm webc_scriptscriptstyle perp \nendalignedThe maximum height h_rm wbox at the box center corresponds to the airfoil thickness, so that barh is the usual \"tc\" airfoil thickness ratio. The height is assumed to taper off quadratically to a fraction r_h at the webs, so that the local height h scriptstyle (xi) is beginaligned h scriptstyle (xi) = h_rm wboxleft 1 - (1-r_h) xi^2 right endaligned where xi = -1 ldots 1 runs chordwise over the sparbox extent. Typical metal wings and airfoils have barw simeq 05, r_h simeq 075, although these are left as input parameters. For evaluating areas and approximating the bending inertia, it's useful to define the simple average and r.m.s. average normalized box heights. beginaligned\nbarh_rm avg = frac1c_scriptscriptstyle perp int_0^1 h scriptstyle (xi) rm dxi \n= barh left 1 - frac13(1-r_h) right\n\nbarh_rm rms^2 = frac1c_scriptscriptstyle perp^2 int_0^1 h^2 scriptstyle (xi) rm dxi \n= barh^2 left \n1 - frac23(1-r_h) + frac15 (1-r_h)^2 right\nendalignedThe areas and the bending and torsion inertias, all normalized by the normal chord, can now be determined. beginaligned\nbarA_rm fuelequiv fracA_rm fuelc_scriptscriptstyle perp^2 =\n(barw - 2 bart_rm web)(barh_rm avg- 2 bart_rm cap) \n\nbarA_rm capequiv fracA_rm capc_scriptscriptstyle perp^2 = 2 bart_rm capbarw \n\nbarA_rm webequiv fracA_rm webc_scriptscriptstyle perp^2 = 2 bart_rm web r_h barh \n\nbarI_rm cap simeq fracI_rm capc_scriptscriptstyle perp^4 =\nfracbarw12 \nleft barh_rm rms^3 - (barh_rm rms-2bart_rm cap)^3 right\n\nbarI_rm webequiv fracI_rm webc_scriptscriptstyle perp^4 =\nfracbart_rm web r_h^3 barh^36 ll barI_rm cap\nhspace2em mathrm(typically)\n\nGbarJ equiv \nfrac4 (barw - bart_rm web)^2 (barh_rm avg- bart_rm cap)^2\n displaystyle \n2 frac r_h barh - bart_rm capG_rm webbart_rm web +\n2 frac barw - bart_rm webG_rm capbart_rm cap \nendaligned","category":"page"},{"location":"aero/theory_geometry/","page":"-","title":"-","text":"details: 📖 Theory - Chord distribution\nThe wing or tail surface is assumed to have a two-piece linear planform with constant sweep Lambda, shown in the figure below. The inner and outer surface planforms are defined in terms of the center chord c_o and the inner and outer taper ratios. beginaligned\nlambda_s = c_sc_o\n\nlambda_t = c_tc_o\nendalignedSimilarly, the spanwise dimensions are defined in terms of the span b and the normalized spanwise coordinate eta.beginaligned\neta = 2y b \n\neta_o = b_o b\n\neta_s = b_sb \nendalignedFor generality, the wing center box width b_o is assumed to be different from the fuselage width to allow possibly strongly non-circular fuselage cross-sections. It will also be different for the tail surfaces. A planform break inner span b_s is defined, where possibly also a strut or engine is attached. Setting b_s = b_o and c_s = c_o will recover a single-taper surface.It's convenient to define the piecewise-linear normalized chord functionbeginaligned\nfracc scriptstyle (eta)c_o equiv \nC scriptstyle (eta eta_oeta_s lambda_slambda_t)\n = \nleft\nbeginarraylcl\n 1 0 eta eta_o \n05em\ndisplaystyle\n 1 + (lambda_s-1 ) fraceta - eta_oeta_s-eta_o\n eta_o eta eta_s \n025em\ndisplaystyle\nlambda_s + (lambda_t-lambda_s) fraceta - eta_s1-eta_s\n eta_s eta 1\nendarray\nright\nlabelceta\nendalignedThe following integrals will be useful for area, volume, shear, and moment calculations. beginaligned\nint_0^eta_o C rm deta \n = eta_o\n\nint_eta_o^eta_s C rm deta\n = frac12 ( 1+lambda_s)(eta_s-eta_o)\n\nint_eta_s^1 C rm deta \n = frac12 (lambda_s+lambda_t)(1-eta_s)\n025em\nint_0^eta_o C^2 rm deta \n = eta_o\n\nint_eta_o^eta_s C^2 rm deta\n = frac13 ( 1+lambda_s+lambda_s^2)(eta_s-eta_o)\n\nint_eta_s^1 C^2 rm deta \n = frac13 (lambda_s^2+lambda_s lambda_t+lambda_t^2)(1-eta_s)\n\n\nint_eta_o^eta_s C (eta-eta_o) rm deta\n = frac16 ( 1+2lambda_s)(eta_s-eta_o)^2\n\nint_eta_s^1 C (eta-eta_s) rm deta\n = frac16 (lambda_s+2lambda_t)(1-eta_s)^2\n\nint_eta_o^eta_s C^2 (eta-eta_o) rm deta\n = frac112 ( 1+2lambda_s+3lambda_s^2)(eta_s-eta_o)^2\n\nint_eta_s^1 C^2 (eta-eta_s) rm deta\n = frac112 (lambda_s^2+2lambda_slambda_t+3lambda_t^2)(1-eta_s)^2\nlabelCint2\nendaligned","category":"page"},{"location":"aero/theory_geometry/","page":"-","title":"-","text":"details: 📖 Theory - Surface area and aspect ratio\nThe surface area S is defined as the exposed surface area plus the fuselage carryover area. beginaligned\nS = 2 int_0^b2 c rm dy = c_o b K_c\nlabelSdef\n\nmathrmwhere hspace3em\nK_c = int_0^1 C rm deta = \neta_o + textstyle frac12( 1 +lambda_s)(eta_s-eta_o)\n + textstyle frac12(lambda_s+lambda_t )(1 -eta_s)\nendalignedThe aspect ratio is then defined in the usual way. This will also allow relating the root chord to the span and the taper ratios. beginaligned\nAhspace-05exR = fracb^2S\nlabelARdef\nendalignedIt is also useful to define the wing's mean aerodynamic chord c_rm ma and area-centroid offset scriptstyle Deltax_rm wing from the center axis.beginaligned\nfracc_rm mac_o =\nfrac1c_o frac2S int_0^b2 c^2 rm dy \n= fracK_ccK_c\n\nscriptstyle Deltax_rm wing\n=\nfrac2S int_b_o2^b2 c (y - y_o) tanLambda rm dy \n= fracK_cxK_c b tanLambda\n\nx_rm wing = x_rm wbox+ scriptstyle Deltax_rm wing\n025em\nmathrmwhere hspace1em\nK_cc = int_0^1 C^2 rm deta\nnonumber \n= eta_o\n+ frac13 ( 1 +lambda_s+lambda_s^2)(eta_s-eta_o)\n+ frac13 (lambda_s^2+lambda_s lambda_t+lambda_t^2)(1-eta_s)\nhspace3em\n025em\nK_cx = int_eta_o^1 C (eta-eta_o) rm deta \nnonumber \n=\nfrac112 ( 1 +2lambda_s)(eta_s-eta_o)^2 +\nfrac112 (lambda_s+2lambda_t)(1-eta_s)^2 +\nfrac14 (lambda_s+lambda_t)(1-eta_s)(eta_s-eta_o)\nhspace3em\nendalignedThe wing area centroid is used in the fuselage bending load calculations as described earlier.","category":"page"},{"location":"aero/theory_geometry/#Reference-quantities","page":"-","title":"Reference quantities","text":"","category":"section"},{"location":"aero/theory_geometry/","page":"-","title":"-","text":"The aircraft reference quantities are chosen to be simply the values for the wing. ","category":"page"},{"location":"aero/theory_geometry/","page":"-","title":"-","text":"beginaligned\nb_rm ref = (b)_rm wing\nS_rm ref = (S)_rm wing\nAhspace-05exR_rm ref = (Ahspace-05exR)_rm wing\nc_rm ref = (c_rm ma)_rm wing\nendaligned","category":"page"},{"location":"misc/misc/#Other-utilities","page":"Other utilities","title":"Other utilities","text":"","category":"section"},{"location":"misc/misc/#General-outputs","page":"Other utilities","title":"General outputs","text":"","category":"section"},{"location":"misc/misc/","page":"Other utilities","title":"Other utilities","text":"Modules = [Main]\nPages = [\"outputs.jl\",]","category":"page"},{"location":"misc/misc/#Outputs-for-post-processing","page":"Other utilities","title":"Outputs for post-processing","text":"","category":"section"},{"location":"misc/misc/","page":"Other utilities","title":"Other utilities","text":"The following tools can be used to generate outputs that can be further post-processed with other code.","category":"page"},{"location":"misc/misc/","page":"Other utilities","title":"Other utilities","text":"Modules = [Main]\nPages = [\"AircraftDeck.jl\", \"odperformance.jl\"]","category":"page"},{"location":"sizing/sizing/#Design-and-evaluation","page":"Design and evaluation","title":"Design and evaluation","text":"","category":"section"},{"location":"sizing/sizing/#sizing","page":"Design and evaluation","title":"Sizing the aircraft","text":"","category":"section"},{"location":"sizing/sizing/","page":"Design and evaluation","title":"Design and evaluation","text":"The aircraft is sized via a fixed point iteration for the design mission (wsize). The performance of the design can be evaluated for an off-design mission (woper).","category":"page"},{"location":"sizing/sizing/","page":"Design and evaluation","title":"Design and evaluation","text":"wsize is typically the driving script in an analysis, as is the case in the size_aircraft! call (as demonstrated in the first example). The sizing analysis calls the various performance routines (e.g., fusebl, surfw, cdsum, mission, etc.) as shown in the TASOPT flowchart.","category":"page"},{"location":"sizing/sizing/","page":"Design and evaluation","title":"Design and evaluation","text":"TASOPT.wsize(pari, parg, parm, para, pare,\n itermax, wrlx1, wrlx2, wrlx3,\n initwgt, initeng, iairf, Ldebug, printiter, saveODperf)\n\nTASOPT.woper(pari, parg, parm, para, pare, \n parad, pared, itermax, initeng, NPSS_PT, NPSS)","category":"page"},{"location":"sizing/sizing/#TASOPT.wsize-NTuple{15, Any}","page":"Design and evaluation","title":"TASOPT.wsize","text":"wsize(pari, parg, parm, para, pare,\n itermax, wrlx1, wrlx2, wrlx3,\n initwgt, initeng, iairf, Ldebug, printiter, saveODperf)\n\nMain weight sizing function. Calls on various sub-functions to calculate weight of fuselage, wings, tails, etc., and iterates until the MTOW converges to within a specified tolerance.\n\ndetails: 🔃 Inputs and Outputs\nInputs:Array of flags that control design choices - fuel types, where to store fuel, etc.\nGeometric and structural parameters - dimensions primarily\nAerodynamic parameters - CL, CD, KE dissipation, etc.\nMission-specific parameters - alt, mach, P, T etc.\nEngine-specific parameters Outputs:No explicit outputs. Computed quantities are saved to par arrays of aircraft model.\n\n\n\n\n\n","category":"method"},{"location":"sizing/sizing/#TASOPT.woper-NTuple{11, Any}","page":"Design and evaluation","title":"TASOPT.woper","text":"woper(pari, parg, parm, para, pare, \n parad, pared, itermax, initeng, NPSS_PT, NPSS)\n\nwoper runs the aircraft through input off-design missions\n\ncompat: Future Changes\nIn an upcoming revision, an aircraft struct and auxiliary indices will be passed in lieu of pre-sliced par arrays.\n\n\n\n\n\n","category":"method"},{"location":"sizing/sizing/","page":"Design and evaluation","title":"Design and evaluation","text":"","category":"page"},{"location":"sizing/sizing/#missionexec","page":"Design and evaluation","title":"Mission evaluation","text":"","category":"section"},{"location":"sizing/sizing/","page":"Design and evaluation","title":"Design and evaluation","text":"A sized aircraft's mission performance can be obtained (mission!), along with operation constraints via a pitch trim calculation (balance) and balanced field length calculation (takeoff!).","category":"page"},{"location":"sizing/sizing/","page":"Design and evaluation","title":"Design and evaluation","text":"TASOPT.mission!(pari, parg, parm, para, pare, Ldebug)\n\nTASOPT.takeoff!(pari, parg, parm, para, pare,\n initeng,\n ichoke5, ichoke7)\n\nTASOPT.balance(pari, parg, para, rfuel, rpay, ξpay, itrim)\n","category":"page"},{"location":"sizing/sizing/#TASOPT.mission!-NTuple{6, Any}","page":"Design and evaluation","title":"TASOPT.mission!","text":"mission!(pari, parg, parm, para, pare, Ldebug)\n\nRuns aircraft through mission, calculating fuel burn and other mission variables.\n\nInput: pari[.] integer flags parg[.] geometry parameters parm[.] mission parameters iairf index of airfoil database to use initeng 0 = engine state will be initialized for all points 1 = engine state is assumed to be initialized ipc1 0 = ipcruise1 aero and engine point needs to be calculated 1 = ipcruise1 aero and engine point assumed calculated\n\nInput/Output: para[.p] aero parameters for points p=1..iptotal pare[.p] engine parameters for points p=1..iptotal\n\nNOTE: This routine assumes that estimates of the climb-leg flight path gamma angles are passed in via para[iagamV,ipclimb1:ipclimbn]. These appear as cos(gamma) factors in the climb equations, and can be passed in as zero with only a minor error. They are updated and returned in the same para[iagamV,ip] array.\n\n!!! compat \"Future Changes\" In an upcoming revision, an aircraft struct and auxiliary indices will be passed in lieu of pre-sliced par arrays.\n\n\n\n\n\n","category":"method"},{"location":"sizing/sizing/#TASOPT.takeoff!-NTuple{8, Any}","page":"Design and evaluation","title":"TASOPT.takeoff!","text":" takeoff(pari, parg, parm, para, pare,\n initeng, ichoke5, ichoke7)\n\n Calculates takeoff parameters and balanced field length.\n The aircraft must be defined in parg array. The ipstatic and iprotate points are assumed to exist.\n\n !!! compat \"Future Changes\"\n In an upcoming revision, an `aircraft` struct and auxiliary indices will be passed in lieu of pre-sliced `par` arrays.\n\n\n\n\n\n","category":"method"},{"location":"sizing/sizing/#TASOPT.balance-NTuple{7, Any}","page":"Design and evaluation","title":"TASOPT.balance","text":" balance(pari, parg, para, rfuel, rpay, ξpay, itrim)\n\nMakes one of three (or none) changes to achieve pitch trim calculates resulting CG, CP, NP locations.\n\nInputs:\n\npari[.] integer flag array\nparg[.] geometry parameter array\npara[.] aero parameter array\nrfuel fuel fraction Wfuelactual/WfuelMTOW\nrpay payload fraction Wpayactual/WpayMTOW\nξpay partial-payload packing location\n= 0.0 all the way in front of cabin\n= 0.5 all the way in middle of cabin\n= 1.0 all the way in back of cabin\niengloc engine location index\nitrim = 0 no changes\n= 1 adjust CLh (horizontal tail cl)\n= 2 adjust Sh (horizontal tail area)\n= 3 adjust xwbox (wing box location)\n\nOutputs: \n\npara[iaxCG] center of gravity\npara[iaxCP] center of pressure ( = xCG if itrim=1,2,3 )\npara[iaxNP] neutral point location\n\ncompat: Future Changes\nIn an upcoming revision, an aircraft struct and auxiliary indices will be passed in lieu of pre-sliced par arrays.\n\n\n\n\n\n","category":"method"},{"location":"balance/balance/#Stability-and-balance","page":"Stability","title":"Stability and balance","text":"","category":"section"},{"location":"balance/balance/","page":"Stability","title":"Stability","text":"TASOPT.balance\nTASOPT.cglpay\nTASOPT.htsize","category":"page"},{"location":"balance/balance/#TASOPT.balance","page":"Stability","title":"TASOPT.balance","text":" balance(pari, parg, para, rfuel, rpay, ξpay, itrim)\n\nMakes one of three (or none) changes to achieve pitch trim calculates resulting CG, CP, NP locations.\n\nInputs:\n\npari[.] integer flag array\nparg[.] geometry parameter array\npara[.] aero parameter array\nrfuel fuel fraction Wfuelactual/WfuelMTOW\nrpay payload fraction Wpayactual/WpayMTOW\nξpay partial-payload packing location\n= 0.0 all the way in front of cabin\n= 0.5 all the way in middle of cabin\n= 1.0 all the way in back of cabin\niengloc engine location index\nitrim = 0 no changes\n= 1 adjust CLh (horizontal tail cl)\n= 2 adjust Sh (horizontal tail area)\n= 3 adjust xwbox (wing box location)\n\nOutputs: \n\npara[iaxCG] center of gravity\npara[iaxCP] center of pressure ( = xCG if itrim=1,2,3 )\npara[iaxNP] neutral point location\n\ncompat: Future Changes\nIn an upcoming revision, an aircraft struct and auxiliary indices will be passed in lieu of pre-sliced par arrays.\n\n\n\n\n\n","category":"function"},{"location":"balance/balance/#TASOPT.cglpay","page":"Stability","title":"TASOPT.cglpay","text":"Calculates min and max xCG locations from payload extremes, and corresponding payload fractions.\n\nrfuelF,rpayF give most-forward location xcgF rfuelB,rpayB give most-rearward location xcgB\n\nThis version always returns rfuelF = rfuelB = 0.0 which gives an explicit solution for rpayF,rpayB.\n\nThe alternative 2D search for rfuel,rpay is kinda ugly, and unwarranted in practice.\n\n\n\n\n\n","category":"function"},{"location":"balance/balance/#TASOPT.htsize","page":"Stability","title":"TASOPT.htsize","text":"Sets horizontal tail area and wing position to simultaneously:\n\nMeet pitch trim requirement with forward CG\nMeet stability requirement with aft CG\n\nCalculates resulting CG, CP, NP locations\n\nInputs: \n\npari[.] integer fla array\nparg[.] geometry parameter array\nparaF[.] aero parameter array for fwdCG case\nparaB[.] aero parameter array for aft CG case\nparaC[.] aero parameter array for cruise tail CL case\n\nOutputs: \n\nparg[igSh] HT area\nparg[igxwbox] wingbox location\nparg[igxwing] wing centroid location\n\n\n\n\n\n","category":"function"},{"location":"aero/theory_trefftz_plane/","page":"-","title":"-","text":"details: 📖 Theory - induced drag $C_{d,i}$\nThe induced drag is calculated using a discrete vortex Trefftz-Plane analysis. The circulation of the wing wake immediately behind the trailing edge is beginaligned\nGamma_rm wing scriptstyle (eta)\n = fractildep scriptstyle (eta)rho_scriptscriptstyle inftyV_scriptscriptstyle infty\n simeq fracp scriptstyle (eta)rho_scriptscriptstyle inftyV_scriptscriptstyle infty sqrt1 - eta^k_t\n\nk_t simeq 16\nendalignedwhere the approximation realistically represents the tip lift rolloff for typical taper ratios, and is consistent with the assumed f_L_scriptstyle tsimeq -005 value for the tip lift loss factor. This circulation is convected into the wake along streamlines which will typically constrict behind the fuselage by continuity. The Figure above shows two possible aft fuselage taper shapes, giving two different wake constrictions.An annular streamtube at the wing contracts to another annular streamtube in the wake with the same cross-sectional area. The y and y locations on the wing and wake which are connected by a streamline are therefore related by the correspondence function. beginaligned\nyscriptstyle (y) = sqrt y^2 - y_o^2 + y_o^2\nendalignedThe Trefftz Plane circulation Gamma scriptstyle (y) is then given by the coordinate shift. The mapping function yscriptstyle (y) is not defined for y y_o, so the circulation there is simply set from the y_o value. beginaligned\nGamma_rm wake scriptstyle (y) = \nleft\nbeginarraylcl\nGamma_rm wing left( y scriptstyle (y)right)\n y y_o \nGamma_rm wing left( y_o right)\nendarray\nright\nendalignedThe Trefftz Plane analysis uses point vortices. The circulation ([Gamwake]) is evaluated at the midpoints of n intervals along the wake trace, spaced more or less evenly in the Glauert angle to give a cosine distribution in physical space. The wake's vertical z positions are simply taken directly from the wing. beginaligned\ntheta_i+12 = fracpi2 fraci-12n\nhspace2ex hspace2ex i = 1 ldots n\n\ny_i+12 = fracb2 cos theta_i+12\n\ny_i+12 = sqrty_i+12^2 - y_o^2 + y_o^2\n\nz_i+12 = z_i+12\n\nGamma_i+12 = Gamma_rm wing (y_i+12)\nendalignedThe locations of n+1 trailing vortices are computed similarly. beginaligned\ntheta_i = fracpi2 fraci-1n\nhspace2ex hspace2ex i = 1 ldots n+1\n\ny_i = fracb2 cos theta_i\n\ny_i = sqrty_i^2 - y_o^2 + y_o^2\n\nz_i = z_i\nendalignedThe circulations of these trailing vortices are the differences of the adjacent bound circulations, with the circulation beyond the tips effectively zero. beginaligned\nbarGamma_i = \nleft\nbeginarraylcl\nhspace65ex\n-Gamma_i-12 i = 1 hspace35em mathrm(left tip)\n\nGamma_i+12-Gamma_i-12 i = 2 ldots n\n\nGamma_i+12 i = n+1 hspace2em mathrm(right tip)\nendarray\nright\nendalignedThe above definitions are also applied to the horizontal tail, with its discrete points simply appended to the list and n increased accordingly.The Trefftz plane calculation proceeds by first calculating the y-z wake velocity components at the y_i+12z_i+12 interval midpoints, induced by all the trailing vortices and their left-side images. beginaligned\nv_i+12 = sum_j=1^n+1 fracbarGamma_j2pi \nleft\nfrac-(z_i+12-z_j)\n (y_i+12-y_j)^2\n + (z_i+12-z_j)^2\n-\nfrac-(z_i+12-z_j)\n (y_i+12+y_j)^2\n + (z_i+12-z_j)^2\nright\nhspace2em\n\nw_i+12 = sum_j=1^n+1 fracbarGamma_j2pi\nleft\nfrac y_i+12-y_j\n (y_i+12-y_j)^2\n + (z_i+12-z_j)^2\n-\nfrac y_i+12+y_j\n (y_i+12+y_j)^2\n + (z_i+12-z_j)^2\nright\nendalignedThe overall lift and induced drag are then computed using the Trefftz Plane vertical impulse and kinetic energy. The sums are doubled to account for the left side image. beginaligned\nC_L_scriptscriptstyle TP = frac2textstyle frac12rho_scriptscriptstyle inftyV_scriptscriptstyle infty^2 S sum_i=1^n \n rho_scriptscriptstyle inftyV_scriptscriptstyle infty Gamma_i+12 (y_i+1-y_i)\n\nC_D_scriptscriptstyle TP = frac2textstyle frac12rho_scriptscriptstyle inftyV_scriptscriptstyle infty^2 S sum_i=1^n \n-fracrho_scriptscriptstyle infty2 Gamma_i+12 left\n w_i+12 (y_i+1-y_i)\n -v_i+12 (z_i+1-z_i) right\nendalignedTo minimize any modeling and numerical errors incurred in the wake contraction model and the point-vortex summations, the final induced drag value is scaled by the square of the surface-integral and Trefftz-Plane drag values. beginaligned\nC_D_i = C_D_scriptscriptstyle TP left(fracC_LC_L_scriptscriptstyle TP right)^2\nendalignedThis is equivalent to using the Trefftz Plane analysis to calculate the span efficiency rather than the actual induced drag coefficient.","category":"page"},{"location":"structures/wing/#wingtail","page":"Wings and tails","title":"Wings and tails","text":"","category":"section"},{"location":"structures/wing/","page":"Wings and tails","title":"Wings and tails","text":"The structural loads of the surfaces balance the net loads and moments resulting from weight and aerodynamics (tildep) as summarized in the Figure below. The distributions are also modified by point loads (i.e., engines and an optional strut).","category":"page"},{"location":"structures/wing/","page":"Wings and tails","title":"Wings and tails","text":"(Image: )","category":"page"},{"location":"structures/wing/","page":"Wings and tails","title":"Wings and tails","text":"The wing and tail surface stress and weight analyses are performed in the cross-sectional plane, normal to the spanwise axis y_scriptscriptstyle perp running along the wing box. The assumed wing or tail airfoil and structural box cross-section is shown in the figure below. Note that leading edges, fairings, slats, flaps, and spoilers contribute to weight but not to the primary structure.","category":"page"},{"location":"structures/wing/","page":"Wings and tails","title":"Wings and tails","text":"(Image: )","category":"page"},{"location":"structures/wing/","page":"Wings and tails","title":"Wings and tails","text":"using Markdown\nMarkdown.parse_file(joinpath(\"../..\", \"src/structures\",\"theory_wingstruct.md\"))","category":"page"},{"location":"structures/wing/","page":"Wings and tails","title":"Wings and tails","text":"\nstructures.surfw(po,b,bs,bo,co,zs,\n\tlambdat,lambdas,gammat,gammas,\n\tNload,iwplan,We,neout, dyeout, neinn, dyeinn,\n\tWinn,Wout,dyWinn,dyWout,\n\tsweep,wbox,hboxo,hboxs,rh, fLt,\n\ttauweb,sigcap,sigstrut,Ecap,Eweb,Gcap,Gweb,\n\trhoweb,rhocap,rhostrut,rhofuel)\n\nstructures.tailpo(S, AR, λa, qne, CLmax)\n\nstructures.surfdx(b, bs, bo, λt, λs, sweep)","category":"page"},{"location":"structures/wing/#TASOPT.structures.surfw-NTuple{38, Any}","page":"Wings and tails","title":"TASOPT.structures.surfw","text":"surfw(po, b, bs, bo, co, zs,\n lambdat, lambdas, gammat, gammas,\n Nload, iwplan, We, neout, dyeout, neinn, dyeinn,\n Winn, Wout, dyWinn, dyWout,\n sweep, wbox, hboxo, hboxs, rh, fLt,\n tauweb, sigcap, sigstrut, Ecap, Eweb, Gcap, Gweb,\n rhoweb, rhocap, rhostrut, rhofuel)\n\nCalculates Wing or Tail loads, stresses, weights of individual wing sections. Also returns the material gauges, torsional and bending stiffness.\n\ndetails: 🔃 Inputs and Outputs\nInputs:po::Float64: Point where loads and stresses are calculated.\nb::Float64: Wingspan.\nbs::Float64: Spanwise location of the start of the taper.\nbo::Float64: Spanwise location of the root chord.\nco::Float64: Root chord length.\nzs::Float64: Height of the strut attach point above wing.\nlambdat::Float64: Tip chord ratio (tip chord / root chord).\nlambdas::Float64: Start chord ratio (start chord / root chord).\ngammat::Float64: Tip airfoil section shape exponent.\ngammas::Float64: Start airfoil section shape exponent.\nNload::Int: Number of loads (used to distribute engine loads).\niwplan::Int: Indicates the presence of a strut.\nWe::Float64: Weight of the engine.\nneout::Int: Number of outboard engines.\ndyeout::Float64: Distance between engines and the wingtip.\nneinn::Int: Number of inboard engines.\ndyeinn::Float64: Distance between engines and the wing root.\nWinn::Float64: Weight of inboard engines.\nWout::Float64: Weight of outboard engines.\ndyWinn::Float64: Weight distribution of inboard engines.\ndyWout::Float64: Weight distribution of outboard engines.\nsweep::Float64: Sweep angle in degrees.\nwbox::Float64: Width of the wing box.\nhboxo::Float64: Height of the wing box at the root.\nhboxs::Float64: Height of the wing box at the strut attach point.\nrh::Float64: Fractional height of the wing box.\nfLt::Float64: Factor applied to the tip load.\ntauweb::Float64: Web material shear strength.\nsigcap::Float64: Cap material axial compressive strength.\nsigstrut::Float64: Strut material axial compressive strength.\nEcap::Float64: Cap material Young's modulus.\nEweb::Float64: Web material Young's modulus.\nGcap::Float64: Cap material shear modulus.\nGweb::Float64: Web material shear modulus.\nrhoweb::Float64: Density of the web material.\nrhocap::Float64: Density of the cap material.\nrhostrut::Float64: Density of the strut material.\nrhofuel::Float64: Density of the fuel.Outputs:Ss::Float64: Outboard section shear load.\nMs::Float64: Outboard section moment.\ntbwebs::Float64: Web thickness at the strut attach point.\ntbcaps::Float64: Cap thickness at the strut attach point.\nEIcs::Float64: Combined cap and web bending stiffness at the strut attach point.\nEIns::Float64: Combined cap and web normal stiffness at the strut attach point.\nGJs::Float64: Combined cap and web shear stiffness at the strut attach point.\nSo::Float64: Inboard section shear load.\nMo::Float64: Inboard section moment.\ntbwebo::Float64: Web thickness at the wing root.\ntbcapo::Float64: Cap thickness at the wing root.\nEIco::Float64: Combined cap and web bending stiffness at the wing root.\nEIno::Float64: Combined cap and web normal stiffness at the wing root.\nGJo::Float64: Combined cap and web shear stiffness at the wing root.\nAstrut::Float64: Strut axial force.\nlsp::Float64: Strut length.\ncosLs::Float64: Cosine of the sweep angle at the strut attach point.\nWscen::Float64: Weight of center section (inboard of the strut).\nWsinn::Float64: Weight of the inner section.\nWsout::Float64: Weight of the outer section.\ndxWsinn::Float64: Lateral distribution of inner section weight.\ndxWsout::Float64: Lateral distribution of outer section weight.\ndyWsinn::Float64: Vertical distribution of inner section weight.\ndyWsout::Float64: Vertical distribution of outer section weight.\nWfcen::Float64: Weight of center section fuel.\nWfinn::Float64: Weight of the inner section fuel.\nWfout::Float64: Weight of the outer section fuel.\ndxWfinn::Float64: Lateral distribution of inner section fuel weight.\ndxWfout::Float64: Lateral distribution of outer section fuel weight.\ndyWfinn::Float64: Vertical distribution of inner section fuel weight.\ndyWfout::Float64: Vertical distribution of outer section fuel weight.\nWweb::Float64: Weight of the wing web.\nWcap::Float64: Weight of the wing cap.\nWstrut::Float64: Weight of the strut.\ndxWweb::Float64: Lateral distribution of web weight.\ndxWcap::Float64: Lateral distribution of cap weight.\ndxWstrut::Float64: Lateral distribution of strut weight.\n\nSee Geometry, Wing/Tail Structures, and Section 2.7 of the TASOPT Technical Description. \n\n\n\n\n\n","category":"method"},{"location":"structures/wing/#TASOPT.structures.tailpo-NTuple{5, Any}","page":"Wings and tails","title":"TASOPT.structures.tailpo","text":"tailpo(S, AR, λa, qne, CLmax)\n\nCalculates stabilizer span, root chord, and root loading based on the never-exceed dynamic pressure, maximum CL, sweep, and aspect ratio.\n\ndetails: 🔃 Inputs and Outputs\nInputs:S::Float64: Stabilizer area.\nAR::Float64: Stabilizer aspect ratio.\nλa::Float64: Stabilizer taper ratio (tip chord / root chord).\nqne::Float64: Never-exceed dynamic pressure.\nCLmax::Float64: Maximum coefficient of lift.Outputs:b::Float64: Stabilizer wingspan.\nco::Float64: Stabilizer root chord length.\npo::Float64: Stabilizer root loading.\n\nSee Geometry or Section 2.3.2 and 2.9.6 of the TASOPT Technical Description.\n\n\n\n\n\n","category":"method"},{"location":"structures/wing/#TASOPT.structures.surfdx-NTuple{6, Any}","page":"Wings and tails","title":"TASOPT.structures.surfdx","text":" surfdx(b, bs, bo, λt, λs, sweep)\n\nCalculates area centroid x-offset due to sweep and the mean aerodynamic chord (normalized by root chord, co)\n\ndetails: 🔃 Inputs and Outputs\nInputs:b::Float64: Wingspan\nbs::Float64: Spanwise location of the start of the taper\nbo::Float64: Spanwise location of the root chord\nλt::Float64: Tip chord ratio (tip chord / root chord)\nλs::Float64: Start chord ratio (start chord / root chord).\nsweep::Float64: Sweep angle in degrees.Outputs:dx::Float64: Area centroid x-offset due to sweep\nmacco::Float64: Mean aerodynamic chord normalized by root chord.\n\nSee Geometry or Section 2.5.1 of the TASOPT Technical Description.\n\n\n\n\n\n","category":"method"},{"location":"examples/payload_range/#Example-for-a-Payload-Range-diagram","page":"Payload-range diagram","title":"Example for a Payload-Range diagram","text":"","category":"section"},{"location":"examples/payload_range/","page":"Payload-range diagram","title":"Payload-range diagram","text":"(Image: PayloadRangePlot)","category":"page"},{"location":"examples/payload_range/#Choosing-a-design-mission","page":"Payload-range diagram","title":"Choosing a design mission","text":"","category":"section"},{"location":"examples/payload_range/","page":"Payload-range diagram","title":"Payload-range diagram","text":"To plot a payload-range diagram with a fleet of missions you must first load a model with >=1 non design mission","category":"page"},{"location":"examples/payload_range/","page":"Payload-range diagram","title":"Payload-range diagram","text":"Start by choosing a design mission. Your design mission should be what you want the second corner point in your Payload Range plot to be. Once you have a chosen a specific design range and payload weight (For eg: 3500 nmi and 195 pax) you can add it to the input toml file: default_input.toml","category":"page"},{"location":"examples/payload_range/","page":"Payload-range diagram","title":"Payload-range diagram","text":"[Mission]\n N_missions = 5 # Number of missions to be modeled (first mission is the design mission)\n pax = 195 # Number of passengers in each mission\n range = \"3500.0 nmi\" # Design Range + second mission range\n #[\"3000.0 nmi\", \"500.0 nmi\", \"2500.0 nmi\", \"3550.0 nmi\", \"3734.0 nmi\"] # Design Range + second mission range\n weight_per_pax = \"215.0 lbf\" # Specify weight per passenger - \n # includes luggage [lbm or lbf or kg or N] ","category":"page"},{"location":"examples/payload_range/#Julia-script-for-Payload-Range-Diagram","page":"Payload-range diagram","title":"Julia script for Payload Range Diagram","text":"","category":"section"},{"location":"examples/payload_range/","page":"Payload-range diagram","title":"Payload-range diagram","text":"Start the script importing TASOPT.jl, PyPlot and index.inc and then loading the default aircraft model.","category":"page"},{"location":"examples/payload_range/","page":"Payload-range diagram","title":"Payload-range diagram","text":"# Import modules\nusing PyPlot\nusing TASOPT\n# you can optionally define\n# const tas = TASOPT \n# to use as a shorthand\ninclude(\"../src/misc/index.inc\")\n# import indices for calling parameters\n\n# Load aircraft using default module\nac = TASOPT.read_aircraft_model(joinpath(TASOPT.__TASOPTroot__, \"../example/PRD_input.toml\"))\ntime_wsize = @elapsed size_aircraft!(ac)","category":"page"},{"location":"examples/payload_range/","page":"Payload-range diagram","title":"Payload-range diagram","text":"Initialize some variables for mission range and payloads","category":"page"},{"location":"examples/payload_range/","page":"Payload-range diagram","title":"Payload-range diagram","text":"nmis = size(ac.parm)[2] # Get number of missions\nMAX_PAYLOAD = 230 * 215 * 4.448222 # Starting Payload, #Passengers * 215 lb * lb_to_N\n# Ranges:\nRange_arr_nmi = LinRange(100, 1000, nmis-1) # Starting range array (in nmi)\nRange_arr = Range_arr_nmi .* 1852.0 # Convert to SI units\nMax_range = Range_arr[nmis-1]\ncurr_range = Range_arr[1]\nprev_range = 0.1","category":"page"},{"location":"examples/payload_range/#Initialize-variables-for-mission-iterations","page":"Payload-range diagram","title":"Initialize variables for mission iterations","text":"","category":"section"},{"location":"examples/payload_range/","page":"Payload-range diagram","title":"Payload-range diagram","text":"NPSS = Base.Process\nNPSS_PT = true\nitermax = 15\niniteng = 0\nLdebug = false\nsaveOD = false\nSEC_B = false\nx_range = []\ny_payload = []\ny_Wemtpy = []","category":"page"},{"location":"examples/payload_range/#Main-iteration-loop","page":"Payload-range diagram","title":"Main iteration loop","text":"","category":"section"},{"location":"examples/payload_range/","page":"Payload-range diagram","title":"Payload-range diagram","text":"while MAX_PAYLOAD >= 0\n println(\"-----------------------\")\n println(\"Starting new set of missions, \\n Ranges: \", Range_arr, \"\\n Payload: \", MAX_PAYLOAD./(215*4.448222))\n try\n # Set non design mission ranges and payloads\n ac.parm[imRange, 2:5] .= Range_arr\n ac.parm[imWpay, 2:5] .= MAX_PAYLOAD\n # Analyze each mission\n for mi in 2:size(ac.parm)[2]\n prev_range = curr_range\n curr_range = ac.parm[imRange, mi]\n # Call TASOPT woper function\n @views TASOPT.woper(ac.pari,ac.parg,ac.parm[:,mi:mi],ac.para[:,:,mi:mi],ac.pare[:,:,mi:mi], ac.para[:,:,1:1],ac.pare[:,:,1:1], itermax,initeng, NPSS_PT, NPSS)\n # Check if mission fuel and MTO weight is greater than design fuel and MTO weight\n if (ac.parm[imWfuel,mi] - ac.parg[igWfuel] > 1) || (ac.parm[imWTO,mi] - ac.parg[igWMTO] > 1 )\n printstyled(\"Mission designed beyond capacity!\", \"\\n\"; color=:red)\n println([ac.parg[igWfuel], ac.parm[imWfuel,mi], ac.parg[igWMTO], ac.parm[imWTO,mi]])\n throw(UndefVarError([ac.parg[igWfuel], ac.parm[imWfuel,mi], ac.parg[igWMTO], ac.parm[imWTO,mi]]))\n end\n\n # Add to dataframes\n append!(x_range, curr_range)\n append!(y_payload, MAX_PAYLOAD)\n append!(y_WTO, ac.parm[imWTO,mi])\n\n # If in section B of Payload Range plot, decrease payload by 1 passenger\n if SEC_B\n println(\"decreasing payload since Section B\")\n MAX_PAYLOAD = max(0, MAX_PAYLOAD-(1*215*4.448222))\n end\n end\n println(\"PRD converged for all: Increasing Ranges\")\n prev_range = curr_range\n Max_range = prev_range+ (500* 1852.0) #Increase range array by 500 nmi\n catch\n println(\"PRD failed: Decreasing Payload and range\")\n prev_range = curr_range\n Max_range = prev_range+ ((Max_range-prev_range)*0.75)\n MAX_PAYLOAD = MAX_PAYLOAD-pax2N(5)\n SEC_B = true\n end\n Range_arr = LinRange(prev_range, Max_range, nmis-1)\n println(\"-----------------------\")\nend","category":"page"},{"location":"examples/payload_range/#Plot-Payload-Range-diagram","page":"Payload-range diagram","title":"Plot Payload Range diagram","text":"","category":"section"},{"location":"examples/payload_range/","page":"Payload-range diagram","title":"Payload-range diagram","text":"using PyPlot\nfigure()\ny_OEW = y_Wemtpy .+ y_payload\nplot(x_range ./ (1852.0*1000), y_OEW./ (4.448222* 1000), linestyle=\"-\", color=\"b\", label=\"OEW + Payload \")\n\nxlabel(\"Range (1000 nmi)\")\nylabel(\"Weight (1000 lbs)\")\ntitle(\"Payload Range Plot\")\n\nlegend()\ngrid()\nsavefig(\"./PayloadRangeExample.png\")","category":"page"},{"location":"propulsion/hxfun/#Heat-exchangers","page":"Heat exchangers","title":"Heat exchangers","text":"","category":"section"},{"location":"propulsion/hxfun/#Theory","page":"Heat exchangers","title":"Theory","text":"","category":"section"},{"location":"propulsion/hxfun/","page":"Heat exchangers","title":"Heat exchangers","text":"details: 📖 Theory - Tubular heat exchangers\nEffectiveness–NTU methodThere are many different heat exchanger (HX) topologies. The HX currently implemented in TASOPT consists of staggered tubes in a cross flow; this geometry was selected because it is simple to integrate into the space between two concentric cylinders. The HX is designed using the effectiveness–NTU method, described below [1]. Consider a heat exchanger in which a coolant gas is used to cool or heat gas. The minimum and maximum heat capacity rates are defined asC_mathrmmin = mathrmmin (dotm_c c_pc dotm_p c_pp)C_mathrmmax = mathrmmax (dotm_c c_pc dotm_p c_pp)where dotm is the mass flow rate, c_p is the specific heat at constant pressure, and the subscripts p and c refer to the process-side and coolant streams. The capacity ratio is C_r = fracC_mathrmminC_mathrmmax. A maximum heat transfer rate is defined asdotQ_max = C_mathrmmin (T_ip - T_ic)where T is the absolute temperature. A measure of the HX performance is the effectiveness, varepsilon, defined asvarepsilon = fracdotQdotQ_maxwhere dotQ is the actual heat transfer rate. The effectiveness can range between 0 and 1. A related quantity known as the number of transfer units (NTU) is defined asmathrmNTU = frac1C_mathrmmin R_owhere R_o is the overall thermal resistance. For any heat exchanger geometry, it can be shown that the effectiveness is a function of the NTU and the ratio fracC_mathrmminC_mathrmmax. In the case of a cross flow heat exchanger, this functional relationship between varepsilon and NTU depends on whether there is internal mixing within the stream and on which stream has the minimum capacity rate. In a HX within a jet engine, it is reasonable to assume that the coolant stream has the minimum capacity rate as the fuel-air ratio is small. For tubular HX, the process stream is mixed but the coolant stream is unmixed as the tubes are independent. In this case, the relationship between varepsilon and NTU is[1]varepsilon = frac1C_r 1 - exp(-C_r (1 - exp(-mathrmNTU)))or converselymathrmNTU = -lnleft(1 + fracln(1 - C_rvarepsilon)C_rright)On the other hand, if the coolant stream has the maximum heat capacity rate, the effectiveness is given byvarepsilon = 1 - expleft-frac1C_r (1 - exp(-C_r mathrmNTU))rightand the corresponding NTU ismathrmNTU = -frac1C_r lnleft 1 + C_r ln(1 - varepsilon)rightA notable property of these expressions is that there is a maximum effectiveness varepsilon_mathrmmax 1 as the NTU tends to infinity. In the code, there is a check to see if the desired effectiveness exceeds the maximum possible one, in which case there is no solution. The effectiveness is limited to 95% of varepsilon_mathrmmax to prevent a very large NTU.Once the effectiveness is known, the outlet specific enthalpies can be computed usingh_op = h_ip - fracdotQdotm_ph_oc = h_ic + fracdotQdotm_cwhere h represents the specific enthalpy, and the outlet temperatures can be determined from these.RecirculationIf the coolant is originally in liquid form, it needs to undergo a phase change at some point in the heat exchanger. For cryogenic liquids, such as hydrogen or methane, it is unadvisable to expose air to these cryogenic temperatures as it can result in freezing or liquefaction of some species in air. A possible approach to overcome this is to introduce recirculation in the heat exchanger: this increases the coolant mass flow rate and allows for a higher coolant temperature while still having the same heat transfer. The way recirculation is currently modeled in TASOPT is via a virtual \"mixing chamber\", where the hot recirculating mass flow that comes of of the HX is mixed with the colder coolant (which may be liquid in general) and heats it up to a desired HX inlet temperature,T_ic. Neglecting the kinetic energy in the fluids, conservation of energy requires thatdotm_cinfty (h_cinfty-h_lat) + dotm_r h_oc = (dotm_cinfty+dotm_r)h_icwhere dotm_r is the recirculating mass flow rate and dotm_cinfty is the coolant mass flow rate before mixing with recirculation and, by mass conservation, the mass flow rate that leaves the system. The term h_lat represents a latent heat and may account for vaporization or, in the case of hydrogen, the ortho- to parahydrogen conversion. The specific enthalpies into and out of the HX are related by h_oc = h_ic + fracdotQdotm_cinfty+dotm_rAs the heat transfer rate is given by dotQ = varepsilon C_mathrmmin (T_ip - T_ic), we can distinguish two cases depending on whether the coolant has the minimum or maximum heat capacity rate. If C_mathrmmin=(dotm_cinfty+dotm_r) c_pic,dotm_r = dotm_cinfty frach_ic - h_cinfty + h_latvarepsilon c_pic(T_ip - T_ic)and if C_mathrmmax=(dotm_cinfty+dotm_r) c_pic,dotm_r = dotm_cinftyfracA1-Awhere A = dotm_cinftyfrach_ic -h_cinfty + h_latvarepsilon C_h (T_ip - T_ic)A failure case exists if Ageq 1: in this case, the hot stream does not have enough heat capacity to provide the heat needed to get the coolant to the desired T_ic.Heat exchanger geometry(Image: HXfig)Two HX cross-sections are currently supported: rectangular and concentric cylinders (e.g., for a jet engine core). If the geometry is rectangular, the length of the tubes dictates the width of the rectangle, but if it is concentric, the tubes could have any length greater or equal to the distance between the cylinders as involute tubes could be used. The heat exchanger is assumed to have N_mathrmstages different serial stages, with each stage containing N_mathrmpasses tube rows, each corresponding to a coolant pass. For example, the HX in the figure above with 2 stages and 3 coolant passes has a total of N_L=N_mathrmstagesN_mathrmpasses=6 tube rows. The number of tubes at every row is N_t; this parameter can be calculated from the mass flow rate through the cold side or from the geometry of the stageN_t = frac4 dotm_crho_ciV_ci pi D_ti^2 N_mathrmstages = fracbfracx_tD D_towhere b is length across which the tubes are distributed. If the cross-section is concentric, b=pi D_ci with D_ci being the inner cylinder diameter; if it is rectangular, b = fracA_csl. In this expressions, A_cs=fracdotm_prho_piV_pi is the freestream cross-sectional area. Since the tube inner diameter can be expressed as D_ti = D_to - 2t, this equation can be solved for the tube outer diameterD_to = frac4 K t + sqrt8 K t + 1 + 12 Kwith K = fracpi b N_mathrmstages rho_ciV_ci4 fracx_tD dotm_c.The total length of the HX is simply L = N_L fracx_lD D_to.Some calculations rely on knowing the tangential pitch between tubes. This pitch may vary in the radial direction as the circumference changes but the tube diameter remains unchaged. In addition to this, the tubes are generally involute, which makes calculating this pitch even more challenging. In the code, a mean tangential pitch x_tm is used to compute parameters such as the pressure drop and the Nusselt number. This mean pitch is calculated asx_tm = fracA_csN_t lwhere l is the length of each involute tube. The mass flow rate per unit area at the minimum free flow area is G = fracdotm_pA_cs - N_t l D_toNote that for this expression to be valid, it is sufficient that x_lDgeq 1. If the general geometry and total hot-side heat transfer area are known (e.g., from the NTU), but the number of coolant passes has not been determined yet, this can be calculated asN_mathrmpasses = fracA_hN_t N_mathrmstages pi D_to lHeat transfer coefficientsThe above analysis relies on being able to determine the overall thermal resistance. In general, the thermal resistance has five components: hot- and cold-side gas resistances, wall resistance, and hot- and cold-side fouling resistances. The gas resistances are the aerodynamic resistances due to the thermal boundary layers, the wall resistance depends on the material conductivity and thickness, and the fouling resistances account for buildup of dirt layers during operation. The product of thermal resistance and heat transfer area (thermal insulance) is in practice easier to computeR_o A_p = frac1h_p + frac1h_c fracA_cA_p + fractk_w + R_fpA_p + R_fcA_c fracA_pA_cwhere h is the the aerodynamic heat transfer coefficient, A is the heat transfer area, t is the wall thickness, k is the thermal conductivity, w denotes the wall, and R_fA is the fouling factor. A list of design fouling factors can be found in [2] and [3].The heat transfer coefficients depend on the gas temperature, which changes as heat is added to the flows. A mean gas temperature, taken as the average between the inlet and outlet temperatures, is used to calculate the gas properties,T_pm = fracT_po - T_pi2T_cm = fracT_co - T_ci2Coolant-side heat transfer coefficientThe flow inside the tubes can be modeled by assuming that it is fully-developed turbulent flow in a smooth pipe. In this case, the 1913 Blasisus correlation provides a method to calculate the skin-friction coefficient, C_fC_f = fractau_wfrac12rho_cm V_cm^2 = 00791 mathrmRe_Dc^-14where tau_w is the wall shear stress, rho is the mass density, V is the velocity and the cold-side diameter-based Reynolds number is defined as mathrmRe_Dc=fracV_cmrho_cm D_timu_cm, with D_ti being the tube inner diameter and mu being the viscosity.When the skin-friction coefficient is known, the Colburn j-factor can be calculated using the Reynolds analogyj = mathrmSt mathrmPr^23 = fracC_f2where mathrmSt = frachrho V c_p is the Stanton number and mathrmPr = fracc_p muk is the Prandtl number. Once j is determined, the heat transfer coefficient h_c can be computed from the cold gas properties.Process-side heat transfer coefficientThe flow past a set of staggered tubes is complex. Žkauskas[4] provides simplified correlations that can be used to model the heat transfer properties of these tubes. Generally, the Nusselt number can be expressed asmathrmNu = C_1 C_2 mathrmRe^m mathrmPr^nwhere the Rynolds number is defined as mathrmRe= fracG D_tomu_pm, D_to is the tube outer diameter, and G is the hot-side mass flow rate per unit area at the minimum free-flow area. Hence, this Reynolds number accounts for blockage effects due to the presence of the tubes.The following table shows the value of the parameters C_1, m and n as a function of Reynolds number.Re C_1 m n\n0–40 1.04 0.4 0.36\n40–1000 0.71 0.5 0.36\n1000–2times 10^5 & x_tx_l2 035 (x_t x_l) ^ 02 0.6 0.36\n1000–2times 10^5 & x_tx_lgeq 2 0.4 0.6 0.36\n2times 10^5 0031 (x_t x_l) ^ 02 0.8 0.4The paramters in the table can be affected by the distances x_t and x_l, which are the distances between tubes in the tangential and longitudinal directions. Note that the distance x_t used in the calculations is x_tm as the pitch varies in the radial direction. The ratios of this distances to the tube outer diameter, fracx_tD and fracx_tD, are design parameters. The parameter C_2 is a correction that accounts for the number of rows, N_L, and tends to 1 as the number of rows goes to infinity. It can be approximated as C_2 = 1-exp(-N_L^1 sqrt3)if Re1000 and otherwise asC_2 = 1-exp(-sqrt3 N_L^1 sqrt2)Once the Nusselt number is known, the hot-side heat transfer coefficient can be computed as h_p = fracmathrmNu k_pD_to.Pressure dropsThe pressure drop in the hot-side (across the staggered tube bank) can be estimated using the method of Gunter and Shaw[5]. The first necessary parameter is the volumetric hydraulic diameter, defined asD_v = frac4(mathrmNetfreevolume)mathrmFrictionsurface = frac4 L fracdotm_pV_pirho_pi-N_t N_mathrmpasses N_mathrmstages pi D_to^2 lA_pFrom this, the pressure drop across the process side can be computed asDelta p_p = fracG^2 L D_v rho_pm fracf2 left(fracD_vx_tright)^04left(fracx_lx_tright)^06where fracf2 is a friction factor that can be related to the Reynolds number, Re_D_v = fracG D_vmu_pm, as fracf2= 90 Re_D_v for Re_D_v200 and fracf2= 096 Re_D_v^-0145 otherwise. As in the heat transfer coefficient case, note that the distance x_t used in the calculations is x_tm since the pitch varies in the radial direction.The cold-side pressure drop can be calculated from the skin-friction coefficient, ignoring the minor losses due to flow turning at each pass,Delta p_c = frac4 tau_w N_mathrmpasses pi D_ti lpi D_ti^2= frac4 tau_w N_mathrmpasses lD_tiwith tau_w = C_f frac12rho_cm V_cm^2.","category":"page"},{"location":"propulsion/hxfun/#Structures","page":"Heat exchangers","title":"Structures","text":"","category":"section"},{"location":"propulsion/hxfun/","page":"Heat exchangers","title":"Heat exchangers","text":"engine.HX_gas","category":"page"},{"location":"propulsion/hxfun/#TASOPT.engine.HX_gas","page":"Heat exchangers","title":"TASOPT.engine.HX_gas","text":"HX_gas\n\nStructure containing the gas properties of the process and coolant streams.\n\ndetails: 💾 Data fields\nInputs:fluid_p::String: process fluid name\nfluid_c::String: coolant fluid name\nalpha_p::Vector{Float64}: process gas composition\nigas_c::Float64: coolant gas index, if coolant is a gas\nmdot_p::Float64: mass flow rate of process gas (kg/s)\nmdot_c::Float64: mass flow rate of coolant gas (kg/s)\nTp_in::Float64: process gas inlet temperature (K)\nTc_in::Float64: coolant gas inlet temperature (K)\npp_in::Float64: process gas inlet pressure (Pa)\npc_in::Float64: coolant gas inlet pressure (Pa)\nMp_in::Float64: process gas inlet Mach number\nMc_in::Float64: coolant gas inlet Mach number\nTp_out::Float64: process gas outlet temperature\nTc_out::Float64: coolant gas outlet temperature\nΔh_p::Float64: enthalpy change across HX (J/kg)\nΔp_p::Float64: pressure drop of process gas across heat exchanger (Pa)\nΔp_c::Float64: pressure drop of coolant gas across tubes (Pa)\nPl_p::Float64: power loss due to pressure drop in process stream (W)\nPl_c::Float64: power loss due to pressure drop in coolant stream (W)\nε::Float64: desired heat exchanger effectiveness\nrecircT::Float64: temperature of recirculating flow at HX inlet (K)\nmdot_r::Float64: recirculating flow mass flow rate (kg/s)\nh_lat::Float64: latent heat capacity in freestream coolant liquid (J/kg)\n\n\n\n\n\n","category":"type"},{"location":"propulsion/hxfun/","page":"Heat exchangers","title":"Heat exchangers","text":"engine.HX_tubular","category":"page"},{"location":"propulsion/hxfun/#TASOPT.engine.HX_tubular","page":"Heat exchangers","title":"TASOPT.engine.HX_tubular","text":"HX_tubular\n\nStructure containing the heat exchanger geometric and material properties.\n\ndetails: 💾 Data fields\nInputs:fconc::Bool: flag for concentric geometry (1: concentric ; 0: rectangular)\nfrecirc::Bool: flag for recirculation (1: recirculation ; 0: no recirculation)\nN_t::Float64: number of tubes per row\nn_stages::Float64: number of different coolant stages with different coolant flows\nn_passes::Float64: number of coolant passes\nA_cs::Float64: process side freestream cross-sectional area (m^2)\nl::Float64: length of tubes (m)\nt::Float64: cooling tube wall thickness (m)\ntD_o::Float64: tube outer diameter (m)\nxt_D::Float64: circumferential pitch between tubes at the root over tube outer diameter \nxl_D::Float64: longitudinal pitch between rows over tube outer diameter\nRfp::Float64: process-side fouling factor (m^2 K/W)\nRfc::Float64: coolant-side fouling factor (m^2 K/W)\nkw::Float64: thermal conductivity of wall material (W/m/K)\nρw::Float64: mean density of HE (kg/m^3)\nD_i::Float64: inner diameter of core (m)\n\n\n\n\n\n","category":"type"},{"location":"propulsion/hxfun/","page":"Heat exchangers","title":"Heat exchangers","text":"engine.HX_struct","category":"page"},{"location":"propulsion/hxfun/#TASOPT.engine.HX_struct","page":"Heat exchangers","title":"TASOPT.engine.HX_struct","text":"HX_struct\n\nStructure containing all the heat exchanger geometry and operational information.\n\ndetails: 💾 Data fields\nInputs:type::String: type of heat exchanger (\"PreC\": precooler; \"InterC\": intercooler; \"Regen\": regenerative; \"TurbC\": turbine cooling)\nHXgeom::HX_tubular: structure containing the HX geometric information\nHXgas_mission::Array{Any}: array containing the gas properties, of type HX_gas for each mission and segment\n\n\n\n\n\n","category":"type"},{"location":"propulsion/hxfun/#Functions","page":"Heat exchangers","title":"Functions","text":"","category":"section"},{"location":"propulsion/hxfun/#Heat-exchanger-sizing-and-off-design-operations","page":"Heat exchangers","title":"Heat exchanger sizing and off-design operations","text":"","category":"section"},{"location":"propulsion/hxfun/","page":"Heat exchangers","title":"Heat exchangers","text":"engine.hxsize!","category":"page"},{"location":"propulsion/hxfun/#TASOPT.engine.hxsize!","page":"Heat exchangers","title":"TASOPT.engine.hxsize!","text":"hxsize!(HXgas, HXgeom)\n\nSizes a crossflow heat exchanger and calculates the pressure drop. Uses the ε-NTU method to size the heat exchanger from a prescribed ε. For representative fouling factors see Standards of the Tubular Exchanger Manufacturers Association or https://powderprocess.net/Tools_html/Data_Diagrams/Heat_Exchanger_Fouling_Factor.html\n\ndetails: 🔃 Inputs and Outputs\nInputs:HXgas::Struct: structure of type HX_gas with the gas properties\nHXgeom::Struct: structure of type HX_tubular with the HX geometric propertiesOutputs: No direct outputs. Input structures are modified with outlet gas properties and HX design geometry.\n\n\n\n\n\n","category":"function"},{"location":"propulsion/hxfun/","page":"Heat exchangers","title":"Heat exchangers","text":"engine.hxoper!","category":"page"},{"location":"propulsion/hxfun/#TASOPT.engine.hxoper!","page":"Heat exchangers","title":"TASOPT.engine.hxoper!","text":"hxoper!(HXgas, HXgeom)\n\nEvaluates crossflow heat exchanger performance for off-design operation. Uses the ε-NTU method to calculate effectiveness from prescribed geometry. \n\ndetails: 🔃 Inputs and Outputs\nInputs:HXgas::Struct: structure of type HX_gas with the gas properties\nHXgeom::Struct: structure of type HX_tubular with the HX geometric propertiesOutputs: No direct outputs. Input structures are modified with outlet gas properties.\n\n\n\n\n\n","category":"function"},{"location":"propulsion/hxfun/#Optimization","page":"Heat exchangers","title":"Optimization","text":"","category":"section"},{"location":"propulsion/hxfun/","page":"Heat exchangers","title":"Heat exchangers","text":"engine.hxoptim!","category":"page"},{"location":"propulsion/hxfun/#TASOPT.engine.hxoptim!","page":"Heat exchangers","title":"TASOPT.engine.hxoptim!","text":"hxoptim!(HXgas, HXgeom, initial_x)\n\nOptimizes heat exchanger design parameters for a given set of inputs. Uses the NLopt.jl package. The optimization variables are Mc_in, n_stages, xt_D and l. The length of initial_x is the flag to determine how many parameters to optimize: if it is 4, all parameters are optimized; if it is 3, the tube length l is assumed to be an input and is not optimized.\n\ndetails: 🔃 Inputs and Outputs\nInputs:HXgas::Struct: structure of type HX_gas with the gas properties\nHXgeom::Struct: structure of type HX_tubular with the HX geometric properties\ninitial_x::Vector{Float64}: vector with the initial guess for the optimizationOutputs: No direct outputs. Input structures are modified with HX design geometry.\n\n\n\n\n\n","category":"function"},{"location":"propulsion/hxfun/","page":"Heat exchangers","title":"Heat exchangers","text":"engine.hxobjf","category":"page"},{"location":"propulsion/hxfun/#TASOPT.engine.hxobjf","page":"Heat exchangers","title":"TASOPT.engine.hxobjf","text":" hxobjf(x, HXgas, HXgeom)\n\nObjective function for HX optimization in hxoptim!(). It returns the sum of the power dissipated due to pressure drops in the process and coolant streams, with penalty factors to enforce constraints.\n\ndetails: 🔃 Inputs and Outputs\nInputs:x::Vector{Float64}: state vector with [100 * Mc_in, l, n_stages, xt_D]\nHXgas::Struct: structure of type HX_gas with the gas properties\nHXgeom::Struct: structure of type HX_tubular with the HX geometric propertiesOutputs:Iobj::Float64: objective function (W)\n\n\n\n\n\n","category":"function"},{"location":"propulsion/hxfun/#Overall-design-and-analysis","page":"Heat exchangers","title":"Overall design and analysis","text":"","category":"section"},{"location":"propulsion/hxfun/","page":"Heat exchangers","title":"Heat exchangers","text":"engine.hxdesign!","category":"page"},{"location":"propulsion/hxfun/#TASOPT.engine.hxdesign!","page":"Heat exchangers","title":"TASOPT.engine.hxdesign!","text":" hxdesign!(pare, pari, ipdes, HXs_prev)\n\nHeat exchanger design and operation function. It calls hxoptim!() to optimize the heat exchanger at the design point and then evaluates performance for all missions and points with hxoper!(). \n\ndetails: 🔃 Inputs and Outputs\nInputs:pare::Array{Float64 , 3}: array with engine parameters\npari::Vector{Int}: vector with integer parameters\nipdes::Float64: index for design mission segment\nHXs_prev::Vector{Any}: vector with heat exchanger data from the previous wsize iteration; elements are HX_struct structuresOutputs:HeatExchangers::Vector{Any}: vector with heat exchanger data; elements are HX_struct structures\nAlso modifies pare with the fuel temperature and the HX enthalpy and pressure changes\n\n\n\n\n\n","category":"function"},{"location":"propulsion/hxfun/#Heating-and-pressure-calculations","page":"Heat exchangers","title":"Heating and pressure calculations","text":"","category":"section"},{"location":"propulsion/hxfun/","page":"Heat exchangers","title":"Heat exchangers","text":"engine.jcalc_pipe","category":"page"},{"location":"propulsion/hxfun/#TASOPT.engine.jcalc_pipe","page":"Heat exchangers","title":"TASOPT.engine.jcalc_pipe","text":"jcalc_pipe(Re_D)\n\nCalculates the Colburn j-factor and skin-friction coefficient for flow inside a circular pipe, assuming flow is fully developed and turbulent. Uses the 1913 Blasius correlation.\n\ndetails: 🔃 Inputs and Outputs\nInputs:Re_D::Float64: Reynolds number based on pipe diameterOutputs:j::Float64: Colburn j-factor for heat calculations\nCf::Float64: skin-friction coefficient\n\n\n\n\n\n","category":"function"},{"location":"propulsion/hxfun/","page":"Heat exchangers","title":"Heat exchangers","text":"engine.Nu_calc_staggered_cyl","category":"page"},{"location":"propulsion/hxfun/#TASOPT.engine.Nu_calc_staggered_cyl","page":"Heat exchangers","title":"TASOPT.engine.Nu_calc_staggered_cyl","text":"Nu_calc_staggered_cyl(Re_D, Pr, N_L, xt_D, xl_D)\n\nCalculates the Nusselt number for cross flow on a set of staggered circular cylinders. Based on the model in A. Žkauskas. Heat Transfer from Tubes in Crossflow. Advances in Heat Transfer v.18 (1987).\n\ndetails: 🔃 Inputs and Outputs\nInputs:Re_D::Float64: Reynolds number based on cylinder diameter with velocity at minimum free flow area\nPr::Float64: Prandtl number\nN_L::Float64: number of cylinder rows\nn_stages::Float64: number of different coolant stages with different coolant flows\nxt_D::Float64: circumferential pitch between tubes over tube outer diameter\nxl_D::Float64: longitudinal pitch between rows over tube outer diameterOutputs:Nu::Float64: Nusselt number based on cylinder diameter \n\n\n\n\n\n","category":"function"},{"location":"propulsion/hxfun/","page":"Heat exchangers","title":"Heat exchangers","text":"engine.Δp_calc_staggered_cyl","category":"page"},{"location":"propulsion/hxfun/#TASOPT.engine.Δp_calc_staggered_cyl","page":"Heat exchangers","title":"TASOPT.engine.Δp_calc_staggered_cyl","text":"Δp_calc_staggered_cyl(Re, G, L, ρ, Dv, tD_o, xt_D, xl_D)\n\nCalculates the pressure drop across a set of staggered cylinders in cross flow. Uses the method of Gunter and Shaw. A General Correlation of Friction Factors for Various Types of Surfaces in Crossflow. Journal of Fluids Engineering, 1945.\n\ndetails: 🔃 Inputs and Outputs\nInputs:Re::Float64: Reynolds number based on hydraulic diameter and minimum free flow area: Re = Dv G /μ\nG::Float64: mass flow rate divided by minimum free flow area. G = mdot / (A_min), A_min is the minimum free-flow area (kg/s/m^2)\nL::Float64: axial channel length (m)\nρ::Float64: density (kg/m^3)\nDv::Float64: volumetric hydraulic diameter. Dv = 4 * (Net free volume) / (Friction surface)\ntD_o::Float64: cylinder outer diameter (m)\nxt_D::Float64: circumferential pitch between tubes over tube outer diameter\nxl_D::Float64: longitudinal pitch between rows over tube outer diameterOutputs:Δp::Float64: pressure drop across staggered cylinders (Pa)\n\n\n\n\n\n","category":"function"},{"location":"propulsion/hxfun/#Weight-estimation","page":"Heat exchangers","title":"Weight estimation","text":"","category":"section"},{"location":"propulsion/hxfun/","page":"Heat exchangers","title":"Heat exchangers","text":"engine.hxweight","category":"page"},{"location":"propulsion/hxfun/#TASOPT.engine.hxweight","page":"Heat exchangers","title":"TASOPT.engine.hxweight","text":" hxweight(gee, HXgeom, fouter)\n\nCalculates the weight of a heat exchanger with involute tubes.\n\ndetails: 🔃 Inputs and Outputs\nInputs:gee::Float64: gravitational acceleration (m/s^2)\nHXgeom::Struct: structure of type HX_tubular with the HX geometric and material properties\nfouter::Float64: ratio of HX external mass to tube massOutputs:W_hx::Float64: weight of heat exchanger (N)\n\n\n\n\n\n","category":"function"},{"location":"propulsion/hxfun/","page":"Heat exchangers","title":"Heat exchangers","text":"[1]: Kays, W. M., & London, A. L. (1984). Compact heat exchangers.","category":"page"},{"location":"propulsion/hxfun/","page":"Heat exchangers","title":"Heat exchangers","text":"[2]: Standards of the Tubular Exchanger Manufacturers Association","category":"page"},{"location":"propulsion/hxfun/","page":"Heat exchangers","title":"Heat exchangers","text":"[3]: Powder Process","category":"page"},{"location":"propulsion/hxfun/","page":"Heat exchangers","title":"Heat exchangers","text":"[4]: Žkauskas, A. (1987). Heat transfer from tubes in crossflow. In Advances in heat transfer (Vol. 18, pp. 87-159). Elsevier.","category":"page"},{"location":"propulsion/hxfun/","page":"Heat exchangers","title":"Heat exchangers","text":"[5]: Gunter, A. Y., & Shaw, W. A. (1945). A general correlation of friction factors for various types of surfaces in crossflow. Transactions of the American Society of Mechanical Engineers, 67(8), 643-656.","category":"page"},{"location":"examples/optimization/#Example-for-a-Multi-variable-Optimization","page":"Multivariable optimization","title":"Example for a Multi-variable Optimization","text":"","category":"section"},{"location":"examples/optimization/","page":"Multivariable optimization","title":"Multivariable optimization","text":"(Image: Optimization Iteration Plot)","category":"page"},{"location":"examples/optimization/","page":"Multivariable optimization","title":"Multivariable optimization","text":"To run a multi-variable optimization run on an aircraft model first determining your design variables. For this example, the design variables are:","category":"page"},{"location":"examples/optimization/","page":"Multivariable optimization","title":"Multivariable optimization","text":"Aspect Ratio: AR\nCruise Altitude: Alt\nLift Coefficient: Cl \nWing Sweep: Λ\nInner panel taper ratio: λs \nOuter panel taper ratio: λt \nRoot thickness to chord: hboxo\nSpanbreak thickness to chord: hboxs\nBreak/root cl ratio = cls/clo: rcls\nTip/root cl ratio = clt/clo: rclt\nTt4: Tt4\nHigh Pressure Compressor Pressure Ratio: pihc\nFan Pressure ratio: pif","category":"page"},{"location":"examples/optimization/#Initialiation-and-loading-models","page":"Multivariable optimization","title":"Initialiation and loading models","text":"","category":"section"},{"location":"examples/optimization/","page":"Multivariable optimization","title":"Multivariable optimization","text":"Start the script importing TASOPT.jl, PyPlot, index.inc, NLopt.","category":"page"},{"location":"examples/optimization/","page":"Multivariable optimization","title":"Multivariable optimization","text":"# Import modules\nusing PyPlot\nusing TASOPT\n# you can optionally define\n# const tas = TASOPT \n# to use as a shorthand\ninclude(\"../src/misc/index.inc\")\n# import indices for calling parameters\nusing NLopt","category":"page"},{"location":"examples/optimization/","page":"Multivariable optimization","title":"Multivariable optimization","text":"Initialize arrays used for plotting","category":"page"},{"location":"examples/optimization/","page":"Multivariable optimization","title":"Multivariable optimization","text":"xarray = []\nfarray = []\nPFEIarray = []\nCDarray = []\nOPRarray = []\ntrack_fig = nothing\nft_to_m = 0.3048","category":"page"},{"location":"examples/optimization/","page":"Multivariable optimization","title":"Multivariable optimization","text":"Load aircraft model and size it to get initial values:","category":"page"},{"location":"examples/optimization/","page":"Multivariable optimization","title":"Multivariable optimization","text":"# Load default model\nac = read_aircraft_model(joinpath(TASOPT.__TASOPTroot__, \"../example/opt_input.toml\"))\n# datafile\n# Size aircraft once to get initial values\nsize_aircraft!(ac)","category":"page"},{"location":"examples/optimization/#Setting-Optimization-Parameters","page":"Multivariable optimization","title":"Setting Optimization Parameters","text":"","category":"section"},{"location":"examples/optimization/","page":"Multivariable optimization","title":"Multivariable optimization","text":"This example uses a Nedler Mead optimization aimed towards optimizing for passenger fuel emission index (PFEI) while checking for other constraints.","category":"page"},{"location":"examples/optimization/#Set-the-Upper-and-Lower-limits-for-all-design-variables","page":"Multivariable optimization","title":"Set the Upper and Lower limits for all design variables","text":"","category":"section"},{"location":"examples/optimization/","page":"Multivariable optimization","title":"Multivariable optimization","text":"# DESIGN VARIABLES\n# AR Alt(ft) Cl Λ λs λt hboxo hboxs rcls rclt Tt4CR iepihc iepif\nlower = [7.0 , 20000.0, 0.40, 10.0, 0.1, 0.1, 0.10, 0.10, 0.1, 0.1, 700.0, 6, 0]\nupper = [12.0, 60000.0, 0.65, 40.0, 1.0, 1.0, 0.15, 0.15, 1.4, 1.0, 2000.0, 15, 10] \n","category":"page"},{"location":"examples/optimization/#Set-the-initial-values-for-all-design-variables","page":"Multivariable optimization","title":"Set the initial values for all design variables","text":"","category":"section"},{"location":"examples/optimization/","page":"Multivariable optimization","title":"Multivariable optimization","text":"initial =[\n ac.parg[igAR], 33000.0, 0.57, ac.parg[igsweep], \n ac.parg[iglambdas], ac.parg[iglambdat], ac.parg[ighboxo], \n ac.parg[ighboxs], ac.para[iarcls, ipcruise1,1], ac.para[iarclt, ipcruise1,1], 1587, 11.46, 1.66\n]","category":"page"},{"location":"examples/optimization/#Set-initial-dx-values-for-all-design-variables","page":"Multivariable optimization","title":"Set initial dx values for all design variables","text":"","category":"section"},{"location":"examples/optimization/","page":"Multivariable optimization","title":"Multivariable optimization","text":"initial_dx = [ 0.5, 1000.0, 0.05, 0.1, 0.01,0.01,0.01, 0.01, 0.01, 0.01, 100, 0.5,0.2]","category":"page"},{"location":"examples/optimization/#Set-other-optimization-factors","page":"Multivariable optimization","title":"Set other optimization factors","text":"","category":"section"},{"location":"examples/optimization/","page":"Multivariable optimization","title":"Multivariable optimization","text":"# Set FTOL\nf_tol_rel = 1e-5\n\n# Set Optimization module\nopt = NLopt.Opt(:LN_NELDERMEAD, length(initial))\n# Other Optimization algorithms are also possible:\n# # opt = NLopt.Opt(:LN_BOBYQA, length(initial))\n# # opt = NLopt.Opt(:LN_COBYLA, length(initial))\n\n# Set Optimization parameters\nopt.lower_bounds = lower\nopt.upper_bounds = upper\nopt.min_objective = obj\nopt.initial_step = initial_dx\nopt.ftol_rel = f_tol_rel","category":"page"},{"location":"examples/optimization/#Objective-Function","page":"Multivariable optimization","title":"Objective Function","text":"","category":"section"},{"location":"examples/optimization/","page":"Multivariable optimization","title":"Multivariable optimization","text":"function obj(x, grad)\n ac.parg[igAR] = x[1] # Aspect Ratio \n ac.para[iaalt, ipcruise1, :] .= x[2] * ft_to_m # Cruise Altitude\n ac.para[iaCL, ipclimb1+1:ipdescentn-1, :] .= x[3] # CL\n ac.parg[igsweep] = x[4] # Wing sweep \n ac.parg[iglambdas] = x[5] #inner_panel_taper_ratio\n ac.parg[iglambdat] = x[6] #outer_panel_taper_ratio\n ac.parg[ighboxo] = x[7] #root_thickness_to_chord\n ac.parg[ighboxs] = x[8] #spanbreak_thickness_to_chord\n ac.para[iarcls, ipclimb1+1 : ipdescentn-1, :] .= x[9] # rcls break/root cl ratio = cls/clo\n ac.para[iarclt, ipclimb1+1 : ipdescentn-1, :] .= x[10] # rclt tip /root cl ratio = clt/clo\n ac.pare[ieTt4, ipcruise1:ipcruise2, :] .= x[11] # Tt4\n ac.pare[iepihc, ipclimb1+1 : ipdescentn-1, :] .= x[12] # High Pressure Compressor Pressure Ratio\n ac.pare[iepif, ipclimbn, :] .= x[13] #Fan PR \n ac.pare[iepilc, :, :] .= 3 # Low Pressure Compressure Pressure Ratio set to 3\n\n # Sizing aircraft with new ac.parameters\n TASOPT.size_aircraft!(ac, iter =50, printiter=false)\n f = ac.parm[imPFEI]\n push!(PFEIarray, ac.parm[imPFEI])\n push!(xarray, x)\n push!(CDarray, ac.para[iaCD, ipcruise1, 1])\n push!(OPRarray, ac.pare[iept3]/ac.pare[iept2])\n \n # Ensure aircraft weight makes sense\n WTOmax = ac.parg[igWMTO]\n WTO = ac.parm[imWTO,1]\n constraint = WTO/WTOmax - 1.0\n penfac = 10*ac.parg[igWpay]\n f = f + penfac*max(0.0, constraint)^2\n\n # Ensure fuel volume makes sense\n Wfmax = ac.parg[igWfmax]\n Wf = ac.parg[igWfuel]\n constraint = Wf/Wfmax - 1.0\n penfac = 10*ac.parg[igWpay]\n f = f + penfac*max(0.0, constraint)^2\n \n println(\"X̄ = $x ⇨ PFEI = $(ac.parm[imPFEI]) f = $f, OPR = $(ac.pare[iept3]/ac.pare[iept2]),\")\n push!(farray, f)\n \n return f\nend","category":"page"},{"location":"examples/optimization/#Running-the-optimization","page":"Multivariable optimization","title":"Running the optimization","text":"","category":"section"},{"location":"examples/optimization/","page":"Multivariable optimization","title":"Multivariable optimization","text":"opt_time = @elapsed (optf, optx, ret) = NLopt.optimize(opt, initial)\nnumevals = opt.numevals # the number of function evaluations\n\nprintln(\"got $optf at $optx after $numevals iterations which took $(opt_time/60) min (returned $ret)\")\n","category":"page"},{"location":"examples/optimization/#Plotting-resulting-data","page":"Multivariable optimization","title":"Plotting resulting data","text":"","category":"section"},{"location":"examples/optimization/#Plot-aircraft-model-details","page":"Multivariable optimization","title":"Plot aircraft model details","text":"","category":"section"},{"location":"examples/optimization/","page":"Multivariable optimization","title":"Multivariable optimization","text":"figure()\nsavedir = \"./example/optimization/\"\nif !isdir(savedir)\n # If it doesn't exist, create the \"optimization\" directory\n mkdir(savedir)\n println(\"The 'optimization' directory has been created.\")\nend\nfigname = \"Opt_tutorial_ac_details\"\nglobal track_fig = TASOPT.plot_details(ac; ax = track_fig)\nplt.savefig(savedir*figname*\".png\")","category":"page"},{"location":"examples/optimization/#Plot-optimization-outputs-over-iterations","page":"Multivariable optimization","title":"Plot optimization outputs over iterations","text":"","category":"section"},{"location":"examples/optimization/","page":"Multivariable optimization","title":"Multivariable optimization","text":"fig, ax = plt.subplots(2,2, figsize = (12,8))\nax[1].plot(PFEIarray)\nax[1].set_xlabel(\"Iterations\")\nax[1].set_ylabel(\"PFEI (J/Nm)\")\nax[2].semilogy(farray)\nax[2].set_xlabel(\"Iterations\")\nax[2].set_ylabel(\"Objective f\")\nax[3].plot(CDarray)\nax[3].set_xlabel(\"Iterations\")\nax[3].set_ylabel(\"CD\")\nax[4].plot(OPRarray)\nax[4].set_xlabel(\"Iterations\")\nax[4].set_ylabel(\"OPR\")\nplt.suptitle(\"Optimization outputs\")\nfigname2 = \"Opt_tutorial_iterations\"\nfig.savefig(savedir*figname2*\".png\")","category":"page"},{"location":"structures/fuselage/#fuselage","page":"Fuselage","title":"Fuselage","text":"","category":"section"},{"location":"structures/fuselage/","page":"Fuselage","title":"Fuselage","text":"(Image: Fuselage layout)","category":"page"},{"location":"structures/fuselage/#Fuselage-pressure-and-torsion-loads","page":"Fuselage","title":"Fuselage pressure and torsion loads","text":"","category":"section"},{"location":"structures/fuselage/","page":"Fuselage","title":"Fuselage","text":"The fuselage is modeled as a side-by-side \"multi-bubble\" pressure vessel with an ellipsoidal nose endcap and a hemispherical tail endcap, which is subjected to pressurization, bending, and torsion loads, as shown in the first two figures. The loaded cylindrical length of the pressure vessel shell is from x_rm shell_1 to x_rm shell_2. beginaligned l_rm shell = x_rm shell_2 - x_rm shell_1 endaligned","category":"page"},{"location":"structures/fuselage/","page":"Fuselage","title":"Fuselage","text":"The horizontal-axis moment cal M_rm hscriptstyle (x) distributions on the front and back bending fuselage are assumed to match at location x_rm wing, as shown in the first figure. Theoretically this is the wing's net lift–weight centroid, which varies somewhat depending the fuel fraction in the wings, the wing's profile pitching moment and hence the flap setting, and on the aircraft C_L. For simplicity it will be approximated as the wing's area centroid. Note that for a swept wing the wing box location x_rm wbox will be centered somewhat ahead of x_rm wing, but it will then also impart a pitch-axis moment at its location, so that the front and back cal M_rm hscriptstyle (x) distributions must still match at x_rm wing.","category":"page"},{"location":"structures/fuselage/","page":"Fuselage","title":"Fuselage","text":"The second figure shows the fuselage cross section for the case of a \"double-bubble\", or two tubes. The next figure compares to alternative possible cross sections with three or four tubes, each specified by the number of webs n_rm fweb. The pressure-vessel skin and endcaps have a uniform thickness t_rm skin, while each of the n_rm fweb tension web(s) has an average thickness t_rm fweb. The cross-sectional area of the skin is A_rm skin, and has stiffening stringers which have a \"smeared\" average area A_rm skinf_rm stringrho_rm skinrho_rm bend, specified via the empirical stringer/skin weight fraction f_rm string. The enclosed area S_rm skin enters the torsional stiffness and strength calculations. The fuselage cross section also shows the possibility of added bottom bubbles or fairings, extended downward by the distance Delta R_rm fuse.","category":"page"},{"location":"structures/fuselage/","page":"Fuselage","title":"Fuselage","text":"(Image: Fusetube)","category":"page"},{"location":"structures/fuselage/","page":"Fuselage","title":"Fuselage","text":"The skin and stringers constitute the \"shell\", which has bending inertias I_rm hshell I_rm vshell about the horizontal and vertical axes. The second figure does not show any hoop-stiffening frames which are typically required, and whose weight is a specified fraction f_rm frame of the skin weight. These typically may be offset from the skin inside of the stringers, and hence are assumed to not contribute to the skin's circumferential tensile strength.","category":"page"},{"location":"structures/fuselage/","page":"Fuselage","title":"Fuselage","text":"To address the weight and aerodynamic loads of the tail group on the fuselage, the horizontal and vertical tails, the tailcone, and any rear-mounted engines are treated as one lumped mass and aero force at location x_rm tail, shown in Figure 2.","category":"page"},{"location":"structures/fuselage/","page":"Fuselage","title":"Fuselage","text":"The bending loads on the shell may require the addition of vertical-bending material concentrated on top and bottom of the fuselage shell (typically as skin doublers or additional stringers). The total added cross sectional area is A_rm hbendscriptstyle (x), and the associated added bending inertia is I_rm hbendscriptstyle (x). Corresponding added material on the sides has A_rm vbendscriptstyle (x) and I_rm vbendscriptstyle (x). Because the wing box itself will contribute to the fuselage bending strength, these added areas and bending inertias do not match the cal Mscriptstyle (x) distribution there, but are made linear over the wing box extent, as shown in figure 2.","category":"page"},{"location":"structures/fuselage/","page":"Fuselage","title":"Fuselage","text":"(Image: ntube)","category":"page"},{"location":"structures/fuselage/","page":"Fuselage","title":"Fuselage","text":"details: 📖 Theory - Cross-section relations\nThe fuselage pressure shell has the following geometric relations and beam quantities. beginaligned theta_rm fb = arcsin (w_rm fb R_rm fuse) \n h_rm fb = sqrtR_rm fuse^2 - w_rm fb^2 \n A_rm skin = left( 2pi + 4n_rm fwebtheta_rm fbright) R_rm fuse t_rm skin + 2 Delta R_rm fuse t_rm skin \n A_rm fweb = n_rm fweb(2 h_rm fb+ Delta R_rm fuse) t_rm fweb \n A_rm fuse = left pi + n_rm fwebleft( 2theta_rm fb+ sin 2 theta_rm fbright) right R_rm fuse^2 + 2 left R_rm fuse+ n_rm fwebw_rm fbright Delta R_rm fuse endaligned The skin has some modulus and density E_rm skin rho_rm skin, while the stringers have some possibly different values E_rm bend rho_rm bend. The effective modulus-weighted \"shell\" thickness t_rm shell can then be defined as follows, assuming that only the skin and stringers contribute to bending, but not the frames. beginaligned t_rm shell = frac(E t)_rm skinE_rm skin = t_rm skin left( 1 + r_ scriptscriptstyle E f_rm stringfracrho_rm skinrho_rm bend right) \n rmwhere hspace5ex r_ scriptscriptstyle E = fracE_rm bendE_rm skin endaligned This is then convenient for determining the modulus-weighted horizontal-axis and vertical-axis bending inertias. The fuselage webs, if any, are assumed to be made of the same material as the skin. The passenger-access cutouts will not extend all the way to the skin/web junctions, so that the webs' contributions are included in the overall shell bending inertia. beginaligned I_rm hshell = frac(EI)_rm hshellE_rm skin nonumber \n = 4 int_0^pi2 hspace-2ex left( R_rm fusesintheta + Delta R_rm fuse2 right)^2 R_rm fuse t_rm shell rm dtheta nonumber \n + 4 n_rm fweb int_pi2^pi2+theta_rm fb hspace-2ex left( R_rm fusesintheta + Delta R_rm fuse2 right)^2 R_rm fuse t_rm shell rm dtheta + frac23 n_rm fweb(h_rm fb+Delta R_rm fuse2)^3 t_rm fweb nonumber \n = left rule-05em0em15em left pi + n_rm fweb( 2theta_rm fb+ sin 2 theta_rm fb) right R_rm fuse^2 right nonumber 025em + 8 n_rm fwebcos theta_rm fb (Delta R_rm fuse2) R_rm fuse nonumber 025em left + left 2pi + 4 n_rm fwebtheta_rm fbright (Delta R_rm fuse2)^2 rule-05em0em15em right R_rm fuse t_rm shell + frac23 n_rm fweb(h_rm fb+Delta R_rm fuse2)^3 t_rm fweb \n I_rm vshell = frac(EI)_rm vshellE_rm skin nonumber \n = 4 int_0^pi2 hspace-2ex left( R_rm fusecostheta + n_rm fwebw_rm fbright)^2 R_rm fuse t_rm shell rm dtheta nonumber \n + 4 n_rm fweb int_pi2^pi2+theta_rm fb hspace-2ex left( R_rm fusecostheta right)^2 R_rm fuse t_rm shell rm dtheta + sum_k=1^n_k 4 R_rm fuset_rm shelltheta_rm fbw_rm fb^2 (2k - i_k)^2 nonumber \n = left rule-05em0em15em left pi + n_rm fweb(2theta_rm fb- sin 2 theta_rm fb) right R_rm fuse^2 right nonumber 025em + 8 cos theta_rm fb n_rm fwebw_rm fb R_rm fuse nonumber 025em + left( 2pi + 4theta_rm fbright) (n_rm fwebw_rm fb)^2 nonumber 025em left + 4 theta_rm fbw_rm fb^2 sum_k=1^n_k (2k - i_k)^2 rule-05em0em15em right R_rm fuse t_rm shell \n n_k = rm int(n_rm fweb2) \n i_k = rm mod(n_rm fweb+1 2) hspace4ex endaligned It's useful to note that for the particular case of n_rm fweb=0 w_rm fb=0, together with Delta R_rm fuse= 0, there is only one circle. The areas and bending inertias then reduce to those for a single circular cross-section. beginaligned hspace6ex A_rm skin = 2 pi R_rm fuse t_rm skin hspace6ex (rm if n_rm fweb=0 w_rm fb= 0 Delta R_rm fuse= 0) \n hspace6ex S_rm skin = pi R_rm fuse^2 hspace11ex (rm if n_rm fweb=0 w_rm fb= 0 Delta R_rm fuse= 0) \n hspace6ex I_rm hshell= I_rm vshell = pi R_rm fuse^3 t_rm shell hspace7ex (rmif n_rm fweb=0 w_rm fb= 0 Delta R_rm fuse= 0) endaligned Hence, no generality is lost with this multiple-bubble cross-section model.","category":"page"},{"location":"structures/fuselage/#Pressure-shell-loads","page":"Fuselage","title":"Pressure shell loads","text":"","category":"section"},{"location":"structures/fuselage/","page":"Fuselage","title":"Fuselage","text":"The pressurization load from the Delta p pressure difference produces the following axial and hoop stresses in the fuselage skin, with the assumption that the stringers share the axial loads, but the frames do not share the hoop loads. This assumes a typical aluminum fuselage structure, where the stringers are contiguous and solidly riveted to the skin, but the frames are either offset from the skin or have clearance cutouts for the stringers which interrupt the frames' hoop loads.","category":"page"},{"location":"structures/fuselage/","page":"Fuselage","title":"Fuselage","text":"beginaligned\nsigma_x = \nfracDelta p2 fracR_rm fuset_rm shell\n\nsigma_theta = \nDelta p fracR_rm fuset_rm skin\nendaligned","category":"page"},{"location":"structures/fuselage/","page":"Fuselage","title":"Fuselage","text":"An isotropic (metal) fuselage skin thickness t_rm skin and the web thickness t_rm fweb will therefore be sized by the larger sigma_theta value in order to meet an allowable stress sigma_rm skin. beginaligned t_rm skin = fracDelta p R_rm fusesigma_rm skin labeltfuse \nt_rm fweb = 2 fracDelta p w_rm fbsigma_rm skin endaligned This particular t_rm fweb value is obtained from the requirement of equal circumferential stress in the skin and the web, and tension equilibrium at the 3-point web/skin junction.","category":"page"},{"location":"structures/fuselage/","page":"Fuselage","title":"Fuselage","text":"The volume of the skin material cal V_rm skin is obtained from the cross-sectional skin area, plus the contribution of the ellipsoidal nose endcap and the spherical rear bulkhead. The nose uses Cantrell's approximation for the surface area of an ellipsoid. ","category":"page"},{"location":"structures/fuselage/","page":"Fuselage","title":"Fuselage","text":"beginalign\nS_rm nose simeq left 2pi + 4n_rm fwebtheta_rm fbright R_rm fuse^2 left frac13 + frac23 left( fracl_rm noseR_rm fuse right)^85 right^ 58 nonumber \n hspace5em nonumber\nS_rm bulk simeq left 2pi + 4n_rm fwebtheta_rm fbright R_rm fuse^2 nonumber \n hspace5em nonumber\ncal V_rm cyl = A_rm skin l_rm shell nonumber \ncal V_rm nose = S_rm nose t_rm skin nonumber \ncal V_rm bulk = S_rm bulk t_rm skin nonumber \ncal V_rm fweb = A_rm fweb l_rm shell nonumber \n\nx hspace-04ex cal V_rm cyl = textstyle frac12(x_rm shell_1 + x_rm shell_2) cal V_rm cyl nonumber \nx hspace-04ex cal V_rm nose = textstyle frac12(x_rm nose + x_rm shell_1) cal V_rm nose nonumber \nx hspace-04ex cal V_rm bulk = (x_rm shell_2 + textstyle frac12Delta R_rm fuse) cal V_rm bulk nonumber \nx hspace-04ex cal V_rm fweb = textstyle frac12(x_rm shell_1 + x_rm shell_2) cal V_rm fweb nonumber\nendalign","category":"page"},{"location":"structures/fuselage/","page":"Fuselage","title":"Fuselage","text":"The total fuselage shell weight then follows by specifying a material density rho_rm skin for the skin and web. The assumed skin-proportional added weights of local reinforcements, stiffeners, and fasteners are represented by the f_rm fadd fraction, and stringers and frames are represented by the f_rm stringf_rm frame fractions. ","category":"page"},{"location":"structures/fuselage/","page":"Fuselage","title":"Fuselage","text":"beginaligned\nW_rm skin = \nrho_rm skin g \n (cal V_rm cyl+ cal V_rm nose+ cal V_rm bulk)\n\nW_rm fweb = \nrho_rm skin g cal V_rm fweb\n\nx hspace-045ex W_rm skin =\nrho_rm skin g \n (x hspace-04ex cal V_rm cyl+ x hspace-04ex cal V_rm nose+ x hspace-04ex cal V_rm bulk)\n\nx hspace-045ex W_rm fweb =\nrho_rm skin g x hspace-04ex cal V_rm fweb\n05em\nW_rm shell = W_rm skin(1+f_rm string+f_rm frame+f_rm fadd) \n + W_rm fweb\n\nx hspace-045ex W_rm shell = x hspace-045ex W_rm skin(1+f_rm string+f_rm frame+f_rm fadd) \n + x hspace-045ex W_rm fweb\nendaligned","category":"page"},{"location":"structures/fuselage/#Fuselage-bending-loads","page":"Fuselage","title":"Fuselage bending loads","text":"","category":"section"},{"location":"structures/fuselage/","page":"Fuselage","title":"Fuselage","text":"In addition to the pressurization and torsion loads, the fuselage also sees bending loads from its distributed weight load plus the tail weight and airloads. In the case where the pressurization-sized shell is not sufficient to withstand this, additional bending material area is assumed to be added at the top and bottom (total of A_rm hbendscriptstyle (x)), and also sides of the shell (total of A_rm vbendscriptstyle (x)), as shown in figure 2. If the shell is sufficiently strong, then these areas will be zero.","category":"page"},{"location":"structures/fuselage/#Total-fuselage-weight","page":"Fuselage","title":"Total fuselage weight","text":"","category":"section"},{"location":"structures/fuselage/","page":"Fuselage","title":"Fuselage","text":"The total fuselage weight includes the shell with stiffeners, tailcone, floor beams, fixed weight, payload-proportional equipment and material, seats, and the added horizontal and vertical-axis bending material.","category":"page"},{"location":"structures/fuselage/","page":"Fuselage","title":"Fuselage","text":"beginaligned\nW_rm fuse = \nW_rm fix+ \nW_rm apu+ \nW_rm padd+ \nW_rm seat\nnonumber \n + \nW_rm shell+ \nW_rm cone+\nW_rm window+ \nW_rm insul+ \nW_rm floor\nnonumber \n +\nW_rm hbend+ \nW_rm vbend\n \nx hspace-045ex W_rm fuse = \nx hspace-045ex W_rm fix+ \nx hspace-045ex W_rm apu+ \nx hspace-045ex W_rm padd+\nx hspace-045ex W_rm seat\nnonumber \n + \nx hspace-045ex W_rm shell+ \nx hspace-045ex W_rm cone+\nx hspace-045ex W_rm window+ \nx hspace-045ex W_rm insul+ \nx hspace-045ex W_rm floor\nnonumber \n + \nx hspace-045ex W_rm hbend+ \nx hspace-045ex W_rm vbend\nendaligned","category":"page"},{"location":"structures/fuselage/","page":"Fuselage","title":"Fuselage","text":"TASOPT.fusew","category":"page"},{"location":"structures/fuselage/#TASOPT.structures.fusew","page":"Fuselage","title":"TASOPT.structures.fusew","text":" fusew(gee, Nland, Wfix, Wpay, Wpadd, Wseat, Wapu, Weng, Waftfuel,\n fstring, fframe, ffadd, deltap,\n Wpwindow, Wppinsul, Wppfloor,\n Whtail, Wvtail, rMh, rMv, Lhmax, Lvmax,\n bv, lambdav, nvtail,\n Rfuse, dRfuse, wfb, nfweb, lambdac,\n xnose, xshell1, xshell2, xconend,\n xhtail, xvtail,\n xwing, xwbox, cbox,\n xfix, xapu, xeng, xfuel,\n hfloor,\n sigskin, sigbend, rhoskin, rhobend, \n Eskin, Ebend, Gskin)\n\nfusew sizes the fuselage and calculates the component weights and structural properties. It takes inputs related to geometry, fixed weights, material properties, and more to compute the fuselage dimensions, weights, and other parameters.\n\ndetails: 🔃 Inputs and Outputs\nInputs:Nland::Integer: Number of landing gear components.Fixed weights of various components:Wfix::Float64: Fixed weight of the structure.\nWpay::Float64: Fixed weight of payload.\nWpadd::Float64: Fixed weight of additional equipment.\nWseat::Float64: Fixed weight of seats.\nWapu::Float64: Fixed weight of auxiliary power unit.\nWeng::Float64: Fixed weight of engines.\nWaftfuel::Float64: Fixed weight of aft fuel storage.Factors for stringers, frames, and additional structural components:fstring::Float64: Factor for stringers.\nfframe::Float64: Factor for frames.\nffadd::Float64: Factor for additional structural components.Pressure differential:deltap::Float64: Pressure differential.Weights of window, insulation, and floor:Wpwindow::Float64: Weight of windows.\nWppinsul::Float64: Weight of insulation.\nWppfloor::Float64: Weight of floor.Vertical tail parameters:Whtail::Float64: Weight of horizontal tail components.\nWvtail::Float64: Weight of vertical tail components.\nrMh::Float64: Horizontal tail moment arm.\nrMv::Float64: Vertical tail moment arm.\nLhmax::Float64: Maximum horizontal tail length.\nLvmax::Float64: Maximum vertical tail length.\nbv::Float64: Vertical tail span.\nlambdav::Float64: Vertical tail taper ratio.\nnvtail::Integer: Number of vertical tail units.Fuselage parameters:Rfuse::Float64: Fuselage radius.\ndRfuse::Float64: Fuselage thickness.\nwfb::Float64: Fuselage width.\nnfweb::Integer: Number of fuselage webs.\nlambdac::Float64: Fuselage taper ratio.Geometric parameters and locations:xnose::Float64: X location of the nose.\nxshell1::Float64: X location of the first shell point.\nxshell2::Float64: X location of the second shell point.\nxconend::Float64: X location of the cone end.\nxhtail::Float64: X location of horizontal tail components.\nxvtail::Float64: X location of vertical tail components.\nxwing::Float64: X location of the wing.\nxwbox::Float64: X location of the wing box.\ncbox::Float64: Wing box width.\nxfix::Float64: X location of fixed components.\nxapu::Float64: X location of auxiliary power unit.\nxeng::Float64: X location of engines.\nxfuel::Float64: X location of fuel storage.\nhfloor::Float64: Height of the floor.Material properties:sigskin::Float64: Skin material stress.\nsigbend::Float64: Bending material stress.\nrhoskin::Float64: Skin material density.\nrhobend::Float64: Bending material density.\nEskin::Float64: Skin material Young's modulus.\nEbend::Float64: Bending material Young's modulus.\nGskin::Float64: Skin material shear modulus.Outputs:Thicknesses and locations:tskin::Float64: Fuselage skin thickness.\ntcone::Float64: Thickness of the tail cone.\ntfweb::Float64: Thickness of fuselage webs.\ntfloor::Float64: Floor beam thickness.\nxhbend::Float64: X location of added material for horizontal-axis bending.\nxvbend::Float64: X location of added material for vertical-axis bending.Bending and torsion inertias:EIhshell::Float64: Bending inertia for horizontal shell.\nEIhbend::Float64: Bending inertia for horizontal axis bending.\nEIvshell::Float64: Bending inertia for vertical shell.\nEIvbend::Float64: Bending inertia for vertical axis bending.\nGJshell::Float64: Torsional stiffness for horizontal shell.\nGJcone::Float64: Torsional stiffness for tail cone.Weights of components and total fuselage weight:Wshell::Float64: Weight of fuselage shell components.\nWcone::Float64: Weight of tail cone.\nWwindow::Float64: Weight of windows.\nWinsul::Float64: Weight of insulation.\nWfloor::Float64: Weight of floor.\nWhbend::Float64: Weight of horizontal-axis bending material.\nWvbend::Float64: Weight of vertical-axis bending material.\nWfuse::Float64: Total weight of the fuselage.MomentsxWfuse::Float64: Moments.Pressurized cabin volume:cabVol::Float64: Pressurized cabin volume.\n\nSee here or Section 2.2 of the TASOPT Technical Description.\n\n\n\n\n\n","category":"function"},{"location":"propulsion/PEMfuelcell/#PEM-fuel-cells","page":"PEM fuel cells","title":"PEM fuel cells","text":"","category":"section"},{"location":"propulsion/PEMfuelcell/#Theory","page":"PEM fuel cells","title":"Theory","text":"","category":"section"},{"location":"propulsion/PEMfuelcell/","page":"PEM fuel cells","title":"PEM fuel cells","text":"details: 📖 Theory - Proton-exchange membrane fuel cells\nProton-exchange membrane (PEM), also known as polymer electrolyte membrane, fuel cells are electrochemical devices that convert the chemical energy of a fuel to electrical energy through low-temperature oxidation and reduction reactions. Unlike a combustion process in which these processes occur through direct collisions between molecules, the oxidation and reduction reactions are physically separated in fuel cells by a membrane, across which ions produced in the oxidation reaction drift to complete the overall chemical reaction. A diagram of a hydrogen-air fuel cell is shown below. The overall reaction is mathrmH_2 + frac12mathrmO_2 rightarrow mathrmH_2mathrmOand this occurs through two half reactions: an oxidation reactionmathrmH_2 rightarrow 2mathrmH^+ + 2e^-and a reduction reactionfrac12mathrmO_2+2mathrmH^+ + 2e^- rightarrow mathrmH_2mathrmOwhere e^- represents a free electron. In a PEM fuel cell, the oxidation reaction occurs at the anode, with protons drifting across the electrolyte membrane towards the cathode where reduction occurs, while electrons complete an external electric circuit. There are three regions of physical interest in a fuel cell: a bulk flow region, a diffusion layer, and an electrolyte layer. The bulk flow refers to the region outside of the electrodes, which is dominated by advection. The diffusion region is the region inside the porous electrodes, where there cannot be significant advection and molecular motion is governed by diffusion. The electrolyte is the region between the electrodes, where ions drift to close the circuit.(Image: PEMfig)The voltage across a fuel cell is governed by thermodynamics and different loss types[1]V = E_r - eta_mathrmohm - eta_C - eta_Awhere E_r is the thermodynamic reversible voltage, eta_mathrmohm is the ohmic overvoltage due to Joule heating, and eta_A and eta_C are the anode and cathode overvoltages due to activation and concentration losses. The following model is adapted from that in Springer et al.[2]; two versions of this have been implemented: a low-temperature PEMFC model that closely follows the original one in Springer et al.[2], and a high-temperature PEMFC model that is based on it but makes modifications to reflect the different operating temperatures and membrane properties.Reversible voltageThe maximum theoretical energy that can be converted to electrical energy is given by the change in Gibbs free+- energy (Delta G) in this process. Every mole of hydrogen produces nF moles of electrons, where F is the Faraday constant and n=2 is the number of electrons produced for each unit of hydrogen. Therefore, the voltage produced in this reversible reaction is given byE_r = fracDelta hatgnFwhere Delta hatg is the molar specific change in Gibbs free energy. In general, Delta hatg is a function of temperature as well as of reactant pressure. The reversible voltage of a fuel cell can be calculated using the Nernst equation to account for these effects[1],E_r = E_0 + fracDelta hatsnF(T-T_0) - fracRTnFlnleft(fracp_0^32p_mathrmH_2 p_mathrmO_2^12right)where T is the fuel cell temperature, p_0=1atm, T_0=29815K, and p_mathrmH_2 and p_mathrmO_2 denote the partial pressures of oxygen and hydrogen in the reactants. The term E_0 is the reversible voltage at standard conditions, and it is equal to E_0=1229V for liquid water as a product and E_0=1185V for gaseous water. Similarly, the term Delta hats denotes the molar specific entropy change during the reaction, and it is Delta hats=-4434J/(mol K) for gaseous water as a product and Delta hats=-16323J/(mol K) for liquid water.Ohmic lossesAs ions drift through the electrolyte material, they produce ohmic heating as a result of the electrical resistance of the electrolyte. The area-specific resistance (ASR) of the electrolyte can be calculated asmathrmASR = int_0^t_M fracdzsigma(z)where t_M is the electrolyte thickness, sigma is the conductivity of the electrolyte material to ionic motion, and z is a coordinate normal to the electrolyte surface from the anode to the cathode. As the ASR increases with electrolyte thickness, thin electrolytes are preferred. The conductivity depends on the choice of material. A common electrolyte in low-temperature PEM fuel cells is Nafion, which shows excellent ion conduction properties but needs to be constantly hydrated. The conduction properties of Nafion depend on its water content, lambda, defined as the ratio of water molecules to ion conduction sites. An empirical expression for the conductivity of Nafion (in (Omega cm)^-1) as a function of lambda and temperature is[2]sigma = expleft1268left(frac1303-frac1Tright)right(0005139lambda-000326)A key challenge in modeling the ohmic losses is to identify how lambda changes depending on the operating parameters. It can be shown that the change in lambda in the direction normal to the electrolyte surface is governed by[2] fracdlambdadz = left(n^mathrmSAT_mathrmdragfraclambda11-alpha^*right)fracjM_m2Frho_mathrmdryD_lambdawhere alpha^* is defined as the ratio of water molecule flux to proton flux (in general an unknown), n^mathrmSAT_mathrmdragapprox 25 is the number of water molecules dragged by each proton in fully hydrated Nafion, rho_mathrmdry=1970kg m^-3 is the density of dry Nafion, M_mapprox 1kg mol^-1 is the Nafion equivalent weight, j is the current density that the fuel cell is operating at, and D_lambda is the diffusivity of water in the Nafion membrane. The parameter D_lambda is a weak function of lambda[2]. Water content in the electrode/Nafion interface changes as a function of water activity in the electrode, defined as a_w=fracx_mathrmH_2Opp_mathrmSAT, where x_mathrmH_2O is the water concentration outside the membrane and p_mathrmSAT is the saturation partial pressure of water at the fuel cell temperature. If a_wleq 1, expected at the anode side, the relationship can be expressed with a polynomial from a data fit[2],lambda = 0043 + 1781 a_w - 3985 a_w^2 + 36 a_w^3and for a_w1, expected at the cathode, the relationship is linear but with a different slope[2],lambda = 14 +14 (a_w-1)As the reaction proceeds, oxygen and hydrogen are consumed and this affects the concentration in the bulk flow. This effect can be captured with a stoichiometric ratio of hydrogen at the anode and another one for oxygen at the cathode, lambda_mathrmH_2 an lambda_mathrmO_2; for example, if lambda_mathrmO_2=1, all the oxygen is consumed in the reaction. To use these relationships, it is necessary to calculate the water and reactant concentrations at the membrane/electrode interface. To do so, it is necessary to first determine the water and hydrogen concentration at station 1 and the water and oxygen concentrations at 3, from a mass balance considering depletion effects. Explicit equations for these concentrations as a function of alpha^* and the stoichiometry ratios are given in [2]. Once these are known, the concentrations at 2 and 3 can be determined from the diffusion of the species (see note below).The key step in this model is to calculate alpha^* by matching the water concentration (or water content) at the cathode/membrane interface produced by two methods. If the water concentration is solved by integrating the diffusion equation from the cathode side, a water content at the interface lambda^prime_3 can be calculated from the water activity. Similarly, the water activity at 3 can be calculated by first integrating the diffusion equation from the anode side to find the water concentration at 2, then calculating the water content at 2 from the activity, and then integrating the equation above for fracdlambdadz across the membrane to find the water content at 3, lambda_3. The correct alpha^* has been found if lambda^prime_3 -lambda_3. A root finding algorithm is used in the code to find the alpha^* that fulfills this condition.Once alpha^* has been determined, it can be used to find the water content profile across the membrane by solving the ODE for lambda (done numerically in the code). Finally, the conductivity can be calculated from the expression above and this can be used to determine ASR.In contrast, polybenzimidazole (PBI) membranes are commonly used in high-temperature PEMFCs. Unlike Nafion, they do not require to be hydrated and they have a negligible water flux across them. A model for how the conductivity of PBI changes with operating conditions is provided in Jio and Li[3],sigma = frac(168mathrmDL^3 - 6324 mathrmDL^2 + 65760 mathrmDL + 8460) b T expleft(-frac-6196mathrmDL + 21650RTright)where mathrmDL is the phosphoric acid doping level, defined as the ratio of phosphoric acid molecules to number of PBI repeat unit (typically of the order of 5), and b is given byb = begincases\n1+(001704T - 4767)mathrmRH_avg textfor 37315leq Tleq 41315\n1+(01432T - 5689)mathrmRH_avg textfor 41315 Tleq 45315\n1+(07T - 3092)mathrmRH_avg textfor 45315 Tleq 47315\nendcaseswhere mathrmRH_avg is the average of the relative humidity in stations 2 and 3, and the relative humidity is simply mathrmRH=fracx_mathrmH_2Opp_mathrmSAT. To use this expression, it is necessary to calculate the water concentration is stations 2 and 3. As in the low-temperature model, this is done by solving the diffusion equations in Springer et al.[2] analytically, with the key difference that there is no water flux across the membrane.The ohmic overvoltage, or ohmic loss, is given byeta_mathrmohm = j mathrmASRWater saturationThere are many models for the saturation partial pressure of water. A possible model valid under 383.15 K is [4]p_mathrmSAT = fracexpleft(34494 - frac492499t + 2371right)(t + 105)^157 where t is the temperature in degrees Celsius and p_mathrmSAT is in pascals. A model for temperatures between 383.15 and 483 K is[3]p_mathrmSAT = 068737 T^3 - 73239 T^2 +263390 T -31919000 where T is in kelvin.DiffusivityThe diffusion of a species in a multi-species gas is complex. The Stefan-Maxwell expression can be used to model the derivative in space of the concentration of species i,fracdx_idz= RT sum_j fracx_i N_j - x_j N_ip D_ijwhere the sum is made over all the species that i can collide with, and N represents the molar flux. Equations for the spatial derivative of concentration can be found in [2]; for this particular model, there are closed-form solutions.This equation requires determining the binary diffusivities of all the species involved. A model for binary diffusivity of species i and j isp D_ij = a left(fracTsqrtT_ci T_cjright)^b (p_ci p_cj)^13 (T_ci T_cj)^512left(frac1M_i + frac1M_jright)^12where the pressures are in atm and the diffusivity is in cm^2/s. For gas pairs involving nonpolar gases, a=2745times10^-4 and b=1823. For pairs involving water and another nonpolar gas, a=3640times10^-4 and b=2334. The parameters T_c and p_c can be found in Table 5.1 in [1].When diffusion is occurring inside a porous material, such as a PEM electrode, the material structure affects the diffusion properties. This can be captured via an effective diffusivity, D^mathrmeff, which is given byD^mathrmeff = D varepsilon ^tauwhere varepsilon is the porosity of the material (a typical value is 0.4), and tau is the tortuosity, which can vary between 1.5 and 10.Cathode overvoltageThe fuel cell also experiences voltage drop due to activation losses, since a voltage is required to provide activation energy for the half reactions, and due to concentration losses, as the maximum current is limited by the rate of diffusion from the bulk flow to the electrodes. These losses are most significant at the cathode side; in this model, anode voltage drops are ignored. The cathode overvoltage can be calculated using the Tafel equation,eta_C = fracRTn_C alpha F ln leftfracjj_0 fracp_Cp_0 x_mathrmO_23effrightwhere n_C=4 is the number of electrons exchanged in the reduction reaction and alpha represents a symmetry parameter, typically 0.3–0.5. The effective oxygen concentration at 3, x_mathrmO_23eff, accounts for the fact that part of the water on the cathode side is actually in liquid phase in low-temperature PEMFCs. For these, it is given byx_mathrmO_23eff = fracx_mathrmO_231-x_liqwhere x_liq = x_mathrmH_2O3 - p_mathrmSAT p_C is the fraction of water in the cathode that is in liquid phase. In high-temperature PEMFCs, all water is in gaseous phase, so x_mathrmO_23eff =x_mathrmO_23.The exchange current density, j_0, is related to the catalyst properties and effective surface area. A model for it is[5]j_0 = j_0reffracA_effAleft(fracx_mathrmO_23effp_Cp_0right)^gamma expleft-fracE_aRTleft(1-fracTT_0right)rightwhere j_0refsim 10^-9 A/m^2 is the reference exchange current density for a platinum catalyst at T_0 and p_0, fracA_effA is the ratio of effective surface area of the catalyst to geometric area (can be of the order of 1000), gamma is a parameter in the range of 0.5–1.0, and E_a=66 kJ/mol is the activation energy for oxygen reduction on platinum.","category":"page"},{"location":"propulsion/PEMfuelcell/#Functions","page":"PEM fuel cells","title":"Functions","text":"","category":"section"},{"location":"propulsion/PEMfuelcell/#Low-temperature-PEM-model","page":"PEM fuel cells","title":"Low-temperature PEM model","text":"","category":"section"},{"location":"propulsion/PEMfuelcell/","page":"PEM fuel cells","title":"PEM fuel cells","text":"engine.LT_PEMFC_voltage","category":"page"},{"location":"propulsion/PEMfuelcell/#TASOPT.engine.LT_PEMFC_voltage","page":"PEM fuel cells","title":"TASOPT.engine.LT_PEMFC_voltage","text":"LT_PEMFC_voltage(u, α_guess::Float64 = 0.25)\n\nA 1-D model of the voltage across a low-temperature PEM fuel cell with a Nafion membrane, based on the model in Springer et al. (1991), which captures the effect of reactant depletion, multispecies diffusion and water transport in the membrane.\n\ndetails: 🔃 Inputs and Outputs\nInputs:u::Struct: structure of type PEMFC_inputs with inputs\nα_guess::Float64: guess for ratio of water flux to proton flux; default is 0.25Outputs:V::Float64: voltage across cell (V)\nα_star::Float64: ratio of water flux to proton flux\n\n\n\n\n\n","category":"function"},{"location":"propulsion/PEMfuelcell/","page":"PEM fuel cells","title":"PEM fuel cells","text":"engine.water_balance","category":"page"},{"location":"propulsion/PEMfuelcell/#TASOPT.engine.water_balance","page":"PEM fuel cells","title":"TASOPT.engine.water_balance","text":"water_balance(α_star, u, p)\n\nThis function calculates the difference between the water content at 3 from integration from the anode or cathode sides. This residual should be 0 if α_star is the correct one.\n\ndetails: 🔃 Inputs and Outputs\nInputs:α_star::Float64: ratio of water flux to proton flux\nu::Struct: structure of type PEMFC_inputs with inputs \np::Struct: structure of type PEMFC_params with parameters Outputs:x_end::Vector{Float64}: vector with values of x at z = d\n\n\n\n\n\n","category":"function"},{"location":"propulsion/PEMfuelcell/","page":"PEM fuel cells","title":"PEM fuel cells","text":"engine.Nafion_diffusion","category":"page"},{"location":"propulsion/PEMfuelcell/#TASOPT.engine.Nafion_diffusion","page":"PEM fuel cells","title":"TASOPT.engine.Nafion_diffusion","text":"Nafion_diffusion(T, λ)\n\nThis function estimates the diffusion coefficient of water in Nafion.\n\ndetails: 🔃 Inputs and Outputs\nInputs:T::Float64: fuel cell temperature (K)\nλ::Float64: water content; ratio of water molecules to SO3- sitesOutputs:D_λ::Float64: water diffusion coefficient in Nafion (m^2/s)\n\n\n\n\n\n","category":"function"},{"location":"propulsion/PEMfuelcell/","page":"PEM fuel cells","title":"PEM fuel cells","text":"engine.conductivity_Nafion","category":"page"},{"location":"propulsion/PEMfuelcell/#TASOPT.engine.conductivity_Nafion","page":"PEM fuel cells","title":"TASOPT.engine.conductivity_Nafion","text":"conductivity_Nafion(T, λ)\n\nThis function calculates the conductivity of Nafion as a function of water content.\n\ndetails: 🔃 Inputs and Outputs\nInputs:T::Float64: fuel cell temperature (K)\nλ::Float64: water content; ratio of water molecules to SO3- sitesOutputs:σ::Float64: conductivity (Ohm m)^-1\n\n\n\n\n\n","category":"function"},{"location":"propulsion/PEMfuelcell/","page":"PEM fuel cells","title":"PEM fuel cells","text":"engine.λ_calc","category":"page"},{"location":"propulsion/PEMfuelcell/#TASOPT.engine.λ_calc","page":"PEM fuel cells","title":"TASOPT.engine.λ_calc","text":"λ_calc(a)\n\nThis function calculates the water content at the Nafion/electrode interface based on water activity.\n\ndetails: 🔃 Inputs and Outputs\nInputs:a::Float64: water activityOutputs:λ::Float64: water content; ratio of water molecules to SO3- sites\n\n\n\n\n\n","category":"function"},{"location":"propulsion/PEMfuelcell/","page":"PEM fuel cells","title":"PEM fuel cells","text":"engine.dλ_dz_membrane","category":"page"},{"location":"propulsion/PEMfuelcell/#TASOPT.engine.dλ_dz_membrane","page":"PEM fuel cells","title":"TASOPT.engine.dλ_dz_membrane","text":"dλ_dz_membrane(λ, u, p)\n\nThis function evaluates the derivative in space of the water content in the membrane.\n\ndetails: 🔃 Inputs and Outputs\nInputs:λ::Float64: water content; ratio of water molecules to SO3- sites\nu::Struct: structure of type PEMFC_inputs with inputs \np::Struct: structure of type PEMFC_params with parameters Outputs:dλ_dz::Vector{Float64}: vector with derivative of λ in space\n\n\n\n\n\n","category":"function"},{"location":"propulsion/PEMfuelcell/#High-temperature-PEM-model","page":"PEM fuel cells","title":"High-temperature PEM model","text":"","category":"section"},{"location":"propulsion/PEMfuelcell/","page":"PEM fuel cells","title":"PEM fuel cells","text":"engine.HT_PEMFC_voltage","category":"page"},{"location":"propulsion/PEMfuelcell/#TASOPT.engine.HT_PEMFC_voltage","page":"PEM fuel cells","title":"TASOPT.engine.HT_PEMFC_voltage","text":"HT_PEMFC_voltage(u)\n\nA 1-D model of the voltage across a high-temperature PEM fuel cell with a PBI membrane. The code is based on the LT-PEMFC model by Springer et al. (1991), modified to eliminate water transport across the membrane and with conductivity values for PBI.\n\ndetails: 🔃 Inputs and Outputs\nInputs:u::Struct: structure of type PEMFC_inputs with inputsOutputs:V::Float64: voltage across cell (V)\n\n\n\n\n\n","category":"function"},{"location":"propulsion/PEMfuelcell/","page":"PEM fuel cells","title":"PEM fuel cells","text":"engine.conductivity_PBI","category":"page"},{"location":"propulsion/PEMfuelcell/#TASOPT.engine.conductivity_PBI","page":"PEM fuel cells","title":"TASOPT.engine.conductivity_PBI","text":"conductivity_PBI(T, DL, RH)\n\nThis function calculates the conductivity of a PBI membrane as a function of temperature, doping level and humidity. Model from K. Jiao and X. Li (2009). A Three-Dimensional Non-isothermal Model of High Temperature Proton Exchange Membrane Fuel Cells with Phosphoric Acid Doped Polybenzimidazole Membranes.\n\ndetails: 🔃 Inputs and Outputs\nInputs:T::Float64: fuel cell temperature (K)\nDL::Float64: phosphoric acid doping level\nRH::Float64: average relative humidity across membraneOutputs:σ::Float64: conductivity (Ohm m)^-1\n\n\n\n\n\n","category":"function"},{"location":"propulsion/PEMfuelcell/#Stack-and-design","page":"PEM fuel cells","title":"Stack and design","text":"","category":"section"},{"location":"propulsion/PEMfuelcell/","page":"PEM fuel cells","title":"PEM fuel cells","text":"engine.PEMsize","category":"page"},{"location":"propulsion/PEMfuelcell/#TASOPT.engine.PEMsize","page":"PEM fuel cells","title":"TASOPT.engine.PEMsize","text":"PEMsize(P_des, V_des, u)\n\nDesigns the fuel cell stack for the design point conditions.\n\ndetails: 🔃 Inputs and Outputs\nInputs:P_des::Float64: design stack output power, ideally maximum power in mission (W)\nV_des::Float64: design stack voltage (V)\nu::Struct: structure of type PEMFC_inputs with inputs Outputs:n_cells::Float64: number of cells in stack\nA_cell::Float64: cell surface area (m^2)\nQ::Float64: waste power produced by the fuel cell at design point (W)\n\n\n\n\n\n","category":"function"},{"location":"propulsion/PEMfuelcell/","page":"PEM fuel cells","title":"PEM fuel cells","text":"engine.PEMoper","category":"page"},{"location":"propulsion/PEMfuelcell/#TASOPT.engine.PEMoper","page":"PEM fuel cells","title":"TASOPT.engine.PEMoper","text":"PEMoper(P_stack, n_cells, A_cell, u)\n\nEvaluates fuel cell stack performance in off-design conditions.\n\ndetails: 🔃 Inputs and Outputs\nInputs:P_stack::Float64: stack output power (W)\nn_cells::Float64: number of cells in stack\nA_cell::Float64: cell surface area (m^2)\nu::Struct: structure of type PEMFC_inputs with inputs Outputs:V_stack::Float64: stack voltage (V)\nQ::Float64: waste power produced by the fuel cell (W)\n\n\n\n\n\n","category":"function"},{"location":"propulsion/PEMfuelcell/","page":"PEM fuel cells","title":"PEM fuel cells","text":"engine.PEMstackweight","category":"page"},{"location":"propulsion/PEMfuelcell/#TASOPT.engine.PEMstackweight","page":"PEM fuel cells","title":"TASOPT.engine.PEMstackweight","text":"PEMstackweight(gee, u, A, n_cells, fouter)\n\nCalculates the weight of a stack of PEM fuel cells.\n\ndetails: 🔃 Inputs and Outputs\nInputs:gee::Float64: gravitational acceleration (m/s^2)\nu::Struct: structure of type PEMFC_inputs with inputs \nn_cells::Float64: number of cells in stack\nA_cell::Float64: cell surface area (m^2)\nfouter::Float64: ratio of stack structural mass (inc. bipolar plates) to membrane and electrode massOutputs:W_stack::Float64: weight of FC stack (N)\n\n\n\n\n\n","category":"function"},{"location":"propulsion/PEMfuelcell/#Physics-and-mathematics","page":"PEM fuel cells","title":"Physics and mathematics","text":"","category":"section"},{"location":"propulsion/PEMfuelcell/","page":"PEM fuel cells","title":"PEM fuel cells","text":"engine.water_sat_pressure","category":"page"},{"location":"propulsion/PEMfuelcell/#TASOPT.engine.water_sat_pressure","page":"PEM fuel cells","title":"TASOPT.engine.water_sat_pressure","text":"water_sat_pressure(T)\n\nFunction to calculate the saturation partial pressure of water. It uses different models for temperatures above or below 100 degrees Celsius. \n\ndetails: 🔃 Inputs and Outputs\nInputs:T::Float64: gas temperature (K)Outputs:p_SAT::Float64: saturation pressure (Pa)\n\n\n\n\n\n","category":"function"},{"location":"propulsion/PEMfuelcell/","page":"PEM fuel cells","title":"PEM fuel cells","text":"engine.binary_diffusion","category":"page"},{"location":"propulsion/PEMfuelcell/#TASOPT.engine.binary_diffusion","page":"PEM fuel cells","title":"TASOPT.engine.binary_diffusion","text":"binary_diffusion(T, p, sps)\n\nThis model estimates the binary diffusion coefficient of a gas species in a water vapor, to be used inside the electrodes. It uses the method of Slattery and Bird (1958) for low pressures.\n\ndetails: 🔃 Inputs and Outputs\nInputs:T::Float64: gas temperature (K)\np::Float64: gas pressure (Pa)\nsps::Vec{String}: gas species vector (\"H2\", \"H2\", \"N2\" or \"O2\")Outputs:D::Float64: diffusion coefficient (m^2/s)\n\n\n\n\n\n","category":"function"},{"location":"propulsion/PEMfuelcell/","page":"PEM fuel cells","title":"PEM fuel cells","text":"engine.porous_diffusion","category":"page"},{"location":"propulsion/PEMfuelcell/#TASOPT.engine.porous_diffusion","page":"PEM fuel cells","title":"TASOPT.engine.porous_diffusion","text":"porous_diffusion(D, ε, τ)\n\nThis model estimates the effective diffusion coefficient of a gas in a porous environment, such as a PEM electrode.\n\ndetails: 🔃 Inputs and Outputs\nInputs:D::Float64: diffusion coefficient outside porous material (m^2/s)\nε::Float64: porosity of material\nτ::String: tortuosity of materialOutputs:Deff::Float64: effective diffusion coefficient (m^2/s)\n\n\n\n\n\n","category":"function"},{"location":"propulsion/PEMfuelcell/","page":"PEM fuel cells","title":"PEM fuel cells","text":"engine.cathode_j0","category":"page"},{"location":"propulsion/PEMfuelcell/#TASOPT.engine.cathode_j0","page":"PEM fuel cells","title":"TASOPT.engine.cathode_j0","text":"cathode_j0(T, p, Aeff_ratio)\n\nThis function calculates the exchange current density of a PEM with a platinum catalyst. \n\ndetails: 🔃 Inputs and Outputs\nInputs:T::Float64: fuel cell temperature (K)\np::Float64: reactant partial pressure (Pa)\nAeff_ratio::Float64: ratio of catalyst surface area to geometric cross-sectional areaOutputs:j0::Float64: exchange current density (A/m^2)\n\n\n\n\n\n","category":"function"},{"location":"propulsion/PEMfuelcell/","page":"PEM fuel cells","title":"PEM fuel cells","text":"engine.RK4","category":"page"},{"location":"propulsion/PEMfuelcell/#TASOPT.engine.RK4","page":"PEM fuel cells","title":"TASOPT.engine.RK4","text":"RK4(dy_dx, x, y0, u, p)\n\nThis function uses a 4th-order Runge-Kutta method to integrate a vector ODE in space or time.\n\ndetails: 🔃 Inputs and Outputs\nInputs:dy_dx::Function: function of the form dy_dx(x, y, u, p) for derivative\nx::Vector{Float64}: vector with the spatial coordinates for integration\ny0::Vector{Float64}: vector with the initial conditions\nu::Struct: structure of type PEMFC_inputs with inputs \np::Struct: structure of type PEMFC_params with parameters Outputs:y::Matrix{Float64}: matrix with values of y for every point in x \nyend::Vector{Float64}: vector with final conditions at x[end]\n\n\n\n\n\n","category":"function"},{"location":"propulsion/PEMfuelcell/","page":"PEM fuel cells","title":"PEM fuel cells","text":"engine.solve_diffusion_ODE","category":"page"},{"location":"propulsion/PEMfuelcell/#TASOPT.engine.solve_diffusion_ODE","page":"PEM fuel cells","title":"TASOPT.engine.solve_diffusion_ODE","text":"solve_diffusion_ODE(M, B, x0, d)\n\nThis function uses eigendecomposition to solve a problem of the form dx/dz = M * x + B\n\ndetails: 🔃 Inputs and Outputs\nInputs:M::Matrix{Float64}: matrix with coefficients\nB::Vector{Float64}: vector with right-hand parameters\nx0::Vector{Float64}: vector with the boundary conditions\nd::Float64: distance at which to evaluate x, z = dOutputs:x_end::Vector{Float64}: vector with values of x at z = d\n\n\n\n\n\n","category":"function"},{"location":"propulsion/PEMfuelcell/","page":"PEM fuel cells","title":"PEM fuel cells","text":"[1]: O'Hayre, Ryan, et al. Fuel cell fundamentals. John Wiley & Sons, 2016.","category":"page"},{"location":"propulsion/PEMfuelcell/","page":"PEM fuel cells","title":"PEM fuel cells","text":"[2]: Springer, Thomas E., T. A. Zawodzinski, and Shimshon Gottesfeld. \"Polymer electrolyte fuel cell model.\" Journal of the electrochemical society 138.8 (1991): 2334.","category":"page"},{"location":"propulsion/PEMfuelcell/","page":"PEM fuel cells","title":"PEM fuel cells","text":"[3]: Jiao, K., and X. Li. \"A Three‐Dimensional Non‐isothermal Model of High Temperature Proton Exchange Membrane Fuel Cells with Phosphoric Acid Doped Polybenzimidazole Membranes.\" Fuel Cells 10.3 (2010): 351-362.","category":"page"},{"location":"propulsion/PEMfuelcell/","page":"PEM fuel cells","title":"PEM fuel cells","text":"[4]: Huang, Jianhua. \"A simple accurate formula for calculating saturation vapor pressure of water and ice.\" Journal of Applied Meteorology and Climatology 57.6 (2018): 1265-1272.","category":"page"},{"location":"propulsion/PEMfuelcell/","page":"PEM fuel cells","title":"PEM fuel cells","text":"[5]: Barbir, Frano. PEM fuel cells: theory and practice. Academic press, 2012.","category":"page"},{"location":"aero/theory_pitching/","page":"-","title":"-","text":"details: 📖 Theory - Surface pitching moment\nThe surface's reference axis is at some specified chordwise fractional location xi_rm ax, as shown in the first figure. The profile pitching moment acts along the span-axis coordinate y_scriptscriptstyle perp, and scales with the normal-plane chord c_scriptscriptstyle perp. These are shown in the first figure, and related to the spanwise and streamwise quantities via the sweep angle.beginaligned\ny_scriptscriptstyle perp = y cos Lambda \nlabelyperp \nc_scriptscriptstyle perp = c cos Lambda \nlabelcperp \nV_scriptscriptstyle perp = V_scriptscriptstyle infty cos Lambda \nlabelVperp \nendalignedThe airfoil's pitching moment contribution shown in the figure below isbeginaligned\ndM_y_scriptscriptstyle perp = \nfrac12 rho V_scriptscriptstyle perp^2 c_scriptscriptstyle perp^2 c_m rm dy_scriptscriptstyle perp\n \nc_m scriptstyle (eta) = left\nbeginarraylcl\n c_m_o 0 eta eta_o\n05em\ndisplaystyle\n c_m_o + (c_m_s - c_m_o) \n fraceta - eta_oeta_s-eta_o\n eta_o eta eta_s\n025em\ndisplaystyle\n c_m_s + (c_m_t - c_m_s) \n fraceta - eta_s1-eta_s\n eta_s eta 1\nendarray\nright\nlabelcmeta\nendalignedand including the contribution of the lift load tildep with its moment arm gives the following overall wing pitching moment Delta M_rm wing increment about the axis center location. beginaligned rm dDelta M_rm wing = tildep left c_scriptscriptstyle perp left(xi_rm ax-textstyle frac14right) cosLambda - (y-y_o) tanLambda right rm dy + rm dM_y_scriptscriptstyle perp cosLambda hspace3em endaligned Integrating this along the whole span then gives the total surface pitching moment about its root axis. beginaligned\nDelta M_rm wing = \n(p_o b_o + 2Delta L_o) c_o left( xi_rm ax - textstyle frac14right) \nnonumber \n + \ncos^2 Lambda \nb int_eta_o^1 pscriptstyle (eta) cscriptstyle (eta)left( xi_rm ax - textstyle frac14right) \n rm deta \nnonumber \n - \nfracb2 tanLambda b int_eta_o^1 pscriptstyle (eta)(eta-eta_o) \n rm deta \nnonumber \n + 2 Delta L_t left\nc_o lambda_t left( xi_rm ax - textstyle frac14right) cos^2Lambda \n-\nfracb2 (1-eta_o) tanLambda right\nnonumber \n + frac12 rho V_scriptscriptstyle infty^2 cos^4 Lambda b \nint_eta_o^1 c_m scriptstyle (eta) cscriptstyle (eta)^2 rm deta \n\n\nDelta M_rm wing = \np_o b c_o eta_o \n(1 + f_L_scriptstyle o) left( xi_rm ax - textstyle frac14right) \nnonumber \n +\np_o b c_o left( xi_rm ax - textstyle frac14right) cos^2 Lambda \nfrac13\nleft \nleft( 1 + textstyle frac12left(lambda_s +gamma_sright) + lambda_s gamma_s\n right)(eta_s - eta_o) \nright\nnonumber \n hspace9em\nleft\n+\nleft( lambda_s gamma_s + \n textstyle frac12left(lambda_s gamma_t+gamma_slambda_tright)\n + lambda_t gamma_t\n right)(1 - eta_s) right\nnonumber \n -\np_o b c_o fractanLambdaK_o \nfrac112 left \n left( 1 + 2gamma_s right) (eta_s - eta_o)^2 \n+ left( gamma_s + 2gamma_tright) (1 - eta_s)^2\n+ 3left( gamma_s + gamma_t right) (eta_s - eta_o)(1 - eta_s)\n right\nnonumber \n +\n2 p_o b c_o f_L_scriptstyle t lambda_t gamma_t left\nK_o lambda_t left( xi_rm ax - textstyle frac14right) cos^2Lambda \n- textstyle frac12(1-eta_o) tanLambda right\nnonumber \n + \nfrac12 rho V_scriptscriptstyle infty^2 S c_o fraccos^4LambdaK_c \nfrac112\nleft left(\n c_m_o (3 + 2 lambda_s + lambda_s^2)\n + c_m_s (3 lambda_s^2 + 2 lambda_s + 1 )\n right)(eta_s-eta_o) right\nnonumber \n\nleft\n+ left(\n c_m_s (3 lambda_s^2 + 2 lambda_s lambda_t + lambda_t^2)\n + c_m_t (3 lambda_t^2 + 2 lambda_s lambda_t + lambda_s^2)\n right)(1-eta_s) \nright\nhspace3em\nlabelDMwing\nendalignedBy using the relation beginaligned\np_o b = frac12 rho V_scriptscriptstyle infty^2 S \nfrac1K_p left( C_L - fracS_rm hS C_L_rm h right)\nendalignedand the equation above it gives the equivalent pitching moment coefficient constant and C_L derivative. beginaligned\nDelta C_M_rm wing equiv\nfracDelta M_rm wingtextstyle frac12rho V_scriptscriptstyle infty^2 S c_o\n = Delta C_m_0 \n+ fracrm dC_mrm dC_L \nleft( C_L - fracS_rm hS C_L_rm h right)\n\nfracrm dC_mrm dC_L \n = \nfrac1K_p left rule-125ex0ex45ex\neta_o \n(1 + f_L_scriptstyle o) left( xi_rm ax - textstyle frac14right) \nright\nnonumber \n \n+ left( xi_rm ax - textstyle frac14right) cos^2 Lambda \nfrac13\nleft \nleft( 1 + textstyle frac12left(lambda_s +gamma_sright) + lambda_s gamma_s\n right)(eta_s - eta_o) \nright\nnonumber \n\nleft\n+\nleft( lambda_s gamma_s + \n textstyle frac12left(lambda_s gamma_t+gamma_slambda_tright)\n + lambda_t gamma_t\n right)(1 - eta_s) right\nnonumber \n \n- fractanLambdaK_o \nfrac112 left \n left( 1 + 2gamma_s right) (eta_s - eta_o)^2 \n+ left( gamma_s + 2gamma_tright) (1 - eta_s)^2 \n right\nnonumber \n \nleft\n+ 3left( gamma_s + gamma_t right) (eta_s - eta_o)(1 - eta_s)\n rule-05ex0ex3ex right\nnonumber \n \nleft\n+ 2 f_L_scriptstyle t lambda_t gamma_t left\nK_o lambda_t left( xi_rm ax - textstyle frac14right) cos^2Lambda \n- textstyle frac12(1-eta_o) tanLambda right\nrule-125ex0ex45ex right\n\n\n\nDelta C_m_0 \n = \nfraccos^4 LambdaK_c \nfrac112\nleft left(\n c_m_o (3 + 2 lambda_s + lambda_s^2)\n + c_m_s (3 lambda_s^2 + 2 lambda_s + 1 )\n right)(eta_s-eta_o) right\nnonumber \n hspace1em\nleft\n+ left(\n c_m_s (3 lambda_s^2 + 2 lambda_s lambda_t + lambda_t^2)\n + c_m_t (3 lambda_t^2 + 2 lambda_s lambda_t + lambda_s^2)\n right)(1-eta_s) \nright\nhspace3em\nlabelCM0wing\nhspace2em\nendaligned(Image: Wing pitching moment quantities.)","category":"page"},{"location":"examples/loadingrunning/#firstexample","page":"Loading and running","title":"Loading and running a model","text":"","category":"section"},{"location":"examples/loadingrunning/","page":"Loading and running","title":"Loading and running","text":"TASOPT.jl uses TOML files to define aircraft models. You can find an example input file at /src/IO/default_input.toml. The majority of aircraft parameters and assumptions are defined here, and it's a useful resource for understanding the parameters and typical values.","category":"page"},{"location":"examples/loadingrunning/","page":"Loading and running","title":"Loading and running","text":"Start by importing TASOPT.jl and then loading the default aircraft model.","category":"page"},{"location":"examples/loadingrunning/","page":"Loading and running","title":"Loading and running","text":"julia> using TASOPT\njulia> example_ac = load_default_model()\nLoading default aircraft model\nName: Default TASOPT Model;\nWpay = 172.0 kN\nDes. Range = 5.56e6 km\nCruise Mach = 0.8","category":"page"},{"location":"examples/loadingrunning/","page":"Loading and running","title":"Loading and running","text":"Alternatively you can load your desired input file by using","category":"page"},{"location":"examples/loadingrunning/","page":"Loading and running","title":"Loading and running","text":"julia> example_ac = read_aircraft_model(\"../src/IO/input.toml\") # MODIFY appropriately","category":"page"},{"location":"examples/loadingrunning/","page":"Loading and running","title":"Loading and running","text":"example_ac is an instance of an aircraft type, that is a thin wrapper for a couple of arrays that store, for example, the geometric parg, aerodynamic (para), engine (pare).","category":"page"},{"location":"examples/loadingrunning/","page":"Loading and running","title":"Loading and running","text":"You can size this aircraft by running","category":"page"},{"location":"examples/loadingrunning/","page":"Loading and running","title":"Loading and running","text":"julia> size_aircraft!(example_ac)\nMax payload weight was not set, setting Wpaymax = Wpay\nWfuel initial = 132502.37055588452\niterw errW errW1 WMTO Wfuel Wftank Wtesys Wmot Wgen Wtshaft Wwing span area HTarea xwbox \n 1 +1.00000000e+00 +1.00000000e+00 6.51600802e+05 1.32502371e+05 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 8.60730957e+04 0.00000000e+00 0.00000000e+00 1.35396163e+01 1.73736000e+01\n 2 +1.00000000e+00 +1.66001430e-02 7.70269325e+05 2.16922911e+05 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 1.10711244e+05 3.25978109e+01 1.05209631e+02 3.71505481e+01 1.73736000e+01\n ...\n 15 +7.45835713e-09 -7.45835713e-09 7.76336715e+05 2.12378504e+05 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 1.04209402e+05 3.54371733e+01 1.24335966e+02 4.20539315e+01 1.62730055e+01\n\nTakeoff:\n # lTO l1 lBF dmax\n 1 6474.360 5179.488 8416.667 355.380\n 2 6474.360 5534.868 8485.441 3.718\n 3 6474.360 5538.586 8485.689 0.000","category":"page"},{"location":"aero/moment/#Pitching-moment","page":"Pitching moment","title":"Pitching moment","text":"","category":"section"},{"location":"aero/moment/","page":"Pitching moment","title":"Pitching moment","text":"The pitching moments of lifting surfaces are computed by integration of the wing loading with reference to a prescribable wing axis.","category":"page"},{"location":"aero/moment/","page":"Pitching moment","title":"Pitching moment","text":"using Markdown\nMarkdown.parse_file(joinpath(\"../..\", \"src/aero\",\"theory_pitching.md\"))","category":"page"},{"location":"aero/moment/","page":"Pitching moment","title":"Pitching moment","text":"aerodynamics.surfcm(b,bs,bo, sweep, Xaxis,\n λt,λs,γt,γs,\n AR,fLo,fLt,cmpo,cmps,cmpt)","category":"page"},{"location":"aero/moment/#TASOPT.aerodynamics.surfcm-NTuple{15, Any}","page":"Pitching moment","title":"TASOPT.aerodynamics.surfcm","text":"surfcm(b, bs, bo, sweep, Xaxis, \n\tλt, λs, γt, γs, \n\tAR, fLo, fLt, cmpo, cmps, cmpt)\n\nCalculates components of wing pitching moment (C_M) about wing root axis:\n\nC_M = C_M0 + C_M1 (C_L - C_Lsurf)\n\nΔC_m surf = ΔC_m 0 + dCₘdCL (C_L - C_Lh)\n\ndetails: 🔃 Inputs and Outputs\nInputs:b::Float64: Span.\nbs::Float64: Outer panel break span.\nbo::Float64: Root (fuselage) span.\nsweep::Float64: Sweep, degrees. -\tXaxis::Float64: Surface axis position.\nλt::Float64: Outer-panel chord taper ratio ct/co.\nλs::Float64: Inner-panel chord taper ratio cs/co.\nγt::Float64: Outer-panel load taper ratio pt/po.\nγs::Float64: Inner-panel load taper ratio ps/po.\nAR::Float64: Surface aspect ratio.\nfLo::Float64, fLt::Float64 : Wing root and tip load adjustment factors.\ncmpo::Float64,cmps::Float64,cmpt::Float64: Perpendicular sectional lift coefficient at wing root, break (\"snag\"), and tip.Outputs:CM0::Float64: Zero-lift surface pitching moment.\nCM1::Float64: Surface pitching moment including lift contribution.\n\nSee Section 2.6.3 of the TASOPT Technical Desc. See also surfcd and surfcd2.\n\n\n\n\n\n","category":"method"},{"location":"aero/geometry/#geometry","page":"Geometry","title":"Geometry","text":"","category":"section"},{"location":"aero/geometry/#Wing-or-Tail-Planform","page":"Geometry","title":"Wing or Tail Planform","text":"","category":"section"},{"location":"aero/geometry/","page":"Geometry","title":"Geometry","text":"The wing geometry is comprised of a wingbox with fuselage carry-over, an inner section with prescribed taper ratio up to a wing break or \"snag\", and an outer section with a separately prescribed taper ratio. The geometry is defined relative to a central axis defined by the overall sweep angle, Lambda.","category":"page"},{"location":"aero/geometry/","page":"Geometry","title":"Geometry","text":"The surface geometry relations derived below correspond to the wing. Most of these apply equally to the tails if the wing parameters are simply replaced with the tail counterparts.","category":"page"},{"location":"aero/geometry/","page":"Geometry","title":"Geometry","text":"(Image: Piecewise-linear wing or tail surface planform, with break at $\\eta_s$ .)","category":"page"},{"location":"aero/geometry/","page":"Geometry","title":"Geometry","text":"using Markdown\nMarkdown.parse_file(joinpath(\"../..\", \"src/aero\",\"theory_geometry.md\"))","category":"page"},{"location":"aero/geometry/","page":"Geometry","title":"Geometry","text":"aerodynamics.wingsc(W,CL,qinf,AR,ηsi,bo,λt,λs)","category":"page"},{"location":"aero/geometry/#TASOPT.aerodynamics.wingsc-NTuple{8, Any}","page":"Geometry","title":"TASOPT.aerodynamics.wingsc","text":"wingsc(W, CL, qinf, AR, ηsi, bo, λt, λs)\n\nSizes wing area, span, root chord from q, CL, W, AR at given point (taken as start-of-cruise in wsize).\n\ndetails: 🔃 Inputs and Outputs\nInputs:W::Float64: Aircraft weight.\nCL::Float64: Lift coefficient.\nqinf::Float64: Freestream dynamic head.\nAR::Float64: Wing aspect ratio.\nηsi::Float64: Span fraction of inner wing break (\"snag\").\nbo::Float64: Wing center box width.\nλt::Float64: Outer or \"tip\" taper ratio of chord.\nλs::Float64: Inner or break/\"snag\" taper ratio of chord.Outputs:S::Float64: Wing planform area (including fuselage carryover).\nb::Float64: Wing span.\nbs::Float64: Span of inner wing (break/\"snag\").\nco::Float64: Chord at wing root, \"center.\"\n\nSee Sections 2.5 and 3.4.1 of the TASOPT Technical Desc.\n\n\n\n\n\n","category":"method"},{"location":"aero/drag/#Drag","page":"Drag","title":"Drag","text":"","category":"section"},{"location":"aero/drag/","page":"Drag","title":"Drag","text":"The key drag contributions are assumed to come from the fuselage, wing and tail surfaces, and the lift-induced drag calculated at the Trefftz plane. Wave drag is not explicitly modelled.","category":"page"},{"location":"aero/drag/#axi","page":"Drag","title":"Axisymmetric fuselage drag","text":"","category":"section"},{"location":"aero/drag/","page":"Drag","title":"Drag","text":"The fuselage profile drag is determined by a quasi-axisymmetric coupled viscous-inviscid calculation. See Simplified Viscous/Inviscid Analysis for Nearly-Axisymmetric Bodies by M. Drela.","category":"page"},{"location":"aero/drag/","page":"Drag","title":"Drag","text":"This method does not require any wetted area approximations or fineness-ratio correlations, but does require the geometry to be specified in the form of a cross-sectional area distribution Ascriptstyle (x) and a perimeter distribution b_0scriptstyle (x), shown in the Figure below. For a round cross-section these are, of course, related. To allow treating more general fuselage cross-sections, they are assumed to be specified separately. The cross section sizes and shapes can vary along the body, provided the variation is reasonably smooth.","category":"page"},{"location":"aero/drag/","page":"Drag","title":"Drag","text":"(Image: ADfuse)","category":"page"},{"location":"aero/drag/","page":"Drag","title":"Drag","text":"using Markdown\nMarkdown.parse_file(joinpath(\"../..\", \"src/aero\",\"theory_fuse_profile_drag.md\"))","category":"page"},{"location":"aero/drag/","page":"Drag","title":"Drag","text":"aerodynamics.axisol!(xnose,xend,xblend1,xblend2, Amax, \n\tanose, btail, iclose,\n\tMach, nc, nldim,\n xl, zl, sl, dyl, ql)\n\naerodynamics.blsys(simi,lami,wake,direct, Mach, uinv,\n hksep, x,b,rn,th,ds,ue,\n h , h_th, h_ds,\n hk, hk_th, hk_ds, hk_ue,\n hc, hc_th, hc_ds, hc_ue,\n hs, hs_th, hs_ds, hs_ue,\n cf, cf_th, cf_ds, cf_ue,\n di, di_th, di_ds, di_ue,\n xm,bm,rnm,thm,dsm,uem, \n hm , hm_thm, hm_dsm,\n hkm, hkm_thm, hkm_dsm, hkm_uem,\n hcm, hcm_thm, hcm_dsm, hcm_uem,\n hsm, hsm_thm, hsm_dsm, hsm_uem,\n cfm, cfm_thm, cfm_dsm, cfm_uem,\n dim, dim_thm, dim_dsm, dim_uem)\n\naerodynamics.blax(ndim, n,ite, xi, bi, rni, uinv, Reyn, Mach, fexcr)\n\naerodynamics.blvar(simi,lami,wake, Reyn,Mach, fexcr,\n x, θ ,δs ,ue )\n\naerodynamics.fusebl!(pari, parg, para, ip)","category":"page"},{"location":"aero/drag/#TASOPT.aerodynamics.axisol!-NTuple{16, Any}","page":"Drag","title":"TASOPT.aerodynamics.axisol!","text":"axisol!(xnose, xend, xblend1, xblend2, Amax, \n anose, btail, iclose,\n Mach, nc, nldim,\n xl, zl, sl, dyl, ql)\n\nCalculates compressible potential flow about a quasi-axisymmetric body, using a simple piecewise-constant source line.\n\ndetails: 🔃 Inputs and Outputs\nInputs:xnose::Float64: X (axial) location of nose point. \nxend::Float64: X location of tail point.\nxblend1::Float64: X location of nose-section blend point.\nxblend2::Float64: X location of tail-section blend point.\nAmax::Float64: Maximum cross-sectional area.\nanose::Float64: Nose-section shape exponent.\nbtail::Float64: Tail-section shape exponent.\niclose::Integer: If 0, tail tapers to a point, otherwise to an edge.\nMach::Float64: Freestream Mach number for Prandtl-Glauert.\nnc::Integer: Number of control points to be used.\nnldim::Integer: Max dimension of passed arrays.Outputs:nl::Integer: Number of output surface and wake points.\nilte::Integer: Index of TE point.\nxl::Array{Float64}: X (axial) locations of surface segment endpoints.\nzl::Array{Float64}: Z (vertical) locations of surface segment endpoints.\nsl::Array{Float64}: Arc lengths along surface and wake.\ndyl::Array{Float64}: Half-width of edge-type tail section.\nql::Array{Float64}: Velocities V/V_inf along surface and wake.\n\nSee theory above or Section 3 of Simplified Viscous/Inviscid Analysis for Nearly-Axisymmetric Bodies. See also fusebl!.\n\n\n\n\n\n","category":"method"},{"location":"aero/drag/#TASOPT.aerodynamics.blsys-NTuple{65, Any}","page":"Drag","title":"TASOPT.aerodynamics.blsys","text":"blsys(simi, lami, wake, direct, Mach, uinv, hksep,\n x, b, rn, th, ds, ue,\n h , h_th, h_ds,\n hk, hk_th, hk_ds, hk_ue,\n hc, hc_th, hc_ds, hc_ue,\n hs, hs_th, hs_ds, hs_ue,\n cf, cf_th, cf_ds, cf_ue,\n di, di_th, di_ds, di_ue,\n xm,bm,rnm,thm,dsm,uem, \n hm , hm_thm, hm_dsm,\n hkm, hkm_thm, hkm_dsm, hkm_uem,\n hcm, hcm_thm, hcm_dsm, hcm_uem,\n hsm, hsm_thm, hsm_dsm, hsm_uem,\n cfm, cfm_thm, cfm_dsm, cfm_uem,\n dim, dim_thm, dim_dsm, dim_uem)\n\nComputes Jacobian matrices for BL solution at an axial station. Called repeatedly by blax.\n\ndetails: 🔃 Inputs and Outputs\nInputs:simi::Integer: Self-similar BL profile flag.\nlami::Integer: Laminar flow flag.\nwake::Integer: In wake? Flag.\ndirect::Integer: Direct solution flag.\nMach::Float64: Mach number for compressibility.\nuinv::Float64: Inviscid velocity.\nx::Float64: Arc length.\nb::Float64: Lateral width of BL.\nrn::Float64: drdn, = 0 for 2D.\nth::Float64: Momentum thickness.\nds::Float64: Displacement thickness.\nue::Float64: Edge velocity.\nh::Float64: Shape parameter.\nhk::Float64: Kinematic shape parameter.\nhc::Float64: density shape parameter (Whitfield).\nhs::Float64: kinetic energy shape parameter.\ncf::Float64: Skin friction factor.\ndi::Float64: Dissipation factor.m denotes the previous point (minus one) in the upstream. _z denotes partial derivative with respect to z (z = th, ds, ue).Outputs:aa::Array{Float64, 3, 3}: Jacobian matrix (wrt current point vars).\nbb::Array{Float64, 3, 3}: Jacobian matrix (wrt previous point vars).\nrr::Array{Float64, 3}: Residual.\n\nSee Section 4 of Simplified Viscous/Inviscid Analysis for Nearly-Axisymmetric Bodies.\n\n\n\n\n\n","category":"method"},{"location":"aero/drag/#TASOPT.aerodynamics.blax-NTuple{10, Any}","page":"Drag","title":"TASOPT.aerodynamics.blax","text":"blax(ndim, n,ite, xi, bi, rni, uinv, Reyn, Mach, fexcr)\n\nAxisymmetric boundary layer + wake calculation routine. Uses specified inviscid velocity, corrects for viscous displacement to allow calculation of separated flow.\n\ndetails: 🔃 Inputs and Outputs\nInputs:ndim::Integer: physical array dimension.\nn::Integer: number of boundary layer + wake points.\nite::Integer: index of trailing edge point, start of wake.\nxi::Array{Float64}: arc length array (BL coordinate).\nbi::Array{Float64}: lateral width of BL at surface (i.e., body perimeter). b_i = 0 for wake, 1 for 2D.\nrni::Array{Float64}: drdn to account for near-axisymmetric bodies, 0 for 2D.\nuinv::Array{Float64}: inviscid velocity, u_inv.\nReyn::Float64: Reynolds number, rho_ref u_ref l_ref mu_ref.\nMach::Float64: Mach number, M = u_ref a_ref.\nfexcr::Float64: excrescence multiplier applied to wall c_f, 1 for smooth wall.Assumed units for all quantities:l_ref: same unit as used for input xi,bi.\nu_ref: freestream velocity.\na_ref: freestream speed of sound.\nrho_ref: freestream density.\nmu_ref: freestream viscosity.Outputs:uei::Array{Float64}: edge velocity, (u_ei = u_invi + {displacement correction}).\ndsi::Array{Float64}: displacement thickness (delta^*).\nthi::Array{Float64}: momentum thickness (theta).\ntsi::Array{Float64}: kinetic energy thickness (theta^*).\ndci::Array{Float64}: density flux thickness (delta^**).\ncfi::Array{Float64}: skin friction coefficient, normalized with local rho, u (c_fi).\ncdi::Array{Float64}: dissipation coefficient , normalized with local rho,u (c_mathcalDi).\ncti::Array{Float64}: max shear-stress coefficient, normalized with local rho,u (c_ti).\nhki::Array{Float64}: kinematic shape parameter (H_Ki).\nphi::Array{Float64}: integrated dissipation (Phi).Other outputs of interest can be computed as follows. These are in units of l_ref, rho_ref, u_refbeffi: Effective perimeter, b_effi = b_i + 2 pi delta^* drdn.\nrhi: Edge density, rho_i = (1 + frac(gamma-1)2M^2 (10-u_ei^2))^frac1(gamma-1).\nmdef: Total mass defect, rho_i u_ei delta^* b_eff.\nPdef: Total momentum defect, rho_i u_ei^2 theta b_eff.\nEdef: Total kinetic energy defect, frac12 rho_i u_ei^3 theta^* b_eff.\ntauwb: Wall shear force/span, fractau_wb = frac12 u_ei^2 c_fi b_eff.\nDiss: Dissipation integral, rho_i u_ei^3 c_mathcalDi b_effi.Body profile drag D_p is the far-downstream momentum defect P_infty, best obtained by applying Squire-Young to the last wake point, i = n :P_end = rho_i u_ei^2 theta b_eff\nH_end = delta^*theta\nH_infty = 1 + (gamma-1) M^2\nH_avg = frac12 (H_end + H_inf)\nP_inf = P_end u_ei^H_avg = D_p\n\nSee Section 4 of Simplified Viscous/Inviscid Analysis for Nearly-Axisymmetric Bodies. See also blsys and blvar. Deprecates blax.\n\n\n\n\n\n","category":"method"},{"location":"aero/drag/#TASOPT.aerodynamics.blvar-NTuple{10, Any}","page":"Drag","title":"TASOPT.aerodynamics.blvar","text":"blvar(simi, lami, wake, Reyn, Mach, fexcr, x, θ, δs, ue)\n\nReturns the boundary layer variables needed for solution.\n\ndetails: 🔃 Inputs and Outputs\nInputs:simi::Integer: Self-similar BL profile flag.\nlami::Integer: Laminar flow flag.\nwake::Integer: In wake flag.\nReyn::Float64: Reynolds number.\nMach::Float64: Mach number for compressibility.\nfexcr::Float64: Excrescence factor.Outputs:h::Float64 : Shape parameter.\nhk::Float64: Kinematic shape parameter.\nhc::Float64: Density shape parameter (Whitfield).\nhs::Float64: Kinetic energy shape parameter.\ncf::Float64: Skin friction factor.\ncd::Float64: Dissipation factor and their derivatives.\n\n\n\n\n\n","category":"method"},{"location":"aero/drag/#TASOPT.aerodynamics.fusebl!-NTuple{4, Any}","page":"Drag","title":"TASOPT.aerodynamics.fusebl!","text":"fusebl!(pari, parg, para, ip)\n\nCalculates surface velocities, boundary layer, wake for a quasi-axisymmetric body in compressible flow.\n\nA compressible source line represents the potential flow. An integral BL formulation with lateral divergence represents the surface BL and wake. An added-source distribution represents the viscous displacement influence on the potential flow. The body shape is defined by its area and perimeter distributions A(x), b0(x), which are defined by the various geometric parameters in parg.\n\ndetails: 🔃 Inputs and Outputs\nInputs:pari::AbstractVector{Int64}: Vector of aircraft model integer/flag parameters.\nparg::AbstractArray{Float64}: Vector of aircraft model geometry parameters.\npara::AbstractArray{Float64}: Vector of aircraft model aerodynamic parameters.\nip::Integer: Index of flight point in par arrays.Outputs:No explicit outputs. Computed drag values are saved to para of aircraft model.\n\nSee Simplified Viscous/Inviscid Analysis for Nearly-Axisymmetric Bodies. See also blax and axisol!.\n\ncompat: Future Changes\nIn an upcoming revision, an aircraft struct and auxiliary indices will be passed in lieu of pre-sliced par arrays.\n\n\n\n\n\n","category":"method"},{"location":"aero/drag/","page":"Drag","title":"Drag","text":"","category":"page"},{"location":"aero/drag/#trefftz","page":"Drag","title":"Trefftz plane drag calculation","text":"","category":"section"},{"location":"aero/drag/","page":"Drag","title":"Drag","text":"Trefftz plane analysis computes the induced drag from lifting surfaces. The lift distributions are propagated downstream, accounting for streamline contraction from fuselage thickness variation as shown in the Figure below. ","category":"page"},{"location":"aero/drag/","page":"Drag","title":"Drag","text":"(Image: ) Two shaded streamtubes are shown. Wake center radius y_o is nonzero due to the fuselage viscous wake displacement area.","category":"page"},{"location":"aero/drag/","page":"Drag","title":"Drag","text":"The vorticity in the wake is numerially integrated at collocation points to determine the overall induced drag.","category":"page"},{"location":"aero/drag/","page":"Drag","title":"Drag","text":"(Image: T)","category":"page"},{"location":"aero/drag/","page":"Drag","title":"Drag","text":"Trefftz Plane vortices ii+1 ldots and collocation points i+12 used for velocity, impulse, and kinetic energy calculations. Left/right symmetry is exploited. ","category":"page"},{"location":"aero/drag/","page":"Drag","title":"Drag","text":"using Markdown\nMarkdown.parse_file(joinpath(\"../..\", \"src/aero\",\"theory_trefftz_plane.md\"))","category":"page"},{"location":"aero/drag/","page":"Drag","title":"Drag","text":"aerodynamics.cditrp(pari,parg,para)\n\naerodynamics.trefftz1(nsurf, npout, npinn, npimg,\n\tSref, bref,\n\tb,bs,bo,bop, zcent,\n\tpo,gammat,gammas, fLo,ktip,\n\tLspec,CLsurfsp,t, y, yp, z, zp, gw, yc, ycp, zc, zcp, gc, vc, wc, vnc)","category":"page"},{"location":"aero/drag/#TASOPT.aerodynamics.cditrp-Tuple{Any, Any, Any}","page":"Drag","title":"TASOPT.aerodynamics.cditrp","text":" cditrp(pari,parg,para)\n\nComputes the induced drag via the Trefftz plane. Calls trefftz1.\n\ndetails: 🔃 Inputs and Outputs\nInputs:pari::AbstractVector{Int64}: Vector of aircraft model integer/flag parameters.\nparg::AbstractArray{Float64}: Vector of aircraft model geometry parameters.\npara::AbstractArray{Float64}: Vector of aircraft model aerodynamic parameters.Outputs:No explicit outputs. Computed induced drag value and span efficiency are saved to para of aircraft model.\n\ncompat: Future Changes\nIn an upcoming revision, an aircraft struct and auxiliary indices will be passed in lieu of pre-sliced par arrays.\n\n\n\n\n\n","category":"method"},{"location":"aero/drag/#TASOPT.aerodynamics.trefftz1-NTuple{32, Any}","page":"Drag","title":"TASOPT.aerodynamics.trefftz1","text":"trefftz1(nsurf, npout, npinn, npimg, \n Sref, bref, b, bs, bo, bop, \n zcent, po, gammat, gammas, \n fLo,ktip, Lspec, CLsurfsp)\n\nTrefftz plane routine for the induced drag computation of nsurf number of surfaces.\n\ndetails: 🔃 Inputs and Outputs\nInputs:nsurf::Integer: Number of surfaces (typically wing and horizontal tail).\nnpout::Integer: Number of spanwise intervals (outer panel).\nnpinn::Integer: \" \" (inner panel).\nnpimg::Integer: \" \" (image inside fuselage).\nb::Float64: Span.\nbs::Float64: Wing-break span.\nbo::Float64: Wing-root span.\nbop::Float64: Span of wing-root streamline in Trefftz plane\nzcent::Vector{Float64}: Vertical position at centerline for each surface.\ngammat::Vector{Float64}, gammas::Vector{Float64}`: Wing lift distribution \"taper\" ratios for outer and inner wing sections, respectively.\nfLo: wing root load adjustment factors (currently not implemented).\nktip::Float64: wing tip load adjustment factors.\nLspec::Integer: Flag for specified lift calculation (scales vorticities to achieve CLsurfsp before computing induced drag).\nCLsurfsp::Vector{Float64}: Prescribed surface lift coefficient.Outputs: -CLsurf::Vector{Float64}: Lift coefficients for each surface. -CL::Float64: Sum of lift coefficients of all surfaces. -CD::Float64: Sum of induced drag coefficients of all surfaces. -spanef::Float64: Span efficiency of combined surfaces (= (CL^2 (π*AR))CD).\n\nSee theory above or Sections 2.14.7 and 3.8.1 of the TASOPT Technical Desc.\n\n\n\n\n\n","category":"method"},{"location":"aero/drag/","page":"Drag","title":"Drag","text":"","category":"page"},{"location":"aero/drag/#Wing-and-tail-surfaces","page":"Drag","title":"Wing and tail surfaces","text":"","category":"section"},{"location":"aero/drag/","page":"Drag","title":"Drag","text":"Lifting surface drag is determined via surfcd (when constant airfoil section cdf and cdp are already determined), and surfcd2 (when an explicit modelling and integration is desired). Airfoil performance is accessed via a lookup of precomputed airfoil data, airfun.","category":"page"},{"location":"aero/drag/","page":"Drag","title":"Drag","text":"aerodynamics.surfcd2(\n S,\n b, bs, bo,\n λt, λs, γt, γs,\n toco, tocs, toct,\n Mach, sweep, co,\n CL, CLhtail, fLo, fLt,\n Reco, aRexp, kSuns, fexcd,\n fduo, fdus, fdut)\n\naerodynamics.surfcd(S,\n b, bs, bo, λt, λs, sweep, co,\n cdf, cdp, Reco, Reref, aRexp, kSuns,\n fCDcen)\n\naerodynamics.airtable(fname)\n\naerodynamics.airfun(cl, τ, Mach, air::aerodynamics.airfoil)\n","category":"page"},{"location":"aero/drag/#TASOPT.aerodynamics.surfcd2-NTuple{25, Any}","page":"Drag","title":"TASOPT.aerodynamics.surfcd2","text":"surfcd2(S,\n b, bs, bo,\n λt, λs, γt, γs,\n toco, tocs, toct,\n Mach, sweep, co,\n CL, CLhtail, fLo, fLt,\n Reco, aRexp, kSuns, fexcd,\n AMa, Acl, Atau, ARe, A,\n fduo, fdus, fdut)\n\nCalculates wing or tail surface profile CD by calculating the performance of wing segments explicitly via airfoil data (found in [./src/air/C.air] and accessed by [airfun], [airtable]). Called by cdsum! if icdfun flag set to 1.\n\ndetails: 🔃 Inputs and Outputs\nInputs:S::Float64: Reference area.\nb::Float64: Span.\nbs::Float64: Outer panel break span.\nbo::Float64: Wing-root (fuselage) span.\nλt::Float64: Outer-panel chord taper ratio ct/co.\nλs::Float64: Inner-panel chord taper ratio cs/co.\nγt::Float64: Outer-panel load taper ratio pt/po.\nγs::Float64: Inner-panel load taper ratio ps/po.\ntoco::Float64: Root airfoil t/c.\ntocs::Float64: Break airfoil t/c.\ntoct::Float64: Tip airfoil t/c.\nsweep::Float64: Wing sweep, degrees.\nco::Float64: Wing root chord.\nReco::Float64: Reynolds number for co.\naRexp::Float64: Re-scaling exponent.\nkSuns::Float64: Shock-unsweep area constant.\nfexcd::Float64: Excrescence cd scaling factor.\nfduo::Float64, fdus::Float64, fdut::Float64: Velocity-change fractions at wing root, break (\"snag\"), and tip due to fuselage flow.Outputs:clpo::Float64,clps::Float64,clpt::Float64: Perpendicular sectional lift coefficient at wing root, break (\"snag\"), and tip.\nCDfwing::Float64: Friction profile cd in perp. plane.\nCDpwing::Float64: Pressure profile cd in perp. plane.\nCDwing::Float64: Overall profile CD.\nCDover::Float64: Fuselage added CD due to lift carryover.\n\nSee Sections 2.14.3 and 3.8.3 of TASOPT Technical Desc. See also cdsum!, surfcd, [surfcm], and [airfun].\n\ncompat: Future Changes\nThis function will be renamed for clarity of use.\n\n\n\n\n\n","category":"method"},{"location":"aero/drag/#TASOPT.aerodynamics.surfcd-NTuple{15, Any}","page":"Drag","title":"TASOPT.aerodynamics.surfcd","text":"surfcd(S, \nb, bs, bo, \nλt, λs, sweep, \nco, cdf, cdp, \nReco, Reref, \naRexp, kSuns, fCDcen)\n\nComputes wing or tail surface profile CD from pre-computed chord quantities and corrections. Called by cdsum! if icdfun flag set to 0.\n\ncompat: Future Changes\nThis function may be renamed for clarity of use.\n\ndetails: 🔃 Inputs and Outputs\nInputs:S::Float64: reference area.\nb::Float64: span.\nbs::Float64: outer panel break span.\nbo::Float64: wing-root (fuselage) span.\nλt::Float64: outer-panel taper ratio ctco.\nλs::Float64: inner-panel taper ratio csco.\nsweep::Float64: wing sweep, degrees.\nco::Float64: wing root chord.\ncdf::Float64: friction profile cd.\ncdp::Float64: pressure profile cd.\nReco::Float64: Reynolds number for co.\nReref::Float64: reference Reynolds number for cd scaling.\naRexp::Float64: Re-scaling exponent.\nkSuns::Float64: shock-unsweep area constant.\nfCDcen::Float64 : related to fraction of wing BLI (see Eqns. 619 - 621).Outputs:CDsurf: overall profile CD.\nCDover: fuselage added CD due to lift carryover.\n\nSee Sections 2.14.3 and 3.8.3 of the TASOPT Technical Desc.\n\n\n\n\n\n","category":"method"},{"location":"aero/drag/#TASOPT.aerodynamics.airtable-Tuple{Any}","page":"Drag","title":"TASOPT.aerodynamics.airtable","text":"airtable(fname)\n\nReads airfoil file and outputs the matrix and splines as an airfoil.\n\nThe airfoil data is stored as a function of three variables, typically Mach number mathrmMa, lift coefficient c_l, and thickness to chord ratio tau.\n\ncdf(Ma, cl, τ), cdp(Ma, cl, τ), cm(Ma, cl, τ)\n\ndetails: 🔃 Inputs and Outputs\nInputs:fname::String: Path to file.Outputs:airf::TASOPT.aerodynamics.airfoil: struct with airfoil performance characteristics.\n\n\n\n\n\n","category":"method"},{"location":"aero/drag/#TASOPT.aerodynamics.airfun-Tuple{Any, Any, Any, TASOPT.aerodynamics.airfoil}","page":"Drag","title":"TASOPT.aerodynamics.airfun","text":"airfun(cl, τ, Mach, air::airfoil)\n\nLooks up airfoil performance data at specified conditions, as precomputed and found in ./src/airfoil_data/.\n\ndetails: 🔃 Inputs and Outputs\nInputs: cl::Float64: Airfoil section lift coefficient.\nτ::Float64: Airfoil section thickness-to-chord ratio.\nMach::Float64: Mach number.\nair::TASOPT.aerodynamics.airfoil: airfoil structure with performance data.Outputs:cdf::Float64: Airfoil section skin friction drag.\ncdp::Float64: Airfoil section pressure drag.\ncdw::Float64: Airfoil section wave drag (unused and assumed 0 here; placeholder left for future implementation).\ncm::Float64: Airfoil section pitching moment.\n\n\n\n\n\n","category":"method"},{"location":"aero/drag/","page":"Drag","title":"Drag","text":"","category":"page"},{"location":"aero/drag/#Total-drag-calculation","page":"Drag","title":"Total drag calculation","text":"","category":"section"},{"location":"aero/drag/","page":"Drag","title":"Drag","text":"aerodynamics.cdsum!(pari, parg, para, pare, icdfun)","category":"page"},{"location":"aero/drag/#TASOPT.aerodynamics.cdsum!-NTuple{5, Any}","page":"Drag","title":"TASOPT.aerodynamics.cdsum!","text":"cdsum!(pari,parg,para,pare,icdfun)\n\nCalculates aircraft CD components for operating point, ipoint. If icdfun=1, computes wing cdf,cdp from airfoil database # iairf, otherwise uses default values in para array. Called by mission!, wsize, takeoff!, and odperf!.\n\nThe total drag is computed by\n\nC_D = C_D i + C_Dfuse + C_Dwing + C_Dover + C_Dhtail + C_Dvtail + C_Dstrut + C_Dnace + Delta C_DBLIf + Delta C_DBLIw\n\nwhere:\n\nC_Di (CDi) is the total induced drag including the wing and tail,\nC_Dfuse (CDfuse) is the fuselage profile drage computed by solving a boundary layer integral equation,\nC_Dwing (CDwing) is the wing profile drag (viscous + pressure) computed using airfoil data obtained from CFD,\nC_Dover (CDover) is the fuselage added CD due to lift carryover,\nC_Dhtail (CDhtail) is the horizontal tail profile drag computed in a similar manner with CDwing,\nC_Dvtail (CDvtail) is the vertical tail profile drag computed in a similar manner with CDwing,\nC_Dstrut (CDstrut) is the struct profile drag, \nC_Dnace (CDnace) is the nacelle profile drag,\nDelta C_DBLIf (dCDBLIf) is related to the boundary layer ingestion on the fuselage,\nand Delta C_DBLIw (dCDBLIw) is related to the boundary layer ingestion on the wing.\n\ndetails: 🔃 Inputs and Outputs\nInputs:pari::AbstractVector{Int64}: Vector of aircraft model integer/flag parameters.\nparg::AbstractArray{Float64}: Vector of aircraft model geometry parameters.\npara::AbstractArray{Float64}: Vector of aircraft model aerodynamic parameters.\npare::AbstractArray{Float64}: Vector of aircraft model engine parameters.\nicdfun::Integer: Flag if drag should be computed (=1) or if para values should be used (=0).Outputs:No explicit outputs. Computed drag values are saved to para of aircraft model.\n\nSee Section 2.14 of the TASOPT Technical Desc. See also trefftz1, fusebl!, surfcd2, surfcd, cfturb, and cditrp.\n\ncompat: Future Changes\nIn an upcoming revision, an aircraft struct and auxiliary indices will be passed in lieu of pre-sliced par arrays.\n\n\n\n\n\n","category":"method"},{"location":"aero/drag/","page":"Drag","title":"Drag","text":"","category":"page"},{"location":"aero/drag/#Other-utilities","page":"Drag","title":"Other utilities","text":"","category":"section"},{"location":"aero/drag/","page":"Drag","title":"Drag","text":"aerodynamics.cfturb","category":"page"},{"location":"aero/drag/#TASOPT.aerodynamics.cfturb","page":"Drag","title":"TASOPT.aerodynamics.cfturb","text":" cfturb(Re)\n\nReturns the total C_f for turbulent flat plate (one side) as a function of mathrmRe_l\n\nC_f turb = frac0523(log(006mathrmRe))^2 \n\n\n\n\n\n","category":"function"},{"location":"aero/drag/","page":"Drag","title":"Drag","text":"include(\"../../../src/aero/cdsum.jl\")\n","category":"page"},{"location":"aero/drag/","page":"Drag","title":"Drag","text":"For example, the turbulent flat plate C_f for a Re of 10e6 can be calculated as follows:","category":"page"},{"location":"aero/drag/","page":"Drag","title":"Drag","text":"Re = 10e6\ncfturb(Re)","category":"page"},{"location":"misc/dreladocs/#dreladocs","page":"Original Drela docs","title":"Original Drela docs","text":"","category":"section"},{"location":"misc/dreladocs/","page":"Original Drela docs","title":"Original Drela docs","text":"Obtained from Mark Drela's TASOPT site where all documents and Fortran code can be found.","category":"page"},{"location":"misc/dreladocs/","page":"Original Drela docs","title":"Original Drela docs","text":"#Copy files from source to build\ncp(\"../../drela_TASOPT_2p16/\", \"../assets/drela_TASOPT_2p16\");\nnothing #needs to either return nothing or a .md","category":"page"},{"location":"misc/dreladocs/","page":"Original Drela docs","title":"Original Drela docs","text":"TASOPT Technical Description\nSimplified Viscous/Inviscid Analysis for Nearly-Axisymmetric Bodies\nFilm Cooling Flow Loss Model\nTurbofan Sizing and Analysis with Variable cp(T)\nThermally-Perfect Gas Calculations\nBalanced Field Length Calculation\nTurbofan Weight Model from Historical Data","category":"page"},{"location":"misc/dreladocs/","page":"Original Drela docs","title":"Original Drela docs","text":"","category":"page"},{"location":"misc/dreladocs/#flowchart","page":"Original Drela docs","title":"TASOPT Flowchart","text":"","category":"section"},{"location":"misc/dreladocs/","page":"Original Drela docs","title":"Original Drela docs","text":"For an attempt to make graphical sense of the workflow, see here.","category":"page"},{"location":"misc/fordevs/#fordevs","page":"Notes for devs","title":"Notes for devs","text":"","category":"section"},{"location":"misc/fordevs/","page":"Notes for devs","title":"Notes for devs","text":"info: Info\nTASOPT.jl is very much a WIP. Get at us on github, but search the issues first. Thanks! 🙂","category":"page"},{"location":"misc/fordevs/","page":"Notes for devs","title":"Notes for devs","text":"tip: Tips\nRefer to the data structures to see where input file parameters end up.\nLook out for !!! compat admonishments marking where things will likely change in the future.\nReferences to NPSS are currently non-functional. We're working on replacing this functionality efficiently.","category":"page"},{"location":"#TASOPT.jl-Documentation","page":"Home","title":"TASOPT.jl Documentation","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"TASOPT.jl is a multi-disciplinary aircraft design and optimization code implemented in Julia based on TASOPT by Mark Drela.","category":"page"},{"location":"","page":"Home","title":"Home","text":"It can currently model tube-and-wing aircraft using 2D viscous-inviscid CFD to calculate aerodynamic performance, simple beam bending theory to size the wings, and thermodynamic cycle modeling to calculate engine performance.","category":"page"},{"location":"","page":"Home","title":"Home","text":"New modelling capabilities are actively being developed. Please be sure to refer to the full documentation and dev notes before financing a new airframe development project.","category":"page"},{"location":"","page":"Home","title":"Home","text":"","category":"page"},{"location":"#Getting-started","page":"Home","title":"Getting started","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"There are several workflows that are possible to use TASOPT.jl. We outline here the most common few.","category":"page"},{"location":"#Simple-install","page":"Home","title":"Simple install","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"The easiest way to run TASOPT.jl would be to add the package using the julia package manager using the github repository.","category":"page"},{"location":"","page":"Home","title":"Home","text":"You can do this by starting a Julia session and then activating the package manager by typing ] and then entering:","category":"page"},{"location":"","page":"Home","title":"Home","text":"pkg> add git@github.com:MIT-LAE/TASOPT.jl.git","category":"page"},{"location":"","page":"Home","title":"Home","text":"You can then import TASOPT as you would with any Julia package:","category":"page"},{"location":"","page":"Home","title":"Home","text":"julia> using TASOPT","category":"page"},{"location":"#Local-development","page":"Home","title":"Local development","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"If you are going to develop the source code of TASOPT.jl you might benefit from a local clone of the git repository which can then fit into a workflow using Revise.jl for example.","category":"page"},{"location":"","page":"Home","title":"Home","text":"Step 1: Clone the git repo locally","category":"page"},{"location":"","page":"Home","title":"Home","text":"git clone git@github.mit.edu:LAE/TAESOPT.jl.git","category":"page"},{"location":"","page":"Home","title":"Home","text":"Step 2: cd to the folder where TASOPT is cloned","category":"page"},{"location":"","page":"Home","title":"Home","text":"Step 3: Use Pkg to install/ develop the package","category":"page"},{"location":"","page":"Home","title":"Home","text":"pkg> dev .","category":"page"},{"location":"","page":"Home","title":"Home","text":"You should now be able to import TASOPT from within any Julia script in your base environment.","category":"page"},{"location":"","page":"Home","title":"Home","text":"We'd suggest starting with the examples.","category":"page"},{"location":"","page":"Home","title":"Home","text":"tip: Tip\nIf you are using Revise.jl be sure to first import Revise before importing TASOPTusing Revise\nusing TASOPT","category":"page"},{"location":"","page":"Home","title":"Home","text":"","category":"page"},{"location":"#Units-and-Non-Dimensionals","page":"Home","title":"Units and Non-Dimensionals","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"All dimensional quantities are treated internally as SI.","category":"page"},{"location":"","page":"Home","title":"Home","text":"Refer to /src/IO/default_input.toml for the input file's conversion capability and formatting. It's also useful for typical values and explaining inputs.","category":"page"},{"location":"","page":"Home","title":"Home","text":"Non-dimensionalization follows the Drela conventions (see TASOPT Technical Description).","category":"page"},{"location":"","page":"Home","title":"Home","text":"using Dates # hide\nprintln(\"Documentation built $(Dates.now()) with Julia $(VERSION)\") # hide","category":"page"},{"location":"aero/lift/#Lift","page":"Lift","title":"Lift","text":"","category":"section"},{"location":"aero/lift/","page":"Lift","title":"Lift","text":"Surface lift distributions tildep are defined in terms of a baseline piecewise-linear distribution pscriptstyle (eta) defined like the chord planform, but with its own taper ratios gamma_s and gamma_t. ","category":"page"},{"location":"aero/lift/","page":"Lift","title":"Lift","text":"(Image: ) Piecewise-linear aerodynamic load tildep scriptstyle (eta), with modifications at center and tip.","category":"page"},{"location":"aero/lift/","page":"Lift","title":"Lift","text":"The segments are integrated to compute the lift contribution to the wing root load, p_o, as required by structural computations. The sectional lift distribution is treated as an input to induced drag and surface drag computations.","category":"page"},{"location":"aero/lift/","page":"Lift","title":"Lift","text":"using Markdown\nMarkdown.parse_file(joinpath(\"../..\", \"src/aero\",\"theory_lifting.md\"))","category":"page"},{"location":"aero/lift/","page":"Lift","title":"Lift","text":"aerodynamics.wingpo(b, bs, bo,\n λt, λs, γt, γs,\n AR, N, W, Lhtail, fLo, fLt)\n\naerodynamics.wingcl(b,bs,bo,\n λt,λs,γt,γs,\n sweep,AR,CL,CLhtail,fLo,fLt,\n duo,dus,dut)","category":"page"},{"location":"aero/lift/#TASOPT.aerodynamics.wingpo-NTuple{13, Any}","page":"Lift","title":"TASOPT.aerodynamics.wingpo","text":"wingpo(b, bs, bo, \n λt, λs, γt, γs, \n AR, N, W, Lhtail, fLo, fLt)\n\nComputes wing root (\"center\") loading p_o to balance the net load.\n\nN*W - L_h tail times 2*p(η) dy + 2ΔL₀ + 2ΔLₜ = N*W - (L_htail)\n\ndetails: 🔃 Inputs and Outputs\nInputs:b::Float64: Wing span.\nbs::Float64: Span of inner wing section.\nbo::Float64: Span of wing box (span at wing root).\nλt::Float64, λs::Float64 : Wing chord taper ratios at tip and break (\"snag\"), respectively.\nγt::Float64,γs::Float64 : Wing lift distribution \"taper\" ratios for outer and inner wing sections, respectively.\nAR::Float64, N::Float64, W::Float64, Lhtail : Aspect ratio, Load factor, weight and H-tail lift.\nfLo::Float64, fLt::Float64 : Wing root and tip load adjustment factors.Outputs:po::Float64: Wing root loading magnitude.\n\nSee Section 2.6.2 of the TASOPT Technical Desc.\n\n\n\n\n\n","category":"method"},{"location":"aero/lift/#TASOPT.aerodynamics.wingcl-NTuple{16, Any}","page":"Lift","title":"TASOPT.aerodynamics.wingcl","text":"wingcl(b,bs,bo,\n λt,λs,γt,γs,\n sweep,AR,CL,CLhtail,fLo,fLt,\n duo,dus,dut)\n\nCalculates section cl at eta = ηo,ηs,1\n\ndetails: 🔃 Inputs and Outputs\nInputs:b::Float64, bs::Float64, bo::Float64: Span of wing, inner wing section (up to \"snag\"), and wing root, respectively.\nλt::Float64, λs::Float64: Wing chord taper ratios at tip and break (\"snag\"), respectively.\nγt::Float64, γs::Float64: Wing lift distribution \"taper\" ratios for outer and inner wing sections, respectively.\nsweep::Float64: Wing sweep for reference axis.\nAR::Float64: Wing aspect ratio, AR = b^2S.\nCL::Float64, CLhtail::Float64: Overall lift coefficient of wing and horizontal tail, respectively.\nfLo::Float64, fLt::Float64: Correction factors for lift of wingbox and tip.\nduo::Float64, dus::Float64, dut::Float64: Velocity-change fractions at wing root, break (\"snag\"), and tip due to fuselage flow.Outputs:clo::Float64, cls::Float64, clt::Float64: Section lift coefficient at root, wing break (\"snag\"), and tip.\n\nSee Sections 2.5 and 2.6 of the TASOPT Technical Desc. Called by cdsum!.\n\n\n\n\n\n","category":"method"}] +[{"location":"misc/structs/#datastructs","page":"Data structures","title":"Data structures","text":"","category":"section"},{"location":"misc/structs/","page":"Data structures","title":"Data structures","text":"We're incorporating structs as part of modernizing TASOPT from Fortran. Here are the main ones.","category":"page"},{"location":"misc/structs/","page":"Data structures","title":"Data structures","text":"aircraft\n\naerodynamics.airfoil","category":"page"},{"location":"misc/structs/#aircraft","page":"Data structures","title":"aircraft","text":"aircraft\n\nA type representing a TASOPT aircraft model including, geometric, aerodynamic, propulsion system parameters. It is designed to hold information related to the aircraft's name, description, as well as different sets of parameters used for analysis and optimization.\n\nOverloads Base.summary to print a summary of the aircraft model.\n\nFields:\n\nname::String : Aircraft name (eg: \"Boeing 777\") \ndescription::String : A brief description of the aircraft\npari::AbstractVector{Int64} : integer flag parameters \nparg::AbstractArray{Float64} : Geometry parameters \nparm::AbstractArray{Float64} : Mission parameters \npara::AbstractArray{Float64} : Aero parameters \npare::AbstractArray{Float64} : Engine parameters \n\nFor devs: the indices for accessing specific data are defined in /src/misc/index.inc. Refer to the sample input file (/src/IO/default_input.toml and read_input.jl) for usage.\n\n\n\n\n\n","category":"type"},{"location":"misc/structs/#TASOPT.aerodynamics.airfoil","page":"Data structures","title":"TASOPT.aerodynamics.airfoil","text":"airfoil\n\nA type representing a database of pre-computed airfoil data for a single Reyolds number and a range of Mach numbers, sectional lift coefficients, and thickness-to-chord ratios. By default, this is the original TASOPT transonic airfoil, as modelled by M. Drela in MSES and stored in src/air/.\n\nOverloads Base.show to print a summary of the airfoil model.\n\nFields:\n\nMa::AbstractVector{Float64} : Mach nos.\ncl::AbstractVector{Float64} : Sectional lift coefficients.\nτ::AbstractVector{Float64} : Thickness-to-chord ratios.\nRe::Float64 : Reynolds number.\nA::AbstractArray{Float64}: Multi-dimensional array of aero performance data.\n\nVarious views of the data:\n\nA_M::AbstractArray{Float64}:\nA_τ::AbstractArray{Float64}:\nA_cl::AbstractArray{Float64}:\nA_M_τ::AbstractArray{Float64}:\nA_M_cl::AbstractArray{Float64}:\nA_cl_τ::AbstractArray{Float64}:\nA_M_cl_τ::AbstractArray{Float64}:\n\nSee also airfun and airtable.\n\n\n\n\n\n","category":"type"},{"location":"aero/theory_lifting/","page":"-","title":"-","text":"details: 📖 Theory - Wing lift distribution\nThe lift distribution \"taper ratios\" are defined using local section c_ell factors r_c_ell s and r_c_ell t. beginaligned\ngamma_s = r_c_ell s lambda_s \n\ngamma_t = r_c_ell t lambda_t \n\nfracp scriptstyle (eta)p_o equiv \nP scriptstyle (eta eta_oeta_s gamma_sgamma_t)\n = \nleft\nbeginarraylcl\n 1 0 eta eta_o \n05em\ndisplaystyle\n 1 + (gamma_s- 1) fraceta - eta_oeta_s-eta_o \n eta_o eta eta_s \n025em\ndisplaystyle\ngamma_s + (gamma_t-gamma_s) fraceta - eta_s1-eta_s \n eta_s eta 1\nendarray\nright\nlabelpeta\nendalignedTo get the actual aerodynamic load tildep, lift corrections Delta L_o and Delta L_t are applied to account for the fuselage carryover and tip lift rolloff, as sketched in the figure above. The detailed shapes of these modifications are not specified, but instead only their integrated loads are defined by the following integral relation.beginaligned\nfracL_rm wing2 = \nint_0^b2 tildep rm dy = int_0^b2 p rm dy\n+ Delta L_o\n+ Delta L_t\nendalignedThe corrections are specified in terms of the center load magnitude p_o and the f_L_scriptstyle o f_L_scriptstyle t adjustment factors.beginaligned\nDelta L_o = f_L_scriptstyle o p_o fracb_o2 \n= f_L_scriptstyle o p_o fracb2 eta_o\nlabelDLo\n025em\nDelta L_t = f_L_scriptstyle t p_t c_t \n= f_L_scriptstyle t p_o c_o gamma_t lambda_t\nlabelDLt\n05em\nf_L_scriptstyle o simeq -05\n\nf_L_scriptstyle t simeq -005\nendalignedLift load magnitude (Wing only)The wing's p_o center loading magnitude is determined by requiring that the aerodynamic loading integrated over the whole span is equal to the total weight times the load factor, minus the tail lift.beginaligned\nL_rm total = 2 int_0^b2 tildepscriptstyle (eta) rm dy = \np_o b int_0^1 Pscriptstyle (eta) rm deta + 2 Delta L_o\n+ 2 Delta L_t \n= N W - (L_rm htail)_N\nhspace2em\nlabeltotlift\nendalignedFor structural sizing calculations N = N_rm lift is chosen, and the appropriate value of (L_rm htail)_N is the worst-case (most negative) tail lift expected in the critical sizing case. One possible choice is the trimmed tail load at dive speed, where N_rm lift is most likely to occur.The wing area S_def and aspect ratio AR_def definitions allow the root chord and the tip lift drop Delta L_t to be expressed as beginaligned\nc_o = b K_o\n\nDelta L_t = \nf_L_scriptstyle t p_o b K_o gamma_t lambda_t\nlabelDLt2\n\nmathrmwhere hspace2em\nK_o equiv frac1K_c Ahspace-05exR \nendalignedso that L_rm total can be evaluated to the following. The Pscriptstyle (eta) integrals have the form as for Cscriptstyle (eta), given by int_0^eta_o C rm deta – int_eta_s^1 C^2 (eta-eta_s) rm deta, but with the lambda's replaced by gamma's.beginaligned\np_o b K_p = N W - (L_rm htail)_N hspace2em\n\nmathrmwhere hspace3em\nK_p = \neta_o + textstyle frac12(1 + gamma_s) (eta_s - eta_o)\n + textstyle frac12(gamma_s + gamma_t) (1 - eta_s)\nnonumber \n + f_L_scriptstyle oeta_o + 2 f_L_scriptstyle tK_o gamma_tlambda_t \nhspace2em\nendalignedThe root and planform-break loadings can then be explicitly determined. beginaligned\np_o = fracN W - (L_rm htail)_NK_p b \nlabelpodef\n\np_s = p_o gamma_s\n\np_t = p_o gamma_t\nendaligned","category":"page"},{"location":"propulsion/propsys/#Propulsion-system","page":"Propulsion system","title":"Propulsion system","text":"","category":"section"},{"location":"propulsion/propsys/","page":"Propulsion system","title":"Propulsion system","text":"A turbofan model is provided in TASOPT.jl","category":"page"},{"location":"propulsion/propsys/#Turbofan-model","page":"Propulsion system","title":"Turbofan model","text":"","category":"section"},{"location":"propulsion/propsys/","page":"Propulsion system","title":"Propulsion system","text":"engine.tfcalc!\n\nengine.tfsize!\n\nengine.tfweight\n","category":"page"},{"location":"propulsion/propsys/#TASOPT.engine.tfcalc!","page":"Propulsion system","title":"TASOPT.engine.tfcalc!","text":"tfcalc(pari,parg,para,pare, ip, icall,icool,initeng)\n\nCalls function tfsize or tfoper for one operating point.\n\ndetails: 🔃 Inputs and Outputs\nInput:icall: 0 call on-design sizing routine tfsize 1 call off-design analysis routine tfoper, specified Tt4 2 call off-design analysis routine tfoper, specified Fe\nicool: 0 use zero cooling mass flow ratio regardless 1 use specified cooling flow ratios epsrow(.), calculate Tmrow(.) 2 use specified metal temperatures Tmrow(.) , calculate epsrow(.)\niniteng: 0 initialize variables for iteration in TFOPER 1 use current variables as initial guesses in TFOPER\n\n\n\n\n\n","category":"function"},{"location":"propulsion/propsys/#TASOPT.engine.tfsize!","page":"Propulsion system","title":"TASOPT.engine.tfsize!","text":"tfsize!(gee, M0, T0, p0, a0, M2, M25,\n Feng, Phiinl, Kinl, iBLIc,\n BPR, pif, pilc, pihc,\n pid, pib, pifn, pitn,\n Ttf, ifuel, etab,\n epf0, eplc0, ephc0, epht0, eplt0,\n pifK, epfK,\n mofft, Pofft,\n Tt9, pt9, Tt4,\n epsl, epsh,\n icool,\n Mtexit, dTstrk, StA, efilm, tfilm,\n M4a, ruc,\n ncrowx, ncrow,\n epsrow, Tmrow, \n Δh_PreC, Δh_InterC, Δh_Regen, Δh_TurbC,\n Δp_PreC, Δp_InterC, Δp_Regen)\n\nTurbofan performance and sizing routine.\n\nCalculation procedure follows that of Kerrebrock, but the usual gas property formulas are replaced by function calls, which can therefore implement more general gas models. In addition, a turbine cooling model is added.\n\nThe gas routines reside in the following source files: gascalc.f Routines for various processes (compressor, turbine, combustor, etc) gasfun.f Routines for computing cp[T], h[t], sigma[T], R, called by the routines in gascalc.f\n\ndetails: 🔃 Inputs and Outputs\nInputs:gee: gravity acceleration\nM0: freestream Mach\nT0: freestream temperature [K]\np0: freestream pressure [Pa]\nM2: fan-face Mach number\nM25: HPC-face Mach number\nFeng: required net thrust (PKinl+PKout-Phi_jet)/u0 = sum( mdot u)\nPhiinl: inlet ingested dissipation\niBLIc: 0=core in clear flow, 1=core sees Phiinl\nBPR: bypass ratio = mdotfan/mdotcore\npif: fan pressure ratio ( = pt7 /pt2)\npilc: LP comp pressure ratio ( = pt25/pt2)\npihc: HP comp pressure ratio ( = pt3 /pt25)\npid: diffuser pressure ratio ( = pt2 /pt0)\npib: burner pressure ratio ( = pt4 /pt3)\npifn: fan nozzle pressure ratio ( = pt7/pt2.1)\npitn: turbine nozzle pressure ratio ( = pt5/pt4.9)\nTtf: fuel temperature entering combustor\nifuel: fuel index, see function gasfun (in gasfun.f)\netab: combustor efficiency (fraction of fuel burned)\nepf0: fan max polytropic efficiency\neplc0: LPC max polytropic efficiency\nephc0: HPC max polytropic efficiency\nepht0: HPT max polytropic efficiency\neplt0: LPT max polytropic efficiency\npifK: fan efficiency FPR offset: epolf = epf0 + epfK*(pif-pifK)\nepfK: fan efficiency pif derivative\nmofft: mass flow offtake at LPC discharge station 2.5\nPofft: low spool power offtake\nTt9: offtake air discharge total temperature\npt9: offtake air discharge total pressure\nepsl: low spool power loss fraction\nepsh: high spool power loss fraction\n`icool turbine cooling flag 0 = no cooling, ignore all cooling parameters below 1 = usual cooling, using passed-in fcool 2 = usual cooling, but set (and return) fcool from Tmetal\nMtexit: turbine blade-row exit Mach, for setting temperature drops\ndTstrk: hot-streak temperature delta {K}, used only if icool=2\nStA: area-weighted Stanton number , used only if icool=2\nM4a: effective Mach at cooling-flow outlet (start of mixing)\nruc: cooling-flow outlet velocity ratio, u/ue\nncrowx: dimension of epsrow array\nncrow: number of blade rows requiring cooling\nepsrow(.): input specified cooling-flow bypass ratio if icool=1 output resulting cooling-flow bypass ratio if icool=2\nTmrow(.): input specified metal temperature [K] if icool=2 output resulting metal temperature [K] if icool=1\nOutputs:\nepsrow(.): see above\nTmrow(.): see above\nTSFC: thrust specific fuel consumption = mdot_fuel g / F [1/s]\nFsp: specific thrust = F / (mdot u0) = F / ((1+BPR) mdot_core u0)\nhfuel: fuel heating value [J / kg K]\nff: fuel mass flow fraction = mdotfuel / mdotcore\nmcore: core mass flow = mdot_core [kg/s]\nA2: fan-face area [m^2]\nA25: HPC-face area [m^2]\nA5: core nozzle area [m^2]\nA7: fan nozzle area [m^2]\nA6: core plume area [m^2]\nA8: fan plume area [m^2]\nTt?: total temperature\nht?: total complete enthalpy (includes heat of formation)\npt?: total pressure\ncpt?: specific heat at stagnation temperature (= dh/dT)\nRt?: gas constant at stagnation conditions\nT?: static temperature\nu?: velocity\nepf: fan polytropic efficiency\neplc: LPC polytropic efficiency\nephc: HPC polytropic efficiency\nepht: HPT polytropic efficiency\neplt: LPT polytropic efficiency\netaf: fan overall efficiency\netalc: LPC overall efficiency\netahc: HPC overall efficiency\netaht: HPT overall efficiency\netalt: LPT overall efficiency\nLconv: T if convergence was successful, F otherwiseThe \"?\" symbol denotes the station index: 0 freestream 18 fan face outside of casing BLs 19 fan face over LPC portion 2 fan face over fan portion 21 fan exit 25 LPC exit, HPC inlet 3 compressor exit 4 combustor exit before cooling air addition 41 turbine inlet after cooling air addition 45 HPT exit, LPT inlet 49 LPT exit 5 core nozzle 6 core flow downstream 7 fan nozzle 8 fan flow downstream\n\n\n\n\n\n","category":"function"},{"location":"propulsion/propsys/#TASOPT.engine.tfweight","page":"Propulsion system","title":"TASOPT.engine.tfweight","text":" tfweight(iengwgt, Gearf, OPR, BPR, mdotc, dfan, rSnace,\n dlcomp, neng, feadd, fpylon)\n\nEngine weight estimation function using Giulia Pantalone, Drela, or Fitzgerald model.\n\ndetails: 🔃 Inputs and Outputs\nInput:iengwgt: Engine model index, Drela=0, Fitzgerald=1, and Pantalone>=3, \nOPR: Overall pressure ratio.\nBPR: By-pass ratio.\nmdotc: Engine core mass flow rate.\ndfan: Fan diameter.\nrSnace: \ndlcomp:\nneng: Number of engines.\nfeadd: Fuel system weight ratio.\nfpylon: Pylon weight fraction.Output:Weng: Total engine weight.\nWnac: Nacelle weight. \nWebare: Bare engine weight.\nSnace1: Nacelle area.\n\n\n\n\n\n","category":"function"},{"location":"propulsion/propsys/#Turbofan-Maps","page":"Propulsion system","title":"Turbofan Maps","text":"","category":"section"},{"location":"propulsion/propsys/","page":"Propulsion system","title":"Propulsion system","text":"engine.Ncmap(pratio, mb, piD, mbD, NbD, Cmap)\n\nengine.ecmap(pratio, mb, piD, mbD, Cmap, effo, piK, effK)\n\nengine.Ncmap1(pratio, m, piD, mbD, NbD, ABCDm, iabcd, Tr, pr)\n\nengine.ecmap1(pratio, m, piD, mbD, ABCDm, iabcd, effo, Tr, pr)\n\nengine.etmap(dh, mb, Nb, piD, mbD, NbD, ept0, Tmap, Tt, cpt, Rt)\n\nengine.Pimap(mb, Nb, piD, mbD, NbD, Cmap)\n\nengine.tfoper!\n","category":"page"},{"location":"propulsion/propsys/#TASOPT.engine.Ncmap-NTuple{6, Any}","page":"Propulsion system","title":"TASOPT.engine.Ncmap","text":"Ncmap(pratio, mb, piD, mbD, NbD, Cmap)\n\nCalculates compressor or fan corrected speed as a function of pressure ratio and corrected mass flow\n\ndetails: 🔃 Inputs and Outputs\nInputs:pratio: pressure ratio \nmb: corrected mass flow\npiD: design pressure ratio\nmbD: design corrected mass flow\nNbD: design corrected speed\nCmap(.): map constantsOutputs:Nb: wheel speed\nNb_?: derivatives\n\n\n\n\n\n","category":"method"},{"location":"propulsion/propsys/#TASOPT.engine.ecmap-NTuple{8, Any}","page":"Propulsion system","title":"TASOPT.engine.ecmap","text":"ecmap(pratio, mb, piD, mbD, Cmap, effo, piK, effK)\n\nCalculates compressor or fan efficiency as a function of pressure ratio and corrected mass flow\n\ndetails: 🔃 Inputs and Outputs\nInputs:pratio: pressure ratio\nmb: corrected mass flow\npiD: design pressure ratio\nmbD: design corrected mass flow\nCmap(.): map constants\neffo: maximum efficiency\npiK: pi-dependence offset eff = effo + effK*(pi-piK)\neffK: pi-dependence slopeOutputs:eff: efficiency\neff_?: derivatives\n\n\n\n\n\n","category":"method"},{"location":"propulsion/propsys/#TASOPT.engine.Ncmap1-NTuple{9, Any}","page":"Propulsion system","title":"TASOPT.engine.Ncmap1","text":"Ncmap1(pratio, m, piD, mbD, NbD, ABCDm, iabcd, Tr, pr)\n\nCalculates compressor or fan efficiency as a function of pressure ratio and corrected mass flow\n\ndetails: 🔃 Inputs and Outputs\nInputs:pratio: pressure ratio\nmb: corrected mass flow\npiD: design pressure ratio\nmbD: design corrected mass flow\nNbD: design corrected speed\nABCDm: map constants\niabcd: map exponents\nTr: T/Tref\npr: p/prefOutputs:N: wheel speed\nN_?: derivatives\n\n\n\n\n\n","category":"method"},{"location":"propulsion/propsys/#TASOPT.engine.ecmap1-NTuple{9, Any}","page":"Propulsion system","title":"TASOPT.engine.ecmap1","text":"ecmap1(pratio, m, piD, mbD, ABCDm, iabcd, effo, Tr, pr)\n\nCalculates compressor or fan efficiency as a function of pressure ratio and mass flow\n\ndetails: 🔃 Inputs and Outputs\nInputs:pratio: pressure ratio\nmb: corrected mass flow\npiD: design pressure ratio\nmbD: design corrected mass flow\nABCDm: map constants\niabcd: map exponents\neffo: maximum efficiency\nTr: T/Tref\npr: p/prefOutputs:eff: efficiency\neff_?: derivatives\n\n\n\n\n\n","category":"method"},{"location":"propulsion/propsys/#TASOPT.engine.etmap-NTuple{11, Any}","page":"Propulsion system","title":"TASOPT.engine.etmap","text":"etmap(dh, mb, Nb, piD, mbD, NbD, ept0, Tmap, Tt, cpt, Rt)\n\nCalculates turbine efficiency as a function of work and corrected mass flow\n\ndetails: 🔃 Inputs and Outputs\nInputs:dh: enthalpy change\nmb: corrected mass flow\nNb: corrected speed\npiD: design pressure ratio\nmbD: design corrected mass flow\nNbD: design corrected speed\nept0: turbine polytropic efficiency estimate\nTmap(.): map constantsOutputs:eff: efficiency\neff_?: derivatives\n\n\n\n\n\n","category":"method"},{"location":"propulsion/propsys/#TASOPT.engine.Pimap-NTuple{6, Any}","page":"Propulsion system","title":"TASOPT.engine.Pimap","text":"Pimap(mb, Nb, piD, mbD, NbD, Cmap)\n\nCalculates compressor or fan pressure ratio as a function of pressure ratio and corrected mass flow\n\ndetails: 🔃 Inputs and Outputs\nInputs:mb: corrected mass flow\nNb: corrected speed\npiD: design pressure ratio\nmbD: design corrected mass flow\nNbD: design corrected speed\nCmap(.): map constantsOutputs:pratio: pressure ratio\npi_?: derivatives\n\n\n\n\n\n","category":"method"},{"location":"propulsion/propsys/#TASOPT.engine.tfoper!","page":"Propulsion system","title":"TASOPT.engine.tfoper!","text":"function tfoper!(gee, M0, T0, p0, a0, Tref, pref, Phiinl, Kinl, iBLIc, pid, pib, pifn, pitn, Gearf, pifD, pilcD, pihcD, pihtD, piltD, mbfD, mblcD, mbhcD, mbhtD, mbltD, NbfD, NblcD, NbhcD, NbhtD, NbltD, A2, A25, A5, A7, iTFspec, Ttf, ifuel, etab, epf0, eplc0, ephc0, epht0, eplt0, pifK, epfK, mofft, Pofft, Tt9, pt9, epsl, epsh, icool, Mtexit, dTstrk, StA, efilm, tfilm, M4a, ruc, ncrowx, ncrow, epsrow, Tmrow, Feng, M2, pif, pilc, pihc, mbf, mblc, mbhc, Tt4, pt5, mcore, M25)\n\nTurbofan operation routine\n\nCalculation procedure follows that of Kerrebrock,\nbut the usual gas property formulas are replaced\nby function calls, which can therefore implement\nmore general gas models. \nIn addition, a turbine cooling model is added.\n\nThe gas routines reside in the following source files:\n gascalc.f Routines for various processes \n (compressor, turbine, combustor, etc)\n gasfun.f Routines for computing cp[T], h[t], sigma[T], R,\n called by the routines in gascalc.f\n\ndetails: 🔃 Inputs and Outputs\nInputs:gee: gravity acceleration\nM0: freestream Mach\nT0: freestream temperature [K]\np0: freestream pressure [Pa]\nTref: reference temperature for corrected mass flow and speed\npref: reference pressure for corrected mass flow\nPhiinl: inlet ingested dissipation Phi_inl\niBLIc: 0=core in clear flow, 1=core sees Phiinl\npid: diffuser pressure ratio ( = pt2/pt0)\npib: burner pressure ratio ( = pt4/pt3)\npifn: fan nozzle pressure ratio ( = pt7/pt6.9)\npitn: turbine nozzle pressure ratio ( = pt5/pt4.9)\nGearf: fan gear ratio ( = Nl/Nf )\npifD: design fan pressure ratio ( = pt21/pt2 )\npilcD: design LPC pressure ratio ( = pt25/pt19)\npihcD: design HPC pressure ratio ( = pt3 /pt25)\npihtD: design HPT pressure ratio ( = pt45/pt41)\npiltD: design LPT pressure ratio ( = pt49/pt45)\nmbfD: design corrected fan mass flow ( = mf*sqrt(Tt2 /Tref)/(pt2 /pref) )\nmblcD: design corrected LPC mass flow ( = mc*sqrt(Tt19/Tref)/(pt19/pref) )\nmbhcD: design corrected HLC mass flow ( = mc*sqrt(Tt25/Tref)/(pt25/pref) )\nmbhtD: design corrected HPT mass flow ( = mt*sqrt(Tt41/Tref)/(pt41/pref) )\nmbltD: design corrected LPT mass flow ( = mt*sqrt(Tt45/Tref)/(pt45/pref) )\nNbfD: design corrected fan speed ( = Nf/sqrt(Tt2 /Tref) )\nNblcD: design corrected LPC speed ( = Nl/sqrt(Tt19/Tref) )\nNbhcD: design corrected HPC speed ( = Nh/sqrt(Tt25/Tref) )\nNbhtD: design corrected HPT speed ( = Nh/sqrt(Tt41/Tref) )\nNbltD: design corrected LPT speed ( = Nl/sqrt(Tt45/Tref) )\nA2: fan-face area [m^2] mf = mcBPR, mt = mc(1+ff)\nA25: HPC-face area [m^2]\nA5: core nozzle area [m^2]\nA7: fan nozzle area [m^2]\niTFspec: = 1 Tt4 is specified = 2 Feng is specified\nTt4: turbine-inlet total temperature [K]\nTtf: fuel temperature entering combustor\nifuel: fuel index, see function gasfun (in gasfun.f)\netab: combustor efficiency (fraction of fuel burned)\nepf0: max fan polytropic efficiency\neplc0: LPC max polytropic efficiency\nephc0: HPC max polytropic efficiency\nepht0: HPT max polytropic efficiency\neplt0: LPT max polytropic efficiency\npifK: fan efficiency FPR offset: epolf = epf0 + epfK*(pif-pifK)\nepfK: fan efficiency pif derivative\nmofft: mass flow offtake at LPC discharge station 2.5\nPofft: low spool power offtake\nTt9: offtake air discharge total temperature\npt9: offtake air discharge total pressure\nepsl: low spool power loss fraction\nepsh: high spool power loss fraction\nicool: turbine cooling flag 0 = no cooling, ignore all cooling parameters below 1 = usual cooling, using passed-in fc 2 = usual cooling, but set (and return) fc from Tmetal\nMtexit: turbine blade-row exit Mach, for setting temperature drops\nTmetal: specified metal temperature [K], used only if icool=2\ndTstrk: hot-streak temperature delta {K}, used only if icool=2\nStA: area-weighted Stanton number , used only if icool=2\nM4a: effective Mach at cooling-flow outlet (start of mixing)\nruc: cooling-flow outlet velocity ratio, u/ue\nncrowx: dimension of epsrow array\nncrow: number of blade rows requiring cooling\nepsrow(.): input specified cooling-flow bypass ratio if icool=1 output resulting cooling-flow bypass ratio if icool=2\nTmrow(.): input specified metal temperature [K] if icool=2 output resulting metal temperature [K] if icool=1\nOutput:epsrow(.): see above\nTmrow(.): see above\nTSFC: thrust specific fuel consumption = mdot_fuel g / F [1/s]\nFsp: specific thrust = F / (mdot u0) = F / ((1+BPR) mdot_core u0)\nhfuel: fuel heating value [J / kg K]\nff: fuel mass flow fraction = mdotfuel / mdotcore\nFeng: net effective thrust = (PKinl+PKout-Phi_jet)/u0 = sum( mdot u)\nmcore: core mass flow = mdot_core [kg/s]\nBPR: bypass ratio = mdotfan/mdotcore\nTt?: total temperature\nht?: total complete enthalpy (includes heat of formation)\npt?: total pressure\ncpt?: specific heat at stagnation temperature (= dh/dT)\nRt?: gas constant at stagnation conditions\nT?: static temperature\nu?: velocity\netaf: fan overall efficiency\netac: compressor overall efficiency\netatf: fan-turbine overall efficiency\netatc: comp-turbine overall efficiency\nLconv: T if convergence was successful, F otherwiseThe \"?\" symbol denotes the station index: 0 freestream 18 fan face outside of casing BLs 19 fan face over LPC portion 2 fan face over fan portion 21 fan exit, precooler inlet 19c precooler outlet, LPC inlet 25 LPC exit, intercooler inlet 25c intercooler exit, HPC inlet 3 compressor exit 4 combustor exit before cooling air addition 41 turbine inlet after cooling air addition 45 HPT exit, LPT inlet 49 LPT exit, regenerative cooler inlet 49c regenerative cooler outlet 5 core nozzle 6 core flow downstream 7 fan nozzle 8 fan flow downstream\n\n\n\n\n\n","category":"function"},{"location":"propulsion/propsys/#Turbofan-Cooling","page":"Propulsion system","title":"Turbofan Cooling","text":"","category":"section"},{"location":"propulsion/propsys/","page":"Propulsion system","title":"Propulsion system","text":"\nengine.mcool(ncrowx, Tmrow, Tt3, Tt4, dTstreak, Trrat, efilm, tfilm, StA)\n\nengine.Tmcalc(ncrowx, ncrow, Tt3, Tt4, dTstreak, Trrat, efilm, tfilm, StA, epsrow)\n\n","category":"page"},{"location":"propulsion/propsys/#TASOPT.engine.mcool-NTuple{9, Any}","page":"Propulsion system","title":"TASOPT.engine.mcool","text":"mcool(ncrowx, Tmrow, Tt3, Tt4, dTstreak, Trrat, efilm, tfilm, StA)\n\nCalculates cooling mass flow requirement.\n\ndetails: 🔃 Inputs and Outputs\nInputs:ncrowx: dimension of Tmrow(.),epsrow(.) arrays (max number of blade rows)\nTmrow(.): design metal temperature for each blade row\nTt3: cooling flow temperature\nTt4: hot gas temperature from burner\ndTstreak: hot-streak temperature increase over Tt4, for first blade row \nTrrat: static temperature ratio across each blade row, T4.1 / T4\nefilm: cooling efficiency = (Tco-Tci)/(Tmetal-Tci)\ntfilm: film effectiveness = (Tgas-Tfaw)/(Tgas-Tco) Tco = temperature of cooling air exiting blade Tci = temperature of cooling air entering blade Tfaw = film adiabatic wall temperature (for insulated-wall case) StA`: area-weighted external Stanton number = St (Asurf/Aflow) cpgas/cpcoolOutput:ncrow: number of blade rows which need cooling\nepsrow(.): cooling mass flow ratio for each blade row, mcrow/m_air\n\n\n\n\n\n","category":"method"},{"location":"propulsion/propsys/#TASOPT.engine.Tmcalc-NTuple{10, Any}","page":"Propulsion system","title":"TASOPT.engine.Tmcalc","text":"Tmcalc(ncrowx, ncrow, Tt3, Tt4, dTstreak, Trrat, efilm, tfilm, StA, epsrow)\n\nCalculates metal temperature for blade row\n\ndetails: 🔃 Inputs and Outputs\nInputs:ncrowx: dimension of Tmrow(.),epsrow(.) arrays (max number of blade rows)\nncrow: number of blade rows which are cooled\nepsrow(.): cooling mass flow ratio for each blade row, mcrow/m_air\nTt3: cooling flow temperature\nTt4: hot gas temperature from burner\ndTstreak: hot-streak temperature increase over Tt4, for first blade row \nTrrat: static temperature ratio across each blade row, T4.1 / T4\nefilm: cooling efficiency = (Tco-Tci)/(Tmetal-Tci)\ntfilm: film effectiveness = (Tgas-Tfaw)/(Tgas-Tco) Tco = temperature of cooling air exiting blade Tci = temperature of cooling air entering blade Tfaw = film adiabatic wall temperature (for insulated-wall case)\nStA: area-weighted external Stanton number = St (Asurf/Aflow) cpgas/cpcool\nOutput:\nTmrow(.): design metal temperature for each blade row\n\n\n\n\n\n","category":"method"},{"location":"propulsion/gascalc/#Gas-Calculations","page":"Gas Calculations","title":"Gas Calculations","text":"","category":"section"},{"location":"propulsion/gascalc/","page":"Gas Calculations","title":"Gas Calculations","text":"Gas calculations used with TASOPT.jl propulsion systems.","category":"page"},{"location":"propulsion/gascalc/#Ideal-gas-with-variable-c_p","page":"Gas Calculations","title":"Ideal gas with variable c_p","text":"","category":"section"},{"location":"propulsion/gascalc/","page":"Gas Calculations","title":"Gas Calculations","text":"\nengine.gas_tset(alpha, n, hspec, tguess)\n\nengine.gas_tsetd(alpha, n, hspec, tguess)\n\nengine.gasfun\n\nengine.gaschem(igas)\n\nengine.gassum(alpha, n, t)\n\nengine.gassumd(alpha, n, t)\n\nengine.gas_prat(alpha, n, po, to, ho, so, cpo, ro, pratio, epol)\n\nengine.gas_pratd(alpha, n, po, to, ho, so, cpo, ro, pratio, epol)\n\nengine.gas_delh(alpha, n, po, to, ho, so, cpo, ro, delh, epol)\n\nengine.gas_delhd(alpha, n, po, to, ho, so, cpo, ro, delh, epol)\n\nengine.gas_burn(alpha, beta, gamma, n, ifuel, to, tf, t)\n\nengine.gas_burnd(alpha, beta, gamma, n, ifuel, to, tf, t)\n\nengine.gas_mach(alpha, n, po, to, ho, so, cpo, ro, mo, m, epol)\n\nengine.gas_machd(alpha, n, po, to, ho, so, cpo, ro, mo, m, epol)\n\nengine.gas_mass(alpha, n, po, to, ho, so, cpo, ro, mflux, Mguess)\n\nengine.gasfuel(ifuel, n)\n\nengine.gasPr(gas, T)\n\n\n","category":"page"},{"location":"propulsion/gascalc/#TASOPT.engine.gas_tset-NTuple{4, Any}","page":"Gas Calculations","title":"TASOPT.engine.gas_tset","text":"gas_tset(alpha, n, hspec, tguess)\n\nCalculates temperature for a specified enthalpy. The constant-cp equivalent is\n\n t = (hspec - hf) /cp \n\n where hf is the heat of formation included in h[t]\n\ndetails: 🔃 Inputs and Outputs\nInput:alpha(.): mass fractions for gas constituents i = 1..n\nn: number of constituents present\nhspec: specified enthalpy\ntguess: first guess for temperatureOutput:t: temperature\n\n\n\n\n\n","category":"method"},{"location":"propulsion/gascalc/#TASOPT.engine.gas_tsetd-NTuple{4, Any}","page":"Gas Calculations","title":"TASOPT.engine.gas_tsetd","text":"gas_tsetd(alpha, n, hspec, tguess)\n\nSame as gas_tset, but also returns derivative\n\ndetails: 🔃 Inputs and Outputs\nInputs:alpha(.): mass fractions for gas constituents i = 1..n\nn: number of constituents present\nhspec: specified enthalpy\ntguess: first guess for temperatureOutputs:t: temperature\nt_hspec: ?\nt_al: ?\n\n\n\n\n\n","category":"method"},{"location":"propulsion/gascalc/#TASOPT.engine.gasfun","page":"Gas Calculations","title":"TASOPT.engine.gasfun","text":"gasfun(igas, t)\n\nComputes properties of a thermally-perfect gas with some variable specific heat cp[T].\n\ndetails: 🔃 Inputs and Outputs\nInput:igas: index specifying the gas (see if blocks below for list)\nt: temperature T in KelvinOutput:s: entropy-complement function s[T]\ns_t: ds/dT\nh: complete enthalpy function h[T]\nh_t: dh/dT\ncp: specific heat cp[T]\nr: ideal-gas constant R\n\nThe adiabatic pressure change over a process 1->2 with some polytropic efficiency epol is:\n\n p2 = p1 exp epol (s2-s1)R compression\n\n p2 = p1 exp (1epol) (s2-s1)R expansion\n\n\n\n\n\n","category":"function"},{"location":"propulsion/gascalc/#TASOPT.engine.gaschem-Tuple{Any}","page":"Gas Calculations","title":"TASOPT.engine.gaschem","text":"gaschem(igas)\n\nReturns number of C,H,O,N atoms in gas molecule, for the gases implemented in function gasfun above.\n\ndetails: 🔃 Inputs and Outputs\nInput:igas: index specifying the gas (see if blocks below for list)Output:nchon(.): number of C,H,O,N atoms in gas molecule\n\n\n\n\n\n","category":"method"},{"location":"propulsion/gascalc/#TASOPT.engine.gassum-Tuple{Any, Any, Any}","page":"Gas Calculations","title":"TASOPT.engine.gassum","text":"gassum(alpha, n, t)\n\nCalculates all gas-mixture properties at specified temperature T, and mixing fractions alpha(.)\n\ndetails: 🔃 Inputs and Outputs\nInputs:alpha(.): mass fractions for gas constituents i = 1..n\nn: number of gas constituents\nt: temperature T, KelvinOutputs:s: entropy-complement function s[T]\ns_t: ds/dT\nh: complete enthalpy function h[T]\nh_t: dh/dT\ncp: specific heat cp[T]\nr: ideal-gas constant R\n\n\n\n\n\n","category":"method"},{"location":"propulsion/gascalc/#TASOPT.engine.gassumd-Tuple{Any, Any, Any}","page":"Gas Calculations","title":"TASOPT.engine.gassumd","text":"gassumd(alpha, n, t)\n\nSame as gassum, but also returns cp_t\n\ndetails: 🔃 Inputs and Outputs\nInputs:alpha(.): mass fractions for gas constituents i = 1..n\nn: number of gas constituents\nt: temperature T, KelvinOutputs:s: entropy-complement function s[T]\ns_t: ds/dT\nh: complete enthalpy function h[T]\nh_t: dh/dT\ncp: specific heat cp[T]\nr: ideal-gas constant R\ncp_t: dcp / dT\n\n\n\n\n\n","category":"method"},{"location":"propulsion/gascalc/#TASOPT.engine.gas_prat-NTuple{10, Any}","page":"Gas Calculations","title":"TASOPT.engine.gas_prat","text":"gas_prat(alpha, n, po, to, ho, so, cpo, ro, pratio, epol)\n\nCalculates state change for a specified pressure ratio. The constant-cp equivalent is the usual isentropic relations, but with epol included.\n\ng = cp/(cp-r)\ngexp = (g-1)/(g*epol)\ntau = pratio^gexp\np = po * pratio\nt = to * tau\n(h-hf) = (ho-hf) * tau\n\ndetails: 🔃 Inputs and Outputs\nInputs:alpha(.): mass fractions for gas constituents i = 1..n\nn: number of gas constituents\npo: starting pressure\nto: starting temperature\nho: starting enthalpy\nso: starting entropy-complement\ncpo: starting specific heat\nro: starting gas constant\npratio: pressure ratio\nepol: polytropic efficiency of change process , if compression\nepol: 1/(polytropic efficiency of change process) , if expansionOutputs:p: ending pressure\nt: ending temperature\nh: ending enthalpy\ns: ending entropy-complement\ncp: ending specific heat\nr: ending gas constant (this will be the same as starting ro)\n\n\n\n\n\n","category":"method"},{"location":"propulsion/gascalc/#TASOPT.engine.gas_pratd-NTuple{10, Any}","page":"Gas Calculations","title":"TASOPT.engine.gas_pratd","text":"gas_pratd(alpha, n, po, to, ho, so, cpo, ro, pratio, epol)\n\nSame as gas_prat, but also returns Jacobians w.r.t. po,to,pratio,epol\n\ndetails: 🔃 Inputs and Outputs\nInputs:alpha(.): mass fractions for gas constituents i = 1..n\nn: number of gas constituents\npo: starting pressure\nto: starting temperature\nho: starting enthalpy\nso: starting entropy-complement\ncpo: starting specific heat\nro: starting gas constant\npratio: pressure ratio\nepol: polytropic efficiency of change process , if compression\nepol: 1/(polytropic efficiency of change process) , if expansionOutputs:p: ending pressure\nt: ending temperature\nh: ending enthalpy\ns: ending entropy-complement\ncp: ending specific heat\nr: ending gas constant (this will be the same as starting ro)\n\n\n\n\n\n","category":"method"},{"location":"propulsion/gascalc/#TASOPT.engine.gas_delh-NTuple{10, Any}","page":"Gas Calculations","title":"TASOPT.engine.gas_delh","text":"gas_delh(alpha, n, po, to, ho, so, cpo, ro, delh, epol)\n\nCalculates state change for a specified enthalpy change. The constant-cp equivalent is the usual isentropic relations, but with epol included.\n\n t - to = delh/cp\n g = cp/(cp-r)\n gexp = (g-1)/(g*epol)\n tau = t/to\n pi = tau^(1/gexp)\n p = po * pi\n (h-hf) = (ho-hf) * tau\n\ndetails: 🔃 Inputs and Outputs\nInputs:alpha(.): mass fractions for gas constituents i = 1..n\nn: number of constituents present\npo: starting pressure\nto: starting temperature\nho: starting enthalpy\nso: starting entropy-complement\ncpo: starting specific heat\nro: starting gas constant\ndelh: enthalpy change\nepol: polytropic efficiency of change process, if compression and 1/(polytropic efficiency of change process) , if expansionOutput:p: ending pressure\nt: ending temperature\nh: ending enthalpy\ns: ending entropy-complement\ncp: ending specific heat\nr: ending gas constant (this will be the same as starting ro)\n\n\n\n\n\n","category":"method"},{"location":"propulsion/gascalc/#TASOPT.engine.gas_delhd-NTuple{10, Any}","page":"Gas Calculations","title":"TASOPT.engine.gas_delhd","text":"gas_delhd(alpha, n, po, to, ho, so, cpo, ro, delh, epol)\n\nSame as gas_delh, but also returns Jacobians w.r.t. po,to,delh\n\ndetails: 🔃 Inputs and Outputs\nInputs:alpha(.): mass fractions for gas constituents i = 1..n\nn: number of constituents present\npo: starting pressure\nto: starting temperature\nho: starting enthalpy\nso: starting entropy-complement\ncpo: starting specific heat\nro: starting gas constant\ndelh: enthalpy change\nepol: polytropic efficiency of change process, if compression and 1/(polytropic efficiency of change process) , if expansionOutput:p: ending pressure\nt: ending temperature\nh: ending enthalpy\ns: ending entropy-complement\ncp: ending specific heat\nr: ending gas constant (this will be the same as starting ro)\np_so: \np_po: \np_ep: \np_ho: \nt_ho: \nh_ho: \ns_ho: \np_dh: \nt_dh: \nh_dh: \ns_dh: \np_al: \nt_al: \nh_al: \ns_al: \ncp_al: \nr_al: \n\n\n\n\n\n","category":"method"},{"location":"propulsion/gascalc/#TASOPT.engine.gas_burn-NTuple{8, Any}","page":"Gas Calculations","title":"TASOPT.engine.gas_burn","text":"gas_burn(alpha, beta, gamma, n, ifuel, to, tf, t)\n\nCalculates fuel/air mass fraction in combustion with specified start and end temperatures to,t . Calculates mass fractions of post-combustion constituents\n\ndetails: 🔃 Inputs and Outputs\nInput: alpha(.): mass fractions for air constituents i = 1..nbeta(.): mass fractions for fuel constituents i = 1..n\ngamma(.): mass fraction changes of air constituents due to combustion\nn: number of constituents present, air is 1..n-1, fuel is n\nifuel: index specifying fuel molecule\nto: starting air temperatur\ntf: starting fuel temperature\nt: temperature of combustion productsOutput: f: fuel/air mass fraction lambda(.): mass fractions for combustion product constituents\n\n\n\n\n\n","category":"method"},{"location":"propulsion/gascalc/#TASOPT.engine.gas_burnd-NTuple{8, Any}","page":"Gas Calculations","title":"TASOPT.engine.gas_burnd","text":"gas_burnd(alpha, beta, gamma, n, ifuel, to, tf, t)\n\nSame as gas_burn, but also returns derivatives.\n\ndetails: 🔃 Inputs and Outputs\nInput: alpha(.): mass fractions for air constituents i = 1..nbeta(.): mass fractions for fuel constituents i = 1..n\ngamma(.): mass fraction changes of air constituents due to combustion\nn: number of constituents present, air is 1..n-1, fuel is n\nifuel: index specifying fuel molecule\nto: starting air temperatur\ntf: starting fuel temperature\nt: temperature of combustion productsOutput: f: fuel/air mass fraction lambda(.): mass fractions for combustion product constituents f_t: l_to: l_tf: l_t: \n\n\n\n\n\n","category":"method"},{"location":"propulsion/gascalc/#TASOPT.engine.gas_mach-NTuple{11, Any}","page":"Gas Calculations","title":"TASOPT.engine.gas_mach","text":"gas_mach(alpha, n, po, to, ho, so, cpo, ro, mo, m, epol)\n\nCalculates state change for a specified Mach number change. The constant-cp equivalent is the usual isentropic relations, but with epol included.\n\ng = cp/(cp-r)\ngexp = (g-1)/(g*epol)\ntau = (1 + 0.5*(g-1)*mo^2) / (1 + 0.5*(g-1)*m^2)\npi = tau^(1/gexp)\np = po * pi\nt = to * tau\n(h-hf) = (ho-hf) * tau\n \n!!! details \"🔃 Inputs and Outputs\" \n**Input:**\n`alpha(.)`: mass fractions for gas constituents i = 1..n\n`n`: number of constituents present\n`po`: starting pressure\n`to`: starting temperature\n`ho`: starting enthalpy\n`so`: starting entropy-complement\n`cpo`: starting specific heat\n`ro`: starting gas constant\n`mo`: starting Mach number\n`m`: ending Mach number\n`epol`: polytropic efficiency of change process , if compression\n`epol`: 1/(polytropic efficiency of change process) , if expansion\n \n**Output:**\n`p`: ending pressure\n`t`: ending temperature\n`h`: ending enthalpy\n`s`: ending entropy-complement\n`cp`: ending specific heat\n`r`: ending gas constant (this will be the same as starting ro)\n\n\n\n\n\n","category":"method"},{"location":"propulsion/gascalc/#TASOPT.engine.gas_machd-NTuple{11, Any}","page":"Gas Calculations","title":"TASOPT.engine.gas_machd","text":"gas_machd(alpha, n, po, to, ho, so, cpo, ro, mo, m, epol)\n\nSame as gas_mach, but also returns derivatives\n\n\n\n\n\n","category":"method"},{"location":"propulsion/gascalc/#TASOPT.engine.gas_mass-NTuple{10, Any}","page":"Gas Calculations","title":"TASOPT.engine.gas_mass","text":"gas_mass(alpha, n, po, to, ho, so, cpo, ro, mflux, Mguess)\n\nCalculates state a specified mass flux. Mguess specifies the initial guess, and also selects either the subsonic or the supersonic branch.\n\ndetails: 🔃 Inputs and Outputs\nInput: alpha(.) mass fractions for gas constituents i = 1..nn number of constituents present po total pressureto total temperature ho total enthalpyso total entropy-complement cpo total specific heatro total gas constant mflux specified mass flux = rho u = mdot/AMguess specifies the initial guess for the static quantitiesOutput: p static pressuret static temperature h static enthalpys static entropy-complement cp static specific heatr static gas constant (this will be the same as total ro)\n\n\n\n\n\n","category":"method"},{"location":"propulsion/gascalc/#TASOPT.engine.gasfuel-Tuple{Any, Any}","page":"Gas Calculations","title":"TASOPT.engine.gasfuel","text":"gasfuel(ifuel, n)\n\nReturns mass fraction of constituent changes as a result of combustion with atmospheric oxygen\n\ndetails: 🔃 Inputs and Outputs\nInput:`ifuel index of fuel (see function gasfun)\n`n number of constituents in reactionOutput:`gamma(.) mass fraction changes due to reaction for i = 1..n\n\n\n\n\n\n","category":"method"},{"location":"propulsion/gascalc/#TASOPT.engine.gasPr-Tuple{Any, Any}","page":"Gas Calculations","title":"TASOPT.engine.gasPr","text":"gasPr(gas, T)\n\nThis function calculates some gas thermodynamic properties of different species, including viscosity, thermal conductivity, specific heat, and Prandtl number.\n\ndetails: 🔃 Inputs and Outputs\nInputs:gas::char: gas name\nT::Float64: temperature (K)Outputs:R::Float64: gas constant (J/kg/K)\nPr::Float64: Prandtl number\nγ::Float64: ratio of specific heats\ncp::Float64: specific heat at constant pressure (J/kg/K)\nμ::Float64: dynamic viscosity (Pa s)\nk::Float64: thermal conductivity (W/m/K) \n\n\n\n\n\n","category":"method"},{"location":"aero/theory_fuse_profile_drag/","page":"-","title":"-","text":"details: 📖 Theory - axisymmetric fuselage profile drag\nThe viscous calculation produces displacement, momentum, and kinetic energy areas Delta^* Theta Theta^* scriptstyle (x).The cross-sectional area over the center cylindrical portion is A_rm fuse, which has already been defined bybeginaligned\nA_rm fuse = left pi + n_rm fwebleft( 2theta_rm fb+ sin 2 theta_rm fbright) \n right R_rm fuse^2 + 2 left R_rm fuse+ n_rm fwebw_rm fbright Delta R_rm fuse\nendalignedThis also defines the radius of the equivalent round cylinder. beginaligned R_rm cyl = sqrtfracA_rm fusepi endaligned The equivalent radii over the tapering nose and radius are then defined via the following convenient functions.beginaligned\nR scriptstyle (x) = \nleft\nbeginarraylcl\ndisplaystyle\nR_rm cyl\nleft \n1 - left( fracx_rm blend_1 - xx_rm blend_1 - x_rm nose \n right)^ a \n right^ 1a\n x_rm nose x x_rm blend_1 \n10em\ndisplaystyle\nR_rm cyl\n x_rm blend_1 x x_rm blend_2\n05em\ndisplaystyle\nR_rm cyl\nleft \n1 - left( fracx - x_rm blend_2x_rm end - x_rm blend_ 2 \n right)^ b \n right\n x_rm blend_2 x x_rm tail\nendarray\nright\n\na simeq 16 \n\nb simeq 20 \nendalignedThe x_rm blend_1 and x_rm blend_2 locations are the nose and tailcone blend points, and do not necessarily have to be exactly the same as the x_rm shell_1 and x_rm shell_2 locations which define the loaded pressure shell. Likewise, x_rm end is the aerodynamic endpoint of the tailcone, and is distinct from its structural endpoint x_rm conend. The a and b constant values above give reasonable typical fuselage shapes.If the fuselage is nearly round, the necessary area and perimeter distributions follow immediately. beginaligned\nA scriptstyle (x) = pi Rscriptstyle (x)^2\n\nb_0 scriptstyle (x) = 2 pi R scriptstyle (x)\nendalignedThis would be suitably modified for non-circular cross-sections.With this geometry definition, the viscous/inviscid calculation procedure provides the momentum and kinetic energy area distributions along the body and wake,beginaligned\nleft Theta scriptstyle (s) Theta^* scriptstyle (s)right = \nf_rm f_excr \ncal F(M_scriptscriptstyle infty Re_ell A scriptstyle (x) b_0 scriptstyle (x))\nendalignedwhere cal F denotes the overall viscous/inviscid calculation procedure, and f_rm f_excr geq 1 is an empirical factor to allow for fuselage excrescence drag sources.Specific values of interest are the momentum area Theta_rm wake at the wake numerical endpoint s_rm wake, the far-downstream momentum area Theta_scriptscriptstyle infty, and the kinetic energy area Theta_scriptscriptstyle TE at the body endpoint or trailing edge. beginaligned\nTheta_rm wake = Theta (s_rm wake) \n\nH_rm avg = \ntextstyle frac12left H(s_rm wake) + 1 + (gamma-1) M_scriptscriptstyle infty^2 right\n\nTheta_scriptscriptstyle infty = Theta_rm wake\nleft( fracu_e (s_rm wake)V_scriptscriptstyle infty right)^H_rm avg \n\nTheta^*_scriptscriptstyle TE = Theta^*(s_scriptscriptstyle TE) \nendalignedThe equation above is the Squire-Young formula, with H_rm avg being the average shape parameter between the end of the wake and far downstream.The fuselage surface + wake dissipated power in the absence of BLI is then evaluated as follows, consistent with the usual wake momentum defect relations. beginaligned\nC_D_rm fuse equiv \nfracPhi_rm surf-P_V_rm surf + Phi_rm wake-P_V_rm wake\n textstyle frac12rho_scriptscriptstyle inftyV_scriptscriptstyle infty^3 S \nhspace6ex\nrm(without BLI)\nhspace-90ex\n\nC_D_rm fuse\n = fracD_rm fusetextstyle frac12rho_scriptscriptstyle inftyV_scriptscriptstyle infty^2 S\n= frac2 Theta_scriptscriptstyle inftyS \nhspace17ex\nrm(without BLI)\nhspace-90ex\nendalignedIf BLI is present at or near the trailing edge, the upstream boundary layer and corresponding surface dissipation Phi_rm surf will be mostly unaffected. But the viscous fluid flowing into the wake is now reduced by the ingestion fraction f_rm scriptscriptstyle BLI_scriptstyle f, so that the wake dissipation Phi_rm wake will be reduced by the same fraction. This then gives the following overall fuselage dissipation coefficient for the BLI case. beginaligned\nC_D_rm fuse = \nfracPhi_rm surf-P_V_rm surf + \n (Phi_rm wake-P_V_rm wake)(1-f_rm scriptscriptstyle BLI_scriptstyle f)\n textstyle frac12rho_scriptscriptstyle inftyV_scriptscriptstyle infty^3 S \nhspace3ex\nmathrm(with BLI)\nhspace-2ex\n\nC_D_rm fuse \n simeq \nC_D_rm fuse - C_Phi_rm wake f_rm scriptscriptstyle BLI_scriptstyle f\nhspace23ex\nmathrm(with BLI)\nhspace-2ex\n05em\nrmwhere hspace3ex\nC_Phi_rm wake = \nfrac2 Theta_scriptscriptstyle inftyS - fracTheta^*_scriptscriptstyle TES \nendaligned","category":"page"},{"location":"structures/fueltanks/#fueltanks","page":"Fuel tanks","title":"Fuel tanks","text":"","category":"section"},{"location":"structures/fueltanks/","page":"Fuel tanks","title":"Fuel tanks","text":"Liquid hydrocarbon fuel is assumed to be stored in the interior of the wings and no additional tanks are needed. The weight of the fuel is accounted for while sizing the wing structure. See structures.surfw.","category":"page"},{"location":"structures/fueltanks/","page":"Fuel tanks","title":"Fuel tanks","text":"However, alternate fuels such as cryogenic liquid hydrogen require additional storage tanks that are insulated pressure vessels.","category":"page"},{"location":"structures/fueltanks/","page":"Fuel tanks","title":"Fuel tanks","text":"structures.tanksize\nstructures.tankWmech\nstructures.tankWthermal\n","category":"page"},{"location":"structures/fueltanks/#TASOPT.structures.tanksize","page":"Fuel tanks","title":"TASOPT.structures.tanksize","text":" tanksize(gee, rhoFuel, deltap,\n Rfuse, dRfuse, hconvgas, h_LH2, Tfuel, Tair,\n h_v, t_cond, k, hconvair, time_flight, fstring,ffadd,\n wfb, nfweb, sigskin, rho_insul, rhoskin, Wfuel, threshold_percent, clearance_fuse, AR)\n\ntanksize sizes a cryogenic fuel tank for a LH-fueled aircraft\n\ndetails: 🔃 Inputs and Outputs\n**Inputs:**\n- `gee::Float64`: Gravitational acceleration (m/s^2).\n- `rhoFuel::Float64`: Density of fuel (kg/m^3).\n- `deltap::Float64`: Allowed pressure difference in vessel (Pa).\n- `Rfuse::Float64`: Fuselage radius (m).\n- `rho_insul::Array{Float64}`: Array of insulation layer densities (kg/m3).\n- `dRfuse::Float64`: Accounts for flatness at the bottom of the fuselage (m).\n- `xshell1::Float64`: Start x-coordinate of the tank (m).\n- `xshell2::Float64`: End x-coordinate of the tank (m).\n- `Thermal::Array{Float64}`: Conductivity array k (W/(m*K)) for each MLI layer.\n- `hconvgas::Float64`: Convective coefficient of insulating purged gas (e.g., N2) (W/m2*K).\n- `hconvair::Float64`: Convective coefficient of ambient air (W/m2*K).\n- `Thickness::Array{Float64}`: Thickness array t (m) for each MLI layer.\n- `h_LH2::Float64`: LH2 convective coefficient (W/m2*K).\n- `Tfuel::Float64`: Fuel temperature (K).\n- `Tair::Float64`: Ambient temperature (K).\n- `r_tank::Float64`: Tank outer radius (m).\n- `h_v::Float64`: Heat of vaporization of liquid hydrogen (J/kg).\n- `r_gas::Float64`: Inner radius of the gas-purged chamber (m).\n- `threshold_percent::Float64`: Max allowed percentage of fuel that is allowed to boil off.\n- `mode::Char`: '1' means optimize m_boiloff, '2' means find m_boiloff based on given thickness.\n\n**Outputs:**\n- `Wtank_total::Float64`: Total weight of the tank including fuel (N).\n- `thickness_insul::Float64`: Total thickness of the insulation (m).\n- `lshell::Float64`: Length of the tank (m).\n- `mdot_boiloff::Float64`: Mass boiled off during the mission flight (kg).\n- `Vfuel::Float64`: Volume of fuel (m^3).\n- `Wfuel_tot::Float64`: Weight of fuel (N).\n- `m_boiloff::Float64`: Mass boiled off (kg).\n- `tskin::Float64`: Thickness of the tank's skin (m).\n- `t_head::Float64`: Thickness of the tank's head (m).\n- `Rtank::Float64`: Radius of the tank (m).\n- `Whead::Float64`: Weight of the tank's head (N).\n- `Wcyl::Float64`: Weight of the tank's cylinder (N).\n- `Winsul_sum::Float64`: Sum of the insulation weight (N).\n- `Winsul::Float64`: Weight of insulation (N).\n- `l_tank::Float64`: Length of the tank (m).\n- `Wtank::Float64`: Weight of the tank structure (N).\n\nSee here.\n\n\n\n\n\n","category":"function"},{"location":"structures/fueltanks/#TASOPT.structures.tankWmech","page":"Fuel tanks","title":"TASOPT.structures.tankWmech","text":" tankWmech(gee, ρfuel,\n ftankstiff, ftankadd, Δp,\n Rfuse, dRfuse, wfb, nfweb,\n sigskin, rho_insul, rhoskin,\n Wfuel, m_boiloff, t_cond, clearance_fuse, AR)\n\ntankWmech calculates the weight of the cryogenic fuel tank for a LH-fueled aircraft.\n\ndetails: 🔃 Inputs and Outputs\nInputs:gee::Float64: Gravitational acceleration (m/s^2).\nρfuel::Float64: Fuel density (kg/m^3).\nftankstiff::Float64: Tank stiffness factor.\nftankadd::Float64: Additional mass factor for the tank.\nΔp::Float64: Pressure difference (Pa).\nRfuse::Float64: Fuselage radius (m).\ndRfuse::Float64: Subtraction factor accounting for fuselage flatness (m).\nwfb: Parameters for multiple-bubble configuration.\nnfweb: Number of bubbles.\nsigskin::Float64: Material property.\nrho_insul::Array{Float64}: Array of insulation layer densities (kg/m3).\nrhoskin::Float64: Material property.\nWfuel::Float64: Weight of fuel (N).\nm_boiloff::Float64: Mass boiled off during the mission flight (kg).\nt_cond::Array{Float64,1}: Thickness of insulation layers (m).\nclearance_fuse::Float64: Clearance for the fuselage (m).\nAR::Float64: Aspect ratio.Outputs:Wtank_total::Float64: Total tank weight including fuel (N).\nl_cyl::Float64: Length of the cylindrical portion (m).\ntskin::Float64: Thickness of the tank's skin (m).\nRtank_outer::Float64: Outer radius of the tank (m).\nVfuel::Float64: Volume of fuel (m^3).\nWtank::Float64: Weight of the empty tank (N).\nWfuel_tot::Float64: Total weight of fuel (N).\nWinsul_sum::Float64: Sum of insulation weight (N).\nt_head::Float64: Thickness of the tank's head (m).\nWhead::Float64: Weight of the tank's head (N).\nWcyl::Float64: Weight of the tank's cylinder (N).\nWinsul::Float64: Weight of insulation (N).\nShead_insul::Float64: Insulated surface area of the head (m^2).\nl_tank::Float64: Total length of the tank (m).\n\nNOTE: Al alloy 2219 has been recommended as tank material (from H2 tank paper in OneNote)\n\nSee here.\n\n\n\n\n\n","category":"function"},{"location":"structures/fueltanks/#TASOPT.structures.tankWthermal","page":"Fuel tanks","title":"TASOPT.structures.tankWthermal","text":" tankWthermal(l_cyl, r_tank, Shead,\n hconvgas, h_LH2, hconvair, \n t_cond, k, Tfuel, Tair, \n h_v:, time_flight)\n\ntankWthermal calculates the boil-off rate of LH2 for a given insulation thickness.\n\nThis subroutine does not size the thermal insulation layers but rather calculates the boil-off rate of fLH2, for a given insulation thickness\n\ndetails: 🔃 Inputs and Outputs\nInputs:l_cyl::Float64: Length of the tank (m).\nr_tank::Float64: Tank outer radius (m).\nShead::Array{Float64,1}: Array of surface areas of each layer of the end/head of the tank [m²].\nhconvgas::Float64: Convective coefficient of insulating purged gas (W/m²*K).\nh_LH2::Float64: LH2 convective coefficient (W/m²*K).\nhconvair::Float64: Convective coefficient of ambient air (W/m²*K).\nt_cond::Array{Float64,1}: Array of thickness of each layer in MLI (m).\nk::Array{Float64,1}: Thermal conductivity array (W/(m*K)) comprising k values for each MLI layer.\nTfuel::Float64: Fuel temperature (K).\nTair::Float64: Ambient temperature (K).\nh_v::Float64: Heat of vaporization of liquid hydrogen (J/kg).\ntime_flight::Float64: Time of flight (s).Outputs:m_boiloff::Float64: Boil-off LH2 mass (kg).\nmdot_boiloff::Float64: Boil-off rate of LH2 (kg/s).\n\nSee here.\n\n\n\n\n\n","category":"function"},{"location":"sizing/weightmodels/#weightmodels","page":"Weight models","title":"Weight models","text":"","category":"section"},{"location":"sizing/weightmodels/","page":"Weight models","title":"Weight models","text":"😬 wip","category":"page"},{"location":"sizing/weightmodels/","page":"Weight models","title":"Weight models","text":"See Chapter 2 of the TASOPT Technical Description in the interim.","category":"page"},{"location":"atmos/atmos/#Atmospheric-properties","page":"Atmospheric properties","title":"Atmospheric properties","text":"","category":"section"},{"location":"atmos/atmos/","page":"Atmospheric properties","title":"Atmospheric properties","text":"TASOPT.atmos","category":"page"},{"location":"atmos/atmos/#TASOPT.atmosphere.atmos","page":"Atmospheric properties","title":"TASOPT.atmosphere.atmos","text":"atmos(h)\n\nAtmospheric functions T(h), ρ(h) etc valid to h=20km, p(h) valid to h=70km.\n\nAlso calculates viscosity using Sutherland's law.\n\nUnits:\n\n[h] = km ASL\n[T] = Kelvin\n[p] = Pa\n[ρ] = kg/m^3\n[a] = m/s\n[μ] = kg/m-s \n\n\n\n\n\n","category":"function"},{"location":"atmos/atmos/","page":"Atmospheric properties","title":"Atmospheric properties","text":"This function can be used to return the atmospheric properties at a given altitude as follows:","category":"page"},{"location":"atmos/atmos/","page":"Atmospheric properties","title":"Atmospheric properties","text":"include(\"../../../src/atmos/atmos.jl\")\nusing .atmosphere","category":"page"},{"location":"atmos/atmos/","page":"Atmospheric properties","title":"Atmospheric properties","text":"h = 10.0 # km\nT,p,ρ,a,μ = atmos(h)\nT,p,ρ,a,μ","category":"page"},{"location":"structures/theory_wingstruct/","page":"-","title":"-","text":"details: 📖 Theory - Normal-plane Stresses\nTogether with the normal-plane coordinate and chord relations, the shear and bending moment are related to the corresponding airplane-axes quantities and to the sweep angle Lambda as follows.beginaligned\ncal S_scriptscriptstyle perp = cal S\nlabelSperp \ncal M_scriptscriptstyle perp = cal M cos Lambda\nlabelMperp\nendalignedThe box is assumed to be the only structurally-significant element, with the slats, flaps, and spoilers (if any), represented only by added weight. It is convenient to define all dimensions as ratios with the local normal-plane chord c_scriptscriptstyle perp.beginaligned\nbarh equiv frach_rm wboxc_scriptscriptstyle perp \nbarw equiv fracw_rm wboxc_scriptscriptstyle perp \nbart_rm capequiv fract_rm capc_scriptscriptstyle perp \nbart_rm webequiv fract_rm webc_scriptscriptstyle perp \nendalignedThe maximum height h_rm wbox at the box center corresponds to the airfoil thickness, so that barh is the usual \"tc\" airfoil thickness ratio. The height is assumed to taper off quadratically to a fraction r_h at the webs, so that the local height h scriptstyle (xi) is beginaligned h scriptstyle (xi) = h_rm wboxleft 1 - (1-r_h) xi^2 right endaligned where xi = -1 ldots 1 runs chordwise over the sparbox extent. Typical metal wings and airfoils have barw simeq 05, r_h simeq 075, although these are left as input parameters. For evaluating areas and approximating the bending inertia, it's useful to define the simple average and r.m.s. average normalized box heights. beginaligned\nbarh_rm avg = frac1c_scriptscriptstyle perp int_0^1 h scriptstyle (xi) rm dxi \n= barh left 1 - frac13(1-r_h) right\n\nbarh_rm rms^2 = frac1c_scriptscriptstyle perp^2 int_0^1 h^2 scriptstyle (xi) rm dxi \n= barh^2 left \n1 - frac23(1-r_h) + frac15 (1-r_h)^2 right\nendalignedThe areas and the bending and torsion inertias, all normalized by the normal chord, can now be determined. beginaligned\nbarA_rm fuelequiv fracA_rm fuelc_scriptscriptstyle perp^2 =\n(barw - 2 bart_rm web)(barh_rm avg- 2 bart_rm cap) \n\nbarA_rm capequiv fracA_rm capc_scriptscriptstyle perp^2 = 2 bart_rm capbarw \n\nbarA_rm webequiv fracA_rm webc_scriptscriptstyle perp^2 = 2 bart_rm web r_h barh \n\nbarI_rm cap simeq fracI_rm capc_scriptscriptstyle perp^4 =\nfracbarw12 \nleft barh_rm rms^3 - (barh_rm rms-2bart_rm cap)^3 right\n\nbarI_rm webequiv fracI_rm webc_scriptscriptstyle perp^4 =\nfracbart_rm web r_h^3 barh^36 ll barI_rm cap\nhspace2em mathrm(typically)\n\nGbarJ equiv \nfrac4 (barw - bart_rm web)^2 (barh_rm avg- bart_rm cap)^2\n displaystyle \n2 frac r_h barh - bart_rm capG_rm webbart_rm web +\n2 frac barw - bart_rm webG_rm capbart_rm cap \nendaligned","category":"page"},{"location":"aero/theory_geometry/","page":"-","title":"-","text":"details: 📖 Theory - Chord distribution\nThe wing or tail surface is assumed to have a two-piece linear planform with constant sweep Lambda, shown in the figure below. The inner and outer surface planforms are defined in terms of the center chord c_o and the inner and outer taper ratios. beginaligned\nlambda_s = c_sc_o\n\nlambda_t = c_tc_o\nendalignedSimilarly, the spanwise dimensions are defined in terms of the span b and the normalized spanwise coordinate eta.beginaligned\neta = 2y b \n\neta_o = b_o b\n\neta_s = b_sb \nendalignedFor generality, the wing center box width b_o is assumed to be different from the fuselage width to allow possibly strongly non-circular fuselage cross-sections. It will also be different for the tail surfaces. A planform break inner span b_s is defined, where possibly also a strut or engine is attached. Setting b_s = b_o and c_s = c_o will recover a single-taper surface.It's convenient to define the piecewise-linear normalized chord functionbeginaligned\nfracc scriptstyle (eta)c_o equiv \nC scriptstyle (eta eta_oeta_s lambda_slambda_t)\n = \nleft\nbeginarraylcl\n 1 0 eta eta_o \n05em\ndisplaystyle\n 1 + (lambda_s-1 ) fraceta - eta_oeta_s-eta_o\n eta_o eta eta_s \n025em\ndisplaystyle\nlambda_s + (lambda_t-lambda_s) fraceta - eta_s1-eta_s\n eta_s eta 1\nendarray\nright\nlabelceta\nendalignedThe following integrals will be useful for area, volume, shear, and moment calculations. beginaligned\nint_0^eta_o C rm deta \n = eta_o\n\nint_eta_o^eta_s C rm deta\n = frac12 ( 1+lambda_s)(eta_s-eta_o)\n\nint_eta_s^1 C rm deta \n = frac12 (lambda_s+lambda_t)(1-eta_s)\n025em\nint_0^eta_o C^2 rm deta \n = eta_o\n\nint_eta_o^eta_s C^2 rm deta\n = frac13 ( 1+lambda_s+lambda_s^2)(eta_s-eta_o)\n\nint_eta_s^1 C^2 rm deta \n = frac13 (lambda_s^2+lambda_s lambda_t+lambda_t^2)(1-eta_s)\n\n\nint_eta_o^eta_s C (eta-eta_o) rm deta\n = frac16 ( 1+2lambda_s)(eta_s-eta_o)^2\n\nint_eta_s^1 C (eta-eta_s) rm deta\n = frac16 (lambda_s+2lambda_t)(1-eta_s)^2\n\nint_eta_o^eta_s C^2 (eta-eta_o) rm deta\n = frac112 ( 1+2lambda_s+3lambda_s^2)(eta_s-eta_o)^2\n\nint_eta_s^1 C^2 (eta-eta_s) rm deta\n = frac112 (lambda_s^2+2lambda_slambda_t+3lambda_t^2)(1-eta_s)^2\nlabelCint2\nendaligned","category":"page"},{"location":"aero/theory_geometry/","page":"-","title":"-","text":"details: 📖 Theory - Surface area and aspect ratio\nThe surface area S is defined as the exposed surface area plus the fuselage carryover area. beginaligned\nS = 2 int_0^b2 c rm dy = c_o b K_c\nlabelSdef\n\nmathrmwhere hspace3em\nK_c = int_0^1 C rm deta = \neta_o + textstyle frac12( 1 +lambda_s)(eta_s-eta_o)\n + textstyle frac12(lambda_s+lambda_t )(1 -eta_s)\nendalignedThe aspect ratio is then defined in the usual way. This will also allow relating the root chord to the span and the taper ratios. beginaligned\nAhspace-05exR = fracb^2S\nlabelARdef\nendalignedIt is also useful to define the wing's mean aerodynamic chord c_rm ma and area-centroid offset scriptstyle Deltax_rm wing from the center axis.beginaligned\nfracc_rm mac_o =\nfrac1c_o frac2S int_0^b2 c^2 rm dy \n= fracK_ccK_c\n\nscriptstyle Deltax_rm wing\n=\nfrac2S int_b_o2^b2 c (y - y_o) tanLambda rm dy \n= fracK_cxK_c b tanLambda\n\nx_rm wing = x_rm wbox+ scriptstyle Deltax_rm wing\n025em\nmathrmwhere hspace1em\nK_cc = int_0^1 C^2 rm deta\nnonumber \n= eta_o\n+ frac13 ( 1 +lambda_s+lambda_s^2)(eta_s-eta_o)\n+ frac13 (lambda_s^2+lambda_s lambda_t+lambda_t^2)(1-eta_s)\nhspace3em\n025em\nK_cx = int_eta_o^1 C (eta-eta_o) rm deta \nnonumber \n=\nfrac112 ( 1 +2lambda_s)(eta_s-eta_o)^2 +\nfrac112 (lambda_s+2lambda_t)(1-eta_s)^2 +\nfrac14 (lambda_s+lambda_t)(1-eta_s)(eta_s-eta_o)\nhspace3em\nendalignedThe wing area centroid is used in the fuselage bending load calculations as described earlier.","category":"page"},{"location":"aero/theory_geometry/#Reference-quantities","page":"-","title":"Reference quantities","text":"","category":"section"},{"location":"aero/theory_geometry/","page":"-","title":"-","text":"The aircraft reference quantities are chosen to be simply the values for the wing. ","category":"page"},{"location":"aero/theory_geometry/","page":"-","title":"-","text":"beginaligned\nb_rm ref = (b)_rm wing\nS_rm ref = (S)_rm wing\nAhspace-05exR_rm ref = (Ahspace-05exR)_rm wing\nc_rm ref = (c_rm ma)_rm wing\nendaligned","category":"page"},{"location":"misc/misc/#Other-utilities","page":"Other utilities","title":"Other utilities","text":"","category":"section"},{"location":"misc/misc/#General-outputs","page":"Other utilities","title":"General outputs","text":"","category":"section"},{"location":"misc/misc/","page":"Other utilities","title":"Other utilities","text":"Modules = [Main]\nPages = [\"outputs.jl\",]","category":"page"},{"location":"misc/misc/#Outputs-for-post-processing","page":"Other utilities","title":"Outputs for post-processing","text":"","category":"section"},{"location":"misc/misc/","page":"Other utilities","title":"Other utilities","text":"The following tools can be used to generate outputs that can be further post-processed with other code.","category":"page"},{"location":"misc/misc/","page":"Other utilities","title":"Other utilities","text":"Modules = [Main]\nPages = [\"AircraftDeck.jl\", \"odperformance.jl\"]","category":"page"},{"location":"sizing/sizing/#Design-and-evaluation","page":"Design and evaluation","title":"Design and evaluation","text":"","category":"section"},{"location":"sizing/sizing/#sizing","page":"Design and evaluation","title":"Sizing the aircraft","text":"","category":"section"},{"location":"sizing/sizing/","page":"Design and evaluation","title":"Design and evaluation","text":"The aircraft is sized via a fixed point iteration for the design mission (wsize). The performance of the design can be evaluated for an off-design mission (woper).","category":"page"},{"location":"sizing/sizing/","page":"Design and evaluation","title":"Design and evaluation","text":"wsize is typically the driving script in an analysis, as is the case in the size_aircraft! call (as demonstrated in the first example). The sizing analysis calls the various performance routines (e.g., fusebl, surfw, cdsum, mission, etc.) as shown in the TASOPT flowchart.","category":"page"},{"location":"sizing/sizing/","page":"Design and evaluation","title":"Design and evaluation","text":"TASOPT.wsize(pari, parg, parm, para, pare,\n itermax, wrlx1, wrlx2, wrlx3,\n initwgt, initeng, iairf, Ldebug, printiter, saveODperf)\n\nTASOPT.woper(pari, parg, parm, para, pare, \n parad, pared, itermax, initeng, NPSS_PT, NPSS)","category":"page"},{"location":"sizing/sizing/#TASOPT.wsize-NTuple{15, Any}","page":"Design and evaluation","title":"TASOPT.wsize","text":"wsize(pari, parg, parm, para, pare,\n itermax, wrlx1, wrlx2, wrlx3,\n initwgt, initeng, iairf, Ldebug, printiter, saveODperf)\n\nMain weight sizing function. Calls on various sub-functions to calculate weight of fuselage, wings, tails, etc., and iterates until the MTOW converges to within a specified tolerance.\n\ndetails: 🔃 Inputs and Outputs\nInputs:Array of flags that control design choices - fuel types, where to store fuel, etc.\nGeometric and structural parameters - dimensions primarily\nAerodynamic parameters - CL, CD, KE dissipation, etc.\nMission-specific parameters - alt, mach, P, T etc.\nEngine-specific parameters Outputs:No explicit outputs. Computed quantities are saved to par arrays of aircraft model.\n\n\n\n\n\n","category":"method"},{"location":"sizing/sizing/#TASOPT.woper-NTuple{11, Any}","page":"Design and evaluation","title":"TASOPT.woper","text":"woper(pari, parg, parm, para, pare, \n parad, pared, itermax, initeng, NPSS_PT, NPSS)\n\nwoper runs the aircraft through input off-design missions\n\ncompat: Future Changes\nIn an upcoming revision, an aircraft struct and auxiliary indices will be passed in lieu of pre-sliced par arrays.\n\n\n\n\n\n","category":"method"},{"location":"sizing/sizing/","page":"Design and evaluation","title":"Design and evaluation","text":"","category":"page"},{"location":"sizing/sizing/#missionexec","page":"Design and evaluation","title":"Mission evaluation","text":"","category":"section"},{"location":"sizing/sizing/","page":"Design and evaluation","title":"Design and evaluation","text":"A sized aircraft's mission performance can be obtained (mission!), along with operation constraints via a pitch trim calculation (balance) and balanced field length calculation (takeoff!).","category":"page"},{"location":"sizing/sizing/","page":"Design and evaluation","title":"Design and evaluation","text":"TASOPT.mission!(pari, parg, parm, para, pare, Ldebug)\n\nTASOPT.takeoff!(pari, parg, parm, para, pare,\n initeng,\n ichoke5, ichoke7)\n\nTASOPT.balance(pari, parg, para, rfuel, rpay, ξpay, itrim)\n","category":"page"},{"location":"sizing/sizing/#TASOPT.mission!-NTuple{6, Any}","page":"Design and evaluation","title":"TASOPT.mission!","text":"mission!(pari, parg, parm, para, pare, Ldebug)\n\nRuns aircraft through mission, calculating fuel burn and other mission variables.\n\nInput: pari[.] integer flags parg[.] geometry parameters parm[.] mission parameters iairf index of airfoil database to use initeng 0 = engine state will be initialized for all points 1 = engine state is assumed to be initialized ipc1 0 = ipcruise1 aero and engine point needs to be calculated 1 = ipcruise1 aero and engine point assumed calculated\n\nInput/Output: para[.p] aero parameters for points p=1..iptotal pare[.p] engine parameters for points p=1..iptotal\n\nNOTE: This routine assumes that estimates of the climb-leg flight path gamma angles are passed in via para[iagamV,ipclimb1:ipclimbn]. These appear as cos(gamma) factors in the climb equations, and can be passed in as zero with only a minor error. They are updated and returned in the same para[iagamV,ip] array.\n\n!!! compat \"Future Changes\" In an upcoming revision, an aircraft struct and auxiliary indices will be passed in lieu of pre-sliced par arrays.\n\n\n\n\n\n","category":"method"},{"location":"sizing/sizing/#TASOPT.takeoff!-NTuple{8, Any}","page":"Design and evaluation","title":"TASOPT.takeoff!","text":" takeoff(pari, parg, parm, para, pare,\n initeng, ichoke5, ichoke7)\n\n Calculates takeoff parameters and balanced field length.\n The aircraft must be defined in parg array. The ipstatic and iprotate points are assumed to exist.\n\n !!! compat \"Future Changes\"\n In an upcoming revision, an `aircraft` struct and auxiliary indices will be passed in lieu of pre-sliced `par` arrays.\n\n\n\n\n\n","category":"method"},{"location":"sizing/sizing/#TASOPT.balance-NTuple{7, Any}","page":"Design and evaluation","title":"TASOPT.balance","text":" balance(pari, parg, para, rfuel, rpay, ξpay, itrim)\n\nMakes one of three (or none) changes to achieve pitch trim calculates resulting CG, CP, NP locations.\n\nInputs:\n\npari[.] integer flag array\nparg[.] geometry parameter array\npara[.] aero parameter array\nrfuel fuel fraction Wfuelactual/WfuelMTOW\nrpay payload fraction Wpayactual/WpayMTOW\nξpay partial-payload packing location\n= 0.0 all the way in front of cabin\n= 0.5 all the way in middle of cabin\n= 1.0 all the way in back of cabin\niengloc engine location index\nitrim = 0 no changes\n= 1 adjust CLh (horizontal tail cl)\n= 2 adjust Sh (horizontal tail area)\n= 3 adjust xwbox (wing box location)\n\nOutputs: \n\npara[iaxCG] center of gravity\npara[iaxCP] center of pressure ( = xCG if itrim=1,2,3 )\npara[iaxNP] neutral point location\n\ncompat: Future Changes\nIn an upcoming revision, an aircraft struct and auxiliary indices will be passed in lieu of pre-sliced par arrays.\n\n\n\n\n\n","category":"method"},{"location":"balance/balance/#Stability-and-balance","page":"Stability","title":"Stability and balance","text":"","category":"section"},{"location":"balance/balance/","page":"Stability","title":"Stability","text":"TASOPT.balance\nTASOPT.cglpay\nTASOPT.htsize","category":"page"},{"location":"balance/balance/#TASOPT.balance","page":"Stability","title":"TASOPT.balance","text":" balance(pari, parg, para, rfuel, rpay, ξpay, itrim)\n\nMakes one of three (or none) changes to achieve pitch trim calculates resulting CG, CP, NP locations.\n\nInputs:\n\npari[.] integer flag array\nparg[.] geometry parameter array\npara[.] aero parameter array\nrfuel fuel fraction Wfuelactual/WfuelMTOW\nrpay payload fraction Wpayactual/WpayMTOW\nξpay partial-payload packing location\n= 0.0 all the way in front of cabin\n= 0.5 all the way in middle of cabin\n= 1.0 all the way in back of cabin\niengloc engine location index\nitrim = 0 no changes\n= 1 adjust CLh (horizontal tail cl)\n= 2 adjust Sh (horizontal tail area)\n= 3 adjust xwbox (wing box location)\n\nOutputs: \n\npara[iaxCG] center of gravity\npara[iaxCP] center of pressure ( = xCG if itrim=1,2,3 )\npara[iaxNP] neutral point location\n\ncompat: Future Changes\nIn an upcoming revision, an aircraft struct and auxiliary indices will be passed in lieu of pre-sliced par arrays.\n\n\n\n\n\n","category":"function"},{"location":"balance/balance/#TASOPT.cglpay","page":"Stability","title":"TASOPT.cglpay","text":"Calculates min and max xCG locations from payload extremes, and corresponding payload fractions.\n\nrfuelF,rpayF give most-forward location xcgF rfuelB,rpayB give most-rearward location xcgB\n\nThis version always returns rfuelF = rfuelB = 0.0 which gives an explicit solution for rpayF,rpayB.\n\nThe alternative 2D search for rfuel,rpay is kinda ugly, and unwarranted in practice.\n\n\n\n\n\n","category":"function"},{"location":"balance/balance/#TASOPT.htsize","page":"Stability","title":"TASOPT.htsize","text":"Sets horizontal tail area and wing position to simultaneously:\n\nMeet pitch trim requirement with forward CG\nMeet stability requirement with aft CG\n\nCalculates resulting CG, CP, NP locations\n\nInputs: \n\npari[.] integer fla array\nparg[.] geometry parameter array\nparaF[.] aero parameter array for fwdCG case\nparaB[.] aero parameter array for aft CG case\nparaC[.] aero parameter array for cruise tail CL case\n\nOutputs: \n\nparg[igSh] HT area\nparg[igxwbox] wingbox location\nparg[igxwing] wing centroid location\n\n\n\n\n\n","category":"function"},{"location":"aero/theory_trefftz_plane/","page":"-","title":"-","text":"details: 📖 Theory - induced drag $C_{d,i}$\nThe induced drag is calculated using a discrete vortex Trefftz-Plane analysis. The circulation of the wing wake immediately behind the trailing edge is beginaligned\nGamma_rm wing scriptstyle (eta)\n = fractildep scriptstyle (eta)rho_scriptscriptstyle inftyV_scriptscriptstyle infty\n simeq fracp scriptstyle (eta)rho_scriptscriptstyle inftyV_scriptscriptstyle infty sqrt1 - eta^k_t\n\nk_t simeq 16\nendalignedwhere the approximation realistically represents the tip lift rolloff for typical taper ratios, and is consistent with the assumed f_L_scriptstyle tsimeq -005 value for the tip lift loss factor. This circulation is convected into the wake along streamlines which will typically constrict behind the fuselage by continuity. The Figure above shows two possible aft fuselage taper shapes, giving two different wake constrictions.An annular streamtube at the wing contracts to another annular streamtube in the wake with the same cross-sectional area. The y and y locations on the wing and wake which are connected by a streamline are therefore related by the correspondence function. beginaligned\nyscriptstyle (y) = sqrt y^2 - y_o^2 + y_o^2\nendalignedThe Trefftz Plane circulation Gamma scriptstyle (y) is then given by the coordinate shift. The mapping function yscriptstyle (y) is not defined for y y_o, so the circulation there is simply set from the y_o value. beginaligned\nGamma_rm wake scriptstyle (y) = \nleft\nbeginarraylcl\nGamma_rm wing left( y scriptstyle (y)right)\n y y_o \nGamma_rm wing left( y_o right)\nendarray\nright\nendalignedThe Trefftz Plane analysis uses point vortices. The circulation ([Gamwake]) is evaluated at the midpoints of n intervals along the wake trace, spaced more or less evenly in the Glauert angle to give a cosine distribution in physical space. The wake's vertical z positions are simply taken directly from the wing. beginaligned\ntheta_i+12 = fracpi2 fraci-12n\nhspace2ex hspace2ex i = 1 ldots n\n\ny_i+12 = fracb2 cos theta_i+12\n\ny_i+12 = sqrty_i+12^2 - y_o^2 + y_o^2\n\nz_i+12 = z_i+12\n\nGamma_i+12 = Gamma_rm wing (y_i+12)\nendalignedThe locations of n+1 trailing vortices are computed similarly. beginaligned\ntheta_i = fracpi2 fraci-1n\nhspace2ex hspace2ex i = 1 ldots n+1\n\ny_i = fracb2 cos theta_i\n\ny_i = sqrty_i^2 - y_o^2 + y_o^2\n\nz_i = z_i\nendalignedThe circulations of these trailing vortices are the differences of the adjacent bound circulations, with the circulation beyond the tips effectively zero. beginaligned\nbarGamma_i = \nleft\nbeginarraylcl\nhspace65ex\n-Gamma_i-12 i = 1 hspace35em mathrm(left tip)\n\nGamma_i+12-Gamma_i-12 i = 2 ldots n\n\nGamma_i+12 i = n+1 hspace2em mathrm(right tip)\nendarray\nright\nendalignedThe above definitions are also applied to the horizontal tail, with its discrete points simply appended to the list and n increased accordingly.The Trefftz plane calculation proceeds by first calculating the y-z wake velocity components at the y_i+12z_i+12 interval midpoints, induced by all the trailing vortices and their left-side images. beginaligned\nv_i+12 = sum_j=1^n+1 fracbarGamma_j2pi \nleft\nfrac-(z_i+12-z_j)\n (y_i+12-y_j)^2\n + (z_i+12-z_j)^2\n-\nfrac-(z_i+12-z_j)\n (y_i+12+y_j)^2\n + (z_i+12-z_j)^2\nright\nhspace2em\n\nw_i+12 = sum_j=1^n+1 fracbarGamma_j2pi\nleft\nfrac y_i+12-y_j\n (y_i+12-y_j)^2\n + (z_i+12-z_j)^2\n-\nfrac y_i+12+y_j\n (y_i+12+y_j)^2\n + (z_i+12-z_j)^2\nright\nendalignedThe overall lift and induced drag are then computed using the Trefftz Plane vertical impulse and kinetic energy. The sums are doubled to account for the left side image. beginaligned\nC_L_scriptscriptstyle TP = frac2textstyle frac12rho_scriptscriptstyle inftyV_scriptscriptstyle infty^2 S sum_i=1^n \n rho_scriptscriptstyle inftyV_scriptscriptstyle infty Gamma_i+12 (y_i+1-y_i)\n\nC_D_scriptscriptstyle TP = frac2textstyle frac12rho_scriptscriptstyle inftyV_scriptscriptstyle infty^2 S sum_i=1^n \n-fracrho_scriptscriptstyle infty2 Gamma_i+12 left\n w_i+12 (y_i+1-y_i)\n -v_i+12 (z_i+1-z_i) right\nendalignedTo minimize any modeling and numerical errors incurred in the wake contraction model and the point-vortex summations, the final induced drag value is scaled by the square of the surface-integral and Trefftz-Plane drag values. beginaligned\nC_D_i = C_D_scriptscriptstyle TP left(fracC_LC_L_scriptscriptstyle TP right)^2\nendalignedThis is equivalent to using the Trefftz Plane analysis to calculate the span efficiency rather than the actual induced drag coefficient.","category":"page"},{"location":"structures/wing/#wingtail","page":"Wings and tails","title":"Wings and tails","text":"","category":"section"},{"location":"structures/wing/","page":"Wings and tails","title":"Wings and tails","text":"The structural loads of the surfaces balance the net loads and moments resulting from weight and aerodynamics (tildep) as summarized in the Figure below. The distributions are also modified by point loads (i.e., engines and an optional strut).","category":"page"},{"location":"structures/wing/","page":"Wings and tails","title":"Wings and tails","text":"(Image: )","category":"page"},{"location":"structures/wing/","page":"Wings and tails","title":"Wings and tails","text":"The wing and tail surface stress and weight analyses are performed in the cross-sectional plane, normal to the spanwise axis y_scriptscriptstyle perp running along the wing box. The assumed wing or tail airfoil and structural box cross-section is shown in the figure below. Note that leading edges, fairings, slats, flaps, and spoilers contribute to weight but not to the primary structure.","category":"page"},{"location":"structures/wing/","page":"Wings and tails","title":"Wings and tails","text":"(Image: )","category":"page"},{"location":"structures/wing/","page":"Wings and tails","title":"Wings and tails","text":"using Markdown\nMarkdown.parse_file(joinpath(\"../..\", \"src/structures\",\"theory_wingstruct.md\"))","category":"page"},{"location":"structures/wing/","page":"Wings and tails","title":"Wings and tails","text":"\nstructures.surfw(po,b,bs,bo,co,zs,\n\tlambdat,lambdas,gammat,gammas,\n\tNload,iwplan,We,neout, dyeout, neinn, dyeinn,\n\tWinn,Wout,dyWinn,dyWout,\n\tsweep,wbox,hboxo,hboxs,rh, fLt,\n\ttauweb,sigcap,sigstrut,Ecap,Eweb,Gcap,Gweb,\n\trhoweb,rhocap,rhostrut,rhofuel)\n\nstructures.tailpo(S, AR, λa, qne, CLmax)\n\nstructures.surfdx(b, bs, bo, λt, λs, sweep)","category":"page"},{"location":"structures/wing/#TASOPT.structures.surfw-NTuple{38, Any}","page":"Wings and tails","title":"TASOPT.structures.surfw","text":"surfw(po, b, bs, bo, co, zs,\n lambdat, lambdas, gammat, gammas,\n Nload, iwplan, We, neout, dyeout, neinn, dyeinn,\n Winn, Wout, dyWinn, dyWout,\n sweep, wbox, hboxo, hboxs, rh, fLt,\n tauweb, sigcap, sigstrut, Ecap, Eweb, Gcap, Gweb,\n rhoweb, rhocap, rhostrut, rhofuel)\n\nCalculates Wing or Tail loads, stresses, weights of individual wing sections. Also returns the material gauges, torsional and bending stiffness.\n\ndetails: 🔃 Inputs and Outputs\nInputs:po::Float64: Point where loads and stresses are calculated.\nb::Float64: Wingspan.\nbs::Float64: Spanwise location of the start of the taper.\nbo::Float64: Spanwise location of the root chord.\nco::Float64: Root chord length.\nzs::Float64: Height of the strut attach point above wing.\nlambdat::Float64: Tip chord ratio (tip chord / root chord).\nlambdas::Float64: Start chord ratio (start chord / root chord).\ngammat::Float64: Tip airfoil section shape exponent.\ngammas::Float64: Start airfoil section shape exponent.\nNload::Int: Number of loads (used to distribute engine loads).\niwplan::Int: Indicates the presence of a strut.\nWe::Float64: Weight of the engine.\nneout::Int: Number of outboard engines.\ndyeout::Float64: Distance between engines and the wingtip.\nneinn::Int: Number of inboard engines.\ndyeinn::Float64: Distance between engines and the wing root.\nWinn::Float64: Weight of inboard engines.\nWout::Float64: Weight of outboard engines.\ndyWinn::Float64: Weight distribution of inboard engines.\ndyWout::Float64: Weight distribution of outboard engines.\nsweep::Float64: Sweep angle in degrees.\nwbox::Float64: Width of the wing box.\nhboxo::Float64: Height of the wing box at the root.\nhboxs::Float64: Height of the wing box at the strut attach point.\nrh::Float64: Fractional height of the wing box.\nfLt::Float64: Factor applied to the tip load.\ntauweb::Float64: Web material shear strength.\nsigcap::Float64: Cap material axial compressive strength.\nsigstrut::Float64: Strut material axial compressive strength.\nEcap::Float64: Cap material Young's modulus.\nEweb::Float64: Web material Young's modulus.\nGcap::Float64: Cap material shear modulus.\nGweb::Float64: Web material shear modulus.\nrhoweb::Float64: Density of the web material.\nrhocap::Float64: Density of the cap material.\nrhostrut::Float64: Density of the strut material.\nrhofuel::Float64: Density of the fuel.Outputs:Ss::Float64: Outboard section shear load.\nMs::Float64: Outboard section moment.\ntbwebs::Float64: Web thickness at the strut attach point.\ntbcaps::Float64: Cap thickness at the strut attach point.\nEIcs::Float64: Combined cap and web bending stiffness at the strut attach point.\nEIns::Float64: Combined cap and web normal stiffness at the strut attach point.\nGJs::Float64: Combined cap and web shear stiffness at the strut attach point.\nSo::Float64: Inboard section shear load.\nMo::Float64: Inboard section moment.\ntbwebo::Float64: Web thickness at the wing root.\ntbcapo::Float64: Cap thickness at the wing root.\nEIco::Float64: Combined cap and web bending stiffness at the wing root.\nEIno::Float64: Combined cap and web normal stiffness at the wing root.\nGJo::Float64: Combined cap and web shear stiffness at the wing root.\nAstrut::Float64: Strut axial force.\nlsp::Float64: Strut length.\ncosLs::Float64: Cosine of the sweep angle at the strut attach point.\nWscen::Float64: Weight of center section (inboard of the strut).\nWsinn::Float64: Weight of the inner section.\nWsout::Float64: Weight of the outer section.\ndxWsinn::Float64: Lateral distribution of inner section weight.\ndxWsout::Float64: Lateral distribution of outer section weight.\ndyWsinn::Float64: Vertical distribution of inner section weight.\ndyWsout::Float64: Vertical distribution of outer section weight.\nWfcen::Float64: Weight of center section fuel.\nWfinn::Float64: Weight of the inner section fuel.\nWfout::Float64: Weight of the outer section fuel.\ndxWfinn::Float64: Lateral distribution of inner section fuel weight.\ndxWfout::Float64: Lateral distribution of outer section fuel weight.\ndyWfinn::Float64: Vertical distribution of inner section fuel weight.\ndyWfout::Float64: Vertical distribution of outer section fuel weight.\nWweb::Float64: Weight of the wing web.\nWcap::Float64: Weight of the wing cap.\nWstrut::Float64: Weight of the strut.\ndxWweb::Float64: Lateral distribution of web weight.\ndxWcap::Float64: Lateral distribution of cap weight.\ndxWstrut::Float64: Lateral distribution of strut weight.\n\nSee Geometry, Wing/Tail Structures, and Section 2.7 of the TASOPT Technical Description. \n\n\n\n\n\n","category":"method"},{"location":"structures/wing/#TASOPT.structures.tailpo-NTuple{5, Any}","page":"Wings and tails","title":"TASOPT.structures.tailpo","text":"tailpo(S, AR, λa, qne, CLmax)\n\nCalculates stabilizer span, root chord, and root loading based on the never-exceed dynamic pressure, maximum CL, sweep, and aspect ratio.\n\ndetails: 🔃 Inputs and Outputs\nInputs:S::Float64: Stabilizer area.\nAR::Float64: Stabilizer aspect ratio.\nλa::Float64: Stabilizer taper ratio (tip chord / root chord).\nqne::Float64: Never-exceed dynamic pressure.\nCLmax::Float64: Maximum coefficient of lift.Outputs:b::Float64: Stabilizer wingspan.\nco::Float64: Stabilizer root chord length.\npo::Float64: Stabilizer root loading.\n\nSee Geometry or Section 2.3.2 and 2.9.6 of the TASOPT Technical Description.\n\n\n\n\n\n","category":"method"},{"location":"structures/wing/#TASOPT.structures.surfdx-NTuple{6, Any}","page":"Wings and tails","title":"TASOPT.structures.surfdx","text":" surfdx(b, bs, bo, λt, λs, sweep)\n\nCalculates area centroid x-offset due to sweep and the mean aerodynamic chord (normalized by root chord, co)\n\ndetails: 🔃 Inputs and Outputs\nInputs:b::Float64: Wingspan\nbs::Float64: Spanwise location of the start of the taper\nbo::Float64: Spanwise location of the root chord\nλt::Float64: Tip chord ratio (tip chord / root chord)\nλs::Float64: Start chord ratio (start chord / root chord).\nsweep::Float64: Sweep angle in degrees.Outputs:dx::Float64: Area centroid x-offset due to sweep\nmacco::Float64: Mean aerodynamic chord normalized by root chord.\n\nSee Geometry or Section 2.5.1 of the TASOPT Technical Description.\n\n\n\n\n\n","category":"method"},{"location":"examples/payload_range/#Example-for-a-Payload-Range-diagram","page":"Payload-range diagram","title":"Example for a Payload-Range diagram","text":"","category":"section"},{"location":"examples/payload_range/","page":"Payload-range diagram","title":"Payload-range diagram","text":"(Image: PayloadRangePlot)","category":"page"},{"location":"examples/payload_range/#Choosing-a-design-mission","page":"Payload-range diagram","title":"Choosing a design mission","text":"","category":"section"},{"location":"examples/payload_range/","page":"Payload-range diagram","title":"Payload-range diagram","text":"To plot a payload-range diagram with a fleet of missions you must first load any aircraft model ","category":"page"},{"location":"examples/payload_range/","page":"Payload-range diagram","title":"Payload-range diagram","text":"Start by choosing a design mission. Your design mission should be what you want the second corner point in your Payload Range plot to be. Once you have a chosen a specific design range and payload weight (For eg: 3500 nmi and 195 pax) you can add it to the input toml file for eg: default_input.toml","category":"page"},{"location":"examples/payload_range/","page":"Payload-range diagram","title":"Payload-range diagram","text":"[Mission]\n N_missions = 5 # Number of missions to be modeled (first mission is the design mission)\n pax = 195 # Number of passengers in each mission\n range = \"3500.0 nmi\" # Design Range + second mission range\n #[\"3000.0 nmi\", \"500.0 nmi\", \"2500.0 nmi\", \"3550.0 nmi\", \"3734.0 nmi\"] # Design Range + second mission range\n weight_per_pax = \"215.0 lbf\" # Specify weight per passenger - \n # includes luggage [lbm or lbf or kg or N] ","category":"page"},{"location":"examples/payload_range/#Julia-script-for-Payload-Range-Diagram","page":"Payload-range diagram","title":"Julia script for Payload Range Diagram","text":"","category":"section"},{"location":"examples/payload_range/","page":"Payload-range diagram","title":"Payload-range diagram","text":"Start the script importing TASOPT.jl, PyPlot and index.inc and then loading the default aircraft model.","category":"page"},{"location":"examples/payload_range/","page":"Payload-range diagram","title":"Payload-range diagram","text":"# Import modules\nusing PyPlot\nusing TASOPT\n# you can optionally define\n# const tas = TASOPT \n# to use as a shorthand\ninclude(joinpath(TASOPT.__TASOPTroot__, \"./src/misc/index.inc\"))\n# import indices for calling parameters\n\n# Load aircraft using default module\nac = TASOPT.read_aircraft_model(joinpath(TASOPT.__TASOPTroot__, \"../example/PRD_input.toml\"))\ntime_wsize = @elapsed size_aircraft!(ac)","category":"page"},{"location":"examples/payload_range/","page":"Payload-range diagram","title":"Payload-range diagram","text":"One way is to call the PayloadRange function:","category":"page"},{"location":"examples/payload_range/","page":"Payload-range diagram","title":"Payload-range diagram","text":"TASOPT.PayloadRange(ac)","category":"page"},{"location":"examples/payload_range/","page":"Payload-range diagram","title":"Payload-range diagram","text":"If you want a more customizable diagram, first initialize some variables for mission range and payloads","category":"page"},{"location":"examples/payload_range/","page":"Payload-range diagram","title":"Payload-range diagram","text":"# Copy aircraft structure as we will be changing range and payloads\nac = deepcopy(ac_og)\n# Make an array of ranges to plot\nRangeArray = ac.parm[imRange] * LinRange(0.1,1.2,Rpts)\n# Store constant values to compare later\nWmax = ac.parg[igWMTO]\nFuelmax = ac.parg[igWfmax]\nWempty = ac.parg[igWMTO] - ac.parg[igWfuel] - ac.parg[igWpay]\n# Arrays for plotting\nRangesToPlot = []\nPayloadToPlot = []\nmaxPay = ac.parm[imWpay ]","category":"page"},{"location":"examples/payload_range/#Main-iteration-loop","page":"Payload-range diagram","title":"Main iteration loop","text":"","category":"section"},{"location":"examples/payload_range/","page":"Payload-range diagram","title":"Payload-range diagram","text":"for Range = RangeArray\n # Make an array of payloads to plot\n Payloads = (maxPay) * LinRange(1, 0.1, Ppts)\n ac.parm[imRange] = Range\n for mWpay = Payloads\n println(\"Checking for Range (nmi): \",Range/1852.0, \" and Pax = \", mWpay/(215*4.44822))\n ac.parm[imWpay ] = mWpay\n # Try woper after setting new range and payload\n try\n @views TASOPT.woper(ac.pari,ac.parg,ac.parm[:,1:1],ac.para[:,:,1:1],ac.pare[:,:,1:1], ac.para[:,:,1:1],ac.pare[:,:,1:1], itermax,0.0)\n # woper success: store maxPay, break loop\n WTO = Wempty + mWpay + ac.parm[imWfuel]\n mWfuel = ac.parm[imWfuel]\n\n # Compare with previously stored constants\n if WTO > Wmax || mWfuel > Fuelmax || WTO < 0.0 || mWfuel < 0.0 \n WTO = 0.0\n mWfuel = 0.0\n println(\"Max out error!\")\n else\n maxPay = mWpay\n println(\"Converged - moving to next range...\")\n break\n end \n catch\n println(\"Not Converged - moving to lower payload...\") \n end\n end\n append!(RangesToPlot, Range)\n if OEW\n append!(PayloadToPlot, maxPay+Wempty)\n else\n append!(PayloadToPlot, maxPay)\n end\nend","category":"page"},{"location":"examples/payload_range/#Plot-Payload-Range-diagram","page":"Payload-range diagram","title":"Plot Payload Range diagram","text":"","category":"section"},{"location":"examples/payload_range/","page":"Payload-range diagram","title":"Payload-range diagram","text":"using PyPlot\nfig, ax = plt.subplots(figsize=(8,5), dpi = 300)\nax.plot(RangesToPlot ./ (1000*1852.0), PayloadToPlot./ (9.8*1000), linestyle=\"-\", color=\"b\", label=\"Payload \")\nax.set_xlabel(\"Range (1000 nmi)\")\nax.set_ylabel(\"Weight (1000 kg)\")\nax.legend()\nax.set_title(\"Payload Range Plot\")\nax.grid()\n\nfig.savefig(\"./PayloadRangeExample.png\")","category":"page"},{"location":"propulsion/hxfun/#Heat-exchangers","page":"Heat exchangers","title":"Heat exchangers","text":"","category":"section"},{"location":"propulsion/hxfun/#Theory","page":"Heat exchangers","title":"Theory","text":"","category":"section"},{"location":"propulsion/hxfun/","page":"Heat exchangers","title":"Heat exchangers","text":"details: 📖 Theory - Tubular heat exchangers\nEffectiveness–NTU methodThere are many different heat exchanger (HX) topologies. The HX currently implemented in TASOPT consists of staggered tubes in a cross flow; this geometry was selected because it is simple to integrate into the space between two concentric cylinders. The HX is designed using the effectiveness–NTU method, described below [1]. Consider a heat exchanger in which a coolant gas is used to cool or heat gas. The minimum and maximum heat capacity rates are defined asC_mathrmmin = mathrmmin (dotm_c c_pc dotm_p c_pp)C_mathrmmax = mathrmmax (dotm_c c_pc dotm_p c_pp)where dotm is the mass flow rate, c_p is the specific heat at constant pressure, and the subscripts p and c refer to the process-side and coolant streams. The capacity ratio is C_r = fracC_mathrmminC_mathrmmax. A maximum heat transfer rate is defined asdotQ_max = C_mathrmmin (T_ip - T_ic)where T is the absolute temperature. A measure of the HX performance is the effectiveness, varepsilon, defined asvarepsilon = fracdotQdotQ_maxwhere dotQ is the actual heat transfer rate. The effectiveness can range between 0 and 1. A related quantity known as the number of transfer units (NTU) is defined asmathrmNTU = frac1C_mathrmmin R_owhere R_o is the overall thermal resistance. For any heat exchanger geometry, it can be shown that the effectiveness is a function of the NTU and the ratio fracC_mathrmminC_mathrmmax. In the case of a cross flow heat exchanger, this functional relationship between varepsilon and NTU depends on whether there is internal mixing within the stream and on which stream has the minimum capacity rate. In a HX within a jet engine, it is reasonable to assume that the coolant stream has the minimum capacity rate as the fuel-air ratio is small. For tubular HX, the process stream is mixed but the coolant stream is unmixed as the tubes are independent. In this case, the relationship between varepsilon and NTU is[1]varepsilon = frac1C_r 1 - exp(-C_r (1 - exp(-mathrmNTU)))or converselymathrmNTU = -lnleft(1 + fracln(1 - C_rvarepsilon)C_rright)On the other hand, if the coolant stream has the maximum heat capacity rate, the effectiveness is given byvarepsilon = 1 - expleft-frac1C_r (1 - exp(-C_r mathrmNTU))rightand the corresponding NTU ismathrmNTU = -frac1C_r lnleft 1 + C_r ln(1 - varepsilon)rightA notable property of these expressions is that there is a maximum effectiveness varepsilon_mathrmmax 1 as the NTU tends to infinity. In the code, there is a check to see if the desired effectiveness exceeds the maximum possible one, in which case there is no solution. The effectiveness is limited to 95% of varepsilon_mathrmmax to prevent a very large NTU.Once the effectiveness is known, the outlet specific enthalpies can be computed usingh_op = h_ip - fracdotQdotm_ph_oc = h_ic + fracdotQdotm_cwhere h represents the specific enthalpy, and the outlet temperatures can be determined from these.RecirculationIf the coolant is originally in liquid form, it needs to undergo a phase change at some point in the heat exchanger. For cryogenic liquids, such as hydrogen or methane, it is unadvisable to expose air to these cryogenic temperatures as it can result in freezing or liquefaction of some species in air. A possible approach to overcome this is to introduce recirculation in the heat exchanger: this increases the coolant mass flow rate and allows for a higher coolant temperature while still having the same heat transfer. The way recirculation is currently modeled in TASOPT is via a virtual \"mixing chamber\", where the hot recirculating mass flow that comes of of the HX is mixed with the colder coolant (which may be liquid in general) and heats it up to a desired HX inlet temperature,T_ic. Neglecting the kinetic energy in the fluids, conservation of energy requires thatdotm_cinfty (h_cinfty-h_lat) + dotm_r h_oc = (dotm_cinfty+dotm_r)h_icwhere dotm_r is the recirculating mass flow rate and dotm_cinfty is the coolant mass flow rate before mixing with recirculation and, by mass conservation, the mass flow rate that leaves the system. The term h_lat represents a latent heat and may account for vaporization or, in the case of hydrogen, the ortho- to parahydrogen conversion. The specific enthalpies into and out of the HX are related by h_oc = h_ic + fracdotQdotm_cinfty+dotm_rAs the heat transfer rate is given by dotQ = varepsilon C_mathrmmin (T_ip - T_ic), we can distinguish two cases depending on whether the coolant has the minimum or maximum heat capacity rate. If C_mathrmmin=(dotm_cinfty+dotm_r) c_pic,dotm_r = dotm_cinfty frach_ic - h_cinfty + h_latvarepsilon c_pic(T_ip - T_ic)and if C_mathrmmax=(dotm_cinfty+dotm_r) c_pic,dotm_r = dotm_cinftyfracA1-Awhere A = dotm_cinftyfrach_ic -h_cinfty + h_latvarepsilon C_h (T_ip - T_ic)A failure case exists if Ageq 1: in this case, the hot stream does not have enough heat capacity to provide the heat needed to get the coolant to the desired T_ic.Heat exchanger geometry(Image: HXfig)Two HX cross-sections are currently supported: rectangular and concentric cylinders (e.g., for a jet engine core). If the geometry is rectangular, the length of the tubes dictates the width of the rectangle, but if it is concentric, the tubes could have any length greater or equal to the distance between the cylinders as involute tubes could be used. The heat exchanger is assumed to have N_mathrmstages different serial stages, with each stage containing N_mathrmpasses tube rows, each corresponding to a coolant pass. For example, the HX in the figure above with 2 stages and 3 coolant passes has a total of N_L=N_mathrmstagesN_mathrmpasses=6 tube rows. The number of tubes at every row is N_t; this parameter can be calculated from the mass flow rate through the cold side or from the geometry of the stageN_t = frac4 dotm_crho_ciV_ci pi D_ti^2 N_mathrmstages = fracbfracx_tD D_towhere b is length across which the tubes are distributed. If the cross-section is concentric, b=pi D_ci with D_ci being the inner cylinder diameter; if it is rectangular, b = fracA_csl. In this expressions, A_cs=fracdotm_prho_piV_pi is the freestream cross-sectional area. Since the tube inner diameter can be expressed as D_ti = D_to - 2t, this equation can be solved for the tube outer diameterD_to = frac4 K t + sqrt8 K t + 1 + 12 Kwith K = fracpi b N_mathrmstages rho_ciV_ci4 fracx_tD dotm_c.The total length of the HX is simply L = N_L fracx_lD D_to.Some calculations rely on knowing the tangential pitch between tubes. This pitch may vary in the radial direction as the circumference changes but the tube diameter remains unchaged. In addition to this, the tubes are generally involute, which makes calculating this pitch even more challenging. In the code, a mean tangential pitch x_tm is used to compute parameters such as the pressure drop and the Nusselt number. This mean pitch is calculated asx_tm = fracA_csN_t lwhere l is the length of each involute tube. The mass flow rate per unit area at the minimum free flow area is G = fracdotm_pA_cs - N_t l D_toNote that for this expression to be valid, it is sufficient that x_lDgeq 1. If the general geometry and total hot-side heat transfer area are known (e.g., from the NTU), but the number of coolant passes has not been determined yet, this can be calculated asN_mathrmpasses = fracA_hN_t N_mathrmstages pi D_to lHeat transfer coefficientsThe above analysis relies on being able to determine the overall thermal resistance. In general, the thermal resistance has five components: hot- and cold-side gas resistances, wall resistance, and hot- and cold-side fouling resistances. The gas resistances are the aerodynamic resistances due to the thermal boundary layers, the wall resistance depends on the material conductivity and thickness, and the fouling resistances account for buildup of dirt layers during operation. The product of thermal resistance and heat transfer area (thermal insulance) is in practice easier to computeR_o A_p = frac1h_p + frac1h_c fracA_cA_p + fractk_w + R_fpA_p + R_fcA_c fracA_pA_cwhere h is the the aerodynamic heat transfer coefficient, A is the heat transfer area, t is the wall thickness, k is the thermal conductivity, w denotes the wall, and R_fA is the fouling factor. A list of design fouling factors can be found in [2] and [3].The heat transfer coefficients depend on the gas temperature, which changes as heat is added to the flows. A mean gas temperature, taken as the average between the inlet and outlet temperatures, is used to calculate the gas properties,T_pm = fracT_po - T_pi2T_cm = fracT_co - T_ci2Coolant-side heat transfer coefficientThe flow inside the tubes can be modeled by assuming that it is fully-developed turbulent flow in a smooth pipe. In this case, the 1913 Blasisus correlation provides a method to calculate the skin-friction coefficient, C_fC_f = fractau_wfrac12rho_cm V_cm^2 = 00791 mathrmRe_Dc^-14where tau_w is the wall shear stress, rho is the mass density, V is the velocity and the cold-side diameter-based Reynolds number is defined as mathrmRe_Dc=fracV_cmrho_cm D_timu_cm, with D_ti being the tube inner diameter and mu being the viscosity.When the skin-friction coefficient is known, the Colburn j-factor can be calculated using the Reynolds analogyj = mathrmSt mathrmPr^23 = fracC_f2where mathrmSt = frachrho V c_p is the Stanton number and mathrmPr = fracc_p muk is the Prandtl number. Once j is determined, the heat transfer coefficient h_c can be computed from the cold gas properties.Process-side heat transfer coefficientThe flow past a set of staggered tubes is complex. Žkauskas[4] provides simplified correlations that can be used to model the heat transfer properties of these tubes. Generally, the Nusselt number can be expressed asmathrmNu = C_1 C_2 mathrmRe^m mathrmPr^nwhere the Rynolds number is defined as mathrmRe= fracG D_tomu_pm, D_to is the tube outer diameter, and G is the hot-side mass flow rate per unit area at the minimum free-flow area. Hence, this Reynolds number accounts for blockage effects due to the presence of the tubes.The following table shows the value of the parameters C_1, m and n as a function of Reynolds number.Re C_1 m n\n0–40 1.04 0.4 0.36\n40–1000 0.71 0.5 0.36\n1000–2times 10^5 & x_tx_l2 035 (x_t x_l) ^ 02 0.6 0.36\n1000–2times 10^5 & x_tx_lgeq 2 0.4 0.6 0.36\n2times 10^5 0031 (x_t x_l) ^ 02 0.8 0.4The paramters in the table can be affected by the distances x_t and x_l, which are the distances between tubes in the tangential and longitudinal directions. Note that the distance x_t used in the calculations is x_tm as the pitch varies in the radial direction. The ratios of this distances to the tube outer diameter, fracx_tD and fracx_tD, are design parameters. The parameter C_2 is a correction that accounts for the number of rows, N_L, and tends to 1 as the number of rows goes to infinity. It can be approximated as C_2 = 1-exp(-N_L^1 sqrt3)if Re1000 and otherwise asC_2 = 1-exp(-sqrt3 N_L^1 sqrt2)Once the Nusselt number is known, the hot-side heat transfer coefficient can be computed as h_p = fracmathrmNu k_pD_to.Pressure dropsThe pressure drop in the hot-side (across the staggered tube bank) can be estimated using the method of Gunter and Shaw[5]. The first necessary parameter is the volumetric hydraulic diameter, defined asD_v = frac4(mathrmNetfreevolume)mathrmFrictionsurface = frac4 L fracdotm_pV_pirho_pi-N_t N_mathrmpasses N_mathrmstages pi D_to^2 lA_pFrom this, the pressure drop across the process side can be computed asDelta p_p = fracG^2 L D_v rho_pm fracf2 left(fracD_vx_tright)^04left(fracx_lx_tright)^06where fracf2 is a friction factor that can be related to the Reynolds number, Re_D_v = fracG D_vmu_pm, as fracf2= 90 Re_D_v for Re_D_v200 and fracf2= 096 Re_D_v^-0145 otherwise. As in the heat transfer coefficient case, note that the distance x_t used in the calculations is x_tm since the pitch varies in the radial direction.The cold-side pressure drop can be calculated from the skin-friction coefficient, ignoring the minor losses due to flow turning at each pass,Delta p_c = frac4 tau_w N_mathrmpasses pi D_ti lpi D_ti^2= frac4 tau_w N_mathrmpasses lD_tiwith tau_w = C_f frac12rho_cm V_cm^2.","category":"page"},{"location":"propulsion/hxfun/#Structures","page":"Heat exchangers","title":"Structures","text":"","category":"section"},{"location":"propulsion/hxfun/","page":"Heat exchangers","title":"Heat exchangers","text":"engine.HX_gas","category":"page"},{"location":"propulsion/hxfun/#TASOPT.engine.HX_gas","page":"Heat exchangers","title":"TASOPT.engine.HX_gas","text":"HX_gas\n\nStructure containing the gas properties of the process and coolant streams.\n\ndetails: 💾 Data fields\nInputs:fluid_p::String: process fluid name\nfluid_c::String: coolant fluid name\nalpha_p::Vector{Float64}: process gas composition\nigas_c::Float64: coolant gas index, if coolant is a gas\nmdot_p::Float64: mass flow rate of process gas (kg/s)\nmdot_c::Float64: mass flow rate of coolant gas (kg/s)\nTp_in::Float64: process gas inlet temperature (K)\nTc_in::Float64: coolant gas inlet temperature (K)\npp_in::Float64: process gas inlet pressure (Pa)\npc_in::Float64: coolant gas inlet pressure (Pa)\nMp_in::Float64: process gas inlet Mach number\nMc_in::Float64: coolant gas inlet Mach number\nTp_out::Float64: process gas outlet temperature\nTc_out::Float64: coolant gas outlet temperature\nΔh_p::Float64: enthalpy change across HX (J/kg)\nΔp_p::Float64: pressure drop of process gas across heat exchanger (Pa)\nΔp_c::Float64: pressure drop of coolant gas across tubes (Pa)\nPl_p::Float64: power loss due to pressure drop in process stream (W)\nPl_c::Float64: power loss due to pressure drop in coolant stream (W)\nε::Float64: desired heat exchanger effectiveness\nrecircT::Float64: temperature of recirculating flow at HX inlet (K)\nmdot_r::Float64: recirculating flow mass flow rate (kg/s)\nh_lat::Float64: latent heat capacity in freestream coolant liquid (J/kg)\n\n\n\n\n\n","category":"type"},{"location":"propulsion/hxfun/","page":"Heat exchangers","title":"Heat exchangers","text":"engine.HX_tubular","category":"page"},{"location":"propulsion/hxfun/#TASOPT.engine.HX_tubular","page":"Heat exchangers","title":"TASOPT.engine.HX_tubular","text":"HX_tubular\n\nStructure containing the heat exchanger geometric and material properties.\n\ndetails: 💾 Data fields\nInputs:fconc::Bool: flag for concentric geometry (1: concentric ; 0: rectangular)\nfrecirc::Bool: flag for recirculation (1: recirculation ; 0: no recirculation)\nN_t::Float64: number of tubes per row\nn_stages::Float64: number of different coolant stages with different coolant flows\nn_passes::Float64: number of coolant passes\nA_cs::Float64: process side freestream cross-sectional area (m^2)\nl::Float64: length of tubes (m)\nt::Float64: cooling tube wall thickness (m)\ntD_o::Float64: tube outer diameter (m)\nxt_D::Float64: circumferential pitch between tubes at the root over tube outer diameter \nxl_D::Float64: longitudinal pitch between rows over tube outer diameter\nRfp::Float64: process-side fouling factor (m^2 K/W)\nRfc::Float64: coolant-side fouling factor (m^2 K/W)\nkw::Float64: thermal conductivity of wall material (W/m/K)\nρw::Float64: mean density of HE (kg/m^3)\nD_i::Float64: inner diameter of core (m)\n\n\n\n\n\n","category":"type"},{"location":"propulsion/hxfun/","page":"Heat exchangers","title":"Heat exchangers","text":"engine.HX_struct","category":"page"},{"location":"propulsion/hxfun/#TASOPT.engine.HX_struct","page":"Heat exchangers","title":"TASOPT.engine.HX_struct","text":"HX_struct\n\nStructure containing all the heat exchanger geometry and operational information.\n\ndetails: 💾 Data fields\nInputs:type::String: type of heat exchanger (\"PreC\": precooler; \"InterC\": intercooler; \"Regen\": regenerative; \"TurbC\": turbine cooling)\nHXgeom::HX_tubular: structure containing the HX geometric information\nHXgas_mission::Array{Any}: array containing the gas properties, of type HX_gas for each mission and segment\n\n\n\n\n\n","category":"type"},{"location":"propulsion/hxfun/#Functions","page":"Heat exchangers","title":"Functions","text":"","category":"section"},{"location":"propulsion/hxfun/#Heat-exchanger-sizing-and-off-design-operations","page":"Heat exchangers","title":"Heat exchanger sizing and off-design operations","text":"","category":"section"},{"location":"propulsion/hxfun/","page":"Heat exchangers","title":"Heat exchangers","text":"engine.hxsize!","category":"page"},{"location":"propulsion/hxfun/#TASOPT.engine.hxsize!","page":"Heat exchangers","title":"TASOPT.engine.hxsize!","text":"hxsize!(HXgas, HXgeom)\n\nSizes a crossflow heat exchanger and calculates the pressure drop. Uses the ε-NTU method to size the heat exchanger from a prescribed ε. For representative fouling factors see Standards of the Tubular Exchanger Manufacturers Association or https://powderprocess.net/Tools_html/Data_Diagrams/Heat_Exchanger_Fouling_Factor.html\n\ndetails: 🔃 Inputs and Outputs\nInputs:HXgas::Struct: structure of type HX_gas with the gas properties\nHXgeom::Struct: structure of type HX_tubular with the HX geometric propertiesOutputs: No direct outputs. Input structures are modified with outlet gas properties and HX design geometry.\n\n\n\n\n\n","category":"function"},{"location":"propulsion/hxfun/","page":"Heat exchangers","title":"Heat exchangers","text":"engine.hxoper!","category":"page"},{"location":"propulsion/hxfun/#TASOPT.engine.hxoper!","page":"Heat exchangers","title":"TASOPT.engine.hxoper!","text":"hxoper!(HXgas, HXgeom)\n\nEvaluates crossflow heat exchanger performance for off-design operation. Uses the ε-NTU method to calculate effectiveness from prescribed geometry. \n\ndetails: 🔃 Inputs and Outputs\nInputs:HXgas::Struct: structure of type HX_gas with the gas properties\nHXgeom::Struct: structure of type HX_tubular with the HX geometric propertiesOutputs: No direct outputs. Input structures are modified with outlet gas properties.\n\n\n\n\n\n","category":"function"},{"location":"propulsion/hxfun/#Optimization","page":"Heat exchangers","title":"Optimization","text":"","category":"section"},{"location":"propulsion/hxfun/","page":"Heat exchangers","title":"Heat exchangers","text":"engine.hxoptim!","category":"page"},{"location":"propulsion/hxfun/#TASOPT.engine.hxoptim!","page":"Heat exchangers","title":"TASOPT.engine.hxoptim!","text":"hxoptim!(HXgas, HXgeom, initial_x)\n\nOptimizes heat exchanger design parameters for a given set of inputs. Uses the NLopt.jl package. The optimization variables are Mc_in, n_stages, xt_D and l. The length of initial_x is the flag to determine how many parameters to optimize: if it is 4, all parameters are optimized; if it is 3, the tube length l is assumed to be an input and is not optimized.\n\ndetails: 🔃 Inputs and Outputs\nInputs:HXgas::Struct: structure of type HX_gas with the gas properties\nHXgeom::Struct: structure of type HX_tubular with the HX geometric properties\ninitial_x::Vector{Float64}: vector with the initial guess for the optimizationOutputs: No direct outputs. Input structures are modified with HX design geometry.\n\n\n\n\n\n","category":"function"},{"location":"propulsion/hxfun/","page":"Heat exchangers","title":"Heat exchangers","text":"engine.hxobjf","category":"page"},{"location":"propulsion/hxfun/#TASOPT.engine.hxobjf","page":"Heat exchangers","title":"TASOPT.engine.hxobjf","text":" hxobjf(x, HXgas, HXgeom)\n\nObjective function for HX optimization in hxoptim!(). It returns the sum of the power dissipated due to pressure drops in the process and coolant streams, with penalty factors to enforce constraints.\n\ndetails: 🔃 Inputs and Outputs\nInputs:x::Vector{Float64}: state vector with [100 * Mc_in, l, n_stages, xt_D]\nHXgas::Struct: structure of type HX_gas with the gas properties\nHXgeom::Struct: structure of type HX_tubular with the HX geometric propertiesOutputs:Iobj::Float64: objective function (W)\n\n\n\n\n\n","category":"function"},{"location":"propulsion/hxfun/#Overall-design-and-analysis","page":"Heat exchangers","title":"Overall design and analysis","text":"","category":"section"},{"location":"propulsion/hxfun/","page":"Heat exchangers","title":"Heat exchangers","text":"engine.hxdesign!","category":"page"},{"location":"propulsion/hxfun/#TASOPT.engine.hxdesign!","page":"Heat exchangers","title":"TASOPT.engine.hxdesign!","text":" hxdesign!(pare, pari, ipdes, HXs_prev)\n\nHeat exchanger design and operation function. It calls hxoptim!() to optimize the heat exchanger at the design point and then evaluates performance for all missions and points with hxoper!(). \n\ndetails: 🔃 Inputs and Outputs\nInputs:pare::Array{Float64 , 3}: array with engine parameters\npari::Vector{Int}: vector with integer parameters\nipdes::Float64: index for design mission segment\nHXs_prev::Vector{Any}: vector with heat exchanger data from the previous wsize iteration; elements are HX_struct structuresOutputs:HeatExchangers::Vector{Any}: vector with heat exchanger data; elements are HX_struct structures\nAlso modifies pare with the fuel temperature and the HX enthalpy and pressure changes\n\n\n\n\n\n","category":"function"},{"location":"propulsion/hxfun/#Heating-and-pressure-calculations","page":"Heat exchangers","title":"Heating and pressure calculations","text":"","category":"section"},{"location":"propulsion/hxfun/","page":"Heat exchangers","title":"Heat exchangers","text":"engine.jcalc_pipe","category":"page"},{"location":"propulsion/hxfun/#TASOPT.engine.jcalc_pipe","page":"Heat exchangers","title":"TASOPT.engine.jcalc_pipe","text":"jcalc_pipe(Re_D)\n\nCalculates the Colburn j-factor and skin-friction coefficient for flow inside a circular pipe, assuming flow is fully developed and turbulent. Uses the 1913 Blasius correlation.\n\ndetails: 🔃 Inputs and Outputs\nInputs:Re_D::Float64: Reynolds number based on pipe diameterOutputs:j::Float64: Colburn j-factor for heat calculations\nCf::Float64: skin-friction coefficient\n\n\n\n\n\n","category":"function"},{"location":"propulsion/hxfun/","page":"Heat exchangers","title":"Heat exchangers","text":"engine.Nu_calc_staggered_cyl","category":"page"},{"location":"propulsion/hxfun/#TASOPT.engine.Nu_calc_staggered_cyl","page":"Heat exchangers","title":"TASOPT.engine.Nu_calc_staggered_cyl","text":"Nu_calc_staggered_cyl(Re_D, Pr, N_L, xt_D, xl_D)\n\nCalculates the Nusselt number for cross flow on a set of staggered circular cylinders. Based on the model in A. Žkauskas. Heat Transfer from Tubes in Crossflow. Advances in Heat Transfer v.18 (1987).\n\ndetails: 🔃 Inputs and Outputs\nInputs:Re_D::Float64: Reynolds number based on cylinder diameter with velocity at minimum free flow area\nPr::Float64: Prandtl number\nN_L::Float64: number of cylinder rows\nn_stages::Float64: number of different coolant stages with different coolant flows\nxt_D::Float64: circumferential pitch between tubes over tube outer diameter\nxl_D::Float64: longitudinal pitch between rows over tube outer diameterOutputs:Nu::Float64: Nusselt number based on cylinder diameter \n\n\n\n\n\n","category":"function"},{"location":"propulsion/hxfun/","page":"Heat exchangers","title":"Heat exchangers","text":"engine.Δp_calc_staggered_cyl","category":"page"},{"location":"propulsion/hxfun/#TASOPT.engine.Δp_calc_staggered_cyl","page":"Heat exchangers","title":"TASOPT.engine.Δp_calc_staggered_cyl","text":"Δp_calc_staggered_cyl(Re, G, L, ρ, Dv, tD_o, xt_D, xl_D)\n\nCalculates the pressure drop across a set of staggered cylinders in cross flow. Uses the method of Gunter and Shaw. A General Correlation of Friction Factors for Various Types of Surfaces in Crossflow. Journal of Fluids Engineering, 1945.\n\ndetails: 🔃 Inputs and Outputs\nInputs:Re::Float64: Reynolds number based on hydraulic diameter and minimum free flow area: Re = Dv G /μ\nG::Float64: mass flow rate divided by minimum free flow area. G = mdot / (A_min), A_min is the minimum free-flow area (kg/s/m^2)\nL::Float64: axial channel length (m)\nρ::Float64: density (kg/m^3)\nDv::Float64: volumetric hydraulic diameter. Dv = 4 * (Net free volume) / (Friction surface)\ntD_o::Float64: cylinder outer diameter (m)\nxt_D::Float64: circumferential pitch between tubes over tube outer diameter\nxl_D::Float64: longitudinal pitch between rows over tube outer diameterOutputs:Δp::Float64: pressure drop across staggered cylinders (Pa)\n\n\n\n\n\n","category":"function"},{"location":"propulsion/hxfun/#Weight-estimation","page":"Heat exchangers","title":"Weight estimation","text":"","category":"section"},{"location":"propulsion/hxfun/","page":"Heat exchangers","title":"Heat exchangers","text":"engine.hxweight","category":"page"},{"location":"propulsion/hxfun/#TASOPT.engine.hxweight","page":"Heat exchangers","title":"TASOPT.engine.hxweight","text":" hxweight(gee, HXgeom, fouter)\n\nCalculates the weight of a heat exchanger with involute tubes.\n\ndetails: 🔃 Inputs and Outputs\nInputs:gee::Float64: gravitational acceleration (m/s^2)\nHXgeom::Struct: structure of type HX_tubular with the HX geometric and material properties\nfouter::Float64: ratio of HX external mass to tube massOutputs:W_hx::Float64: weight of heat exchanger (N)\n\n\n\n\n\n","category":"function"},{"location":"propulsion/hxfun/","page":"Heat exchangers","title":"Heat exchangers","text":"[1]: Kays, W. M., & London, A. L. (1984). Compact heat exchangers.","category":"page"},{"location":"propulsion/hxfun/","page":"Heat exchangers","title":"Heat exchangers","text":"[2]: Standards of the Tubular Exchanger Manufacturers Association","category":"page"},{"location":"propulsion/hxfun/","page":"Heat exchangers","title":"Heat exchangers","text":"[3]: Powder Process","category":"page"},{"location":"propulsion/hxfun/","page":"Heat exchangers","title":"Heat exchangers","text":"[4]: Žkauskas, A. (1987). Heat transfer from tubes in crossflow. In Advances in heat transfer (Vol. 18, pp. 87-159). Elsevier.","category":"page"},{"location":"propulsion/hxfun/","page":"Heat exchangers","title":"Heat exchangers","text":"[5]: Gunter, A. Y., & Shaw, W. A. (1945). A general correlation of friction factors for various types of surfaces in crossflow. Transactions of the American Society of Mechanical Engineers, 67(8), 643-656.","category":"page"},{"location":"examples/optimization/#Example-for-a-Multi-variable-Optimization","page":"Multivariable optimization","title":"Example for a Multi-variable Optimization","text":"","category":"section"},{"location":"examples/optimization/","page":"Multivariable optimization","title":"Multivariable optimization","text":"(Image: Optimization Iteration Plot)","category":"page"},{"location":"examples/optimization/","page":"Multivariable optimization","title":"Multivariable optimization","text":"To run a multi-variable optimization run on an aircraft model first determining your design variables. For this example, the design variables are:","category":"page"},{"location":"examples/optimization/","page":"Multivariable optimization","title":"Multivariable optimization","text":"Aspect Ratio: AR\nCruise Altitude: Alt\nLift Coefficient: Cl \nWing Sweep: Λ\nInner panel taper ratio: λs \nOuter panel taper ratio: λt \nRoot thickness to chord: hboxo\nSpanbreak thickness to chord: hboxs\nBreak/root cl ratio = cls/clo: rcls\nTip/root cl ratio = clt/clo: rclt\nTt4: Tt4\nHigh Pressure Compressor Pressure Ratio: pihc\nFan Pressure ratio: pif","category":"page"},{"location":"examples/optimization/#Initialiation-and-loading-models","page":"Multivariable optimization","title":"Initialiation and loading models","text":"","category":"section"},{"location":"examples/optimization/","page":"Multivariable optimization","title":"Multivariable optimization","text":"Start the script importing TASOPT.jl, PyPlot, index.inc, NLopt.","category":"page"},{"location":"examples/optimization/","page":"Multivariable optimization","title":"Multivariable optimization","text":"# Import modules\nusing PyPlot\nusing TASOPT\n# you can optionally define\n# const tas = TASOPT \n# to use as a shorthand\ninclude(\"../src/misc/index.inc\")\n# import indices for calling parameters\nusing NLopt","category":"page"},{"location":"examples/optimization/","page":"Multivariable optimization","title":"Multivariable optimization","text":"Initialize arrays used for plotting","category":"page"},{"location":"examples/optimization/","page":"Multivariable optimization","title":"Multivariable optimization","text":"xarray = []\nfarray = []\nPFEIarray = []\nCDarray = []\nOPRarray = []\ntrack_fig = nothing\nft_to_m = 0.3048","category":"page"},{"location":"examples/optimization/","page":"Multivariable optimization","title":"Multivariable optimization","text":"Load aircraft model and size it to get initial values:","category":"page"},{"location":"examples/optimization/","page":"Multivariable optimization","title":"Multivariable optimization","text":"# Load default model\nac = read_aircraft_model(joinpath(TASOPT.__TASOPTroot__, \"../example/opt_input.toml\"))\n# datafile\n# Size aircraft once to get initial values\nsize_aircraft!(ac)","category":"page"},{"location":"examples/optimization/#Setting-Optimization-Parameters","page":"Multivariable optimization","title":"Setting Optimization Parameters","text":"","category":"section"},{"location":"examples/optimization/","page":"Multivariable optimization","title":"Multivariable optimization","text":"This example uses a Nedler Mead optimization aimed towards optimizing for passenger fuel emission index (PFEI) while checking for other constraints.","category":"page"},{"location":"examples/optimization/#Set-the-Upper-and-Lower-limits-for-all-design-variables","page":"Multivariable optimization","title":"Set the Upper and Lower limits for all design variables","text":"","category":"section"},{"location":"examples/optimization/","page":"Multivariable optimization","title":"Multivariable optimization","text":"# DESIGN VARIABLES\n# AR Alt(ft) Cl Λ λs λt hboxo hboxs rcls rclt Tt4CR iepihc iepif\nlower = [7.0 , 20000.0, 0.40, 10.0, 0.1, 0.1, 0.10, 0.10, 0.1, 0.1, 700.0, 6, 0]\nupper = [12.0, 60000.0, 0.65, 40.0, 1.0, 1.0, 0.15, 0.15, 1.4, 1.0, 2000.0, 15, 10] \n","category":"page"},{"location":"examples/optimization/#Set-the-initial-values-for-all-design-variables","page":"Multivariable optimization","title":"Set the initial values for all design variables","text":"","category":"section"},{"location":"examples/optimization/","page":"Multivariable optimization","title":"Multivariable optimization","text":"initial =[\n ac.parg[igAR], 33000.0, 0.57, ac.parg[igsweep], \n ac.parg[iglambdas], ac.parg[iglambdat], ac.parg[ighboxo], \n ac.parg[ighboxs], ac.para[iarcls, ipcruise1,1], ac.para[iarclt, ipcruise1,1], 1587, 11.46, 1.66\n]","category":"page"},{"location":"examples/optimization/#Set-initial-dx-values-for-all-design-variables","page":"Multivariable optimization","title":"Set initial dx values for all design variables","text":"","category":"section"},{"location":"examples/optimization/","page":"Multivariable optimization","title":"Multivariable optimization","text":"initial_dx = [ 0.5, 1000.0, 0.05, 0.1, 0.01,0.01,0.01, 0.01, 0.01, 0.01, 100, 0.5,0.2]","category":"page"},{"location":"examples/optimization/#Set-other-optimization-factors","page":"Multivariable optimization","title":"Set other optimization factors","text":"","category":"section"},{"location":"examples/optimization/","page":"Multivariable optimization","title":"Multivariable optimization","text":"# Set FTOL\nf_tol_rel = 1e-5\n\n# Set Optimization module\nopt = NLopt.Opt(:LN_NELDERMEAD, length(initial))\n# Other Optimization algorithms are also possible:\n# # opt = NLopt.Opt(:LN_BOBYQA, length(initial))\n# # opt = NLopt.Opt(:LN_COBYLA, length(initial))\n\n# Set Optimization parameters\nopt.lower_bounds = lower\nopt.upper_bounds = upper\nopt.min_objective = obj\nopt.initial_step = initial_dx\nopt.ftol_rel = f_tol_rel","category":"page"},{"location":"examples/optimization/#Objective-Function","page":"Multivariable optimization","title":"Objective Function","text":"","category":"section"},{"location":"examples/optimization/","page":"Multivariable optimization","title":"Multivariable optimization","text":"function obj(x, grad)\n ac.parg[igAR] = x[1] # Aspect Ratio \n ac.para[iaalt, ipcruise1, :] .= x[2] * ft_to_m # Cruise Altitude\n ac.para[iaCL, ipclimb1+1:ipdescentn-1, :] .= x[3] # CL\n ac.parg[igsweep] = x[4] # Wing sweep \n ac.parg[iglambdas] = x[5] #inner_panel_taper_ratio\n ac.parg[iglambdat] = x[6] #outer_panel_taper_ratio\n ac.parg[ighboxo] = x[7] #root_thickness_to_chord\n ac.parg[ighboxs] = x[8] #spanbreak_thickness_to_chord\n ac.para[iarcls, ipclimb1+1 : ipdescentn-1, :] .= x[9] # rcls break/root cl ratio = cls/clo\n ac.para[iarclt, ipclimb1+1 : ipdescentn-1, :] .= x[10] # rclt tip /root cl ratio = clt/clo\n ac.pare[ieTt4, ipcruise1:ipcruise2, :] .= x[11] # Tt4\n ac.pare[iepihc, ipclimb1+1 : ipdescentn-1, :] .= x[12] # High Pressure Compressor Pressure Ratio\n ac.pare[iepif, ipclimbn, :] .= x[13] #Fan PR \n ac.pare[iepilc, :, :] .= 3 # Low Pressure Compressure Pressure Ratio set to 3\n\n # Sizing aircraft with new ac.parameters\n TASOPT.size_aircraft!(ac, iter =50, printiter=false)\n f = ac.parm[imPFEI]\n push!(PFEIarray, ac.parm[imPFEI])\n push!(xarray, x)\n push!(CDarray, ac.para[iaCD, ipcruise1, 1])\n push!(OPRarray, ac.pare[iept3]/ac.pare[iept2])\n \n # Ensure aircraft weight makes sense\n WTOmax = ac.parg[igWMTO]\n WTO = ac.parm[imWTO,1]\n constraint = WTO/WTOmax - 1.0\n penfac = 10*ac.parg[igWpay]\n f = f + penfac*max(0.0, constraint)^2\n\n # Ensure fuel volume makes sense\n Wfmax = ac.parg[igWfmax]\n Wf = ac.parg[igWfuel]\n constraint = Wf/Wfmax - 1.0\n penfac = 10*ac.parg[igWpay]\n f = f + penfac*max(0.0, constraint)^2\n \n println(\"X̄ = $x ⇨ PFEI = $(ac.parm[imPFEI]) f = $f, OPR = $(ac.pare[iept3]/ac.pare[iept2]),\")\n push!(farray, f)\n \n return f\nend","category":"page"},{"location":"examples/optimization/#Running-the-optimization","page":"Multivariable optimization","title":"Running the optimization","text":"","category":"section"},{"location":"examples/optimization/","page":"Multivariable optimization","title":"Multivariable optimization","text":"opt_time = @elapsed (optf, optx, ret) = NLopt.optimize(opt, initial)\nnumevals = opt.numevals # the number of function evaluations\n\nprintln(\"got $optf at $optx after $numevals iterations which took $(opt_time/60) min (returned $ret)\")\n","category":"page"},{"location":"examples/optimization/#Plotting-resulting-data","page":"Multivariable optimization","title":"Plotting resulting data","text":"","category":"section"},{"location":"examples/optimization/#Plot-aircraft-model-details","page":"Multivariable optimization","title":"Plot aircraft model details","text":"","category":"section"},{"location":"examples/optimization/","page":"Multivariable optimization","title":"Multivariable optimization","text":"figure()\nsavedir = \"./example/optimization/\"\nif !isdir(savedir)\n # If it doesn't exist, create the \"optimization\" directory\n mkdir(savedir)\n println(\"The 'optimization' directory has been created.\")\nend\nfigname = \"Opt_tutorial_ac_details\"\nglobal track_fig = TASOPT.plot_details(ac; ax = track_fig)\nplt.savefig(savedir*figname*\".png\")","category":"page"},{"location":"examples/optimization/#Plot-optimization-outputs-over-iterations","page":"Multivariable optimization","title":"Plot optimization outputs over iterations","text":"","category":"section"},{"location":"examples/optimization/","page":"Multivariable optimization","title":"Multivariable optimization","text":"fig, ax = plt.subplots(2,2, figsize = (12,8))\nax[1].plot(PFEIarray)\nax[1].set_xlabel(\"Iterations\")\nax[1].set_ylabel(\"PFEI (J/Nm)\")\nax[2].semilogy(farray)\nax[2].set_xlabel(\"Iterations\")\nax[2].set_ylabel(\"Objective f\")\nax[3].plot(CDarray)\nax[3].set_xlabel(\"Iterations\")\nax[3].set_ylabel(\"CD\")\nax[4].plot(OPRarray)\nax[4].set_xlabel(\"Iterations\")\nax[4].set_ylabel(\"OPR\")\nplt.suptitle(\"Optimization outputs\")\nfigname2 = \"Opt_tutorial_iterations\"\nfig.savefig(savedir*figname2*\".png\")","category":"page"},{"location":"structures/fuselage/#fuselage","page":"Fuselage","title":"Fuselage","text":"","category":"section"},{"location":"structures/fuselage/","page":"Fuselage","title":"Fuselage","text":"(Image: Fuselage layout)","category":"page"},{"location":"structures/fuselage/#Fuselage-pressure-and-torsion-loads","page":"Fuselage","title":"Fuselage pressure and torsion loads","text":"","category":"section"},{"location":"structures/fuselage/","page":"Fuselage","title":"Fuselage","text":"The fuselage is modeled as a side-by-side \"multi-bubble\" pressure vessel with an ellipsoidal nose endcap and a hemispherical tail endcap, which is subjected to pressurization, bending, and torsion loads, as shown in the first two figures. The loaded cylindrical length of the pressure vessel shell is from x_rm shell_1 to x_rm shell_2. beginaligned l_rm shell = x_rm shell_2 - x_rm shell_1 endaligned","category":"page"},{"location":"structures/fuselage/","page":"Fuselage","title":"Fuselage","text":"The horizontal-axis moment cal M_rm hscriptstyle (x) distributions on the front and back bending fuselage are assumed to match at location x_rm wing, as shown in the first figure. Theoretically this is the wing's net lift–weight centroid, which varies somewhat depending the fuel fraction in the wings, the wing's profile pitching moment and hence the flap setting, and on the aircraft C_L. For simplicity it will be approximated as the wing's area centroid. Note that for a swept wing the wing box location x_rm wbox will be centered somewhat ahead of x_rm wing, but it will then also impart a pitch-axis moment at its location, so that the front and back cal M_rm hscriptstyle (x) distributions must still match at x_rm wing.","category":"page"},{"location":"structures/fuselage/","page":"Fuselage","title":"Fuselage","text":"The second figure shows the fuselage cross section for the case of a \"double-bubble\", or two tubes. The next figure compares to alternative possible cross sections with three or four tubes, each specified by the number of webs n_rm fweb. The pressure-vessel skin and endcaps have a uniform thickness t_rm skin, while each of the n_rm fweb tension web(s) has an average thickness t_rm fweb. The cross-sectional area of the skin is A_rm skin, and has stiffening stringers which have a \"smeared\" average area A_rm skinf_rm stringrho_rm skinrho_rm bend, specified via the empirical stringer/skin weight fraction f_rm string. The enclosed area S_rm skin enters the torsional stiffness and strength calculations. The fuselage cross section also shows the possibility of added bottom bubbles or fairings, extended downward by the distance Delta R_rm fuse.","category":"page"},{"location":"structures/fuselage/","page":"Fuselage","title":"Fuselage","text":"(Image: Fusetube)","category":"page"},{"location":"structures/fuselage/","page":"Fuselage","title":"Fuselage","text":"The skin and stringers constitute the \"shell\", which has bending inertias I_rm hshell I_rm vshell about the horizontal and vertical axes. The second figure does not show any hoop-stiffening frames which are typically required, and whose weight is a specified fraction f_rm frame of the skin weight. These typically may be offset from the skin inside of the stringers, and hence are assumed to not contribute to the skin's circumferential tensile strength.","category":"page"},{"location":"structures/fuselage/","page":"Fuselage","title":"Fuselage","text":"To address the weight and aerodynamic loads of the tail group on the fuselage, the horizontal and vertical tails, the tailcone, and any rear-mounted engines are treated as one lumped mass and aero force at location x_rm tail, shown in Figure 2.","category":"page"},{"location":"structures/fuselage/","page":"Fuselage","title":"Fuselage","text":"The bending loads on the shell may require the addition of vertical-bending material concentrated on top and bottom of the fuselage shell (typically as skin doublers or additional stringers). The total added cross sectional area is A_rm hbendscriptstyle (x), and the associated added bending inertia is I_rm hbendscriptstyle (x). Corresponding added material on the sides has A_rm vbendscriptstyle (x) and I_rm vbendscriptstyle (x). Because the wing box itself will contribute to the fuselage bending strength, these added areas and bending inertias do not match the cal Mscriptstyle (x) distribution there, but are made linear over the wing box extent, as shown in figure 2.","category":"page"},{"location":"structures/fuselage/","page":"Fuselage","title":"Fuselage","text":"(Image: ntube)","category":"page"},{"location":"structures/fuselage/","page":"Fuselage","title":"Fuselage","text":"details: 📖 Theory - Cross-section relations\nThe fuselage pressure shell has the following geometric relations and beam quantities. beginaligned theta_rm fb = arcsin (w_rm fb R_rm fuse) \n h_rm fb = sqrtR_rm fuse^2 - w_rm fb^2 \n A_rm skin = left( 2pi + 4n_rm fwebtheta_rm fbright) R_rm fuse t_rm skin + 2 Delta R_rm fuse t_rm skin \n A_rm fweb = n_rm fweb(2 h_rm fb+ Delta R_rm fuse) t_rm fweb \n A_rm fuse = left pi + n_rm fwebleft( 2theta_rm fb+ sin 2 theta_rm fbright) right R_rm fuse^2 + 2 left R_rm fuse+ n_rm fwebw_rm fbright Delta R_rm fuse endaligned The skin has some modulus and density E_rm skin rho_rm skin, while the stringers have some possibly different values E_rm bend rho_rm bend. The effective modulus-weighted \"shell\" thickness t_rm shell can then be defined as follows, assuming that only the skin and stringers contribute to bending, but not the frames. beginaligned t_rm shell = frac(E t)_rm skinE_rm skin = t_rm skin left( 1 + r_ scriptscriptstyle E f_rm stringfracrho_rm skinrho_rm bend right) \n rmwhere hspace5ex r_ scriptscriptstyle E = fracE_rm bendE_rm skin endaligned This is then convenient for determining the modulus-weighted horizontal-axis and vertical-axis bending inertias. The fuselage webs, if any, are assumed to be made of the same material as the skin. The passenger-access cutouts will not extend all the way to the skin/web junctions, so that the webs' contributions are included in the overall shell bending inertia. beginaligned I_rm hshell = frac(EI)_rm hshellE_rm skin nonumber \n = 4 int_0^pi2 hspace-2ex left( R_rm fusesintheta + Delta R_rm fuse2 right)^2 R_rm fuse t_rm shell rm dtheta nonumber \n + 4 n_rm fweb int_pi2^pi2+theta_rm fb hspace-2ex left( R_rm fusesintheta + Delta R_rm fuse2 right)^2 R_rm fuse t_rm shell rm dtheta + frac23 n_rm fweb(h_rm fb+Delta R_rm fuse2)^3 t_rm fweb nonumber \n = left rule-05em0em15em left pi + n_rm fweb( 2theta_rm fb+ sin 2 theta_rm fb) right R_rm fuse^2 right nonumber 025em + 8 n_rm fwebcos theta_rm fb (Delta R_rm fuse2) R_rm fuse nonumber 025em left + left 2pi + 4 n_rm fwebtheta_rm fbright (Delta R_rm fuse2)^2 rule-05em0em15em right R_rm fuse t_rm shell + frac23 n_rm fweb(h_rm fb+Delta R_rm fuse2)^3 t_rm fweb \n I_rm vshell = frac(EI)_rm vshellE_rm skin nonumber \n = 4 int_0^pi2 hspace-2ex left( R_rm fusecostheta + n_rm fwebw_rm fbright)^2 R_rm fuse t_rm shell rm dtheta nonumber \n + 4 n_rm fweb int_pi2^pi2+theta_rm fb hspace-2ex left( R_rm fusecostheta right)^2 R_rm fuse t_rm shell rm dtheta + sum_k=1^n_k 4 R_rm fuset_rm shelltheta_rm fbw_rm fb^2 (2k - i_k)^2 nonumber \n = left rule-05em0em15em left pi + n_rm fweb(2theta_rm fb- sin 2 theta_rm fb) right R_rm fuse^2 right nonumber 025em + 8 cos theta_rm fb n_rm fwebw_rm fb R_rm fuse nonumber 025em + left( 2pi + 4theta_rm fbright) (n_rm fwebw_rm fb)^2 nonumber 025em left + 4 theta_rm fbw_rm fb^2 sum_k=1^n_k (2k - i_k)^2 rule-05em0em15em right R_rm fuse t_rm shell \n n_k = rm int(n_rm fweb2) \n i_k = rm mod(n_rm fweb+1 2) hspace4ex endaligned It's useful to note that for the particular case of n_rm fweb=0 w_rm fb=0, together with Delta R_rm fuse= 0, there is only one circle. The areas and bending inertias then reduce to those for a single circular cross-section. beginaligned hspace6ex A_rm skin = 2 pi R_rm fuse t_rm skin hspace6ex (rm if n_rm fweb=0 w_rm fb= 0 Delta R_rm fuse= 0) \n hspace6ex S_rm skin = pi R_rm fuse^2 hspace11ex (rm if n_rm fweb=0 w_rm fb= 0 Delta R_rm fuse= 0) \n hspace6ex I_rm hshell= I_rm vshell = pi R_rm fuse^3 t_rm shell hspace7ex (rmif n_rm fweb=0 w_rm fb= 0 Delta R_rm fuse= 0) endaligned Hence, no generality is lost with this multiple-bubble cross-section model.","category":"page"},{"location":"structures/fuselage/#Pressure-shell-loads","page":"Fuselage","title":"Pressure shell loads","text":"","category":"section"},{"location":"structures/fuselage/","page":"Fuselage","title":"Fuselage","text":"The pressurization load from the Delta p pressure difference produces the following axial and hoop stresses in the fuselage skin, with the assumption that the stringers share the axial loads, but the frames do not share the hoop loads. This assumes a typical aluminum fuselage structure, where the stringers are contiguous and solidly riveted to the skin, but the frames are either offset from the skin or have clearance cutouts for the stringers which interrupt the frames' hoop loads.","category":"page"},{"location":"structures/fuselage/","page":"Fuselage","title":"Fuselage","text":"beginaligned\nsigma_x = \nfracDelta p2 fracR_rm fuset_rm shell\n\nsigma_theta = \nDelta p fracR_rm fuset_rm skin\nendaligned","category":"page"},{"location":"structures/fuselage/","page":"Fuselage","title":"Fuselage","text":"An isotropic (metal) fuselage skin thickness t_rm skin and the web thickness t_rm fweb will therefore be sized by the larger sigma_theta value in order to meet an allowable stress sigma_rm skin. beginaligned t_rm skin = fracDelta p R_rm fusesigma_rm skin labeltfuse \nt_rm fweb = 2 fracDelta p w_rm fbsigma_rm skin endaligned This particular t_rm fweb value is obtained from the requirement of equal circumferential stress in the skin and the web, and tension equilibrium at the 3-point web/skin junction.","category":"page"},{"location":"structures/fuselage/","page":"Fuselage","title":"Fuselage","text":"The volume of the skin material cal V_rm skin is obtained from the cross-sectional skin area, plus the contribution of the ellipsoidal nose endcap and the spherical rear bulkhead. The nose uses Cantrell's approximation for the surface area of an ellipsoid. ","category":"page"},{"location":"structures/fuselage/","page":"Fuselage","title":"Fuselage","text":"beginalign\nS_rm nose simeq left 2pi + 4n_rm fwebtheta_rm fbright R_rm fuse^2 left frac13 + frac23 left( fracl_rm noseR_rm fuse right)^85 right^ 58 nonumber \n hspace5em nonumber\nS_rm bulk simeq left 2pi + 4n_rm fwebtheta_rm fbright R_rm fuse^2 nonumber \n hspace5em nonumber\ncal V_rm cyl = A_rm skin l_rm shell nonumber \ncal V_rm nose = S_rm nose t_rm skin nonumber \ncal V_rm bulk = S_rm bulk t_rm skin nonumber \ncal V_rm fweb = A_rm fweb l_rm shell nonumber \n\nx hspace-04ex cal V_rm cyl = textstyle frac12(x_rm shell_1 + x_rm shell_2) cal V_rm cyl nonumber \nx hspace-04ex cal V_rm nose = textstyle frac12(x_rm nose + x_rm shell_1) cal V_rm nose nonumber \nx hspace-04ex cal V_rm bulk = (x_rm shell_2 + textstyle frac12Delta R_rm fuse) cal V_rm bulk nonumber \nx hspace-04ex cal V_rm fweb = textstyle frac12(x_rm shell_1 + x_rm shell_2) cal V_rm fweb nonumber\nendalign","category":"page"},{"location":"structures/fuselage/","page":"Fuselage","title":"Fuselage","text":"The total fuselage shell weight then follows by specifying a material density rho_rm skin for the skin and web. The assumed skin-proportional added weights of local reinforcements, stiffeners, and fasteners are represented by the f_rm fadd fraction, and stringers and frames are represented by the f_rm stringf_rm frame fractions. ","category":"page"},{"location":"structures/fuselage/","page":"Fuselage","title":"Fuselage","text":"beginaligned\nW_rm skin = \nrho_rm skin g \n (cal V_rm cyl+ cal V_rm nose+ cal V_rm bulk)\n\nW_rm fweb = \nrho_rm skin g cal V_rm fweb\n\nx hspace-045ex W_rm skin =\nrho_rm skin g \n (x hspace-04ex cal V_rm cyl+ x hspace-04ex cal V_rm nose+ x hspace-04ex cal V_rm bulk)\n\nx hspace-045ex W_rm fweb =\nrho_rm skin g x hspace-04ex cal V_rm fweb\n05em\nW_rm shell = W_rm skin(1+f_rm string+f_rm frame+f_rm fadd) \n + W_rm fweb\n\nx hspace-045ex W_rm shell = x hspace-045ex W_rm skin(1+f_rm string+f_rm frame+f_rm fadd) \n + x hspace-045ex W_rm fweb\nendaligned","category":"page"},{"location":"structures/fuselage/#Fuselage-bending-loads","page":"Fuselage","title":"Fuselage bending loads","text":"","category":"section"},{"location":"structures/fuselage/","page":"Fuselage","title":"Fuselage","text":"In addition to the pressurization and torsion loads, the fuselage also sees bending loads from its distributed weight load plus the tail weight and airloads. In the case where the pressurization-sized shell is not sufficient to withstand this, additional bending material area is assumed to be added at the top and bottom (total of A_rm hbendscriptstyle (x)), and also sides of the shell (total of A_rm vbendscriptstyle (x)), as shown in figure 2. If the shell is sufficiently strong, then these areas will be zero.","category":"page"},{"location":"structures/fuselage/#Total-fuselage-weight","page":"Fuselage","title":"Total fuselage weight","text":"","category":"section"},{"location":"structures/fuselage/","page":"Fuselage","title":"Fuselage","text":"The total fuselage weight includes the shell with stiffeners, tailcone, floor beams, fixed weight, payload-proportional equipment and material, seats, and the added horizontal and vertical-axis bending material.","category":"page"},{"location":"structures/fuselage/","page":"Fuselage","title":"Fuselage","text":"beginaligned\nW_rm fuse = \nW_rm fix+ \nW_rm apu+ \nW_rm padd+ \nW_rm seat\nnonumber \n + \nW_rm shell+ \nW_rm cone+\nW_rm window+ \nW_rm insul+ \nW_rm floor\nnonumber \n +\nW_rm hbend+ \nW_rm vbend\n \nx hspace-045ex W_rm fuse = \nx hspace-045ex W_rm fix+ \nx hspace-045ex W_rm apu+ \nx hspace-045ex W_rm padd+\nx hspace-045ex W_rm seat\nnonumber \n + \nx hspace-045ex W_rm shell+ \nx hspace-045ex W_rm cone+\nx hspace-045ex W_rm window+ \nx hspace-045ex W_rm insul+ \nx hspace-045ex W_rm floor\nnonumber \n + \nx hspace-045ex W_rm hbend+ \nx hspace-045ex W_rm vbend\nendaligned","category":"page"},{"location":"structures/fuselage/","page":"Fuselage","title":"Fuselage","text":"TASOPT.fusew","category":"page"},{"location":"structures/fuselage/#TASOPT.structures.fusew","page":"Fuselage","title":"TASOPT.structures.fusew","text":" fusew(gee, Nland, Wfix, Wpay, Wpadd, Wseat, Wapu, Weng, Waftfuel,\n fstring, fframe, ffadd, deltap,\n Wpwindow, Wppinsul, Wppfloor,\n Whtail, Wvtail, rMh, rMv, Lhmax, Lvmax,\n bv, lambdav, nvtail,\n Rfuse, dRfuse, wfb, nfweb, lambdac,\n xnose, xshell1, xshell2, xconend,\n xhtail, xvtail,\n xwing, xwbox, cbox,\n xfix, xapu, xeng, xfuel,\n hfloor,\n sigskin, sigbend, rhoskin, rhobend, \n Eskin, Ebend, Gskin)\n\nfusew sizes the fuselage and calculates the component weights and structural properties. It takes inputs related to geometry, fixed weights, material properties, and more to compute the fuselage dimensions, weights, and other parameters.\n\ndetails: 🔃 Inputs and Outputs\nInputs:Nland::Integer: Number of landing gear components.Fixed weights of various components:Wfix::Float64: Fixed weight of the structure.\nWpay::Float64: Fixed weight of payload.\nWpadd::Float64: Fixed weight of additional equipment.\nWseat::Float64: Fixed weight of seats.\nWapu::Float64: Fixed weight of auxiliary power unit.\nWeng::Float64: Fixed weight of engines.\nWaftfuel::Float64: Fixed weight of aft fuel storage.Factors for stringers, frames, and additional structural components:fstring::Float64: Factor for stringers.\nfframe::Float64: Factor for frames.\nffadd::Float64: Factor for additional structural components.Pressure differential:deltap::Float64: Pressure differential.Weights of window, insulation, and floor:Wpwindow::Float64: Weight of windows.\nWppinsul::Float64: Weight of insulation.\nWppfloor::Float64: Weight of floor.Vertical tail parameters:Whtail::Float64: Weight of horizontal tail components.\nWvtail::Float64: Weight of vertical tail components.\nrMh::Float64: Horizontal tail moment arm.\nrMv::Float64: Vertical tail moment arm.\nLhmax::Float64: Maximum horizontal tail length.\nLvmax::Float64: Maximum vertical tail length.\nbv::Float64: Vertical tail span.\nlambdav::Float64: Vertical tail taper ratio.\nnvtail::Integer: Number of vertical tail units.Fuselage parameters:Rfuse::Float64: Fuselage radius.\ndRfuse::Float64: Fuselage thickness.\nwfb::Float64: Fuselage width.\nnfweb::Integer: Number of fuselage webs.\nlambdac::Float64: Fuselage taper ratio.Geometric parameters and locations:xnose::Float64: X location of the nose.\nxshell1::Float64: X location of the first shell point.\nxshell2::Float64: X location of the second shell point.\nxconend::Float64: X location of the cone end.\nxhtail::Float64: X location of horizontal tail components.\nxvtail::Float64: X location of vertical tail components.\nxwing::Float64: X location of the wing.\nxwbox::Float64: X location of the wing box.\ncbox::Float64: Wing box width.\nxfix::Float64: X location of fixed components.\nxapu::Float64: X location of auxiliary power unit.\nxeng::Float64: X location of engines.\nxfuel::Float64: X location of fuel storage.\nhfloor::Float64: Height of the floor.Material properties:sigskin::Float64: Skin material stress.\nsigbend::Float64: Bending material stress.\nrhoskin::Float64: Skin material density.\nrhobend::Float64: Bending material density.\nEskin::Float64: Skin material Young's modulus.\nEbend::Float64: Bending material Young's modulus.\nGskin::Float64: Skin material shear modulus.Outputs:Thicknesses and locations:tskin::Float64: Fuselage skin thickness.\ntcone::Float64: Thickness of the tail cone.\ntfweb::Float64: Thickness of fuselage webs.\ntfloor::Float64: Floor beam thickness.\nxhbend::Float64: X location of added material for horizontal-axis bending.\nxvbend::Float64: X location of added material for vertical-axis bending.Bending and torsion inertias:EIhshell::Float64: Bending inertia for horizontal shell.\nEIhbend::Float64: Bending inertia for horizontal axis bending.\nEIvshell::Float64: Bending inertia for vertical shell.\nEIvbend::Float64: Bending inertia for vertical axis bending.\nGJshell::Float64: Torsional stiffness for horizontal shell.\nGJcone::Float64: Torsional stiffness for tail cone.Weights of components and total fuselage weight:Wshell::Float64: Weight of fuselage shell components.\nWcone::Float64: Weight of tail cone.\nWwindow::Float64: Weight of windows.\nWinsul::Float64: Weight of insulation.\nWfloor::Float64: Weight of floor.\nWhbend::Float64: Weight of horizontal-axis bending material.\nWvbend::Float64: Weight of vertical-axis bending material.\nWfuse::Float64: Total weight of the fuselage.MomentsxWfuse::Float64: Moments.Pressurized cabin volume:cabVol::Float64: Pressurized cabin volume.\n\nSee here or Section 2.2 of the TASOPT Technical Description.\n\n\n\n\n\n","category":"function"},{"location":"propulsion/PEMfuelcell/#PEM-fuel-cells","page":"PEM fuel cells","title":"PEM fuel cells","text":"","category":"section"},{"location":"propulsion/PEMfuelcell/#Theory","page":"PEM fuel cells","title":"Theory","text":"","category":"section"},{"location":"propulsion/PEMfuelcell/","page":"PEM fuel cells","title":"PEM fuel cells","text":"details: 📖 Theory - Proton-exchange membrane fuel cells\nProton-exchange membrane (PEM), also known as polymer electrolyte membrane, fuel cells are electrochemical devices that convert the chemical energy of a fuel to electrical energy through low-temperature oxidation and reduction reactions. Unlike a combustion process in which these processes occur through direct collisions between molecules, the oxidation and reduction reactions are physically separated in fuel cells by a membrane, across which ions produced in the oxidation reaction drift to complete the overall chemical reaction. A diagram of a hydrogen-air fuel cell is shown below. The overall reaction is mathrmH_2 + frac12mathrmO_2 rightarrow mathrmH_2mathrmOand this occurs through two half reactions: an oxidation reactionmathrmH_2 rightarrow 2mathrmH^+ + 2e^-and a reduction reactionfrac12mathrmO_2+2mathrmH^+ + 2e^- rightarrow mathrmH_2mathrmOwhere e^- represents a free electron. In a PEM fuel cell, the oxidation reaction occurs at the anode, with protons drifting across the electrolyte membrane towards the cathode where reduction occurs, while electrons complete an external electric circuit. There are three regions of physical interest in a fuel cell: a bulk flow region, a diffusion layer, and an electrolyte layer. The bulk flow refers to the region outside of the electrodes, which is dominated by advection. The diffusion region is the region inside the porous electrodes, where there cannot be significant advection and molecular motion is governed by diffusion. The electrolyte is the region between the electrodes, where ions drift to close the circuit.(Image: PEMfig)The voltage across a fuel cell is governed by thermodynamics and different loss types[1]V = E_r - eta_mathrmohm - eta_C - eta_Awhere E_r is the thermodynamic reversible voltage, eta_mathrmohm is the ohmic overvoltage due to Joule heating, and eta_A and eta_C are the anode and cathode overvoltages due to activation and concentration losses. The following model is adapted from that in Springer et al.[2]; two versions of this have been implemented: a low-temperature PEMFC model that closely follows the original one in Springer et al.[2], and a high-temperature PEMFC model that is based on it but makes modifications to reflect the different operating temperatures and membrane properties.Reversible voltageThe maximum theoretical energy that can be converted to electrical energy is given by the change in Gibbs free+- energy (Delta G) in this process. Every mole of hydrogen produces nF moles of electrons, where F is the Faraday constant and n=2 is the number of electrons produced for each unit of hydrogen. Therefore, the voltage produced in this reversible reaction is given byE_r = fracDelta hatgnFwhere Delta hatg is the molar specific change in Gibbs free energy. In general, Delta hatg is a function of temperature as well as of reactant pressure. The reversible voltage of a fuel cell can be calculated using the Nernst equation to account for these effects[1],E_r = E_0 + fracDelta hatsnF(T-T_0) - fracRTnFlnleft(fracp_0^32p_mathrmH_2 p_mathrmO_2^12right)where T is the fuel cell temperature, p_0=1atm, T_0=29815K, and p_mathrmH_2 and p_mathrmO_2 denote the partial pressures of oxygen and hydrogen in the reactants. The term E_0 is the reversible voltage at standard conditions, and it is equal to E_0=1229V for liquid water as a product and E_0=1185V for gaseous water. Similarly, the term Delta hats denotes the molar specific entropy change during the reaction, and it is Delta hats=-4434J/(mol K) for gaseous water as a product and Delta hats=-16323J/(mol K) for liquid water.Ohmic lossesAs ions drift through the electrolyte material, they produce ohmic heating as a result of the electrical resistance of the electrolyte. The area-specific resistance (ASR) of the electrolyte can be calculated asmathrmASR = int_0^t_M fracdzsigma(z)where t_M is the electrolyte thickness, sigma is the conductivity of the electrolyte material to ionic motion, and z is a coordinate normal to the electrolyte surface from the anode to the cathode. As the ASR increases with electrolyte thickness, thin electrolytes are preferred. The conductivity depends on the choice of material. A common electrolyte in low-temperature PEM fuel cells is Nafion, which shows excellent ion conduction properties but needs to be constantly hydrated. The conduction properties of Nafion depend on its water content, lambda, defined as the ratio of water molecules to ion conduction sites. An empirical expression for the conductivity of Nafion (in (Omega cm)^-1) as a function of lambda and temperature is[2]sigma = expleft1268left(frac1303-frac1Tright)right(0005139lambda-000326)A key challenge in modeling the ohmic losses is to identify how lambda changes depending on the operating parameters. It can be shown that the change in lambda in the direction normal to the electrolyte surface is governed by[2] fracdlambdadz = left(n^mathrmSAT_mathrmdragfraclambda11-alpha^*right)fracjM_m2Frho_mathrmdryD_lambdawhere alpha^* is defined as the ratio of water molecule flux to proton flux (in general an unknown), n^mathrmSAT_mathrmdragapprox 25 is the number of water molecules dragged by each proton in fully hydrated Nafion, rho_mathrmdry=1970kg m^-3 is the density of dry Nafion, M_mapprox 1kg mol^-1 is the Nafion equivalent weight, j is the current density that the fuel cell is operating at, and D_lambda is the diffusivity of water in the Nafion membrane. The parameter D_lambda is a weak function of lambda[2]. Water content in the electrode/Nafion interface changes as a function of water activity in the electrode, defined as a_w=fracx_mathrmH_2Opp_mathrmSAT, where x_mathrmH_2O is the water concentration outside the membrane and p_mathrmSAT is the saturation partial pressure of water at the fuel cell temperature. If a_wleq 1, expected at the anode side, the relationship can be expressed with a polynomial from a data fit[2],lambda = 0043 + 1781 a_w - 3985 a_w^2 + 36 a_w^3and for a_w1, expected at the cathode, the relationship is linear but with a different slope[2],lambda = 14 +14 (a_w-1)As the reaction proceeds, oxygen and hydrogen are consumed and this affects the concentration in the bulk flow. This effect can be captured with a stoichiometric ratio of hydrogen at the anode and another one for oxygen at the cathode, lambda_mathrmH_2 an lambda_mathrmO_2; for example, if lambda_mathrmO_2=1, all the oxygen is consumed in the reaction. To use these relationships, it is necessary to calculate the water and reactant concentrations at the membrane/electrode interface. To do so, it is necessary to first determine the water and hydrogen concentration at station 1 and the water and oxygen concentrations at 3, from a mass balance considering depletion effects. Explicit equations for these concentrations as a function of alpha^* and the stoichiometry ratios are given in [2]. Once these are known, the concentrations at 2 and 3 can be determined from the diffusion of the species (see note below).The key step in this model is to calculate alpha^* by matching the water concentration (or water content) at the cathode/membrane interface produced by two methods. If the water concentration is solved by integrating the diffusion equation from the cathode side, a water content at the interface lambda^prime_3 can be calculated from the water activity. Similarly, the water activity at 3 can be calculated by first integrating the diffusion equation from the anode side to find the water concentration at 2, then calculating the water content at 2 from the activity, and then integrating the equation above for fracdlambdadz across the membrane to find the water content at 3, lambda_3. The correct alpha^* has been found if lambda^prime_3 -lambda_3. A root finding algorithm is used in the code to find the alpha^* that fulfills this condition.Once alpha^* has been determined, it can be used to find the water content profile across the membrane by solving the ODE for lambda (done numerically in the code). Finally, the conductivity can be calculated from the expression above and this can be used to determine ASR.In contrast, polybenzimidazole (PBI) membranes are commonly used in high-temperature PEMFCs. Unlike Nafion, they do not require to be hydrated and they have a negligible water flux across them. A model for how the conductivity of PBI changes with operating conditions is provided in Jio and Li[3],sigma = frac(168mathrmDL^3 - 6324 mathrmDL^2 + 65760 mathrmDL + 8460) b T expleft(-frac-6196mathrmDL + 21650RTright)where mathrmDL is the phosphoric acid doping level, defined as the ratio of phosphoric acid molecules to number of PBI repeat unit (typically of the order of 5), and b is given byb = begincases\n1+(001704T - 4767)mathrmRH_avg textfor 37315leq Tleq 41315\n1+(01432T - 5689)mathrmRH_avg textfor 41315 Tleq 45315\n1+(07T - 3092)mathrmRH_avg textfor 45315 Tleq 47315\nendcaseswhere mathrmRH_avg is the average of the relative humidity in stations 2 and 3, and the relative humidity is simply mathrmRH=fracx_mathrmH_2Opp_mathrmSAT. To use this expression, it is necessary to calculate the water concentration is stations 2 and 3. As in the low-temperature model, this is done by solving the diffusion equations in Springer et al.[2] analytically, with the key difference that there is no water flux across the membrane.The ohmic overvoltage, or ohmic loss, is given byeta_mathrmohm = j mathrmASRWater saturationThere are many models for the saturation partial pressure of water. A possible model valid under 383.15 K is [4]p_mathrmSAT = fracexpleft(34494 - frac492499t + 2371right)(t + 105)^157 where t is the temperature in degrees Celsius and p_mathrmSAT is in pascals. A model for temperatures between 383.15 and 483 K is[3]p_mathrmSAT = 068737 T^3 - 73239 T^2 +263390 T -31919000 where T is in kelvin.DiffusivityThe diffusion of a species in a multi-species gas is complex. The Stefan-Maxwell expression can be used to model the derivative in space of the concentration of species i,fracdx_idz= RT sum_j fracx_i N_j - x_j N_ip D_ijwhere the sum is made over all the species that i can collide with, and N represents the molar flux. Equations for the spatial derivative of concentration can be found in [2]; for this particular model, there are closed-form solutions.This equation requires determining the binary diffusivities of all the species involved. A model for binary diffusivity of species i and j isp D_ij = a left(fracTsqrtT_ci T_cjright)^b (p_ci p_cj)^13 (T_ci T_cj)^512left(frac1M_i + frac1M_jright)^12where the pressures are in atm and the diffusivity is in cm^2/s. For gas pairs involving nonpolar gases, a=2745times10^-4 and b=1823. For pairs involving water and another nonpolar gas, a=3640times10^-4 and b=2334. The parameters T_c and p_c can be found in Table 5.1 in [1].When diffusion is occurring inside a porous material, such as a PEM electrode, the material structure affects the diffusion properties. This can be captured via an effective diffusivity, D^mathrmeff, which is given byD^mathrmeff = D varepsilon ^tauwhere varepsilon is the porosity of the material (a typical value is 0.4), and tau is the tortuosity, which can vary between 1.5 and 10.Cathode overvoltageThe fuel cell also experiences voltage drop due to activation losses, since a voltage is required to provide activation energy for the half reactions, and due to concentration losses, as the maximum current is limited by the rate of diffusion from the bulk flow to the electrodes. These losses are most significant at the cathode side; in this model, anode voltage drops are ignored. The cathode overvoltage can be calculated using the Tafel equation,eta_C = fracRTn_C alpha F ln leftfracjj_0 fracp_Cp_0 x_mathrmO_23effrightwhere n_C=4 is the number of electrons exchanged in the reduction reaction and alpha represents a symmetry parameter, typically 0.3–0.5. The effective oxygen concentration at 3, x_mathrmO_23eff, accounts for the fact that part of the water on the cathode side is actually in liquid phase in low-temperature PEMFCs. For these, it is given byx_mathrmO_23eff = fracx_mathrmO_231-x_liqwhere x_liq = x_mathrmH_2O3 - p_mathrmSAT p_C is the fraction of water in the cathode that is in liquid phase. In high-temperature PEMFCs, all water is in gaseous phase, so x_mathrmO_23eff =x_mathrmO_23.The exchange current density, j_0, is related to the catalyst properties and effective surface area. A model for it is[5]j_0 = j_0reffracA_effAleft(fracx_mathrmO_23effp_Cp_0right)^gamma expleft-fracE_aRTleft(1-fracTT_0right)rightwhere j_0refsim 10^-9 A/m^2 is the reference exchange current density for a platinum catalyst at T_0 and p_0, fracA_effA is the ratio of effective surface area of the catalyst to geometric area (can be of the order of 1000), gamma is a parameter in the range of 0.5–1.0, and E_a=66 kJ/mol is the activation energy for oxygen reduction on platinum.","category":"page"},{"location":"propulsion/PEMfuelcell/#Functions","page":"PEM fuel cells","title":"Functions","text":"","category":"section"},{"location":"propulsion/PEMfuelcell/#Low-temperature-PEM-model","page":"PEM fuel cells","title":"Low-temperature PEM model","text":"","category":"section"},{"location":"propulsion/PEMfuelcell/","page":"PEM fuel cells","title":"PEM fuel cells","text":"engine.LT_PEMFC_voltage","category":"page"},{"location":"propulsion/PEMfuelcell/#TASOPT.engine.LT_PEMFC_voltage","page":"PEM fuel cells","title":"TASOPT.engine.LT_PEMFC_voltage","text":"LT_PEMFC_voltage(u, α_guess::Float64 = 0.25)\n\nA 1-D model of the voltage across a low-temperature PEM fuel cell with a Nafion membrane, based on the model in Springer et al. (1991), which captures the effect of reactant depletion, multispecies diffusion and water transport in the membrane.\n\ndetails: 🔃 Inputs and Outputs\nInputs:u::Struct: structure of type PEMFC_inputs with inputs\nα_guess::Float64: guess for ratio of water flux to proton flux; default is 0.25Outputs:V::Float64: voltage across cell (V)\nα_star::Float64: ratio of water flux to proton flux\n\n\n\n\n\n","category":"function"},{"location":"propulsion/PEMfuelcell/","page":"PEM fuel cells","title":"PEM fuel cells","text":"engine.water_balance","category":"page"},{"location":"propulsion/PEMfuelcell/#TASOPT.engine.water_balance","page":"PEM fuel cells","title":"TASOPT.engine.water_balance","text":"water_balance(α_star, u, p)\n\nThis function calculates the difference between the water content at 3 from integration from the anode or cathode sides. This residual should be 0 if α_star is the correct one.\n\ndetails: 🔃 Inputs and Outputs\nInputs:α_star::Float64: ratio of water flux to proton flux\nu::Struct: structure of type PEMFC_inputs with inputs \np::Struct: structure of type PEMFC_params with parameters Outputs:x_end::Vector{Float64}: vector with values of x at z = d\n\n\n\n\n\n","category":"function"},{"location":"propulsion/PEMfuelcell/","page":"PEM fuel cells","title":"PEM fuel cells","text":"engine.Nafion_diffusion","category":"page"},{"location":"propulsion/PEMfuelcell/#TASOPT.engine.Nafion_diffusion","page":"PEM fuel cells","title":"TASOPT.engine.Nafion_diffusion","text":"Nafion_diffusion(T, λ)\n\nThis function estimates the diffusion coefficient of water in Nafion.\n\ndetails: 🔃 Inputs and Outputs\nInputs:T::Float64: fuel cell temperature (K)\nλ::Float64: water content; ratio of water molecules to SO3- sitesOutputs:D_λ::Float64: water diffusion coefficient in Nafion (m^2/s)\n\n\n\n\n\n","category":"function"},{"location":"propulsion/PEMfuelcell/","page":"PEM fuel cells","title":"PEM fuel cells","text":"engine.conductivity_Nafion","category":"page"},{"location":"propulsion/PEMfuelcell/#TASOPT.engine.conductivity_Nafion","page":"PEM fuel cells","title":"TASOPT.engine.conductivity_Nafion","text":"conductivity_Nafion(T, λ)\n\nThis function calculates the conductivity of Nafion as a function of water content.\n\ndetails: 🔃 Inputs and Outputs\nInputs:T::Float64: fuel cell temperature (K)\nλ::Float64: water content; ratio of water molecules to SO3- sitesOutputs:σ::Float64: conductivity (Ohm m)^-1\n\n\n\n\n\n","category":"function"},{"location":"propulsion/PEMfuelcell/","page":"PEM fuel cells","title":"PEM fuel cells","text":"engine.λ_calc","category":"page"},{"location":"propulsion/PEMfuelcell/#TASOPT.engine.λ_calc","page":"PEM fuel cells","title":"TASOPT.engine.λ_calc","text":"λ_calc(a)\n\nThis function calculates the water content at the Nafion/electrode interface based on water activity.\n\ndetails: 🔃 Inputs and Outputs\nInputs:a::Float64: water activityOutputs:λ::Float64: water content; ratio of water molecules to SO3- sites\n\n\n\n\n\n","category":"function"},{"location":"propulsion/PEMfuelcell/","page":"PEM fuel cells","title":"PEM fuel cells","text":"engine.dλ_dz_membrane","category":"page"},{"location":"propulsion/PEMfuelcell/#TASOPT.engine.dλ_dz_membrane","page":"PEM fuel cells","title":"TASOPT.engine.dλ_dz_membrane","text":"dλ_dz_membrane(λ, u, p)\n\nThis function evaluates the derivative in space of the water content in the membrane.\n\ndetails: 🔃 Inputs and Outputs\nInputs:λ::Float64: water content; ratio of water molecules to SO3- sites\nu::Struct: structure of type PEMFC_inputs with inputs \np::Struct: structure of type PEMFC_params with parameters Outputs:dλ_dz::Vector{Float64}: vector with derivative of λ in space\n\n\n\n\n\n","category":"function"},{"location":"propulsion/PEMfuelcell/#High-temperature-PEM-model","page":"PEM fuel cells","title":"High-temperature PEM model","text":"","category":"section"},{"location":"propulsion/PEMfuelcell/","page":"PEM fuel cells","title":"PEM fuel cells","text":"engine.HT_PEMFC_voltage","category":"page"},{"location":"propulsion/PEMfuelcell/#TASOPT.engine.HT_PEMFC_voltage","page":"PEM fuel cells","title":"TASOPT.engine.HT_PEMFC_voltage","text":"HT_PEMFC_voltage(u)\n\nA 1-D model of the voltage across a high-temperature PEM fuel cell with a PBI membrane. The code is based on the LT-PEMFC model by Springer et al. (1991), modified to eliminate water transport across the membrane and with conductivity values for PBI.\n\ndetails: 🔃 Inputs and Outputs\nInputs:u::Struct: structure of type PEMFC_inputs with inputsOutputs:V::Float64: voltage across cell (V)\n\n\n\n\n\n","category":"function"},{"location":"propulsion/PEMfuelcell/","page":"PEM fuel cells","title":"PEM fuel cells","text":"engine.conductivity_PBI","category":"page"},{"location":"propulsion/PEMfuelcell/#TASOPT.engine.conductivity_PBI","page":"PEM fuel cells","title":"TASOPT.engine.conductivity_PBI","text":"conductivity_PBI(T, DL, RH)\n\nThis function calculates the conductivity of a PBI membrane as a function of temperature, doping level and humidity. Model from K. Jiao and X. Li (2009). A Three-Dimensional Non-isothermal Model of High Temperature Proton Exchange Membrane Fuel Cells with Phosphoric Acid Doped Polybenzimidazole Membranes.\n\ndetails: 🔃 Inputs and Outputs\nInputs:T::Float64: fuel cell temperature (K)\nDL::Float64: phosphoric acid doping level\nRH::Float64: average relative humidity across membraneOutputs:σ::Float64: conductivity (Ohm m)^-1\n\n\n\n\n\n","category":"function"},{"location":"propulsion/PEMfuelcell/#Stack-and-design","page":"PEM fuel cells","title":"Stack and design","text":"","category":"section"},{"location":"propulsion/PEMfuelcell/","page":"PEM fuel cells","title":"PEM fuel cells","text":"engine.PEMsize","category":"page"},{"location":"propulsion/PEMfuelcell/#TASOPT.engine.PEMsize","page":"PEM fuel cells","title":"TASOPT.engine.PEMsize","text":"PEMsize(P_des, V_des, u)\n\nDesigns the fuel cell stack for the design point conditions.\n\ndetails: 🔃 Inputs and Outputs\nInputs:P_des::Float64: design stack output power, ideally maximum power in mission (W)\nV_des::Float64: design stack voltage (V)\nu::Struct: structure of type PEMFC_inputs with inputs Outputs:n_cells::Float64: number of cells in stack\nA_cell::Float64: cell surface area (m^2)\nQ::Float64: waste power produced by the fuel cell at design point (W)\n\n\n\n\n\n","category":"function"},{"location":"propulsion/PEMfuelcell/","page":"PEM fuel cells","title":"PEM fuel cells","text":"engine.PEMoper","category":"page"},{"location":"propulsion/PEMfuelcell/#TASOPT.engine.PEMoper","page":"PEM fuel cells","title":"TASOPT.engine.PEMoper","text":"PEMoper(P_stack, n_cells, A_cell, u)\n\nEvaluates fuel cell stack performance in off-design conditions.\n\ndetails: 🔃 Inputs and Outputs\nInputs:P_stack::Float64: stack output power (W)\nn_cells::Float64: number of cells in stack\nA_cell::Float64: cell surface area (m^2)\nu::Struct: structure of type PEMFC_inputs with inputs Outputs:V_stack::Float64: stack voltage (V)\nQ::Float64: waste power produced by the fuel cell (W)\n\n\n\n\n\n","category":"function"},{"location":"propulsion/PEMfuelcell/","page":"PEM fuel cells","title":"PEM fuel cells","text":"engine.PEMstackweight","category":"page"},{"location":"propulsion/PEMfuelcell/#TASOPT.engine.PEMstackweight","page":"PEM fuel cells","title":"TASOPT.engine.PEMstackweight","text":"PEMstackweight(gee, u, A, n_cells, fouter)\n\nCalculates the weight of a stack of PEM fuel cells.\n\ndetails: 🔃 Inputs and Outputs\nInputs:gee::Float64: gravitational acceleration (m/s^2)\nu::Struct: structure of type PEMFC_inputs with inputs \nn_cells::Float64: number of cells in stack\nA_cell::Float64: cell surface area (m^2)\nfouter::Float64: ratio of stack structural mass (inc. bipolar plates) to membrane and electrode massOutputs:W_stack::Float64: weight of FC stack (N)\n\n\n\n\n\n","category":"function"},{"location":"propulsion/PEMfuelcell/#Physics-and-mathematics","page":"PEM fuel cells","title":"Physics and mathematics","text":"","category":"section"},{"location":"propulsion/PEMfuelcell/","page":"PEM fuel cells","title":"PEM fuel cells","text":"engine.water_sat_pressure","category":"page"},{"location":"propulsion/PEMfuelcell/#TASOPT.engine.water_sat_pressure","page":"PEM fuel cells","title":"TASOPT.engine.water_sat_pressure","text":"water_sat_pressure(T)\n\nFunction to calculate the saturation partial pressure of water. It uses different models for temperatures above or below 100 degrees Celsius. \n\ndetails: 🔃 Inputs and Outputs\nInputs:T::Float64: gas temperature (K)Outputs:p_SAT::Float64: saturation pressure (Pa)\n\n\n\n\n\n","category":"function"},{"location":"propulsion/PEMfuelcell/","page":"PEM fuel cells","title":"PEM fuel cells","text":"engine.binary_diffusion","category":"page"},{"location":"propulsion/PEMfuelcell/#TASOPT.engine.binary_diffusion","page":"PEM fuel cells","title":"TASOPT.engine.binary_diffusion","text":"binary_diffusion(T, p, sps)\n\nThis model estimates the binary diffusion coefficient of a gas species in a water vapor, to be used inside the electrodes. It uses the method of Slattery and Bird (1958) for low pressures.\n\ndetails: 🔃 Inputs and Outputs\nInputs:T::Float64: gas temperature (K)\np::Float64: gas pressure (Pa)\nsps::Vec{String}: gas species vector (\"H2\", \"H2\", \"N2\" or \"O2\")Outputs:D::Float64: diffusion coefficient (m^2/s)\n\n\n\n\n\n","category":"function"},{"location":"propulsion/PEMfuelcell/","page":"PEM fuel cells","title":"PEM fuel cells","text":"engine.porous_diffusion","category":"page"},{"location":"propulsion/PEMfuelcell/#TASOPT.engine.porous_diffusion","page":"PEM fuel cells","title":"TASOPT.engine.porous_diffusion","text":"porous_diffusion(D, ε, τ)\n\nThis model estimates the effective diffusion coefficient of a gas in a porous environment, such as a PEM electrode.\n\ndetails: 🔃 Inputs and Outputs\nInputs:D::Float64: diffusion coefficient outside porous material (m^2/s)\nε::Float64: porosity of material\nτ::String: tortuosity of materialOutputs:Deff::Float64: effective diffusion coefficient (m^2/s)\n\n\n\n\n\n","category":"function"},{"location":"propulsion/PEMfuelcell/","page":"PEM fuel cells","title":"PEM fuel cells","text":"engine.cathode_j0","category":"page"},{"location":"propulsion/PEMfuelcell/#TASOPT.engine.cathode_j0","page":"PEM fuel cells","title":"TASOPT.engine.cathode_j0","text":"cathode_j0(T, p, Aeff_ratio)\n\nThis function calculates the exchange current density of a PEM with a platinum catalyst. \n\ndetails: 🔃 Inputs and Outputs\nInputs:T::Float64: fuel cell temperature (K)\np::Float64: reactant partial pressure (Pa)\nAeff_ratio::Float64: ratio of catalyst surface area to geometric cross-sectional areaOutputs:j0::Float64: exchange current density (A/m^2)\n\n\n\n\n\n","category":"function"},{"location":"propulsion/PEMfuelcell/","page":"PEM fuel cells","title":"PEM fuel cells","text":"engine.RK4","category":"page"},{"location":"propulsion/PEMfuelcell/#TASOPT.engine.RK4","page":"PEM fuel cells","title":"TASOPT.engine.RK4","text":"RK4(dy_dx, x, y0, u, p)\n\nThis function uses a 4th-order Runge-Kutta method to integrate a vector ODE in space or time.\n\ndetails: 🔃 Inputs and Outputs\nInputs:dy_dx::Function: function of the form dy_dx(x, y, u, p) for derivative\nx::Vector{Float64}: vector with the spatial coordinates for integration\ny0::Vector{Float64}: vector with the initial conditions\nu::Struct: structure of type PEMFC_inputs with inputs \np::Struct: structure of type PEMFC_params with parameters Outputs:y::Matrix{Float64}: matrix with values of y for every point in x \nyend::Vector{Float64}: vector with final conditions at x[end]\n\n\n\n\n\n","category":"function"},{"location":"propulsion/PEMfuelcell/","page":"PEM fuel cells","title":"PEM fuel cells","text":"engine.solve_diffusion_ODE","category":"page"},{"location":"propulsion/PEMfuelcell/#TASOPT.engine.solve_diffusion_ODE","page":"PEM fuel cells","title":"TASOPT.engine.solve_diffusion_ODE","text":"solve_diffusion_ODE(M, B, x0, d)\n\nThis function uses eigendecomposition to solve a problem of the form dx/dz = M * x + B\n\ndetails: 🔃 Inputs and Outputs\nInputs:M::Matrix{Float64}: matrix with coefficients\nB::Vector{Float64}: vector with right-hand parameters\nx0::Vector{Float64}: vector with the boundary conditions\nd::Float64: distance at which to evaluate x, z = dOutputs:x_end::Vector{Float64}: vector with values of x at z = d\n\n\n\n\n\n","category":"function"},{"location":"propulsion/PEMfuelcell/","page":"PEM fuel cells","title":"PEM fuel cells","text":"[1]: O'Hayre, Ryan, et al. Fuel cell fundamentals. John Wiley & Sons, 2016.","category":"page"},{"location":"propulsion/PEMfuelcell/","page":"PEM fuel cells","title":"PEM fuel cells","text":"[2]: Springer, Thomas E., T. A. Zawodzinski, and Shimshon Gottesfeld. \"Polymer electrolyte fuel cell model.\" Journal of the electrochemical society 138.8 (1991): 2334.","category":"page"},{"location":"propulsion/PEMfuelcell/","page":"PEM fuel cells","title":"PEM fuel cells","text":"[3]: Jiao, K., and X. Li. \"A Three‐Dimensional Non‐isothermal Model of High Temperature Proton Exchange Membrane Fuel Cells with Phosphoric Acid Doped Polybenzimidazole Membranes.\" Fuel Cells 10.3 (2010): 351-362.","category":"page"},{"location":"propulsion/PEMfuelcell/","page":"PEM fuel cells","title":"PEM fuel cells","text":"[4]: Huang, Jianhua. \"A simple accurate formula for calculating saturation vapor pressure of water and ice.\" Journal of Applied Meteorology and Climatology 57.6 (2018): 1265-1272.","category":"page"},{"location":"propulsion/PEMfuelcell/","page":"PEM fuel cells","title":"PEM fuel cells","text":"[5]: Barbir, Frano. PEM fuel cells: theory and practice. Academic press, 2012.","category":"page"},{"location":"aero/theory_pitching/","page":"-","title":"-","text":"details: 📖 Theory - Surface pitching moment\nThe surface's reference axis is at some specified chordwise fractional location xi_rm ax, as shown in the first figure. The profile pitching moment acts along the span-axis coordinate y_scriptscriptstyle perp, and scales with the normal-plane chord c_scriptscriptstyle perp. These are shown in the first figure, and related to the spanwise and streamwise quantities via the sweep angle.beginaligned\ny_scriptscriptstyle perp = y cos Lambda \nlabelyperp \nc_scriptscriptstyle perp = c cos Lambda \nlabelcperp \nV_scriptscriptstyle perp = V_scriptscriptstyle infty cos Lambda \nlabelVperp \nendalignedThe airfoil's pitching moment contribution shown in the figure below isbeginaligned\ndM_y_scriptscriptstyle perp = \nfrac12 rho V_scriptscriptstyle perp^2 c_scriptscriptstyle perp^2 c_m rm dy_scriptscriptstyle perp\n \nc_m scriptstyle (eta) = left\nbeginarraylcl\n c_m_o 0 eta eta_o\n05em\ndisplaystyle\n c_m_o + (c_m_s - c_m_o) \n fraceta - eta_oeta_s-eta_o\n eta_o eta eta_s\n025em\ndisplaystyle\n c_m_s + (c_m_t - c_m_s) \n fraceta - eta_s1-eta_s\n eta_s eta 1\nendarray\nright\nlabelcmeta\nendalignedand including the contribution of the lift load tildep with its moment arm gives the following overall wing pitching moment Delta M_rm wing increment about the axis center location. beginaligned rm dDelta M_rm wing = tildep left c_scriptscriptstyle perp left(xi_rm ax-textstyle frac14right) cosLambda - (y-y_o) tanLambda right rm dy + rm dM_y_scriptscriptstyle perp cosLambda hspace3em endaligned Integrating this along the whole span then gives the total surface pitching moment about its root axis. beginaligned\nDelta M_rm wing = \n(p_o b_o + 2Delta L_o) c_o left( xi_rm ax - textstyle frac14right) \nnonumber \n + \ncos^2 Lambda \nb int_eta_o^1 pscriptstyle (eta) cscriptstyle (eta)left( xi_rm ax - textstyle frac14right) \n rm deta \nnonumber \n - \nfracb2 tanLambda b int_eta_o^1 pscriptstyle (eta)(eta-eta_o) \n rm deta \nnonumber \n + 2 Delta L_t left\nc_o lambda_t left( xi_rm ax - textstyle frac14right) cos^2Lambda \n-\nfracb2 (1-eta_o) tanLambda right\nnonumber \n + frac12 rho V_scriptscriptstyle infty^2 cos^4 Lambda b \nint_eta_o^1 c_m scriptstyle (eta) cscriptstyle (eta)^2 rm deta \n\n\nDelta M_rm wing = \np_o b c_o eta_o \n(1 + f_L_scriptstyle o) left( xi_rm ax - textstyle frac14right) \nnonumber \n +\np_o b c_o left( xi_rm ax - textstyle frac14right) cos^2 Lambda \nfrac13\nleft \nleft( 1 + textstyle frac12left(lambda_s +gamma_sright) + lambda_s gamma_s\n right)(eta_s - eta_o) \nright\nnonumber \n hspace9em\nleft\n+\nleft( lambda_s gamma_s + \n textstyle frac12left(lambda_s gamma_t+gamma_slambda_tright)\n + lambda_t gamma_t\n right)(1 - eta_s) right\nnonumber \n -\np_o b c_o fractanLambdaK_o \nfrac112 left \n left( 1 + 2gamma_s right) (eta_s - eta_o)^2 \n+ left( gamma_s + 2gamma_tright) (1 - eta_s)^2\n+ 3left( gamma_s + gamma_t right) (eta_s - eta_o)(1 - eta_s)\n right\nnonumber \n +\n2 p_o b c_o f_L_scriptstyle t lambda_t gamma_t left\nK_o lambda_t left( xi_rm ax - textstyle frac14right) cos^2Lambda \n- textstyle frac12(1-eta_o) tanLambda right\nnonumber \n + \nfrac12 rho V_scriptscriptstyle infty^2 S c_o fraccos^4LambdaK_c \nfrac112\nleft left(\n c_m_o (3 + 2 lambda_s + lambda_s^2)\n + c_m_s (3 lambda_s^2 + 2 lambda_s + 1 )\n right)(eta_s-eta_o) right\nnonumber \n\nleft\n+ left(\n c_m_s (3 lambda_s^2 + 2 lambda_s lambda_t + lambda_t^2)\n + c_m_t (3 lambda_t^2 + 2 lambda_s lambda_t + lambda_s^2)\n right)(1-eta_s) \nright\nhspace3em\nlabelDMwing\nendalignedBy using the relation beginaligned\np_o b = frac12 rho V_scriptscriptstyle infty^2 S \nfrac1K_p left( C_L - fracS_rm hS C_L_rm h right)\nendalignedand the equation above it gives the equivalent pitching moment coefficient constant and C_L derivative. beginaligned\nDelta C_M_rm wing equiv\nfracDelta M_rm wingtextstyle frac12rho V_scriptscriptstyle infty^2 S c_o\n = Delta C_m_0 \n+ fracrm dC_mrm dC_L \nleft( C_L - fracS_rm hS C_L_rm h right)\n\nfracrm dC_mrm dC_L \n = \nfrac1K_p left rule-125ex0ex45ex\neta_o \n(1 + f_L_scriptstyle o) left( xi_rm ax - textstyle frac14right) \nright\nnonumber \n \n+ left( xi_rm ax - textstyle frac14right) cos^2 Lambda \nfrac13\nleft \nleft( 1 + textstyle frac12left(lambda_s +gamma_sright) + lambda_s gamma_s\n right)(eta_s - eta_o) \nright\nnonumber \n\nleft\n+\nleft( lambda_s gamma_s + \n textstyle frac12left(lambda_s gamma_t+gamma_slambda_tright)\n + lambda_t gamma_t\n right)(1 - eta_s) right\nnonumber \n \n- fractanLambdaK_o \nfrac112 left \n left( 1 + 2gamma_s right) (eta_s - eta_o)^2 \n+ left( gamma_s + 2gamma_tright) (1 - eta_s)^2 \n right\nnonumber \n \nleft\n+ 3left( gamma_s + gamma_t right) (eta_s - eta_o)(1 - eta_s)\n rule-05ex0ex3ex right\nnonumber \n \nleft\n+ 2 f_L_scriptstyle t lambda_t gamma_t left\nK_o lambda_t left( xi_rm ax - textstyle frac14right) cos^2Lambda \n- textstyle frac12(1-eta_o) tanLambda right\nrule-125ex0ex45ex right\n\n\n\nDelta C_m_0 \n = \nfraccos^4 LambdaK_c \nfrac112\nleft left(\n c_m_o (3 + 2 lambda_s + lambda_s^2)\n + c_m_s (3 lambda_s^2 + 2 lambda_s + 1 )\n right)(eta_s-eta_o) right\nnonumber \n hspace1em\nleft\n+ left(\n c_m_s (3 lambda_s^2 + 2 lambda_s lambda_t + lambda_t^2)\n + c_m_t (3 lambda_t^2 + 2 lambda_s lambda_t + lambda_s^2)\n right)(1-eta_s) \nright\nhspace3em\nlabelCM0wing\nhspace2em\nendaligned(Image: Wing pitching moment quantities.)","category":"page"},{"location":"examples/loadingrunning/#firstexample","page":"Loading and running","title":"Loading and running a model","text":"","category":"section"},{"location":"examples/loadingrunning/","page":"Loading and running","title":"Loading and running","text":"TASOPT.jl uses TOML files to define aircraft models. You can find an example input file at /src/IO/default_input.toml. The majority of aircraft parameters and assumptions are defined here, and it's a useful resource for understanding the parameters and typical values.","category":"page"},{"location":"examples/loadingrunning/","page":"Loading and running","title":"Loading and running","text":"Start by importing TASOPT.jl and then loading the default aircraft model.","category":"page"},{"location":"examples/loadingrunning/","page":"Loading and running","title":"Loading and running","text":"julia> using TASOPT\njulia> example_ac = load_default_model()\nLoading default aircraft model\nName: Default TASOPT Model;\nWpay = 172.0 kN\nDes. Range = 5.56e6 km\nCruise Mach = 0.8","category":"page"},{"location":"examples/loadingrunning/","page":"Loading and running","title":"Loading and running","text":"Alternatively you can load your desired input file by using","category":"page"},{"location":"examples/loadingrunning/","page":"Loading and running","title":"Loading and running","text":"julia> example_ac = read_aircraft_model(\"../src/IO/input.toml\") # MODIFY appropriately","category":"page"},{"location":"examples/loadingrunning/","page":"Loading and running","title":"Loading and running","text":"example_ac is an instance of an aircraft type, that is a thin wrapper for a couple of arrays that store, for example, the geometric parg, aerodynamic (para), engine (pare).","category":"page"},{"location":"examples/loadingrunning/","page":"Loading and running","title":"Loading and running","text":"You can size this aircraft by running","category":"page"},{"location":"examples/loadingrunning/","page":"Loading and running","title":"Loading and running","text":"julia> size_aircraft!(example_ac)\nMax payload weight was not set, setting Wpaymax = Wpay\nWfuel initial = 132502.37055588452\niterw errW errW1 WMTO Wfuel Wftank Wtesys Wmot Wgen Wtshaft Wwing span area HTarea xwbox \n 1 +1.00000000e+00 +1.00000000e+00 6.51600802e+05 1.32502371e+05 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 8.60730957e+04 0.00000000e+00 0.00000000e+00 1.35396163e+01 1.73736000e+01\n 2 +1.00000000e+00 +1.66001430e-02 7.70269325e+05 2.16922911e+05 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 1.10711244e+05 3.25978109e+01 1.05209631e+02 3.71505481e+01 1.73736000e+01\n ...\n 15 +7.45835713e-09 -7.45835713e-09 7.76336715e+05 2.12378504e+05 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 1.04209402e+05 3.54371733e+01 1.24335966e+02 4.20539315e+01 1.62730055e+01\n\nTakeoff:\n # lTO l1 lBF dmax\n 1 6474.360 5179.488 8416.667 355.380\n 2 6474.360 5534.868 8485.441 3.718\n 3 6474.360 5538.586 8485.689 0.000","category":"page"},{"location":"aero/moment/#Pitching-moment","page":"Pitching moment","title":"Pitching moment","text":"","category":"section"},{"location":"aero/moment/","page":"Pitching moment","title":"Pitching moment","text":"The pitching moments of lifting surfaces are computed by integration of the wing loading with reference to a prescribable wing axis.","category":"page"},{"location":"aero/moment/","page":"Pitching moment","title":"Pitching moment","text":"using Markdown\nMarkdown.parse_file(joinpath(\"../..\", \"src/aero\",\"theory_pitching.md\"))","category":"page"},{"location":"aero/moment/","page":"Pitching moment","title":"Pitching moment","text":"aerodynamics.surfcm(b,bs,bo, sweep, Xaxis,\n λt,λs,γt,γs,\n AR,fLo,fLt,cmpo,cmps,cmpt)","category":"page"},{"location":"aero/moment/#TASOPT.aerodynamics.surfcm-NTuple{15, Any}","page":"Pitching moment","title":"TASOPT.aerodynamics.surfcm","text":"surfcm(b, bs, bo, sweep, Xaxis, \n\tλt, λs, γt, γs, \n\tAR, fLo, fLt, cmpo, cmps, cmpt)\n\nCalculates components of wing pitching moment (C_M) about wing root axis:\n\nC_M = C_M0 + C_M1 (C_L - C_Lsurf)\n\nΔC_m surf = ΔC_m 0 + dCₘdCL (C_L - C_Lh)\n\ndetails: 🔃 Inputs and Outputs\nInputs:b::Float64: Span.\nbs::Float64: Outer panel break span.\nbo::Float64: Root (fuselage) span.\nsweep::Float64: Sweep, degrees. -\tXaxis::Float64: Surface axis position.\nλt::Float64: Outer-panel chord taper ratio ct/co.\nλs::Float64: Inner-panel chord taper ratio cs/co.\nγt::Float64: Outer-panel load taper ratio pt/po.\nγs::Float64: Inner-panel load taper ratio ps/po.\nAR::Float64: Surface aspect ratio.\nfLo::Float64, fLt::Float64 : Wing root and tip load adjustment factors.\ncmpo::Float64,cmps::Float64,cmpt::Float64: Perpendicular sectional lift coefficient at wing root, break (\"snag\"), and tip.Outputs:CM0::Float64: Zero-lift surface pitching moment.\nCM1::Float64: Surface pitching moment including lift contribution.\n\nSee Section 2.6.3 of the TASOPT Technical Desc. See also surfcd and surfcd2.\n\n\n\n\n\n","category":"method"},{"location":"aero/geometry/#geometry","page":"Geometry","title":"Geometry","text":"","category":"section"},{"location":"aero/geometry/#Wing-or-Tail-Planform","page":"Geometry","title":"Wing or Tail Planform","text":"","category":"section"},{"location":"aero/geometry/","page":"Geometry","title":"Geometry","text":"The wing geometry is comprised of a wingbox with fuselage carry-over, an inner section with prescribed taper ratio up to a wing break or \"snag\", and an outer section with a separately prescribed taper ratio. The geometry is defined relative to a central axis defined by the overall sweep angle, Lambda.","category":"page"},{"location":"aero/geometry/","page":"Geometry","title":"Geometry","text":"The surface geometry relations derived below correspond to the wing. Most of these apply equally to the tails if the wing parameters are simply replaced with the tail counterparts.","category":"page"},{"location":"aero/geometry/","page":"Geometry","title":"Geometry","text":"(Image: Piecewise-linear wing or tail surface planform, with break at $\\eta_s$ .)","category":"page"},{"location":"aero/geometry/","page":"Geometry","title":"Geometry","text":"using Markdown\nMarkdown.parse_file(joinpath(\"../..\", \"src/aero\",\"theory_geometry.md\"))","category":"page"},{"location":"aero/geometry/","page":"Geometry","title":"Geometry","text":"aerodynamics.wingsc(W,CL,qinf,AR,ηsi,bo,λt,λs)","category":"page"},{"location":"aero/geometry/#TASOPT.aerodynamics.wingsc-NTuple{8, Any}","page":"Geometry","title":"TASOPT.aerodynamics.wingsc","text":"wingsc(W, CL, qinf, AR, ηsi, bo, λt, λs)\n\nSizes wing area, span, root chord from q, CL, W, AR at given point (taken as start-of-cruise in wsize).\n\ndetails: 🔃 Inputs and Outputs\nInputs:W::Float64: Aircraft weight.\nCL::Float64: Lift coefficient.\nqinf::Float64: Freestream dynamic head.\nAR::Float64: Wing aspect ratio.\nηsi::Float64: Span fraction of inner wing break (\"snag\").\nbo::Float64: Wing center box width.\nλt::Float64: Outer or \"tip\" taper ratio of chord.\nλs::Float64: Inner or break/\"snag\" taper ratio of chord.Outputs:S::Float64: Wing planform area (including fuselage carryover).\nb::Float64: Wing span.\nbs::Float64: Span of inner wing (break/\"snag\").\nco::Float64: Chord at wing root, \"center.\"\n\nSee Sections 2.5 and 3.4.1 of the TASOPT Technical Desc.\n\n\n\n\n\n","category":"method"},{"location":"aero/drag/#Drag","page":"Drag","title":"Drag","text":"","category":"section"},{"location":"aero/drag/","page":"Drag","title":"Drag","text":"The key drag contributions are assumed to come from the fuselage, wing and tail surfaces, and the lift-induced drag calculated at the Trefftz plane. Wave drag is not explicitly modelled.","category":"page"},{"location":"aero/drag/#axi","page":"Drag","title":"Axisymmetric fuselage drag","text":"","category":"section"},{"location":"aero/drag/","page":"Drag","title":"Drag","text":"The fuselage profile drag is determined by a quasi-axisymmetric coupled viscous-inviscid calculation. See Simplified Viscous/Inviscid Analysis for Nearly-Axisymmetric Bodies by M. Drela.","category":"page"},{"location":"aero/drag/","page":"Drag","title":"Drag","text":"This method does not require any wetted area approximations or fineness-ratio correlations, but does require the geometry to be specified in the form of a cross-sectional area distribution Ascriptstyle (x) and a perimeter distribution b_0scriptstyle (x), shown in the Figure below. For a round cross-section these are, of course, related. To allow treating more general fuselage cross-sections, they are assumed to be specified separately. The cross section sizes and shapes can vary along the body, provided the variation is reasonably smooth.","category":"page"},{"location":"aero/drag/","page":"Drag","title":"Drag","text":"(Image: ADfuse)","category":"page"},{"location":"aero/drag/","page":"Drag","title":"Drag","text":"using Markdown\nMarkdown.parse_file(joinpath(\"../..\", \"src/aero\",\"theory_fuse_profile_drag.md\"))","category":"page"},{"location":"aero/drag/","page":"Drag","title":"Drag","text":"aerodynamics.axisol!(xnose,xend,xblend1,xblend2, Amax, \n\tanose, btail, iclose,\n\tMach, nc, nldim,\n xl, zl, sl, dyl, ql)\n\naerodynamics.blsys(simi,lami,wake,direct, Mach, uinv,\n hksep, x,b,rn,th,ds,ue,\n h , h_th, h_ds,\n hk, hk_th, hk_ds, hk_ue,\n hc, hc_th, hc_ds, hc_ue,\n hs, hs_th, hs_ds, hs_ue,\n cf, cf_th, cf_ds, cf_ue,\n di, di_th, di_ds, di_ue,\n xm,bm,rnm,thm,dsm,uem, \n hm , hm_thm, hm_dsm,\n hkm, hkm_thm, hkm_dsm, hkm_uem,\n hcm, hcm_thm, hcm_dsm, hcm_uem,\n hsm, hsm_thm, hsm_dsm, hsm_uem,\n cfm, cfm_thm, cfm_dsm, cfm_uem,\n dim, dim_thm, dim_dsm, dim_uem)\n\naerodynamics.blax(ndim, n,ite, xi, bi, rni, uinv, Reyn, Mach, fexcr)\n\naerodynamics.blvar(simi,lami,wake, Reyn,Mach, fexcr,\n x, θ ,δs ,ue )\n\naerodynamics.fusebl!(pari, parg, para, ip)","category":"page"},{"location":"aero/drag/#TASOPT.aerodynamics.axisol!-NTuple{16, Any}","page":"Drag","title":"TASOPT.aerodynamics.axisol!","text":"axisol!(xnose, xend, xblend1, xblend2, Amax, \n anose, btail, iclose,\n Mach, nc, nldim,\n xl, zl, sl, dyl, ql)\n\nCalculates compressible potential flow about a quasi-axisymmetric body, using a simple piecewise-constant source line.\n\ndetails: 🔃 Inputs and Outputs\nInputs:xnose::Float64: X (axial) location of nose point. \nxend::Float64: X location of tail point.\nxblend1::Float64: X location of nose-section blend point.\nxblend2::Float64: X location of tail-section blend point.\nAmax::Float64: Maximum cross-sectional area.\nanose::Float64: Nose-section shape exponent.\nbtail::Float64: Tail-section shape exponent.\niclose::Integer: If 0, tail tapers to a point, otherwise to an edge.\nMach::Float64: Freestream Mach number for Prandtl-Glauert.\nnc::Integer: Number of control points to be used.\nnldim::Integer: Max dimension of passed arrays.Outputs:nl::Integer: Number of output surface and wake points.\nilte::Integer: Index of TE point.\nxl::Array{Float64}: X (axial) locations of surface segment endpoints.\nzl::Array{Float64}: Z (vertical) locations of surface segment endpoints.\nsl::Array{Float64}: Arc lengths along surface and wake.\ndyl::Array{Float64}: Half-width of edge-type tail section.\nql::Array{Float64}: Velocities V/V_inf along surface and wake.\n\nSee theory above or Section 3 of Simplified Viscous/Inviscid Analysis for Nearly-Axisymmetric Bodies. See also fusebl!.\n\n\n\n\n\n","category":"method"},{"location":"aero/drag/#TASOPT.aerodynamics.blsys-NTuple{65, Any}","page":"Drag","title":"TASOPT.aerodynamics.blsys","text":"blsys(simi, lami, wake, direct, Mach, uinv, hksep,\n x, b, rn, th, ds, ue,\n h , h_th, h_ds,\n hk, hk_th, hk_ds, hk_ue,\n hc, hc_th, hc_ds, hc_ue,\n hs, hs_th, hs_ds, hs_ue,\n cf, cf_th, cf_ds, cf_ue,\n di, di_th, di_ds, di_ue,\n xm,bm,rnm,thm,dsm,uem, \n hm , hm_thm, hm_dsm,\n hkm, hkm_thm, hkm_dsm, hkm_uem,\n hcm, hcm_thm, hcm_dsm, hcm_uem,\n hsm, hsm_thm, hsm_dsm, hsm_uem,\n cfm, cfm_thm, cfm_dsm, cfm_uem,\n dim, dim_thm, dim_dsm, dim_uem)\n\nComputes Jacobian matrices for BL solution at an axial station. Called repeatedly by blax.\n\ndetails: 🔃 Inputs and Outputs\nInputs:simi::Integer: Self-similar BL profile flag.\nlami::Integer: Laminar flow flag.\nwake::Integer: In wake? Flag.\ndirect::Integer: Direct solution flag.\nMach::Float64: Mach number for compressibility.\nuinv::Float64: Inviscid velocity.\nx::Float64: Arc length.\nb::Float64: Lateral width of BL.\nrn::Float64: drdn, = 0 for 2D.\nth::Float64: Momentum thickness.\nds::Float64: Displacement thickness.\nue::Float64: Edge velocity.\nh::Float64: Shape parameter.\nhk::Float64: Kinematic shape parameter.\nhc::Float64: density shape parameter (Whitfield).\nhs::Float64: kinetic energy shape parameter.\ncf::Float64: Skin friction factor.\ndi::Float64: Dissipation factor.m denotes the previous point (minus one) in the upstream. _z denotes partial derivative with respect to z (z = th, ds, ue).Outputs:aa::Array{Float64, 3, 3}: Jacobian matrix (wrt current point vars).\nbb::Array{Float64, 3, 3}: Jacobian matrix (wrt previous point vars).\nrr::Array{Float64, 3}: Residual.\n\nSee Section 4 of Simplified Viscous/Inviscid Analysis for Nearly-Axisymmetric Bodies.\n\n\n\n\n\n","category":"method"},{"location":"aero/drag/#TASOPT.aerodynamics.blax-NTuple{10, Any}","page":"Drag","title":"TASOPT.aerodynamics.blax","text":"blax(ndim, n,ite, xi, bi, rni, uinv, Reyn, Mach, fexcr)\n\nAxisymmetric boundary layer + wake calculation routine. Uses specified inviscid velocity, corrects for viscous displacement to allow calculation of separated flow.\n\ndetails: 🔃 Inputs and Outputs\nInputs:ndim::Integer: physical array dimension.\nn::Integer: number of boundary layer + wake points.\nite::Integer: index of trailing edge point, start of wake.\nxi::Array{Float64}: arc length array (BL coordinate).\nbi::Array{Float64}: lateral width of BL at surface (i.e., body perimeter). b_i = 0 for wake, 1 for 2D.\nrni::Array{Float64}: drdn to account for near-axisymmetric bodies, 0 for 2D.\nuinv::Array{Float64}: inviscid velocity, u_inv.\nReyn::Float64: Reynolds number, rho_ref u_ref l_ref mu_ref.\nMach::Float64: Mach number, M = u_ref a_ref.\nfexcr::Float64: excrescence multiplier applied to wall c_f, 1 for smooth wall.Assumed units for all quantities:l_ref: same unit as used for input xi,bi.\nu_ref: freestream velocity.\na_ref: freestream speed of sound.\nrho_ref: freestream density.\nmu_ref: freestream viscosity.Outputs:uei::Array{Float64}: edge velocity, (u_ei = u_invi + {displacement correction}).\ndsi::Array{Float64}: displacement thickness (delta^*).\nthi::Array{Float64}: momentum thickness (theta).\ntsi::Array{Float64}: kinetic energy thickness (theta^*).\ndci::Array{Float64}: density flux thickness (delta^**).\ncfi::Array{Float64}: skin friction coefficient, normalized with local rho, u (c_fi).\ncdi::Array{Float64}: dissipation coefficient , normalized with local rho,u (c_mathcalDi).\ncti::Array{Float64}: max shear-stress coefficient, normalized with local rho,u (c_ti).\nhki::Array{Float64}: kinematic shape parameter (H_Ki).\nphi::Array{Float64}: integrated dissipation (Phi).Other outputs of interest can be computed as follows. These are in units of l_ref, rho_ref, u_refbeffi: Effective perimeter, b_effi = b_i + 2 pi delta^* drdn.\nrhi: Edge density, rho_i = (1 + frac(gamma-1)2M^2 (10-u_ei^2))^frac1(gamma-1).\nmdef: Total mass defect, rho_i u_ei delta^* b_eff.\nPdef: Total momentum defect, rho_i u_ei^2 theta b_eff.\nEdef: Total kinetic energy defect, frac12 rho_i u_ei^3 theta^* b_eff.\ntauwb: Wall shear force/span, fractau_wb = frac12 u_ei^2 c_fi b_eff.\nDiss: Dissipation integral, rho_i u_ei^3 c_mathcalDi b_effi.Body profile drag D_p is the far-downstream momentum defect P_infty, best obtained by applying Squire-Young to the last wake point, i = n :P_end = rho_i u_ei^2 theta b_eff\nH_end = delta^*theta\nH_infty = 1 + (gamma-1) M^2\nH_avg = frac12 (H_end + H_inf)\nP_inf = P_end u_ei^H_avg = D_p\n\nSee Section 4 of Simplified Viscous/Inviscid Analysis for Nearly-Axisymmetric Bodies. See also blsys and blvar. Deprecates blax.\n\n\n\n\n\n","category":"method"},{"location":"aero/drag/#TASOPT.aerodynamics.blvar-NTuple{10, Any}","page":"Drag","title":"TASOPT.aerodynamics.blvar","text":"blvar(simi, lami, wake, Reyn, Mach, fexcr, x, θ, δs, ue)\n\nReturns the boundary layer variables needed for solution.\n\ndetails: 🔃 Inputs and Outputs\nInputs:simi::Integer: Self-similar BL profile flag.\nlami::Integer: Laminar flow flag.\nwake::Integer: In wake flag.\nReyn::Float64: Reynolds number.\nMach::Float64: Mach number for compressibility.\nfexcr::Float64: Excrescence factor.Outputs:h::Float64 : Shape parameter.\nhk::Float64: Kinematic shape parameter.\nhc::Float64: Density shape parameter (Whitfield).\nhs::Float64: Kinetic energy shape parameter.\ncf::Float64: Skin friction factor.\ncd::Float64: Dissipation factor and their derivatives.\n\n\n\n\n\n","category":"method"},{"location":"aero/drag/#TASOPT.aerodynamics.fusebl!-NTuple{4, Any}","page":"Drag","title":"TASOPT.aerodynamics.fusebl!","text":"fusebl!(pari, parg, para, ip)\n\nCalculates surface velocities, boundary layer, wake for a quasi-axisymmetric body in compressible flow.\n\nA compressible source line represents the potential flow. An integral BL formulation with lateral divergence represents the surface BL and wake. An added-source distribution represents the viscous displacement influence on the potential flow. The body shape is defined by its area and perimeter distributions A(x), b0(x), which are defined by the various geometric parameters in parg.\n\ndetails: 🔃 Inputs and Outputs\nInputs:pari::AbstractVector{Int64}: Vector of aircraft model integer/flag parameters.\nparg::AbstractArray{Float64}: Vector of aircraft model geometry parameters.\npara::AbstractArray{Float64}: Vector of aircraft model aerodynamic parameters.\nip::Integer: Index of flight point in par arrays.Outputs:No explicit outputs. Computed drag values are saved to para of aircraft model.\n\nSee Simplified Viscous/Inviscid Analysis for Nearly-Axisymmetric Bodies. See also blax and axisol!.\n\ncompat: Future Changes\nIn an upcoming revision, an aircraft struct and auxiliary indices will be passed in lieu of pre-sliced par arrays.\n\n\n\n\n\n","category":"method"},{"location":"aero/drag/","page":"Drag","title":"Drag","text":"","category":"page"},{"location":"aero/drag/#trefftz","page":"Drag","title":"Trefftz plane drag calculation","text":"","category":"section"},{"location":"aero/drag/","page":"Drag","title":"Drag","text":"Trefftz plane analysis computes the induced drag from lifting surfaces. The lift distributions are propagated downstream, accounting for streamline contraction from fuselage thickness variation as shown in the Figure below. ","category":"page"},{"location":"aero/drag/","page":"Drag","title":"Drag","text":"(Image: ) Two shaded streamtubes are shown. Wake center radius y_o is nonzero due to the fuselage viscous wake displacement area.","category":"page"},{"location":"aero/drag/","page":"Drag","title":"Drag","text":"The vorticity in the wake is numerially integrated at collocation points to determine the overall induced drag.","category":"page"},{"location":"aero/drag/","page":"Drag","title":"Drag","text":"(Image: T)","category":"page"},{"location":"aero/drag/","page":"Drag","title":"Drag","text":"Trefftz Plane vortices ii+1 ldots and collocation points i+12 used for velocity, impulse, and kinetic energy calculations. Left/right symmetry is exploited. ","category":"page"},{"location":"aero/drag/","page":"Drag","title":"Drag","text":"using Markdown\nMarkdown.parse_file(joinpath(\"../..\", \"src/aero\",\"theory_trefftz_plane.md\"))","category":"page"},{"location":"aero/drag/","page":"Drag","title":"Drag","text":"aerodynamics.cditrp(pari,parg,para)\n\naerodynamics.trefftz1(nsurf, npout, npinn, npimg,\n\tSref, bref,\n\tb,bs,bo,bop, zcent,\n\tpo,gammat,gammas, fLo,ktip,\n\tLspec,CLsurfsp,t, y, yp, z, zp, gw, yc, ycp, zc, zcp, gc, vc, wc, vnc)","category":"page"},{"location":"aero/drag/#TASOPT.aerodynamics.cditrp-Tuple{Any, Any, Any}","page":"Drag","title":"TASOPT.aerodynamics.cditrp","text":" cditrp(pari,parg,para)\n\nComputes the induced drag via the Trefftz plane. Calls trefftz1.\n\ndetails: 🔃 Inputs and Outputs\nInputs:pari::AbstractVector{Int64}: Vector of aircraft model integer/flag parameters.\nparg::AbstractArray{Float64}: Vector of aircraft model geometry parameters.\npara::AbstractArray{Float64}: Vector of aircraft model aerodynamic parameters.Outputs:No explicit outputs. Computed induced drag value and span efficiency are saved to para of aircraft model.\n\ncompat: Future Changes\nIn an upcoming revision, an aircraft struct and auxiliary indices will be passed in lieu of pre-sliced par arrays.\n\n\n\n\n\n","category":"method"},{"location":"aero/drag/#TASOPT.aerodynamics.trefftz1-NTuple{32, Any}","page":"Drag","title":"TASOPT.aerodynamics.trefftz1","text":"trefftz1(nsurf, npout, npinn, npimg, \n Sref, bref, b, bs, bo, bop, \n zcent, po, gammat, gammas, \n fLo,ktip, Lspec, CLsurfsp)\n\nTrefftz plane routine for the induced drag computation of nsurf number of surfaces.\n\ndetails: 🔃 Inputs and Outputs\nInputs:nsurf::Integer: Number of surfaces (typically wing and horizontal tail).\nnpout::Integer: Number of spanwise intervals (outer panel).\nnpinn::Integer: \" \" (inner panel).\nnpimg::Integer: \" \" (image inside fuselage).\nb::Float64: Span.\nbs::Float64: Wing-break span.\nbo::Float64: Wing-root span.\nbop::Float64: Span of wing-root streamline in Trefftz plane\nzcent::Vector{Float64}: Vertical position at centerline for each surface.\ngammat::Vector{Float64}, gammas::Vector{Float64}`: Wing lift distribution \"taper\" ratios for outer and inner wing sections, respectively.\nfLo: wing root load adjustment factors (currently not implemented).\nktip::Float64: wing tip load adjustment factors.\nLspec::Integer: Flag for specified lift calculation (scales vorticities to achieve CLsurfsp before computing induced drag).\nCLsurfsp::Vector{Float64}: Prescribed surface lift coefficient.Outputs: -CLsurf::Vector{Float64}: Lift coefficients for each surface. -CL::Float64: Sum of lift coefficients of all surfaces. -CD::Float64: Sum of induced drag coefficients of all surfaces. -spanef::Float64: Span efficiency of combined surfaces (= (CL^2 (π*AR))CD).\n\nSee theory above or Sections 2.14.7 and 3.8.1 of the TASOPT Technical Desc.\n\n\n\n\n\n","category":"method"},{"location":"aero/drag/","page":"Drag","title":"Drag","text":"","category":"page"},{"location":"aero/drag/#Wing-and-tail-surfaces","page":"Drag","title":"Wing and tail surfaces","text":"","category":"section"},{"location":"aero/drag/","page":"Drag","title":"Drag","text":"Lifting surface drag is determined via surfcd (when constant airfoil section cdf and cdp are already determined), and surfcd2 (when an explicit modelling and integration is desired). Airfoil performance is accessed via a lookup of precomputed airfoil data, airfun.","category":"page"},{"location":"aero/drag/","page":"Drag","title":"Drag","text":"aerodynamics.surfcd2(\n S,\n b, bs, bo,\n λt, λs, γt, γs,\n toco, tocs, toct,\n Mach, sweep, co,\n CL, CLhtail, fLo, fLt,\n Reco, aRexp, kSuns, fexcd,\n fduo, fdus, fdut)\n\naerodynamics.surfcd(S,\n b, bs, bo, λt, λs, sweep, co,\n cdf, cdp, Reco, Reref, aRexp, kSuns,\n fCDcen)\n\naerodynamics.airtable(fname)\n\naerodynamics.airfun(cl, τ, Mach, air::aerodynamics.airfoil)\n","category":"page"},{"location":"aero/drag/#TASOPT.aerodynamics.surfcd2-NTuple{25, Any}","page":"Drag","title":"TASOPT.aerodynamics.surfcd2","text":"surfcd2(S,\n b, bs, bo,\n λt, λs, γt, γs,\n toco, tocs, toct,\n Mach, sweep, co,\n CL, CLhtail, fLo, fLt,\n Reco, aRexp, kSuns, fexcd,\n AMa, Acl, Atau, ARe, A,\n fduo, fdus, fdut)\n\nCalculates wing or tail surface profile CD by calculating the performance of wing segments explicitly via airfoil data (found in [./src/air/C.air] and accessed by [airfun], [airtable]). Called by cdsum! if icdfun flag set to 1.\n\ndetails: 🔃 Inputs and Outputs\nInputs:S::Float64: Reference area.\nb::Float64: Span.\nbs::Float64: Outer panel break span.\nbo::Float64: Wing-root (fuselage) span.\nλt::Float64: Outer-panel chord taper ratio ct/co.\nλs::Float64: Inner-panel chord taper ratio cs/co.\nγt::Float64: Outer-panel load taper ratio pt/po.\nγs::Float64: Inner-panel load taper ratio ps/po.\ntoco::Float64: Root airfoil t/c.\ntocs::Float64: Break airfoil t/c.\ntoct::Float64: Tip airfoil t/c.\nsweep::Float64: Wing sweep, degrees.\nco::Float64: Wing root chord.\nReco::Float64: Reynolds number for co.\naRexp::Float64: Re-scaling exponent.\nkSuns::Float64: Shock-unsweep area constant.\nfexcd::Float64: Excrescence cd scaling factor.\nfduo::Float64, fdus::Float64, fdut::Float64: Velocity-change fractions at wing root, break (\"snag\"), and tip due to fuselage flow.Outputs:clpo::Float64,clps::Float64,clpt::Float64: Perpendicular sectional lift coefficient at wing root, break (\"snag\"), and tip.\nCDfwing::Float64: Friction profile cd in perp. plane.\nCDpwing::Float64: Pressure profile cd in perp. plane.\nCDwing::Float64: Overall profile CD.\nCDover::Float64: Fuselage added CD due to lift carryover.\n\nSee Sections 2.14.3 and 3.8.3 of TASOPT Technical Desc. See also cdsum!, surfcd, [surfcm], and [airfun].\n\ncompat: Future Changes\nThis function will be renamed for clarity of use.\n\n\n\n\n\n","category":"method"},{"location":"aero/drag/#TASOPT.aerodynamics.surfcd-NTuple{15, Any}","page":"Drag","title":"TASOPT.aerodynamics.surfcd","text":"surfcd(S, \nb, bs, bo, \nλt, λs, sweep, \nco, cdf, cdp, \nReco, Reref, \naRexp, kSuns, fCDcen)\n\nComputes wing or tail surface profile CD from pre-computed chord quantities and corrections. Called by cdsum! if icdfun flag set to 0.\n\ncompat: Future Changes\nThis function may be renamed for clarity of use.\n\ndetails: 🔃 Inputs and Outputs\nInputs:S::Float64: reference area.\nb::Float64: span.\nbs::Float64: outer panel break span.\nbo::Float64: wing-root (fuselage) span.\nλt::Float64: outer-panel taper ratio ctco.\nλs::Float64: inner-panel taper ratio csco.\nsweep::Float64: wing sweep, degrees.\nco::Float64: wing root chord.\ncdf::Float64: friction profile cd.\ncdp::Float64: pressure profile cd.\nReco::Float64: Reynolds number for co.\nReref::Float64: reference Reynolds number for cd scaling.\naRexp::Float64: Re-scaling exponent.\nkSuns::Float64: shock-unsweep area constant.\nfCDcen::Float64 : related to fraction of wing BLI (see Eqns. 619 - 621).Outputs:CDsurf: overall profile CD.\nCDover: fuselage added CD due to lift carryover.\n\nSee Sections 2.14.3 and 3.8.3 of the TASOPT Technical Desc.\n\n\n\n\n\n","category":"method"},{"location":"aero/drag/#TASOPT.aerodynamics.airtable-Tuple{Any}","page":"Drag","title":"TASOPT.aerodynamics.airtable","text":"airtable(fname)\n\nReads airfoil file and outputs the matrix and splines as an airfoil.\n\nThe airfoil data is stored as a function of three variables, typically Mach number mathrmMa, lift coefficient c_l, and thickness to chord ratio tau.\n\ncdf(Ma, cl, τ), cdp(Ma, cl, τ), cm(Ma, cl, τ)\n\ndetails: 🔃 Inputs and Outputs\nInputs:fname::String: Path to file.Outputs:airf::TASOPT.aerodynamics.airfoil: struct with airfoil performance characteristics.\n\n\n\n\n\n","category":"method"},{"location":"aero/drag/#TASOPT.aerodynamics.airfun-Tuple{Any, Any, Any, TASOPT.aerodynamics.airfoil}","page":"Drag","title":"TASOPT.aerodynamics.airfun","text":"airfun(cl, τ, Mach, air::airfoil)\n\nLooks up airfoil performance data at specified conditions, as precomputed and found in ./src/airfoil_data/.\n\ndetails: 🔃 Inputs and Outputs\nInputs: cl::Float64: Airfoil section lift coefficient.\nτ::Float64: Airfoil section thickness-to-chord ratio.\nMach::Float64: Mach number.\nair::TASOPT.aerodynamics.airfoil: airfoil structure with performance data.Outputs:cdf::Float64: Airfoil section skin friction drag.\ncdp::Float64: Airfoil section pressure drag.\ncdw::Float64: Airfoil section wave drag (unused and assumed 0 here; placeholder left for future implementation).\ncm::Float64: Airfoil section pitching moment.\n\n\n\n\n\n","category":"method"},{"location":"aero/drag/","page":"Drag","title":"Drag","text":"","category":"page"},{"location":"aero/drag/#Total-drag-calculation","page":"Drag","title":"Total drag calculation","text":"","category":"section"},{"location":"aero/drag/","page":"Drag","title":"Drag","text":"aerodynamics.cdsum!(pari, parg, para, pare, icdfun)","category":"page"},{"location":"aero/drag/#TASOPT.aerodynamics.cdsum!-NTuple{5, Any}","page":"Drag","title":"TASOPT.aerodynamics.cdsum!","text":"cdsum!(pari,parg,para,pare,icdfun)\n\nCalculates aircraft CD components for operating point, ipoint. If icdfun=1, computes wing cdf,cdp from airfoil database # iairf, otherwise uses default values in para array. Called by mission!, wsize, takeoff!, and odperf!.\n\nThe total drag is computed by\n\nC_D = C_D i + C_Dfuse + C_Dwing + C_Dover + C_Dhtail + C_Dvtail + C_Dstrut + C_Dnace + Delta C_DBLIf + Delta C_DBLIw\n\nwhere:\n\nC_Di (CDi) is the total induced drag including the wing and tail,\nC_Dfuse (CDfuse) is the fuselage profile drage computed by solving a boundary layer integral equation,\nC_Dwing (CDwing) is the wing profile drag (viscous + pressure) computed using airfoil data obtained from CFD,\nC_Dover (CDover) is the fuselage added CD due to lift carryover,\nC_Dhtail (CDhtail) is the horizontal tail profile drag computed in a similar manner with CDwing,\nC_Dvtail (CDvtail) is the vertical tail profile drag computed in a similar manner with CDwing,\nC_Dstrut (CDstrut) is the struct profile drag, \nC_Dnace (CDnace) is the nacelle profile drag,\nDelta C_DBLIf (dCDBLIf) is related to the boundary layer ingestion on the fuselage,\nand Delta C_DBLIw (dCDBLIw) is related to the boundary layer ingestion on the wing.\n\ndetails: 🔃 Inputs and Outputs\nInputs:pari::AbstractVector{Int64}: Vector of aircraft model integer/flag parameters.\nparg::AbstractArray{Float64}: Vector of aircraft model geometry parameters.\npara::AbstractArray{Float64}: Vector of aircraft model aerodynamic parameters.\npare::AbstractArray{Float64}: Vector of aircraft model engine parameters.\nicdfun::Integer: Flag if drag should be computed (=1) or if para values should be used (=0).Outputs:No explicit outputs. Computed drag values are saved to para of aircraft model.\n\nSee Section 2.14 of the TASOPT Technical Desc. See also trefftz1, fusebl!, surfcd2, surfcd, cfturb, and cditrp.\n\ncompat: Future Changes\nIn an upcoming revision, an aircraft struct and auxiliary indices will be passed in lieu of pre-sliced par arrays.\n\n\n\n\n\n","category":"method"},{"location":"aero/drag/","page":"Drag","title":"Drag","text":"","category":"page"},{"location":"aero/drag/#Other-utilities","page":"Drag","title":"Other utilities","text":"","category":"section"},{"location":"aero/drag/","page":"Drag","title":"Drag","text":"aerodynamics.cfturb","category":"page"},{"location":"aero/drag/#TASOPT.aerodynamics.cfturb","page":"Drag","title":"TASOPT.aerodynamics.cfturb","text":" cfturb(Re)\n\nReturns the total C_f for turbulent flat plate (one side) as a function of mathrmRe_l\n\nC_f turb = frac0523(log(006mathrmRe))^2 \n\n\n\n\n\n","category":"function"},{"location":"aero/drag/","page":"Drag","title":"Drag","text":"include(\"../../../src/aero/cdsum.jl\")\n","category":"page"},{"location":"aero/drag/","page":"Drag","title":"Drag","text":"For example, the turbulent flat plate C_f for a Re of 10e6 can be calculated as follows:","category":"page"},{"location":"aero/drag/","page":"Drag","title":"Drag","text":"Re = 10e6\ncfturb(Re)","category":"page"},{"location":"misc/dreladocs/#dreladocs","page":"Original Drela docs","title":"Original Drela docs","text":"","category":"section"},{"location":"misc/dreladocs/","page":"Original Drela docs","title":"Original Drela docs","text":"Obtained from Mark Drela's TASOPT site where all documents and Fortran code can be found.","category":"page"},{"location":"misc/dreladocs/","page":"Original Drela docs","title":"Original Drela docs","text":"#Copy files from source to build\ncp(\"../../drela_TASOPT_2p16/\", \"../assets/drela_TASOPT_2p16\");\nnothing #needs to either return nothing or a .md","category":"page"},{"location":"misc/dreladocs/","page":"Original Drela docs","title":"Original Drela docs","text":"TASOPT Technical Description\nSimplified Viscous/Inviscid Analysis for Nearly-Axisymmetric Bodies\nFilm Cooling Flow Loss Model\nTurbofan Sizing and Analysis with Variable cp(T)\nThermally-Perfect Gas Calculations\nBalanced Field Length Calculation\nTurbofan Weight Model from Historical Data","category":"page"},{"location":"misc/dreladocs/","page":"Original Drela docs","title":"Original Drela docs","text":"","category":"page"},{"location":"misc/dreladocs/#flowchart","page":"Original Drela docs","title":"TASOPT Flowchart","text":"","category":"section"},{"location":"misc/dreladocs/","page":"Original Drela docs","title":"Original Drela docs","text":"For an attempt to make graphical sense of the workflow, see here.","category":"page"},{"location":"misc/fordevs/#fordevs","page":"Notes for devs","title":"Notes for devs","text":"","category":"section"},{"location":"misc/fordevs/","page":"Notes for devs","title":"Notes for devs","text":"info: Info\nTASOPT.jl is very much a WIP. Get at us on github, but search the issues first. Thanks! 🙂","category":"page"},{"location":"misc/fordevs/","page":"Notes for devs","title":"Notes for devs","text":"tip: Tips\nRefer to the data structures to see where input file parameters end up.\nLook out for !!! compat admonishments marking where things will likely change in the future.\nReferences to NPSS are currently non-functional. We're working on replacing this functionality efficiently.","category":"page"},{"location":"#TASOPT.jl-Documentation","page":"Home","title":"TASOPT.jl Documentation","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"TASOPT.jl is a multi-disciplinary aircraft design and optimization code implemented in Julia based on TASOPT by Mark Drela.","category":"page"},{"location":"","page":"Home","title":"Home","text":"It can currently model tube-and-wing aircraft using 2D viscous-inviscid CFD to calculate aerodynamic performance, simple beam bending theory to size the wings, and thermodynamic cycle modeling to calculate engine performance.","category":"page"},{"location":"","page":"Home","title":"Home","text":"New modelling capabilities are actively being developed. Please be sure to refer to the full documentation and dev notes before financing a new airframe development project.","category":"page"},{"location":"","page":"Home","title":"Home","text":"","category":"page"},{"location":"#Getting-started","page":"Home","title":"Getting started","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"There are several workflows that are possible to use TASOPT.jl. We outline here the most common few.","category":"page"},{"location":"#Simple-install","page":"Home","title":"Simple install","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"The easiest way to run TASOPT.jl would be to add the package using the julia package manager using the github repository.","category":"page"},{"location":"","page":"Home","title":"Home","text":"You can do this by starting a Julia session and then activating the package manager by typing ] and then entering:","category":"page"},{"location":"","page":"Home","title":"Home","text":"pkg> add git@github.com:MIT-LAE/TASOPT.jl.git","category":"page"},{"location":"","page":"Home","title":"Home","text":"You can then import TASOPT as you would with any Julia package:","category":"page"},{"location":"","page":"Home","title":"Home","text":"julia> using TASOPT","category":"page"},{"location":"#Local-development","page":"Home","title":"Local development","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"If you are going to develop the source code of TASOPT.jl you might benefit from a local clone of the git repository which can then fit into a workflow using Revise.jl for example.","category":"page"},{"location":"","page":"Home","title":"Home","text":"Step 1: Clone the git repo locally","category":"page"},{"location":"","page":"Home","title":"Home","text":"git clone git@github.mit.edu:LAE/TAESOPT.jl.git","category":"page"},{"location":"","page":"Home","title":"Home","text":"Step 2: cd to the folder where TASOPT is cloned","category":"page"},{"location":"","page":"Home","title":"Home","text":"Step 3: Use Pkg to install/ develop the package","category":"page"},{"location":"","page":"Home","title":"Home","text":"pkg> dev .","category":"page"},{"location":"","page":"Home","title":"Home","text":"You should now be able to import TASOPT from within any Julia script in your base environment.","category":"page"},{"location":"","page":"Home","title":"Home","text":"We'd suggest starting with the examples.","category":"page"},{"location":"","page":"Home","title":"Home","text":"tip: Tip\nIf you are using Revise.jl be sure to first import Revise before importing TASOPTusing Revise\nusing TASOPT","category":"page"},{"location":"","page":"Home","title":"Home","text":"","category":"page"},{"location":"#Units-and-Non-Dimensionals","page":"Home","title":"Units and Non-Dimensionals","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"All dimensional quantities are treated internally as SI.","category":"page"},{"location":"","page":"Home","title":"Home","text":"Refer to /src/IO/default_input.toml for the input file's conversion capability and formatting. It's also useful for typical values and explaining inputs.","category":"page"},{"location":"","page":"Home","title":"Home","text":"Non-dimensionalization follows the Drela conventions (see TASOPT Technical Description).","category":"page"},{"location":"","page":"Home","title":"Home","text":"using Dates # hide\nprintln(\"Documentation built $(Dates.now()) with Julia $(VERSION)\") # hide","category":"page"},{"location":"aero/lift/#Lift","page":"Lift","title":"Lift","text":"","category":"section"},{"location":"aero/lift/","page":"Lift","title":"Lift","text":"Surface lift distributions tildep are defined in terms of a baseline piecewise-linear distribution pscriptstyle (eta) defined like the chord planform, but with its own taper ratios gamma_s and gamma_t. ","category":"page"},{"location":"aero/lift/","page":"Lift","title":"Lift","text":"(Image: ) Piecewise-linear aerodynamic load tildep scriptstyle (eta), with modifications at center and tip.","category":"page"},{"location":"aero/lift/","page":"Lift","title":"Lift","text":"The segments are integrated to compute the lift contribution to the wing root load, p_o, as required by structural computations. The sectional lift distribution is treated as an input to induced drag and surface drag computations.","category":"page"},{"location":"aero/lift/","page":"Lift","title":"Lift","text":"using Markdown\nMarkdown.parse_file(joinpath(\"../..\", \"src/aero\",\"theory_lifting.md\"))","category":"page"},{"location":"aero/lift/","page":"Lift","title":"Lift","text":"aerodynamics.wingpo(b, bs, bo,\n λt, λs, γt, γs,\n AR, N, W, Lhtail, fLo, fLt)\n\naerodynamics.wingcl(b,bs,bo,\n λt,λs,γt,γs,\n sweep,AR,CL,CLhtail,fLo,fLt,\n duo,dus,dut)","category":"page"},{"location":"aero/lift/#TASOPT.aerodynamics.wingpo-NTuple{13, Any}","page":"Lift","title":"TASOPT.aerodynamics.wingpo","text":"wingpo(b, bs, bo, \n λt, λs, γt, γs, \n AR, N, W, Lhtail, fLo, fLt)\n\nComputes wing root (\"center\") loading p_o to balance the net load.\n\nN*W - L_h tail times 2*p(η) dy + 2ΔL₀ + 2ΔLₜ = N*W - (L_htail)\n\ndetails: 🔃 Inputs and Outputs\nInputs:b::Float64: Wing span.\nbs::Float64: Span of inner wing section.\nbo::Float64: Span of wing box (span at wing root).\nλt::Float64, λs::Float64 : Wing chord taper ratios at tip and break (\"snag\"), respectively.\nγt::Float64,γs::Float64 : Wing lift distribution \"taper\" ratios for outer and inner wing sections, respectively.\nAR::Float64, N::Float64, W::Float64, Lhtail : Aspect ratio, Load factor, weight and H-tail lift.\nfLo::Float64, fLt::Float64 : Wing root and tip load adjustment factors.Outputs:po::Float64: Wing root loading magnitude.\n\nSee Section 2.6.2 of the TASOPT Technical Desc.\n\n\n\n\n\n","category":"method"},{"location":"aero/lift/#TASOPT.aerodynamics.wingcl-NTuple{16, Any}","page":"Lift","title":"TASOPT.aerodynamics.wingcl","text":"wingcl(b,bs,bo,\n λt,λs,γt,γs,\n sweep,AR,CL,CLhtail,fLo,fLt,\n duo,dus,dut)\n\nCalculates section cl at eta = ηo,ηs,1\n\ndetails: 🔃 Inputs and Outputs\nInputs:b::Float64, bs::Float64, bo::Float64: Span of wing, inner wing section (up to \"snag\"), and wing root, respectively.\nλt::Float64, λs::Float64: Wing chord taper ratios at tip and break (\"snag\"), respectively.\nγt::Float64, γs::Float64: Wing lift distribution \"taper\" ratios for outer and inner wing sections, respectively.\nsweep::Float64: Wing sweep for reference axis.\nAR::Float64: Wing aspect ratio, AR = b^2S.\nCL::Float64, CLhtail::Float64: Overall lift coefficient of wing and horizontal tail, respectively.\nfLo::Float64, fLt::Float64: Correction factors for lift of wingbox and tip.\nduo::Float64, dus::Float64, dut::Float64: Velocity-change fractions at wing root, break (\"snag\"), and tip due to fuselage flow.Outputs:clo::Float64, cls::Float64, clt::Float64: Section lift coefficient at root, wing break (\"snag\"), and tip.\n\nSee Sections 2.5 and 2.6 of the TASOPT Technical Desc. Called by cdsum!.\n\n\n\n\n\n","category":"method"}] } diff --git a/dev/sizing/sizing/index.html b/dev/sizing/sizing/index.html index d6a1f733..f9e4c293 100644 --- a/dev/sizing/sizing/index.html +++ b/dev/sizing/sizing/index.html @@ -1,12 +1,12 @@ Design and evaluation · TASOPT.jl

Design and evaluation

Sizing the aircraft

The aircraft is sized via a fixed point iteration for the design mission (wsize). The performance of the design can be evaluated for an off-design mission (woper).

wsize is typically the driving script in an analysis, as is the case in the size_aircraft! call (as demonstrated in the first example). The sizing analysis calls the various performance routines (e.g., fusebl, surfw, cdsum, mission, etc.) as shown in the TASOPT flowchart.

TASOPT.wsizeMethod
wsize(pari, parg, parm, para, pare,
     itermax, wrlx1, wrlx2, wrlx3,
-    initwgt, initeng, iairf, Ldebug, printiter, saveODperf)

Main weight sizing function. Calls on various sub-functions to calculate weight of fuselage, wings, tails, etc., and iterates until the MTOW converges to within a specified tolerance.

🔃 Inputs and Outputs

Inputs:

  • Array of flags that control design choices - fuel types, where to store fuel, etc.
  • Geometric and structural parameters - dimensions primarily
  • Aerodynamic parameters - CL, CD, KE dissipation, etc.
  • Mission-specific parameters - alt, mach, P, T etc.
  • Engine-specific parameters

Outputs:

  • No explicit outputs. Computed quantities are saved to par arrays of aircraft model.
source
TASOPT.woperMethod
woper(pari, parg, parm, para, pare, 
-      parad, pared, itermax, initeng, NPSS_PT, NPSS)

woper runs the aircraft through input off-design missions

Future Changes

In an upcoming revision, an aircraft struct and auxiliary indices will be passed in lieu of pre-sliced par arrays.

source

Mission evaluation

A sized aircraft's mission performance can be obtained (mission!), along with operation constraints via a pitch trim calculation (balance) and balanced field length calculation (takeoff!).

TASOPT.mission!Method
mission!(pari, parg, parm, para, pare, Ldebug)

Runs aircraft through mission, calculating fuel burn and other mission variables.

Input: pari[.] integer flags parg[.] geometry parameters parm[.] mission parameters iairf index of airfoil database to use initeng 0 = engine state will be initialized for all points 1 = engine state is assumed to be initialized ipc1 0 = ipcruise1 aero and engine point needs to be calculated 1 = ipcruise1 aero and engine point assumed calculated

Input/Output: para[.p] aero parameters for points p=1..iptotal pare[.p] engine parameters for points p=1..iptotal

NOTE: This routine assumes that estimates of the climb-leg flight path gamma angles are passed in via para[iagamV,ipclimb1:ipclimbn]. These appear as cos(gamma) factors in the climb equations, and can be passed in as zero with only a minor error. They are updated and returned in the same para[iagamV,ip] array.

!!! compat "Future Changes" In an upcoming revision, an aircraft struct and auxiliary indices will be passed in lieu of pre-sliced par arrays.

source
TASOPT.takeoff!Method
  takeoff(pari, parg, parm, para, pare,
+    initwgt, initeng, iairf, Ldebug, printiter, saveODperf)

Main weight sizing function. Calls on various sub-functions to calculate weight of fuselage, wings, tails, etc., and iterates until the MTOW converges to within a specified tolerance.

🔃 Inputs and Outputs

Inputs:

  • Array of flags that control design choices - fuel types, where to store fuel, etc.
  • Geometric and structural parameters - dimensions primarily
  • Aerodynamic parameters - CL, CD, KE dissipation, etc.
  • Mission-specific parameters - alt, mach, P, T etc.
  • Engine-specific parameters

Outputs:

  • No explicit outputs. Computed quantities are saved to par arrays of aircraft model.
source
TASOPT.woperMethod
woper(pari, parg, parm, para, pare, 
+      parad, pared, itermax, initeng, NPSS_PT, NPSS)

woper runs the aircraft through input off-design missions

Future Changes

In an upcoming revision, an aircraft struct and auxiliary indices will be passed in lieu of pre-sliced par arrays.

source

Mission evaluation

A sized aircraft's mission performance can be obtained (mission!), along with operation constraints via a pitch trim calculation (balance) and balanced field length calculation (takeoff!).

TASOPT.mission!Method
mission!(pari, parg, parm, para, pare, Ldebug)

Runs aircraft through mission, calculating fuel burn and other mission variables.

Input: pari[.] integer flags parg[.] geometry parameters parm[.] mission parameters iairf index of airfoil database to use initeng 0 = engine state will be initialized for all points 1 = engine state is assumed to be initialized ipc1 0 = ipcruise1 aero and engine point needs to be calculated 1 = ipcruise1 aero and engine point assumed calculated

Input/Output: para[.p] aero parameters for points p=1..iptotal pare[.p] engine parameters for points p=1..iptotal

NOTE: This routine assumes that estimates of the climb-leg flight path gamma angles are passed in via para[iagamV,ipclimb1:ipclimbn]. These appear as cos(gamma) factors in the climb equations, and can be passed in as zero with only a minor error. They are updated and returned in the same para[iagamV,ip] array.

!!! compat "Future Changes" In an upcoming revision, an aircraft struct and auxiliary indices will be passed in lieu of pre-sliced par arrays.

source
TASOPT.takeoff!Method
  takeoff(pari, parg, parm, para, pare,
         initeng, ichoke5, ichoke7)
 
   Calculates takeoff parameters and balanced field length.
   The aircraft must be defined in parg array. The ipstatic and iprotate points are assumed to exist.
 
   !!! compat "Future Changes"
-  In an upcoming revision, an `aircraft` struct and auxiliary indices will be passed in lieu of pre-sliced `par` arrays.
source
TASOPT.balanceMethod
  balance(pari, parg, para, rfuel, rpay, ξpay, itrim)

Makes one of three (or none) changes to achieve pitch trim calculates resulting CG, CP, NP locations.

Inputs:

  • pari[.] integer flag array
  • parg[.] geometry parameter array
  • para[.] aero parameter array
  • rfuel fuel fraction Wfuelactual/WfuelMTOW
  • rpay payload fraction Wpayactual/WpayMTOW
  • ξpay partial-payload packing location
    • = 0.0 all the way in front of cabin
    • = 0.5 all the way in middle of cabin
    • = 1.0 all the way in back of cabin
  • iengloc engine location index
  • itrim = 0 no changes
    • = 1 adjust CLh (horizontal tail cl)
    • = 2 adjust Sh (horizontal tail area)
    • = 3 adjust xwbox (wing box location)

Outputs:

  • para[iaxCG] center of gravity
  • para[iaxCP] center of pressure ( = xCG if itrim=1,2,3 )
  • para[iaxNP] neutral point location
Future Changes

In an upcoming revision, an aircraft struct and auxiliary indices will be passed in lieu of pre-sliced par arrays.

source
+ In an upcoming revision, an `aircraft` struct and auxiliary indices will be passed in lieu of pre-sliced `par` arrays.source
TASOPT.balanceMethod
  balance(pari, parg, para, rfuel, rpay, ξpay, itrim)

Makes one of three (or none) changes to achieve pitch trim calculates resulting CG, CP, NP locations.

Inputs:

  • pari[.] integer flag array
  • parg[.] geometry parameter array
  • para[.] aero parameter array
  • rfuel fuel fraction Wfuelactual/WfuelMTOW
  • rpay payload fraction Wpayactual/WpayMTOW
  • ξpay partial-payload packing location
    • = 0.0 all the way in front of cabin
    • = 0.5 all the way in middle of cabin
    • = 1.0 all the way in back of cabin
  • iengloc engine location index
  • itrim = 0 no changes
    • = 1 adjust CLh (horizontal tail cl)
    • = 2 adjust Sh (horizontal tail area)
    • = 3 adjust xwbox (wing box location)

Outputs:

  • para[iaxCG] center of gravity
  • para[iaxCP] center of pressure ( = xCG if itrim=1,2,3 )
  • para[iaxNP] neutral point location
Future Changes

In an upcoming revision, an aircraft struct and auxiliary indices will be passed in lieu of pre-sliced par arrays.

source
diff --git a/dev/sizing/weightmodels/index.html b/dev/sizing/weightmodels/index.html index e2adfded..489184d5 100644 --- a/dev/sizing/weightmodels/index.html +++ b/dev/sizing/weightmodels/index.html @@ -1,2 +1,2 @@ -Weight models · TASOPT.jl +Weight models · TASOPT.jl diff --git a/dev/structures/fueltanks/index.html b/dev/structures/fueltanks/index.html index d5d2e89b..1c77a206 100644 --- a/dev/structures/fueltanks/index.html +++ b/dev/structures/fueltanks/index.html @@ -40,11 +40,11 @@ - `Winsul_sum::Float64`: Sum of the insulation weight (N). - `Winsul::Float64`: Weight of insulation (N). - `l_tank::Float64`: Length of the tank (m). -- `Wtank::Float64`: Weight of the tank structure (N).

See here.

source
TASOPT.structures.tankWmechFunction
  tankWmech(gee, ρfuel,
         ftankstiff, ftankadd, Δp,
         Rfuse, dRfuse, wfb, nfweb,
         sigskin, rho_insul, rhoskin,
-        Wfuel, m_boiloff, t_cond, clearance_fuse, AR)

tankWmech calculates the weight of the cryogenic fuel tank for a LH-fueled aircraft.

🔃 Inputs and Outputs

Inputs:

  • gee::Float64: Gravitational acceleration (m/s^2).
  • ρfuel::Float64: Fuel density (kg/m^3).
  • ftankstiff::Float64: Tank stiffness factor.
  • ftankadd::Float64: Additional mass factor for the tank.
  • Δp::Float64: Pressure difference (Pa).
  • Rfuse::Float64: Fuselage radius (m).
  • dRfuse::Float64: Subtraction factor accounting for fuselage flatness (m).
  • wfb: Parameters for multiple-bubble configuration.
  • nfweb: Number of bubbles.
  • sigskin::Float64: Material property.
  • rho_insul::Array{Float64}: Array of insulation layer densities (kg/m3).
  • rhoskin::Float64: Material property.
  • Wfuel::Float64: Weight of fuel (N).
  • m_boiloff::Float64: Mass boiled off during the mission flight (kg).
  • t_cond::Array{Float64,1}: Thickness of insulation layers (m).
  • clearance_fuse::Float64: Clearance for the fuselage (m).
  • AR::Float64: Aspect ratio.

Outputs:

  • Wtank_total::Float64: Total tank weight including fuel (N).
  • l_cyl::Float64: Length of the cylindrical portion (m).
  • tskin::Float64: Thickness of the tank's skin (m).
  • Rtank_outer::Float64: Outer radius of the tank (m).
  • Vfuel::Float64: Volume of fuel (m^3).
  • Wtank::Float64: Weight of the empty tank (N).
  • Wfuel_tot::Float64: Total weight of fuel (N).
  • Winsul_sum::Float64: Sum of insulation weight (N).
  • t_head::Float64: Thickness of the tank's head (m).
  • Whead::Float64: Weight of the tank's head (N).
  • Wcyl::Float64: Weight of the tank's cylinder (N).
  • Winsul::Float64: Weight of insulation (N).
  • Shead_insul::Float64: Insulated surface area of the head (m^2).
  • l_tank::Float64: Total length of the tank (m).

NOTE: Al alloy 2219 has been recommended as tank material (from H2 tank paper in OneNote)

See here.

source
TASOPT.structures.tankWthermalFunction
  tankWthermal(l_cyl, r_tank, Shead,
+        Wfuel, m_boiloff, t_cond, clearance_fuse, AR)

tankWmech calculates the weight of the cryogenic fuel tank for a LH-fueled aircraft.

🔃 Inputs and Outputs

Inputs:

  • gee::Float64: Gravitational acceleration (m/s^2).
  • ρfuel::Float64: Fuel density (kg/m^3).
  • ftankstiff::Float64: Tank stiffness factor.
  • ftankadd::Float64: Additional mass factor for the tank.
  • Δp::Float64: Pressure difference (Pa).
  • Rfuse::Float64: Fuselage radius (m).
  • dRfuse::Float64: Subtraction factor accounting for fuselage flatness (m).
  • wfb: Parameters for multiple-bubble configuration.
  • nfweb: Number of bubbles.
  • sigskin::Float64: Material property.
  • rho_insul::Array{Float64}: Array of insulation layer densities (kg/m3).
  • rhoskin::Float64: Material property.
  • Wfuel::Float64: Weight of fuel (N).
  • m_boiloff::Float64: Mass boiled off during the mission flight (kg).
  • t_cond::Array{Float64,1}: Thickness of insulation layers (m).
  • clearance_fuse::Float64: Clearance for the fuselage (m).
  • AR::Float64: Aspect ratio.

Outputs:

  • Wtank_total::Float64: Total tank weight including fuel (N).
  • l_cyl::Float64: Length of the cylindrical portion (m).
  • tskin::Float64: Thickness of the tank's skin (m).
  • Rtank_outer::Float64: Outer radius of the tank (m).
  • Vfuel::Float64: Volume of fuel (m^3).
  • Wtank::Float64: Weight of the empty tank (N).
  • Wfuel_tot::Float64: Total weight of fuel (N).
  • Winsul_sum::Float64: Sum of insulation weight (N).
  • t_head::Float64: Thickness of the tank's head (m).
  • Whead::Float64: Weight of the tank's head (N).
  • Wcyl::Float64: Weight of the tank's cylinder (N).
  • Winsul::Float64: Weight of insulation (N).
  • Shead_insul::Float64: Insulated surface area of the head (m^2).
  • l_tank::Float64: Total length of the tank (m).

NOTE: Al alloy 2219 has been recommended as tank material (from H2 tank paper in OneNote)

See here.

source
TASOPT.structures.tankWthermalFunction
  tankWthermal(l_cyl, r_tank, Shead,
         hconvgas, h_LH2, hconvair, 
         t_cond, k, Tfuel, Tair, 
-        h_v:, time_flight)

tankWthermal calculates the boil-off rate of LH2 for a given insulation thickness.

This subroutine does not size the thermal insulation layers but rather calculates the boil-off rate of fLH2, for a given insulation thickness

🔃 Inputs and Outputs

Inputs:

  • l_cyl::Float64: Length of the tank (m).
  • r_tank::Float64: Tank outer radius (m).
  • Shead::Array{Float64,1}: Array of surface areas of each layer of the end/head of the tank [m²].
  • hconvgas::Float64: Convective coefficient of insulating purged gas (W/m²*K).
  • h_LH2::Float64: LH2 convective coefficient (W/m²*K).
  • hconvair::Float64: Convective coefficient of ambient air (W/m²*K).
  • t_cond::Array{Float64,1}: Array of thickness of each layer in MLI (m).
  • k::Array{Float64,1}: Thermal conductivity array (W/(m*K)) comprising k values for each MLI layer.
  • Tfuel::Float64: Fuel temperature (K).
  • Tair::Float64: Ambient temperature (K).
  • h_v::Float64: Heat of vaporization of liquid hydrogen (J/kg).
  • time_flight::Float64: Time of flight (s).

Outputs:

  • m_boiloff::Float64: Boil-off LH2 mass (kg).
  • mdot_boiloff::Float64: Boil-off rate of LH2 (kg/s).

See here.

source
+ h_v:, time_flight)

tankWthermal calculates the boil-off rate of LH2 for a given insulation thickness.

This subroutine does not size the thermal insulation layers but rather calculates the boil-off rate of fLH2, for a given insulation thickness

🔃 Inputs and Outputs

Inputs:

  • l_cyl::Float64: Length of the tank (m).
  • r_tank::Float64: Tank outer radius (m).
  • Shead::Array{Float64,1}: Array of surface areas of each layer of the end/head of the tank [m²].
  • hconvgas::Float64: Convective coefficient of insulating purged gas (W/m²*K).
  • h_LH2::Float64: LH2 convective coefficient (W/m²*K).
  • hconvair::Float64: Convective coefficient of ambient air (W/m²*K).
  • t_cond::Array{Float64,1}: Array of thickness of each layer in MLI (m).
  • k::Array{Float64,1}: Thermal conductivity array (W/(m*K)) comprising k values for each MLI layer.
  • Tfuel::Float64: Fuel temperature (K).
  • Tair::Float64: Ambient temperature (K).
  • h_v::Float64: Heat of vaporization of liquid hydrogen (J/kg).
  • time_flight::Float64: Time of flight (s).

Outputs:

  • m_boiloff::Float64: Boil-off LH2 mass (kg).
  • mdot_boiloff::Float64: Boil-off rate of LH2 (kg/s).

See here.

source diff --git a/dev/structures/fuselage/index.html b/dev/structures/fuselage/index.html index 15424073..4b7dc742 100644 --- a/dev/structures/fuselage/index.html +++ b/dev/structures/fuselage/index.html @@ -102,4 +102,4 @@ xfix, xapu, xeng, xfuel, hfloor, sigskin, sigbend, rhoskin, rhobend, - Eskin, Ebend, Gskin)

fusew sizes the fuselage and calculates the component weights and structural properties. It takes inputs related to geometry, fixed weights, material properties, and more to compute the fuselage dimensions, weights, and other parameters.

🔃 Inputs and Outputs

Inputs:

  • Nland::Integer: Number of landing gear components.

Fixed weights of various components:

  • Wfix::Float64: Fixed weight of the structure.
  • Wpay::Float64: Fixed weight of payload.
  • Wpadd::Float64: Fixed weight of additional equipment.
  • Wseat::Float64: Fixed weight of seats.
  • Wapu::Float64: Fixed weight of auxiliary power unit.
  • Weng::Float64: Fixed weight of engines.
  • Waftfuel::Float64: Fixed weight of aft fuel storage.

Factors for stringers, frames, and additional structural components:

  • fstring::Float64: Factor for stringers.
  • fframe::Float64: Factor for frames.
  • ffadd::Float64: Factor for additional structural components.

Pressure differential:

  • deltap::Float64: Pressure differential.

Weights of window, insulation, and floor:

  • Wpwindow::Float64: Weight of windows.
  • Wppinsul::Float64: Weight of insulation.
  • Wppfloor::Float64: Weight of floor.

Vertical tail parameters:

  • Whtail::Float64: Weight of horizontal tail components.
  • Wvtail::Float64: Weight of vertical tail components.
  • rMh::Float64: Horizontal tail moment arm.
  • rMv::Float64: Vertical tail moment arm.
  • Lhmax::Float64: Maximum horizontal tail length.
  • Lvmax::Float64: Maximum vertical tail length.
  • bv::Float64: Vertical tail span.
  • lambdav::Float64: Vertical tail taper ratio.
  • nvtail::Integer: Number of vertical tail units.

Fuselage parameters:

  • Rfuse::Float64: Fuselage radius.
  • dRfuse::Float64: Fuselage thickness.
  • wfb::Float64: Fuselage width.
  • nfweb::Integer: Number of fuselage webs.
  • lambdac::Float64: Fuselage taper ratio.

Geometric parameters and locations:

  • xnose::Float64: X location of the nose.
  • xshell1::Float64: X location of the first shell point.
  • xshell2::Float64: X location of the second shell point.
  • xconend::Float64: X location of the cone end.
  • xhtail::Float64: X location of horizontal tail components.
  • xvtail::Float64: X location of vertical tail components.
  • xwing::Float64: X location of the wing.
  • xwbox::Float64: X location of the wing box.
  • cbox::Float64: Wing box width.
  • xfix::Float64: X location of fixed components.
  • xapu::Float64: X location of auxiliary power unit.
  • xeng::Float64: X location of engines.
  • xfuel::Float64: X location of fuel storage.
  • hfloor::Float64: Height of the floor.

Material properties:

  • sigskin::Float64: Skin material stress.
  • sigbend::Float64: Bending material stress.
  • rhoskin::Float64: Skin material density.
  • rhobend::Float64: Bending material density.
  • Eskin::Float64: Skin material Young's modulus.
  • Ebend::Float64: Bending material Young's modulus.
  • Gskin::Float64: Skin material shear modulus.

Outputs:

Thicknesses and locations:

  • tskin::Float64: Fuselage skin thickness.
  • tcone::Float64: Thickness of the tail cone.
  • tfweb::Float64: Thickness of fuselage webs.
  • tfloor::Float64: Floor beam thickness.
  • xhbend::Float64: X location of added material for horizontal-axis bending.
  • xvbend::Float64: X location of added material for vertical-axis bending.

Bending and torsion inertias:

  • EIhshell::Float64: Bending inertia for horizontal shell.
  • EIhbend::Float64: Bending inertia for horizontal axis bending.
  • EIvshell::Float64: Bending inertia for vertical shell.
  • EIvbend::Float64: Bending inertia for vertical axis bending.
  • GJshell::Float64: Torsional stiffness for horizontal shell.
  • GJcone::Float64: Torsional stiffness for tail cone.

Weights of components and total fuselage weight:

  • Wshell::Float64: Weight of fuselage shell components.
  • Wcone::Float64: Weight of tail cone.
  • Wwindow::Float64: Weight of windows.
  • Winsul::Float64: Weight of insulation.
  • Wfloor::Float64: Weight of floor.
  • Whbend::Float64: Weight of horizontal-axis bending material.
  • Wvbend::Float64: Weight of vertical-axis bending material.
  • Wfuse::Float64: Total weight of the fuselage.

Moments

  • xWfuse::Float64: Moments.

Pressurized cabin volume:

  • cabVol::Float64: Pressurized cabin volume.

See here or Section 2.2 of the TASOPT Technical Description.

source + Eskin, Ebend, Gskin)

fusew sizes the fuselage and calculates the component weights and structural properties. It takes inputs related to geometry, fixed weights, material properties, and more to compute the fuselage dimensions, weights, and other parameters.

🔃 Inputs and Outputs

Inputs:

  • Nland::Integer: Number of landing gear components.

Fixed weights of various components:

  • Wfix::Float64: Fixed weight of the structure.
  • Wpay::Float64: Fixed weight of payload.
  • Wpadd::Float64: Fixed weight of additional equipment.
  • Wseat::Float64: Fixed weight of seats.
  • Wapu::Float64: Fixed weight of auxiliary power unit.
  • Weng::Float64: Fixed weight of engines.
  • Waftfuel::Float64: Fixed weight of aft fuel storage.

Factors for stringers, frames, and additional structural components:

  • fstring::Float64: Factor for stringers.
  • fframe::Float64: Factor for frames.
  • ffadd::Float64: Factor for additional structural components.

Pressure differential:

  • deltap::Float64: Pressure differential.

Weights of window, insulation, and floor:

  • Wpwindow::Float64: Weight of windows.
  • Wppinsul::Float64: Weight of insulation.
  • Wppfloor::Float64: Weight of floor.

Vertical tail parameters:

  • Whtail::Float64: Weight of horizontal tail components.
  • Wvtail::Float64: Weight of vertical tail components.
  • rMh::Float64: Horizontal tail moment arm.
  • rMv::Float64: Vertical tail moment arm.
  • Lhmax::Float64: Maximum horizontal tail length.
  • Lvmax::Float64: Maximum vertical tail length.
  • bv::Float64: Vertical tail span.
  • lambdav::Float64: Vertical tail taper ratio.
  • nvtail::Integer: Number of vertical tail units.

Fuselage parameters:

  • Rfuse::Float64: Fuselage radius.
  • dRfuse::Float64: Fuselage thickness.
  • wfb::Float64: Fuselage width.
  • nfweb::Integer: Number of fuselage webs.
  • lambdac::Float64: Fuselage taper ratio.

Geometric parameters and locations:

  • xnose::Float64: X location of the nose.
  • xshell1::Float64: X location of the first shell point.
  • xshell2::Float64: X location of the second shell point.
  • xconend::Float64: X location of the cone end.
  • xhtail::Float64: X location of horizontal tail components.
  • xvtail::Float64: X location of vertical tail components.
  • xwing::Float64: X location of the wing.
  • xwbox::Float64: X location of the wing box.
  • cbox::Float64: Wing box width.
  • xfix::Float64: X location of fixed components.
  • xapu::Float64: X location of auxiliary power unit.
  • xeng::Float64: X location of engines.
  • xfuel::Float64: X location of fuel storage.
  • hfloor::Float64: Height of the floor.

Material properties:

  • sigskin::Float64: Skin material stress.
  • sigbend::Float64: Bending material stress.
  • rhoskin::Float64: Skin material density.
  • rhobend::Float64: Bending material density.
  • Eskin::Float64: Skin material Young's modulus.
  • Ebend::Float64: Bending material Young's modulus.
  • Gskin::Float64: Skin material shear modulus.

Outputs:

Thicknesses and locations:

  • tskin::Float64: Fuselage skin thickness.
  • tcone::Float64: Thickness of the tail cone.
  • tfweb::Float64: Thickness of fuselage webs.
  • tfloor::Float64: Floor beam thickness.
  • xhbend::Float64: X location of added material for horizontal-axis bending.
  • xvbend::Float64: X location of added material for vertical-axis bending.

Bending and torsion inertias:

  • EIhshell::Float64: Bending inertia for horizontal shell.
  • EIhbend::Float64: Bending inertia for horizontal axis bending.
  • EIvshell::Float64: Bending inertia for vertical shell.
  • EIvbend::Float64: Bending inertia for vertical axis bending.
  • GJshell::Float64: Torsional stiffness for horizontal shell.
  • GJcone::Float64: Torsional stiffness for tail cone.

Weights of components and total fuselage weight:

  • Wshell::Float64: Weight of fuselage shell components.
  • Wcone::Float64: Weight of tail cone.
  • Wwindow::Float64: Weight of windows.
  • Winsul::Float64: Weight of insulation.
  • Wfloor::Float64: Weight of floor.
  • Whbend::Float64: Weight of horizontal-axis bending material.
  • Wvbend::Float64: Weight of vertical-axis bending material.
  • Wfuse::Float64: Total weight of the fuselage.

Moments

  • xWfuse::Float64: Moments.

Pressurized cabin volume:

  • cabVol::Float64: Pressurized cabin volume.

See here or Section 2.2 of the TASOPT Technical Description.

source diff --git a/dev/structures/theory_wingstruct/index.html b/dev/structures/theory_wingstruct/index.html index bede4f2c..debdebf6 100644 --- a/dev/structures/theory_wingstruct/index.html +++ b/dev/structures/theory_wingstruct/index.html @@ -37,4 +37,4 @@ { \displaystyle 2 \frac{ r_h \bar{h} \!-\! \bar{t}_{\rm cap}}{G_{\rm web}\bar{t}_{\rm web}} \:+\: 2 \frac{ \bar{w} \!-\! \bar{t}_{\rm web}}{G_{\rm cap}\bar{t}_{\rm cap}} } -\end{aligned}\]

+\end{aligned}\]

diff --git a/dev/structures/wing/index.html b/dev/structures/wing/index.html index f5ce503b..8889fa83 100644 --- a/dev/structures/wing/index.html +++ b/dev/structures/wing/index.html @@ -43,4 +43,4 @@ Winn, Wout, dyWinn, dyWout, sweep, wbox, hboxo, hboxs, rh, fLt, tauweb, sigcap, sigstrut, Ecap, Eweb, Gcap, Gweb, - rhoweb, rhocap, rhostrut, rhofuel)

Calculates Wing or Tail loads, stresses, weights of individual wing sections. Also returns the material gauges, torsional and bending stiffness.

🔃 Inputs and Outputs

Inputs:

  • po::Float64: Point where loads and stresses are calculated.
  • b::Float64: Wingspan.
  • bs::Float64: Spanwise location of the start of the taper.
  • bo::Float64: Spanwise location of the root chord.
  • co::Float64: Root chord length.
  • zs::Float64: Height of the strut attach point above wing.
  • lambdat::Float64: Tip chord ratio (tip chord / root chord).
  • lambdas::Float64: Start chord ratio (start chord / root chord).
  • gammat::Float64: Tip airfoil section shape exponent.
  • gammas::Float64: Start airfoil section shape exponent.
  • Nload::Int: Number of loads (used to distribute engine loads).
  • iwplan::Int: Indicates the presence of a strut.
  • We::Float64: Weight of the engine.
  • neout::Int: Number of outboard engines.
  • dyeout::Float64: Distance between engines and the wingtip.
  • neinn::Int: Number of inboard engines.
  • dyeinn::Float64: Distance between engines and the wing root.
  • Winn::Float64: Weight of inboard engines.
  • Wout::Float64: Weight of outboard engines.
  • dyWinn::Float64: Weight distribution of inboard engines.
  • dyWout::Float64: Weight distribution of outboard engines.
  • sweep::Float64: Sweep angle in degrees.
  • wbox::Float64: Width of the wing box.
  • hboxo::Float64: Height of the wing box at the root.
  • hboxs::Float64: Height of the wing box at the strut attach point.
  • rh::Float64: Fractional height of the wing box.
  • fLt::Float64: Factor applied to the tip load.
  • tauweb::Float64: Web material shear strength.
  • sigcap::Float64: Cap material axial compressive strength.
  • sigstrut::Float64: Strut material axial compressive strength.
  • Ecap::Float64: Cap material Young's modulus.
  • Eweb::Float64: Web material Young's modulus.
  • Gcap::Float64: Cap material shear modulus.
  • Gweb::Float64: Web material shear modulus.
  • rhoweb::Float64: Density of the web material.
  • rhocap::Float64: Density of the cap material.
  • rhostrut::Float64: Density of the strut material.
  • rhofuel::Float64: Density of the fuel.

Outputs:

  • Ss::Float64: Outboard section shear load.
  • Ms::Float64: Outboard section moment.
  • tbwebs::Float64: Web thickness at the strut attach point.
  • tbcaps::Float64: Cap thickness at the strut attach point.
  • EIcs::Float64: Combined cap and web bending stiffness at the strut attach point.
  • EIns::Float64: Combined cap and web normal stiffness at the strut attach point.
  • GJs::Float64: Combined cap and web shear stiffness at the strut attach point.
  • So::Float64: Inboard section shear load.
  • Mo::Float64: Inboard section moment.
  • tbwebo::Float64: Web thickness at the wing root.
  • tbcapo::Float64: Cap thickness at the wing root.
  • EIco::Float64: Combined cap and web bending stiffness at the wing root.
  • EIno::Float64: Combined cap and web normal stiffness at the wing root.
  • GJo::Float64: Combined cap and web shear stiffness at the wing root.
  • Astrut::Float64: Strut axial force.
  • lsp::Float64: Strut length.
  • cosLs::Float64: Cosine of the sweep angle at the strut attach point.
  • Wscen::Float64: Weight of center section (inboard of the strut).
  • Wsinn::Float64: Weight of the inner section.
  • Wsout::Float64: Weight of the outer section.
  • dxWsinn::Float64: Lateral distribution of inner section weight.
  • dxWsout::Float64: Lateral distribution of outer section weight.
  • dyWsinn::Float64: Vertical distribution of inner section weight.
  • dyWsout::Float64: Vertical distribution of outer section weight.
  • Wfcen::Float64: Weight of center section fuel.
  • Wfinn::Float64: Weight of the inner section fuel.
  • Wfout::Float64: Weight of the outer section fuel.
  • dxWfinn::Float64: Lateral distribution of inner section fuel weight.
  • dxWfout::Float64: Lateral distribution of outer section fuel weight.
  • dyWfinn::Float64: Vertical distribution of inner section fuel weight.
  • dyWfout::Float64: Vertical distribution of outer section fuel weight.
  • Wweb::Float64: Weight of the wing web.
  • Wcap::Float64: Weight of the wing cap.
  • Wstrut::Float64: Weight of the strut.
  • dxWweb::Float64: Lateral distribution of web weight.
  • dxWcap::Float64: Lateral distribution of cap weight.
  • dxWstrut::Float64: Lateral distribution of strut weight.

See Geometry, Wing/Tail Structures, and Section 2.7 of the TASOPT Technical Description.

source
TASOPT.structures.tailpoMethod
tailpo(S, AR, λa, qne, CLmax)

Calculates stabilizer span, root chord, and root loading based on the never-exceed dynamic pressure, maximum CL, sweep, and aspect ratio.

🔃 Inputs and Outputs

Inputs:

  • S::Float64: Stabilizer area.
  • AR::Float64: Stabilizer aspect ratio.
  • λa::Float64: Stabilizer taper ratio (tip chord / root chord).
  • qne::Float64: Never-exceed dynamic pressure.
  • CLmax::Float64: Maximum coefficient of lift.

Outputs:

  • b::Float64: Stabilizer wingspan.
  • co::Float64: Stabilizer root chord length.
  • po::Float64: Stabilizer root loading.

See Geometry or Section 2.3.2 and 2.9.6 of the TASOPT Technical Description.

source
TASOPT.structures.surfdxMethod
  surfdx(b, bs, bo, λt, λs, sweep)

Calculates area centroid x-offset due to sweep and the mean aerodynamic chord (normalized by root chord, co)

🔃 Inputs and Outputs

Inputs:

  • b::Float64: Wingspan
  • bs::Float64: Spanwise location of the start of the taper
  • bo::Float64: Spanwise location of the root chord
  • λt::Float64: Tip chord ratio (tip chord / root chord)
  • λs::Float64: Start chord ratio (start chord / root chord).
  • sweep::Float64: Sweep angle in degrees.

Outputs:

  • dx::Float64: Area centroid x-offset due to sweep
  • macco::Float64: Mean aerodynamic chord normalized by root chord.

See Geometry or Section 2.5.1 of the TASOPT Technical Description.

source
+ rhoweb, rhocap, rhostrut, rhofuel)

Calculates Wing or Tail loads, stresses, weights of individual wing sections. Also returns the material gauges, torsional and bending stiffness.

🔃 Inputs and Outputs

Inputs:

  • po::Float64: Point where loads and stresses are calculated.
  • b::Float64: Wingspan.
  • bs::Float64: Spanwise location of the start of the taper.
  • bo::Float64: Spanwise location of the root chord.
  • co::Float64: Root chord length.
  • zs::Float64: Height of the strut attach point above wing.
  • lambdat::Float64: Tip chord ratio (tip chord / root chord).
  • lambdas::Float64: Start chord ratio (start chord / root chord).
  • gammat::Float64: Tip airfoil section shape exponent.
  • gammas::Float64: Start airfoil section shape exponent.
  • Nload::Int: Number of loads (used to distribute engine loads).
  • iwplan::Int: Indicates the presence of a strut.
  • We::Float64: Weight of the engine.
  • neout::Int: Number of outboard engines.
  • dyeout::Float64: Distance between engines and the wingtip.
  • neinn::Int: Number of inboard engines.
  • dyeinn::Float64: Distance between engines and the wing root.
  • Winn::Float64: Weight of inboard engines.
  • Wout::Float64: Weight of outboard engines.
  • dyWinn::Float64: Weight distribution of inboard engines.
  • dyWout::Float64: Weight distribution of outboard engines.
  • sweep::Float64: Sweep angle in degrees.
  • wbox::Float64: Width of the wing box.
  • hboxo::Float64: Height of the wing box at the root.
  • hboxs::Float64: Height of the wing box at the strut attach point.
  • rh::Float64: Fractional height of the wing box.
  • fLt::Float64: Factor applied to the tip load.
  • tauweb::Float64: Web material shear strength.
  • sigcap::Float64: Cap material axial compressive strength.
  • sigstrut::Float64: Strut material axial compressive strength.
  • Ecap::Float64: Cap material Young's modulus.
  • Eweb::Float64: Web material Young's modulus.
  • Gcap::Float64: Cap material shear modulus.
  • Gweb::Float64: Web material shear modulus.
  • rhoweb::Float64: Density of the web material.
  • rhocap::Float64: Density of the cap material.
  • rhostrut::Float64: Density of the strut material.
  • rhofuel::Float64: Density of the fuel.

Outputs:

  • Ss::Float64: Outboard section shear load.
  • Ms::Float64: Outboard section moment.
  • tbwebs::Float64: Web thickness at the strut attach point.
  • tbcaps::Float64: Cap thickness at the strut attach point.
  • EIcs::Float64: Combined cap and web bending stiffness at the strut attach point.
  • EIns::Float64: Combined cap and web normal stiffness at the strut attach point.
  • GJs::Float64: Combined cap and web shear stiffness at the strut attach point.
  • So::Float64: Inboard section shear load.
  • Mo::Float64: Inboard section moment.
  • tbwebo::Float64: Web thickness at the wing root.
  • tbcapo::Float64: Cap thickness at the wing root.
  • EIco::Float64: Combined cap and web bending stiffness at the wing root.
  • EIno::Float64: Combined cap and web normal stiffness at the wing root.
  • GJo::Float64: Combined cap and web shear stiffness at the wing root.
  • Astrut::Float64: Strut axial force.
  • lsp::Float64: Strut length.
  • cosLs::Float64: Cosine of the sweep angle at the strut attach point.
  • Wscen::Float64: Weight of center section (inboard of the strut).
  • Wsinn::Float64: Weight of the inner section.
  • Wsout::Float64: Weight of the outer section.
  • dxWsinn::Float64: Lateral distribution of inner section weight.
  • dxWsout::Float64: Lateral distribution of outer section weight.
  • dyWsinn::Float64: Vertical distribution of inner section weight.
  • dyWsout::Float64: Vertical distribution of outer section weight.
  • Wfcen::Float64: Weight of center section fuel.
  • Wfinn::Float64: Weight of the inner section fuel.
  • Wfout::Float64: Weight of the outer section fuel.
  • dxWfinn::Float64: Lateral distribution of inner section fuel weight.
  • dxWfout::Float64: Lateral distribution of outer section fuel weight.
  • dyWfinn::Float64: Vertical distribution of inner section fuel weight.
  • dyWfout::Float64: Vertical distribution of outer section fuel weight.
  • Wweb::Float64: Weight of the wing web.
  • Wcap::Float64: Weight of the wing cap.
  • Wstrut::Float64: Weight of the strut.
  • dxWweb::Float64: Lateral distribution of web weight.
  • dxWcap::Float64: Lateral distribution of cap weight.
  • dxWstrut::Float64: Lateral distribution of strut weight.

See Geometry, Wing/Tail Structures, and Section 2.7 of the TASOPT Technical Description.

source
TASOPT.structures.tailpoMethod
tailpo(S, AR, λa, qne, CLmax)

Calculates stabilizer span, root chord, and root loading based on the never-exceed dynamic pressure, maximum CL, sweep, and aspect ratio.

🔃 Inputs and Outputs

Inputs:

  • S::Float64: Stabilizer area.
  • AR::Float64: Stabilizer aspect ratio.
  • λa::Float64: Stabilizer taper ratio (tip chord / root chord).
  • qne::Float64: Never-exceed dynamic pressure.
  • CLmax::Float64: Maximum coefficient of lift.

Outputs:

  • b::Float64: Stabilizer wingspan.
  • co::Float64: Stabilizer root chord length.
  • po::Float64: Stabilizer root loading.

See Geometry or Section 2.3.2 and 2.9.6 of the TASOPT Technical Description.

source
TASOPT.structures.surfdxMethod
  surfdx(b, bs, bo, λt, λs, sweep)

Calculates area centroid x-offset due to sweep and the mean aerodynamic chord (normalized by root chord, co)

🔃 Inputs and Outputs

Inputs:

  • b::Float64: Wingspan
  • bs::Float64: Spanwise location of the start of the taper
  • bo::Float64: Spanwise location of the root chord
  • λt::Float64: Tip chord ratio (tip chord / root chord)
  • λs::Float64: Start chord ratio (start chord / root chord).
  • sweep::Float64: Sweep angle in degrees.

Outputs:

  • dx::Float64: Area centroid x-offset due to sweep
  • macco::Float64: Mean aerodynamic chord normalized by root chord.

See Geometry or Section 2.5.1 of the TASOPT Technical Description.

source