Private Functions

VortexStepMethod.calculate_inertia_tensorFunction
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 vertices
  • faces: Vector of triangle indices, each defining a face of the mesh
  • mass: Total mass of the shell in kg
  • com: Center of mass coordinates [x,y,z]

Method

Uses the thin shell approximation where:

  1. Mass is distributed uniformly over the surface area
  2. Each triangle contributes to the inertia based on its area and position
  3. For each triangle vertex p, contribution to diagonal terms is: area * (sum(p²) - p_i²)
  4. For off-diagonal terms: area * (-p_i * p_j)
  5. Final tensor is scaled by mass/(3*total_area) to get correct units

Returns

  • 3×3 matrix representing the inertia tensor in kg⋅m²
source
VortexStepMethod.group_deform!Function
group_deform!(wing::RamAirWing, theta_angles::AbstractVector, delta_angles::AbstractVector)

Distribute control angles across wing panels and apply smoothing using a moving average filter.

Arguments

  • wing::RamAirWing: The wing to deform
  • theta_angles::AbstractVector: Twist angles in radians for each control section
  • delta_angles::AbstractVector: Trailing edge deflection angles in radians for each control section
  • smooth::Bool: Wether to apply smoothing or not

Algorithm

  1. Distributes each control input to its corresponding group of panels
  2. Applies moving average smoothing with window size based on control group size

Errors

  • Throws ArgumentError if panel count is not divisible by the number of control inputs

Returns

  • nothing (modifies wing in-place)
source