Gas station without pumps

2011 October 22

Physics Lab 4: spring constants continued

Filed under: home school — gasstationwithoutpumps @ 11:38
Tags: , , , , , , ,

In Physics Lab 4: spring constants, I assigned a lab exercise to be done while I was away  in Washington, DC, measuring a dozen different springs, getting spring constants for each, and trying to relate the properties of the springs to their geometric properties.  I expected the lab to take up most of the 2-hour time slot, and I was looking forward to doing my own analysis of the data in parallel with the students.

The students did not get the lab completed, because the first hour of the time was spent on one student giving a Vpython tutorial to the student who had not programmed before, which was more urgent than the lab measurements.  In the remaining hour, they got all the geometric measurements made, but force measurements for only 2 of the springs. It turned out that only 11 of the 12 extension springs in the set are measurable with the simple setup of a hook in the wall and an hand-held force gauge with a hook, as one of the extension springs does not have loops on the end for the hooks.

So we’ll finish up the spring lab next week.  If we get the geometric data all properly entered into the computer this week, we may be able to type in the new data as it is measured and do the model building in the same session.

On a different physics-related topic, I’ve had further communication from Doug Brown about the velocity and acceleration computations in Tracker.  He even sent me the routines used and invited me to provide an implementation of my ideas for better velocity and acceleration estimation.  The code is in Java (which I have not learned yet, though it is close enough to C++ to be easy for me to read), but looks like it was written by a Fortran programmer, with all the input parameters packed into an array and manually unpacked at the beginning of the routine and all the outputs similarly packed into an array.  My Mac has Java already installed, but I don’t know whether it is the right version nor whether there are a lot of libraries I’ll have to install (the Tracker download installs everything needed to run Tracker, but I don’t know whether more installations are needed to compile Tracker).

The code has to handle missing position data, which is a bit messy to do well with the algorithm I was considering using, so I’m afraid I’ll need to get the full code from Doug Brown in order to do debugging—I’m unlikely to produce working code on my first attempt at a new language without being able to test it. He also computes the velocity and acceleration independently in different routines directly from the position data, which is not a good decomposition for the algorithm I was thinking of. My algorithm needs to do some decision making about where there are acceleration spikes between samples, and I don’t want to duplicate that code.  It would be simpler to have the 2 derivatives computed in one pass over the data, or to compute the accelerations from the velocities, rather than from the positions.  Either of these approaches would require some refactoring of the Tracker code, and I don’t know how messy that would be.

Learning (a little of) another programming language in order to implement the changes I proposed might delay my starting on the project, and I don’t think I can count on the existing code being good examples of Java programming style. If substantial refactoring would be required as well, I don’t think I’d want to take on this side project.

1 Comment »

  1. […] write up the modeling they’ll be doing of springs (see Physics Lab 4: spring constants and Physics Lab 4: spring constants continued).  I also had a good conversation about the physics curriculum with my airport limo […]

    Pingback by Home schooling weeks 5–8 « Gas station without pumps — 2011 October 25 @ 17:59 | Reply

RSS feed for comments on this post. TrackBack URI

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 )

Google photo

You are commenting using your Google 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 )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: