Skip to content

Commit 8e58db1

Browse files
author
Documenter.jl
committed
build based on da1da43
1 parent e408aed commit 8e58db1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+4819
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"documenter":{"julia_version":"1.11.7","generation_timestamp":"2025-09-29T11:25:15","documenter_version":"1.14.1"}}

previews/PR251/4-point-kite.png

48.4 KB
Loading

previews/PR251/advanced/index.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!DOCTYPE html>
2+
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Advanced usage · KiteModels.jl</title><meta name="title" content="Advanced usage · KiteModels.jl"/><meta property="og:title" content="Advanced usage · KiteModels.jl"/><meta property="twitter:title" content="Advanced usage · KiteModels.jl"/><meta name="description" content="Documentation for KiteModels.jl."/><meta property="og:description" content="Documentation for KiteModels.jl."/><meta property="twitter:description" content="Documentation for KiteModels.jl."/><meta property="og:url" content="https://OpenSourceAWE.github.io/KiteModels.jl/advanced/"/><meta property="twitter:url" content="https://OpenSourceAWE.github.io/KiteModels.jl/advanced/"/><link rel="canonical" href="https://OpenSourceAWE.github.io/KiteModels.jl/advanced/"/><script data-outdated-warner src="../assets/warner.js"></script><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.050/juliamono.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.8/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../assets/documenter.js"></script><script src="../search_index.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/catppuccin-mocha.css" data-theme-name="catppuccin-mocha"/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/catppuccin-macchiato.css" data-theme-name="catppuccin-macchiato"/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/catppuccin-frappe.css" data-theme-name="catppuccin-frappe"/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/catppuccin-latte.css" data-theme-name="catppuccin-latte"/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../"><img src="../assets/logo.png" alt="KiteModels.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit"><a href="../">KiteModels.jl</a></span></div><button class="docs-search-query input is-rounded is-small is-clickable my-2 mx-auto py-1 px-2" id="documenter-search-query">Search docs (Ctrl + /)</button><ul class="docs-menu"><li><a class="tocitem" href="../">Home</a></li><li><a class="tocitem" href="../types/">Types</a></li><li><a class="tocitem" href="../functions/">Functions</a></li><li><a class="tocitem" href="../ram_air_kite/">SymbolicAWEModel</a></li><li><a class="tocitem" href="../parameters/">Parameters</a></li><li><a class="tocitem" href="../examples/">Examples 1p</a></li><li><a class="tocitem" href="../examples_4p/">Examples 4p</a></li><li><a class="tocitem" href="../examples_ram_air/">Examples SymbolicAWEModel</a></li><li><a class="tocitem" href="../tutorial_system_structure/">SystemStructure for custom models</a></li><li><a class="tocitem" href="../quickstart/">Quickstart</a></li><li class="is-active"><a class="tocitem" href>Advanced usage</a><ul class="internal"><li><a class="tocitem" href="#Forking-the-repository-and-creating-a-custom-system-image"><span>Forking the repository and creating a custom system image</span></a></li><li><a class="tocitem" href="#Hints-for-Developers"><span>Hints for Developers</span></a></li><li><a class="tocitem" href="#Outlook"><span>Outlook</span></a></li></ul></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><a class="docs-sidebar-button docs-navbar-link fa-solid fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>Advanced usage</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Advanced usage</a></li></ul></nav><div class="docs-right"><a class="docs-navbar-link" href="https://github.com/OpenSourceAWE/KiteModels.jl" title="View the repository on GitHub"><span class="docs-icon fa-brands"></span><span class="docs-label is-hidden-touch">GitHub</span></a><a class="docs-navbar-link" href="https://github.com/OpenSourceAWE/KiteModels.jl/blob/main/docs/src/advanced.md#" title="Edit source on GitHub"><span class="docs-icon fa-solid"></span></a><a class="docs-settings-button docs-navbar-link fa-solid fa-gear" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-article-toggle-button fa-solid fa-chevron-up" id="documenter-article-toggle-button" href="javascript:;" title="Collapse all docstrings"></a></div></header><article class="content" id="documenter-page"><h1 id="Advanced-usage"><a class="docs-heading-anchor" href="#Advanced-usage">Advanced usage</a><a id="Advanced-usage-1"></a><a class="docs-heading-anchor-permalink" href="#Advanced-usage" title="Permalink"></a></h1><p>For advanced users it is suggested to install git, bash and vscode or vscodium in addition to Julia. vscode and vscodium both have a very good plugin for Julia support, see <a href="https://www.julia-vscode.org/">https://www.julia-vscode.org</a>. Installation instructions: <a href="https://ufechner7.github.io/2024/08/09/installing-julia-with-juliaup.html">Julia and VSCode</a> .</p><p>Whe using vscode, I do NOT use the Julia terminal provided by vscode, but the normal bash terminal which is also available in vscode by selecting <strong>Terminal-&gt;New Terminal</strong> From this terminal I start Julia with <code>julia --project</code> or a different command as explained below. This makes it easier to understand what happens and is also faster when you need to restart.</p><h2 id="Forking-the-repository-and-creating-a-custom-system-image"><a class="docs-heading-anchor" href="#Forking-the-repository-and-creating-a-custom-system-image">Forking the repository and creating a custom system image</a><a id="Forking-the-repository-and-creating-a-custom-system-image-1"></a><a class="docs-heading-anchor-permalink" href="#Forking-the-repository-and-creating-a-custom-system-image" title="Permalink"></a></h2><p>To reduce the startup time it is suggested to use a custom system image that contains all the packages you use on a daily base in compiled form.</p><ol><li>Go to the website https://github.com/ufechner7/KiteModels.jl and click on the <strong>Fork</strong> button at the top right.</li><li>clone the new repository which is owned by you with a command similar to this one: <code>git clone https://github.com/ufechner7/KiteModels.jl</code> Your own git user name must appear in the URL, otherwise you will not be able to push your changes.</li></ol><p>After cloning the repo you can create a new system image:</p><pre><code class="language-bash hljs">cd KiteModels.jl
3+
cd bin
4+
./create_sys_image</code></pre><p>This will take about 12 min on a Ryzen 7950X CPU. You should now see a new file in the bin folder:</p><pre><code class="nohighlight hljs">~/repos/test/bin$ ls -lah kps*
5+
-rwxrwxr-x 1 ufechner ufechner 723M apr 18 18:23 kps-image-1.10-main.so</code></pre><p>You can launch julia such that it makes use of this system image with the commands:</p><pre><code class="language-bash hljs">cd ..
6+
./bin/run_julia</code></pre><p>If you now run any of the examples the time-to-first-plot (TTFP) should be less than 10s:</p><pre><code class="language-julia hljs">julia&gt; @time include(&quot;examples/simulate_simple.jl&quot;)
7+
lift, drag [N]: 597.47, 129.31
8+
Average number of callbacks per time step: 114.92
9+
10.009223 seconds (29.83 M allocations: 1.727 GiB, 4.31% gc time, 50.81% compilation time)
10+
11+
julia&gt; </code></pre><p>A second run of this command needs about 3.7 s which means the startup time (load and compilation time of the package and the libraries) has been reduced to about 6.3s.</p><p>Without a system image the first time execution of the script &quot;simulate_simple.jl&quot; on the same computer is about 22.5 seconds while the time for the second execution is the same (3.9s). So now about 15s of time are saved after each restart.</p><h2 id="Hints-for-Developers"><a class="docs-heading-anchor" href="#Hints-for-Developers">Hints for Developers</a><a id="Hints-for-Developers-1"></a><a class="docs-heading-anchor-permalink" href="#Hints-for-Developers" title="Permalink"></a></h2><h3 id="Coding-style"><a class="docs-heading-anchor" href="#Coding-style">Coding style</a><a id="Coding-style-1"></a><a class="docs-heading-anchor-permalink" href="#Coding-style" title="Permalink"></a></h3><ul><li><p>add the packages <code>TestEnv</code> and <code>Revise</code> to your global environment, not to any project</p></li><li><p>avoid hard-coded numeric values like <code>9.81</code> in the code, instead define a global constant <code>G_EARTH</code> or read this value from a configuration file</p></li><li><p>stick to a line length limit of 120 characters</p></li><li><p>try to avoid dot operators unless you have to. </p></li></ul><p>Bad: <code>norm1 .~ norm(segment)</code> Good: <code>norm1 ~ norm(segment)</code></p><ul><li>if you need to refer to the settings you can use <code>se()</code> which will load the settings of the active project. To define the active project use a line like <code>set = se(&quot;system_3l.yaml&quot;)</code> at the beginning of your program.</li><li>use the <code>\cdot</code> operator for the dot product for improved readability</li><li>use a space after a comma, e.g. <code>force_eqs[j, i]</code></li><li>enclose operators like <code>+</code> and <code>*</code> in single spaces, like <code>0.5 * (s.pos[s.i_C] + s.pos[s.i_D])</code>; exception: <code>mass_tether_particle[i-1]</code></li><li>try to align the equation signs for improved readability like this:</li></ul><pre><code class="language-julia hljs"> tether_rhs = [force_eqs[j, i].rhs for j in 1:3]
12+
kite_rhs = [force_eqs[j, i+3].rhs for j in 1:3]
13+
f_xy = dot(tether_rhs, e_z) * e_z</code></pre><h2 id="Outlook"><a class="docs-heading-anchor" href="#Outlook">Outlook</a><a id="Outlook-1"></a><a class="docs-heading-anchor-permalink" href="#Outlook" title="Permalink"></a></h2><p>The next steps:</p><ul><li>finish and merge the KPS5 kite power system model, based on ModellingToolkit</li><li>use VortexStepMethod.jl for KPS5 </li><li>add a rigid wing model</li><li>add a Matlab/ Simulink wrapper similar to the Python wrapper <a href="https://github.com/ufechner7/pykitemodels">pykitemodels</a></li></ul></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../quickstart/">« Quickstart</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.14.1 on <span class="colophon-date" title="Monday 29 September 2025 11:25">Monday 29 September 2025</span>. Using Julia version 1.11.7.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>

0 commit comments

Comments
 (0)