File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 1+ Model :
2+ VSM : Vortex Step Method
3+ LLT : Lifting Line Theory
14wings :
25 - name : main_wing
36 n_panels : 40
811 - name : tail
912 n_panels : 20
1013solver_settings :
11- aerodynamic_model_type : " VSM"
14+ aerodynamic_model_type : VSM
1215 max_iterations : 1000
Original file line number Diff line number Diff line change 11filename = " vsm_settings.yaml"
2+ data = YAML. load_file (joinpath (" data" , filename))
23
34@with_kw mutable struct WingSettings
45 name:: String = " main_wing"
@@ -10,7 +11,7 @@ filename = "vsm_settings.yaml"
1011end
1112
1213@with_kw mutable struct SolverSettings
13- aerodynamic_model_type:: String = " VSM"
14+ aerodynamic_model_type:: Model = VSM
1415 max_iterations:: Int64 = 1000
1516end
1617
2122
2223const VSM_SETTINGS = VSMSettings ()
2324
24- function vs ()
25+ function vs (filename = filename )
2526 res = VSM_SETTINGS
27+ data = YAML. load_file (joinpath (" data" , filename))
2628 res. solver_settings. max_iterations = data[" solver_settings" ][" max_iterations" ]
29+ res. solver_settings. aerodynamic_model_type = eval (Symbol (data[" solver_settings" ][" aerodynamic_model_type" ]))
2730 res
2831end
2932
You can’t perform that action at this time.
0 commit comments