Repository navigation
alpha is built from the full relative velocity, not its component perpendicular to the quarter-chord line #317
Description
panel_inflow forms the polar-lookup angle from the full relative velocity:
v_eff = 0.5 .* (va_1 .+ va_2) .+ v_ind
alpha = atan(dot(v_eff, z_airf), dot(v_eff, x_airf))(src/panel_aerodynamics.jl:119-120, and open-coded on the hot path at src/solver.jl:749-759.)
Gaunaa, Li & Pirrung, From thin airfoil theory to finite wings: consistent implementation of Lifting Line-based models, TORQUE 2026, J. Phys. Conf. Ser. 3224 042030 (OpenSourceAWE/Internal Papers/Gaunaa_2026.pdf) states the rule as CP1, boxed, p. 3:
Only the relative velocity component perpendicular to the local span direction, here defined as the quarter-chord bound vortex line, should be used in the inner 2D part of the LL framework.
and writes it as Eq. (1), p. 4, applied before the angle is formed:
V^⊥_{3D,i} = V{3D,i} − (V{3D,i} · e{s,i}) e{s,i}
α_{3/4,i} = atan2(V{inner,3/4,i} · e{n,i}, V{inner,3/4,i} · e{c,i}) (Eq. 3, p. 5)
The projection is missing here. It matters only in the denominator: z_airf is already perpendicular to the quarter-chord line, so dot(v, z_airf) == dot(v_perp, z_airf) exactly, but x_airf is the raw chord and carries a spanwise component on any swept panel.
Half of the rule is already obeyed elsewhere in the same function. The dynamic pressure is built from v_span = cross(v_eff, y_airf) (src/panel_aerodynamics.jl:121, v_a_dist at src/solver.jl:731-766), which is the span-perpendicular speed — simple sweep theory's cos²Λ about the quarter-chord line. So q is measured in the crossflow plane and alpha is not.
Size
On the swept, twisted panel test/panel/test_panel.jl already builds, where the chord sits 45.128° out of the span-perpendicular plane (cos(sweep) = 0.705526):
v_eff |
alpha today |
Eq. (1) then Eq. (3) |
|---|---|---|
[1, 0, 0] |
−14.299° | −27.411° … −20.097° |
[1, 0.3, 0] |
−13.473° | −35.422° … −26.647° |
[1, 0, 0.1] |
−20.003° | −36.679° … −27.721° |
[1, 0.3, 0.1] |
−19.205° | −46.540° … −36.668° |
The range in the right-hand column is a genuine ambiguity in the paper, not measurement slop: it never defines e_c,i by equation, and the word "project" does not occur in it. Taking e_c,i as the raw chord unit vector gives the left figure; taking it as the chord re-normalised inside the span-perpendicular plane gives the right one, smaller by cos(sweep). Both are 13–27° from what the solver does now.
Over the reference wings at N=40, the largest angle between chord and the span-perpendicular plane is 15.86° (:rectangular), 0.00° (:curved), 0.00° (:elliptical) — and test/thesis_oriol_cayon.jl forms alpha the same way the solver does, so the suite pins whichever convention is chosen and cannot see this.
What I would do
Apply Eq. (1) to v_eff in panel_inflow before the atan, and take e_c,i as the chord re-normalised in that plane, so that alpha, q_dyn and z_airf are all measured about the same line. That needs deciding, because the paper leaves e_c,i open and because it moves every swept panel's polar lookup — it wants a swept, tapered validation case with a known answer, which the suite does not have. #273 deliberately left it alone.
This was raised for the record as item 1 of "Related, possibly by design" on #272, where it was pinned on y_airf rather than on x_airf; #272's item 2 there is already out of date, since q is the crossflow one. It gets its own issue because CP1 turns it from a question into a defect. Found while checking #273 against this paper.
Activity
1-Bort-1 commentedon Sep 16, 2026
Measuring alpha about the chord projected onto the span-perpendicular plane (CP1), on main now that #273 merged: one inflow_angle for all five places alpha is formed, x_airf left as the raw chord. Leaving #318/#319 alone.
1-Bort-1 commentedon Sep 16, 2026
Question from
VortexStepMethod.jl-317Which chord should alpha be measured against on a swept panel?
A) Raw chord: project v perpendicular to the quarter-chord line (Eq. 1), then dot it with today's x_airf. The raw chord sits outside that plane, so the denominator is scaled by cos(sweep). The result is an angle in no plane.
B) Chord re-normalised in the span-perpendicular plane, as x_airf := y_airf × z_airf in panel_axes. On #273's frame that vector is exactly the in-plane chord (4.6e-15 over 1000 random panels). The panel frame becomes orthonormal, so every place that forms or inverts alpha follows at once: panel_inflow, the solver hot path, dir_inflow, alpha_geometric and correct_aoa. The cost is that the thesis oracle's pinned tangential moves on :rectangular (at most 15.9° out of plane), which is re-pinning the reference.
Measured on converged solves, CP1 alone on top of #273, max |Δalpha|:
The 13–27° in the issue holds only on #273's 45° test panel.
My recommendation: B, stacked on #273. The branch would change panel_axes plus the hot path, add a test on that panel, and re-pin the oracle's tangential. No swept validation case exists, so the PR would say it is unvalidated.
1-Bart-1 commentedon Sep 24, 2026
I am not sure, we should stick as close as possible to the Gaunaa paper and do the most physically correct option.
5 remaining items