Skip to content

Name the apparent wind va, va_vec and va_dist everywhere except the public API - #349

Merged
1-Bart-1 merged 5 commits into
mainfrom
agent/337-one-name-per-apparent-wind-quantity-va-v
Sep 17, 2026
Merged

1-Bart-1 merged 5 commits into
mainfrom
agent/337-one-name-per-apparent-wind-quantity-va-v

Conversation

@1-Bort-1

Copy link
Copy Markdown
Contributor

TL;DR

Every local, argument, test, example and doc now uses the #147 convention for the apparent wind: va is the speed, va_vec the vector, va_dist the per-panel speeds and va_vec_dist the per-panel vectors. It is the first of the two PRs you picked with option A on #337, so nothing public changes: struct fields, keywords, the body_aero.va property and the YAML keys stay for the stacked breaking PR.

What changed

quantity was now
speed [m/s] v_a, va_norm, va_mag, va_ref_mag, va_panel_mag, filament vel_mag argument va, va_ref, va_panel
3-vector vector va locals, vel_app, va_ref_vector, va_1/2, dva_1/2, delta_va, omega_va, va_b_0 va_vec, va_ref_vec, va_vec_1/2, dva_vec_1/2, delta_va_vec, omega_va_vec, va_vec_b_0
per-panel speeds va_norm_dist va_dist
per-panel vectors (P×3) va_dist, va_distribution va_vec_dist

va_dist used to mean the P×3 matrix and now means the speeds. calc_norm_dist!(va_dist, va_vec_dist), calculate_results, update_effective_angle_of_attack! and update_gamma_candidate! take both, so the P×3 rename ran first.

v_a_dist did not fit the convention: it holds |(va + v_ind) × y_airf|, the in-plane relative speed that feeds the dynamic pressure, not the apparent wind speed (solver.jl, update_gamma_candidate!). Its locals and arguments are now v_rel_dist, after v_rel in panel_aerodynamics.jl. Calling it va_dist would have been wrong.

Where public keywords meet renamed locals, the call names both: plot_polars(...; v_a=va) and BodyAerodynamics(...; va=va_vec). The Makie extension's arrow now uses va_unit rather than a scalar va, so the stacked PR's v_a=va= rename does not shadow it.

Tidied in files this PR already touches: the extension carried a second, unattached generate_polar_data docstring that duplicated the one in plotting_helpers.jl and still said v_a, so it is deleted. Renamed lines past 92 columns are wrapped, and error messages name the new arguments (set_va!(body_aero, va_vec), va_vec_dist must be shape ...).

Left alone, and why

  • Public API, deferred to the stacked breaking PR: struct fields (Panel.va, _va, has_distributed_va, v_a_dist, _va_dist, va_unrefined_dist, BaseResult.va_norm_dist, SemiInfiniteFilament.vel_mag). SymbolicAWEModels reads ._va, panel.va and lr.v_a_dist. Also deferred: body_aero.va, the va=/v_a=/va_idxs= keywords, the "va_ref" result key, and the YAML keys airfoil.v_app and condition.wind_speed.
  • Not the apparent wind: va1..3 (components), va_magw_dist and v_acrossz_dist (projections), the *_prescribed_va force locals, and va/vb in obj_slice.jl (triangle vertices).
  • Kept as is: Uinf in test/thesis_oriol_cayon.jl, a port of the thesis code where it is a vector in some functions and a scalar in others. The example plot titles, which are also the saved figure names, now say _va_ instead of _v_a_.
  • No changelog entry: nothing a caller writes changes. The stacked PR carries the BREAKING: entry.

Verification

  • Reproduced first: n/a, a rename with no behaviour change. No test assertion changed; the tests were renamed like everything else.
  • juliaserver, all green: body_aerodynamics/test_body_aerodynamics.jl, body_aerodynamics/test_results.jl, filament/test_semi_infinite_filament.jl, filament/test_bound_filament.jl, wake/test_wake.jl, panel/test_panel.jl, solver/test_solver.jl (34/34), solver/test_flow_curvature.jl, solver/test_unrefined_dist.jl, solver/test_forwarddiff.jl, solver/test_moment_units.jl, plotting/test_plotting.jl (93/93), settings/test_settings.jl, bench.jl (21/21). The last round's error-message and test-helper fixes were rerun on a fresh session: body_aerodynamics, results, semi_infinite_filament, wake, test_solver and flow_curvature.
  • examples/rectangular_wing.jl ran to the end, plots included (plot_polars(...; v_a=va)). The other examples and mwes were not run; a per-file check found every renamed local defined and no v_a left except as the public keyword.
  • Docs build clean (docs/make.jl without deploy, test environment) · up to date with main (246237a) · no REUSE in this repo
  • Local CI mirror (agent ci-local, Julia 1.12) started after the push, result not in yet · GitHub CI: see checks
  • Benchmark: n/a
  • Risk: a rename slip in an example I did not run. CI does not run them either.

Scope

+353 / −365 across 36 files, all renames plus the deleted duplicate docstring (−23) and line wraps. Stack: 1/2. The breaking public rename is #348, stacked on this PR.

Refs #337 · task VortexStepMethod.jl-337

1-Bort-1 and others added 4 commits September 17, 2026 00:22
…ents

Scalar norms become va, 3-vectors va_vec, per-panel norms va_dist and the
P×3 per-panel vectors va_vec_dist. The per-panel |v_rel × y_airf| that
was v_a_dist becomes v_rel_dist. Struct fields, keywords and properties
keep their names. Drops the ext's unattached copy of the
generate_polar_data docstring.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…docs

vel_app and the vector v_a become va_vec, the scalar v_a becomes va,
va_distribution and the P×3 va_dist become va_vec_dist, and va_norm_dist
becomes va_dist. Public keywords keep their names (v_a=va, va=va_vec).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@1-Bort-1 1-Bort-1 added agent:running Agent task state agent:ci Agent task state and removed agent:running Agent task state labels Sep 16, 2026

@1-Bort-1 1-Bort-1 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent review (advisory)

Verdict: APPROVE WITH COMMENTS · 1 inline, 0 off the diff

Good

  • The v_rel_dist rename is right: solver.jl:763 fills lr.v_a_dist with the smoothed in-plane speed, and solver.jl:776 divides by it to get gamma, so calling it va_dist would have been wrong.
  • The swap of va_dist (was P×3, now speeds) is done cleanly: calculate_results, update_effective_angle_of_attack!, calc_norm_dist! and the test/bench.jl call now take va_vec_dist, va_dist in the same order in signatures, docstrings and callers.
  • Struct fields stay as the card says: lr.v_a_dist, br.va_norm_dist, sol._va_dist, _va, panel.va and SemiInfiniteFilament.vel_mag are untouched, and reinit! still calls set_va!(body_aero, va, omega) with the public va keyword.
  • The Makie arrow change keeps behaviour: -2*max_chord*va_unit equals the old -2*max_chord*va/va_mag, and it frees the name va for the stacked keyword rename.
  • Deleting the loose generate_polar_data docstring in the extension is in scope: it was attached to nothing, repeated plotting_helpers.jl:76 and still said v_a.
  • What is left over matches the card's list: a grep for v_a|va_norm|va_mag|vel_app|va_distribution finds only public v_a= keywords, the struct fields, va_magw_dist, the thesis port and old CHANGELOG entries.
  • The long lines are wrapped: none of the added lines in src/body_aerodynamics.jl or src/panel_aerodynamics.jl goes past 92 columns.

Not good

  • src/plotting_helpers.jl:93 — This renames the generate_polar_data keyword from v_a= to va=, which contradicts the card's claim that keywords wait for the stacked PR and the rubric's rule that keyword names are API. The card never mentions it, and any outside caller using v_a= now gets a MethodError. Keep v_a= here and move this to #348.
  • test/bench.jl:97 and :189 were renamed but are still well past 92 columns, although the card says renamed long lines were wrapped.
  • The errors at body_aerodynamics.jl:340/352 name va_vec/va_vec_dist, but the argument is va_input and users pass the public va=, so the message points to a name no caller writes.
  • test/thesis_oriol_cayon.jl:77-80 still has a scalar local v_a = norm(Uinf); the card only says Uinf was kept, and this one-name rename to va fits the convention.
  • Only rectangular_wing.jl was run; linearize_check.jl (va_vec_b_0 in y0) and billowing.jl are the untested renames most likely to hide a slip, and CI does not run them.
  • The example plot titles, which are also the saved file names, change from _v_a_ to _va_. Anyone scripting over saved figures sees new names, so a changelog line may be worth it even though no API changes.

claude, rubric CLEAN_CODE.md. A different lab from the implementer
on purpose: a reviewer sharing its blind spots would not flag its mistakes.

Comment thread src/plotting_helpers.jl
angle_of_attack=0.0,
side_slip=0.0,
v_a=10.0
va=10.0

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MINOR: This renames the generate_polar_data keyword from v_a= to va=, which contradicts the card's claim that keywords wait for the stacked PR and the rubric's rule that keyword names are API. The card never mentions it, and any outside caller using v_a= now gets a MethodError. Keep v_a= here and move this to #348.

@codecov

codecov Bot commented Sep 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.92473% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/body_aerodynamics.jl 97.87% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@1-Bort-1 1-Bort-1 added agent:review Agent task state agent:queued Agent task state agent:running Agent task state and removed agent:ci Agent task state agent:review Agent task state agent:queued Agent task state labels Sep 16, 2026
#352 rewrote calculate_results' panel loop around panel_loads' force and added
spanwise_flow_drag. Keeps that structure with this branch's names: v_rel_dist
for |v_rel x y_airf|, va_panel and inv_va_panel, spanwise_flow_drag(v_rel, ...),
and va_vec for the vector locals of its test.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@1-Bart-1
1-Bart-1 enabled auto-merge September 17, 2026 07:53
@1-Bort-1

Copy link
Copy Markdown
Contributor Author

Local full suite: PASS (11 min, Julia 1.12.7, one cell of the matrix)

@1-Bart-1
1-Bart-1 merged commit 83867a3 into main Sep 17, 2026
6 checks passed
1-Bort-1 added a commit that referenced this pull request Sep 17, 2026
…the-

Main's #349 renamed the apparent-wind locals to va_vec in the lines this
branch moved to Solver(n_panels, n_unrefined_sections); both kept.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@1-Bort-1 1-Bort-1 added agent:queued Agent task state agent:done Agent task state and removed agent:running Agent task state agent:queued Agent task state labels Sep 17, 2026
1-Bort-1 added a commit that referenced this pull request Sep 17, 2026
…ange

#349 renamed the apparent-wind locals and arguments; set_va!'s pivot, the
yaw_rate settings method and the new tests take its va_vec / va_vec_dist
names. CHANGELOG: #328's second Fixed heading folded into the one above.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1-Bort-1 added a commit that referenced this pull request Sep 17, 2026
…-and

Resolves set_va!(body_aero, settings) against the va rename (#349): the
body calls apparent_wind and names the vector va_vec, as does
stability_derivatives.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent:done Agent task state

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants