@@ -30,15 +30,12 @@ literature_paths = [
3030 " windtunnel_alpha_sweep_beta_00_0_Poland_2025_Rey_5e5.csv" ),
3131]
3232
33- # Load solver settings (coarse: 54 panels, matches 10-section geometry)
34- settings_data = VortexStepMethod. YAML. load_file (
35- joinpath (v3_dir, " vsm_settings_coarse.yaml" ))
36- condition_cfg = settings_data[" condition" ]
37- solver_cfg = settings_data[" solver_settings" ]
38- wing_cfg = settings_data[" wings" ][1 ]
39- n_panels = wing_cfg[" n_panels" ]
33+ # Coarse settings: 54 panels on the 10-section geometry
34+ settings = VSMSettings (joinpath (v3_dir, " vsm_settings_coarse.yaml" ); data_prefix= false )
35+ settings. wings[1 ]. geometry_file = joinpath (project_dir, settings. wings[1 ]. geometry_file)
36+ n_panels = settings. wings[1 ]. n_panels
4037
41- BILLOWING_PCT = get (wing_cfg, " billowing_percentage " , 0.0 )
38+ BILLOWING_PCT = settings . wings[ 1 ] . billowing_percentage
4239
4340labels = [
4441 " VSM flat" ,
@@ -49,9 +46,7 @@ labels = [
4946 " WindTunnel Re=5e5" ,
5047]
5148
52- # Load coarse geometry (10 structural rib sections)
53- geom_data = VortexStepMethod. YAML. load_file (
54- joinpath (v3_dir, " aero_geometry_coarse_discretisation.yaml" ))
49+ geom_data = VortexStepMethod. YAML. load_file (settings. wings[1 ]. geometry_file)
5550section_headers = geom_data[" wing_sections" ][" headers" ]
5651section_rows = geom_data[" wing_sections" ][" data" ]
5752
@@ -84,43 +79,13 @@ body_aero_bill = BodyAerodynamics([wing_bill])
8479VortexStepMethod. reinit! (body_aero_bill)
8580
8681# --- Build solvers ---
87- function make_solver (body_aero)
88- Solver (body_aero;
89- solver_type= (solver_cfg[" solver_type" ] == " NONLIN" ?
90- NONLIN : LOOP),
91- aerodynamic_model_type= getproperty (
92- VortexStepMethod,
93- Symbol (solver_cfg[" aerodynamic_model_type" ])),
94- density= solver_cfg[" density" ],
95- max_iterations= solver_cfg[" max_iterations" ],
96- rtol= solver_cfg[" rtol" ],
97- tol_reference_error= solver_cfg[" tol_reference_error" ],
98- relaxation_factor= solver_cfg[" relaxation_factor" ],
99- is_with_artificial_damping= solver_cfg[" artificial_damping" ],
100- artificial_damping= (
101- k2= solver_cfg[" k2" ], k4= solver_cfg[" k4" ]),
102- type_initial_gamma_distribution= getproperty (
103- VortexStepMethod,
104- Symbol (solver_cfg[" type_initial_gamma_distribution" ])),
105- use_gamma_prev= get (solver_cfg, " use_gamma_prev" ,
106- get (solver_cfg, " use_gamme_prev" , true )),
107- core_radius_fraction= solver_cfg[" core_radius_fraction" ],
108- mu= solver_cfg[" mu" ],
109- is_only_f_and_gamma_output= get (
110- solver_cfg, " calc_only_f_and_gamma" , false ),
111- correct_aoa= get (solver_cfg, " correct_aoa" , false ),
112- reference_point= get (solver_cfg, " reference_point" ,
113- [0.422646 , 0.0 , 9.3667 ]),
114- )
115- end
116-
117- solver_flat = make_solver (body_aero_flat)
118- solver_bill = make_solver (body_aero_bill)
82+ solver_flat = Solver (settings; reference_point= [0.422646 , 0.0 , 9.3667 ])
83+ solver_bill = Solver (settings; reference_point= [0.422646 , 0.0 , 9.3667 ])
11984
12085# --- Set flight conditions ---
121- wind_speed = condition_cfg[ " wind_speed" ]
86+ wind_speed = settings . condition . wind_speed
12287angle_of_attack_deg = 10.0
123- sideslip_deg = condition_cfg[ " beta" ]
88+ sideslip_deg = settings . condition . beta
12489
12590α0 = deg2rad (angle_of_attack_deg)
12691β0 = deg2rad (sideslip_deg)
0 commit comments