Private Functions
VortexStepMethod.calculate_AIC_matrices! — Function
calculate_AIC_matrices!(body_aero::BodyAerodynamics, model::Model,
core_radius_fraction,
va_norm_array,
va_unit_array)Calculate Aerodynamic Influence Coefficient matrices.
See also: BodyAerodynamics, Model
Returns: nothing
VortexStepMethod.update_panel_properties! — Function
update_panel_properties!(panel_props::PanelProperties, section_list::Vector{Section}, n_panels::Int)Update geometric properties for each panel.
Arguments
Returns:
nothing, updates the PanelProperties in-place
VortexStepMethod.calculate_inertia_tensor — Function
calculate_inertia_tensor(vertices, faces, mass, com)Calculate the inertia tensor for a triangulated surface mesh, assuming a thin shell with uniform surface density.
Arguments
vertices: Vector of 3D point coordinates representing mesh verticesfaces: Vector of triangle indices, each defining a face of the meshmass: Total mass of the shell in kgcom: Center of mass coordinates [x,y,z]
Method
Uses the thin shell approximation where:
- Mass is distributed uniformly over the surface area
- Each triangle contributes to the inertia based on its area and position
- For each triangle vertex p, contribution to diagonal terms is: area * (sum(p²) - p_i²)
- For off-diagonal terms: area * (-
p_i*p_j) - Final tensor is scaled by mass/(3*total_area) to get correct units
Returns
- 3×3 matrix representing the inertia tensor in kg⋅m²
VortexStepMethod.unrefined_deform! — Function
unrefined_deform!(wing::Wing, theta_angles=nothing, delta_angles=nothing)Apply deformation angles defined per unrefined section.
Refined-section twist and TE-deflection values are computed by linear interpolation from the unrefined-section inputs using the precomputed refined_section_left_idx / refined_section_weight cache built at refinement time. Endpoint refined sections take the unrefined endpoint values exactly. The panel-level theta_dist / delta_dist arrays are then filled by averaging adjacent refined-section values, so downstream consumers (solver, body aerodynamics) see a per-panel value.
Arguments
wing::Wing: Wing to deform (must have nondeformedsections, populated byrefine!for manual/YAML wings or by OBJ refinement for OBJ-based wings).theta_angles::AbstractVector: Twist angles in radians, one per unrefined section. Passnothingto leave twist unchanged.delta_angles::AbstractVector: TE deflection angles in radians, one per unrefined section. Passnothingto leave deflection unchanged.
Keyword arguments
smooth,smooth_window: accepted for backwards compatibility with callers ofdeform!, but ignored here — the linear interpolation between unrefined sections is already smooth, so no post-hoc smoothing is applied.