Re: [sympy] LagrangesMethod class for sympy.physics.mechanics. (#1460)

2012-08-09 Thread Gilbert Gede
+#THE FIRST TWO ROWS OF THE MATRIX +row1 = eye(n).row_join(zeros(n,n)) +row2 = zeros(n,n).row_join(self.mass_matrix) +if self.coneqs != None: +m = len(self.coneqs) +I = eye(n).row_join(zeros(n,n+m)) +below_eye =

Re: [sympy] LagrangesMethod class for sympy.physics.mechanics. (#1460)

2012-08-09 Thread Gilbert Gede
@@ -0,0 +1,253 @@ +__all__ = ['LagrangesMethod'] + +from sympy import diff, zeros, Matrix, eye, sympify +from sympy.physics.mechanics import (dynamicsymbols, ReferenceFrame, Point) + +class LagrangesMethod(object): @moorepants I will take care of that in another PR that I am going to open

Re: [sympy] LagrangesMethod class for sympy.physics.mechanics. (#1460)

2012-08-09 Thread Gilbert Gede
@moorepants I have to disagree with you on some of these points Jason. We just realized that the Kane class actually returns a negative mass matrix and a negative forcing vector. In all calculations that have been done, these cancel out and it goes unnoticed. Angadh and I discovered it today

Re: [sympy] LagrangesMethod class for sympy.physics.mechanics. (#1460)

2012-08-07 Thread Gilbert Gede
+ +self.lam_vec = Matrix([]) + + +# Creating the qs, qdots and qdoubledots + +q_list = list(q_list) +if not isinstance(q_list, list): +raise TypeError('Generalized coords. must be supplied in a list') +self._q = q_list +

Re: [sympy] Kinetic and potential energy functionality. (#1407)

2012-08-07 Thread Gilbert Gede
if not isinstance(bodylist, list): raise TypeError('System elements must be supplied as a list') else: -linearmomentum_sys = 0 +linear_momentum_sys = 0 Would returning S(0) here be better, to get a SymPy object? I've had other difficulties in mechanics

Re: [sympy] Kinetic and potential energy functionality. (#1407)

2012-08-07 Thread Gilbert Gede
if not isinstance(bodylist, list): raise TypeError('System elements must be supplied as a list') else: -angularmomentum_sys = 0 +angular_momentum_sys = 0 Same comment about S(0) --- Reply to this email directly or view it on GitHub:

Re: [sympy] LagrangesMethod class for sympy.physics.mechanics. (#1460)

2012-08-07 Thread Gilbert Gede
+self.lam_coeffs = -coneqs_mat.jacobian(qd) + +#Determining the third term in Lagrange's EOM +#term3 = ((self.lam_vec).transpose() * self.lam_coeffs).transpose() +term3 = self.lam_coeffs.transpose() * self.lam_vec + +#Taking the

[sympy] Reorganized sphinx docs in physics.mechanics (#1405)

2012-07-05 Thread Gilbert Gede
The layout of the documentation was a little mixed up, so now it is separated into a tutorial section and an API section. You can merge this Pull Request by running: git pull https://github.com/gilbertgede/sympy mechanics_doc_reorg Or you can view, comment on it, or merge it online at: