From 18a553c021b55f3667e74f95f8180f9b6b8fc462 Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Sun, 10 Mar 2024 22:41:34 +0000 Subject: [PATCH] build based on 832bcd9 --- dev/advanced/index.html | 2 +- dev/examples/index.html | 2 +- dev/examples_4p/index.html | 2 +- dev/functions/index.html | 6 +++--- dev/index.html | 2 +- dev/parameters/index.html | 2 +- dev/quickstart/index.html | 2 +- dev/search/index.html | 2 +- dev/types/index.html | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/dev/advanced/index.html b/dev/advanced/index.html index 82073e06..035e1fde 100644 --- a/dev/advanced/index.html +++ b/dev/advanced/index.html @@ -77,4 +77,4 @@ Average number of callbacks per time step: 481.845 23.901076 seconds (63.42 M allocations: 12.686 GiB, 5.67% gc time, 70.62% compilation time) -julia>

A second run of this command needs about 5.5 s which means the startup time (load and compilation time of the package and the libraries) has been reduced to about 18.4s.

Without a system image the first time execution of the script "simulate.jl" on the same computer is about 71 seconds while the time for the second execution is the same (5.5s). So now about 47s of time are saved after each restart.

Outlook

The next steps:

+julia>

A second run of this command needs about 5.5 s which means the startup time (load and compilation time of the package and the libraries) has been reduced to about 18.4s.

Without a system image the first time execution of the script "simulate.jl" on the same computer is about 71 seconds while the time for the second execution is the same (5.5s). So now about 47s of time are saved after each restart.

Outlook

The next steps:

diff --git a/dev/examples/index.html b/dev/examples/index.html index e91e8cc0..7ebc7409 100644 --- a/dev/examples/index.html +++ b/dev/examples/index.html @@ -51,4 +51,4 @@ 3-element StaticArrays.MVector{3, Float64} with indices SOneTo(3): 12.54966091924401 0.0 - 0.0

Example of reeling out the tether

include("examples/reel_out_1p.jl")

Reel out 1p model

In this example, we first keep the tether length constant and at 15 s start to reel out the winch with an acceleration of 0.1 m/s². At a set speed below 2.2 m/s the brake of the winch is active, therefore the "jump" in the v_reelout at the beginning of the reel-out phase.

It is not a real jump, but a high acceleration compared to the acceleration afterward.

+ 0.0

Example of reeling out the tether

include("examples/reel_out_1p.jl")

Reel out 1p model

In this example, we first keep the tether length constant and at 15 s start to reel out the winch with an acceleration of 0.1 m/s². At a set speed below 2.2 m/s the brake of the winch is active, therefore the "jump" in the v_reelout at the beginning of the reel-out phase.

It is not a real jump, but a high acceleration compared to the acceleration afterward.

diff --git a/dev/examples_4p/index.html b/dev/examples_4p/index.html index acd4bb8c..ce39574e 100644 --- a/dev/examples_4p/index.html +++ b/dev/examples_4p/index.html @@ -64,4 +64,4 @@ 3-element StaticArrays.MVector{3, Float64} with indices SOneTo(3): 12.542508333667467 0.0 - 0.0

Example of reeling out the tether

include("examples/reel_out_4p.jl")

Reel out 4p model

In this example, we first keep the tether length constant and at 15 s start to reel out the winch with an acceleration of 0.1 m/s². At a set speed below 2.2 m/s the brake of the winch is active, therefore the "jump" in the v_reelout at the beginning of the reel-out phase.

It is not a real jump, but a high acceleration compared to the acceleration afterward.

+ 0.0

Example of reeling out the tether

include("examples/reel_out_4p.jl")

Reel out 4p model

In this example, we first keep the tether length constant and at 15 s start to reel out the winch with an acceleration of 0.1 m/s². At a set speed below 2.2 m/s the brake of the winch is active, therefore the "jump" in the v_reelout at the beginning of the reel-out phase.

It is not a real jump, but a high acceleration compared to the acceleration afterward.

diff --git a/dev/functions/index.html b/dev/functions/index.html index 77263dd1..87996fa2 100644 --- a/dev/functions/index.html +++ b/dev/functions/index.html @@ -1,7 +1,7 @@ Functions · KiteModels.jl

Introduction

Most of the functions work on a KPS3 or KPS4 object. For this, the variable s is used. Such a variable can be created with the lines:

using KiteSimulators
 const s = KPS3(KCU(se()))

Or, if you want to use the 4 point kite model:

using KiteSimulators
-const s = KPS4(KCU(se()))

Functions with an "!" as last character of the function name modify one of more of their parameters, in this context mostly the variable s.

Input functions

KiteModels.set_v_reel_out!Function
set_v_reel_out!(s::AKM, v_reel_out, t_0, period_time = 1.0 / s.set.sample_freq)

Setter for the reel-out speed. Must be called on every timestep (before each simulation). It also updates the tether length, therefore it must be called even if v_reel_out has not changed.

  • t_0 the start time of the next timestep relative to the start of the simulation [s]
source
KiteModels.set_depower_steering!Function
set_depower_steering!(s::AKM, depower, steering)

Setter for the depower and steering model inputs.

Parameters:

  • depower: Relative depower, must be between 0 .. 1.0
  • steering: Relative steering, must be between -1.0 .. 1.0.

This function sets the variables s.depower, s.steering and s.alpha_depower.

It takes the depower offset c0 and the dependency of the steering sensitivity from the depower settings into account.

source
KiteModels.set_v_wind_ground!Function
set_v_wind_ground!(s::AKM, height, v_wind_gnd=s.set.v_wind, wind_dir=0.0)

Set the vector of the wind-velocity at the height of the kite. As parameter the height, the ground wind speed [m/s] and the wind direction [radians] are needed. Must be called every at each timestep.

source

Output functions

KiteModels.pos_kiteFunction
pos_kite(s::KPS4)

Return the position of the kite (top particle).

source
pos_kite(s::KPS3)

Return the position of the kite (top particle).

source
KiteModels.calc_heightFunction
calc_height(s::KPS4)

Determine the height of the topmost kite particle above ground.

source
calc_height(s::KPS3)

Determine the height of the kite particle above ground.

source
KiteUtils.calc_courseFunction
calc_course(s::AKM)

Determine the course angle of the kite in radian. Undefined if the velocity of the kite is near zero.

source
KiteModels.winch_forceFunction
winch_force(s::KPS4)

Return the absolute value of the force at the winch as calculated during the last timestep.

source
winch_force(s::KPS3)

Return the absolute value of the force at the winch as calculated during the last timestep.

source
KiteModels.lift_dragFunction
lift_drag(s::AKM)

Return a tuple of the scalar lift and drag forces.

Example:

lift, drag = lift_drag(s)
source
KiteModels.kite_ref_frameFunction
kite_ref_frame(s::KPS4)

Returns a tuple of the x, y, and z vectors of the kite reference frame.

source
kite_ref_frame(s::KPS3)

Returns a tuple of the x, y, and z vectors of the kite reference frame.

source
KiteModels.orient_eulerFunction
orient_euler(s::AKM)

Calculate and return the orientation of the kite in euler angles (roll, pitch, yaw) as SVector.

source
KiteUtils.SysStateType
SysState(s::AKM, zoom=1.0)

Constructor for creating a SysState object from a kite model (KPS3 or KPS4). The SysState object can be used either for logging or for displaying the system state in a viewer. Optionally the position arrays can be zoomed according to the requirements of the viewer.

source

High level simulation interface

KiteModels.init_sim!Function
init_sim!(s; t_end=1.0, stiffness_factor=0.035, prn=false)

Initialises the integrator of the model.

Parameters:

  • s: an instance of an abstract kite model
  • t_end: end time of the simulation; normally not needed
  • stiffness_factor: factor applied to the tether stiffness during initialisation
  • prn: if set to true, print the detailed solver results

Returns: An instance of a DAE integrator.

source
KiteModels.next_step!Function
next_step!(s::AKM, integrator; v_ro = 0.0, v_wind_gnd=s.set.v_wind, wind_dir=0.0, dt=1/s.set.sample_freq)

Calculates the next simulation step.

Parameters:

  • s: an instance of an abstract kite model
  • integrator: an integrator instance as returned by the function init_sim!
  • v_ro: set value of reel out speed in m/s
  • v_wind_gnd: wind speed at reference height in m/s
  • wind_dir: wind direction in radians
  • dt: time step in seconds

Only the first two parameters are required.

Returns: The end time of the time step in seconds.

source

Low level simulation interface

KiteModels.find_steady_state!Function
find_steady_state!(s::KPS4; prn=false, delta = 0.0, stiffness_factor=0.035)

Find an initial equilibrium, based on the inital parameters l_tether, elevation and v_reel_out.

source
find_steady_state!(s::KPS3, prn=false, delta = 0.0, stiffness_factor=0.035)

Find an initial equilibrium, based on the inital parameters l_tether, elevation and v_reel_out.

source
KiteModels.residual!Function
residual!(res, yd, y::MVector{S, SimFloat}, s::KPS4, time) where S
+const s = KPS4(KCU(se()))

Functions with an "!" as last character of the function name modify one of more of their parameters, in this context mostly the variable s.

Input functions

KiteModels.set_v_reel_out!Function
set_v_reel_out!(s::AKM, v_reel_out, t_0, period_time = 1.0 / s.set.sample_freq)

Setter for the reel-out speed. Must be called on every timestep (before each simulation). It also updates the tether length, therefore it must be called even if v_reel_out has not changed.

  • t_0 the start time of the next timestep relative to the start of the simulation [s]
source
KiteModels.set_depower_steering!Function
set_depower_steering!(s::AKM, depower, steering)

Setter for the depower and steering model inputs.

Parameters:

  • depower: Relative depower, must be between 0 .. 1.0
  • steering: Relative steering, must be between -1.0 .. 1.0.

This function sets the variables s.depower, s.steering and s.alpha_depower.

It takes the depower offset c0 and the dependency of the steering sensitivity from the depower settings into account.

source
KiteModels.set_v_wind_ground!Function
set_v_wind_ground!(s::AKM, height, v_wind_gnd=s.set.v_wind, wind_dir=0.0)

Set the vector of the wind-velocity at the height of the kite. As parameter the height, the ground wind speed [m/s] and the wind direction [radians] are needed. Must be called every at each timestep.

source

Output functions

KiteModels.pos_kiteFunction
pos_kite(s::KPS4)

Return the position of the kite (top particle).

source
pos_kite(s::KPS3)

Return the position of the kite (top particle).

source
KiteModels.calc_heightFunction
calc_height(s::KPS4)

Determine the height of the topmost kite particle above ground.

source
calc_height(s::KPS3)

Determine the height of the kite particle above ground.

source
KiteUtils.calc_courseFunction
calc_course(s::AKM)

Determine the course angle of the kite in radian. Undefined if the velocity of the kite is near zero.

source
KiteModels.winch_forceFunction
winch_force(s::KPS4)

Return the absolute value of the force at the winch as calculated during the last timestep.

source
winch_force(s::KPS3)

Return the absolute value of the force at the winch as calculated during the last timestep.

source
KiteModels.lift_dragFunction
lift_drag(s::AKM)

Return a tuple of the scalar lift and drag forces.

Example:

lift, drag = lift_drag(s)
source
KiteModels.kite_ref_frameFunction
kite_ref_frame(s::KPS4)

Returns a tuple of the x, y, and z vectors of the kite reference frame.

source
kite_ref_frame(s::KPS3)

Returns a tuple of the x, y, and z vectors of the kite reference frame.

source
KiteModels.orient_eulerFunction
orient_euler(s::AKM)

Calculate and return the orientation of the kite in euler angles (roll, pitch, yaw) as SVector.

source
KiteUtils.SysStateType
SysState(s::AKM, zoom=1.0)

Constructor for creating a SysState object from a kite model (KPS3 or KPS4). The SysState object can be used either for logging or for displaying the system state in a viewer. Optionally the position arrays can be zoomed according to the requirements of the viewer.

source

High level simulation interface

KiteModels.init_sim!Function
init_sim!(s; t_end=1.0, stiffness_factor=0.035, prn=false)

Initialises the integrator of the model.

Parameters:

  • s: an instance of an abstract kite model
  • t_end: end time of the simulation; normally not needed
  • stiffness_factor: factor applied to the tether stiffness during initialisation
  • prn: if set to true, print the detailed solver results

Returns: An instance of a DAE integrator.

source
KiteModels.next_step!Function
next_step!(s::AKM, integrator; v_ro = 0.0, v_wind_gnd=s.set.v_wind, wind_dir=0.0, dt=1/s.set.sample_freq)

Calculates the next simulation step.

Parameters:

  • s: an instance of an abstract kite model
  • integrator: an integrator instance as returned by the function init_sim!
  • v_ro: set value of reel out speed in m/s
  • v_wind_gnd: wind speed at reference height in m/s
  • wind_dir: wind direction in radians
  • dt: time step in seconds

Only the first two parameters are required.

Returns: The end time of the time step in seconds.

source

Low level simulation interface

KiteModels.find_steady_state!Function
find_steady_state!(s::KPS4; prn=false, delta = 0.0, stiffness_factor=0.035)

Find an initial equilibrium, based on the inital parameters l_tether, elevation and v_reel_out.

source
find_steady_state!(s::KPS3, prn=false, delta = 0.0, stiffness_factor=0.035)

Find an initial equilibrium, based on the inital parameters l_tether, elevation and v_reel_out.

source
KiteModels.residual!Function
residual!(res, yd, y::MVector{S, SimFloat}, s::KPS4, time) where S
 
 N-point tether model, four points for the kite on top:
 Inputs:
@@ -12,7 +12,7 @@
 
 Additional parameters:
 s: Struct with work variables, type KPS4
-S: The dimension of the state vector

The number of the point masses of the model N = S/6, the state of each point is represented by two 3 element vectors.

source
residual!(res, yd, y::MVector{S, SimFloat}, s::KPS3, time) where S
+S: The dimension of the state vector

The number of the point masses of the model N = S/6, the state of each point is represented by two 3 element vectors.

source
residual!(res, yd, y::MVector{S, SimFloat}, s::KPS3, time) where S
 
 N-point tether model, one point kite at the top:
 Inputs:
@@ -23,4 +23,4 @@
 
 Additional parameters:
 s: Struct with work variables, type KPS3
-S: The dimension of the state vector

The number of the point masses of the model N = S/6, the state of each point is represented by two 3 element vectors.

source

Helper functions

KiteModels.copy_binFunction
copy_bin()

Copy the scripts createsysimage and run_julia to the folder "bin" (it will be created if it doesn't exist).

source
KiteModels.calc_dragFunction
calc_drag(s::KPS3, v_segment, unit_vector, rho, last_tether_drag, v_app_perp)

Calculate the drag of one tether segment, result stored in parameter last_tether_drag. Return the norm of the apparent wind velocity.

source
KiteModels.calc_set_cl_cd!Function
calc_set_cl_cd!(s::KPS3, vec_c, v_app)

Calculate the lift over drag ratio as a function of the direction vector of the last tether segment, the current depower setting and the apparent wind speed. Set the calculated CL and CD values in the struct s.

source
KiteModels.calc_aero_forces!Function
calc_aero_forces!(s::KPS4, pos, vel, rho, alpha_depower, rel_steering)

Calculates the aerodynamic forces acting on the kite particles.

Parameters:

  • pos: vector of the particle positions
  • vel: vector of the particle velocities
  • rho: air density [kg/m^3]
  • rel_depower: value between 0.0 and 1.0
  • alpha_depower: depower angle [degrees]
  • rel_steering: value between -1.0 and +1.0

Updates the vector s.forces of the first parameter.

source
KiteModels.calc_particle_forces!Function
calc_particle_forces!(s::KPS4, pos1, pos2, vel1, vel2, spring, segments, d_tether, rho, i)

Calculate the drag force of the tether segment, defined by the parameters pos1, pos2, vel1 and vel2 and distribute it equally on the two particles, that are attached to the segment. The result is stored in the array s.forces.

source
KiteModels.inner_loop!Function
inner_loop!(s::KPS4, pos, vel, v_wind_gnd, segments, d_tether)

Calculate the forces, acting on all particles.

Output:

  • s.forces
  • s.v_wind_tether
source
KiteModels.loop!Function
loop!(s::KPS4, pos, vel, posd, veld)

Calculate the vectors s.res1 and calculate s.res2 using loops that iterate over all tether segments.

source
+S: The dimension of the state vector

The number of the point masses of the model N = S/6, the state of each point is represented by two 3 element vectors.

source

Helper functions

KiteModels.copy_examplesFunction
copy_examples()

Copy the example scripts to the folder "examples" (it will be created if it doesn't exist).

source
KiteModels.copy_binFunction
copy_bin()

Copy the scripts createsysimage and run_julia to the folder "bin" (it will be created if it doesn't exist).

source
KiteModels.calc_dragFunction
calc_drag(s::KPS3, v_segment, unit_vector, rho, last_tether_drag, v_app_perp)

Calculate the drag of one tether segment, result stored in parameter last_tether_drag. Return the norm of the apparent wind velocity.

source
KiteModels.calc_set_cl_cd!Function
calc_set_cl_cd!(s::KPS3, vec_c, v_app)

Calculate the lift over drag ratio as a function of the direction vector of the last tether segment, the current depower setting and the apparent wind speed. Set the calculated CL and CD values in the struct s.

source
KiteModels.calc_aero_forces!Function
calc_aero_forces!(s::KPS4, pos, vel, rho, alpha_depower, rel_steering)

Calculates the aerodynamic forces acting on the kite particles.

Parameters:

  • pos: vector of the particle positions
  • vel: vector of the particle velocities
  • rho: air density [kg/m^3]
  • rel_depower: value between 0.0 and 1.0
  • alpha_depower: depower angle [degrees]
  • rel_steering: value between -1.0 and +1.0

Updates the vector s.forces of the first parameter.

source
KiteModels.calc_particle_forces!Function
calc_particle_forces!(s::KPS4, pos1, pos2, vel1, vel2, spring, segments, d_tether, rho, i)

Calculate the drag force of the tether segment, defined by the parameters pos1, pos2, vel1 and vel2 and distribute it equally on the two particles, that are attached to the segment. The result is stored in the array s.forces.

source
KiteModels.inner_loop!Function
inner_loop!(s::KPS4, pos, vel, v_wind_gnd, segments, d_tether)

Calculate the forces, acting on all particles.

Output:

  • s.forces
  • s.v_wind_tether
source
KiteModels.loop!Function
loop!(s::KPS4, pos, vel, posd, veld)

Calculate the vectors s.res1 and calculate s.res2 using loops that iterate over all tether segments.

source
diff --git a/dev/index.html b/dev/index.html index 7ee2c8bd..02802a42 100644 --- a/dev/index.html +++ b/dev/index.html @@ -1,3 +1,3 @@ Home · KiteModels.jl

KiteModels

Documentation for the package KiteModels.

The model has the following subcomponents, implement in separate packages:

This package is part of Julia Kite Power Tools, which consist of the following packages:

Julia Kite Power Tools

What to install

If you want to run simulations and see the results in 3D, please install the meta package KiteSimulators which contains all other packages. If you are not interested in 3D visualization or control you can just install this package. When you have installed the package KiteSimulators, use the command using KiteSimulators instead of using KiteModels when this is mentioned in the documentation.

Installation

Download Julia 1.9 or later, if you haven't already. You can add KiteModels from Julia's package manager, by typing

using Pkg
-pkg"add KiteModels"

at the Julia prompt. You can run the unit tests with the command:

pkg"test KiteModels"

If you are using Windows, it is suggested to install git and bash, too. This is explained for example here: Julia on Windows .

Provides

The type AbstractKiteModel with the implementation KPS3 and KPS4, representing the one point and four point kite model, together with the high level simulation interface consisting of the functions init_sim! and next_step!. Other kite models can be added inside or outside of this package by implementing the non-generic methods required for an AbstractKiteModel.

Additional functions to provide inputs and outputs of the model on each time step. In particular the constructor SysState can be called once per time step to create a SysState struct for logging or for displaying the state in a viewer. Per time step the residual! function is called as many times as needed to find the solution at the end of the time step. The formulas are based on basic physics and aerodynamics and can be quite simple because a differential algebraic notation is used.

Four point kite power system model

Further reading

These models are described in detail in Dynamic Model of a Pumping Kite Power System.

See also

Author: Uwe Fechner (uwe.fechner.msc@gmail.com)

+pkg"add KiteModels"

at the Julia prompt. You can run the unit tests with the command:

pkg"test KiteModels"

If you are using Windows, it is suggested to install git and bash, too. This is explained for example here: Julia on Windows .

Provides

The type AbstractKiteModel with the implementation KPS3 and KPS4, representing the one point and four point kite model, together with the high level simulation interface consisting of the functions init_sim! and next_step!. Other kite models can be added inside or outside of this package by implementing the non-generic methods required for an AbstractKiteModel.

Additional functions to provide inputs and outputs of the model on each time step. In particular the constructor SysState can be called once per time step to create a SysState struct for logging or for displaying the state in a viewer. Per time step the residual! function is called as many times as needed to find the solution at the end of the time step. The formulas are based on basic physics and aerodynamics and can be quite simple because a differential algebraic notation is used.

Four point kite power system model

Further reading

These models are described in detail in Dynamic Model of a Pumping Kite Power System.

See also

Author: Uwe Fechner (uwe.fechner.msc@gmail.com)

diff --git a/dev/parameters/index.html b/dev/parameters/index.html index 71cad990..60cadc53 100644 --- a/dev/parameters/index.html +++ b/dev/parameters/index.html @@ -65,4 +65,4 @@ rho_0: 1.225 # air density at the ground or zero [kg/m³] alpha: 0.08163 # exponent of the wind profile law z0: 0.0002 # surface roughness [m] - profile_law: 6 # 1=EXP, 2=LOG, 3=EXPLOG, 4=FAST_EXP, 5=FAST_LOG, 6=FAST_EXPLOG + profile_law: 6 # 1=EXP, 2=LOG, 3=EXPLOG, 4=FAST_EXP, 5=FAST_LOG, 6=FAST_EXPLOG diff --git a/dev/quickstart/index.html b/dev/quickstart/index.html index 86c535dc..a416a2d9 100644 --- a/dev/quickstart/index.html +++ b/dev/quickstart/index.html @@ -29,4 +29,4 @@ PRINT = false STATISTIC = false

Now you can quit Julia with the command exit(). If you want to launch Julia again, be sure to be in the correct folder and then type julia --project. Without the parameter --project it will not load your project settings.

The first run of the script will be slow because Julia must compile the code. The second and any further run is very fast, but only as long as you do not leave your Julia session.

Comparing the one-point and the four-point kite model

Start Julia in the project folder you created before:

cd test
 julia --project

and then execute the command

using KiteModels
-include("examples/compare_kps3_kps4.jl")

Use the command include("examples\\compare_kps3_kps4.jl") on Windows.

The last view of the animation should look like this:

Initial State

You can save what you see with the command savefig("kite.png").

Exercise

Modify the variable ALPHA_ZERO in line 11 of the script until the lift force of the 1 point model and the 4 point model match.

Questions?

If you have any questions, please ask in the Julia Discourse forum in the section modelling and simulation , or in in the section First steps . The Julia community is very friendly and responsive.

+include("examples/compare_kps3_kps4.jl")

Use the command include("examples\\compare_kps3_kps4.jl") on Windows.

The last view of the animation should look like this:

Initial State

You can save what you see with the command savefig("kite.png").

Exercise

Modify the variable ALPHA_ZERO in line 11 of the script until the lift force of the 1 point model and the 4 point model match.

Questions?

If you have any questions, please ask in the Julia Discourse forum in the section modelling and simulation , or in in the section First steps . The Julia community is very friendly and responsive.

diff --git a/dev/search/index.html b/dev/search/index.html index 6ada66f2..fd7e0f08 100644 --- a/dev/search/index.html +++ b/dev/search/index.html @@ -1,2 +1,2 @@ -Search · KiteModels.jl

Loading search...

    +Search · KiteModels.jl

    Loading search...

      diff --git a/dev/types/index.html b/dev/types/index.html index d0e2299d..71a38b6c 100644 --- a/dev/types/index.html +++ b/dev/types/index.html @@ -1,2 +1,2 @@ -Types · KiteModels.jl

      Exported Types

      Basic types

      KiteModels.SimFloatType
      const SimFloat = Float64

      This type is used for all real variables, used in the Simulation. Possible alternatives: Float32, Double64, Dual Other types than Float64 or Float32 do require support of Julia types by the solver.

      source
      KiteModels.KVec3Type

      const KVec3 = MVector{3, SimFloat}

      Basic 3-dimensional vector, stack allocated, mutable.

      source
      KiteModels.SVec3Type

      const SVec3 = SVector{3, SimFloat}

      Basic 3-dimensional vector, stack allocated, immutable.

      source
      KiteModels.AbstractKiteModelType
      abstract type AbstractKiteModel

      All kite models must inherit from this type. All methods that are defined on this type must work with all kite models. All exported methods must work on this type.

      source

      Struct KPS3 and KPS4

      KiteModels.KPS3Type
      mutable struct KPS3{S, T, P} <: AbstractKiteModel

      State of the kite power system. Parameters:

      • S: Scalar type, e.g. SimFloat In the documentation mentioned as Any, but when used in this module it is always SimFloat and not Any.
      • T: Vector type, e.g. MVector{3, SimFloat}
      • P: number of points of the system, segments+1

      Normally a user of this package will not have to access any of the members of this type directly, use the input and output functions instead.

      • set::Settings: Reference to the settings struct Default: se()

      • kcu::KCU: Reference to the KCU model (Kite Control Unit as implemented in the package KitePodModels Default: KCU()

      • am::AtmosphericModel: Reference to the atmospheric model as implemented in the package AtmosphericModels Default: AtmosphericModel()

      • wm::AbstractWinchModel: Reference to winch model as implemented in the package WinchModels Default: AsyncMachine()

      • iter::Int64: Iterations, number of calls to the function residual! Default: 0

      • calc_cl::Any: Function for calculation the lift coefficent, using a spline based on the provided value pairs. Default: Spline1D((se()).alphacl, (se()).cllist)

      • calc_cd::Any: Function for calculation the drag coefficent, using a spline based on the provided value pairs. Default: Spline1D((se()).alphacd, (se()).cdlist)

      • v_wind::Any: wind vector at the height of the kite Default: zeros(S, 3)

      • v_wind_gnd::Any: wind vector at reference height Default: zeros(S, 3)

      • v_wind_tether::Any: wind vector used for the calculation of the tether drag Default: zeros(S, 3)

      • v_apparent::Any: apparent wind vector at the kite Default: zeros(S, 3)

      • v_app_perp::Any: vector, perpendicular to vapparent; output of calcdrag Default: zeros(S, 3)

      • drag_force::Any: drag force of kite and bridle; output of calcaeroforces Default: zeros(S, 3)

      • lift_force::Any: lift force of the kite; output of calcaeroforces Default: zeros(S, 3)

      • steering_force::Any: steering force acting on the kite; output of calcaeroforces Default: zeros(S, 3)

      • last_force::Any: Default: zeros(S, 3)

      • spring_force::Any: spring force of the current tether segment, output of calc_res Default: zeros(S, 3)

      • total_forces::Any: Default: zeros(S, 3)

      • force::Any: sum of spring and drag forces acting on the current segment, output of calc_res Default: zeros(S, 3)

      • unit_vector::Any: unit vector in the direction of the current tether segment, output of calc_res Default: zeros(S, 3)

      • av_vel::Any: average velocity of the current tether segment, output of calc_res Default: zeros(S, 3)

      • kite_y::Any: y-vector of the kite fixed referense frame, output of calcaeroforces Default: zeros(S, 3)

      • segment::Any: vector representing one tether segment (p1-p2) Default: zeros(S, 3)

      • last_tether_drag::Any: vector of the drag force of the last calculated tether segment Default: zeros(S, 3)

      • vec_z::Any: z vector of the kite reference frame Default: zeros(S, 3)

      • res1::StaticArraysCore.SVector{P, StaticArraysCore.MVector{3, Float64}} where P: part one of the residual, difference between pos' and vel, non-flat, mainly for unit testing Default: zeros(SVector{P, KVec3})

      • res2::StaticArraysCore.SVector{P, StaticArraysCore.MVector{3, Float64}} where P: part two of the residual, difference between vel' and acc, non-flat, mainly for unit testing Default: zeros(SVector{P, KVec3})

      • pos::StaticArraysCore.SVector{P, StaticArraysCore.MVector{3, Float64}} where P: vector of the positions of the particles Default: zeros(SVector{P, KVec3})

      • vel_kite::Any: velocity vector of the kite Default: zeros(S, 3)

      • seg_area::Any: area of one tether segment [m²] Default: zero(S)

      • bridle_area::Any: total actual bridle area [m²] Default: zero(S)

      • c_spring::Any: spring constant, depending on the length of the tether segment Default: zero(S)

      • segment_length::Any: unstressed segment length [m] Default: 0.0

      • damping::Any: damping factor, depending on the length of the tether segment Default: zero(S)

      • last_v_app_norm_tether::Any: last norm of the apparent wind speed at a tether segment [m/s] Default: zero(S)

      • param_cl::Any: lift coefficient of the kite, depending on the angle of attack Default: 0.2

      • param_cd::Any: drag coefficient of the kite, depending on the angle of attack Default: 1.0

      • cor_steering::Any: correction term for the steering, in paper named i_(s,c), Eq. 30 Default: zero(S)

      • psi::Any: azimuth angle in radian; inital value is zero Default: zero(S)

      • beta::Any: elevation angle in radian; initial value about 70 degrees Default: deg2rad((se()).elevation)

      • alpha_depower::Any: depower angle [deg] Default: 0.0

      • t_0::Any: relative start time of the current time interval Default: 0.0

      • v_reel_out::Any: reel out speed of the winch [m/s] Default: 0.0

      • last_v_reel_out::Any: reel out speed during the last time step Default: 0.0

      • l_tether::Any: unstretched tether length Default: 0.0

      • rho::Any: air density at the height of the kite Default: 0.0

      • depower::Any: actual relative depower setting, must be between 0 .. 1.0 Default: 0.0

      • steering::Any: actual relative steering setting, must be between -1.0 .. 1.0 Default: 0.0

      • stiffness_factor::Any: factor for the tether stiffness, used to find the steady state with a low stiffness first Default: 1.0

      • log_href_over_z0::Any: pre-calculated constant for the wind profile law calcuation Default: log((se()).h_ref / (se()).z0)

      • initial_masses::StaticArraysCore.MVector{P, S} where {S, P}: initial masses of the point masses Default: ones(P)

      • masses::StaticArraysCore.MVector{P, S} where {S, P}: current masses, depending on the total tether length Default: ones(P)

      • forces::StaticArraysCore.SVector{P, StaticArraysCore.MVector{3, Float64}} where P: vector of the forces, acting on the particles Default: zeros(SVector{P, KVec3})

      • sync_speed::Any: synchronous speed of the motor/ generator Default: 0.0

      source
      KiteModels.KPS4Type
      mutable struct KPS4{S, T, P, Q, SP} <: AbstractKiteModel

      State of the kite power system, using a 4 point kite model. Parameters:

      • S: Scalar type, e.g. SimFloat In the documentation mentioned as Any, but when used in this module it is always SimFloat and not Any.
      • T: Vector type, e.g. MVector{3, SimFloat}
      • P: number of points of the system, segments+1
      • Q: number of springs in the system, P-1
      • SP: struct type, describing a spring

      Normally a user of this package will not have to access any of the members of this type directly, use the input and output functions instead.

      • set::Settings: Reference to the settings struct Default: se()

      • kcu::KCU: Reference to the KCU model (Kite Control Unit as implemented in the package KitePodModels Default: KCU()

      • am::AtmosphericModel: Reference to the atmospheric model as implemented in the package AtmosphericModels Default: AtmosphericModel()

      • wm::AbstractWinchModel: Reference to winch model as implemented in the package WinchModels Default: AsyncMachine()

      • iter::Int64: Iterations, number of calls to the function residual! Default: 0

      • calc_cl::Any: Function for calculation the lift coefficent, using a spline based on the provided value pairs. Default: Spline1D((se()).alphacl, (se()).cllist)

      • calc_cd::Any: Function for calculation the drag coefficent, using a spline based on the provided value pairs. Default: Spline1D((se()).alphacd, (se()).cdlist)

      • v_wind::Any: wind vector at the height of the kite Default: zeros(S, 3)

      • v_wind_gnd::Any: wind vector at reference height Default: zeros(S, 3)

      • v_wind_tether::Any: wind vector used for the calculation of the tether drag Default: zeros(S, 3)

      • v_apparent::Any: apparent wind vector at the kite Default: zeros(S, 3)

      • drag_force::Any: drag force of kite and bridle; output of calcaeroforces! Default: zeros(S, 3)

      • lift_force::Any: lift force of the kite; output of calcaeroforces! Default: zeros(S, 3)

      • spring_force::Any: spring force of the current tether segment, output of calcparticleforces! Default: zeros(S, 3)

      • last_force::Any: last winch force Default: zeros(S, 3)

      • res1::StaticArraysCore.SVector{P, StaticArraysCore.MVector{3, Float64}} where P: a copy of the residual one (pos,vel) for debugging and unit tests Default: zeros(SVector{P, KVec3})

      • res2::StaticArraysCore.SVector{P, StaticArraysCore.MVector{3, Float64}} where P: a copy of the residual two (vel,acc) for debugging and unit tests Default: zeros(SVector{P, KVec3})

      • pos::StaticArraysCore.SVector{P, StaticArraysCore.MVector{3, Float64}} where P: a copy of the actual positions as output for the user Default: zeros(SVector{P, KVec3})

      • vel_kite::Any: velocity vector of the kite Default: zeros(S, 3)

      • segment_length::Any: unstressed segment length [m] Default: 0.0

      • param_cl::Any: lift coefficient of the kite, depending on the angle of attack Default: 0.2

      • param_cd::Any: drag coefficient of the kite, depending on the angle of attack Default: 1.0

      • psi::Any: azimuth angle in radian; inital value is zero Default: zero(S)

      • alpha_depower::Any: depower angle [deg] Default: 0.0

      • t_0::Any: relative start time of the current time interval Default: 0.0

      • v_reel_out::Any: reel out speed of the winch Default: 0.0

      • last_v_reel_out::Any: reel out speed at the last time step Default: 0.0

      • l_tether::Any: unstretched tether length Default: 0.0

      • rho::Any: air density at the height of the kite Default: 0.0

      • depower::Any: actual relative depower setting, must be between 0 .. 1.0 Default: 0.0

      • steering::Any: actual relative steering setting, must be between -1.0 .. 1.0 Default: 0.0

      • stiffness_factor::Any: multiplier for the stiffniss of tether and bridle Default: 1.0

      • initial_masses::StaticArraysCore.MVector{P, S} where {S, P}: initial masses of the point masses Default: ones(P)

      • masses::StaticArraysCore.MVector{P, S} where {S, P}: current masses, depending on the total tether length Default: zeros(P)

      • springs::StaticArraysCore.MVector: vector of the springs, defined as struct Default: zeros(SP, Q)

      • forces::StaticArraysCore.SVector{P, StaticArraysCore.MVector{3, Float64}} where P: vector of the forces, acting on the particles Default: zeros(SVector{P, KVec3})

      • sync_speed::Any: synchronous speed of the motor/ generator Default: 0.0

      • x::Any: x vector of kite reference frame Default: zeros(S, 3)

      • y::Any: y vector of kite reference frame Default: zeros(S, 3)

      • z::Any: z vector of kite reference frame Default: zeros(S, 3)

      source

      These structs store the state of the one point model and four point model. Only in unit tests it is allowed to access the members directly, otherwise use the input and output functions.

      +Types · KiteModels.jl

      Exported Types

      Basic types

      KiteModels.SimFloatType
      const SimFloat = Float64

      This type is used for all real variables, used in the Simulation. Possible alternatives: Float32, Double64, Dual Other types than Float64 or Float32 do require support of Julia types by the solver.

      source
      KiteModels.KVec3Type

      const KVec3 = MVector{3, SimFloat}

      Basic 3-dimensional vector, stack allocated, mutable.

      source
      KiteModels.SVec3Type

      const SVec3 = SVector{3, SimFloat}

      Basic 3-dimensional vector, stack allocated, immutable.

      source
      KiteModels.AbstractKiteModelType
      abstract type AbstractKiteModel

      All kite models must inherit from this type. All methods that are defined on this type must work with all kite models. All exported methods must work on this type.

      source

      Struct KPS3 and KPS4

      KiteModels.KPS3Type
      mutable struct KPS3{S, T, P} <: AbstractKiteModel

      State of the kite power system. Parameters:

      • S: Scalar type, e.g. SimFloat In the documentation mentioned as Any, but when used in this module it is always SimFloat and not Any.
      • T: Vector type, e.g. MVector{3, SimFloat}
      • P: number of points of the system, segments+1

      Normally a user of this package will not have to access any of the members of this type directly, use the input and output functions instead.

      • set::Settings: Reference to the settings struct Default: se()

      • kcu::KCU: Reference to the KCU model (Kite Control Unit as implemented in the package KitePodModels Default: KCU()

      • am::AtmosphericModel: Reference to the atmospheric model as implemented in the package AtmosphericModels Default: AtmosphericModel()

      • wm::AbstractWinchModel: Reference to winch model as implemented in the package WinchModels Default: AsyncMachine()

      • iter::Int64: Iterations, number of calls to the function residual! Default: 0

      • calc_cl::Any: Function for calculation the lift coefficent, using a spline based on the provided value pairs. Default: Spline1D((se()).alphacl, (se()).cllist)

      • calc_cd::Any: Function for calculation the drag coefficent, using a spline based on the provided value pairs. Default: Spline1D((se()).alphacd, (se()).cdlist)

      • v_wind::Any: wind vector at the height of the kite Default: zeros(S, 3)

      • v_wind_gnd::Any: wind vector at reference height Default: zeros(S, 3)

      • v_wind_tether::Any: wind vector used for the calculation of the tether drag Default: zeros(S, 3)

      • v_apparent::Any: apparent wind vector at the kite Default: zeros(S, 3)

      • v_app_perp::Any: vector, perpendicular to vapparent; output of calcdrag Default: zeros(S, 3)

      • drag_force::Any: drag force of kite and bridle; output of calcaeroforces Default: zeros(S, 3)

      • lift_force::Any: lift force of the kite; output of calcaeroforces Default: zeros(S, 3)

      • steering_force::Any: steering force acting on the kite; output of calcaeroforces Default: zeros(S, 3)

      • last_force::Any: Default: zeros(S, 3)

      • spring_force::Any: spring force of the current tether segment, output of calc_res Default: zeros(S, 3)

      • total_forces::Any: Default: zeros(S, 3)

      • force::Any: sum of spring and drag forces acting on the current segment, output of calc_res Default: zeros(S, 3)

      • unit_vector::Any: unit vector in the direction of the current tether segment, output of calc_res Default: zeros(S, 3)

      • av_vel::Any: average velocity of the current tether segment, output of calc_res Default: zeros(S, 3)

      • kite_y::Any: y-vector of the kite fixed referense frame, output of calcaeroforces Default: zeros(S, 3)

      • segment::Any: vector representing one tether segment (p1-p2) Default: zeros(S, 3)

      • last_tether_drag::Any: vector of the drag force of the last calculated tether segment Default: zeros(S, 3)

      • vec_z::Any: z vector of the kite reference frame Default: zeros(S, 3)

      • res1::StaticArraysCore.SVector{P, StaticArraysCore.MVector{3, Float64}} where P: part one of the residual, difference between pos' and vel, non-flat, mainly for unit testing Default: zeros(SVector{P, KVec3})

      • res2::StaticArraysCore.SVector{P, StaticArraysCore.MVector{3, Float64}} where P: part two of the residual, difference between vel' and acc, non-flat, mainly for unit testing Default: zeros(SVector{P, KVec3})

      • pos::StaticArraysCore.SVector{P, StaticArraysCore.MVector{3, Float64}} where P: vector of the positions of the particles Default: zeros(SVector{P, KVec3})

      • vel_kite::Any: velocity vector of the kite Default: zeros(S, 3)

      • seg_area::Any: area of one tether segment [m²] Default: zero(S)

      • bridle_area::Any: total actual bridle area [m²] Default: zero(S)

      • c_spring::Any: spring constant, depending on the length of the tether segment Default: zero(S)

      • segment_length::Any: unstressed segment length [m] Default: 0.0

      • damping::Any: damping factor, depending on the length of the tether segment Default: zero(S)

      • last_v_app_norm_tether::Any: last norm of the apparent wind speed at a tether segment [m/s] Default: zero(S)

      • param_cl::Any: lift coefficient of the kite, depending on the angle of attack Default: 0.2

      • param_cd::Any: drag coefficient of the kite, depending on the angle of attack Default: 1.0

      • cor_steering::Any: correction term for the steering, in paper named i_(s,c), Eq. 30 Default: zero(S)

      • psi::Any: azimuth angle in radian; inital value is zero Default: zero(S)

      • beta::Any: elevation angle in radian; initial value about 70 degrees Default: deg2rad((se()).elevation)

      • alpha_depower::Any: depower angle [deg] Default: 0.0

      • t_0::Any: relative start time of the current time interval Default: 0.0

      • v_reel_out::Any: reel out speed of the winch [m/s] Default: 0.0

      • last_v_reel_out::Any: reel out speed during the last time step Default: 0.0

      • l_tether::Any: unstretched tether length Default: 0.0

      • rho::Any: air density at the height of the kite Default: 0.0

      • depower::Any: actual relative depower setting, must be between 0 .. 1.0 Default: 0.0

      • steering::Any: actual relative steering setting, must be between -1.0 .. 1.0 Default: 0.0

      • stiffness_factor::Any: factor for the tether stiffness, used to find the steady state with a low stiffness first Default: 1.0

      • log_href_over_z0::Any: pre-calculated constant for the wind profile law calcuation Default: log((se()).h_ref / (se()).z0)

      • initial_masses::StaticArraysCore.MVector{P, S} where {S, P}: initial masses of the point masses Default: ones(P)

      • masses::StaticArraysCore.MVector{P, S} where {S, P}: current masses, depending on the total tether length Default: ones(P)

      • forces::StaticArraysCore.SVector{P, StaticArraysCore.MVector{3, Float64}} where P: vector of the forces, acting on the particles Default: zeros(SVector{P, KVec3})

      • sync_speed::Any: synchronous speed of the motor/ generator Default: 0.0

      source
      KiteModels.KPS4Type
      mutable struct KPS4{S, T, P, Q, SP} <: AbstractKiteModel

      State of the kite power system, using a 4 point kite model. Parameters:

      • S: Scalar type, e.g. SimFloat In the documentation mentioned as Any, but when used in this module it is always SimFloat and not Any.
      • T: Vector type, e.g. MVector{3, SimFloat}
      • P: number of points of the system, segments+1
      • Q: number of springs in the system, P-1
      • SP: struct type, describing a spring

      Normally a user of this package will not have to access any of the members of this type directly, use the input and output functions instead.

      • set::Settings: Reference to the settings struct Default: se()

      • kcu::KCU: Reference to the KCU model (Kite Control Unit as implemented in the package KitePodModels Default: KCU()

      • am::AtmosphericModel: Reference to the atmospheric model as implemented in the package AtmosphericModels Default: AtmosphericModel()

      • wm::AbstractWinchModel: Reference to winch model as implemented in the package WinchModels Default: AsyncMachine()

      • iter::Int64: Iterations, number of calls to the function residual! Default: 0

      • calc_cl::Any: Function for calculation the lift coefficent, using a spline based on the provided value pairs. Default: Spline1D((se()).alphacl, (se()).cllist)

      • calc_cd::Any: Function for calculation the drag coefficent, using a spline based on the provided value pairs. Default: Spline1D((se()).alphacd, (se()).cdlist)

      • v_wind::Any: wind vector at the height of the kite Default: zeros(S, 3)

      • v_wind_gnd::Any: wind vector at reference height Default: zeros(S, 3)

      • v_wind_tether::Any: wind vector used for the calculation of the tether drag Default: zeros(S, 3)

      • v_apparent::Any: apparent wind vector at the kite Default: zeros(S, 3)

      • drag_force::Any: drag force of kite and bridle; output of calcaeroforces! Default: zeros(S, 3)

      • lift_force::Any: lift force of the kite; output of calcaeroforces! Default: zeros(S, 3)

      • spring_force::Any: spring force of the current tether segment, output of calcparticleforces! Default: zeros(S, 3)

      • last_force::Any: last winch force Default: zeros(S, 3)

      • res1::StaticArraysCore.SVector{P, StaticArraysCore.MVector{3, Float64}} where P: a copy of the residual one (pos,vel) for debugging and unit tests Default: zeros(SVector{P, KVec3})

      • res2::StaticArraysCore.SVector{P, StaticArraysCore.MVector{3, Float64}} where P: a copy of the residual two (vel,acc) for debugging and unit tests Default: zeros(SVector{P, KVec3})

      • pos::StaticArraysCore.SVector{P, StaticArraysCore.MVector{3, Float64}} where P: a copy of the actual positions as output for the user Default: zeros(SVector{P, KVec3})

      • vel_kite::Any: velocity vector of the kite Default: zeros(S, 3)

      • segment_length::Any: unstressed segment length [m] Default: 0.0

      • param_cl::Any: lift coefficient of the kite, depending on the angle of attack Default: 0.2

      • param_cd::Any: drag coefficient of the kite, depending on the angle of attack Default: 1.0

      • psi::Any: azimuth angle in radian; inital value is zero Default: zero(S)

      • alpha_depower::Any: depower angle [deg] Default: 0.0

      • t_0::Any: relative start time of the current time interval Default: 0.0

      • v_reel_out::Any: reel out speed of the winch Default: 0.0

      • last_v_reel_out::Any: reel out speed at the last time step Default: 0.0

      • l_tether::Any: unstretched tether length Default: 0.0

      • rho::Any: air density at the height of the kite Default: 0.0

      • depower::Any: actual relative depower setting, must be between 0 .. 1.0 Default: 0.0

      • steering::Any: actual relative steering setting, must be between -1.0 .. 1.0 Default: 0.0

      • stiffness_factor::Any: multiplier for the stiffniss of tether and bridle Default: 1.0

      • initial_masses::StaticArraysCore.MVector{P, S} where {S, P}: initial masses of the point masses Default: ones(P)

      • masses::StaticArraysCore.MVector{P, S} where {S, P}: current masses, depending on the total tether length Default: zeros(P)

      • springs::StaticArraysCore.MVector: vector of the springs, defined as struct Default: zeros(SP, Q)

      • forces::StaticArraysCore.SVector{P, StaticArraysCore.MVector{3, Float64}} where P: vector of the forces, acting on the particles Default: zeros(SVector{P, KVec3})

      • sync_speed::Any: synchronous speed of the motor/ generator Default: 0.0

      • x::Any: x vector of kite reference frame Default: zeros(S, 3)

      • y::Any: y vector of kite reference frame Default: zeros(S, 3)

      • z::Any: z vector of kite reference frame Default: zeros(S, 3)

      source

      These structs store the state of the one point model and four point model. Only in unit tests it is allowed to access the members directly, otherwise use the input and output functions.