|
1 | 1 | """ |
2 | | - @with_kw mutable struct Section |
| 2 | + mutable struct Section{T} |
3 | 3 |
|
4 | 4 | Represents a wing section with leading edge, trailing edge, and aerodynamic properties. |
5 | 5 |
|
6 | 6 | # Fields |
7 | | -- `LE_point::MVec3` = zeros(MVec3): Leading edge point coordinates |
8 | | -- `TE_point::MVec3` = zeros(MVec3): Trailing edge point coordinates |
9 | | -- `aero_model`::AeroModel = INVISCID: [AeroModel](@ref) |
10 | | -- `aero_data`::AeroData = nothing: See: [AeroData](@ref) |
| 7 | +- `LE_point::MVector{3, T}`: Leading edge point coordinates |
| 8 | +- `TE_point::MVector{3, T}`: Trailing edge point coordinates |
| 9 | +- `aero_model::AeroModel`: [AeroModel](@ref) |
| 10 | +- `aero_data::AeroData`: See: [AeroData](@ref) |
11 | 11 | """ |
12 | | -@with_kw mutable struct Section{T} |
13 | | - LE_point::MVector{3, T} = zeros(MVector{3, T}) |
14 | | - TE_point::MVector{3, T} = zeros(MVector{3, T}) |
15 | | - aero_model::AeroModel = INVISCID |
16 | | - aero_data::AeroData = nothing |
| 12 | +mutable struct Section{T} |
| 13 | + LE_point::MVector{3, T} |
| 14 | + TE_point::MVector{3, T} |
| 15 | + aero_model::AeroModel |
| 16 | + aero_data::AeroData |
17 | 17 | end |
18 | 18 |
|
| 19 | +Section{T}(; LE_point=zeros(MVector{3, T}), TE_point=zeros(MVector{3, T}), |
| 20 | + aero_model=INVISCID, aero_data=nothing) where {T} = |
| 21 | + Section{T}(LE_point, TE_point, aero_model, aero_data) |
| 22 | + |
| 23 | +Section() = Section{Float64}() |
| 24 | + |
19 | 25 | """ |
20 | | - Section(LE_point::PosVector, TE_point::PosVector, aero_model) |
| 26 | + Section(LE_point, TE_point, aero_model) |
21 | 27 |
|
22 | 28 | Create a new wing section with the specified leading edge point, trailing edge point, |
23 | 29 | and aerodynamic model. |
|
0 commit comments