Skip to content

Commit 4e94513

Browse files
committed
Merge branch 'main' into refac
2 parents 1819a39 + d029ca2 commit 4e94513

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

examples/ram_air_kite.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ if DEFORM
2424
end
2525

2626
# Create solvers
27-
P = length(body_aero.panels)
28-
vsm_solver = Solver{P}(
27+
vsm_solver = Solver(body_aero;
2928
aerodynamic_model_type=VSM,
3029
is_with_artificial_damping=false
3130
)

src/solver.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ sol::VSMSolution = VSMSolution(): The result of calling [solve!](@ref)
117117
sol::VSMSolution{P} = VSMSolution(P)
118118
end
119119

120-
function Solver(body_aero; kwargs)
120+
function Solver(body_aero; kwargs...)
121121
P = length(body_aero.panels)
122122
return Solver{P}(; kwargs...)
123123
end
@@ -266,7 +266,7 @@ function solve!(solver::Solver, body_aero::BodyAerodynamics, gamma_distribution=
266266

267267
# Calculate the moment distribution (moment on each panel)
268268
arm = (moment_frac - 0.25) * panel.chord
269-
moment_distribution[i] = (ftotal_induced_va panel.z_airf) * arm
269+
moment_distribution[i] = ((ftotal_induced_va panel.z_airf) * arm + moment[i]) * panel.width
270270
moment_coefficient_distribution[i] = moment_distribution[i] / (q_inf * projected_area)
271271
end
272272

0 commit comments

Comments
 (0)