Repository navigation
v0.12.1
KiteModels v0.12.1
Added
find_steady_state!(s; trim=true)(KPS3 and KPS4): instead of prescribingset.elevation, the vertical force balance of the kite is solved too, so the kite is placed at the elevation where its lift matches gravity (its natural elevation);set.elevationis only the start value. For KPS4 all forces including gravity are balanced in this case (withtrim=false, the accelerations inyd0are-g, so gravity is not balanced), and the returned accelerations are zero. A second, fully balanced trim exists at low elevations with the kite in deep stall. Solutions with an angle of attack beyond the angle of maximum lift (fromalpha_cl/cl_list) are therefore rejected, and if no valid trim is found fromset.elevation, the solver is restarted at higher and then at lower elevations, in steps of 10°, with a cheaper solve (no perturbation, no last-resort continuation). If no trim with attached flow is found, an error is thrown instead of returning a deep stall or non-converged state; withsystem.yamland the Maasvlakte wind profile at 4 m/s this takes 7 s (KPS3) and 11 s (KPS4). The defaulttrim=falsekeeps the previous behaviour.init!(s; trim=true)passestrimtofind_steady_state!. The initial state is then an equilibrium of the simulation, so the elevation stays constant. If no trim with attached flow is found,init!returnsnothing.find_steady_state!withtrim=false(KPS3 and KPS4) logs a warning if the kite is in deep stall (angle of attack beyond the angle of maximum lift). This happens if the prescribed elevation is far below the natural elevation (withsystem.yaml: below about 65° for KPS3 and 45° for KPS4), because then the kite can only be balanced in deep stall; before, such a state was returned silently.
Changed
- The keyword argument
deltaoffind_steady_state!andinit!is deprecated and ignored.deltaperturbed the initial state (all particles shifted sideways bydelta[m], with the velocitydelta[m/s]), and the returned state was perturbed too, so it was not an equilibrium: the kite moved by up to 0.4° afterinit!even withtrim=true. Now the steady state is solved without perturbation, with a perturbation of 0.001 only as an internal fallback, and it is always returned without perturbation. The initial states change slightly, also forsteady_state=false. The examples, tests andprecompile.jlno longer passdelta. - The keyword argument
stiffness_factoroffind_steady_state!andinit!is deprecated and ignored. Before, the KPS4 steady state was solved for the reduced tether stiffnessstiffness_factor, whichnext_step!then raised by 0.01 per time step to 1.0, so the initial state was not an equilibrium of the simulation (with a stretched tether and a transient during the first seconds), and the result depended on the chosen value. Now the steady state is always solved for the full tether stiffness, ands.stiffness_factoris 1.0 afterwards. A reduced stiffness is only used internally as start value: if the direct solve fails, the stiffness schedules 0.1 → 1.0, 0.1 → 0.3 → 1.0 and 0.3 → 1.0 are tried, and then the previous continuation. In a benchmark withsystem.yaml(wind speeds of 6 to 25 m/s, elevations of 40° to 85°, tether lengths of 50 to 1000 m, with and without trim), all 160 cases were solved, in 0.14 s on average. For KPS3, the first solve uses a fixed stiffness factor of 0.035; the result was already solved for the full stiffness. The initial states change. The examples, tests andprecompile.jlno longer passstiffness_factor. - With
trim=true,find_steady_state!(KPS4) starts the search at 80° (or atset.elevation, if it is higher) instead of atset.elevation, because the solver converges from above the natural elevation, but often not from far below it. The restarts at other elevations are unchanged. - The cases of
test/test-steady-state-robustness.jlat an elevation of 50° are moved to 60° and 65°, because at 50° the steady state is in deep stall. - The steady-state tests of KPS4 (
test/test-kps4.jlandtest/test-steady-state-kps4.jl) no longer turn a failingfind_steady_state!into@test_brokenwhenCI=true, so a solver regression now fails CI (#314). - The
examples_3dproject uses the registered KiteViewers 0.7 instead of a git branch, and the default manifests for Julia 1.12 and 1.13 use KiteUtils 0.13.2, KiteViewers 0.7.0 and MakieControlPlots 0.1.21.
Fixed
find_steady_state!(KPS4) now solves for the wind at the height of the kite. Before, the wind was set once from the height of the kite before the solver started, which is 0 m afterclear!, so the kite was balanced for the ground wind (9.51 m/s instead of 12.6 m/s withsystem.yaml); afterwards the wind at the real height was set, which left force residuals of about 130 N on the kite points. The initial state changes: for example, withsystem.yamlthe winch force increases from 308 N to 456 N.- The initial velocities of the particles (KPS4, in
find_steady_state!andinit!) caused by reeling out were multiplied by the length of the tether segments (about 25 m withsystem.yaml), and the direction of the KCU was taken from the bridle. Withv_reel_out = 1 m/sthe KCU moved at 20.9 m/s and the kite at 5.0 m/s instead of 1.0 m/s, so the steady state was found for a much lower apparent wind speed. Withtrim=truethe kite was therefore placed far below its natural elevation (54.8° instead of 68.2° inexamples/test_init_4p.jl), and afterinit!it climbed for about 10 s, with a peak of the tether force of more than twice the steady value. Now the velocity of each tether particle points along its tether segment and grows linearly from zero at the winch tov_reel_outat the KCU; the kite particles move with the KCU. The initial states change for all simulations withv_reel_out ≠ 0. - The steady state of KPS3 (
find_steady_state!andinit!) ignoredv_reel_out: all particles were at rest and the reel-out speed in the initial state vector was zero, so the initial elevation did not depend onv_reel_out, and in the simulation the winch first had to accelerate to the set speed. Now, as for KPS4, the velocity of each particle points along its tether segment and grows linearly from zero at the winch tov_reel_outat the kite, and the initial reel-out speed isv_reel_out. Withtrim=true,system.yamland a wind speed of 14.5 m/s, the natural elevation decreases from 73.5° to 70.4° forv_reel_out = 1 m/sand to 60.9° for 4 m/s, and it stays constant during the simulation. The initial states change for all simulations withv_reel_out ≠ 0.
Merged pull requests:
- Add trim option, deprecate delta and stiffness_factor, fix steady-state wind and reel-out velocities (#332) (@ufechner7)
- Remove the CI-only catch around find_steady_state! in the KPS4 tests (#333) (@ufechner7)
Closed issues: