Skip to content

Commit 47a5106

Browse files
committed
Updated the documentation
1 parent a35d6bc commit 47a5106

File tree

1 file changed

+20
-12
lines changed

1 file changed

+20
-12
lines changed

src/plotting.jl

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -463,28 +463,28 @@ function plot_distribution(y_coordinates_list, results_list, label_list;
463463
end
464464

465465
"""
466-
generate_polar_data(solver, wing_aero, angle_range; kwargs...)
466+
generate_polar_data(solver, wing_aero::WingAerodynamics, angle_range; kwargs...)
467467
468468
Generate polar data for aerodynamic analysis over a range of angles.
469469
470470
# Arguments
471471
- `solver`: Aerodynamic solver object
472-
- `wing_aero`: Wing aerodynamics object
472+
- `wing_aero`: Wing aerodynamics struct
473473
- `angle_range`: Range of angles to analyze
474474
475475
# Keyword arguments
476476
- `angle_type`: Type of angle variation ("angle_of_attack" or "side_slip")
477477
- `angle_of_attack`: Initial angle of attack in radians
478478
- `side_slip`: Initial side slip angle in radians
479-
- `yaw_rate`: Yaw rate
479+
- `yaw_rate`: Yaw rate (not yet used)
480480
- `v_a`: Magnitude of velocity
481481
482482
# Returns
483483
- Tuple of polar data array and Reynolds number
484484
"""
485485
function generate_polar_data(
486486
solver,
487-
wing_aero,
487+
wing_aero::WingAerodynamics,
488488
angle_range;
489489
angle_type="angle_of_attack",
490490
angle_of_attack=0.0,
@@ -579,9 +579,17 @@ Plot polar data comparing different solvers and configurations.
579579
580580
# Keyword arguments
581581
- `literature_path_list`: Optional paths to literature data files
582-
- `angle_range`: Range of angles to analyze
582+
- `angle_range`: Range of angles to analyze [°]
583583
- `angle_type`: "angle_of_attack" or "side_slip"; (default: `angle_of_attack`)
584-
- `angle_of_attack:` AoA to be used for plotting the polars (default: 0.0)
584+
- `angle_of_attack:` AoA to be used for plotting the polars (default: 0.0) [rad]
585+
- `side_slip`: side slip angle (default: 0.0) [rad]
586+
- `yaw_rate`: yaw rate (default: 0.0)
587+
- v_a: norm of apparent wind speed (default: 10.0) [m/s]
588+
- title: plot title
589+
- `data_type`: File extension for saving (default: ".pdf")
590+
- `save_path`: Path to save plots (default: nothing)
591+
- `is_save`: Whether to save plots (default: true)
592+
- `is_show`: Whether to display plots (default: true)
585593
"""
586594
function plot_polars(
587595
solver_list,
@@ -613,11 +621,11 @@ function plot_polars(
613621
for (i, (solver, wing_aero)) in enumerate(zip(solver_list, wing_aero_list))
614622
polar_data, rey = generate_polar_data(
615623
solver, wing_aero, angle_range;
616-
angle_type=angle_type,
617-
angle_of_attack=angle_of_attack,
618-
side_slip=side_slip,
619-
yaw_rate=yaw_rate,
620-
v_a=v_a
624+
angle_type,
625+
angle_of_attack,
626+
side_slip,
627+
yaw_rate,
628+
v_a
621629
)
622630
push!(polar_data_list, polar_data)
623631
# Update label with Reynolds number
@@ -807,7 +815,7 @@ function plot_polars(
807815

808816
# Save and show plot
809817
if is_save && !isnothing(save_path)
810-
save_plot(fig, save_path, main_title, data_type=data_type)
818+
save_plot(fig, save_path, main_title; data_type)
811819
end
812820

813821
if is_show

0 commit comments

Comments
 (0)