From c3280178967d9784b398678ff102fc2f93b96c10 Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Thu, 29 Aug 2024 12:44:03 +0000 Subject: [PATCH] build based on 8b4f1c3 --- dev/advanced/index.html | 2 +- dev/examples/index.html | 2 +- dev/examples_4p/index.html | 2 +- dev/functions/index.html | 12 ++++++------ 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, 14 insertions(+), 14 deletions(-) diff --git a/dev/advanced/index.html b/dev/advanced/index.html index b671f3b1..29643d01 100644 --- a/dev/advanced/index.html +++ b/dev/advanced/index.html @@ -79,4 +79,4 @@ 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_simple.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.

Hints for Developers

Coding style

Bad: norm1 .~ norm(segment) Good: norm1 ~ norm(segment)

    tether_rhs        = [force_eqs[j, i].rhs for j in 1:3]
     kite_rhs          = [force_eqs[j, i+3].rhs for j in 1:3]
-    f_xy              = dot(tether_rhs, e_z) * e_z

Outlook

The next steps:

+ f_xy = dot(tether_rhs, e_z) * e_z

Outlook

The next steps:

diff --git a/dev/examples/index.html b/dev/examples/index.html index 142a3043..c1798e5c 100644 --- a/dev/examples/index.html +++ b/dev/examples/index.html @@ -50,4 +50,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 80636e5a..da06f12c 100644 --- a/dev/examples_4p/index.html +++ b/dev/examples_4p/index.html @@ -63,4 +63,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 d9c79f20..62bde96d 100644 --- a/dev/functions/index.html +++ b/dev/functions/index.html @@ -1,11 +1,11 @@ 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_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.unstretched_lengthFunction
unstretched_length(s::KPS4_3L)

Getter for the unstretched tether reel-out lenght (at zero force).

source
unstretched_length(s::AKM)

Getter for the unstretched tether reel-out lenght (at zero force).

source
KiteModels.tether_lengthFunction
tether_length(s::KPS4_3L)

Calculate and return the real, stretched tether lenght.

source
tether_length(s::AKM)

Calculate and return the real, stretched tether lenght.

source
KiteModels.pos_kiteFunction
pos_kite(s::KPS4)

Return the position of the kite (top particle).

source
pos_kite(s::KPS4_3L)

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::KPS4_3L)

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::KPS4_3L)

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::KPS4_3L)

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, delta=0.01, 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
  • delta: initial stretch of the tether during the steady state calculation
  • prn: if set to true, print the detailed solver results
  • steadystatehistory: an instance of SteadyStateHistory containing old pairs of AKM objects and integrators

Returns: An instance of a DAE integrator.

source
KiteModels.next_step!Function
next_step!(s::AKM, integrator; set_speed = nothing, set_torque=nothing, 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!
  • set_speed: set value of reel out speed in m/s or nothing
  • set_torque: set value of the torque in Nm or nothing
  • v_wind_gnd: wind speed at reference height in m/s
  • wind_dir: wind direction in radians
  • dt: time step in seconds

Either a value for set_speed or for set_torque required.

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

source

Low level simulation interface

KiteModels.clear!Function
clear!(s::KPS4)

Initialize the kite power model.

source
clear!(s::KPS4_3L)

Initialize the kite power model.

source
clear!(s::KPS3)

Initialize the kite power model.

source
KiteModels.find_steady_state!Function
find_steady_state!(s::KPS4; prn=false, delta = 0.01, 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::KPS4_3L; prn=false, delta = 0.0, stiffness_factor=0.035)

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

X00: parameters that change the shape of the kite system. There are s.set.segments*4+5 params in total
+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_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.unstretched_lengthFunction
unstretched_length(s::KPS4_3L)

Getter for the unstretched tether reel-out lenght (at zero force).

source
unstretched_length(s::AKM)

Getter for the unstretched tether reel-out lenght (at zero force).

source
KiteModels.tether_lengthFunction
tether_length(s::KPS4_3L)

Calculate and return the real, stretched tether lenght.

source
tether_length(s::AKM)

Calculate and return the real, stretched tether lenght.

source
KiteModels.pos_kiteFunction
pos_kite(s::KPS4)

Return the position of the kite (top particle).

source
pos_kite(s::KPS4_3L)

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::KPS4_3L)

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::KPS4_3L)

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::KPS4_3L)

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, delta=0.01, 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
  • delta: initial stretch of the tether during the steady state calculation
  • prn: if set to true, print the detailed solver results
  • steadystatehistory: an instance of SteadyStateHistory containing old pairs of AKM objects and integrators

Returns: An instance of a DAE integrator.

source
KiteModels.next_step!Function
next_step!(s::AKM, integrator; set_speed = nothing, set_torque=nothing, 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!
  • set_speed: set value of reel out speed in m/s or nothing
  • set_torque: set value of the torque in Nm or nothing
  • v_wind_gnd: wind speed at reference height in m/s
  • wind_dir: wind direction in radians
  • dt: time step in seconds

Either a value for set_speed or for set_torque required.

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

source

Low level simulation interface

KiteModels.clear!Function
clear!(s::KPS4)

Initialize the kite power model.

source
clear!(s::KPS4_3L)

Initialize the kite power model.

source
clear!(s::KPS3)

Initialize the kite power model.

source
KiteModels.find_steady_state!Function
find_steady_state!(s::KPS4; prn=false, delta = 0.01, 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::KPS4_3L; prn=false, delta = 0.0, stiffness_factor=0.035)

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

X00: parameters that change the shape of the kite system. There are s.set.segments*4+5 params in total
     - s.set.segments*2 parameters for middle_tether
     - 5 parameters for bridlepoints
-    - s.set.segments*2 parameters for left_tether
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
+    - s.set.segments*2 parameters for left_tether
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:
@@ -16,7 +16,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::KPS4, 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::KPS4, time) where S
 
 N-point tether model, four points for the kite on top:
 Inputs:
@@ -32,7 +32,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:
@@ -43,4 +43,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
calc_aero_forces!(s::KPS4_3L, pos, vel)

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
calc_particle_forces!(s::KPS4_3L, pos1, pos2, vel1, vel2, spring, d_tether, rho, i)

Calculate the drag force and spring 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
inner_loop!(s::KPS4_3L, pos, vel, v_wind_gnd, segments, d_tether)

Calculate the forces, acting on all particles.

Output:

  • s.forces
  • s.vwindtether
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
loop!(s::KPS4_3L, pos, vel, posd, veld)

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

source
KiteModels.save_historyFunction
save_history(history::SteadyStateHistory)

Save the staty state history to the file data/.steady_state_history.bin. The history is used to speed up the initialisation.

In order to delete the integrator history: just delete the file data/.steady_state_history.bin .

source
KiteModels.load_historyFunction
load_history()

Load the saved pairs of abstract kite models and corresponding integrators. It is assumed that a certain set of settings always leads to the same integrator.

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 all 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
calc_aero_forces!(s::KPS4_3L, pos, vel)

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
calc_particle_forces!(s::KPS4_3L, pos1, pos2, vel1, vel2, spring, d_tether, rho, i)

Calculate the drag force and spring 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.fields_equalFunction
fields_equal(a::AKM, b::AKM)

Helper function for the init_sim!() function. It compares the fields of two instances of the AbstractKiteModel.

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
inner_loop!(s::KPS4_3L, pos, vel, v_wind_gnd, segments, d_tether)

Calculate the forces, acting on all particles.

Output:

  • s.forces
  • s.vwindtether
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
loop!(s::KPS4_3L, pos, vel, posd, veld)

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

source
KiteModels.save_historyFunction
save_history(history::SteadyStateHistory)

Save the staty state history to the file data/.steady_state_history.bin. The history is used to speed up the initialisation.

In order to delete the integrator history: just delete the file data/.steady_state_history.bin .

source
KiteModels.load_historyFunction
load_history()

Load the saved pairs of abstract kite models and corresponding integrators. It is assumed that a certain set of settings always leads to the same integrator.

source
diff --git a/dev/index.html b/dev/index.html index a4033827..9611a173 100644 --- a/dev/index.html +++ b/dev/index.html @@ -3,4 +3,4 @@ cd test julia --project="."

Now 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"

You can copy the examples to your project with:

using KiteModels
-KiteModels.install_examples()

This also adds the extra packages, needed for the examples to the project. Furthermore, it creates a folder data with some example input files. You can now run the examples with the command:

include("examples/menu.jl")

News

August 2024

July 2024

April 2024

Provides

The type AbstractKiteModel with the implementation KPS3, KPS4 and KPS4_3L, representing the one point, the four point kite model and the four point - three lines 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

The one point and four point kite models are described in detail in Dynamic Model of a Pumping Kite Power System.

See also

Authors: Uwe Fechner (uwe.fechner.msc@gmail.com) and Bart van de Lint

+KiteModels.install_examples()

This also adds the extra packages, needed for the examples to the project. Furthermore, it creates a folder data with some example input files. You can now run the examples with the command:

include("examples/menu.jl")

News

August 2024

July 2024

April 2024

Provides

The type AbstractKiteModel with the implementation KPS3, KPS4 and KPS4_3L, representing the one point, the four point kite model and the four point - three lines 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

The one point and four point kite models are described in detail in Dynamic Model of a Pumping Kite Power System.

See also

Authors: Uwe Fechner (uwe.fechner.msc@gmail.com) and Bart van de Lint

diff --git a/dev/parameters/index.html b/dev/parameters/index.html index aa4f9d55..4e619918 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 08ee4310..dac7ed7b 100644 --- a/dev/quickstart/index.html +++ b/dev/quickstart/index.html @@ -42,4 +42,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 423d9869..136366f3 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 d59819bd..694ea91e 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 and KPS4_3L

      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

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

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

      • wm::Union{Nothing, AbstractWinchModel}: Reference to winch model as implemented in the package WinchModels Default: nothing

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

      • calc_cl::Dierckx.Spline1D: Function for calculation the lift coefficent, using a spline based on the provided value pairs.

      • calc_cd::Dierckx.Spline1D: Function for calculation the drag coefficent, using a spline based on the provided value pairs.

      • 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

      • 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::Union{Nothing, S} where S: synchronous speed of the motor/ generator Default: 0.0

      • set_torque::Union{Nothing, S} where S: set_torque of the motor/generator Default: nothing

      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

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

      • 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

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

      • calc_cl::Dierckx.Spline1D: Function for calculation the lift coefficent, using a spline based on the provided value pairs.

      • calc_cd::Dierckx.Spline1D: Function for calculation the drag coefficent, using a spline based on the provided value pairs.

      • 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)

      • bridle_factor::Any: bridlefactor = set.lbridle/bridle_length(set) Default: 1.0

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

      • ks::Any: max_steering angle in radian Default: 0.0

      • 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

      • alpha_2::Any: aoa at paricle B Default: 0.0

      • alpha_2b::Any: aoa at paricle B, corrected formula Default: 0.0

      • alpha_3::Any: aoa at paricle C Default: 0.0

      • alpha_3b::Any: Default: 0.0

      • alpha_4::Any: aoa at paricle D Default: 0.0

      • alpha_4b::Any: 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::Union{Nothing, S} where S: synchronous speed of the motor/ generator Default: 0.0

      • set_torque::Union{Nothing, S} where S: set_torque of the motor/generator Default: nothing

      • 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
      KiteModels.KPS4_3LType
      mutable struct KPS4_3L{S, T, P, Q, SP} <: AbstractKiteModel

      State of the kite power system, using a 3 point kite model and three steering lines to the ground. 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+3
      • 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

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

      • 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)

      • motors::StaticArraysCore.SVector{3, AbstractWinchModel}: Reference to the motor models as implemented in the package WinchModels. index 1: middle motor, index 2: left motor, index 3: right motor

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

      • 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)

      • winch_forces::StaticArraysCore.SVector{3}: last winch force Default: [zeros(S, 3) for _ = 1:3]

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

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

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

      • stable_pos::StaticArraysCore.SVector{P, T} where {T, P}: Default: zeros(SVector{P, T})

      • vel::StaticArraysCore.SVector{P, T} where {T, P}: Default: zeros(SVector{P, T})

      • posd::StaticArraysCore.SVector{P, T} where {T, P}: Default: zeros(SVector{P, T})

      • veld::StaticArraysCore.SVector{P, T} where {T, P}: Default: zeros(SVector{P, T})

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

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

      • segment_lengths::Any: unstressed segment lengths of the three tethers [m] Default: zeros(S, 3)

      • 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)

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

      • reel_out_speeds::Any: reel out speed of the winch Default: zeros(S, 3)

      • tether_lengths::Any: unstretched tether length Default: zeros(S, 3)

      • steering_pos::StaticArraysCore.MVector{2}: lengths of the connections of the steering tethers to the kite Default: zeros(S, 2)

      • rho::Any: air density at the height of the kite 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, T} where {T, P}: vector of the forces, acting on the particles Default: zeros(SVector{P, T})

      • set_values::StaticArraysCore.MVector{3, Float64}: synchronous speed or torque of the motor/ generator Default: zeros(KVec3)

      • torque_control::Bool: Default: false

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

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

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

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

      • num_E::Int64: Point number of E Default: 0

      • num_C::Int64: Point number of C Default: 0

      • num_D::Int64: Point number of D Default: 0

      • mtk::Bool: mtk variables Default: false

      • set_values_idx::Union{Nothing, ModelingToolkit.ParameterIndex}: Default: nothing

      • v_wind_gnd_idx::Union{Nothing, ModelingToolkit.ParameterIndex}: Default: nothing

      • stiffness_factor_idx::Union{Nothing, ModelingToolkit.ParameterIndex}: Default: nothing

      • v_wind_idx::Union{Nothing, ModelingToolkit.ParameterIndex}: Default: nothing

      • prob::Union{Nothing, SciMLBase.ODEProblem}: Default: nothing

      • get_pos::Union{Nothing, SymbolicIndexingInterface.MultipleGetters, SymbolicIndexingInterface.TimeDependentObservedFunction}: Default: nothing

      • get_steering_pos::Union{Nothing, SymbolicIndexingInterface.MultipleGetters, SymbolicIndexingInterface.TimeDependentObservedFunction}: Default: nothing

      • get_line_acc::Union{Nothing, SymbolicIndexingInterface.MultipleGetters, SymbolicIndexingInterface.TimeDependentObservedFunction}: Default: nothing

      • get_kite_vel::Union{Nothing, SymbolicIndexingInterface.MultipleGetters, SymbolicIndexingInterface.TimeDependentObservedFunction}: Default: nothing

      • get_winch_forces::Union{Nothing, SymbolicIndexingInterface.MultipleGetters, SymbolicIndexingInterface.TimeDependentObservedFunction}: Default: nothing

      • get_tether_lengths::Union{Nothing, SymbolicIndexingInterface.MultipleGetters, SymbolicIndexingInterface.TimeDependentObservedFunction}: Default: nothing

      • get_tether_speeds::Union{Nothing, SymbolicIndexingInterface.MultipleGetters, SymbolicIndexingInterface.TimeDependentObservedFunction}: Default: nothing

      • get_L_C::Union{Nothing, SymbolicIndexingInterface.MultipleGetters, SymbolicIndexingInterface.TimeDependentObservedFunction}: Default: nothing

      • get_L_D::Union{Nothing, SymbolicIndexingInterface.MultipleGetters, SymbolicIndexingInterface.TimeDependentObservedFunction}: Default: nothing

      • get_D_C::Union{Nothing, SymbolicIndexingInterface.MultipleGetters, SymbolicIndexingInterface.TimeDependentObservedFunction}: Default: nothing

      • get_D_D::Union{Nothing, SymbolicIndexingInterface.MultipleGetters, SymbolicIndexingInterface.TimeDependentObservedFunction}: Default: nothing

      • half_drag_force::StaticArraysCore.SVector{P, T} where {T, P}: Default: zeros(SVector{P, T})

      • num_A::Int64: residual variables Default: 0

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

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

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

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

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

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

      • dL_dα::Any: Default: zeros(S, 3)

      • dD_dα::Any: Default: zeros(S, 3)

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

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

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

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

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

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

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

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

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

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

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

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

      • y_lc::Any: Default: 0.0

      • y_ld::Any: Default: 0.0

      • δ_left::Any: Default: 0.0

      • δ_right::Any: Default: 0.0

      • α_l::Any: Default: 0.0

      • α_r::Any: Default: 0.0

      • distance_c_e::Any: Default: 0

      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. The model KPS4_3L is not yet implemented, it is just a copy of KPS4.

      +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 and KPS4_3L

      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

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

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

      • wm::Union{Nothing, AbstractWinchModel}: Reference to winch model as implemented in the package WinchModels Default: nothing

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

      • calc_cl::Dierckx.Spline1D: Function for calculation the lift coefficent, using a spline based on the provided value pairs.

      • calc_cd::Dierckx.Spline1D: Function for calculation the drag coefficent, using a spline based on the provided value pairs.

      • 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

      • 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::Union{Nothing, S} where S: synchronous speed of the motor/ generator Default: 0.0

      • set_torque::Union{Nothing, S} where S: set_torque of the motor/generator Default: nothing

      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

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

      • 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

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

      • calc_cl::Dierckx.Spline1D: Function for calculation the lift coefficent, using a spline based on the provided value pairs.

      • calc_cd::Dierckx.Spline1D: Function for calculation the drag coefficent, using a spline based on the provided value pairs.

      • 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)

      • bridle_factor::Any: bridlefactor = set.lbridle/bridle_length(set) Default: 1.0

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

      • ks::Any: max_steering angle in radian Default: 0.0

      • 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

      • alpha_2::Any: aoa at paricle B Default: 0.0

      • alpha_2b::Any: aoa at paricle B, corrected formula Default: 0.0

      • alpha_3::Any: aoa at paricle C Default: 0.0

      • alpha_3b::Any: Default: 0.0

      • alpha_4::Any: aoa at paricle D Default: 0.0

      • alpha_4b::Any: 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::Union{Nothing, S} where S: synchronous speed of the motor/ generator Default: 0.0

      • set_torque::Union{Nothing, S} where S: set_torque of the motor/generator Default: nothing

      • 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
      KiteModels.KPS4_3LType
      mutable struct KPS4_3L{S, T, P, Q, SP} <: AbstractKiteModel

      State of the kite power system, using a 3 point kite model and three steering lines to the ground. 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+3
      • 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

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

      • 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)

      • motors::StaticArraysCore.SVector{3, AbstractWinchModel}: Reference to the motor models as implemented in the package WinchModels. index 1: middle motor, index 2: left motor, index 3: right motor

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

      • 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)

      • winch_forces::StaticArraysCore.SVector{3}: last winch force Default: [zeros(S, 3) for _ = 1:3]

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

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

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

      • stable_pos::StaticArraysCore.SVector{P, T} where {T, P}: Default: zeros(SVector{P, T})

      • vel::StaticArraysCore.SVector{P, T} where {T, P}: Default: zeros(SVector{P, T})

      • posd::StaticArraysCore.SVector{P, T} where {T, P}: Default: zeros(SVector{P, T})

      • veld::StaticArraysCore.SVector{P, T} where {T, P}: Default: zeros(SVector{P, T})

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

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

      • segment_lengths::Any: unstressed segment lengths of the three tethers [m] Default: zeros(S, 3)

      • 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)

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

      • reel_out_speeds::Any: reel out speed of the winch Default: zeros(S, 3)

      • tether_lengths::Any: unstretched tether length Default: zeros(S, 3)

      • steering_pos::StaticArraysCore.MVector{2}: lengths of the connections of the steering tethers to the kite Default: zeros(S, 2)

      • rho::Any: air density at the height of the kite 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, T} where {T, P}: vector of the forces, acting on the particles Default: zeros(SVector{P, T})

      • set_values::StaticArraysCore.MVector{3, Float64}: synchronous speed or torque of the motor/ generator Default: zeros(KVec3)

      • torque_control::Bool: Default: false

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

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

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

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

      • num_E::Int64: Point number of E Default: 0

      • num_C::Int64: Point number of C Default: 0

      • num_D::Int64: Point number of D Default: 0

      • mtk::Bool: mtk variables Default: false

      • set_values_idx::Union{Nothing, ModelingToolkit.ParameterIndex}: Default: nothing

      • v_wind_gnd_idx::Union{Nothing, ModelingToolkit.ParameterIndex}: Default: nothing

      • stiffness_factor_idx::Union{Nothing, ModelingToolkit.ParameterIndex}: Default: nothing

      • v_wind_idx::Union{Nothing, ModelingToolkit.ParameterIndex}: Default: nothing

      • prob::Union{Nothing, SciMLBase.ODEProblem}: Default: nothing

      • get_pos::Union{Nothing, SymbolicIndexingInterface.MultipleGetters, SymbolicIndexingInterface.TimeDependentObservedFunction}: Default: nothing

      • get_steering_pos::Union{Nothing, SymbolicIndexingInterface.MultipleGetters, SymbolicIndexingInterface.TimeDependentObservedFunction}: Default: nothing

      • get_line_acc::Union{Nothing, SymbolicIndexingInterface.MultipleGetters, SymbolicIndexingInterface.TimeDependentObservedFunction}: Default: nothing

      • get_kite_vel::Union{Nothing, SymbolicIndexingInterface.MultipleGetters, SymbolicIndexingInterface.TimeDependentObservedFunction}: Default: nothing

      • get_winch_forces::Union{Nothing, SymbolicIndexingInterface.MultipleGetters, SymbolicIndexingInterface.TimeDependentObservedFunction}: Default: nothing

      • get_tether_lengths::Union{Nothing, SymbolicIndexingInterface.MultipleGetters, SymbolicIndexingInterface.TimeDependentObservedFunction}: Default: nothing

      • get_tether_speeds::Union{Nothing, SymbolicIndexingInterface.MultipleGetters, SymbolicIndexingInterface.TimeDependentObservedFunction}: Default: nothing

      • get_L_C::Union{Nothing, SymbolicIndexingInterface.MultipleGetters, SymbolicIndexingInterface.TimeDependentObservedFunction}: Default: nothing

      • get_L_D::Union{Nothing, SymbolicIndexingInterface.MultipleGetters, SymbolicIndexingInterface.TimeDependentObservedFunction}: Default: nothing

      • get_D_C::Union{Nothing, SymbolicIndexingInterface.MultipleGetters, SymbolicIndexingInterface.TimeDependentObservedFunction}: Default: nothing

      • get_D_D::Union{Nothing, SymbolicIndexingInterface.MultipleGetters, SymbolicIndexingInterface.TimeDependentObservedFunction}: Default: nothing

      • half_drag_force::StaticArraysCore.SVector{P, T} where {T, P}: Default: zeros(SVector{P, T})

      • num_A::Int64: residual variables Default: 0

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

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

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

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

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

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

      • dL_dα::Any: Default: zeros(S, 3)

      • dD_dα::Any: Default: zeros(S, 3)

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

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

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

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

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

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

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

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

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

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

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

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

      • y_lc::Any: Default: 0.0

      • y_ld::Any: Default: 0.0

      • δ_left::Any: Default: 0.0

      • δ_right::Any: Default: 0.0

      • α_l::Any: Default: 0.0

      • α_r::Any: Default: 0.0

      • distance_c_e::Any: Default: 0

      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. The model KPS4_3L is not yet implemented, it is just a copy of KPS4.