Name the apparent wind va, va_vec and va_dist everywhere except the public API - #349
Conversation
…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
left a comment
There was a problem hiding this comment.
Independent review (advisory)
Verdict: APPROVE WITH COMMENTS · 1 inline, 0 off the diff
Good
- The
v_rel_distrename is right:solver.jl:763fillslr.v_a_distwith the smoothed in-plane speed, andsolver.jl:776divides by it to get gamma, so calling itva_distwould 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 thetest/bench.jlcall now takeva_vec_dist, va_distin 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.vaandSemiInfiniteFilament.vel_magare untouched, andreinit!still callsset_va!(body_aero, va, omega)with the publicvakeyword. - The Makie arrow change keeps behaviour:
-2*max_chord*va_unitequals the old-2*max_chord*va/va_mag, and it frees the namevafor the stacked keyword rename. - Deleting the loose
generate_polar_datadocstring in the extension is in scope: it was attached to nothing, repeatedplotting_helpers.jl:76and still saidv_a. - What is left over matches the card's list: a grep for
v_a|va_norm|va_mag|vel_app|va_distributionfinds only publicv_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.jlorsrc/panel_aerodynamics.jlgoes past 92 columns.
Not good
src/plotting_helpers.jl:93— This renames thegenerate_polar_datakeyword fromv_a=tova=, 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 usingv_a=now gets a MethodError. Keepv_a=here and move this to #348.test/bench.jl:97and:189were renamed but are still well past 92 columns, although the card says renamed long lines were wrapped.- The errors at
body_aerodynamics.jl:340/352nameva_vec/va_vec_dist, but the argument isva_inputand users pass the publicva=, so the message points to a name no caller writes. test/thesis_oriol_cayon.jl:77-80still has a scalar localv_a = norm(Uinf); the card only saysUinfwas kept, and this one-name rename tovafits the convention.- Only
rectangular_wing.jlwas run;linearize_check.jl(va_vec_b_0iny0) andbillowing.jlare 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.
| angle_of_attack=0.0, | ||
| side_slip=0.0, | ||
| v_a=10.0 | ||
| va=10.0 |
There was a problem hiding this comment.
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 Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
#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>
|
Local full suite: PASS (11 min, Julia 1.12.7, one cell of the matrix) |
…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>
…-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>
TL;DR
Every local, argument, test, example and doc now uses the #147 convention for the apparent wind:
vais the speed,va_vecthe vector,va_distthe per-panel speeds andva_vec_distthe 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, thebody_aero.vaproperty and the YAML keys stay for the stacked breaking PR.What changed
v_a,va_norm,va_mag,va_ref_mag,va_panel_mag, filamentvel_magargumentva,va_ref,va_panelvalocals,vel_app,va_ref_vector,va_1/2,dva_1/2,delta_va,omega_va,va_b_0va_vec,va_ref_vec,va_vec_1/2,dva_vec_1/2,delta_va_vec,omega_va_vec,va_vec_b_0va_norm_distva_distva_dist,va_distributionva_vec_distva_distused 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!andupdate_gamma_candidate!take both, so the P×3 rename ran first.v_a_distdid 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 nowv_rel_dist, afterv_relinpanel_aerodynamics.jl. Calling itva_distwould have been wrong.Where public keywords meet renamed locals, the call names both:
plot_polars(...; v_a=va)andBodyAerodynamics(...; va=va_vec). The Makie extension's arrow now usesva_unitrather than a scalarva, so the stacked PR'sv_a=→va=rename does not shadow it.Tidied in files this PR already touches: the extension carried a second, unattached
generate_polar_datadocstring that duplicated the one inplotting_helpers.jland still saidv_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
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.vaandlr.v_a_dist. Also deferred:body_aero.va, theva=/v_a=/va_idxs=keywords, the"va_ref"result key, and the YAML keysairfoil.v_appandcondition.wind_speed.va1..3(components),va_magw_distandv_acrossz_dist(projections), the*_prescribed_vaforce locals, andva/vbinobj_slice.jl(triangle vertices).Uinfintest/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_.BREAKING:entry.Verification
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.jlran 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 nov_aleft except as the public keyword.docs/make.jlwithout deploy, test environment) · up to date with main (246237a) · no REUSE in this repoagent ci-local, Julia 1.12) started after the push, result not in yet · GitHub CI: see checksScope
+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