Skip to content

Commit 135a713

Browse files
committed
Remove last instances of groups
1 parent cd1cc5b commit 135a713

File tree

18 files changed

+54
-155
lines changed

18 files changed

+54
-155
lines changed

data/TUDELFT_V3_KITE/vsm_settings.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
# NEWTON: Newton-Raphson nonlinear solver
3131
#
3232
# USAGE NOTES:
33-
# - n_panels should be divisible by n_groups for proper load balancing
3433
# - Higher n_panels improves accuracy but increases computation time
3534
# - Lower relaxation_factor if convergence issues occur
3635

@@ -46,7 +45,6 @@ wings:
4645
- name: V3_Kite # Wing identifier for output labeling
4746
geometry_file: data/TUDELFT_V3_KITE/aero_geometry.yaml
4847
n_panels: 36 # Total number of panels along wingspan
49-
n_groups: 1 # Number of panel groups (must divide n_panels)
5048
spanwise_panel_distribution: LINEAR # Panel spacing algorithm
5149
spanwise_direction: [0.0, 1.0, 0.0] # Unit vector defining wingspan direction
5250
remove_nan: true # Remove NaN values from polar data

data/pyramid_model/vsm_settings.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
# NEWTON: Newton-Raphson nonlinear solver
3131
#
3232
# USAGE NOTES:
33-
# - n_panels should be divisible by n_groups for proper load balancing
3433
# - Higher n_panels improves accuracy but increases computation time
3534
# - Lower relaxation_factor if convergence issues occur
3635

@@ -46,7 +45,6 @@ wings:
4645
- name: V3_Kite # Wing identifier for output labeling
4746
geometry_file: data/pyramid_model/wing_geometry.yaml
4847
n_panels: 2 # Total number of panels along wingspan
49-
n_groups: 1 # Number of panel groups (must divide n_panels)
5048
spanwise_panel_distribution: LINEAR # Panel spacing algorithm
5149
spanwise_direction: [0.0, 1.0, 0.0] # Unit vector defining wingspan direction
5250
remove_nan: true # Remove NaN values from polar data

data/ram_air_kite/vsm_settings.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,14 @@ PanelDistribution:
1010
InitialGammaDistribution:
1111
ELLIPTIC: Elliptic distribution
1212
ZEROS: Constant distribution
13-
PanelGroupingMethod:
14-
EQUAL_SIZE: Divide panels into equally-sized sequential groups
15-
REFINE: Group refined panels by their original unrefined section
16-
1713
wings:
1814
- name: main_wing
1915
n_panels: 40
20-
n_groups: 40
2116
spanwise_panel_distribution: LINEAR
2217
spanwise_direction: [0.0, 1.0, 0.0]
23-
grouping_method: EQUAL_SIZE
2418
remove_nan: true
2519
solver_settings:
2620
n_panels: 40
27-
n_groups: 40
2821
aerodynamic_model_type: VSM
2922
density: 1.225 # air density [kg/m³]
3023
max_iterations: 1500

data/ram_air_kite/vsm_settings_dual.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,11 @@ InitialGammaDistribution:
1414
wings:
1515
- name: main_wing
1616
n_panels: 40
17-
n_groups: 40
1817
spanwise_panel_distribution: LINEAR
1918
spanwise_direction: [0.0, 1.0, 0.0]
2019
remove_nan: true
2120
- name: tail
2221
n_panels: 20
23-
n_groups: 20
2422
spanwise_panel_distribution: COSINE
2523
spanwise_direction: [0.0, 1.1, 0.0]
2624
remove_nan: false

docs/src/tips_and_tricks.md

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,37 +10,28 @@ The following bodies can be simulated:
1010
To build the geometry of a RAM-air kite, a 3D .obj file can be used as input. In addition a `.dat` file is needed.
1111
It should have two columns, one for the `x` and one for the `y` coordinate of the 2D polar that is used.
1212

13-
## Panel Grouping Methods
14-
When creating a wing, you can specify how panels should be grouped for moment and force calculations using the `grouping_method` parameter. Two methods are available:
13+
## Unrefined Section Distribution
14+
When creating a wing, panel forces and moments are automatically computed for each unrefined section. The unrefined sections correspond to the original geometry sections you define, while panels represent the refined mesh used for aerodynamic calculations.
1515

16-
### EQUAL_SIZE (Default)
17-
Divides refined panels into equally-sized sequential groups. This is the original behavior.
16+
### How It Works
17+
The solver automatically tracks which panels belong to which original unrefined section. After refinement (e.g., splitting each section into multiple panels), the aerodynamic forces and moments are aggregated back to the unrefined section level.
1818

1919
```julia
20-
wing = Wing(40; n_groups=4, grouping_method=EQUAL_SIZE)
21-
```
22-
23-
In this example, with 40 panels and 4 groups, each group will contain 10 consecutive panels (panels 1-10, 11-20, 21-30, 31-40).
24-
25-
### REFINE
26-
Groups refined panels back to their original unrefined section. This is useful when you want group moments and forces to represent the original wing structure, regardless of panel refinement.
27-
28-
```julia
29-
# Create wing with 4 unrefined sections (3 panels)
30-
wing = Wing(40; n_groups=3, grouping_method=REFINE)
20+
# Create wing with 4 sections, refined to 40 panels
21+
wing = Wing(40)
3122
add_section!(wing, [0, 5, 0], [1, 5, 0], INVISCID) # Section 1
3223
add_section!(wing, [0, 2.5, 0], [1, 2.5, 0], INVISCID) # Section 2
3324
add_section!(wing, [0, 0, 0], [1, 0, 0], INVISCID) # Section 3
3425
add_section!(wing, [0, -5, 0], [1, -5, 0], INVISCID) # Section 4
3526
```
3627

37-
**Important:** When using `REFINE`, `n_groups` must equal the number of unrefined panels (number of sections - 1). The solver will automatically map each refined panel to its closest original unrefined panel and sum their moments and forces accordingly.
28+
The 40 panels are distributed across the 3 unrefined panels (sections 1-2, 2-3, 3-4). Forces and moments are computed per panel during the solve, then automatically aggregated to the 3 unrefined panels for output.
3829

39-
This is particularly useful for:
30+
This approach is useful for:
4031
- LEI kites where you want loads per rib
4132
- Wings with discrete control surfaces
4233
- Cases where physical structure doesn't align with uniform panel distribution
43-
- Dynamic simulations where you have fewer structural segments than panels needed for accurate VSM aerodynamics. For example, a 6-segment structural model can be combined with 40-panel aerodynamics by using `n_groups=6` and `grouping_method=REFINE` to map aerodynamic loads back to the structural segments.
34+
- Dynamic simulations where you have fewer structural segments than panels needed for accurate VSM aerodynamics. For example, a 6-segment structural model can be combined with 40-panel aerodynamics, with loads automatically mapped back to the 6 structural segments.
4435

4536
## RAM-air kite model
4637
If running the example `ram_air_kite.jl` fails, try to run the `cleanup.jl` script and then try again. Background: this example caches the calculated polars. Reading cached polars can fail after an update.

examples/V3_kite.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ PLOT && plot_polars(
5050
side_slip=sideslip_deg,
5151
v_a=wind_speed,
5252
title="$(wing.n_panels)_panels_$(wing.spanwise_distribution)_from_yaml_settings",
53-
data_type=".pdf",
53+
data_type=".png",
5454
is_save=false,
5555
is_show=true,
5656
use_tex=USE_TEX
@@ -80,7 +80,7 @@ PLOT && plot_distribution(
8080
[results],
8181
["VSM"];
8282
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))",
83-
data_type=".pdf",
83+
data_type=".png",
8484
is_save=false,
8585
is_show=true,
8686
use_tex=USE_TEX

examples/pyramid_model.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ PLOT && plot_polars(
3939
side_slip=sideslip_deg,
4040
v_a=wind_speed,
4141
title="$(wing.n_panels)_panels_$(wing.spanwise_distribution)_pyramid_model",
42-
data_type=".pdf",
42+
data_type=".png",
4343
is_save=false,
4444
is_show=true,
4545
use_tex=USE_TEX
@@ -67,7 +67,7 @@ PLOT && plot_distribution(
6767
[results],
6868
["VSM"];
6969
title="pyramid_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))",
70-
data_type=".pdf",
70+
data_type=".png",
7171
is_save=false,
7272
is_show=true,
7373
use_tex=USE_TEX

examples/rectangular_wing.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ println("Projected area = $(round(results_vsm["projected_area"], digits=4)) m²"
5757
PLOT && plot_geometry(
5858
body_aero,
5959
"Rectangular_wing_geometry";
60-
data_type=".pdf",
60+
data_type=".png",
6161
save_path=".",
6262
is_save=false,
6363
is_show=true,

examples/stall_model.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ PLOT && plot_distribution(
8989
[results, results_with_stall],
9090
["VSM", "VSM with stall correction"];
9191
title="CAD_spanwise_distributions_alpha_$(round(aoa, digits=1))_delta_$(round(side_slip, digits=1))_yaw_$(round(yaw_rate, digits=1))_v_a_$(round(v_a, digits=1))",
92-
data_type=".pdf",
92+
data_type=".png",
9393
save_path=joinpath(save_folder, "spanwise_distributions"),
9494
is_save=false,
9595
is_show=true,
@@ -123,7 +123,7 @@ PLOT && plot_polars(
123123
side_slip=0,
124124
v_a=10,
125125
title="tutorial_testing_stall_model_n_panels_$(n_panels)_distribution_$(spanwise_distribution)_unrefined_$(CAD_wing.n_unrefined_sections)",
126-
data_type=".pdf",
126+
data_type=".png",
127127
save_path=joinpath(save_folder, "polars"),
128128
is_save=true,
129129
is_show=true,

ext/VortexStepMethodMakieExt.jl

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ function Makie.plot(body_aero::VortexStepMethod.BodyAerodynamics; size = (1200,
237237
end
238238

239239
"""
240-
save_plot(fig, save_path, title; data_type=".pdf")
240+
save_plot(fig, save_path, title; data_type=".png")
241241
242242
Save a Makie figure to a file.
243243
@@ -247,9 +247,9 @@ Save a Makie figure to a file.
247247
- `title`: Title of the plot
248248
249249
# Keyword arguments
250-
- `data_type`: File extension (default: ".pdf")
250+
- `data_type`: File extension (default: ".png", also supports ".jpeg")
251251
"""
252-
function VortexStepMethod.save_plot(fig, save_path, title; data_type=".pdf")
252+
function VortexStepMethod.save_plot(fig, save_path, title; data_type=".png")
253253
isnothing(save_path) && throw(ArgumentError("save_path should be provided"))
254254

255255
!isdir(save_path) && mkpath(save_path)
@@ -434,7 +434,7 @@ end
434434

435435
"""
436436
plot_geometry(body_aero::BodyAerodynamics, title;
437-
data_type=".pdf", save_path=nothing,
437+
data_type=".png", save_path=nothing,
438438
is_save=false, is_show=false,
439439
view_elevation=15, view_azimuth=-120, use_tex=false)
440440
@@ -445,7 +445,7 @@ Plot wing geometry from different viewpoints using Makie.
445445
- `title`: plot title
446446
447447
# Keyword arguments:
448-
- `data_type`: File extension (default: ".pdf")
448+
- `data_type`: File extension (default: ".png", also supports ".jpeg")
449449
- `save_path`: Path for saving (default: nothing)
450450
- `is_save`: Whether to save (default: false)
451451
- `is_show`: Whether to display (default: false)
@@ -454,7 +454,7 @@ Plot wing geometry from different viewpoints using Makie.
454454
- `use_tex`: Ignored for Makie (default: false)
455455
"""
456456
function VortexStepMethod.plot_geometry(body_aero::BodyAerodynamics, title;
457-
data_type=".pdf",
457+
data_type=".png",
458458
save_path=nothing,
459459
is_save=false,
460460
is_show=false,
@@ -491,7 +491,7 @@ end
491491

492492
"""
493493
plot_distribution(y_coordinates_list, results_list, label_list;
494-
title="spanwise_distribution", data_type=".pdf",
494+
title="spanwise_distribution", data_type=".png",
495495
save_path=nothing, is_save=false, is_show=true, use_tex=false)
496496
497497
Plot spanwise distributions of aerodynamic properties using Makie.
@@ -503,15 +503,15 @@ Plot spanwise distributions of aerodynamic properties using Makie.
503503
504504
# Keyword arguments
505505
- `title`: Plot title (default: "spanwise_distribution")
506-
- `data_type`: File extension (default: ".pdf")
506+
- `data_type`: File extension (default: ".png", also supports ".jpeg")
507507
- `save_path`: Path to save plots (default: nothing)
508508
- `is_save`: Whether to save (default: false)
509509
- `is_show`: Whether to display (default: true)
510510
- `use_tex`: Ignored for Makie (default: false)
511511
"""
512512
function VortexStepMethod.plot_distribution(y_coordinates_list, results_list, label_list;
513513
title="spanwise_distribution",
514-
data_type=".pdf",
514+
data_type=".png",
515515
save_path=nothing,
516516
is_save=false,
517517
is_show=true,
@@ -703,7 +703,7 @@ end
703703
literature_path_list=String[],
704704
angle_range=range(0, 20, 2), angle_type="angle_of_attack",
705705
angle_of_attack=0.0, side_slip=0.0, v_a=10.0,
706-
title="polar", data_type=".pdf", save_path=nothing,
706+
title="polar", data_type=".png", save_path=nothing,
707707
is_save=true, is_show=true, use_tex=false)
708708
709709
Plot polar data comparing different solvers using Makie.
@@ -721,7 +721,7 @@ Plot polar data comparing different solvers using Makie.
721721
- `side_slip`: Side slip angle [rad] (default: 0.0)
722722
- `v_a`: Wind speed [m/s] (default: 10.0)
723723
- `title`: Plot title
724-
- `data_type`: File extension (default: ".pdf")
724+
- `data_type`: File extension (default: ".png", also supports ".jpeg")
725725
- `save_path`: Path to save (default: nothing)
726726
- `is_save`: Whether to save (default: true)
727727
- `is_show`: Whether to display (default: true)
@@ -738,7 +738,7 @@ function VortexStepMethod.plot_polars(
738738
side_slip=0.0,
739739
v_a=10.0,
740740
title="polar",
741-
data_type=".pdf",
741+
data_type=".png",
742742
save_path=nothing,
743743
is_save=true,
744744
is_show=true,

0 commit comments

Comments
 (0)