@@ -30,25 +30,19 @@ Represents a wing composed of multiple sections with aerodynamic properties.
3030
3131# Fields
3232- `n_panels::Int64`: Number of panels in aerodynamic mesh
33- - `spanwise_panel_distribution::Symbol`: Panel distribution type
33+ - `spanwise_panel_distribution`::PanelDistribution: [PanelDistribution](@ref)
3434- `spanwise_direction::Vector{Float64}`: Wing span direction vector
3535- `sections::Vector{Section}`: List of wing sections
3636
37- # Distribution types
38- - :linear: Linear distribution
39- - :cosine: Cosine distribution
40- - :`cosine_van_Garrel`: van Garrel cosine distribution
41- - :split_provided: Split provided sections
42- - :unchanged: Keep original sections
4337"""
4438mutable struct Wing <: AbstractWing
4539 n_panels:: Int64
46- spanwise_panel_distribution:: Symbol
40+ spanwise_panel_distribution:: PanelDistribution
4741 spanwise_direction:: PosVector
4842 sections:: Vector{Section}
4943
5044 function Wing (n_panels:: Int ;
51- spanwise_panel_distribution:: Symbol = :linear ,
45+ spanwise_panel_distribution:: PanelDistribution = LINEAR ,
5246 spanwise_direction:: PosVector = MVec3 ([0.0 , 1.0 , 0.0 ]))
5347 new (n_panels,
5448 spanwise_panel_distribution,
@@ -132,7 +126,7 @@ function refine_aerodynamic_mesh(wing::AbstractWing)
132126 end
133127
134128 # Handle special cases
135- if wing. spanwise_panel_distribution === :unchanged || length (wing. sections) == n_sections
129+ if wing. spanwise_panel_distribution == UNCHANGED || length (wing. sections) == n_sections
136130 return wing. sections
137131 end
138132
@@ -145,9 +139,9 @@ function refine_aerodynamic_mesh(wing::AbstractWing)
145139 end
146140
147141 # Handle different distribution types
148- if wing. spanwise_panel_distribution === :split_provided
142+ if wing. spanwise_panel_distribution == SPLIT_PROVIDED
149143 return refine_mesh_by_splitting_provided_sections (wing)
150- elseif wing. spanwise_panel_distribution in [ :linear , :cosine , :cosine_van_Garrel ]
144+ elseif wing. spanwise_panel_distribution in (LINEAR, COSINE, COSINE_VAN_GARREL)
151145 return refine_mesh_for_linear_cosine_distribution (
152146 wing. spanwise_panel_distribution,
153147 n_sections,
239233
240234"""
241235 refine_mesh_for_linear_cosine_distribution(
242- spanwise_panel_distribution::Symbol ,
236+ spanwise_panel_distribution::PanelDistribution ,
243237 n_sections::Int,
244238 LE::Matrix{Float64},
245239 TE::Matrix{Float64},
248242Refine wing mesh using linear or cosine spacing.
249243
250244# Arguments
251- - `spanwise_panel_distribution`: Distribution type (:linear, :cosine, or :cosine_van_Garrel )
245+ - `spanwise_panel_distribution`: [PanelDistribution](@ref )
252246- `n_sections`: Number of sections to generate
253247- `LE`: Matrix of leading edge points
254248- `TE`: Matrix of trailing edge points
@@ -258,7 +252,7 @@ Returns:
258252 Vector{Section}: List of refined sections
259253"""
260254function refine_mesh_for_linear_cosine_distribution (
261- spanwise_panel_distribution:: Symbol ,
255+ spanwise_panel_distribution:: PanelDistribution ,
262256 n_sections:: Int ,
263257 LE,
264258 TE,
@@ -273,9 +267,9 @@ function refine_mesh_for_linear_cosine_distribution(
273267 qc_cum_length = vcat (0 , cumsum (qc_lengths))
274268
275269 # 2. Define target lengths
276- target_lengths = if spanwise_panel_distribution === :linear
270+ target_lengths = if spanwise_panel_distribution == LINEAR
277271 range (0 , qc_total_length, n_sections)
278- elseif spanwise_panel_distribution in [ :cosine , :cosine_van_Garrel ]
272+ elseif spanwise_panel_distribution in (COSINE, COSINE_VAN_GARREL)
279273 theta = range (0 , π, n_sections)
280274 qc_total_length .* (1 .- cos .(theta)) ./ 2
281275 else
@@ -464,7 +458,7 @@ function refine_mesh_by_splitting_provided_sections(wing::AbstractWing)
464458
465459 # Generate sections for this pair
466460 new_splitted_sections = refine_mesh_for_linear_cosine_distribution (
467- :linear ,
461+ LINEAR ,
468462 num_new_sections + 2 , # +2 for endpoints
469463 LE_pair,
470464 TE_pair,
0 commit comments