Skip to content

Commit abed445

Browse files
committed
Address copilot comments
1 parent 01d407c commit abed445

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/wing_geometry.jl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1139,9 +1139,13 @@ function refine_mesh_for_linear_cosine_distribution!(
11391139
for i in 1:n_sections
11401140
target = if spanwise_distribution == LINEAR
11411141
qc_total * (i - 1) / (n_sections - 1)
1142-
else
1142+
elseif spanwise_distribution == COSINE
11431143
qc_total * (1 - cos* (i - 1) /
11441144
(n_sections - 1))) / 2
1145+
else
1146+
throw(ArgumentError(
1147+
"Unsupported distribution: " *
1148+
"$spanwise_distribution"))
11451149
end
11461150

11471151
cum = 0.0
@@ -1437,7 +1441,7 @@ function apply_billowing_to_pair!(
14371441
te_left, te_right, angle_max + δ)
14381442
df = (arc_p - arc) / δ
14391443
abs(df) < 1e-30 && break
1440-
angle_max -= f / df
1444+
angle_max = max(0.0, angle_max - f / df)
14411445
end
14421446

14431447
# Apply converged rotations in-place

0 commit comments

Comments
 (0)