Functions for creating the geometry

VortexStepMethod.add_section!Function
add_section!(wing::Wing, LE_point::PosVector, TE_point::PosVector, 
             aero_model, aero_data::AeroData=nothing)

Add a new section to the wing.

Arguments:

  • wing::Wing: The Wing to which a section shall be added
  • LE_point::PosVector: PosVector of the point on the side of the leading edge
  • TE_point::PosVector: PosVector of the point on the side of the trailing edge
  • aero_model::AeroModel: AeroModel
  • aero_data::AeroData: See AeroData
source

Setting the inflow conditions and solving

VortexStepMethod.set_va!Function
set_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]
source
VortexStepMethod.solveFunction
solve(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.

source
VortexStepMethod.solve!Function
solve!(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

source

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_geometryFunction
plot_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:

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 external pdflatex command shall be used (default: false)
source
VortexStepMethod.plot_distributionFunction
plot_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 coordinates
  • results_list: List of result dictionaries
  • label_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 external pdflatex command shall be used
source
VortexStepMethod.plot_polarsFunction
plot_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 solvers
  • body_aero_list: List of wing aerodynamics objects
  • label_list: List of labels for each configuration

Keyword arguments

  • literature_path_list: Optional paths to literature data files
  • angle_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 external pdflatex command shall be used (default: false)
source

Helper Functions

VortexStepMethod.save_plotFunction
save_plot(fig, save_path, title; data_type=".pdf")

Save a plot to a file.

Arguments

  • fig: Plots figure object
  • save_path: Path to save the plot
  • title: Title of the plot

Keyword arguments

  • data_type: File extension (default: ".pdf")
source
VortexStepMethod.show_plotFunction
show_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)
source