RCAIDE.Library.Methods.Aerodynamics.Vortex_Lattice_Method.VLM
VLM#
- VLM(conditions, settings, geometry)[source]#
Uses the vortex lattice method to compute the lift, induced drag and moment coefficients.
The user should be forwarned that this will cause very slight differences in results for 0 deflection due to the slightly different discretization.
The user has the option to use the boundary conditions and induced velocities from either RCAIDE or VORLAX. See build_RHS in compute_RHS_matrix.py for more details.
By default in Vortex_Lattice, VLM performs calculations based on panel coordinates with float32 precision. The user may also choose to use float16 or float64, but be warned that the latter can be memory intensive.
The user should note that fully capitalized variables correspond to a VORLAX variable of the same name
Assumptions: The user provides either global discretezation (number_spanwise/chordwise_vortices) or separate discretization (wing/fuselage_spanwise/chordwise_vortices) in settings, not both. The set of settings not being used should be set to None.
The VLM requires that the user provide a non-zero velocity that matches mach number. For surrogate training cases at mach 0, VLM uses a velocity of 1e-6 m/s
Source: 1. Miranda, Luis R., Robert D. Elliot, and William M. Baker. “A generalized vortex lattice method for subsonic and supersonic flow applications.” (1977). (NASA CR)
VORLAX Source Code
Inputs: geometry.
reference_area [m^2] wing.
spans.projected [m] chords.root [m] chords.tip [m] sweeps.quarter_chord [radians] taper [Unitless] twists.root [radians] twists.tip [radians] xz_plane_symmetric [Boolean] aspect_ratio [Unitless] areas.reference [m^2] vertical [Boolean] origin [m]
- fuselage.
origin [m] width [m] heights.maximum [m] lengths.nose [m] lengths.tail [m] lengths.total [m] lengths.cabin [m] fineness.nose [Unitless] fineness.tail [Unitless]
settings.number_of_spanwise_vortices [Unitless] settings.number_of_chordwise_vortices [Unitless]
settings.use_surrogate [Unitless] settings.propeller_wake_model [Unitless] settings.use_VORLAX_matrix_calculation [boolean] settings.floating_point_precision [float16/32/64]
conditions.aerodynamics.angles.alpha [radians] conditions.aerodynamics.angles.beta [radians] conditions.freestream.mach_number [Unitless] conditions.freestream.velocity [m/s] conditions.static_stability.pitch_rate [radians/s] conditions.static_stability.roll_rate [radians/s] conditions.static_stability.yaw_rate [radians/s]
Outputs: results.
CL [Unitless], CLTOT in VORLAX CDi [Unitless], CDTOT in VORLAX CM [Unitless], CMTOT in VORLAX CY [Unitless], Total y force coeff CRTOT [Unitless], Rolling moment coeff (unscaled) CL_mom [Unitless], Rolling moment coeff (scaled by b_ref) CNTOT [Unitless], Yawing moment coeff (unscaled) CN [Unitless], Yawing moment coeff (scaled by b_ref) CL_wing [Unitless], CL of each wing CDi_wing [Unitless], CDi of each wing cl_y [Unitless], CL of each strip cdi_y [Unitless], CDi of each strip alpha_i [radians] , Induced angle of each strip in each wing (array of numpy arrays) CP [Unitless], Pressure coefficient of each panel gamma [Unitless], Vortex strengths of each panel
Properties Used: N/A
- compute_rotation_effects(VD, settings, EW_large, GAMMA, X, CHORD, XLE, XBAR, rhs, COSINP, SINALF, COSCOS, PITCH, ROLL, YAW, STB, RNMAX)[source]#
This computes the effects of the freestream and aircraft rotation rate on CLE, the induced flow at the leading edge
Assumptions: Several of the values needed in this calculation have been computed earlier and stored in VD
Normally, VORLAX skips the calculation implemented in this function for linear chordwise spacing (the if statement below). However, since the trends are correct, albeit underestimated, this calculation is being forced here.
- strip_cumsum(arr, chord_breaks, strip_lengths)[source]#
Uses numpy to to compute a cumsum that resets along the leading edge of every strip.
Assumptions: chordwise_breaks always starts at 0
- compute_trefftz_plane_induced_drag(conditions, VD, cl, x_dist, y_dist, z_dist, chord_dist, SREF, b_ref, v_inf=1)[source]#
Compute induced drag using a Trefftz-plane (far-field wake) analysis.
The Trefftz plane is a control surface placed infinitely far downstream, where the trailing vortex wake has fully rolled up. In this plane the induced drag can be evaluated as a line integral of the downwash times the local lift, which is computationally cleaner and more accurate than integrating surface pressures in the near field.
The procedure follows the classical vortex-lattice / lifting-line approach used in codes such as AVL (Drela & Youngren) and VORLAX:
Circulation distribution – The bound-vortex circulation on each spanwise strip is reconstructed from the sectional lift coefficient and the Kutta–Joukowski theorem:
Γ = 0.5 · c · V∞ · cl · (DS / |ΔY|)
where DS = √(ΔY² + ΔZ²) is the true arc-length of each strip, and the DS/|ΔY| factor corrects for dihedral (for a flat wing DS = |ΔY| and the factor is unity).
Shed vortices – Horseshoe vortices are shed at the spanwise edges of each strip. The strength of the shed (trailing) vortex at each node is the difference in bound circulation between adjacent strips (Helmholtz vortex theorem). Tip vortices close the horseshoe with the full circulation at the tip. Symmetric wings are handled by zeroing the inboard root vortex; asymmetric wings shed a root vortex of full strength.
Induced velocity in the Trefftz plane – Each shed vortex induces a velocity at the centerpoint of every strip. The 2-D Biot–Savart kernel for a semi-infinite straight vortex filament reduces to:
w = Γ / (4π r)
where r is the perpendicular distance from the filament to the field point. The velocity vector is projected onto the outward normal of the receiving strip so that dihedral is handled correctly.
Induced angle of attack – The local induced downwash angle is:
α_i = arctan(w_i / V∞) ≈ w_i / V∞
Induced drag – Integrating along the span (using the composite trapezoid rule over arc-length) gives:
CDi = ∫ (α_i · cl · c / S_ref) ds
where s is the spanwise arc-length coordinate. This integral is evaluated separately for each wing surface and then summed.
- Assumptions:
Incompressible, inviscid flow (Trefftz-plane analysis is exact only in this limit; compressibility corrections are applied elsewhere).
The freestream speed is normalised to v_inf = 1 unless explicitly overridden; lift coefficients and circulation are consistent with this normalisation.
Strip widths are taken from the VLM panel geometry stored in VD; the chordwise discretisation does not affect the Trefftz-plane result.
Each wing is treated as an independent lifting surface when assembling the shed-vortex strengths; mutual induction between wings is accounted for in the induced-velocity loop over all panels.
Symmetric wings (xz-plane symmetry) have their inboard root vortex strength set to zero (the image on the other side is implicit).
- Parameters:
conditions (RCAIDE.Framework.Mission.Common.Results) –
Flight conditions data structure. The following fields are accessed:
conditions.aerodynamics.angles.alpha(n_cases, 1) [rad] Angle-of-attack for each flight condition.
VD (RCAIDE.Framework.Analyses.Aerodynamics.Vortex_Lattice_Method.Data) –
Vortex-lattice geometry descriptor populated by the VLM geometry build. Key arrays (all indexed by case
k):VD.Y[k]– global Y-coordinates of all VLM nodesVD.Z[k]– global Z-coordinates of all VLM nodesVD.n_sw[k]– number of spanwise strips per wing (n_wings,)VD.n_cw[k]– number of chordwise panels per strip (n_wings,)VD.normals[k]– unit panel normal vectors (n_panels, 3)VD.symmetric_wings[k]– boolean list; True if wing has xz symmetryVD.wing_areas– reference area of each wing (n_wings,)
cl (ndarray, shape (n_cases, n_strips)) – Sectional lift coefficient at the chordwise leading-edge panel of each spanwise strip, as computed by the near-field VLM pressure integration.
x_dist (ndarray, shape (n_cases, n_strips)) – Chordwise (X) coordinate of the leading-edge control points [m]. Currently not used directly inside this function (kept for API consistency and potential future extensions).
y_dist (ndarray, shape (n_cases, n_strips)) – Spanwise (Y) coordinate of the leading-edge control points [m]. Currently not used directly inside this function.
z_dist (ndarray, shape (n_cases, n_strips)) – Vertical (Z) coordinate of the leading-edge control points [m]. Currently not used directly inside this function.
chord_dist (ndarray, shape (n_cases, n_strips)) – Local chord length at each spanwise strip [m].
SREF (float) – Vehicle reference area [m²] used for non-dimensionalising forces.
b_ref (float) – Vehicle reference span [m]. Reserved for future use (aspect-ratio corrections, Oswald efficiency output, etc.).
v_inf (float, optional) – Freestream speed [m/s]. Default is 1 (non-dimensional). All circulation and induced-velocity calculations are proportional to v_inf; the resulting drag coefficient is independent of this value in the incompressible, linear limit.
- Returns:
results – Container with the following fields:
CDrag_inducedndarray (n_cases, 1) Total vehicle induced-drag coefficient.sectional_CDrag_inducedndarray (n_cases, n_strips) Spanwise distribution of the induced-drag coefficient integrandα_i · clat each strip (before chord-weighting and integration).CDrag_induced_wingndarray (n_cases, n_wings) Induced-drag coefficient contribution from each individual wing surface (referenced to SREF).alpha_inducedndarray (n_cases, n_strips) Local induced angle of attack at each strip [rad].
- Return type:
RCAIDE.Framework.Core.Data
Notes
- Arc-length vs. projected-span integration
RCAIDE normalises the sectional lift coefficient by the arc-length area
c × DSrather than the projected areac × ΔY. The DS/|ΔY| correction in the circulation formula compensates for this convention so that Γ is always the true bound circulation.- Integration direction
The sign of the tip shed vortex determines whether the strip ordering runs from root-to-tip or tip-to-root. The integrand is flipped as needed so that the trapezoid integration always proceeds from smaller to larger arc-length values, which is required for
scipy.integrate.trapezoid.- Mutual induction
The double loop over wing panels (i, j outer; l, m inner) computes the full mutual induction matrix, including the self-induction of each wing on itself as well as between-wing terms. This is equivalent to the Trefftz-plane integration in AVL but performed in the body (not wind) frame.
- Numerical singularity guard
Spanwise strips with zero projected width (ΔY = 0) are given a small floor value of 1e-6 m to avoid division-by-zero in the arc-length correction. This situation can arise for winglet panels that are oriented in the XZ plane.
References
Drela, M. and Youngren, H., “AVL 3.36 User Primer,” MIT, 2017. Katz, J. and Plotkin, A., “Low-Speed Aerodynamics,” 2nd ed.,
Cambridge University Press, 2001, Chap. 8.
- Lan, C. E., “A Quasi-Vortex-Lattice Method in Thin Wing Theory,”
Journal of Aircraft, Vol. 11, No. 9, 1974, pp. 518–527.