@@ -54,6 +54,7 @@ Struct for storing the solution of the [solve!](@ref) function. Must contain all
5454 cl_group_array:: MVector{G, Float64} = zeros (G)
5555 cd_group_array:: MVector{G, Float64} = zeros (G)
5656 cm_group_array:: MVector{G, Float64} = zeros (G)
57+ alpha_group_array:: MVector{G, Float64} = zeros (G)
5758 solver_status:: SolverStatus = FAILURE
5859end
5960
@@ -302,11 +303,13 @@ function solve!(solver::Solver, body_aero::BodyAerodynamics, gamma_distribution=
302303 cl_group_array = solver. sol. cl_group_array
303304 cd_group_array = solver. sol. cd_group_array
304305 cm_group_array = solver. sol. cm_group_array
306+ alpha_group_array = solver. sol. alpha_group_array
305307 group_moment_dist .= 0.0
306308 group_moment_coeff_dist .= 0.0
307309 cl_group_array .= 0.0
308310 cd_group_array .= 0.0
309311 cm_group_array .= 0.0
312+ alpha_group_array .= 0.0
310313 panel_idx = 1
311314 group_idx = 1
312315 for wing in body_aero. wings
@@ -331,6 +334,7 @@ function solve!(solver::Solver, body_aero::BodyAerodynamics, gamma_distribution=
331334 cl_group_array[group_idx] += solver. sol. cl_array[panel_idx]
332335 cd_group_array[group_idx] += solver. sol. cd_array[panel_idx]
333336 cm_group_array[group_idx] += solver. sol. cm_array[panel_idx]
337+ alpha_group_array[group_idx] += solver. sol. alpha_array[panel_idx]
334338 # Accumulate geometry for averaging
335339 group_panel. x_airf .+ = panel. x_airf
336340 group_panel. y_airf .+ = panel. y_airf
@@ -345,12 +349,12 @@ function solve!(solver::Solver, body_aero::BodyAerodynamics, gamma_distribution=
345349 cl_group_array[group_idx] /= panel_count
346350 cd_group_array[group_idx] /= panel_count
347351 cm_group_array[group_idx] /= panel_count
352+ alpha_group_array[group_idx] /= panel_count
348353 group_panel. x_airf ./= panel_count
349354 group_panel. y_airf ./= panel_count
350355 group_panel. z_airf ./= panel_count
351356 group_panel. va ./= panel_count
352357 group_panel. chord /= panel_count
353- group_panel. width /= panel_count
354358 group_idx += 1
355359 end
356360 elseif wing. grouping_method == REFINE
@@ -378,6 +382,7 @@ function solve!(solver::Solver, body_aero::BodyAerodynamics, gamma_distribution=
378382 cl_group_array[target_group_idx] += solver. sol. cl_array[panel_idx]
379383 cd_group_array[target_group_idx] += solver. sol. cd_array[panel_idx]
380384 cm_group_array[target_group_idx] += solver. sol. cm_array[panel_idx]
385+ alpha_group_array[target_group_idx] += solver. sol. alpha_array[panel_idx]
381386 # Accumulate geometry
382387 group_panel. x_airf .+ = panel. x_airf
383388 group_panel. y_airf .+ = panel. y_airf
@@ -396,6 +401,7 @@ function solve!(solver::Solver, body_aero::BodyAerodynamics, gamma_distribution=
396401 cl_group_array[target_group_idx] /= group_panel_counts[i]
397402 cd_group_array[target_group_idx] /= group_panel_counts[i]
398403 cm_group_array[target_group_idx] /= group_panel_counts[i]
404+ alpha_group_array[target_group_idx] /= group_panel_counts[i]
399405 group_panel. x_airf ./= group_panel_counts[i]
400406 group_panel. y_airf ./= group_panel_counts[i]
401407 group_panel. z_airf ./= group_panel_counts[i]
0 commit comments