Files
pylib/docs/build/html/pylib.numerical.ode_model.html
2026-01-22 18:50:07 +01:00

255 lines
11 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>pylib.numerical.ode_model module &#8212; pylib 2019.12.21 documentation</title>
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/custom.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/language_data.js"></script>
<script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="pylib.data module" href="pylib.data.html" />
<link rel="prev" title="pylib.numerical.ode module" href="pylib.numerical.ode.html" />
<link rel="stylesheet" href="_static/custom.css" type="text/css" />
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
</head><body>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="module-pylib.numerical.ode_model">
<span id="pylib-numerical-ode-model-module"></span><h1>pylib.numerical.ode_model module<a class="headerlink" href="#module-pylib.numerical.ode_model" title="Permalink to this headline"></a></h1>
<p>Mathmatical models governed by ordinary differential equations.</p>
<p>Describes initial value problems as systems of first order ordinary
differential equations.</p>
<dl class="field-list simple">
<dt class="field-odd">Date</dt>
<dd class="field-odd"><p>2020-01-08</p>
</dd>
</dl>
<span class="target" id="module-ode_model"></span><dl class="function">
<dt id="pylib.numerical.ode_model.disk">
<code class="sig-name descname">disk</code><span class="sig-paren">(</span><em class="sig-param">d</em>, <em class="sig-param">e</em>, <em class="sig-param">T</em>, <em class="sig-param">method=''</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pylib/numerical/ode_model.html#disk"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pylib.numerical.ode_model.disk" title="Permalink to this definition"></a></dt>
<dd><p>Rotation of an eccentric disk.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>d</strong> (<em>float</em>) diameter</p></li>
<li><p><strong>e</strong> (<em>float</em>) eccentricity</p></li>
<li><p><strong>T</strong> (<em>float</em>) torque</p></li>
<li><p><strong>method</strong> the method to use, default = .</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><p>disk function. This function is independent of the time.</p>
<ul class="simple">
<li><p>For method = : f(x, t=0) -&gt; (xp1, xp2, xp3, xp4, xp5, xp6).
x is (x, y, phi, x, y, phi) and the return values are (x,
y, phi, x, y, phi)</p></li>
<li><p>For method = nm: f(xn, xpn, xppn, t=0) -&gt; (N, dN, dNp, dNpp).
xn are the values of the function (x, y, phi), xpn are first
derivative values of the function (x, y, phi) and xppn are
the second derivative values of the function (x, y, phi).
The return values are (N, dN, dNp, dNpp)</p></li>
<li><p>For method = nmmdk: f(xn, xpn, xppn, t=0) -&gt;
(rm, rmx, rmxpp, rd, rdx, rdxp, rk, rkx, f).
xn are the values of the function (x, y, phi), xpn are first
derivative values of the function (x, y, phi) and xppn are
the second derivative values of the function (x, y, phi).
The return values are (rm, rmx, rmxpp, rd, rdx, rdxp, rk, rkx,
f)</p></li>
</ul>
</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>function</p>
</dd>
</dl>
<p>Model</p>
<blockquote>
<div><div class="math notranslate nohighlight">
\[\begin{split}\begin{vmatrix}
\ddot{x} + \cos(\varphi)\ddot{\varphi} + 2d \,\dot{x} - \sin(\varphi) \,\dot{\varphi}^2 + 2d\cos(\varphi)\, \dot{\varphi} + x &amp;=&amp;
0 \\
\ddot{y} - \sin(\varphi)\ddot{\varphi} + 2d \,\dot{y} - \cos(\varphi) \,\dot{\varphi}^2 + 2d\sin(\varphi)\, \dot{\varphi} + y &amp;=&amp;
0 \\
\ddot{\varphi} + e\,y\sin(\varphi) - e\,x\cos(\varphi) &amp;=&amp; t
\end{vmatrix}
\\
\begin{vmatrix}
\ddot{x} + \cos(\varphi)\ddot{\varphi} &amp;=&amp;
-2d \,\dot{x} + \sin(\varphi) \,\dot{\varphi}^2 -2d\cos(\varphi)\, \dot{\varphi} - x \\
\ddot{y} - \sin(\varphi)\ddot{\varphi} &amp;=&amp;
-2d \,\dot{y} + \cos(\varphi) \,\dot{\varphi}^2 -2d\sin(\varphi)\, \dot{\varphi} - y \\
\ddot{\varphi} &amp;=&amp; t - e\,y\sin(\varphi) + e\,x\cos(\varphi)
\end{vmatrix}\end{split}\]</div>
<div class="math notranslate nohighlight">
\[\begin{split}\mathbf{M}(\mathbf{x}) \cdot \mathbf{\ddot{x}} &amp;=
\mathbf{f}(\mathbf{x}, \mathbf{\dot{x}})
\\
\begin{bmatrix}
1 &amp; 0 &amp; \cos \varphi \\
0 &amp; 1 &amp; -\sin \varphi \\
0 &amp; 0 &amp; 1
\end{bmatrix} \cdot
\begin{bmatrix}
\ddot{x} \\ \ddot{y} \\ \ddot{\varphi}
\end{bmatrix} &amp;= \begin{bmatrix}
-2d \,\dot{x} + \sin(\varphi) \,\dot{\varphi}^2 -2d\cos(\varphi)\, \dot{\varphi} - x \\
-2d \,\dot{y} + \cos(\varphi) \,\dot{\varphi}^2 -2d\sin(\varphi)\, \dot{\varphi} - y \\
t - e\,y\sin(\varphi) + e\,x\cos(\varphi)
\end{bmatrix}\end{split}\]</div>
</div></blockquote>
<p>returns</p>
<blockquote>
<div><div class="math notranslate nohighlight">
\[\begin{split}x_1 &amp;= x &amp;\quad x_4 &amp;= \dot{x}_1 = \dot{x} &amp;\quad \dot{x}_4 &amp;= \ddot{x} \\
x_2 &amp;= y &amp;\quad x_5 &amp;= \dot{x}_2 = \dot{y} &amp;\quad \dot{x}_5 &amp;= \ddot{y} \\
x_3 &amp;= \varphi &amp;\quad x_6 &amp;= \dot{x}_3 = \dot{\varphi} &amp;\quad \dot{x}_6 &amp;= \ddot{\varphi} \\\end{split}\]</div>
<div class="math notranslate nohighlight">
\[\begin{split}\dot{q} &amp;= f(x) \\
\begin{bmatrix}
\dot{x}_1 \\
\dot{x}_2 \\
\dot{x}_3 \\
\dot{x}_4 \\
\dot{x}_5 \\
\dot{x}_6
\end{bmatrix} &amp;= \begin{bmatrix}
x_4 \\
x_5 \\
x_6 \\
\begin{bmatrix}
1 &amp; 0 &amp; \cos x_3 \\
0 &amp; 1 &amp; -\sin x_3 \\
0 &amp; 0 &amp; 1
\end{bmatrix}^{-1} \cdot \begin{bmatrix}
-2d \,x_4 + \sin(x_3) \,x_6^2 -2d\cos(x_3)\, x_6 - x_1 \\
-2d \,x_5 + \cos(x_3) \,x_6^2 -2d\sin(x_3)\, x_6 - x_2 \\
t - e\,x_2\sin(x_3) + e\,x_1\cos(x_3)
\end{bmatrix}
\end{bmatrix}\end{split}\]</div>
</div></blockquote>
<p>Three explicit differential equations of order 2 reducted to a
system of 3x2 first-order differential equations.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="pylib.numerical.ode.html#pylib.numerical.ode.newmark_newtonraphson" title="pylib.numerical.ode.newmark_newtonraphson"><code class="xref py py-meth docutils literal notranslate"><span class="pre">pylib.numerical.ode.newmark_newtonraphson()</span></code></a> and
<a class="reference internal" href="pylib.numerical.ode.html#pylib.numerical.ode.newmark_newtonraphson_mdk" title="pylib.numerical.ode.newmark_newtonraphson_mdk"><code class="xref py py-meth docutils literal notranslate"><span class="pre">pylib.numerical.ode.newmark_newtonraphson_mdk()</span></code></a></p>
</div>
</dd></dl>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h1 class="logo"><a href="index.html">pylib</a></h1>
<h3>Navigation</h3>
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1 current"><a class="reference internal" href="modules.html">pylib</a><ul class="current">
<li class="toctree-l2 current"><a class="reference internal" href="pylib.html">pylib package</a><ul class="current">
<li class="toctree-l3 current"><a class="reference internal" href="pylib.html#subpackages">Subpackages</a><ul class="current">
<li class="toctree-l4 current"><a class="reference internal" href="pylib.numerical.html">pylib.numerical package</a><ul class="current">
<li class="toctree-l5 current"><a class="reference internal" href="pylib.numerical.html#submodules">Submodules</a><ul class="current">
<li class="toctree-l6"><a class="reference internal" href="pylib.numerical.fit.html">pylib.numerical.fit module</a></li>
<li class="toctree-l6"><a class="reference internal" href="pylib.numerical.integration.html">pylib.numerical.integration module</a></li>
<li class="toctree-l6"><a class="reference internal" href="pylib.numerical.ode.html">pylib.numerical.ode module</a></li>
<li class="toctree-l6 current"><a class="current reference internal" href="#">pylib.numerical.ode_model module</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="pylib.html#submodules">Submodules</a></li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="relations">
<h3>Related Topics</h3>
<ul>
<li><a href="index.html">Documentation overview</a><ul>
<li><a href="modules.html">pylib</a><ul>
<li><a href="pylib.html">pylib package</a><ul>
<li><a href="pylib.numerical.html">pylib.numerical package</a><ul>
<li>Previous: <a href="pylib.numerical.ode.html" title="previous chapter">pylib.numerical.ode module</a></li>
<li>Next: <a href="pylib.data.html" title="next chapter">pylib.data module</a></li>
</ul></li>
</ul></li>
</ul></li>
</ul></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
&copy;2019, Daniel Weschke.
|
Powered by <a href="http://sphinx-doc.org/">Sphinx 2.2.1</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>
|
<a href="_sources/pylib.numerical.ode_model.rst.txt"
rel="nofollow">Page source</a>
</div>
</body>
</html>