Hi Jason, thanks a lot for the help.
I simplified a lot the definitions, and used directly the velocities in
the definitions.
So the KanesMethod class can be instanciated, and the `to_linearizer`
method works. The only issue I'm left with is that the M, A, B matrices
output by the `linearizer.linearize()` are not consistent with the
equations of motion - when you compare the f_3 equation with the
uquations from M[dot q, dot u] = A[q, u]: the constant term is droped -
compare cells In [8] and In [10] & In [11] on the notebook bellow:
http://nbviewer.ipython.org/github/glyg/Notebooks/blob/master/kt_sim/minimum%20Linear%20Force%20Velocity.ipynb
I'm not sure if this is my fault, or just that the linearizer wont work
in my case because of the form of the contraint...
Best,
Guillaume
Le 12/01/2015 19:10, Jason Moore a écrit :
I meant: p1.set_vel(N, u1 * N.x)
Jason
moorepants.info <http://moorepants.info>
+01 530-601-9791
On Mon, Jan 12, 2015 at 10:08 AM, Jason Moore <[email protected]
<mailto:[email protected]>> wrote:
Some notes:
- Since you specified your kinematic relations as u = q', then you
should set your velocities with u instead of q, for example:
p1.set_vel(N, u1d * N.x)
- I doubt that you need to specify any velocity constraints and
thus you will not have any dependent speeds. You've defined ell as
some new coordinate, but do not add it as an independent
coordinate. I don't think this is correct. It will likely work if
you just remove the coordinate constraint stuff.
Jason
moorepants.info <http://moorepants.info>
+01 530-601-9791 <tel:530-601-9791>
On Mon, Jan 12, 2015 at 5:12 AM, Guillaume Gay <[email protected]
<mailto:[email protected]>> wrote:
Hi,
I'm trying to use sympy KanesMethod to model biological
assemblies (i.e. the mitotic spindle).
Molecular motors in biology follow linear force velocity
relationships, such that F = F_max(1 -ld/V_max) where ld is
the relative speed of the two points on which the force is
applied (distant of l).
I strugle to implement this in the Kanes formalism... I tried
various things:
* constraint the generalized speed as u = (V_max - ld)
* declare the above relation in the kinetic differential equation
In both cases, the `to_linearizer` method rises a:
ValueError: Cannot have dynamicsymbols outside dynamic forcing
vector.
* use directly ld as the speed, and declare it as auxiliary
Then I have a shape mismatch when I try to linearize.
Bellow is a notebook with the code:
http://nbviewer.ipython.org/github/glyg/Notebooks/blob/master/kt_sim/minimum%20Linear%20Force%20Velocity.ipynb
Best,
Guillaume
--
Guillaume Gay, PhD
http://damcb.com
43 rue Horace Bertin
13005 Marseille
+33 953 55 98 89 <tel:%2B33%20953%2055%2098%2089>
+33 651 95 94 00 <tel:%2B33%20651%2095%2094%2000>
n°SIRET 751 175 233 00020
--
You received this message because you are subscribed to the
Google Groups "sympy" group.
To unsubscribe from this group and stop receiving emails from
it, send an email to [email protected]
<mailto:sympy%[email protected]>.
To post to this group, send email to [email protected]
<mailto:[email protected]>.
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit
https://groups.google.com/d/msgid/sympy/54B3C853.5090405%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google
Groups "sympy" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected]
<mailto:[email protected]>.
To post to this group, send email to [email protected]
<mailto:[email protected]>.
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit
https://groups.google.com/d/msgid/sympy/CAP7f1AhCfvka0rhDA3%2BuboCbk-8e3eWF8yHQaJYUQZ%2B6w%3DV_jA%40mail.gmail.com
<https://groups.google.com/d/msgid/sympy/CAP7f1AhCfvka0rhDA3%2BuboCbk-8e3eWF8yHQaJYUQZ%2B6w%3DV_jA%40mail.gmail.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.
--
Guillaume Gay, PhD
http://damcb.com
43 rue Horace Bertin
13005 Marseille
+33 953 55 98 89
+33 651 95 94 00
n°SIRET 751 175 233 00020
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit
https://groups.google.com/d/msgid/sympy/54B4DB47.3020100%40gmail.com.
For more options, visit https://groups.google.com/d/optout.