GSoC, Week 11

Well, it looks like there is a little over 1 full week left. This week’s post probably won’t be too long. I have a list of the last few things left to work on. The last few (big) pieces are: finishing code output, making sure you can bring non-contributing forces into evidence, and documentation work.

Finishing the code output is fairly straight forward; there needs to be some thought given to: output quantities, time to write to file, correct use of cse(), and C code output. I already have code which writes to a file MATLAB or SciPy code for numerical integration, with an option to use cse() on the expressions. Using cse() makes it take longer to generate the code, but the code can execute significantly faster (especially with the bike, where there are a few hundred “common sub-expressions”). Writing to a file unfortunately seems to cost a similar amount of time as printing to the screen; in the case of the bike, a few minutes. There also needs to be some though of how to handle output quantities. When numerically integrating equations of motion, it’s common to look at things like total energy, or a body’s angular momentum, etc. A nice, clean way to work these into the integration would be ideal. There is also the issue of dealing with things like matrices as part of the code output; one might want to output a matrix for doing animations. Deciding on how to accept a matrix and format it for output also needs to be done.

One of the advantages of Kane’s Method is that “non-contributing forces” do not come into the equations of motion. Non-contributing forces are things like normal forces, contact (but not friction forces) such as pinned or rolling connections, along with some others. Unfortunately, this can also be a disadvantage of Kane’s Method; frequently one wants to know the value of these forces, in cases like: checking that normal forces do not go negative, calculating friction forces, joint constraint forces, etc. There is a way of using Kane’s Method which involves introducing “auxiliary speeds” and “fictitious forces”; the auxiliary speeds are defined as zero, additional equations are introduced, and then the forces are solved for (in terms of the “real” speeds).  I need to go through this to make sure my code is compatible with it; additionally, I’ve never done this for a system with non-holonomic constraints though, so I’ll have to check this out too.

Finally I’m finishing up the documentation. I have to go through and check docstring and doctest coverage; for some functions I don’t know if a doctest makes sense, such as generating a file from the code output, and I’m not sure what to do here, so I’ll have to look into this. Also, I have to finish the sphinx-documentation; most of it is done, but I need to go through and make sure I’ve covered some of the newer things I’ve added.

I hope by the end of next week to sort out my branches; right now they’re a little messy; I want to make them a little more organized. I’m planning on going back to having just a pydy branch, and a pydy pull branch. I’ll just work with the pydy-pull brach this time. Previously I made that branch, continued development on pydy, but also made corrections to pydy-pul in request to people’s comments. With development “stopping”, I think that will make things a bit less confusing by just working with issues on the pydy-pull branch.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s