@@ -9,18 +9,18 @@ DEFORM = false
99
1010project_dir = dirname (dirname (pathof (VortexStepMethod))) # Go up one level from src to project root#
1111literature_paths = [
12- joinpath (project_dir, " data" , " TUDELFT_V3_KITE" , " literature_results" ," CFD_RANS_Rey_5e5_Poland2025_alpha_sweep_beta_0_NoStruts.csv" ),
13- joinpath (project_dir, " data" , " TUDELFT_V3_KITE" , " literature_results" ," CFD_RANS_Rey_10e5_Poland2025_alpha_sweep_beta_0.csv" ),
14- joinpath (project_dir, " data" , " TUDELFT_V3_KITE" , " literature_results" ," python_alpha_sweep.csv" ),
15- joinpath (project_dir, " data" , " TUDELFT_V3_KITE" , " literature_results" ," windtunnel_alpha_sweep_beta_00_0_Poland_2025_Rey_5e5.csv" ),
16- ]
17- labels= [
18- " Julia VSM 2D CFD PCHIP NF " ,
19- " CFD RANS Re=5e5" ,
20- " CFD RANS Re=10e5 (With Struts) " ,
21- " Python VSM 2D CFD PCHIP NF Re=5e5" ,
22- " Wind Tunnel Re=5e5 (With Struts) "
23- ]
12+ joinpath (project_dir, " data" , " TUDELFT_V3_KITE" , " literature_results" , " CFD_RANS_Rey_5e5_Poland2025_alpha_sweep_beta_0_NoStruts.csv" ),
13+ joinpath (project_dir, " data" , " TUDELFT_V3_KITE" , " literature_results" , " CFD_RANS_Rey_10e5_Poland2025_alpha_sweep_beta_0.csv" ),
14+ joinpath (project_dir, " data" , " TUDELFT_V3_KITE" , " literature_results" , " python_alpha_sweep.csv" ),
15+ joinpath (project_dir, " data" , " TUDELFT_V3_KITE" , " literature_results" , " windtunnel_alpha_sweep_beta_00_0_Poland_2025_Rey_5e5.csv" ),
16+ ]
17+ labels = [
18+ " VSM Julia Re=5e5 " ,
19+ " CFD Re=5e5" ,
20+ " CFD Re=10e5" , # with struts
21+ " VSM Python Re=5e5" ,
22+ " WindTunnel Re=5e5" # with struts
23+ ]
2424beta_literature_paths = [
2525 joinpath (project_dir, " data" , " TUDELFT_V3_KITE" , " literature_results" , " windtunnel_beta_sweep_alpha_07_4_Poland_2025_Rey_5e5.csv" ),
2626 # joinpath(project_dir, "data", "TUDELFT_V3_KITE", "literature_results", "windtunnel_beta_sweep_alpha_12_5_Poland_2025_Rey_5e5.csv"),
@@ -99,7 +99,7 @@ fig1 = plot_combined_analysis(
9999 solver,
100100 body_aero,
101101 results;
102- solver_label = " VSM " ,
102+ labels = labels ,
103103 literature_path_list= literature_paths,
104104 angle_range= range (- 5 , 25 , length= 31 ),
105105 angle_type= " angle_of_attack" ,
@@ -224,7 +224,7 @@ function plot_polars(
224224 v_a= v_a,
225225 use_solve= use_solve
226226 )
227- @info " polar sample (solver)" label= lbl first_cl= pd. cl[1 ] first_cd= pd. cd[1 ] first_cs= pd. cs[1 ] first_cmy= pd. cmy[1 ]
227+ @info " polar sample (solver)" label = lbl first_cl = pd. cl[1 ] first_cd = pd. cd[1 ] first_cs = pd. cs[1 ] first_cmy = pd. cmy[1 ]
228228 push! (polar_data_list, pd)
229229 re_tag = round (Int, first (pd. rey) * 1e-5 )
230230 push! (labels_full, " $(lbl) Re=$(re_tag) e5" )
@@ -245,12 +245,12 @@ function plot_polars(
245245 isnothing (angle_idx) && throw (ArgumentError (
246246 " Could not find angle column for angle_type='$angle_type ' in literature file: $path "
247247 ))
248- cl_idx = findfirst (x -> occursin (" cl" , x), header)
249- cd_idx = findfirst (x -> occursin (" cd" , x), header)
250- cs_idx = findfirst (x -> occursin (" cs" , x), header)
251- cmx_idx = findfirst (x -> occursin (" cmx" , x), header)
252- cmy_idx = findfirst (x -> occursin (" cmy" , x), header)
253- cmz_idx = findfirst (x -> occursin (" cmz" , x), header)
248+ cl_idx = findfirst (x -> occursin (" cl" , x), header)
249+ cd_idx = findfirst (x -> occursin (" cd" , x), header)
250+ cs_idx = findfirst (x -> occursin (" cs" , x), header)
251+ cmx_idx = findfirst (x -> occursin (" cmx" , x), header)
252+ cmy_idx = findfirst (x -> occursin (" cmy" , x), header)
253+ cmz_idx = findfirst (x -> occursin (" cmz" , x), header)
254254
255255 parse_col (col) = begin
256256 vals = Float64[]
@@ -267,12 +267,12 @@ function plot_polars(
267267 end
268268
269269 angle_col = parse_col (data[2 : end , angle_idx])
270- cl_col = parse_col (data[2 : end , cl_idx])
271- cd_col = parse_col (data[2 : end , cd_idx])
272- cs_col = cs_idx === nothing ? zeros (size (data, 1 )- 1 ) : parse_col (data[2 : end , cs_idx])
273- cmx_col = cmx_idx === nothing ? fill (NaN , size (data, 1 )- 1 ) : parse_col (data[2 : end , cmx_idx])
274- cmy_col = cmy_idx === nothing ? fill (NaN , size (data, 1 )- 1 ) : parse_col (data[2 : end , cmy_idx])
275- cmz_col = cmz_idx === nothing ? fill (NaN , size (data, 1 )- 1 ) : parse_col (data[2 : end , cmz_idx])
270+ cl_col = parse_col (data[2 : end , cl_idx])
271+ cd_col = parse_col (data[2 : end , cd_idx])
272+ cs_col = cs_idx === nothing ? zeros (size (data, 1 ) - 1 ) : parse_col (data[2 : end , cs_idx])
273+ cmx_col = cmx_idx === nothing ? fill (NaN , size (data, 1 ) - 1 ) : parse_col (data[2 : end , cmx_idx])
274+ cmy_col = cmy_idx === nothing ? fill (NaN , size (data, 1 ) - 1 ) : parse_col (data[2 : end , cmy_idx])
275+ cmz_col = cmz_idx === nothing ? fill (NaN , size (data, 1 ) - 1 ) : parse_col (data[2 : end , cmz_idx])
276276
277277 push! (polar_data_list, (angle= angle_col, cl= cl_col, cd= cd_col, cs= cs_col, cmx= cmx_col, cmy= cmy_col, cmz= cmz_col, rey= fill (NaN , length (angle_col))))
278278 push! (labels_full, lbl)
@@ -281,17 +281,17 @@ function plot_polars(
281281 fig = Figure (size= fig_size)
282282 Label (fig[0 , :], title; fontsize= 20 , font= :bold )
283283
284- ax_cl = Axis (fig[1 , 1 ], title= " CL vs $angle_type [deg]" , xlabel= " $angle_type [deg]" , ylabel= " CL [-]" )
285- ax_cd = Axis (fig[1 , 2 ], title= " CD vs $angle_type [deg]" , xlabel= " $angle_type [deg]" , ylabel= " CD [-]" )
286- ax_cs = Axis (fig[1 , 3 ], title= " CS vs $angle_type [deg]" , xlabel= " $angle_type [deg]" , ylabel= " CS [-]" )
284+ ax_cl = Axis (fig[1 , 1 ], title= " CL vs $angle_type [deg]" , xlabel= " $angle_type [deg]" , ylabel= " CL [-]" )
285+ ax_cd = Axis (fig[1 , 2 ], title= " CD vs $angle_type [deg]" , xlabel= " $angle_type [deg]" , ylabel= " CD [-]" )
286+ ax_cs = Axis (fig[1 , 3 ], title= " CS vs $angle_type [deg]" , xlabel= " $angle_type [deg]" , ylabel= " CS [-]" )
287287 ax_cmx = Axis (fig[2 , 1 ], title= " CMx vs $angle_type [deg]" , xlabel= " $angle_type [deg]" , ylabel= " CMx [-]" )
288288 ax_cmy = Axis (fig[2 , 2 ], title= " CMy vs $angle_type [deg]" , xlabel= " $angle_type [deg]" , ylabel= " CMy [-]" )
289289 ax_cmz = Axis (fig[2 , 3 ], title= " CMz vs $angle_type [deg]" , xlabel= " $angle_type [deg]" , ylabel= " CMz [-]" )
290290
291291 # Force truly equal columns independent of axis decoration sizes.
292- colsize! (fig. layout, 1 , Relative (1 / 3 ))
293- colsize! (fig. layout, 2 , Relative (1 / 3 ))
294- colsize! (fig. layout, 3 , Relative (1 / 3 ))
292+ colsize! (fig. layout, 1 , Relative (1 / 3 ))
293+ colsize! (fig. layout, 2 , Relative (1 / 3 ))
294+ colsize! (fig. layout, 3 , Relative (1 / 3 ))
295295
296296 # Keep the inner plotting rectangles aligned as well.
297297 for ax in (ax_cl, ax_cd, ax_cs, ax_cmx, ax_cmy, ax_cmz)
0 commit comments