@@ -177,7 +177,7 @@ function create_geometry_plot(body_aero::BodyAerodynamics, title, view_elevation
177177 va = isa (body_aero. va, Tuple) ? body_aero. va[1 ] : body_aero. va
178178
179179 # Extract geometric data
180- # corner_points = [panel.corner_points for panel in panels]
180+ corner_points = [panel. corner_points for panel in panels]
181181 control_points = [panel. control_point for panel in panels]
182182 aero_centers = [panel. aero_center for panel in panels]
183183
@@ -233,7 +233,7 @@ function create_geometry_plot(body_aero::BodyAerodynamics, title, view_elevation
233233 plot_line_segment! (ax, [va_vector_begin, va_vector_end], :lightblue , " va" )
234234
235235 # Add legends for the first occurrence of each label
236- # handles, labels = ax.get_legend_handles_labels()
236+ handles, labels = ax. get_legend_handles_labels ()
237237 # by_label = Dict(zip(labels, handles))
238238 # ax.legend(values(by_label), keys(by_label), bbox_to_anchor=(0, 0, 1.1, 1))
239239
@@ -553,7 +553,7 @@ function generate_polar_data(
553553 )
554554
555555 # Solve and store results
556- results = solve (solver, body_aero, gamma )
556+ results = solve (solver, body_aero, gamma_distribution[i, :] )
557557
558558 cl[i] = results[" cl" ]
559559 cd[i] = results[" cd" ]
@@ -564,8 +564,8 @@ function generate_polar_data(
564564 cs_distribution[i, :] = results[" cs_distribution" ]
565565 reynolds_number[i] = results[" Rey" ]
566566
567- # Store gamma for next iteration initialization
568- gamma = results[ " gamma_distribution" ]
567+ # Store gamma for next iteration
568+ gamma = gamma_distribution[i, : ]
569569 end
570570
571571 polar_data = [
@@ -657,14 +657,13 @@ function VortexStepMethod.plot_polars(
657657 # Load literature data if provided
658658 if ! isempty (literature_path_list)
659659 for path in literature_path_list
660- raw_data = readdlm (path, ' ,' )
661- data = isa (raw_data, Tuple) ? raw_data[1 ] : raw_data
660+ data = readdlm (path, ' ,' )
662661 header = lowercase .(string .(data[1 , :]))
663662 # Find column indices for alpha, CL, CD, CS (case-insensitive, allow common variants)
664- alpha_idx = findfirst (x -> occursin (" alpha" , lowercase ( string (x)) ), header)
665- cl_idx = findfirst (x -> occursin (" cl" , lowercase ( string (x)) ), header)
666- cd_idx = findfirst (x -> occursin (" cd" , lowercase ( string (x)) ), header)
667- cs_idx = findfirst (x -> occursin (" cs" , lowercase ( string (x)) ), header)
663+ alpha_idx = findfirst (x -> occursin (" alpha" , x ), header)
664+ cl_idx = findfirst (x -> occursin (" cl" , x ), header)
665+ cd_idx = findfirst (x -> occursin (" cd" , x ), header)
666+ cs_idx = findfirst (x -> occursin (" cs" , x ), header)
668667 # Fallback: if CS not found, fill with zeros
669668 cs_col = cs_idx === nothing ? zeros (size (data, 1 )- 1 ) : data[2 : end , cs_idx]
670669 # Push as [alpha, CL, CD, CS]
0 commit comments