Skip to content

plot_slices_3d builds its own deflection filename tag, so it finds no  #298

Description

@1-Bort-1

plot_slices_3d builds its own deflection filename tag, so it finds no .dat for a negative or fractional delta

generated_slices in ext/VortexStepMethodMakieExt.jl:1614-1615 rolls its own tag for the per-deflection file instead of calling AirfoilAero.delta_suffix (src/section_aero.jl:105-118), which is the function that named the file when generate_airfoils wrote it:

    deg = round(float(delta); digits=1)
    tag = "_d" * (deg == round(deg) ? string(Int(deg)) : string(deg)) * ".dat"

delta_suffix substitutes m for the minus sign and p for the decimal point; this does not. The two agree only on positive integer degrees:

delta written plot_slices_3d looks for
10 _d10.dat _d10.dat
-3 _dm3.dat _d-3.dat
2.5 _d2p5.dat _d2.5.dat
-40 _dm40.dat _d-40.dat

So plot_slices_3d(path; delta=-10) draws no deflected contour at all and warns No generated .dat for delta=-10°; generated deflections are named airfoils/<i>_d<degrees>.dat — a message that also states the wrong scheme. On the SK100's delta_range = -40:10:40 that is four of the eight non-zero deflections, silently blind. #294's follow-up work generates both signs, so this starts firing.

The fix is to delete the local tag and call AirfoilAero.delta_suffix(deg2rad(delta))generated_slices takes delta in degrees, delta_suffix in radians — leaving one source for the name, and to correct the warning text to what that function produces. A test that writes a negative-delta .dat and reads it back through generated_slices fails before the change.

Found while working out figures for #294 (#297); out of scope there.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions