Skip to content

Commit

Permalink
build based on 8350bd4
Browse files Browse the repository at this point in the history
  • Loading branch information
Documenter.jl committed Sep 29, 2024
1 parent 29db52a commit 0da0e04
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion dev/.documenter-siteinfo.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"documenter":{"julia_version":"1.10.5","generation_timestamp":"2024-09-29T10:26:59","documenter_version":"1.7.0"}}
{"documenter":{"julia_version":"1.10.5","generation_timestamp":"2024-09-29T10:45:11","documenter_version":"1.7.0"}}
2 changes: 1 addition & 1 deletion dev/examples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,4 @@
POS0 = sol1[pos]
# create the real model
se.v_ro = v_ro
model(se, p1, p2, fix_p1, fix_p2, POS0, VEL0)</code></pre><p><img src="../docs/images/Tether_08.gif" alt="Catenary"/></p><p>The following call was used to create this video: <code>main(p2=[-40,0,-47], fix_p2=false)</code>, with a setting of <code>v_ro = 0.3</code> m/s. </p><p>In the video, you can at the beginning nicely see the catenary line which is a result of the steady state solver, and then the normal dynamic simulation, which results in a line that is pushed to the right by the wind.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../theory/">« Theory</a><a class="docs-footer-nextpage" href="../vscode/">VSCode IDE »</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.7.0 on <span class="colophon-date" title="Sunday 29 September 2024 10:26">Sunday 29 September 2024</span>. Using Julia version 1.10.5.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
model(se, p1, p2, fix_p1, fix_p2, POS0, VEL0)</code></pre><p><img src="../docs/images/Tether_08.gif" alt="Catenary"/></p><p>The following call was used to create this video: <code>main(p2=[-40,0,-47], fix_p2=false)</code>, with a setting of <code>v_ro = 0.3</code> m/s. </p><p>In the video, you can at the beginning nicely see the catenary line which is a result of the steady state solver, and then the normal dynamic simulation, which results in a line that is pushed to the right by the wind.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../theory/">« Theory</a><a class="docs-footer-nextpage" href="../vscode/">VSCode IDE »</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.7.0 on <span class="colophon-date" title="Sunday 29 September 2024 10:45">Sunday 29 September 2024</span>. Using Julia version 1.10.5.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
2 changes: 1 addition & 1 deletion dev/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
git clone https://github.com/ufechner7/Tethers.jl</code></pre><p>Build the system image:</p><pre><code class="language-bash hljs">cd repos/Tethers.jl
cd bin
./create_sys_image</code></pre><h2 id="Basic-example"><a class="docs-heading-anchor" href="#Basic-example">Basic example</a><a id="Basic-example-1"></a><a class="docs-heading-anchor-permalink" href="#Basic-example" title="Permalink"></a></h2><p>Use the provided script to start Julia from the <code>Tethers.jl</code> folder:</p><pre><code class="language-bash hljs">cd repos/Tethers.jl
./bin/run_julia</code></pre><p>From the Julia prompt, run the simulation:</p><pre><code class="language-julia hljs">include(&quot;src/Tether_01.jl&quot;)</code></pre><p>You should see a plot similar to:</p><p><img src="docs/images/FallingMass.png" alt="Falling mass"/></p><p>This example shows a mass that is thrown upwards, slows down and then falls.</p><p><strong>HINT</strong> You get a menu from which you can run any of the examples by typing</p><pre><code class="language-julia hljs">menu()</code></pre><p>at the Julia prompt.</p><p><strong>Julia code:</strong> <a href="https://github.com/ufechner7/Tethers.jl/blob/main/src/Tether_01.jl">Tether_01.jl</a></p><h2 id="Python-version-as-comparison"><a class="docs-heading-anchor" href="#Python-version-as-comparison">Python version as comparison</a><a id="Python-version-as-comparison-1"></a><a class="docs-heading-anchor-permalink" href="#Python-version-as-comparison" title="Permalink"></a></h2><p>From the Julia prompt execute:</p><pre><code class="language-julia hljs">include(&quot;src/RunTether_01.jl&quot;)</code></pre><p>This will install Python, Matplotlib and Assimulo and execute the script <code>Tether_01.py</code>.</p><p><strong>Python code:</strong> <a href="https://github.com/ufechner7/Tethers.jl/blob/main/src/Tether_01.py">Tether_01.py</a></p><p>If you compare the Python and the Julia scripts you can see that:</p><ul><li>the Julia script is shorter and easier to read</li><li>Julia is about 16 times faster when running the simulation </li></ul><p>For a stiff, segmented tether (example 6 and 7) the Julia solvers are more than 2000 times faster than Python.</p><p>Have a look at the <a href="https://ufechner7.github.io/Tethers.jl/dev/examples/">Examples</a> that teach you how to construct a full tether model step by step.</p><h2 id="Overall-comparison"><a class="docs-heading-anchor" href="#Overall-comparison">Overall comparison</a><a id="Overall-comparison-1"></a><a class="docs-heading-anchor-permalink" href="#Overall-comparison" title="Permalink"></a></h2><p>Execution time for a simulation of 10s duration with logging the state every 20ms. Relative and absolute tolerance: <span>$1.0^{-6}$</span>. CPU: Ryzen 9 7950X.</p><table><tr><th style="text-align: left">Test-case</th><th style="text-align: center">Lines of code (LOC) Julia</th><th style="text-align: center">LOC Python</th><th style="text-align: center">Time Julia [ms]</th><th style="text-align: center">Time Python [ms]</th></tr><tr><td style="text-align: left">Falling mass (1)</td><td style="text-align: center">35</td><td style="text-align: center">56</td><td style="text-align: center">0.17</td><td style="text-align: center">2.6</td></tr><tr><td style="text-align: left">Non-linear Spring damper (3)</td><td style="text-align: center">49</td><td style="text-align: center">83</td><td style="text-align: center">0.64</td><td style="text-align: center">20</td></tr><tr><td style="text-align: left">ditto with callbacks (3b, 3c)</td><td style="text-align: center">58</td><td style="text-align: center">103</td><td style="text-align: center">0.8</td><td style="text-align: center">31</td></tr><tr><td style="text-align: left">swinging tether, 5 segments (5)</td><td style="text-align: center">105</td><td style="text-align: center">150</td><td style="text-align: center">2.7</td><td style="text-align: center">47</td></tr><tr><td style="text-align: left">Dyneema tether, reeling out (6)</td><td style="text-align: center">121</td><td style="text-align: center">160</td><td style="text-align: center">2.1</td><td style="text-align: center">9300</td></tr><tr><td style="text-align: left">ditto with callbacks (6c)</td><td style="text-align: center">167</td><td style="text-align: center"></td><td style="text-align: center">4.2</td><td style="text-align: center"></td></tr><tr><td style="text-align: left">Dyneema, reeling out with drag (7)</td><td style="text-align: center">169</td><td style="text-align: center"></td><td style="text-align: center">1.8</td><td style="text-align: center"></td></tr></table><p><strong>Tradeoff Julia vs Python:</strong> In Julia, the code is compiled before it is executed, which can cause about one to 10 seconds delay when running a simulation the first time, but speeds up the execution a lot afterward. In addition, Julia can run fully multithreaded, Python cannot make use of multiple CPU cores with multithreading because of the global interpreter lock. </p><p>Furthermore, the IDA solver is hardly capable of handling a simulation with the very stiff Dyneema tether. The Julia solvers achieve about 5000 times the performance.</p><p>See also: <a href="https://ufechner7.github.io/2022/08/13/why-julia.html">Why Julia?</a> and read the <a href="https://ufechner7.github.io/Tethers.jl/dev/">documentation</a> or go straight to the <a href="https://ufechner7.github.io/Tethers.jl/dev/examples/">examples</a>.</p></article><nav class="docs-footer"><a class="docs-footer-nextpage" href="theory/">Theory »</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.7.0 on <span class="colophon-date" title="Sunday 29 September 2024 10:26">Sunday 29 September 2024</span>. Using Julia version 1.10.5.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
./bin/run_julia</code></pre><p>From the Julia prompt, run the simulation:</p><pre><code class="language-julia hljs">include(&quot;src/Tether_01.jl&quot;)</code></pre><p>You should see a plot similar to:</p><p><img src="docs/images/FallingMass.png" alt="Falling mass"/></p><p>This example shows a mass that is thrown upwards, slows down and then falls.</p><p><strong>HINT</strong> You get a menu from which you can run any of the examples by typing</p><pre><code class="language-julia hljs">menu()</code></pre><p>at the Julia prompt.</p><p><strong>Julia code:</strong> <a href="https://github.com/ufechner7/Tethers.jl/blob/main/src/Tether_01.jl">Tether_01.jl</a></p><h2 id="Python-version-as-comparison"><a class="docs-heading-anchor" href="#Python-version-as-comparison">Python version as comparison</a><a id="Python-version-as-comparison-1"></a><a class="docs-heading-anchor-permalink" href="#Python-version-as-comparison" title="Permalink"></a></h2><p>From the Julia prompt execute:</p><pre><code class="language-julia hljs">include(&quot;src/RunTether_01.jl&quot;)</code></pre><p>This will install Python, Matplotlib and Assimulo and execute the script <code>Tether_01.py</code>.</p><p><strong>Python code:</strong> <a href="https://github.com/ufechner7/Tethers.jl/blob/main/src/Tether_01.py">Tether_01.py</a></p><p>If you compare the Python and the Julia scripts you can see that:</p><ul><li>the Julia script is shorter and easier to read</li><li>Julia is about 16 times faster when running the simulation </li></ul><p>For a stiff, segmented tether (example 6 and 7) the Julia solvers are more than 2000 times faster than Python.</p><p>Have a look at the <a href="https://ufechner7.github.io/Tethers.jl/dev/examples/">Examples</a> that teach you how to construct a full tether model step by step.</p><h2 id="Overall-comparison"><a class="docs-heading-anchor" href="#Overall-comparison">Overall comparison</a><a id="Overall-comparison-1"></a><a class="docs-heading-anchor-permalink" href="#Overall-comparison" title="Permalink"></a></h2><p>Execution time for a simulation of 10s duration with logging the state every 20ms. Relative and absolute tolerance: <span>$1.0^{-6}$</span>. CPU: Ryzen 9 7950X.</p><table><tr><th style="text-align: left">Test-case</th><th style="text-align: center">Lines of code (LOC) Julia</th><th style="text-align: center">LOC Python</th><th style="text-align: center">Time Julia [ms]</th><th style="text-align: center">Time Python [ms]</th></tr><tr><td style="text-align: left">Falling mass (1)</td><td style="text-align: center">35</td><td style="text-align: center">56</td><td style="text-align: center">0.17</td><td style="text-align: center">2.6</td></tr><tr><td style="text-align: left">Non-linear Spring damper (3)</td><td style="text-align: center">49</td><td style="text-align: center">83</td><td style="text-align: center">0.64</td><td style="text-align: center">20</td></tr><tr><td style="text-align: left">ditto with callbacks (3b, 3c)</td><td style="text-align: center">58</td><td style="text-align: center">103</td><td style="text-align: center">0.8</td><td style="text-align: center">31</td></tr><tr><td style="text-align: left">swinging tether, 5 segments (5)</td><td style="text-align: center">105</td><td style="text-align: center">150</td><td style="text-align: center">2.7</td><td style="text-align: center">47</td></tr><tr><td style="text-align: left">Dyneema tether, reeling out (6)</td><td style="text-align: center">121</td><td style="text-align: center">160</td><td style="text-align: center">2.1</td><td style="text-align: center">9300</td></tr><tr><td style="text-align: left">ditto with callbacks (6c)</td><td style="text-align: center">167</td><td style="text-align: center"></td><td style="text-align: center">4.2</td><td style="text-align: center"></td></tr><tr><td style="text-align: left">Dyneema, reeling out with drag (7)</td><td style="text-align: center">169</td><td style="text-align: center"></td><td style="text-align: center">1.8</td><td style="text-align: center"></td></tr></table><p><strong>Tradeoff Julia vs Python:</strong> In Julia, the code is compiled before it is executed, which can cause about one to 10 seconds delay when running a simulation the first time, but speeds up the execution a lot afterward. In addition, Julia can run fully multithreaded, Python cannot make use of multiple CPU cores with multithreading because of the global interpreter lock. </p><p>Furthermore, the IDA solver is hardly capable of handling a simulation with the very stiff Dyneema tether. The Julia solvers achieve about 5000 times the performance.</p><p>See also: <a href="https://ufechner7.github.io/2022/08/13/why-julia.html">Why Julia?</a> and read the <a href="https://ufechner7.github.io/Tethers.jl/dev/">documentation</a> or go straight to the <a href="https://ufechner7.github.io/Tethers.jl/dev/examples/">examples</a>.</p></article><nav class="docs-footer"><a class="docs-footer-nextpage" href="theory/">Theory »</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.7.0 on <span class="colophon-date" title="Sunday 29 September 2024 10:45">Sunday 29 September 2024</span>. Using Julia version 1.10.5.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
Loading

0 comments on commit 0da0e04

Please sign in to comment.