Jupyter notebook seems stuck at trigsymp()

41 views
Skip to first unread message

Nuno

unread,
Aug 2, 2016, 2:45:52 PM8/2/16
to sympy

I have created a jupyter notebook where I'm defining a multibody system in order to obtain its kinematics and dynamics.

 I use the KanesMethod (from sympy) in order to obtain the equations of motion of the system.


However when I try to use trigsimp() on the mass matrix obtained, it seems to get stuck there forever (displaying an 'In[*]' next to that line).


The line is: 'mass_matrix = trigsimp(kane.mass_matrix)'

Here's a screenshot:https://gyazo.com/8c6ac6cefd87b889a4ed8f9a9c3077d9

(The python process is using ~30% of the processor)


The matrix is a 6x6 matrix, but some of the elements have lot's of trignometric functions since there are 3 reference frames with 3D rotations in order to each other.


So what's happening? I have no experience with sympy, so I'm a little lost.

(I'm sorry if this is a duplicate, but I couldn't find my first publish and I wanted to add more info)

Jason Moore

unread,
Aug 3, 2016, 7:57:12 PM8/3/16
to sy...@googlegroups.com
Nuno,

Simplification of very large expressions is typically not a good idea due to the time needed for computation. Unless you have a specific need to simplify the resulting equations, I'd avoid it.

--
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 sympy+un...@googlegroups.com.
To post to this group, send email to sy...@googlegroups.com.
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/0f1d7a62-4f2e-473d-8a44-fe6aaf403f22%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Nuno

unread,
Aug 5, 2016, 12:28:21 PM8/5/16
to sympy
Ok, thanks so much for answering.
Reply all
Reply to author
Forward
0 new messages