Skip to content

Commit f10f9f6

Browse files
committed
Some progress
1 parent 61392f4 commit f10f9f6

File tree

3 files changed

+38
-3
lines changed

3 files changed

+38
-3
lines changed

data/vsm_settings.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
wings:
22
- main_wing:
33
n_panels: 40
4-
spanwise_panel_distribution: "uniform"
4+
spanwise_panel_distribution: "LINEAR"
5+
spanwise_direction: [0.0, 1.0, 0.0]
56
- tail:
67
n_panels: 20
78
solver_settings:
8-
aerodynamic_model_type:
9-
max_iterations:
9+
aerodynamic_model_type: "VSM"
10+
max_iterations: 1000

mwes/mwe_04.jl

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,25 @@
11
# read the vsm_settings.yaml file
22

33
import YAML
4+
using Parameters
45

56
filename = "vsm_settings.yaml"
67
data = YAML.load_file(joinpath("data", filename))
78

9+
@with_kw mutable struct WingSettings
10+
name::String = "main_wing"
11+
n_groups::Int64 = 40
12+
n_panels::Int64 = 40
13+
spanwise_panel_distribution::String = "LINEAR"
14+
end
15+
16+
@with_kw mutable struct SolverSettings
17+
aerodynamic_model_type::String = "VSM"
18+
max_iterations::Int64 = 1000
19+
end
20+
21+
@with_kw mutable struct VSMSettings
22+
wings::Vector{WingSettings} = [WingSettings()]
23+
solver_settings::SolverSettings = SolverSettings()
24+
end
25+

src/settings.jl

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
using Parameters
2+
3+
@with_kw mutable struct WingSettings
4+
n_panels::Int
5+
spanwise_panel_distribution::String = "uniform"
6+
end
7+
8+
@with_kw mutable struct VSMSettings
9+
aerodynamic_model_type::String = "VSM"
10+
max_iterations::Int = 1000
11+
end
12+
13+
@with_kw mutable struct Configuration
14+
wings::Vector{Dict{String, WingSettings}}
15+
solver_settings::VSMSettings
16+
end

0 commit comments

Comments
 (0)