Skip to content

Commit 077e543

Browse files
committed
Address copilot comments
1 parent 152bf58 commit 077e543

4 files changed

Lines changed: 18 additions & 15 deletions

File tree

data/TUDELFT_V3_KITE/vsm_settings_coarse.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
# PANEL DISTRIBUTIONS:
1818
# LINEAR: Uniform panel spacing along wingspan
1919
# COSINE: Cosine clustering (more panels at tips)
20-
# COSINE_VAN_GARREL: Van Garrel's modified cosine distribution
2120
# SPLIT_PROVIDED: Use predefined section splits from geometry
2221
# UNCHANGED: Preserve original geometry discretization
22+
# BILLOWING: Split provided + sinusoidal TE billowing
2323
#
2424
# INITIAL CIRCULATION DISTRIBUTIONS:
2525
# ELLIPTIC: Elliptical distribution (optimal for efficiency)
@@ -44,7 +44,7 @@ condition:
4444
# Define wing geometry files and discretization parameters
4545
wings:
4646
- name: V3_Kite # Wing identifier for output labeling
47-
geometry_file: data/v3/aero_geometry.yaml
47+
geometry_file: data/TUDELFT_V3_KITE/aero_geometry.yaml
4848
n_panels: 54 # Total number of panels along wingspan
4949
spanwise_panel_distribution: SPLIT_PROVIDED # Panel spacing algorithm
5050
spanwise_direction: [0.0, 1.0, 0.0] # Unit vector defining wingspan direction

examples/billowing.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ literature_paths = [
2323
joinpath(lit_dir, "windtunnel_alpha_sweep_beta_00_0_Poland_2025_Rey_5e5.csv"),
2424
]
2525

26-
# Load solver settings (coarse: 36 panels, matches 10-section geometry)
26+
# Load solver settings (coarse: 54 panels, matches 10-section geometry)
2727
settings_data = VortexStepMethod.YAML.load_file(
2828
joinpath(v3_dir, "vsm_settings_coarse.yaml"))
2929
condition_cfg = settings_data["condition"]

ext/VortexStepMethodMakieExt.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -780,6 +780,7 @@ Plot polar data comparing different solvers using Makie.
780780
- `is_save`: Whether to save (default: true)
781781
- `is_show`: Whether to display (default: true)
782782
- `use_tex`: Ignored for Makie (default: false)
783+
- `cl_over_cd`: Plot CL/CD vs angle instead of CL vs CD (default: true)
783784
"""
784785
function VortexStepMethod.plot_polars(
785786
solver_list,
@@ -1025,6 +1026,8 @@ Create combined multi-panel figure with geometry, polar data, distributions, and
10251026
- `data_type`: File extension (default: ".png", also supports ".jpeg")
10261027
- `save_path`: Directory path to save files (default: nothing)
10271028
- `is_save`: Save plots to files (default: false)
1029+
- `cl_over_cd`: Plot CL/CD vs angle instead of CL vs CD (default: true)
1030+
- `angle_of_attack_for_spanwise_distribution`: AoA for spanwise plots (default: 5.0)
10281031
"""
10291032
function VortexStepMethod.plot_combined_analysis(
10301033
solver,

test/wing_geometry/test_billowing.jl

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -51,20 +51,20 @@ function te_arc_length_between_ribs(wing, rib_left, rib_right)
5151
if isnothing(first_idx)
5252
if isapprox(sec.LE_point,
5353
wing.unrefined_sections[rib_left].LE_point;
54-
atol=1e-10)
54+
atol=1e-8)
5555
first_idx = i
5656
end
5757
end
5858
if !isnothing(first_idx) && isnothing(last_idx)
5959
if isapprox(sec.LE_point,
6060
wing.unrefined_sections[rib_right].LE_point;
61-
atol=1e-10)
61+
atol=1e-8)
6262
last_idx = i
6363
break
6464
end
6565
end
6666
end
67-
@assert !isnothing(first_idx) && !isnothing(last_idx)
67+
@test !isnothing(first_idx) && !isnothing(last_idx)
6868
arc = 0.0
6969
for i in first_idx:(last_idx - 1)
7070
arc += norm(sections[i + 1].TE_point -
@@ -84,7 +84,7 @@ end
8484
billowing_percentage=0.0)
8585
for pair in 1:(n_ribs - 1)
8686
res = te_arc_length_between_ribs(wing, pair, pair + 1)
87-
@test res.arc res.straight atol=1e-10
87+
@test res.arc res.straight atol=1e-8
8888
end
8989
end
9090

@@ -97,7 +97,7 @@ end
9797
for sec in wing.refined_sections
9898
if isapprox(sec.LE_point,
9999
wing.unrefined_sections[i].LE_point;
100-
atol=1e-10)
100+
atol=1e-8)
101101
@test isapprox(sec.TE_point,
102102
wing.unrefined_sections[i].TE_point;
103103
atol=1e-6)
@@ -139,7 +139,7 @@ end
139139
for sec in wing.refined_sections
140140
chord = norm(sec.TE_point - sec.LE_point)
141141
# All ribs have chord=1.0, so interpolated chord=1.0
142-
@test isapprox(chord, 1.0; atol=1e-10)
142+
@test isapprox(chord, 1.0; atol=1e-8)
143143
end
144144
end
145145

@@ -209,20 +209,20 @@ end
209209

210210
# Zero angle is identity
211211
r = rodrigues_rotate(v, axis, 0.0)
212-
@test isapprox(r, v; atol=1e-14)
212+
@test isapprox(r, v; atol=1e-12)
213213

214214
# 90 degrees around z rotates x -> y
215215
r90 = rodrigues_rotate(v, axis, pi / 2)
216-
@test isapprox(r90, MVec3(0.0, 1.0, 0.0); atol=1e-14)
216+
@test isapprox(r90, MVec3(0.0, 1.0, 0.0); atol=1e-12)
217217

218218
# 180 degrees around z rotates x -> -x
219219
r180 = rodrigues_rotate(v, axis, pi)
220-
@test isapprox(r180, MVec3(-1.0, 0.0, 0.0); atol=1e-14)
220+
@test isapprox(r180, MVec3(-1.0, 0.0, 0.0); atol=1e-12)
221221

222222
# Rotation preserves vector length
223223
v2 = MVec3(3.0, 4.0, 0.0)
224224
r2 = rodrigues_rotate(v2, axis, 1.23)
225-
@test isapprox(norm(r2), norm(v2); atol=1e-14)
225+
@test isapprox(norm(r2), norm(v2); atol=1e-12)
226226
end
227227

228228
@testset "Fast path: n_panels == n_provided warns" begin
@@ -246,8 +246,8 @@ end
246246
# All refined sections should match unrefined exactly
247247
for (ref, unref) in zip(
248248
wing.refined_sections, wing.unrefined_sections)
249-
@test isapprox(ref.LE_point, unref.LE_point; atol=1e-10)
250-
@test isapprox(ref.TE_point, unref.TE_point; atol=1e-10)
249+
@test isapprox(ref.LE_point, unref.LE_point; atol=1e-8)
250+
@test isapprox(ref.TE_point, unref.TE_point; atol=1e-8)
251251
end
252252
end
253253
end

0 commit comments

Comments
 (0)