Skip to content

Commit

Permalink
try to fix bug in hover case boundary layer again
Browse files Browse the repository at this point in the history
  • Loading branch information
juddmehr committed Feb 15, 2025
1 parent e53d0d3 commit 80b87f2
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/postprocess/boundary_layer_utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ function split_at_stagnation_point(
_, minvtid = findmin(Vtan_duct)
vtsp = Akima_smooth(s_tot, Vtan_duct)


if minvtid == length(s_tot)
if minvtid >= length(s_tot)
s_upper = nothing
s_lower = arc_lengths_from_panel_lengths(duct_panel_lengths[end:-1:1])
split_ratio = 1.0
Expand All @@ -74,11 +73,9 @@ function split_at_stagnation_point(
# print("min Vt index: ", minvtid)
# println(" length s_tot: ", length(s_tot))
# println(" length Vtan_duct: ", length(Vtan_duct))
bracket = (s_tot[max(minvtid - 1, 1)], s_tot[min(minvtid + 1, length(s_tot))])
stag_point = Roots.find_zero(
x -> FLOWMath.derivative(vtsp, x),
(s_tot[max(minvtid - 1, 1)], s_tot[min(minvtid + 1, length(s_tot))]),
Roots.Brent();
atol=eps(),
x -> FLOWMath.derivative(vtsp, x), bracket, Roots.Brent(); atol=eps()
)
end

Expand Down

0 comments on commit 80b87f2

Please sign in to comment.