Skip to content

Add rigid-body stability derivatives and a trim-angle search, as in the Python package #330

Closed

Description

@1-Bort-1

The Python package has rigid-body stability derivatives and a trim-angle search; this package has neither. The closest thing here is linearize (src/solver.jl:1266), which returns the dimensional Jacobian of forces and moments with respect to va and omega (about the origin), for one wing only.

What Python has, in src/VSM/stability_derivatives.py and src/VSM/trim_angle.py (awegroup/Vortex-Step-Method@a397bcd, v2.0.0):

  • compute_rigid_body_stability_derivatives(body_aero, solver, angle_of_attack, side_slip, velocity_magnitude, roll_rate, pitch_rate, yaw_rate, step_sizes, reference_point, nondimensionalize_rates=True): dC{x,y,z}_d{alpha,beta,p,q,r} and dCM{x,y,z}_d{...} by central differences, rate derivatives optionally in p̂ = pb/2V, q̂ = qc/2V, r̂ = rb/2V.
  • map_derivatives_to_aircraft_frame: VSM frame (x back, z up) to aircraft frame (x forward, z down).
  • build_malz_coeff_table_from_solver: the derivatives as quadratics in alpha, the table format of Malz et al.'s kite models.
  • compute_trim_angle(body_aero, solver, side_slip, velocity_magnitude, ..., alpha_min, alpha_max, reference_point): coarse alpha sweep for a CMy sign change, bisection, and dCMy/dalpha < 0 as the stability check.

Proposal: build both on linearize rather than on finite differences — the alpha/beta derivatives are the chain rule through va, and p/q/r already come out of the omega columns once the rotation is taken about the reference point (#329). Needs support for more than one wing in linearize to cover multi-wing bodies.

Upstream caveats worth not porting: build_malz_coeff_table_from_solver on Python main still passes the removed yaw_rate/pitch_rate/roll_rate keywords to va_initialize, and _evaluate_with_angles drops body_axis (fixed only on the improve_plotting branch).

Found while surveying the Python package for #113.

Activity

  1. 1-Bort-1 commented on Sep 16, 2026

    @1-Bort-1
    MemberAuthor

    Answering @1-Bart-1's comment on #346: exporting apparent_wind and using it in the examples, README and docs snippets that build va_vec from alpha/beta by hand (bench, stall_model, linearize_check, rectangular_wing, billowing, obj_to_yaml_kite, index.md, examples.md). Tests keep their literal vectors.

  2. 39 remaining items

  3. added and removed on Sep 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions