@@ -8,13 +8,13 @@ Main structure for calculating aerodynamic properties of bodies.
88- wings::Union{Vector{Wing}, Vector{RamAirWing}}: A vector of wings; a body can have multiple wings
99- `_va`::MVec3 = zeros(MVec3): A vector of the apparent wind speed, see: [MVec3](@ref)
1010- `omega`::MVec3 = zeros(MVec3): A vector of the turn rates around the kite body axes
11- - `gamma_distribution`::Vector{Float64} =zeros(Float64, P): A vector of the circulation
11+ - `gamma_distribution`=zeros(Float64, P): A vector of the circulation
1212 of the velocity field; Length: Number of segments. [m²/s]
13- - `alpha_uncorrected`::Vector{Float64} =zeros(Float64, P): angles of attack per panel
14- - `alpha_corrected`::Vector{Float64} =zeros(Float64, P): corrected angles of attack per panel
15- - `stall_angle_list`::Vector{Float64} =zeros(Float64, P): stall angle per panel
16- - `alpha_array`::Vector{Float64} = zeros(Float64, P)
17- - `v_a_array`::Vector{Float64} = zeros(Float64, P)
13+ - `alpha_uncorrected`=zeros(Float64, P): angles of attack per panel
14+ - `alpha_corrected`=zeros(Float64, P): corrected angles of attack per panel
15+ - `stall_angle_list`=zeros(Float64, P): stall angle per panel
16+ - `alpha_array` = zeros(Float64, P)
17+ - `v_a_array` = zeros(Float64, P)
1818- `work_vectors`::NTuple{10, MVec3} = ntuple(_ -> zeros(MVec3), 10)
1919- AIC::Array{Float64, 3} = zeros(3, P, P)
2020- `projected_area`::Float64 = 1.0: The area projected onto the xy-plane of the kite body reference frame [m²]
155155
156156"""
157157 calculate_AIC_matrices!(body_aero::BodyAerodynamics, model::Model,
158- core_radius_fraction::Float64 ,
159- va_norm_array::Vector{Float64} ,
160- va_unit_array::Matrix{Float64} )
158+ core_radius_fraction,
159+ va_norm_array,
160+ va_unit_array)
161161
162162Calculate Aerodynamic Influence Coefficient matrices.
163163
@@ -166,9 +166,9 @@ See also: [BodyAerodynamics](@ref), [Model](@ref)
166166Returns: nothing
167167"""
168168@inline function calculate_AIC_matrices! (body_aero:: BodyAerodynamics , model:: Model ,
169- core_radius_fraction:: Float64 ,
170- va_norm_array:: Vector{Float64} ,
171- va_unit_array:: Matrix{Float64} )
169+ core_radius_fraction,
170+ va_norm_array,
171+ va_unit_array)
172172 # Determine evaluation point based on model
173173 evaluation_point = model == VSM ? :control_point : :aero_center
174174 evaluation_point_on_bound = model == LLT
@@ -208,13 +208,13 @@ Returns: nothing
208208end
209209
210210"""
211- calculate_circulation_distribution_elliptical_wing(body_aero::BodyAerodynamics, gamma_0::Float64 =1.0)
211+ calculate_circulation_distribution_elliptical_wing(body_aero::BodyAerodynamics, gamma_0=1.0)
212212
213213Calculate circulation distribution for an elliptical wing.
214214
215215Returns: nothing
216216"""
217- function calculate_circulation_distribution_elliptical_wing (gamma_i, body_aero:: BodyAerodynamics , gamma_0:: Float64 = 1.0 )
217+ function calculate_circulation_distribution_elliptical_wing (gamma_i, body_aero:: BodyAerodynamics , gamma_0= 1.0 )
218218 length (body_aero. wings) == 1 || throw (ArgumentError (" Multiple wings not yet implemented" ))
219219
220220 wing_span = body_aero. wings[1 ]. span
@@ -235,23 +235,23 @@ end
235235
236236"""
237237 calculate_stall_angle_list(panels::Vector{Panel};
238- begin_aoa::Float64 =9.0,
239- end_aoa::Float64 =22.0,
240- step_aoa::Float64 =1.0,
241- stall_angle_if_none_detected::Float64 =50.0,
242- cl_initial::Float64 =-10.0)
238+ begin_aoa=9.0,
239+ end_aoa=22.0,
240+ step_aoa=1.0,
241+ stall_angle_if_none_detected=50.0,
242+ cl_initial=-10.0)
243243
244244Calculate stall angles for each panel.
245245
246246Returns:
247247 Vector{Float64}: Stall angles in radians
248248"""
249249function calculate_stall_angle_list (panels:: Vector{Panel} ;
250- begin_aoa:: Float64 = 9.0 ,
251- end_aoa:: Float64 = 22.0 ,
252- step_aoa:: Float64 = 1.0 ,
253- stall_angle_if_none_detected:: Float64 = 50.0 ,
254- cl_initial:: Float64 = - 10.0 )
250+ begin_aoa= 9.0 ,
251+ end_aoa= 22.0 ,
252+ step_aoa= 1.0 ,
253+ stall_angle_if_none_detected= 50.0 ,
254+ cl_initial= - 10.0 )
255255
256256 aoa_range = deg2rad .(range (begin_aoa, end_aoa, step= step_aoa))
257257 stall_angles = Float64[]
@@ -282,13 +282,13 @@ end
282282const cache_body = [LazyBufferCache () for _ in 1 : 5 ]
283283
284284"""
285- update_effective_angle_of_attack_if_VSM(body_aero::BodyAerodynamics, gamma::Vector{Float64} ,
286- core_radius_fraction::Float64 ,
287- z_airf_array::Matrix{Float64} ,
288- x_airf_array::Matrix{Float64} ,
289- va_array::Matrix{Float64} ,
290- va_norm_array::Vector{Float64} ,
291- va_unit_array::Matrix{Float64} )
285+ update_effective_angle_of_attack_if_VSM(body_aero::BodyAerodynamics, gamma,
286+ core_radius_fraction,
287+ z_airf_array,
288+ x_airf_array,
289+ va_array,
290+ va_norm_array,
291+ va_unit_array)
292292
293293Update angle of attack at aerodynamic center for VSM method.
294294
@@ -297,13 +297,13 @@ Returns:
297297"""
298298function update_effective_angle_of_attack! (alpha_corrected,
299299 body_aero:: BodyAerodynamics ,
300- gamma:: Vector{Float64} ,
301- core_radius_fraction:: Float64 ,
302- z_airf_array:: Matrix{Float64} ,
303- x_airf_array:: Matrix{Float64} ,
304- va_array:: Matrix{Float64} ,
305- va_norm_array:: Vector{Float64} ,
306- va_unit_array:: Matrix{Float64} )
300+ gamma,
301+ core_radius_fraction,
302+ z_airf_array,
303+ x_airf_array,
304+ va_array,
305+ va_norm_array,
306+ va_unit_array)
307307
308308 # Calculate AIC matrices (keep existing optimized view)
309309 calculate_AIC_matrices! (body_aero, LLT, core_radius_fraction, va_norm_array, va_unit_array)
@@ -355,14 +355,14 @@ function update_effective_angle_of_attack!(alpha_corrected,
355355end
356356
357357"""
358- calculate_results(body_aero::BodyAerodynamics, gamma_new::Vector{Float64} ,
359- density::Float64 , aerodynamic_model_type::Model,
360- core_radius_fraction::Float64 , mu::Float64 ,
361- alpha_array::Vector{Float64} , v_a_array::Vector{Float64} ,
362- chord_array::Vector{Float64} , x_airf_array::Matrix{Float64} ,
363- y_airf_array::Matrix{Float64} , z_airf_array::Matrix{Float64} ,
364- va_array::Matrix{Float64} , va_norm_array::Vector{Float64} ,
365- va_unit_array::Matrix{Float64} , panels::Vector{Panel},
358+ calculate_results(body_aero::BodyAerodynamics, gamma_new,
359+ density, aerodynamic_model_type::Model,
360+ core_radius_fraction, mu,
361+ alpha_array, v_a_array,
362+ chord_array, x_airf_array,
363+ y_airf_array, z_airf_array,
364+ va_array, va_norm_array,
365+ va_unit_array, panels::Vector{Panel},
366366 is_only_f_and_gamma_output::Bool)
367367
368368Calculate final aerodynamic results. Reference point is in the kite body (KB) frame.
@@ -372,21 +372,21 @@ Returns:
372372"""
373373function calculate_results (
374374 body_aero:: BodyAerodynamics ,
375- gamma_new:: Vector{Float64} ,
376- reference_point:: AbstractVector ,
377- density:: Float64 ,
375+ gamma_new,
376+ reference_point,
377+ density,
378378 aerodynamic_model_type:: Model ,
379- core_radius_fraction:: Float64 ,
380- mu:: Float64 ,
381- alpha_array:: Vector{Float64} ,
382- v_a_array:: Vector{Float64} ,
383- chord_array:: Vector{Float64} ,
384- x_airf_array:: Matrix{Float64} ,
385- y_airf_array:: Matrix{Float64} ,
386- z_airf_array:: Matrix{Float64} ,
387- va_array:: Matrix{Float64} ,
388- va_norm_array:: Vector{Float64} ,
389- va_unit_array:: Matrix{Float64} ,
379+ core_radius_fraction,
380+ mu,
381+ alpha_array,
382+ v_a_array,
383+ chord_array,
384+ x_airf_array,
385+ y_airf_array,
386+ z_airf_array,
387+ va_array,
388+ va_norm_array,
389+ va_unit_array,
390390 panels:: Vector{Panel} ,
391391 is_only_f_and_gamma_output:: Bool ,
392392)
0 commit comments