Skip to content

Commit 9bdea5e

Browse files
committed
fix calculations
1 parent 74f68d4 commit 9bdea5e

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

src/panel.jl

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -402,15 +402,15 @@ Calculate the velocity induced by a vortex ring at a control point.
402402
work_vectors
403403
)
404404
elseif i == 4 || i == 5 # semi-infinite trailing filaments
405-
# velocity_3D_trailing_vortex_semiinfinite!(
406-
# tempvel,
407-
# filaments[i],
408-
# va_unit,
409-
# evaluation_point,
410-
# gamma,
411-
# va_norm,
412-
# work_vectors
413-
# )
405+
velocity_3D_trailing_vortex_semiinfinite!(
406+
tempvel,
407+
filaments[i],
408+
va_unit,
409+
evaluation_point,
410+
gamma,
411+
va_norm,
412+
work_vectors
413+
)
414414
else
415415
tempvel .= 0.0
416416
end
@@ -449,6 +449,6 @@ function calculate_velocity_induced_bound_2D!(
449449
cross3!(cross_, r0, r3)
450450

451451
# Calculate induced velocity
452-
U_2D .= (cross_ ./ sum(cross_square) ./ 2π) .* norm(r0)
452+
U_2D .= -(cross_ ./ sum(cross_square) ./ 2π) .* norm(r0)
453453
return nothing
454454
end

src/wing_aerodynamics.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ function calculate_AIC_matrices!(wa::WingAerodynamics, model,
258258

259259
# Subtract 2D induced velocity for VSM
260260
if icp == jring && model == "VSM"
261-
calculate_velocity_induced_bound_2D!(U_2D, wa.panels[jring], ep, work_vectors)
261+
calculate_velocity_induced_bound_2D!(U_2D, wa.panels[jring], ep, wa.work_vectors)
262262
AIC[:, icp, jring] .-= U_2D
263263
end
264264
end

0 commit comments

Comments
 (0)