Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Once a distance below 1e-16 has returned, the core-axis test needs a distance below 1e-24 * 4 alpha nu / va, so an inflow under 7e-13 m/s. A solve refuses zero inflow before it builds the influence matrices. The docstring named the wrong function and arguments; it now gives the right ones and says what happens inside the core. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
From the #318 branch: Gaunaa et al. 2026's straight elliptic wing reaches 1 with the quarter-chord flow turning the force, and stays below 0.8 without it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A point within coordinate rounding of a semi-infinite wake line got a core boundary speed of 1.85e9 m/s from an absolute 1e-16 guard, where the finite kernel gave zero from a relative 1e-10 one. Both now share the relative rule. Skip the stability limit's lookups when a relaxation factor is named, type its seeds so the Dual path is stable, and pin the default stop to within 1e-5 of the converged Python result. Name the moment sum and the chord change in the changelog, and take the private limit out of Added. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
||
| ### Changed | ||
|
|
||
| - Default results now agree with the Python VSM v2.3.0, most visibly on swept and curved |
There was a problem hiding this comment.
More correct results but changed. So this is breaking change.
There was a problem hiding this comment.
Also this reads as "we edited the results" I want to see, "we changed this to agree with the python version and the gaunaa paper and now it agrees with the python version"
There was a problem hiding this comment.
Marked BREAKING in 2e85236: default results, solver defaults, unrefined distributions, section moment and LLT correct_aoa; also added to the standing rules.
There was a problem hiding this comment.
And did we port all python tests as well? And update all tests?
There was a problem hiding this comment.
No to the first: not all ported yet. Of Python's 198 tests, by reading both suites, 84 are pinned in Julia and 16 had a feature but no test. 0cab56c takes the 2 of those on this branch's own code; #417, which I should have queued earlier, ports the other 14. 48 wait on missing features (#411 16, #412 8, #414 3, Masure on #387 10, declined on #113 10, zero-speed wake 1) and 50 test Python-only mechanics like numba and CasADi.
Mostly yes to the second, with holes now fixed in 0cab56c. No assertion was loosened and the suite passed, but the reference test skipped V3's relaxation check, which hid a real mismatch (0.0214 vs Python's 0.0232, now equal). Two coefficient literals had drifted inside their tolerance, nothing ran the default iteration limit, and the leg force's moment check was gone. The Julia matrix has not run, because this PR is a draft; the local suite on 0cab56c is running.
The same input now gives different numbers, so these entries are breaking even where the new results are more correct. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reference test left V3 out of its relaxation check. Julia scanned 1 degree forward differences where Python takes 0.5 degree central differences at the table's angles, which gave 0.0214 against 0.0232. The rule is now Python's on vector polars, sharing one slope definition with the artificial viscosity, and all nine cases match to 1e-12. Tests the branch owed: default iterations converge and a repeat solve stays small, the reference inflow, a new inflow keeps the correction, the closed-form limit and a named factor, a panel in still air keeps its wake, the moment of the leg forces, and the two coefficient literals the change had moved inside their tolerance. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Julia was translated from Python v1.0.0, and Python's v2.3.0 changed its default results. On swept and curved wings, which is every kite, the two had drifted several percent apart. With this branch, Julia matches Python's circulation, angles, per-panel forces and moments, totals and coefficients to six digits on nine reference cases generated by running the Python code, with both solved to a tight stop. At the default stop, circulation, angles and coefficients stay within 1e-5 of those results.
What moved: circulation now follows the effective speed. The chord and chordwise axis are measured square to the bound vortex. Forces turn with the flow at the quarter chord, including a correction for a curved bound vortex, and drag runs along that flow. The force on the chordwise legs is on by default and shared per section boundary. Each wake follows its own panel's inflow, and reference pressure and directions leave out body rates. The defaults also change to 5000 iterations and a relaxation factor of 0.8 of the stability limit, read off the polar the way Python does, so the curved reference wing that used to diverge now converges.
The same default change ends the lost induced drag of #318: the straight elliptic wing of aspect ratio 4 from Gaunaa, Li & Pirrung 2026 now reaches an Oswald efficiency of 0.9947, against 0.7295 with the quarter-chord force direction off.
Agreeing with Python does not make swept wings right. Against that paper's vortex-lattice results, Oswald efficiency is off by −8.2 % at 15 % sweep, −8.0 % at 10 % sweep with 25 % anhedral and −11.1 % at 25 % sweep, where the solver does not converge. The paper's own model is off by +5.6 %, −0.5 % and +1.1 %. Purely curved wings are off by ±2.4 %. These were measured on the previous head by the task behind #400, whose card plots them, and the chord direction on the swept wings is an assumption. #416 tracks the gap; closing it may mean leaving Python's rule, which is the owner's choice.
This is a breaking change even where the results are more correct: the same input now gives different numbers, and the changelog marks it so. That reaches KiteModels wherever its settings do not name these options. Setting the two force options to false and naming a relaxation factor restores those switches, but not the geometry or circulation changes.
Decisions I made:
clandcdwithin 5.4e-6 of the converged result.Found on the way: faster convergence exposed that unrefined section coefficients were plain means, so they are now area-weighted, with the same code as #402. In that code the section chord becomes area over width, and the section moment becomes the sum of its panels rather than their mean. That moment, and the
linearizeoutputs and Jacobian rows taken from it, now grow with the panels per section. A semi-infinite filament now gives zero rather than NaN on its own axis, as #408 also does. It also counts a point within rounding of its line as on the line, by the rule the finite filament uses; such a point got 1.85e9 m/s at 1e-15 m.This covers default results only, so the issue stays open. The missing features are queued as parts of it, each with its Python tests. Of Python's 198 tests, 84 are pinned in Julia and #417 ports 14 more whose feature already exists; the rest wait on those parts, were declined, or test Python-only mechanics such as its compiler and CasADi. That count comes from reading both suites, not from a run. Left out: bridle drag, which stays in KiteModels as ruled on #113, and the other items declined there (flat area, rotate, cosine circulation, configurable aerodynamic-centre fractions) unless the owner says otherwise.
To act on: stacked on #392, which merges first. It takes a different route from #400, whose rule is not Python's, and from #408's core scaling. It conflicts with #402 in the solver, where the aggregation code is identical. SymbolicAWEModels calls the drag-direction helper with an argument that is now gone, so it needs a one-line change when it raises its bound to the release #392 forces.
Verification
test/verification/test_python_reference.jl: green on nine cases (straight, swept, arc, sideslip, LLT, viscous, body rates, distributed inflow, V3). Red before: run through a script on the unchanged code, since the test itself names functions this branch addstest/verification/test_verification.jl: the aspect-ratio-4 test is green, 24/24 in the file; red with the quarter-chord force direction disabled (0.7295, 23/24)test/bench.jl,test_verification.jl,test_curved_bound_correction.jl,test_forwarddiff.jl; the six a later filament change touches (test_bound_filament.jl,test_panel.jl,test_curved_bound_correction.jl,test_python_reference.jl,test_forwarddiff.jl,test/bench.jl) rerun on the previous head; on this head the ten files the last fixes touch, and the docstest_wing_geometry.jl,test_unrefined_dist.jlandtest_python_reference.jlgreen, no conflicttest_python_reference.jl: the default stop and default iteration limit converge within 1e-5 on all nine cases, and the relaxation factor matches Python to 1e-12, red before on V3 (0.0214 vs 0.0232). A repeat solve stays under 1 kB, red at 4240 B on a first version of that fix.test_semi_infinite_filament.jl: rounding off the line gives zero, red before at three distances.test_forwarddiff.jl: the stability limit is type-stable on dual numbers, red before (Union{Float64, Dual})test_curved_bound_correction.jl: rebuilding the correction allocates under 2 kB, red before the fix, when a V3 solve after a shape change allocated 1,536,208 B at 18 panelscalc_forces!0 Bclis checked against the control-point angle. The NaN assertion on the filament axis is now zero. One trim call tightens its angle tolerance to 1e-6, since its 1e-5 assertion sat at 1.17e-5.test/data/python_reference/generate_reference.pyCloses #318
Opened by
1-Bort-1, an AI agent working for @1-Bart-1.Refs #410 · task
VortexStepMethod.jl-410