Skip to content

Commit 7103702

Browse files
committed
Merge remote-tracking branch 'origin/main' into agent/331-plot-section-polars-covers-only-polar-ve
# Conflicts: # CHANGELOG.md
2 parents 9ae2ab2 + 086ee32 commit 7103702

41 files changed

Lines changed: 639 additions & 585 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
- `plot_section_polars(body_aero; panels, alphas, delta)` draws cl, cd and cm against α
1212
per panel through `calculate_cl`/`calculate_cd`/`calculate_cm`, for every aero model
1313
and at flap deflection `delta`, in one figure instead of one coefficient per call.
14+
- `linearize` takes a `BodyAerodynamics` with more than one wing; `theta_idxs` and
15+
`delta_idxs` then run over the unrefined sections of all wings in order.
1416

1517
### Changed
1618

@@ -23,6 +25,11 @@
2325

2426
- The `VSMSolution` docstring gives `lift_dist`, `drag_dist` and `panel_moment_dist` in
2527
the per-unit-span units they hold, [N/m] and [Nm/m], instead of [N] and [Nm].
28+
- Inside its vortex core, `velocity_3D_trailing_vortex!` induces an azimuthal velocity
29+
instead of a radial one. Only points within the millimetre-scale Oseen core of a
30+
panel's chordwise trailing segment were affected.
31+
- With `artificial_damping` on, an iteration whose circulation is already smooth no longer
32+
re-applies the previous iteration's damping correction.
2633

2734
## VortexStepMethod v5.1.1 2026-09-12
2835

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ Three kinds of input data is needed:
8989
- kite wing: model of polars included, n sections to define
9090

9191
- The airflow and turn rate:
92-
- `v_app` vector and `omega` (turn rate) vector in Kite Body (KB) reference frame
92+
- `va_vec` vector and `omega` (turn rate) vector in Kite Body (KB) reference frame
9393

9494
- The configuration:
9595
- how many panels
@@ -106,7 +106,7 @@ A whole run — the flight condition, each wing and the solver — is configured
106106
n_panels = 20 # Number of panels
107107
span = 20.0 # Wing span [m]
108108
chord = 1.0 # Chord length [m]
109-
v_a = 20.0 # Magnitude of inflow velocity [m/s]
109+
va = 20.0 # Magnitude of inflow velocity [m/s]
110110
density = 1.225 # Air density [kg/m³]
111111
alpha_deg = 30.0 # Angle of attack [degrees]
112112
alpha = deg2rad(alpha_deg)
@@ -131,8 +131,8 @@ refine!(wing)
131131
body_aero = BodyAerodynamics([wing])
132132

133133
# Set inflow conditions
134-
vel_app = [cos(alpha), 0.0, sin(alpha)] .* v_a
135-
set_va!(body_aero, vel_app)
134+
va_vec = [cos(alpha), 0.0, sin(alpha)] .* va
135+
set_va!(body_aero, va_vec)
136136
```
137137
It is possible to import the wing geometry using an `.obj` file as shown in the example `ram_air_kite.jl`. During the import the polars are calculated automatically using XFoil. This approach is valid for rigid wings and ram-air kites, but not for leading edge inflatable kites.
138138

docs/src/examples.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ julia> using VortexStepMethod
3535
julia> n_panels = 20 # Number of panels
3636
julia> span = 20.0 # Wing span [m]
3737
julia> chord = 1.0 # Chord length [m]
38-
julia> v_a = 20.0 # Magnitude of inflow velocity [m/s]
38+
julia> va = 20.0 # Magnitude of inflow velocity [m/s]
3939
julia> alpha_deg = 30.0 # Angle of attack [degrees]
4040
julia> alpha = deg2rad(alpha_deg)
4141
```
@@ -77,8 +77,8 @@ multiple wings.
7777
###### Set inflow conditions
7878

7979
```julia
80-
julia> vel_app = [cos(alpha), 0.0, sin(alpha)] .* v_a
81-
julia> set_va!(body_aero, vel_app, [0, 0, 0.1])
80+
julia> va_vec = [cos(alpha), 0.0, sin(alpha)] .* va
81+
julia> set_va!(body_aero, va_vec, [0, 0, 0.1])
8282
```
8383

8484
#### Step 5: Initialize solvers for both LLT and VSM methods
@@ -118,7 +118,7 @@ julia> plot_combined_analysis(
118118
solver_label=["LLT", "VSM"],
119119
angle_range=angle_range,
120120
angle_type="angle_of_attack",
121-
v_a=v_a,
121+
v_a=va,
122122
title="Rectangular Wing",
123123
is_show=true,
124124
)

docs/src/index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ Three kinds of input data is needed:
9494
- kite wing: model of polars included, n sections to define
9595

9696
- The airflow and turn rate:
97-
- `v_app` vector and `omega` (turn rate) vector in Kite Body (KB) reference frame
97+
- `va_vec` vector and `omega` (turn rate) vector in Kite Body (KB) reference frame
9898

9999
- The configuration:
100100
- how many panels
@@ -112,7 +112,7 @@ A whole run — the flight condition, each wing and the solver — is configured
112112
n_panels = 20 # Number of panels
113113
span = 20.0 # Wing span [m]
114114
chord = 1.0 # Chord length [m]
115-
v_a = 20.0 # Magnitude of inflow velocity [m/s]
115+
va = 20.0 # Magnitude of inflow velocity [m/s]
116116
density = 1.225 # Air density [kg/m³]
117117
alpha_deg = 30.0 # Angle of attack [degrees]
118118
alpha = deg2rad(alpha_deg)
@@ -137,8 +137,8 @@ refine!(wing)
137137
body_aero = BodyAerodynamics([wing])
138138

139139
# Set inflow conditions
140-
vel_app = [cos(alpha), 0.0, sin(alpha)] .* v_a
141-
set_va!(body_aero, vel_app)
140+
va_vec = [cos(alpha), 0.0, sin(alpha)] .* va
141+
set_va!(body_aero, va_vec)
142142
```
143143

144144
It is possible to import the wing geometry using an `.obj` file as shown in the example `ram_air_kite.jl`. During the import the polars are calculated automatically, using NeuralFoil by default or XFoil as a viscous cross-check. This approach is valid for rigid wings and ram-air kites, but not for leading edge inflatable kites. See [From CAD mesh to aerodynamic model](@ref) for the full pipeline.

docs/src/private_functions.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ panel_loads
6363
```@docs
6464
velocity_3D_bound_vortex!
6565
velocity_3D_trailing_vortex!
66+
velocity_3D_vortex_segment!
6667
velocity_3D_trailing_vortex_semiinfinite!
6768
calculate_velocity_induced_bound_2D!
6869
calculate_velocity_induced_single_ring_semiinfinite!
@@ -83,6 +84,7 @@ calculate_filaments_for_plotting
8384
### Mesh refinement and billowing
8485
```@docs
8586
unrefined_deform!
87+
unrefined_section_range
8688
deform!
8789
compute_refined_panel_mapping!
8890
compute_refined_section_interpolation!

docs/src/reference_frames.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
### Introduction
44
Reference frames are needed for following purposes:
55
- for creating a CAD model of the wing (or the wings)
6-
- for defining the apparent wind speed vector $v_a$
6+
- for defining the apparent wind speed vector `va_vec`
77
- for calculating the lift and drag and side force coefficients
88
- for calculating the resulting forces and moments
99

@@ -30,6 +30,6 @@ The turn rates $\mathrm{omega} = [\mathrm{omega_x}, \mathrm{omega_y} ,\mathrm{om
3030

3131
## Input and output
3232
- when running a simulation, the turnrate of the kite must be provided on each time step
33-
- the apparent wind speed vector `v_a` is defined in the **KB** reference frame
33+
- the apparent wind speed vector `va_vec` is defined in the **KB** reference frame
3434
- the resulting forces are defined in the **KB** reference frame
3535
- the **CL**, **CD**, **CS** and the resulting moments and moment coefficients are defined in the **KB** reference frame

examples/V3_kite.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ PLOT && plot_distribution(
141141
[body_y_coordinates],
142142
[results],
143143
["VSM"];
144-
title="CAD_spanwise_distributions_alpha_$(round(angle_of_attack_deg, digits=1))_delta_$(round(sideslip_deg, digits=1))_yaw_$(round(yaw_rate, digits=1))_v_a_$(round(wind_speed, digits=1))",
144+
title="CAD_spanwise_distributions_alpha_$(round(angle_of_attack_deg, digits=1))_delta_$(round(sideslip_deg, digits=1))_yaw_$(round(yaw_rate, digits=1))_va_$(round(wind_speed, digits=1))",
145145
save_path=OUTPUT_DIR,
146146
is_save=false || SAVE_ALL,
147147
is_show=true,

examples/V3_neuralfoil.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ nf_yaml = obj_to_yaml(OBJ_PATH, gen_dir; n_sections=N_SLICES, Re=RE,
6969
rotation=ROTATION, wrap_method=WRAP, aero_solver=NF_SOLVER, verbose=true)
7070

7171
# Flight conditions
72-
v_a = 10.0
72+
va = 10.0
7373
angle_range = range(-5, 25, length=31)
7474

7575
# Load settings and create wing with CFD polars
@@ -105,7 +105,7 @@ fig = plot_polars(
105105
"Wind tunnel (Poland 2025)"];
106106
literature_path_list=literature_paths,
107107
angle_range,
108-
v_a,
108+
v_a=va,
109109
title="TU Delft V3 Kite: CFD vs NeuralFoil (Re=$RE)",
110110
is_save=false,
111111
)

examples/bench.jl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ using VortexStepMethod: solve_base!
1212
n_panels = 20 # Number of panels
1313
span = 20.0 # Wing span [m]
1414
chord = 1.0 # Chord length [m]
15-
v_a = 20.0 # Magnitude of inflow velocity [m/s]
15+
va = 20.0 # Magnitude of inflow velocity [m/s]
1616
density = 1.225 # Air density [kg/m³]
1717
alpha_deg = 30.0 # Angle of attack [degrees]
1818
alpha = deg2rad(alpha_deg)
@@ -37,8 +37,8 @@ refine!(wing)
3737
body_aero = BodyAerodynamics([wing])
3838

3939
# Set inflow conditions
40-
vel_app = [cos(alpha), 0.0, sin(alpha)] .* v_a
41-
set_va!(body_aero, vel_app)
40+
va_vec = [cos(alpha), 0.0, sin(alpha)] .* va
41+
set_va!(body_aero, va_vec)
4242

4343
# Step 4: Initialize solvers for both LLT and VSM methods
4444
llt_solver = Solver(body_aero; aerodynamic_model_type=LLT)
@@ -73,17 +73,17 @@ vsm_solver = Solver(
7373
)
7474

7575
# Setting velocity conditions
76-
v_a = 15.0
76+
va = 15.0
7777
aoa = 15.0
7878
side_slip = 0.0
7979
yaw_rate = 0.0
8080
aoa_rad = deg2rad(aoa)
81-
vel_app = [
81+
va_vec = [
8282
cos(aoa_rad) * cos(side_slip),
8383
sin(side_slip),
8484
sin(aoa_rad)
85-
] * v_a
86-
set_va!(body_aero, vel_app)
85+
] * va
86+
set_va!(body_aero, va_vec)
8787

8888
# Solving
8989
solve_base!(vsm_solver, body_aero, nothing)

examples/billowing.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,9 @@ sideslip_deg = condition_cfg["beta"]
124124

125125
α0 = deg2rad(angle_of_attack_deg)
126126
β0 = deg2rad(sideslip_deg)
127-
va = wind_speed .* [cos(α0) * cos(β0), sin(β0), sin(α0) * cos(β0)]
128-
set_va!(body_aero_flat, va)
129-
set_va!(body_aero_bill, va)
127+
va_vec = wind_speed .* [cos(α0) * cos(β0), sin(β0), sin(α0) * cos(β0)]
128+
set_va!(body_aero_flat, va_vec)
129+
set_va!(body_aero_bill, va_vec)
130130

131131
# --- Solve and compare ---
132132
results_flat = VortexStepMethod.solve(

0 commit comments

Comments
 (0)