@@ -17,6 +17,7 @@ Main structure for calculating aerodynamic properties of bodies.
1717- v_a_array::Vector{Float64} = zeros(Float64, P)
1818- work_vectors::NTuple{10,MVec3} = ntuple(_ -> zeros(MVec3), 10)
1919- AIC::Array{Float64, 3} = zeros(3, P, P)
20+ - projected_area::Float64 = 1.0: The area projected onto the xy-plane of the kite body reference frame [m²]
2021"""
2122@with_kw mutable struct BodyAerodynamics{P}
2223 panels:: Vector{Panel}
@@ -31,6 +32,7 @@ Main structure for calculating aerodynamic properties of bodies.
3132 v_a_array:: Vector{Float64} = zeros (Float64, P)
3233 work_vectors:: NTuple{10,MVec3} = ntuple (_ -> zeros (MVec3), 10 )
3334 AIC:: Array{Float64, 3} = zeros (3 , P, P)
35+ projected_area:: Float64 = one (Float64)
3436end
3537
3638"""
@@ -132,10 +134,9 @@ function init!(body_aero::BodyAerodynamics;
132134 idx += 1
133135 end
134136 end
135-
136- @assert all ([panel. filaments[1 ]. initialized for panel in body_aero. panels])
137137
138138 # Initialize rest of the struct
139+ body_aero. projected_area = sum (wing -> calculate_projected_area (wing), body_aero. wings)
139140 body_aero. stall_angle_list .= calculate_stall_angle_list (body_aero. panels)
140141 body_aero. alpha_array .= 0.0
141142 body_aero. v_a_array .= 0.0
@@ -635,7 +636,7 @@ function calculate_results(
635636 end
636637
637638 # Calculate wing geometry properties
638- projected_area = sum (wing -> calculate_projected_area (wing), body_aero. wings)
639+ projected_area = body_aero. projected_area
639640 wing_span = body_aero. wings[1 ]. span
640641 aspect_ratio_projected = wing_span^ 2 / projected_area
641642
0 commit comments