Skip to content

Commit 66c6d57

Browse files
authored
Expose alpha corrected (#167)
1 parent 09222aa commit 66c6d57

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/solver.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Struct for storing the solution of the [solve!](@ref) function. Must contain all
66
77
# Attributes
88
- `panel_width_array`::Vector{Float64}: Width of the panels [m]
9+
- `alpha_array`::Vector{Float64}: Angle of attack of each panel relative to the apparent wind [rad]
910
- cl_array::Vector{Float64}: Lift coefficients of the panels [-]
1011
- cd_array::Vector{Float64}: Drag coefficients of the panels [-]
1112
- cm_array::Vector{Float64}: Pitching moment coefficients of the panels [-]
@@ -32,6 +33,7 @@ Struct for storing the solution of the [solve!](@ref) function. Must contain all
3233
_chord_array::Vector{Float64} = zeros(P)
3334
### end of private vectors
3435
panel_width_array::Vector{Float64} = zeros(P)
36+
alpha_array::Vector{Float64} = zeros(P)
3537
cl_array::Vector{Float64} = zeros(P)
3638
cd_array::Vector{Float64} = zeros(P)
3739
cm_array::Vector{Float64} = zeros(P)
@@ -123,7 +125,6 @@ sol::VSMSolution = VSMSolution(): The result of calling [solve!](@ref)
123125
br::BaseResult{P} = BaseResult{P}()
124126
cache::Vector{PreallocationTools.LazyBufferCache{typeof(identity), typeof(identity)}} = [LazyBufferCache() for _ in 1:11]
125127
cache_base::Vector{PreallocationTools.LazyBufferCache{typeof(identity), typeof(identity)}} = [LazyBufferCache()]
126-
cache_solve::Vector{PreallocationTools.LazyBufferCache{typeof(identity), typeof(identity)}} = [LazyBufferCache()]
127128
cache_lin::Vector{PreallocationTools.LazyBufferCache{typeof(identity), typeof(identity)}} = [LazyBufferCache() for _ in 1:4]
128129

129130
# Solution
@@ -175,7 +176,7 @@ function solve!(solver::Solver, body_aero::BodyAerodynamics, gamma_distribution=
175176
cm_array = solver.sol.cm_array
176177
converged = solver.lr.converged
177178
alpha_array = solver.lr.alpha_array
178-
alpha_corrected = solver.cache_solve[1][alpha_array]
179+
alpha_corrected = solver.sol.alpha_array
179180
v_a_array = solver.lr.v_a_array
180181
panels = body_aero.panels
181182

0 commit comments

Comments
 (0)