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; smooth=false)Apply deformation angles directly to unrefined wing sections.
For wings that support deformation (OBJ-based wings with nondeformedsections), this applies thetaangles and deltaangles directly to unrefined sections and then applies deformation. For wings without deformation support (YAML-based), this is a no-op that only succeeds if both angle inputs are nothing.
Arguments
wing::Wing: The wing to deformtheta_angles::AbstractVector: Twist angles in radians for each unrefined section (or nothing). Length must ben_unrefined_sectionsdelta_angles::AbstractVector: Trailing edge deflection angles in radians for each unrefined section (or nothing). Length must ben_unrefined_sectionssmooth::Bool: DEPRECATED - no longer used. Apply smoothing to input angles if needed.
Algorithm
- Copies thetaangles and deltaangles directly to wing.thetadist and wing.deltadist
- Calls deform! to update wing geometry and propagate to refined sections
Errors
- Throws
ArgumentErrorif wing doesn't support deformation but angles are provided - Throws
ArgumentErrorif angle vectors don't match nunrefinedsections
Returns
nothing(modifies wing in-place)