Inside the vortex core, velocity_3D_trailing_vortex! returns an induced velocity that points radially, 90° from the direction a vortex induces. #241 fixed the same projection in velocity_3D_bound_vortex! and velocity_3D_trailing_vortex_semiinfinite! and left this one.
src/filament.jl:191-196 places the field point on the core boundary along r1Xr0 / |r1Xr0|, which is the azimuthal direction, instead of along the radial component r1 - (r1·r0) r0 / |r0|² the other two functions now use.
Reproduced on main (2b312ea), filament from (0,0,0) to (1,0,0), Γ = 1, field point at x = 0.5 and distance r along y, so y is radial and z azimuthal:
trailing r=0.05 vel=[0.0, 0.01357, 0.0] (inside core: all radial)
trailing r=0.1 vel=[0.0, 0.02713, 0.0] (inside core: all radial)
trailing r=2.0 vel=[0.0, -0.0, 0.0193] (outside core: azimuthal)
bound r=0.05 vel=[0.0, -0.0, 0.02251] (inside core: azimuthal)
v_a = 1e-4 there to make the core wide enough to probe. At a realistic 10 m/s the Oseen core radius is sqrt(4·ALPHA0·NU·d/v_a) = 0.9 mm at d = 0.1 m and 3.9 mm at d = 2 m along the filament, so the branch fires only for evaluation points within millimetres of a panel's chordwise trailing segment — not at control points in a normal solve, but for anything evaluated at panel edges.
Fix: the same radial projection as #241, and the "Velocity is azimuthal" test from test/filament/test_bound_filament.jl:178 applied to velocity_3D_trailing_vortex! (it fails today).
Separate question, not part of the fix: the core radius is built from the axial distance |r1·r0|/|r0|, i.e. the vortex age, which is the Lamb–Oseen growth. The Python package switched all three filaments to the perpendicular distance of the field point in awegroup/Vortex-Step-Method@ed6f158, calling the axial form a mislabel. The comment at src/filament.jl:162 calls the axial length "the perpendicular component", so one of the two is wrong here as well.
Found while surveying the Python package for #113.
Inside the vortex core,
velocity_3D_trailing_vortex!returns an induced velocity that points radially, 90° from the direction a vortex induces. #241 fixed the same projection invelocity_3D_bound_vortex!andvelocity_3D_trailing_vortex_semiinfinite!and left this one.src/filament.jl:191-196places the field point on the core boundary alongr1Xr0 / |r1Xr0|, which is the azimuthal direction, instead of along the radial componentr1 - (r1·r0) r0 / |r0|²the other two functions now use.Reproduced on
main(2b312ea), filament from (0,0,0) to (1,0,0), Γ = 1, field point at x = 0.5 and distance r along y, so y is radial and z azimuthal:v_a = 1e-4there to make the core wide enough to probe. At a realistic 10 m/s the Oseen core radius is sqrt(4·ALPHA0·NU·d/v_a) = 0.9 mm at d = 0.1 m and 3.9 mm at d = 2 m along the filament, so the branch fires only for evaluation points within millimetres of a panel's chordwise trailing segment — not at control points in a normal solve, but for anything evaluated at panel edges.Fix: the same radial projection as #241, and the "Velocity is azimuthal" test from
test/filament/test_bound_filament.jl:178applied tovelocity_3D_trailing_vortex!(it fails today).Separate question, not part of the fix: the core radius is built from the axial distance
|r1·r0|/|r0|, i.e. the vortex age, which is the Lamb–Oseen growth. The Python package switched all three filaments to the perpendicular distance of the field point in awegroup/Vortex-Step-Method@ed6f158, calling the axial form a mislabel. The comment atsrc/filament.jl:162calls the axial length "the perpendicular component", so one of the two is wrong here as well.Found while surveying the Python package for #113.