Enumerations
VortexStepMethod.Model
— TypeModel VSM
LLT
Enumeration of the implemented model types.
Elements
- VSM: Vortex Step Method
- LLT: Lifting Line Theory
VortexStepMethod.AeroModel
— TypeAeroModel LEI_AIRFOIL_BREUKELS
POLAR_VECTORS
POLAR_MATRICES
INVISCID
Enumeration of the implemented aerodynamic models. See also: AeroData
Elements
LEI_AIRFOIL_BREUKELS
: Polynom approximation for leading edge inflatable kitesPOLAR_VECTORS
: Polar vectors as function of alpha (lookup tables with interpolation)POLAR_MATRICES
: Polar matrices as function of alpha and beta (lookup tables with interpolation)- INVISCID
where alpha
is the angle of attack, beta
is trailing edge angle.
VortexStepMethod.PanelDistribution
— TypePanelDistribution LINEAR
COSINE
COSINE_VAN_GARREL
SPLIT_PROVIDED
UNCHANGED
Enumeration of the implemented panel distributions.
Elements
- LINEAR # Linear distribution
- COSINE # Cosine distribution
COSINE_VAN_GARREL
# van Garrel cosine distributionSPLIT_PROVIDED
# Split provided sections- UNCHANGED # Keep original sections
VortexStepMethod.InitialGammaDistribution
— TypeInitialGammaDistribution ELLIPTIC ZEROS
Enumeration of the implemented initial gamma distributions.
Elements
- ELLIPTIC
- ZEROS
VortexStepMethod.SolverStatus
— TypeSolverStatus FEASIBLE INFEASIBLE FAILURE
Enumeration to report back the validity of the result of the solve! function. Used in the VSMSolution struct.
Elements
- FEASIBLE: The gamma distribution is physically feasible
- INFEASIBLE: The gamma distribution is physically infeasible
- FAILURE: The result did not converge within the maximal number of iterations
Basic Vectors
VortexStepMethod.MVec3
— Typeconst MVec3 = MVector{3, Float64}
Basic 3-dimensional vector, stack allocated, mutable.
VortexStepMethod.PosVector
— Typeconst PosVector=Union{MVec3, Vector}
Position vector, either a MVec3
or a Vector
for use in function signatures.
VortexStepMethod.VelVector
— Typeconst VelVector=Union{MVec3, Vector}
Velocity vector, either a MVec3
or a Vector
for use in function signatures.
Aerodynamic data
VortexStepMethod.AeroData
— TypeAeroData= Union{
Nothing,
NTuple{2, Float64},
Tuple{Vector{Float64}, Vector{Float64}, Vector{Float64}, Vector{Float64}},
Tuple{Vector{Float64}, Vector{Float64}, Matrix{Float64}, Matrix{Float64}, Matrix{Float64}}
}
Union of different definitions of the aerodynamic properties of a wing section. See also: AeroModel
- nothing for INVISCID
- (
tube_diameter
, camber) forLEI_AIRFOIL_BREUKELS
- (
alpha_range
,cl_vector
,cd_vector
,cm_vector
) forPOLAR_VECTORS
- (
alpha_range
,beta_range
,cl_matrix
,cd_matrix
,cm_matrix
) forPOLAR_MATRICES
where alpha
is the angle of attack [rad], beta
is trailing edge angle [rad], cl
the lift coefficient, cd
the drag coefficient and cm
the pitching moment coefficient. The camber of a kite refers to the curvature of its airfoil shape. The camber is typically measured as the maximum distance between the mean camber line (the line equidistant from the upper and lower surfaces) and the chord line of the airfoil.
Wing Geometry, Panel and Aerodynamics
A body is constructed of one or more abstract wings. An abstract wing can be a Wing or a KiteWing. A Wing/ KiteWing has one or more sections.
VortexStepMethod.Section
— Typemutable struct Section
Represents a wing section with leading edge, trailing edge, and aerodynamic properties.
Fields
LE_point::MVec3
= zeros(MVec3): Leading edge point coordinatesTE_point::MVec3
= zeros(MVec3): Trailing edge point coordinatesaero_model
::AeroModel = INVISCID: AeroModelaero_data
::AeroData = nothing: See: [AeroData]
VortexStepMethod.Section
— TypeSection(LE_point::Vector{Float64}, TE_point::Vector{Float64},
aero_model=INVISCID, aero_data=nothing)
Constructor for Section that allows to pass Vectors of Float64 as point coordinates.
VortexStepMethod.Wing
— TypeWing
Represents a wing composed of multiple sections with aerodynamic properties.
Fields
n_panels::Int64
: Number of panels in aerodynamic meshspanwise_panel_distribution
::PanelDistribution: PanelDistributionspanwise_direction::MVec3
: Wing span direction vectorsections::Vector{Section}
: Vector of wing sections, see: Sectionrefined_sections::Vector{Section}
: Vector of refined wing sections, see: Sectionremove_nan::Bool
: Wether to remove the NaNs from interpolations or not
VortexStepMethod.Wing
— MethodWing(n_panels::Int;
spanwise_panel_distribution::PanelDistribution=LINEAR,
spanwise_direction::PosVector=MVec3([0.0, 1.0, 0.0]),
remove_nan::Bool=true)
Constructor for a Wing struct with default values that initializes the sections and refined sections as empty arrays.
Parameters
n_panels::Int64
: Number of panels in aerodynamic meshspanwise_panel_distribution
::PanelDistribution = LINEAR: PanelDistributionspanwise_direction::MVec3
= MVec3([0.0, 1.0, 0.0]): Wing span direction vectorremove_nan::Bool
: Wether to remove the NaNs from interpolations or not
VortexStepMethod.KiteWing
— TypeKiteWing
Represents a curved wing that inherits from Wing with additional geometric properties.
Fields
- All fields from Wing:
n_panels::Int64
: Number of panels in aerodynamic meshspanwise_panel_distribution
::PanelDistribution: see: PanelDistributionspanwise_direction::MVec3
: Wing span direction vectorsections::Vector{Section}
: List of wing sections, see: Section- refined_sections::Vector{Section}
remove_nan::Bool
: Wether to remove the NaNs from interpolations or not
- Additional fields:
circle_center_z::Vector{Float64}
: Center of circle coordinates- gamma_tip::Float64: Angle between the body frame z axis and the vector going from the kite circular shape center to the wing tip.
inertia_tensor
::Matrix{Float64}: see:calculate_inertia_tensor
- radius::Float64: Radius of curvature
- le_interp::NTuple{3, Extrapolation}: see: Extrapolation
- te_interp::NTuple{3, Extrapolation}
- area_interp::Extrapolation
VortexStepMethod.KiteWing
— MethodKiteWing(obj_path, dat_path; alpha=0.0, crease_frac=0.75, wind_vel=10., mass=1.0,
n_panels=54, n_sections=n_panels+1, spanwise_panel_distribution=UNCHANGED,
spanwise_direction=[0.0, 1.0, 0.0], remove_nan::Bool=true)
Constructor for a KiteWing that allows to use an .obj
and a .dat
file as input.
Parameters
- obj_path: Path to the
.obj
file used for creating the geometry - dat_path: Path to the
.dat
file, a standard format for 2d foil geometry
Keyword Parameters
- alpha=0.0: Angle of attack of each segment relative to the x axis [rad]
- crease_frac=0.75: The x coordinate around which the trailing edge rotates on a normalized 2d foil, used in the xfoil polar generation
- wind_vel=10.0: Apparent wind speed in m/s, used in the xfoil polar generation
- mass=1.0: Mass of the wing in kg, used for the inertia calculations
n_panels
=54: Number of panels.n_sections
=n_panels+1: Number of sections (there is a section on each side of each panel.)spanwise_panel_distribution
=UNCHANGED: see: PanelDistributionspanwise_direction
=[0.0, 1.0, 0.0]remove_nan::Bool
: Wether to remove the NaNs from interpolations or not
VortexStepMethod.BodyAerodynamics
— Type@with_kw mutable struct BodyAerodynamics{P}
Main structure for calculating aerodynamic properties of bodies.
Fields
- panels::Vector{Panel}: Vector of Panel structs
- wings::Vector{AbstractWing}: A vector of wings; a body can have multiple wings
_va
::MVec3 = zeros(MVec3): A vector of the apparent wind speed, see: MVec3omega
::MVec3 = zeros(MVec3): A vector of the turn rates around the kite body axesgamma_distribution
::Vector{Float64}=zeros(Float64, P): A vector of the circulation of the velocity field; Length: Number of segments. [m²/s]alpha_uncorrected
::Vector{Float64}=zeros(Float64, P): unclear, please definealpha_corrected
::Vector{Float64}=zeros(Float64, P): unclear, please definestall_angle_list
::Vector{Float64}=zeros(Float64, P): unclear, please define- alpha_array::Vector{Float64} = zeros(Float64, P)
- vaarray::Vector{Float64} = zeros(Float64, P)
- workvectors::NTuple{10,MVec3} = ntuple( -> zeros(MVec3), 10)
- AIC::Array{Float64, 3} = zeros(3, P, P)
- projected_area::Float64 = 1.0: The area projected onto the xy-plane of the kite body reference frame [m²]
The Solver and its results
VortexStepMethod.Solver
— TypeSolver
Main solver structure for the Vortex Step Method.See also: solve
Attributes
General settings
aerodynamic_model_type
::Model = VSM: The model type, see: Model- density::Float64 = 1.225: Air density [kg/m³]
max_iterations
::Int64 = 1500allowed_error
::Float64 = 1e-5: relative errortol_reference_error
::Float64 = 0.001relaxation_factor
::Float64 = 0.03: Relaxation factor for convergence
Damping settings
is_with_artificial_damping
::Bool = false: Whether to apply artificial dampingartificial_damping
::NamedTuple{(:k2, :k4), Tuple{Float64, Float64}} = (k2=0.1, k4=0.0): Artificial damping parameters
Additional settings
type_initial_gamma_distribution
::InitialGammaDistribution = ELLIPTIC: see: InitialGammaDistributioncore_radius_fraction
::Float64 = 1e-20:- mu::Float64 = 1.81e-5: Dynamic viscosity [N·s/m²]
is_only_f_and_gamma_output
::Bool = false: Whether to only output f and gamma
Solution
sol::VSMSolution = VSMSolution(): The result of calling solve!
VortexStepMethod.VSMSolution
— TypeVSMSolution
Struct for storing the solution of the solve! function. Must contain all info needed by KiteModels.jl
.
Attributes
- gamma_distribution::Union{Nothing, Vector{Float64}}: Vector containing the panel circulations
- aero_force::MVec3: Aerodynamic force vector in KB reference frame [N]
- aero_moments::MVec3: Aerodynamic moments [Mx, My, Mz] around the reference point [Nm]
- force_coefficients::MVec3: Aerodynamic force coefficients [CFx, CFy, CFz] [-]
- moment_coefficients::MVec3: Aerodynamic moment coefficients [CMx, CMy, CMz] [-]
- moment_distribution::Vector{Float64}: Pitching moments around the spanwise vector of each panel. [Nm]
- momentcoefficientdistribution::Vector{Float64}: Pitching moment coefficient around the spanwise vector of each panel. [-]
- solver_status::SolverStatus: enum, see SolverStatus