diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index 56b9e512..b6a0e65b 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.11.0","generation_timestamp":"2024-10-10T16:00:05","documenter_version":"1.7.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.11.0","generation_timestamp":"2024-10-11T12:08:47","documenter_version":"1.7.0"}} \ No newline at end of file diff --git a/dev/aero/drag/index.html b/dev/aero/drag/index.html index ca091726..6dd28133 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.
  • parm::AbstractArray{Float64}: Vector of aircraft model mission 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.
  • parm::AbstractArray{Float64}: Vector of aircraft model mission 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::AbstractVector{Float64}: Vector of aircraft model geometry parameters.
  • para::AbstractArray{Float64}: Array 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::AbstractVector{Float64}: Vector of aircraft model geometry parameters.
  • para::AbstractArray{Float64}: Array 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:

Outputs:

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 8d1cd525..caf684e2 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 fa4a7cc1..8f8ee4d6 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:

Outputs:

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 1f068110..0bda0ba8 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:

Outputs:

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 3a4e6edd..91d0a2e1 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 df039f50..59af5b66 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 b8a52dad..e55e7b21 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 c28ff248..6d9f7c02 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 e9a27a0a..a3cadf56 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 d49743b4..aa320b68 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, ΔT)

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

Also calculates viscosity using Sutherland's law. Non-standard sea-level temperatures are allowed with an ISA + ΔT like model.

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, ΔT)

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

Also calculates viscosity using Sutherland's law. Non-standard sea-level temperatures are allowed with an ISA + ΔT like model.

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 1b8906ef..93dd894e 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/cryo_tank/cryotank/index.html b/dev/cryo_tank/cryotank/index.html index 434b008f..3cce2f8d 100644 --- a/dev/cryo_tank/cryotank/index.html +++ b/dev/cryo_tank/cryotank/index.html @@ -2,4 +2,4 @@ Homogeneous model · TASOPT.jl

Homogeneous model

In a tank containing a boiling liquid, such as a cryogenic liquid that has reached its saturation point, two fluid states exist: a liquid phase and a gas phase (or vapor). In a real tank, there would be some level of stratification leading to temperature differences between the two phases, which exist at the same pressure. This section describes the models used to simulate the evolution in time of the conditions inside a cryogenic tank. It is based on the homogeneous tank model[1][2][3], which treats the fluid inside the tank as a well-mixed saturated mixture at homogeneous temperature and pressure.

Theory

📖 Theory - Homogeneous model

Ordinary-differential equation system

Let us consider a tank that contains a mixture of saturated liquid and gas phases at a saturation pressure $p$. The tank has a heat rate $\dot{Q}$ into it and a work rate $\dot{W}$ is performed in the tank. The tank also has a mass flow rate $\dot{m}$ out of the tank of a fluid with quality $x_{out}$. In general, the tank may also be vented with a venting mass flow rate $\dot{m}_{vent}$ of fluid with a quality $x_{vent}$. From conservation of energy, it can be shown that the derivative in time of the saturation pressure in this homogeneous case is[2]

\[ \left( \frac{dp}{dt}\right)_h = \frac{\phi}{V}\left[\dot{Q} + \dot{W} - \dot{m} h_{vap} (x_{out} + \rho ^*) - \dot{m}_{vent} h_{vap} (x_{vent} + \rho ^*)\right],\]

where $\phi$ is the energy derivative of the fluid mixture (to be defined later), $V$ is the tank volume, $h_{vap}$ is the enthalpy of vaporization of the liquid, and $\rho ^*=\frac{\rho_g}{\rho_l-\rho_g}$ is the density ratio ($l$ refers to the properties of the liquid phase and $g$ to those of the gaseous phase). The enthalpy of vaporization is simply the enthalpy difference between the gaseous and liquid phases.

Experiments suggest that the pressure derivative in a real tank can be significantly greater than that of the homogeneous model due to stratification. Authors have accounted for this with a scaling factor $\alpha$, such that[2][3]

\[ \frac{dp}{dt} = \alpha \left( \frac{dp}{dt}\right)_h. \]

If the liquid volume fraction (fill fraction) if the tank is $\beta$, the density of the mixture can be expressed as

\[ \rho = \beta \rho_l + (1-\beta) \rho_g.\]

Differentiating this in time,

\[ \frac{d\rho}{dt} = \frac{d \beta}{dt} (\rho_l - \rho_g) + \beta \frac{d\rho_l}{dp}\frac{dp}{dt} + (1-\beta) \frac{d\rho_g}{dp} \frac{dp}{dt},\]

where the liquid- and gas-phase densities are functions of pressure only since the fluid is in saturated conditions. The derivative in time of density in the tank is equal to

\[ \frac{d\rho}{dt} = -\frac{\dot{m} + \dot{m}_{vent}}{V}.\]

Solving for the rate of change of the fill volume in the tank,

\[ \frac{d\beta}{dt} = \frac{1}{\rho_l - \rho_g}\left[\frac{d\rho}{dt} - \frac{dp}{dt} \left(\beta \frac{d\rho_l}{dp}+(1-\beta) \frac{d\rho_g}{dp}\right)\right].\]

The evolution in time of properties inside the tank can be modeled by solving the system of ordinary differential equations (ODEs) given by

\[ \frac{d}{dt} \mathbf{x} = \mathbf{f}(t, \mathbf{x}, \mathbf{u}, \mathbf{p}),\]

where $\mathbf{x} = [p, \beta]^T$, $\mathbf{u} = [\dot{Q}(t), \dot{W}(t), \dot{m}(t)]^T$ and $\mathbf{p} = [V, \alpha, p_{vent}]^T$, where $p_{vent}$ is the pressure at which the tank is vented. These ODEs can be integrated in time from knowledge of the initial conditions, namely the initial pressure and initial tank fill fraction.

Energy derivative

The energy derivative $\phi$ is given by[1]

\[ \phi = \frac{1}{\rho \left(\frac{\partial u}{\partial p}\right)_\rho},\]

where $u$ represents the internal energy of the mixture. The partial derivative $\left(\frac{\partial u}{\partial p}\right)_\rho$ is taken at constant mixture density. The internal energy of the mixture is given by

\[ u = x u_g + (1-x) u_l,\]

where $x$ represents the quality of the mixture (the mass fraction of the gaseous phase). Differentiating this in pressure at constant mixture density,

\[ \left(\frac{\partial u}{\partial p}\right)_\rho = x \frac{du_g}{dp} + (1-x)\frac{du_l}{dp} + (u_g - u_l) \left(\frac{\partial x}{\partial p}\right)_\rho.\]

The density of the mixture can be related to the quality by[1]

\[ \frac{1}{\rho} = \frac{x}{\rho_g} + \frac{1-x}{\rho_l}.\]

Differentiating in pressure at constant mixture density yields

\[ \left(\frac{\partial x}{\partial p}\right)_\rho = \left(\frac{1}{1/\rho_g - 1/\rho_l}\right)\left(\frac{x}{\rho_g^2}\frac{d\rho_g}{dp} + \frac{1-x}{\rho_l^2}\frac{d\rho_l}{dp}\right),\]

which completes the expression for the energy derivative.

Venting

Venting may be needed when the tank pressure has reached some maximum pressure. The purpose of mass venting from the tank is to prevent the tank pressure from increasing any further. To find the required venting mass flow rate, the equation for $\frac{dp}{dt}$ can be set to zero whenever the venting pressure $p_{vent}$ is reached or exceeded, yielding,

\[ \dot{m}_{vent} = \begin{cases} 0, & p<p_{vent}\\ \frac{\dot{Q} + \dot{W}}{h_{vap} (x_{vent} + \rho^*)} - \frac{x_{out} + \rho^*}{x_{vent} + \rho ^*}\dot{m}, &p\geq p_{vent} - \end{cases}.\]

Functions

Thermodynamic properties

TASOPT.CryoTank.gas_propertiesFunction
gas_properties(species::String, p::Float64)

This function returns the thermodynamic properties of a saturated vapor.

🔃 Inputs and Outputs

Inputs:

  • species::String: Species name
  • p::Float64: pressure (Pa)

Outputs:

  • Tsat::Float64: temperature (K)
  • ρ::Float64: density (kg/m^3)
  • ρ_p::Float64: derivative of density with pressure (kg/m^3/Pa)
  • h::Float64: specific enthalpy (J/kg)
  • u::Float64: specific internal energy (J/kg)
  • u_p::Float64: derivative of internal energy with pressure (J/kg/Pa)
source
TASOPT.CryoTank.liquid_propertiesFunction
liquid_properties(species::String, p::Float64)

This function returns the thermodynamic properties of a saturated liquid.

🔃 Inputs and Outputs

Inputs:

  • species::String: Species name
  • p::Float64: pressure (Pa)

Outputs:

  • Tsat::Float64: temperature (K)
  • ρ::Float64: density (kg/m^3)
  • ρ_p::Float64: derivative of density with pressure (kg/m^3/Pa)
  • h::Float64: specific enthalpy (J/kg)
  • u::Float64: specific internal energy (J/kg)
  • u_p::Float64: derivative of internal energy with pressure (J/kg/Pa)
source

Saturated mixtures

TASOPT.CryoTank.update_pβ!Function

update_pβ!(mixture, p, β)

This function updates a saturated mixture when there is a change in pressure or liquid fill volume ratio.

🔃 Inputs and Outputs

Inputs:

  • mixture::SaturatedMixture: saturated mixture
  • p::Float64: pressure (Pa)
  • β::Float64: liquid fill ratio

Outputs: No direct outputs. The mixture input is modified.

source

Pressure evolution

TASOPT.CryoTank.dpdtFunction
dpdt(mixture, Q, W, mdot, xout, V)

This function returns the time derivatives for the pressure in a cryogenic tank.

🔃 Inputs and Outputs

Inputs:

  • mixture::SaturatedMixture: liquid/vapor mixture in tank
  • Q::Float64: heat rate (W)
  • W::Float64: work rate (W)
  • mdot::Float64: imposed mass flow rate out of the tank, e.g., to burn in combustor (kg/s)
  • xout::Float64: quality of mass flow rate out of tank
  • mdot_vent::Float64: required venting mass flow rate to keep tank pressure constant (kg/s)
  • xvent::Float64: quality of mixture that is vented
  • V::Float64: tank volume (m^3)
  • α::Float64: fudge factor to account for effect of stratification

Outputs:

  • dp_dt::Float64: pressure derivative in time (Pa/s)
source
TASOPT.CryoTank.dβdtFunction
dβdt(mixture, dp_dt, mdot, V)

This function returns the time derivatives for the liquid fill volume fraction in a cryogenic tank.

🔃 Inputs and Outputs

Inputs:

  • mixture::SaturatedMixture: liquid/vapor mixture in tank
  • dp_dt::Float64: pressure derivative (Pa/s)
  • mdot_tot::Float64: total mass flow rate out of the tank, including venting (kg/s)
  • V::Float64: tank volume (m^3)

Outputs:

  • dβ_dt::Float64: fill fraction derivative in time (1/s)
source
TASOPT.CryoTank.venting_mass_flowFunction
venting_mass_flow(mixture, Q, W, mdot, xout, xvent)

This function returns the mass flow rate that needs to be vented to keep the tank pressure constant.

🔃 Inputs and Outputs

Inputs:

  • mixture::SaturatedMixture: liquid/vapor mixture in tank
  • Q::Float64: heat rate (W)
  • W::Float64: work rate (W)
  • mdot::Float64: mass flow rate out of the tank (kg/s)
  • xout::Float64: quality of mass flow rate out of tank
  • xvent::Float64: quality of the mixture that is vented

Outputs:

  • mdot_vent::Float64: venting mass flow rate (kg/s)
source
TASOPT.CryoTank.mdot_boiloffFunction
mdot_boiloff(β, dβ_dt, dp_dt, ρl, ρl_p, mdot, V)

This function returns the rate of mass boiloff in the tank.

🔃 Inputs and Outputs

Inputs:

  • mixture::SaturatedMixture: liquid/vapor mixture in tank
  • dβ_dt::Float64: fill fraction derivative in time (1/s)
  • dp_dt::Float64: pressure derivative (Pa/s)
  • mdot_liq::Float64: liquid-phase mass flow rate out of the tank (kg/s)
  • V::Float64: tank volume (m^3)

Outputs:

  • mdot_boiloff::Float64: rate of liquid mass boiloff (kg/s)
source
TASOPT.CryoTank.TankDerivativesFunction
TankDerivatives(t, y, u, params)

This function returns the time derivatives for pressure and liquid volume fill fraction in a cryogenic tank.

🔃 Inputs and Outputs

Inputs:

  • t::Float64: time (s)
  • y::Vector{Float64}: vector with the states; y[1] is pressure, y[2] is fill fraction, y[3] is tank mass,

y[4] is total liquid mass extracted, y[5] is the total mass that is vented and y[6] is the total mass that is boiled off.

  • u::Struct: structure with inputs; functions for heat rate, work rate and mass flow rate
  • params::Struct: structure with parameters; including initial tank mixture, tank max pressure and tank volume

Outputs:

  • dydt::Vector{Float64}: vector with the state derivatives in time
source

TASOPT interfacing

TASOPT.CryoTank.find_mdot_timeFunction
find_mdot_time(t, pari, parg, para, pare)

This function outputs the fuel mass flow rate to the engines as a function of time for a TASOPT aircraft model.

🔃 Inputs and Outputs

Inputs:

  • t::Float64: time in mission (s)
  • parg::Vector{Float64}: vector with aircraft integer parameters
  • parg::Vector{Float64}: vector with aircraft geometric parameters
  • para::Array{Float64}: array with aircraft aerodynamic parameters
  • pare::Array{Float64}: array with aircraft engine parameters

Outputs:

  • t::mdot: fuel mass flow rate out of the tank (kg/s)
source
TASOPT.CryoTank.calc_Q_pointsFunction
calc_Q_points(fuse, fuse_tank, pari, parg, para)

This function calculates the heat transfer rate into the tank at the design mission points.

🔃 Inputs and Outputs

Inputs:

  • fuse_tank::FuselageTank: struct with aircraft cryogenic tank parameters
  • pari::Vector{Int64}: vector with aircraft Boolean and integer parameters
  • parg::Vector{Float64}: vector with aircraft geometric parameters
  • pare::Array{Float64}: array with aircraft engine parameters

Outputs:

  • Qs::Vector{Float64}: vector with heat transfer rate at mission points (W)
source
TASOPT.CryoTank.find_Q_time_interpFunction
find_Q_time_interp(t, para, Qs)

This function estimates the heat transfer rate into the tank in a TASOPT model for a given time. It uses precomputed rates at each mission point for speed.

🔃 Inputs and Outputs

Inputs:

  • t::Float64: time in mission (s)
  • para::Array{Float64}: array with aircraft aerodynamic parameters
  • Qs::Vector{Float64}: vector with heat transfer rate at mission points (W)

Outputs:

  • Q::Float64: heat transfer rate (W)
source
TASOPT.CryoTank.analyze_TASOPT_tankFunction
analyze_TASOPT_tank(ac_orig, t_hold_orig::Float64 = 0.0, t_hold_dest::Float64 = 0.0, N::Int64 = 50)

This function analyses the evolution in time of a cryogenic tank inside a TASOPT aircraft model.

🔃 Inputs and Outputs

Inputs:

  • ac_orig::aicraft: TASOPT aircraft model
  • t_hold_orig::Float64: hold at origin (s)
  • t_hold_dest::Float64: hold at destination (s)

Outputs:

  • ts::Vector{Float64}: vector with times (s)
  • ps::Vector{Float64}: vector with pressure evolution in time (Pa)
  • βs::Vector{Float64}: vector with tank fill fraction evolution in time
  • Ms::Vector{Float64}: vector with tank fuel mass evolution in time (kg)
  • Mburns::Vector{Float64}: vector with cumulative mass burnt in engine (kg)
  • Mboils::Vector{Float64}: vector with cumulative mass that has boiled off (kg)
  • mdot_boils::Vector{Float64}: vector with evolution of boiloff mass flow rate in time (kg/s)
  • Mvents::Vector{Float64}: vector with cumulative mass that has been vented (kg)
  • mdots::Vector{Float64}: vector with fuel mass flow rate to engines (kg/s)
  • Qs::Vector{Float64}: vector with heat rate to tank (W)
source
  • 1Lin, Chin S., Neil T. Van Dresar, and Mohammad M. Hasan. "Pressure control analysis of cryogenic storage systems." Journal of propulsion and power 20.3 (2004): 480-485.
  • 2Verstraete, Dries, et al. "Hydrogen fuel tanks for subsonic transport aircraft." International journal of hydrogen energy 35.20 (2010): 11085-11098.
  • 3Winnefeld, Christopher, et al. "Modelling and designing cryogenic hydrogen tanks for future aircraft applications." Energies 11.1 (2018): 105.
+ \end{cases}.\]

Functions

Thermodynamic properties

TASOPT.CryoTank.gas_propertiesFunction
gas_properties(species::String, p::Float64)

This function returns the thermodynamic properties of a saturated vapor.

🔃 Inputs and Outputs

Inputs:

  • species::String: Species name
  • p::Float64: pressure (Pa)

Outputs:

  • Tsat::Float64: temperature (K)
  • ρ::Float64: density (kg/m^3)
  • ρ_p::Float64: derivative of density with pressure (kg/m^3/Pa)
  • h::Float64: specific enthalpy (J/kg)
  • u::Float64: specific internal energy (J/kg)
  • u_p::Float64: derivative of internal energy with pressure (J/kg/Pa)
source
TASOPT.CryoTank.liquid_propertiesFunction
liquid_properties(species::String, p::Float64)

This function returns the thermodynamic properties of a saturated liquid.

🔃 Inputs and Outputs

Inputs:

  • species::String: Species name
  • p::Float64: pressure (Pa)

Outputs:

  • Tsat::Float64: temperature (K)
  • ρ::Float64: density (kg/m^3)
  • ρ_p::Float64: derivative of density with pressure (kg/m^3/Pa)
  • h::Float64: specific enthalpy (J/kg)
  • u::Float64: specific internal energy (J/kg)
  • u_p::Float64: derivative of internal energy with pressure (J/kg/Pa)
source

Saturated mixtures

TASOPT.CryoTank.SaturatedGasType

Structure with thermodynamic parameters for the vapor portion of a saturated mixture.

source
TASOPT.CryoTank.SaturatedLiquidType

Structure with thermodynamic parameters for the liquid portion of a saturated mixture.

source
TASOPT.CryoTank.SaturatedMixtureType

Structure with thermodynamic properties of a saturated mixture.

source
TASOPT.CryoTank.update_pβ!Function

update_pβ!(mixture, p, β)

This function updates a saturated mixture when there is a change in pressure or liquid fill volume ratio.

🔃 Inputs and Outputs

Inputs:

  • mixture::SaturatedMixture: saturated mixture
  • p::Float64: pressure (Pa)
  • β::Float64: liquid fill ratio

Outputs: No direct outputs. The mixture input is modified.

source

Pressure evolution

TASOPT.CryoTank.dpdtFunction
dpdt(mixture, Q, W, mdot, xout, V)

This function returns the time derivatives for the pressure in a cryogenic tank.

🔃 Inputs and Outputs

Inputs:

  • mixture::SaturatedMixture: liquid/vapor mixture in tank
  • Q::Float64: heat rate (W)
  • W::Float64: work rate (W)
  • mdot::Float64: imposed mass flow rate out of the tank, e.g., to burn in combustor (kg/s)
  • xout::Float64: quality of mass flow rate out of tank
  • mdot_vent::Float64: required venting mass flow rate to keep tank pressure constant (kg/s)
  • xvent::Float64: quality of mixture that is vented
  • V::Float64: tank volume (m^3)
  • α::Float64: fudge factor to account for effect of stratification

Outputs:

  • dp_dt::Float64: pressure derivative in time (Pa/s)
source
TASOPT.CryoTank.dβdtFunction
dβdt(mixture, dp_dt, mdot, V)

This function returns the time derivatives for the liquid fill volume fraction in a cryogenic tank.

🔃 Inputs and Outputs

Inputs:

  • mixture::SaturatedMixture: liquid/vapor mixture in tank
  • dp_dt::Float64: pressure derivative (Pa/s)
  • mdot_tot::Float64: total mass flow rate out of the tank, including venting (kg/s)
  • V::Float64: tank volume (m^3)

Outputs:

  • dβ_dt::Float64: fill fraction derivative in time (1/s)
source
TASOPT.CryoTank.venting_mass_flowFunction
venting_mass_flow(mixture, Q, W, mdot, xout, xvent)

This function returns the mass flow rate that needs to be vented to keep the tank pressure constant.

🔃 Inputs and Outputs

Inputs:

  • mixture::SaturatedMixture: liquid/vapor mixture in tank
  • Q::Float64: heat rate (W)
  • W::Float64: work rate (W)
  • mdot::Float64: mass flow rate out of the tank (kg/s)
  • xout::Float64: quality of mass flow rate out of tank
  • xvent::Float64: quality of the mixture that is vented

Outputs:

  • mdot_vent::Float64: venting mass flow rate (kg/s)
source
TASOPT.CryoTank.mdot_boiloffFunction
mdot_boiloff(β, dβ_dt, dp_dt, ρl, ρl_p, mdot, V)

This function returns the rate of mass boiloff in the tank.

🔃 Inputs and Outputs

Inputs:

  • mixture::SaturatedMixture: liquid/vapor mixture in tank
  • dβ_dt::Float64: fill fraction derivative in time (1/s)
  • dp_dt::Float64: pressure derivative (Pa/s)
  • mdot_liq::Float64: liquid-phase mass flow rate out of the tank (kg/s)
  • V::Float64: tank volume (m^3)

Outputs:

  • mdot_boiloff::Float64: rate of liquid mass boiloff (kg/s)
source
TASOPT.CryoTank.TankDerivativesFunction
TankDerivatives(t, y, u, params)

This function returns the time derivatives for pressure and liquid volume fill fraction in a cryogenic tank.

🔃 Inputs and Outputs

Inputs:

  • t::Float64: time (s)
  • y::Vector{Float64}: vector with the states; y[1] is pressure, y[2] is fill fraction, y[3] is tank mass,

y[4] is total liquid mass extracted, y[5] is the total mass that is vented and y[6] is the total mass that is boiled off.

  • u::Struct: structure with inputs; functions for heat rate, work rate and mass flow rate
  • params::Struct: structure with parameters; including initial tank mixture, tank max pressure and tank volume

Outputs:

  • dydt::Vector{Float64}: vector with the state derivatives in time
source

TASOPT interfacing

TASOPT.CryoTank.find_mdot_timeFunction
find_mdot_time(t, pari, parg, para, pare)

This function outputs the fuel mass flow rate to the engines as a function of time for a TASOPT aircraft model.

🔃 Inputs and Outputs

Inputs:

  • t::Float64: time in mission (s)
  • parg::Vector{Float64}: vector with aircraft integer parameters
  • parg::Vector{Float64}: vector with aircraft geometric parameters
  • para::Array{Float64}: array with aircraft aerodynamic parameters
  • pare::Array{Float64}: array with aircraft engine parameters

Outputs:

  • t::mdot: fuel mass flow rate out of the tank (kg/s)
source
TASOPT.CryoTank.calc_Q_pointsFunction
calc_Q_points(fuse, fuse_tank, pari, parg, para)

This function calculates the heat transfer rate into the tank at the design mission points.

🔃 Inputs and Outputs

Inputs:

  • fuse_tank::FuselageTank: struct with aircraft cryogenic tank parameters
  • pari::Vector{Int64}: vector with aircraft Boolean and integer parameters
  • parg::Vector{Float64}: vector with aircraft geometric parameters
  • pare::Array{Float64}: array with aircraft engine parameters

Outputs:

  • Qs::Vector{Float64}: vector with heat transfer rate at mission points (W)
source
TASOPT.CryoTank.find_Q_time_interpFunction
find_Q_time_interp(t, para, Qs)

This function estimates the heat transfer rate into the tank in a TASOPT model for a given time. It uses precomputed rates at each mission point for speed.

🔃 Inputs and Outputs

Inputs:

  • t::Float64: time in mission (s)
  • para::Array{Float64}: array with aircraft aerodynamic parameters
  • Qs::Vector{Float64}: vector with heat transfer rate at mission points (W)

Outputs:

  • Q::Float64: heat transfer rate (W)
source
TASOPT.CryoTank.analyze_TASOPT_tankFunction
analyze_TASOPT_tank(ac_orig, t_hold_orig::Float64 = 0.0, t_hold_dest::Float64 = 0.0, N::Int64 = 50)

This function analyses the evolution in time of a cryogenic tank inside a TASOPT aircraft model.

🔃 Inputs and Outputs

Inputs:

  • ac_orig::aicraft: TASOPT aircraft model
  • t_hold_orig::Float64: hold at origin (s)
  • t_hold_dest::Float64: hold at destination (s)

Outputs:

  • ts::Vector{Float64}: vector with times (s)
  • ps::Vector{Float64}: vector with pressure evolution in time (Pa)
  • βs::Vector{Float64}: vector with tank fill fraction evolution in time
  • Ms::Vector{Float64}: vector with tank fuel mass evolution in time (kg)
  • Mburns::Vector{Float64}: vector with cumulative mass burnt in engine (kg)
  • Mboils::Vector{Float64}: vector with cumulative mass that has boiled off (kg)
  • mdot_boils::Vector{Float64}: vector with evolution of boiloff mass flow rate in time (kg/s)
  • Mvents::Vector{Float64}: vector with cumulative mass that has been vented (kg)
  • mdots::Vector{Float64}: vector with fuel mass flow rate to engines (kg/s)
  • Qs::Vector{Float64}: vector with heat rate to tank (W)
source
diff --git a/dev/cryo_tank/fueltanks/index.html b/dev/cryo_tank/fueltanks/index.html index b2c4344e..62feaf8f 100644 --- a/dev/cryo_tank/fueltanks/index.html +++ b/dev/cryo_tank/fueltanks/index.html @@ -14,7 +14,7 @@ - `Rtank::Float64`: Radius of the tank (m). - `Winsul_sum::Float64`: Sum of the insulation weight (N). - `l_tank::Float64`: Length of the tank (m). -- `Wtank::Float64`: Weight of the tank structure (N).

See here.

source
TASOPT.CryoTank.res_MLI_thickFunction
    res_MLI_thick(x::Vector{Float64}, fuse::Fuselage, fuse_tank::fuselage_tank, z::Float64, Mair::Float64, xftank::Float64, ifuel::Int64)

This function evaluates the residual vector for a given state containing change in wall thickness, heat transfer rate and insulation interface temperatures.

🔃 Inputs and Outputs
**Inputs:**
+- `Wtank::Float64`: Weight of the tank structure (N).

See here.

source
TASOPT.CryoTank.res_MLI_thickFunction
    res_MLI_thick(x::Vector{Float64}, fuse::Fuselage, fuse_tank::fuselage_tank, z::Float64, Mair::Float64, xftank::Float64, ifuel::Int64)

This function evaluates the residual vector for a given state containing change in wall thickness, heat transfer rate and insulation interface temperatures.

🔃 Inputs and Outputs
**Inputs:**
 - `x::Float64`: vector with states
 - `fuse::Fuselage`: fuselage object.
 - `fuse_tank::fuselage_tank`: fuselage tank object.
@@ -24,5 +24,5 @@
 - `ifuel::Int64`: fuel index.
 
 **Outputs:**
-- `res::Vector{Float64}`: residuals vector.
source
TASOPT.CryoTank.size_inner_tankFunction
  size_inner_tank(fuse::Fuselage, fuse_tank::fuselage_tank, t_cond::Vector{Float64})

size_inner_tank calculates the weight of the cryogenic fuel tank for a LH-fueled aircraft.

🔃 Inputs and Outputs

Inputs:

  • fuse::Fuselage: fuselage object.
  • fuse_tank::fuselage_tank: fuselage tank object.
  • t_cond::Float64: Vector with tank isulation layer thickness. Provided separately from fuse_tank as it changes during

non-linear solve process.

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).
  • Wstiff::Float64: Total stiffener weight (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.CryoTank.size_outer_tankFunction
size_outer_tank(fuse::Fuselage, fuse_tank::fuselage_tank, Winnertank::Float64, l_cyl::Float64, Ninterm::Float64)

This function sizes the outer vessel and calculates the weights of its components.

🔃 Inputs and Outputs

Inputs:

  • fuse::Fuselage: fuselage object.
  • fuse_tank::fuselage_tank: fuselage tank object.
  • Winnertank::Float64: weight of inner vessel and contents (N).
  • l_cyl::Float64: length of cylindrical portion of outer vessel (m).
  • Ninterm::Float64: optimum number of intermediate stiffener rings.

Outputs:

  • Wtank::Float64: total weight of outer vessel (N).
  • Wcyl::Float64: weight of cylindrical portion of outer vessel (N).
  • Whead::Float64: weight of one elliptical outer-tank head (N).
  • Wstiff::Float64: total weight of stiffener material (N).
  • S_outer::Float64: surface area of outer vessel (m^2).
  • Shead::Float64: surface area of one outer vessel head (m^2).
  • Scyl::Float64: surface area of cylindrical portion of tank (m^2).
  • t_cyl::Float64: wall thickness of cylindrical portion of tank (m).
  • t_head::Float64: wall thickness of tank head (m).
  • l_tank::Float64: Total length of the tank (m).
source
TASOPT.CryoTank.stiffener_weightFunction
  stiffener_weight(tanktype::String, W::Float64, Rtank::Float64, perim::Float64, s_a::Float64, 
-  ρstiff::Float64, θ1::Float64, θ2::Float64 = 0.0, Nstiff::Float64 = 2.0, l_cyl::F

This function calculates the weight of a single stiffener in an inner or outer vessel for a given inner vessel weight.

🔃 Inputs and Outputs

Inputs:

  • tanktype::String: type of tank, options are "inner" or "outer".
  • W::Float64: load carried by a stiffener ring (N).
  • Rtank::Float64: tank radius (m).
  • perim::Float64: tank perimeter (m).
  • s_a::Float64: maximum allowable stress in stiffener material (Pa).
  • ρstiff::Float64: stiffener density (kg/m^3).
  • θ1::Float64: angular position of bottom tank supports, measured from the bottom of the tank (rad).
  • θ2::Float64: angular position of top tank supports, measured from the bottom of the tank (rad). Only used with "outer" tank.
  • Nstiff::Float64: total number of stiffeners on outer vessel. Only used with "outer" tank.
  • l_cyl::Float64: length of cylindrical portion of tank (m). Only used with "outer" tank.
  • E::Float64: Young's modulus of stiffener material (Pa). Only used with "outer" tank.

Outputs:

  • Wstiff::Float64: weight of a stiffener ring (N).
source
TASOPT.CryoTank.optimize_outer_tankFunction
optimize_outer_tank(fuse::Fuselage, fuse_tank::fuselage_tank, Winnertank, l_cyl, θ1, θ2)

This function optimizes the number of intermediate stiffener rings to minimize the weight of an outer vessel.

🔃 Inputs and Outputs

Inputs:

  • fuse::Fuselage: fuselage object.
  • fuse_tank::fuselage_tank: fuselage tank object.
  • Winnertank::Float64: weight of inner vessel and contents (N).
  • l_cyl::Float64: length of cylindrical portion of outer vessel (m).

Outputs:

  • Ninterm::Float64: optimum number of intermediate stiffener rings.
source
TASOPT.CryoTank.tankWthermalFunction
  tankWthermal(fuse::Fuselage, fuse_tank::fuselage_tank, z::Float64, Mair::Float64, xftank::Float64, time_flight::Float64, ifuel::Int64)

tankWthermal calculates the boil-off rate of a cryogenic liquid for a given insulation thickness.

This function does not size the thermal insulation layers but rather calculates the boil-off rate of the fuel, for a given insulation thickness

🔃 Inputs and Outputs

Inputs:

  • fuse::Fuselage: fuselage object.
  • fuse_tank::fuselage_tank: fuselage tank object.
  • z::Float64: flight altitude (m)
  • Mair::Float64: external air Mach number
  • xftank::Float64: longitudinal coordinate of fuel tank centroid from nose (m)
  • time_flight::Float64: Time of flight (s).
  • ifuel::Int64: fuel index.

Outputs:

  • Q::Float64: Heat transfer rate into the tank (W).
  • m_boiloff::Float64: Boil-off LH2 mass (kg).
  • mdot_boiloff::Float64: Boil-off rate of LH2 (kg/s).

See here.

source
TASOPT.CryoTank.residuals_QFunction
  residuals_Q(x, p)

This function calculates the residual for a non-linear solver. The states are the heat transfer rate (optional), the tank wall temperature, and the temperatures at the interfaces of each insulation layers.

🔃 Inputs and Outputs

Inputs:

  • x::Vector{Float64}: vector with unknowns.
  • p::Struct: structure of type thermal_params.
  • mode::String: mode to find residual, options are "Qknown" and "Qunknown"

Outputs:

  • F::Vector{Float64}: vector with residuals.
source
+- `res::Vector{Float64}`: residuals vector.source
TASOPT.CryoTank.size_inner_tankFunction
  size_inner_tank(fuse::Fuselage, fuse_tank::fuselage_tank, t_cond::Vector{Float64})

size_inner_tank calculates the weight of the cryogenic fuel tank for a LH-fueled aircraft.

🔃 Inputs and Outputs

Inputs:

  • fuse::Fuselage: fuselage object.
  • fuse_tank::fuselage_tank: fuselage tank object.
  • t_cond::Float64: Vector with tank isulation layer thickness. Provided separately from fuse_tank as it changes during

non-linear solve process.

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).
  • Wstiff::Float64: Total stiffener weight (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.CryoTank.size_outer_tankFunction
size_outer_tank(fuse::Fuselage, fuse_tank::fuselage_tank, Winnertank::Float64, l_cyl::Float64, Ninterm::Float64)

This function sizes the outer vessel and calculates the weights of its components.

🔃 Inputs and Outputs

Inputs:

  • fuse::Fuselage: fuselage object.
  • fuse_tank::fuselage_tank: fuselage tank object.
  • Winnertank::Float64: weight of inner vessel and contents (N).
  • l_cyl::Float64: length of cylindrical portion of outer vessel (m).
  • Ninterm::Float64: optimum number of intermediate stiffener rings.

Outputs:

  • Wtank::Float64: total weight of outer vessel (N).
  • Wcyl::Float64: weight of cylindrical portion of outer vessel (N).
  • Whead::Float64: weight of one elliptical outer-tank head (N).
  • Wstiff::Float64: total weight of stiffener material (N).
  • S_outer::Float64: surface area of outer vessel (m^2).
  • Shead::Float64: surface area of one outer vessel head (m^2).
  • Scyl::Float64: surface area of cylindrical portion of tank (m^2).
  • t_cyl::Float64: wall thickness of cylindrical portion of tank (m).
  • t_head::Float64: wall thickness of tank head (m).
  • l_tank::Float64: Total length of the tank (m).
source
TASOPT.CryoTank.stiffener_weightFunction
  stiffener_weight(tanktype::String, W::Float64, Rtank::Float64, perim::Float64, s_a::Float64, 
+  ρstiff::Float64, θ1::Float64, θ2::Float64 = 0.0, Nstiff::Float64 = 2.0, l_cyl::F

This function calculates the weight of a single stiffener in an inner or outer vessel for a given inner vessel weight.

🔃 Inputs and Outputs

Inputs:

  • tanktype::String: type of tank, options are "inner" or "outer".
  • W::Float64: load carried by a stiffener ring (N).
  • Rtank::Float64: tank radius (m).
  • perim::Float64: tank perimeter (m).
  • s_a::Float64: maximum allowable stress in stiffener material (Pa).
  • ρstiff::Float64: stiffener density (kg/m^3).
  • θ1::Float64: angular position of bottom tank supports, measured from the bottom of the tank (rad).
  • θ2::Float64: angular position of top tank supports, measured from the bottom of the tank (rad). Only used with "outer" tank.
  • Nstiff::Float64: total number of stiffeners on outer vessel. Only used with "outer" tank.
  • l_cyl::Float64: length of cylindrical portion of tank (m). Only used with "outer" tank.
  • E::Float64: Young's modulus of stiffener material (Pa). Only used with "outer" tank.

Outputs:

  • Wstiff::Float64: weight of a stiffener ring (N).
source
TASOPT.CryoTank.optimize_outer_tankFunction
optimize_outer_tank(fuse::Fuselage, fuse_tank::fuselage_tank, Winnertank, l_cyl, θ1, θ2)

This function optimizes the number of intermediate stiffener rings to minimize the weight of an outer vessel.

🔃 Inputs and Outputs

Inputs:

  • fuse::Fuselage: fuselage object.
  • fuse_tank::fuselage_tank: fuselage tank object.
  • Winnertank::Float64: weight of inner vessel and contents (N).
  • l_cyl::Float64: length of cylindrical portion of outer vessel (m).

Outputs:

  • Ninterm::Float64: optimum number of intermediate stiffener rings.
source
TASOPT.CryoTank.tankWthermalFunction
  tankWthermal(fuse::Fuselage, fuse_tank::fuselage_tank, z::Float64, Mair::Float64, xftank::Float64, time_flight::Float64, ifuel::Int64)

tankWthermal calculates the boil-off rate of a cryogenic liquid for a given insulation thickness.

This function does not size the thermal insulation layers but rather calculates the boil-off rate of the fuel, for a given insulation thickness

🔃 Inputs and Outputs

Inputs:

  • fuse::Fuselage: fuselage object.
  • fuse_tank::fuselage_tank: fuselage tank object.
  • z::Float64: flight altitude (m)
  • Mair::Float64: external air Mach number
  • xftank::Float64: longitudinal coordinate of fuel tank centroid from nose (m)
  • time_flight::Float64: Time of flight (s).
  • ifuel::Int64: fuel index.

Outputs:

  • Q::Float64: Heat transfer rate into the tank (W).
  • m_boiloff::Float64: Boil-off LH2 mass (kg).
  • mdot_boiloff::Float64: Boil-off rate of LH2 (kg/s).

See here.

source
TASOPT.CryoTank.residuals_QFunction
  residuals_Q(x, p)

This function calculates the residual for a non-linear solver. The states are the heat transfer rate (optional), the tank wall temperature, and the temperatures at the interfaces of each insulation layers.

🔃 Inputs and Outputs

Inputs:

  • x::Vector{Float64}: vector with unknowns.
  • p::Struct: structure of type thermal_params.
  • mode::String: mode to find residual, options are "Qknown" and "Qunknown"

Outputs:

  • F::Vector{Float64}: vector with residuals.
source
diff --git a/dev/data_io/data_basics/index.html b/dev/data_io/data_basics/index.html index e00fb224..d13d4367 100644 --- a/dev/data_io/data_basics/index.html +++ b/dev/data_io/data_basics/index.html @@ -24,4 +24,4 @@ Full slices: (17, 2) [280.0 280.0; 280.0 280.0; 280.0 280.0; 280.0 280.0; 280.0 280.0; 280.0 280.0; 280.0 280.0; 280.0 280.0; 280.0 280.0; 280.0 280.0; 280.0 280.0; 280.0 280.0; 280.0 280.0; 280.0 280.0; 280.0 280.0; 280.0 280.0; 280.0 280.0] All missions at cruise start: (2,) -[280.0, 280.0]

can be included via the convenience variable __TASOPTindices__

aircraft struct

An aircraft is composed of par array fields, title and description fields, and a sized flag to indicate its status. An optional fuse_tank field is present as a trial for future struct-based development. All fields are dot-accessible and array elements can be changed (e.g., ac.parg[igS] = 20), though the struct itself is not mutable.

Refer to the struct reference page for add'l details.

Future Changes

We don't like this either.

In a future major revision, we aim to replace the par array system with a struct-oriented approach.

+[280.0, 280.0]

can be included via the convenience variable __TASOPTindices__

aircraft struct

An aircraft is composed of par array fields, title and description fields, and a sized flag to indicate its status. An optional fuse_tank field is present as a trial for future struct-based development. All fields are dot-accessible and array elements can be changed (e.g., ac.parg[igS] = 20), though the struct itself is not mutable.

Refer to the struct reference page for add'l details.

Future Changes

We don't like this either.

In a future major revision, we aim to replace the par array system with a struct-oriented approach.

diff --git a/dev/data_io/data_io/index.html b/dev/data_io/data_io/index.html index d6357b60..9a9695c9 100644 --- a/dev/data_io/data_io/index.html +++ b/dev/data_io/data_io/index.html @@ -55,12 +55,12 @@ Wpay = 210.0 kN Des. Range = 5.56e6 km Cruise Mach = 0.8 -source
TASOPT.save_aircraft_modelMethod
save_aircraft_model(ac::TASOPT.aircraft=TASOPT.read_aircraft_model(), 
+
source
TASOPT.save_aircraft_modelMethod
save_aircraft_model(ac::TASOPT.aircraft=TASOPT.read_aircraft_model(), 
 datafile=joinpath(TASOPT.__TASOPTroot__, "IO/default_output.toml"),
-save_output::Bool=false)

Converts an aircraft model into a dictionary and writes it to a TOML file. Values to be written are explicitly set following the default_input.toml. All values are written in SI units.

This save operation makes add'l* assumptions about parameter repetition. Namely: The same value is applied for all flight segments/points for: - parm[] parameters - excrescencedragfactors, wing overspeeds, wing/stabilizer Re_refs The same value is applied for all missions and flight segments for: - parg[], pare[], and pari[] parameters - fuel temperature

Said value is the first entry in the corresponding array axis, except for some aero parameters where other points are more relevant (e.g., "Cruise" "Takeoff").

*and modifiable

Deviating from default

Extending read_input.jl and save_model.jl is recommended for models deviating appreciably from the default functionality. Thorough knowledge of the model is required.

source
TASOPT.quicksave_aircraftMethod
quicksave_aircraft(ac::TASOPT.aircraft=TASOPT.read_aircraft_model(),
-    filepath=joinpath(TASOPT.__TASOPTroot__, "IO/IO_samples/default_quicksave_aircraft.toml"))

Converts aircraft struct into a dictionary with fields as keys and saves as a toml file.

🔃 Inputs and Outputs

Inputs:

  • ac::TASOPT.aircraft: TASOPT aircraft struct containing model in any state.
  • filepath::String: path and name of .toml file to be written.

Outputs:

  • None.
source
TASOPT.quickload_aircraftMethod
quickload_aircraft(datafile=joinpath(TASOPT.__TASOPTroot__, "IO/IO_samples/default_quicksave_aircraft.toml"))

Reads a .toml file generated by quicksave_aircraft() and returns the generated aircraft structure.

🔃 Inputs and Outputs

Inputs:

  • filepath::String: path and name of .toml file to be written.

Outputs:

  • ac::TASOPT.aircraft: TASOPT aircraft struct with fields specified by the given .toml file.
source
TASOPT.output_csvMethod
output_csv(ac::TASOPT.aircraft=TASOPT.load_default_model(), 
+save_output::Bool=false)

Converts an aircraft model into a dictionary and writes it to a TOML file. Values to be written are explicitly set following the default_input.toml. All values are written in SI units.

This save operation makes add'l* assumptions about parameter repetition. Namely: The same value is applied for all flight segments/points for: - parm[] parameters - excrescencedragfactors, wing overspeeds, wing/stabilizer Re_refs The same value is applied for all missions and flight segments for: - parg[], pare[], and pari[] parameters - fuel temperature

Said value is the first entry in the corresponding array axis, except for some aero parameters where other points are more relevant (e.g., "Cruise" "Takeoff").

*and modifiable

Deviating from default

Extending read_input.jl and save_model.jl is recommended for models deviating appreciably from the default functionality. Thorough knowledge of the model is required.

source
TASOPT.quicksave_aircraftMethod
quicksave_aircraft(ac::TASOPT.aircraft=TASOPT.read_aircraft_model(),
+    filepath=joinpath(TASOPT.__TASOPTroot__, "IO/IO_samples/default_quicksave_aircraft.toml"))

Converts aircraft struct into a dictionary with fields as keys and saves as a toml file.

🔃 Inputs and Outputs

Inputs:

  • ac::TASOPT.aircraft: TASOPT aircraft struct containing model in any state.
  • filepath::String: path and name of .toml file to be written.

Outputs:

  • None.
source
TASOPT.quickload_aircraftMethod
quickload_aircraft(datafile=joinpath(TASOPT.__TASOPTroot__, "IO/IO_samples/default_quicksave_aircraft.toml"))

Reads a .toml file generated by quicksave_aircraft() and returns the generated aircraft structure.

🔃 Inputs and Outputs

Inputs:

  • filepath::String: path and name of .toml file to be written.

Outputs:

  • ac::TASOPT.aircraft: TASOPT aircraft struct with fields specified by the given .toml file.
source
TASOPT.output_csvMethod
output_csv(ac::TASOPT.aircraft=TASOPT.load_default_model(), 
         filepath::String=joinpath(TASOPT.__TASOPTroot__, "IO/IO_samples/default_output.csv");
         overwrite::Bool = false, indices::Dict = default_output_indices,
         includeMissions::Union{AbstractVector,Colon,Bool,Integer} = false, 
         includeFlightPoints::Union{AbstractVector,Colon,Bool,Integer} = false,
-        forceMatrices::Bool = false)

writes the values of ac to CSV file filepath with index variables as headers. A typical set of values is output by default for the design mission at the first cruise point. Appends to extant filepath if headers are compatible, appending integer suffixes to filename when not.

Output is customizable by:

  • indices: specifies the desired indices of each par array,
  • includeMissions: allows output of all missions (i.e., =true) or specifiable indices (e.g., =[1,2,3]),
  • includeFlightPoints: allows output of all flight points (as for includeMissions).
🔃 Inputs and Outputs

Inputs:

  • ac::TASOPT.aircraft: TASOPT aircraft struct containing model in any state.
  • filepath::String: path and name of .csv file to be written.
  • overwrite::Bool: deletes existing file at filepath when true, default is false.
  • indices::Dict{String => Union{AbstractVector,Colon(), Integer}}: specifies desired indices of par arrays given as keys. Customizable; built-in options: default_output_indices, output_indices_all, output_indices_wGeom, and output_indices_wGeom.
  • includeMissions::Union{AbstractVector,Colon,Bool,Integer}: saves all mission entries as an array in a CSV cell when true, default is false, inner nested array when flight points are also output. specific indices can also be specified as Vectors of Ints.
  • includeFlightPoints::Union{AbstractVector,Colon,Bool,Integer}: saves all flight point entries as an array in a CSV cell when true, default is false, outer nested array when missions are also output. specific indices can also be specified as Vectors of Ints.
  • forceMatrices::Bool: forces all entries that vary with mission and flight point to follow nested array structure

Outputs:

  • newfilepath::String: actual output filepath; updates in case of header conflicts. same as input filepath if overwrite = true.
source
TASOPT.default_output_indicesConstant

Indices of quantities of par arrays selected to be output by default by output_csv(). Formatted as a Dict() where keys are par array names and values are arrays of indices. Note that this selection is only along the first dimension of par arrays (i.e., selecting quantities, not missions or flight points).

Custom Dicts() can be passed to output_csv() following the format: Dict(){String => Union{AbstractVector,Colon(), Integer}}.

Example usage:

1 : default_output_indices["pari"] = [1, 5, iitotal]

2 : default_output_indices["para"] = Colon() #NOT [Colon()]

source
+ forceMatrices::Bool = false)

writes the values of ac to CSV file filepath with index variables as headers. A typical set of values is output by default for the design mission at the first cruise point. Appends to extant filepath if headers are compatible, appending integer suffixes to filename when not.

Output is customizable by:

🔃 Inputs and Outputs

Inputs:

Outputs:

source
TASOPT.default_output_indicesConstant

Indices of quantities of par arrays selected to be output by default by output_csv(). Formatted as a Dict() where keys are par array names and values are arrays of indices. Note that this selection is only along the first dimension of par arrays (i.e., selecting quantities, not missions or flight points).

Custom Dicts() can be passed to output_csv() following the format: Dict(){String => Union{AbstractVector,Colon(), Integer}}.

Example usage:

1 : default_output_indices["pari"] = [1, 5, iitotal]

2 : default_output_indices["para"] = Colon() #NOT [Colon()]

source
diff --git a/dev/examples/loadingrunning/index.html b/dev/examples/loadingrunning/index.html index 307b1ae6..ac102375 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 fef8d593..5065019f 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 9f3cf2d8..ad50b6cc 100644 --- a/dev/examples/payload_range/index.html +++ b/dev/examples/payload_range/index.html @@ -71,4 +71,4 @@ ax.set_title("Payload Range Plot") ax.grid() -fig.savefig("./PayloadRangeExample.png") +fig.savefig("./PayloadRangeExample.png") diff --git a/dev/examples/sensitivity/index.html b/dev/examples/sensitivity/index.html index 7d39966c..2385dda4 100644 --- a/dev/examples/sensitivity/index.html +++ b/dev/examples/sensitivity/index.html @@ -23,4 +23,4 @@ sens = TASOPT.get_sensitivity(params) #Plot Sensitivities -TASOPT.plot_sensitivities(sens) +TASOPT.plot_sensitivities(sens) diff --git a/dev/index.html b/dev/index.html index 68fce51d..8d53a285 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-10-10T15:59:44.676 with Julia 1.11.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-10-11T12:08:25.314 with Julia 1.11.0
diff --git a/dev/misc/dreladocs/index.html b/dev/misc/dreladocs/index.html index f9549249..82aebe98 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 229f2b20..b7430bc2 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 0ff432a2..957dbc65 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 78fe4126..0d5e01a9 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
  • sized::AbstractVector{1,Bool}: flag if aircraft is sized (default is [false])

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
  • sized::AbstractVector{1,Bool}: flag if aircraft is sized (default is [false])

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 5087b792..271d3c30 100644 --- a/dev/propulsion/PEMfuelcell/index.html +++ b/dev/propulsion/PEMfuelcell/index.html @@ -3,6 +3,6 @@ 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::Float64: 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
OrdinaryDiffEqLowOrderRK.RK4Type
RK4(; stage_limiter! = OrdinaryDiffEq.trivial_limiter!,
+\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::Float64: 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
OrdinaryDiffEqLowOrderRK.RK4Type
RK4(; stage_limiter! = OrdinaryDiffEq.trivial_limiter!,
       step_limiter! = OrdinaryDiffEq.trivial_limiter!,
-      thread = OrdinaryDiffEq.False())

Explicit Runge-Kutta Method. The canonical Runge-Kutta Order 4 method. Uses a defect control for adaptive stepping using maximum error over the whole interval.

Keyword Arguments

  • stage_limiter!: function of the form limiter!(u, integrator, p, t)
  • step_limiter!: function of the form limiter!(u, integrator, p, t)
  • thread: determines whether internal broadcasting on appropriate CPU arrays should be serial (thread = OrdinaryDiffEq.False()) or use multiple threads (thread = OrdinaryDiffEq.True()) when Julia is started with multiple threads.

References

@article{shampine2005solving, title={Solving ODEs and DDEs with residual control}, author={Shampine, LF}, journal={Applied Numerical Mathematics}, volume={52}, number={1}, pages={113–127}, year={2005}, publisher={Elsevier} }

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
  • 1O'Hayre, Ryan, et al. Fuel cell fundamentals. John Wiley & Sons, 2016.
  • 2Springer, Thomas E., T. A. Zawodzinski, and Shimshon Gottesfeld. "Polymer electrolyte fuel cell model." Journal of the electrochemical society 138.8 (1991): 2334.
  • 3Jiao, 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.
  • 4Huang, 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.
  • 5Barbir, Frano. PEM fuel cells: theory and practice. Academic press, 2012.
+ thread = OrdinaryDiffEq.False())

Explicit Runge-Kutta Method. The canonical Runge-Kutta Order 4 method. Uses a defect control for adaptive stepping using maximum error over the whole interval.

Keyword Arguments

References

@article{shampine2005solving, title={Solving ODEs and DDEs with residual control}, author={Shampine, LF}, journal={Applied Numerical Mathematics}, volume={52}, number={1}, pages={113–127}, year={2005}, publisher={Elsevier} }

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 fc4e0b43..2236b220 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, hvap)

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
  • hvap: fuel enthalpy of vaporization

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, hvap)

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
  • hvap: fuel enthalpy of vaporization

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, hvap)

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
  • hvap: fuel enthalpy of vaporization

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, hvap)

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
  • hvap: fuel enthalpy of vaporization

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 9262f287..264e6068 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 unchanged. 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 Blasius 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 Reynolds 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 parameters 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} \left(\frac{\mu}{\mu_w}\right)^{-0.14},\]

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

Correction for temperature changes across thermal boundary layer

Temperature changes across the thermal boundary layer in both the coolant and process streams. Identifying the temperature at which to evaluate the properties is not trivial. In the code, the method in Kays and London[1] is used: all properties are evaluated at the freestream temperatures ($T_{p,m}$ and $T_{c,m}$) and a correction is applied to the Nusselt number and the friction coefficient ($f$ in the process stream and $C_f$ for the coolant). These take the form

\[\mathrm{Nu} = \mathrm{Nu}_m\left(\frac{T_w}{T_m}\right)^n\]

\[f = f_m\left(\frac{T_w}{T_m}\right)^m\]

where the coefficients are $n=0.0$ and $m=0.0$ for the process-side properties and $n=-0.5$ and $m=-0.1$ for the coolant side[1]. The wall temperature is calculated from the overall thermal resistance and the thermal resistance of the coolant side,

\[T_w = T_{c,m} + \frac{T_{p,m}-T_{c,m}}{R_o A_p}\left(\frac{1}{h_c \frac{A_c}{A_p}} + R_{f,c}A_c \frac{A_p}{A_c}\right)\]

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 (true: concentric ; false: rectangular)
  • frecirc::Bool: flag for recirculation (true: recirculation ; false: no recirculation)
  • fshaf::Bool: flag for whether HX contains shaf(true: shaft ; false: no shaft)
  • 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)
  • D_i::Float64: inner diameter of core (m)
  • Δpdes::Float64: design pressure difference between tube and outside (Pa)
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
  • rlx::Float64: relaxation factor for pare update

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, μ_μw)

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
  • μ_μw::Float64: ratio of free flow viscosity to wall viscosity

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 unchanged. 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 Blasius 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 Reynolds 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 parameters 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} \left(\frac{\mu}{\mu_w}\right)^{-0.14},\]

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

Correction for temperature changes across thermal boundary layer

Temperature changes across the thermal boundary layer in both the coolant and process streams. Identifying the temperature at which to evaluate the properties is not trivial. In the code, the method in Kays and London[1] is used: all properties are evaluated at the freestream temperatures ($T_{p,m}$ and $T_{c,m}$) and a correction is applied to the Nusselt number and the friction coefficient ($f$ in the process stream and $C_f$ for the coolant). These take the form

\[\mathrm{Nu} = \mathrm{Nu}_m\left(\frac{T_w}{T_m}\right)^n\]

\[f = f_m\left(\frac{T_w}{T_m}\right)^m\]

where the coefficients are $n=0.0$ and $m=0.0$ for the process-side properties and $n=-0.5$ and $m=-0.1$ for the coolant side[1]. The wall temperature is calculated from the overall thermal resistance and the thermal resistance of the coolant side,

\[T_w = T_{c,m} + \frac{T_{p,m}-T_{c,m}}{R_o A_p}\left(\frac{1}{h_c \frac{A_c}{A_p}} + R_{f,c}A_c \frac{A_p}{A_c}\right)\]

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 (true: concentric ; false: rectangular)
  • frecirc::Bool: flag for recirculation (true: recirculation ; false: no recirculation)
  • fshaf::Bool: flag for whether HX contains shaf(true: shaft ; false: no shaft)
  • 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)
  • D_i::Float64: inner diameter of core (m)
  • Δpdes::Float64: design pressure difference between tube and outside (Pa)
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
  • rlx::Float64: relaxation factor for pare update

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, μ_μw)

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
  • μ_μw::Float64: ratio of free flow viscosity to wall viscosity

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 9fa87c86..c3c00495 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)

  • hvap: fuel enthalpy of vaporization (J/kg)

  • 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, HXs, HX_add_mass_frac)

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.
  • HXs: vector with heat exchanger performance data
  • HX_add_mass_frac: added mass fraction to heat exchangers

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)

  • hvap: fuel enthalpy of vaporization (J/kg)

  • 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, HXs, HX_add_mass_frac)

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.
  • HXs: vector with heat exchanger performance data
  • HX_add_mass_frac: added mass fraction to heat exchangers

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)

  • hvap: fuel enthalpy of vaporization (J/kg)

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

  • hvap: fuel enthalpy of vaporization (J/kg)

  • 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/sizing/sizing/index.html b/dev/sizing/sizing/index.html index 1c3863f2..75b1ed93 100644 --- a/dev/sizing/sizing/index.html +++ b/dev/sizing/sizing/index.html @@ -1,7 +1,7 @@ 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(ac; itermax=35,
 wrlx1=0.5, wrlx2=0.9, wrlx3=0.5, initwgt=false, initeng=0, 
-iairf=1, Ldebug=false, printiter=true, saveODperf=false)

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(ac, mi, itermax, initeng, saveOffDesign)

woper runs the aircraft through input off-design missions

🔃 Inputs and Outputs

Inputs:

  • ac::aircraft: Aircraft with first mission being the design mission
  • mi::Int4: Off design mission to run (Default: 1)
  • itermax::Int64: Maximum iterations for sizing loop
  • initeng::Boolean: Use design case as initial guess for engine state if true
  • saveOffDesign::Boolean: Set true if you want computed quanties to be saved in the selected off design par arrays of the aircraft model

Outputs:

  • No explicit outputs. Computed quantities are saved to par arrays of aircraft model for the off design mission selected
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(ac)
+iairf=1, Ldebug=false, printiter=true, saveODperf=false)

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(ac, mi, itermax, initeng, saveOffDesign)

woper runs the aircraft through input off-design missions

🔃 Inputs and Outputs

Inputs:

  • ac::aircraft: Aircraft with first mission being the design mission
  • mi::Int4: Off design mission to run (Default: 1)
  • itermax::Int64: Maximum iterations for sizing loop
  • initeng::Boolean: Use design case as initial guess for engine state if true
  • saveOffDesign::Boolean: Set true if you want computed quanties to be saved in the selected off design par arrays of the aircraft model

Outputs:

  • No explicit outputs. Computed quantities are saved to par arrays of aircraft model for the off design mission selected
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(ac)
 
   Calculates takeoff parameters and balanced field length.
-  The aircraft must be defined in parg array. The ipstatic and iprotate points are assumed to exist.
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
+ The aircraft must be defined in parg array. The ipstatic and iprotate points are assumed to exist.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 b4a93f40..989f79b2 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/fuselage/index.html b/dev/structures/fuselage/index.html index 52938449..15b823f8 100644 --- a/dev/structures/fuselage/index.html +++ b/dev/structures/fuselage/index.html @@ -96,4 +96,4 @@ bv, λv,nvtail, xhtail,xvtail, xwing,xwbox,cbox, - xeng)

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:

Cabin and Payload Information:

Engine Parameters:

Fuel Tank Parameters

Tail parameters:

Wing Parameters

Outputs: Pressurized cabin volume:

See here or Section 2.2 of the TASOPT Technical Description.

source + xeng)

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:

Cabin and Payload Information:

Engine Parameters:

Fuel Tank Parameters

Tail parameters:

Wing Parameters

Outputs: 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 fc0c2ce0..75e16900 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 771b7aa4..e1e40eeb 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:

Outputs:

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:

Outputs:

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