@@ -5,11 +5,12 @@ using LinearAlgebra
55using VortexStepMethod
66using GLMakie
77
8- PLOT = true
8+ const PLOT = true
99USE_TEX = false
1010
1111# Data paths (all within this repo)
12- project_dir = dirname (dirname (pathof (VortexStepMethod)))
12+ vsm_src_path = something (pathof (VortexStepMethod), @__FILE__ )
13+ project_dir = normpath (joinpath (dirname (vsm_src_path), " .." ))
1314v3_dir = joinpath (project_dir, " data" , " TUDELFT_V3_KITE" )
1415polar_dir = joinpath (v3_dir, " polars_CFD_NF_combined" )
1516
@@ -127,8 +128,10 @@ println("\nFlat wing: CL=$(round(results_flat["cl"]; digits=4)), " *
127128println (" Billowed: CL=$(round (results_bill[" cl" ]; digits= 4 )) , " *
128129 " CD=$(round (results_bill[" cd" ]; digits= 4 )) " )
129130
130- if PLOT
131- fig1 = plot_combined_analysis (
131+ function show_plot (solver_flat, solver_bill, body_aero_flat, body_aero_bill,
132+ results_flat, results_bill, labels, literature_paths,
133+ angle_of_attack_deg, sideslip_deg, wind_speed)
134+ scr = display (plot_combined_analysis (
132135 [solver_flat, solver_bill],
133136 [body_aero_flat, body_aero_bill],
134137 [results_flat, results_bill];
@@ -144,9 +147,27 @@ if PLOT
144147 is_show= false ,
145148 use_tex= USE_TEX,
146149 angle_of_attack_for_spanwise_distribution= 10.0 ,
150+ ))
151+ if isinteractive ()
152+ wait (scr)
153+ end
154+ return nothing
155+ end
156+
157+ if PLOT
158+ show_plot (
159+ solver_flat,
160+ solver_bill,
161+ body_aero_flat,
162+ body_aero_bill,
163+ results_flat,
164+ results_bill,
165+ labels,
166+ literature_paths,
167+ angle_of_attack_deg,
168+ sideslip_deg,
169+ wind_speed,
147170 )
148- scr1 = display (fig1)
149- isinteractive () && wait (scr1)
150171end
151172
152173nothing
0 commit comments