File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,10 @@ wings:
1717 remove_nan : true
1818 - name : tail
1919 n_panels : 20
20+ n_groups : 20
21+ spanwise_panel_distribution : COSINE
22+ spanwise_direction : [0.0, 1.1, 0.0]
23+ remove_nan : false
2024solver_settings :
2125 aerodynamic_model_type : VSM
2226 max_iterations : 1000
Original file line number Diff line number Diff line change 1616end
1717
1818@Base . kwdef mutable struct VSMSettings
19- wings:: Vector{WingSettings} = [WingSettings ()]
19+ wings:: Vector{WingSettings} = [WingSettings (), WingSettings () ]
2020 solver_settings:: SolverSettings = SolverSettings ()
2121end
2222
@@ -27,6 +27,14 @@ function vs(filename=filename)
2727 data = YAML. load_file (joinpath (" data" , filename))
2828 res. solver_settings. max_iterations = data[" solver_settings" ][" max_iterations" ]
2929 res. solver_settings. aerodynamic_model_type = eval (Symbol (data[" solver_settings" ][" aerodynamic_model_type" ]))
30+ for (i, wing) in pairs (data[" wings" ])
31+ println (i)
32+ res. wings[i]. n_panels = wing[" n_panels" ]
33+ res. wings[i]. n_groups = wing[" n_groups" ]
34+ res. wings[i]. spanwise_panel_distribution = eval (Symbol (wing[" spanwise_panel_distribution" ]))
35+ res. wings[i]. spanwise_direction = MVec3 (wing[" spanwise_direction" ])
36+ res. wings[i]. remove_nan = wing[" remove_nan" ]
37+ end
3038 res
3139end
3240
You can’t perform that action at this time.
0 commit comments