Functions for creating the geometry
VortexStepMethod.add_section!
— Functionadd_section!(wing::Wing, LE_point::PosVector, TE_point::PosVector,
aero_model, aero_data::AeroData=nothing)
Add a new section to the wing.
Arguments:
Setting the inflow conditions and solving
VortexStepMethod.set_va!
— Functionset_va!(body_aero::BodyAerodynamics, va::VelVector, omega=zeros(MVec3))
Set velocity array and update wake filaments.
Arguments
- body_aero::BodyAerodynamics: The BodyAerodynamics struct to modify
va
: Velocity vector of the apparent wind speed [m/s]omega
: Turn rate vector around x y and z axis [rad/s]
VortexStepMethod.solve
— Functionsolve(solver::Solver, body_aero::BodyAerodynamics, gamma_distribution=nothing;
log=false, reference_point=zeros(MVec3))
Main solving routine for the aerodynamic model. Reference point is in the kite body (KB) frame. See also: solve!
Arguments:
- solver::Solver: The solver to use, could be a VSM or LLT solver. See: Solver
- body_aero::BodyAerodynamics: The aerodynamic body. See: BodyAerodynamics
- gamma_distribution: Initial circulation vector or nothing; Length: Number of segments. [m²/s]
Keyword Arguments:
- log=false: If true, print the number of iterations and other info.
- reference_point=zeros(MVec3)
Returns
A dictionary with the results.
VortexStepMethod.solve!
— Functionsolve!(solver::Solver, body_aero::BodyAerodynamics, gamma_distribution=solver.sol.gamma_distribution;
log=false, reference_point=zeros(MVec3), moment_frac=0.1)
Main solving routine for the aerodynamic model. Reference point is in the kite body (KB) frame. This version is modifying the solver.sol
struct and is faster than the solve
function which returns a dictionary.
Arguments:
- solver::Solver: The solver to use, could be a VSM or LLT solver. See: Solver
- body_aero::BodyAerodynamics: The aerodynamic body. See: BodyAerodynamics
- gamma_distribution: Initial circulation vector or nothing; Length: Number of segments. [m²/s]
Keyword Arguments:
- log=false: If true, print the number of iterations and other info.
- reference_point=zeros(MVec3)
- moment_frac=0.1: X-coordinate of normalized panel around which the moment distribution should be calculated.
Returns
The solution of type VSMSolution
Main Plotting Functions
The plotting functions are implemented as package extension. This means that they are only available if the package ControlPlots.jl
was loaded BEFORE loading VortexStepMethod.jl
.
VortexStepMethod.plot_geometry
— Functionplot_geometry(body_aero::BodyAerodynamics, title;
data_type=".pdf", save_path=nothing,
is_save=false, is_show=false,
view_elevation=15, view_azimuth=-120, use_tex=false)
Plot wing geometry from different viewpoints and optionally save/show plots.
Arguments:
body_aero
: the BodyAerodynamics to plot- title: plot title
Keyword arguments:
data_type
`: string with the file type postfix (default: ".pdf")save_path
: path for saving the graphic (default:nothing
)is_save
: boolean value, indicates if the graphic shall be saved (default:false
)is_show
: boolean value, indicates if the graphic shall be displayed (default:false
)view_elevation
: initial view elevation angle (default: 15) [°]view_azimuth
: initial view azimuth angle (default: -120) [°]use_tex
: if the externalpdflatex
command shall be used (default: false)
VortexStepMethod.plot_distribution
— Functionplot_distribution(y_coordinates_list, results_list, label_list;
title="spanwise_distribution", data_type=".pdf",
save_path=nothing, is_save=false, is_show=true, use_tex=false)
Plot spanwise distributions of aerodynamic properties.
Arguments
y_coordinates_list
: List of spanwise coordinatesresults_list
: List of result dictionarieslabel_list
: List of labels for different results
Keyword arguments
title
: Plot title (default: "spanwise_distribution")data_type
: File extension for saving (default: ".pdf")save_path
: Path to save plots (default: nothing)is_save
: Whether to save plots (default: false)is_show
: Whether to display plots (default: true)use_tex
: if the externalpdflatex
command shall be used
VortexStepMethod.plot_polars
— Functionplot_polars(solver_list, body_aero_list, label_list;
literature_path_list=String[],
angle_range=range(0, 20, 2), angle_type="angle_of_attack",
angle_of_attack=0.0, side_slip=0.0, v_a=10.0,
title="polar", data_type=".pdf", save_path=nothing,
is_save=true, is_show=true, use_tex=false)
Plot polar data comparing different solvers and configurations.
Arguments
solver_list
: List of aerodynamic solversbody_aero_list
: List of wing aerodynamics objectslabel_list
: List of labels for each configuration
Keyword arguments
literature_path_list
: Optional paths to literature data filesangle_range
: Range of angles to analyze [°]angle_type
: "angle_of_attack
" or "side_slip
"; (default:angle_of_attack
)angle_of_attack:
AoA to be used for plotting the polars (default: 0.0) [rad]side_slip
: side slip angle (default: 0.0) [rad]- v_a: norm of apparent wind speed (default: 10.0) [m/s]
- title: plot title
data_type
: File extension for saving (default: ".pdf")save_path
: Path to save plots (default: nothing)is_save
: Whether to save plots (default: true)is_show
: Whether to display plots (default: true)use_tex
: if the externalpdflatex
command shall be used (default: false)
Helper Functions
VortexStepMethod.save_plot
— Functionsave_plot(fig, save_path, title; data_type=".pdf")
Save a plot to a file.
Arguments
fig
: Plots figure objectsave_path
: Path to save the plottitle
: Title of the plot
Keyword arguments
data_type
: File extension (default: ".pdf")
VortexStepMethod.show_plot
— Functionshow_plot(fig; dpi=130)
Display a plot at specified DPI.
Arguments
fig
: Plots figure object
Keyword arguments
dpi
: Dots per inch for the figure (default: 130)