Jason, I've responded below.
On Sat, Apr 7, 2012 at 2:00 AM, Jason Moore <[email protected]> wrote: > > The Vector class which is implemented does embed frame(s) as part of the > vector. If you check out the Vector class design you will see that it > contains the both scalars and reference frames. Keep in mind that Vectors > can be defined with respect to multiple frames and the current formulation > allows that. > Defining a vector with respect to multiple frames seems like a bad idea and could lead to errors. I could see how one might want to do that, though. I'd do it as a sum of two vectors each defined in the different frames though. > > I feel like the dynamic symbol could surely be expanded to be a function of > space and time, ultimately allowing for flexible bodies. Or some other > spatial symbol introduced. I'm sure there is a solution that will work > within the framework we've set up. But the reality is that it was not > designed from the ground up for flexible bodies and that may be an issue. > Probably not surmountable though. > It might be possible, by the dynamic symbol is kind of throughout the code so I expect that any solution will require a fair bit of work to extend it. > > I don't think the the current inertia structure precludes this at all. There > is nothing stopping anyone from writing a method which returns the inertia > matrix from the Inertia object with respect to a reference frame. You can > then do all the matrix operations on it that you want. > > I could imagine some thing like: > > I = inertia(N, 1, 2, 3) # create inertia dyadic > rotI = A.dcm(N).transpose() * I.matrix(N) * A.dcm(N) # rotI is just a matrix > > where I.matrix(N) returns the matrix form of the inertia with respect to a > given reference frame. > > but why do that when you can already simply type: > > I.express(A) > > for the same result. > > or > > I.matrix(A) > > if we add this new matrix method. And if I want to rotate the inertia matrix? How does one accomplish this with the current setup? > > Another option would be to allow the add, subtract, multiply, etc operators > for the inertia class interact with a matrix in the way you are asking. But > careful attention will be needed by the user to keep track of the which > reference frame the inertia is define with respect to as matrices do not > contain this information. > True, matrices don't contain the reference frames. But matrices work well for handling the parallel axis theorem or rotation to a different frame behind the scenes as well. Personally, I do keep track of what frame each thing is in. One of the problems I have with the current module is that it's hard to see what's happening since the module is designed to hide the complexity of the derivation. I'd like to peek at the details to verify things are correct. > > Adding new examples is also encouraged. Especially those from others' > perspectives. I can't exactly add new examples when I don't know what the module is doing or how to do various things. > > This can be done, it would just be a simple case of the general vector > construction that we have implemented. A vector function could be written to > do that. For example: > > v = vector(frameA, (a, b, c)) # would create a vector in frame A with a, b > and c as the i, j, k measure numbers. > > Keep in mind that our more general formulation allows one to create vectors > from components defined in as many reference frames as you want. > > v = a * N.x + b * A.y + c *H.z + d * N.y > I'd consider that to be the sum of three vectors in different reference frames (one in frame N, one in frame A and another in frame H). It's a big mess as it's written there and I'm sure I'd make a mistake. I certainly work with things like this, but I always try to convert to a base frame first. I'm assuming it's happening behind the scenes here. Cheers, Tim. -- Tim Lahey [email protected] PhD Candidate, Systems Design Engineering University of Waterloo -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
