From 9bda9aa2e27527770c74adf1e7a7bf93ba4dbc65 Mon Sep 17 00:00:00 2001 From: Uwe Fechner Date: Mon, 14 Jul 2025 19:30:17 +0200 Subject: [PATCH 1/2] Bump AtmosphericModels to 0.3.1 --- Manifest-v1.11.toml.default | 18 +++++++++--------- Project.toml | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Manifest-v1.11.toml.default b/Manifest-v1.11.toml.default index d38ee8ea..e48f2b53 100644 --- a/Manifest-v1.11.toml.default +++ b/Manifest-v1.11.toml.default @@ -2,7 +2,7 @@ julia_version = "1.11.6" manifest_format = "2.0" -project_hash = "e9dd3db354aecff1aac128f74e895524eb9afd3d" +project_hash = "6bc3ca3c31be5a0197412c8539a7557fa36ebe87" [[deps.ADTypes]] git-tree-sha1 = "be7ae030256b8ef14a441726c4c37766b90b93a3" @@ -142,9 +142,9 @@ version = "1.11.0" [[deps.AtmosphericModels]] deps = ["FFTW", "HypergeometricFunctions", "KiteUtils", "LinearAlgebra", "MeshGrid", "NPZ", "Printf", "Random", "Statistics"] -git-tree-sha1 = "f3986a298be27278be4a904cbd7f668c9b7b76b3" +git-tree-sha1 = "cef73780f85313e0e2d4c9b4fb2fc2b222be77aa" uuid = "c59cac55-771d-4f45-b14d-1c681463a295" -version = "0.3.0" +version = "0.3.1" [[deps.AxisAlgorithms]] deps = ["LinearAlgebra", "Random", "SparseArrays", "WoodburyMatrices"] @@ -1053,9 +1053,9 @@ version = "1.11.0" [[deps.LinearSolve]] deps = ["ArrayInterface", "ChainRulesCore", "ConcreteStructs", "DocStringExtensions", "EnumX", "GPUArraysCore", "InteractiveUtils", "Krylov", "LazyArrays", "Libdl", "LinearAlgebra", "MKL_jll", "Markdown", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators", "Setfield", "StaticArraysCore", "UnPack"] -git-tree-sha1 = "062c11f1d84ffc80d00fddaa515f7e37e8e9f9d5" +git-tree-sha1 = "13464637e13bc2a6577c2e456d561c5603ca54c7" uuid = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae" -version = "3.18.2" +version = "3.19.1" [deps.LinearSolve.extensions] LinearSolveBandedMatricesExt = "BandedMatrices" @@ -1699,9 +1699,9 @@ version = "0.1.0" [[deps.SciMLBase]] deps = ["ADTypes", "Accessors", "Adapt", "ArrayInterface", "CommonSolve", "ConstructionBase", "Distributed", "DocStringExtensions", "EnumX", "FunctionWrappersWrappers", "IteratorInterfaceExtensions", "LinearAlgebra", "Logging", "Markdown", "Moshi", "PrecompileTools", "Preferences", "Printf", "RecipesBase", "RecursiveArrayTools", "Reexport", "RuntimeGeneratedFunctions", "SciMLOperators", "SciMLStructures", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface"] -git-tree-sha1 = "31587e20cdea9fba3a689033313e658dfc9aae78" +git-tree-sha1 = "e6a28a9a2dd9bc3ed46391fa0e6c35839bde4028" uuid = "0bca4576-84f4-4d90-8ffe-ffa030f20462" -version = "2.102.1" +version = "2.103.0" [deps.SciMLBase.extensions] SciMLBaseChainRulesCoreExt = "ChainRulesCore" @@ -2013,9 +2013,9 @@ version = "3.29.0" [[deps.Symbolics]] deps = ["ADTypes", "ArrayInterface", "Bijections", "CommonWorldInvalidations", "ConstructionBase", "DataStructures", "DiffRules", "Distributions", "DocStringExtensions", "DomainSets", "DynamicPolynomials", "LaTeXStrings", "Latexify", "Libdl", "LinearAlgebra", "LogExpFunctions", "MacroTools", "Markdown", "NaNMath", "OffsetArrays", "PrecompileTools", "Primes", "RecipesBase", "Reexport", "RuntimeGeneratedFunctions", "SciMLBase", "Setfield", "SparseArrays", "SpecialFunctions", "StaticArraysCore", "SymbolicIndexingInterface", "SymbolicLimits", "SymbolicUtils", "TermInterface"] -git-tree-sha1 = "df665535546bb07078ee42e0972527b5d6bd3f69" +git-tree-sha1 = "3d7b491b60bf3d24a5c2a74821db4520f0307c72" uuid = "0c5d862f-8b57-4792-8d23-62f2024744c7" -version = "6.43.0" +version = "6.44.0" [deps.Symbolics.extensions] SymbolicsForwardDiffExt = "ForwardDiff" diff --git a/Project.toml b/Project.toml index dae980f1..28e20760 100644 --- a/Project.toml +++ b/Project.toml @@ -52,7 +52,7 @@ KiteModelsControlPlotsExt = "ControlPlots" [compat] ADTypes = "1.14.0" Aqua = "0.8.11" -AtmosphericModels = "0.3" +AtmosphericModels = "0.3.1" BenchmarkTools = "1.6" CodecXz = "0.7.4" Colors = "0" From 6d6648a5f37c94c3b3f709fbdbaa2273f479407d Mon Sep 17 00:00:00 2001 From: Uwe Fechner Date: Mon, 14 Jul 2025 19:58:25 +0200 Subject: [PATCH 2/2] Some progress, but not yet working --- src/KiteModels.jl | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/KiteModels.jl b/src/KiteModels.jl index 9123557c..fa7f4762 100644 --- a/src/KiteModels.jl +++ b/src/KiteModels.jl @@ -194,11 +194,25 @@ Set the vector of the wind-velocity at the height of the kite. As parameter the the ground wind speed [m/s] and the upwind direction [radians] are needed. Is called by the function next_step!. """ -function set_v_wind_ground!(s::AKM, height, v_wind_gnd=s.set.v_wind; upwind_dir=-pi/2) +function set_v_wind_ground!(s::KPS4, height, v_wind_gnd=s.set.v_wind; upwind_dir=-pi/2) + if height < 6.0 + height = 6.0 + end + @assert !isnothing(s) + pos = pos_kite(s) + s.set.upwind_dir = rad2deg(upwind_dir) + s.v_wind .= get_wind(s.am, pos[1], pos[2], pos[3], s.t_0) + s.v_wind_gnd .= get_wind(s.am, pos[1], pos[2], s.set.h_ref, s.t_0) + s.v_wind_tether .= get_wind(s.am, pos[1], pos[2], pos[3]/2, s.t_0) + s.rho = calc_rho(s.am, height) + nothing +end +function set_v_wind_ground!(s::KPS3, height, v_wind_gnd=s.set.v_wind; upwind_dir=-pi/2) if height < 6.0 height = 6.0 end wind_dir = -upwind_dir - pi/2 + s.set.upwind_dir = rad2deg(upwind_dir) s.v_wind .= v_wind_gnd * calc_wind_factor(s.am, height) .* [cos(wind_dir), sin(wind_dir), 0] s.v_wind_gnd .= [v_wind_gnd * cos(wind_dir), v_wind_gnd * sin(wind_dir), 0.0] s.v_wind_tether .= s.v_wind_gnd * calc_wind_factor(s.am, height / 2.0)