diff --git a/CHANGELOG.md b/CHANGELOG.md index 50169161..63fa6b54 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## Unreleased + +### Fixed + +- The docs define the body frame as KiteUtils' `KA` frame: x from LE to TE, y towards + the right tip, z = x × y up. The separate `KB` definition, whose `Z = Y × X` pointed + down, is gone; the solver's frame is unchanged. CL, CD and CS are documented as + wind-axis coefficients, `cfx`, `cfy` and `cfz` as the body-axis ones. + ## VortexStepMethod v6.0.0 2026-09-23 ### Added diff --git a/README.md b/README.md index 265bbea6..a376ea69 100644 --- a/README.md +++ b/README.md @@ -89,7 +89,7 @@ Three kinds of input data is needed: - kite wing: model of polars included, n sections to define - The airflow and turn rate: - - `va_vec` vector and `omega` (turn rate) vector in Kite Body (KB) reference frame + - `va_vec` vector and `omega` (turn rate) vector in the kite aero body (KA) frame - The configuration: - how many panels diff --git a/docs/src/glossary.md b/docs/src/glossary.md index 0b0409e3..be0f2da1 100644 --- a/docs/src/glossary.md +++ b/docs/src/glossary.md @@ -15,7 +15,7 @@ | beta $\beta$ | Elevation angle of the kite [rad]| | beta\_s $\beta_s$ | Side slip angle [rad] | | delta $\delta$ | Angle of the trailing edge’s deformation relative to the chord [rad] | -| theta $\theta$ | Angle between the panel’s chord and the kite body x-axis, showing twist [rad]| +| theta $\theta$ | Angle between the panel’s chord and the KA body x-axis, showing twist [rad]| | gamma $\Gamma$ |The circulation, which is a measure of the rotational speed of the spinning flow in a vortex [m²/s]. | | CL, cl | Lift coefficient [-] | | CD, cd | Drag coefficient [-] | diff --git a/docs/src/index.md b/docs/src/index.md index bf5a4d6d..1b74a8f6 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -94,7 +94,7 @@ Three kinds of input data is needed: - kite wing: model of polars included, n sections to define - The airflow and turn rate: - - `va_vec` vector and `omega` (turn rate) vector in Kite Body (KB) reference frame + - `va_vec` vector and `omega` (turn rate) vector in the kite aero body (KA) frame - The configuration: - how many panels diff --git a/docs/src/reference_frames.md b/docs/src/reference_frames.md index 04a9f004..d3582844 100644 --- a/docs/src/reference_frames.md +++ b/docs/src/reference_frames.md @@ -11,25 +11,27 @@ Reference frames are needed for following purposes: A geometric model is always created using the CAD reference frame. It can have any origin (with respect to the kite), but usually either the center of gravity of the body or the bridle point/ Kite Control Unit is used. -- Y defined spanwise, looking at the kite from the front (so seeing the LE first) the front left is positive. +- Y is defined spanwise, towards the right tip (seen from the front, the left side). - X is defined chord wise, from LE to TE, positive. - Z is defined as positive upwards. -### Kite Body reference frame (KB) -This is a body-fixed reference frame. -- Y defined spanwise, looking at the kite from the front (so seeing the LE first) the front left is positive. +### Kite aero body frame (KA) +The body-fixed frame of the kite is the **KA** frame of +[KiteUtils.jl](https://github.com/OpenSourceAWE/KiteUtils.jl), aft-right-up: - X is defined chord wise, from LE to TE, positive. -- Z is defined as the cross product of Y and X +- Y is defined spanwise, towards the right tip (seen from the front, the left side). +- Z is defined as the cross product of X and Y, so positive upwards. -The origin of the kite reference frame can be defined by the user by passing the keyword argument `kite_body_origin = ...` to the `BodyAerodynamics` constructor. +The body-axis force components are Fx, Fy and Fz, with the matching coefficients `cfx`, `cfy` and `cfz`. -This reference frame is different from the kite reference frame **K** used in `KiteModels.jl` and `KiteUtils.jl`. +The origin of the KA frame can be defined by the user by passing the keyword argument `kite_body_origin = ...` to the `BodyAerodynamics` constructor. ## The turn rates -The turn rates $\mathrm{omega} = [\mathrm{omega_x}, \mathrm{omega_y} ,\mathrm{omega_z}]$ are defined in the **KB** reference frame. The unit of the components is $\mathrm{rad}~\mathrm{s^{-1}}$. +The turn rates $\mathrm{omega} = [\mathrm{omega_x}, \mathrm{omega_y} ,\mathrm{omega_z}]$ are defined in the **KA** frame. The unit of the components is $\mathrm{rad}~\mathrm{s^{-1}}$. ## Input and output - when running a simulation, the turnrate of the kite must be provided on each time step -- the apparent wind speed vector `va_vec` is defined in the **KB** reference frame -- the resulting forces are defined in the **KB** reference frame -- the **CL**, **CD**, **CS** and the resulting moments and moment coefficients are defined in the **KB** reference frame \ No newline at end of file +- the apparent wind speed vector `va_vec` is defined in the **KA** frame +- the resulting forces are defined in the **KA** frame +- the moments and moment coefficients are defined in the **KA** frame +- **CD** is along the apparent wind, **CL** along `va × y` and **CS** completes the wind axes, so they match Fx, Fz and Fy only at α = β = 0 \ No newline at end of file diff --git a/src/body_aerodynamics.jl b/src/body_aerodynamics.jl index 2ce94f20..bd390826 100644 --- a/src/body_aerodynamics.jl +++ b/src/body_aerodynamics.jl @@ -7,7 +7,7 @@ Main structure for calculating aerodynamic properties of bodies. Use the constru - panels::Vector{<:Panel}: Vector of refined [`Panel`](@ref) structs - wings::Vector{W}: A vector of wings of type `W <: AbstractWing`; a body can have multiple wings - `va_vec::MVec3` = zeros(MVec3): apparent wind vector [m/s], see: [`MVec3`](@ref) -- `omega`::MVec3 = zeros(MVec3): A vector of the turn rates around the kite body axes +- `omega`::MVec3 = zeros(MVec3): A vector of the turn rates around the KA body axes - `reference_point`::MVec3 = zeros(MVec3): The point `omega` turns the body about [m] - `gamma_distribution`=zeros(Float64, P): A vector of the circulation of the velocity field; Length: Number of segments. [m²/s] @@ -26,7 +26,7 @@ Main structure for calculating aerodynamic properties of bodies. Use the constru each `AIC[:, :, k]` slice is a contiguous BLAS matrix - `AIC_aero_center::Array{Float64, 3}` = zeros(P, P, 3): aerodynamic-centre (LLT) influence coefficients, used only for the corrected angle of attack -- `projected_area::Float64` = 1.0: The area projected onto the xy-plane of the kite body reference frame [m²] +- `projected_area::Float64` = 1.0: The area projected onto the xy-plane of the KA body frame [m²] - `c_ref::Float64` = 1.0: Reference chord length (max panel chord) [m] - `cache::Vector{PreallocationTools.LazyBufferCache{typeof(identity), typeof(identity)}}` = [LazyBufferCache() for _ in 1:15] """ @@ -65,9 +65,9 @@ aerodynamic properties, returning a fully initialized structure ready for simula - `wings::Vector{T}`: Vector of wings to analyze, where T is an AbstractWing type # Keyword Arguments -- `kite_body_origin=zeros(MVec3)`: Origin point of kite body reference frame in CAD reference frame +- `kite_body_origin=zeros(MVec3)`: Origin point of the KA body frame in CAD reference frame - `va_vec=[15.0, 0.0, 0.0]`: Apparent wind vector [m/s] -- `omega=zeros(3)`: Turn rate in kite body frame x y and z +- `omega=zeros(3)`: Turn rate about the KA body x, y and z axes # Returns - [`BodyAerodynamics`](@ref) object initialized with panels and wings @@ -303,7 +303,7 @@ Initialize a BodyAerodynamics struct in-place by setting up panels and coefficie # Keyword Arguments - `init_aero::Bool`: Whether to initialize the aero data or not - `va_vec=[15.0, 0.0, 0.0]`: Apparent wind vector [m/s] -- `omega=zeros(3)`: Turn rate in kite body frame x y and z +- `omega=zeros(3)`: Turn rate about the KA body x, y and z axes # Returns nothing @@ -798,7 +798,7 @@ end correct_aoa=false, flow_curvature=false, is_with_viscous_drag_correction=false, v_span_dist=nothing) -Calculate final aerodynamic results. Reference point is in the kite body (KB) frame. +Calculate final aerodynamic results. Reference point is in the kite aero body (KA) frame. `flow_curvature` adds [`flow_curvature_cm`](@ref) to every section moment, read from `body_aero.omega`. `is_with_viscous_drag_correction` adds diff --git a/src/panel.jl b/src/panel.jl index 3f0b413a..3a211857 100644 --- a/src/panel.jl +++ b/src/panel.jl @@ -1,7 +1,8 @@ """ @with_kw mutable struct Panel -Represents a panel in a vortex step method simulation. All points and vectors are in the kite body (KB) frame. +Represents a panel in a vortex step method simulation. All points and vectors are in the +kite aero body (KA) frame. # Fields - `TE_point_1`::MVec3=zeros(MVec3): First trailing edge point diff --git a/src/solver.jl b/src/solver.jl index 7cc8810c..d6f07f34 100644 --- a/src/solver.jl +++ b/src/solver.jl @@ -20,7 +20,7 @@ Struct for storing the solution of the [`solve!`](@ref) function. Must contain a - `f_body_3D`::Matrix{Float64}: Matrix of the aerodynamic forces (x, y, z vectors) [N] - `m_body_3D`::Matrix{Float64}: Matrix of the aerodynamic moments [Nm] - `gamma_distribution`::Union{Nothing, Vector{Float64}}: Vector containing the panel circulations. -- force::MVec3: Aerodynamic force vector in KB reference frame [N] +- force::MVec3: Aerodynamic force vector in the KA frame [N] - moment::MVec3: Aerodynamic moments [Mx, My, Mz] around the reference point [Nm] - force_coeffs::MVec3: Aerodynamic force coefficients [CFx, CFy, CFz] [-] - `moment_coeffs`::MVec3: Aerodynamic moment coefficients [CMx, CMy, CMz] [-] @@ -290,9 +290,9 @@ finite_full(x::ForwardDiff.Dual) = log=false, reference_point=solver.reference_point, moment_frac=0.1, throw_on_fail=false) -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. +Main solving routine for the aerodynamic model. Reference point is in the kite aero body +(KA) 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`](@ref) @@ -592,7 +592,8 @@ end solve(solver::Solver, body_aero::BodyAerodynamics, gamma_distribution=nothing; log=false, reference_point=solver.reference_point) -Main solving routine for the aerodynamic model. Reference point is in the kite body (KB) frame. +Main solving routine for the aerodynamic model. Reference point is in the kite aero body +(KA) frame. See also: [`solve!`](@ref) # Arguments: