The buggy lab is a staple of modeling and many other physics classes. Take a bunch of tumble buggys, modify a few to run slow (short one of the batteries by wrapping it in foil), and then send students off devise an experiment to measure the velocity of their particular buggy. You can read a more thorough description of this experiment on Kelly’s blog.
I want to describe a particular variation on this lab I’ve created that helps students to see the power of computational thinking. Often, I’ve concluded the buggy lab by asking students to figure out, on the basis of their whiteboards, which buggy would win a race. Then, after the class reaches agreement, we test it. This is a great question I got from Frank Noschese that really pushes students to begin to put their newfound CVPM knowledge to use. But I’d like to push this even further and get students to make their first foray into computational modeling.
I’ve written a lot of about computational thinking and modeling before, and I’ve sometimes had students modify a ready made program so that the motion of the buggy on the screen matches the motion of their actual cart. This only takes two lines of editing (the position and velocity statements), and I think it shows students that they can begin to understand a fairly complicated program just by diving in and playing around.
Still, creating a computer model a single cart doesn’t really do much to highlight the power of computational thinking. What if instead, we could somehow run a race of all of the carts together on the computer? Given that the buggies have a tendency to curve, which often makes a race impossible, being able to create a simulated race where the buggies would move in a straight line is a clear example of building a model that disregards unimportant features (the curving motion) and allows us to predict and visualize a race we might not even be able to carry out in real life.
I don’t really want to force students to learn how to make 8 objects move in their program on the second day of class when many of them have no previous exposure to programming.
What if there were a way to automate this? What if I could write a program to take the student’s changes from their individual buggy code and merge them into a single program to simulate the race? Now that would highlight computational thinking.
Here’s how I managed to get this working.
- Students modify their code to simulate the motion of the buggy they studied.
- Students then cut and paste the two lines of code they modified into a google form.
- A python program running on my machine downloaded the form entries from all of the students and then writes a python program that models the race.
Here’s a video of what the merged program looks like that recreates the original experiment with all of the carts on the same table.
Here’s a video of what the race program looks like—the carts have all be turned to move int he same direction and start from the origin.
How this works
Thanks to Josh, I learned about the awesome googlecl (google command line) interface which lets you do almost anything you can do with google apps on the command line. In this case, I’d like to access and download the form data from my google form into a cdv file.
To do this you must first install googlecl, which also requires you install the Google data python client, gdata. This took a bit of fiddling, as I found some incompatibilities between various versions of googlecl and data, but eventually, I found googlecl-0.9.13 and data 2.0.14 are compatible.
With this installed you can now have python make a system call along the following lines:
os.system('/Applications/googlecl-0.9.13/build/scripts-2.7/google docs get CVPMProgramResponses --format csv /Users/jburk/Dropbox/_archive/_Teaching/_SAS\ Teaching/Courses/Honors\ Physics\ 13-14/01-CVPM/Python')
This is simply telling the os to run the googlecl app, and has it get the responses from the google doc CVPMProgramResponses in csv format and then save the on my machine.
After that, I wrote a python program to generate the two programs. I’ve put all of the necessary python files in this github repo. Be forewarned—this is mostly hacked spaghetti code I wrote to get the program working like I wanted.
A gentle introduction
My hope is that this will be a short 5-10 minute introduction to VPython. Students will see that they can modify large programs and observe how easy it is to manipulate objects in VPython. They’ll also get a taste of the real power of computing to merge all of our programs into a single program and create a more simulation that they can then play with and analyze.
Matt Greenwolfe has an outstanding bridging activity to help students move develop the balanced forces model and see a synthesis between system schemas, free body diagrams and velocity vs time graphs.
Here’s the packet that describes the activity:
I’ve tried using this activity for a few years now. A couple of years ago, I gave each student a box with a brick, and had them work through these questions in groups of 3 or 4. The problem is, pushing a box with a brick in it along a concrete floor can lead to students to lots of misconceptions, and it was very hard for students to carry out qualitative experiments that would give them real insight.
Last year, we didn’t even give the students boxes, and simply asked them to imagine the situations. This was both better and worse—students worked more quickly since they weren’t doing any of the experimentation my students did the previous year that led them off track, they were generally developing explanations that led to more fruitful discussions in our whiteboarding session.
Still, I didn’t feel right asking students to do a 5 page whiteboarding activity that didn’t involve any real experimentation. In a move that I should have done years ago, I decided to ask Matt how he does this activity, and he wrote back this wonderful response that I have reposted below with his permission.
I have an actual cinder block – quite heavy. I place it in the cardboard box with the rubber bottom and get a strong looking boy to “give it a shove across the floor.” It never makes it across the whiteboard circle to the other side. I give them the instructions verbally and they draw their force diagrams on a whiteboard. So a lot of the misconceptions are negotiated during group work or during class discussion. We may put a motion detector on the box to resolve any questions about the motion. I request that the velocity vs. time graphs be approximated by straight-line segments – no curves. The issue comes up about whether there is still a force from the person after the shove. I’ve learned to validate the idea that **something** was transferred from person to box, but it’s not force, and usually someone can talk about energy and/or momentum so we anticipate that coming up later. Then we continue in this vein with the cardboard, then it’s placed on an actually dry-ice slab. ¼ of a 50lb dry ice block makes a nice flat slab and you can place the heavy cinder block on it and it just glides across the floor. As Mark Schober says, “It’s heavy enough that they can feel inertia.” I have all the students push the cinder block around as it rides on the dry ice in order to feel the inertia with the lack of friction, and because it’s fun and memorable.
I used to treat the dry ice as if it were the frictionless case, but that wasn’t working well. So I added a fourth case where they imagine it as completely frictionless. That works better. They can see it as the limit of the sequence we’ve been going through.
Friction misconceptions come up, and it’s very instructive for them to see that the block is just as heavy, but now glides easily. As they try to explain things, they will even propose a velocity-dependent model of friction. I try to validate that as well, talking about how some friction – air or water (fluids) – acts like that, but not surface friction. The idea that the box is difficult to move because it is heavy also brings up directionality of forces and what it takes for a force to be balanced. I do some demos with ropes or with a force table to see if we can balance forces by pulling in a perpendicular direction.
So yes, if you just gave students a box to push, a ton of misconceptions would come up and they could arrive at wrong conclusions. But the point of designing the activity was to **get** those misconceptions to come up so that we could have an explicit class discussion about them and do some other demonstrations to dispel them. And digging back, I wanted to design an activity to do that because I found that leaving these misconceptions unaddressed prevented students from really understanding Newton’s First Law. I don’t think giving students individually or in groups a smaller box and smaller piece of dry ice would be effective. It’s the huge size of the cinder block that really makes it work.
I continue to think there’s real value in actually going through the sequence. With the packet, though, I tend not to refer to it during class except that some students need to read the instructions after I’ve given them verbally, and absent students can work through it on their own, then stop by to discuss with me and hopefully push the cinder block around a little. Without it written up like this, they would have greater difficulty catching up.
My slab of dry ice is cut out of a 50lb block at Air Gas Dry Ice. I bet you have something like that in Wilmington. The 10lb slab costs me about $20 and can be preserved in a cooler for a couple days and still be big enough to float the cinder block. The cinder block itself is probably close to 50lb.
One other concern I had about these particular 5 pages in the packet is that they are particularly text based, and can seem overwhelming to students at first glance. I also wanted students to see more of a connection between how the the velocity graph follows naturally from the free body diagram which follows naturally from the system schema. I did a bit of work to redesign the activity and came up with this:
Here’s a deceptively hard free body diagram problem: draw a free body diagram for a motorized cart moving at constant velocity. Even though these constant velocity buggies are staples of the first weeks of many physics classes, I’ve come to realize the free body diagrams for these buggies are more complicated than you might expect.
Because the cart is moving at a constant velocity, the net force has to be zero, but I’ve always wondered if there are any horizontal forces acting on the cart.
It could be that there’s a forward frictional force (we could call this traction) exerted by the table on the rotating rubber wheel, but then I struggled to think about what force would act in the backward direction to make the forces balanced. The car is moving to slowly for drag to be significant (though the drag force balance the forward frictional force of the road when a real sized car is traveling at highway speeds). Could it be a backward frictional force acting on the non driven wheels?
Thanks to a conversation with a few other physics teachers, we devised this ingenious experiment to test to see if there are any horizontal forces acting on the cart when it moves at constant velocity. We started by setting a board atop two metal cylinders to create a platform that felt no frictional force from the table, and would respond to any horizontal forces applied to the board. We also placed a whiteboard just above the board so that it wasn’t touching the board and the cart could roll at constant velocity from the whiteboard to the platform without a significant change in velocity.
I then made an alignment mark on the board and a stationary piece of paper, and allowed the cart to roll onto the board. If there is a frictional force, then we would see the board move in the direction of the frictional force acting on the board (and opposite the frictional force acting on the car, via Newton’s 3rd law).
Here is the video:
As you can see, there is no movement of the board when the cart travels onto the board from the whiteboard. Since the board stays at rest, we can conclude the cart does not exert any horizontal forces on the board when it is moving at constant velocity, and by Newton’s 3rd Law, the board isn’t exerting any horizontal forces on the cart. The cart’s free body diagram is just:
One other possibility exists that perhaps the rollers beneath the board are able to counteract a frictional force of the cart, which might be possible if the frictional force is small enough. However, we can rule this out by seeing that when the car comes to a stop on the board, the board moves forward, indicating a board experienced a forward frictional force during the time when the car was changing velocity.
This seems somewhat counterintuitive at first—aren’t the wheels pushing the car and making it go? If the frictional force is zero, then why is the motor necessary at all?
Here’s one more video that shows when the cart is accelerating forward, there is indeed a forward frictional force of the board acting on the cart. Both of these videos also make great examples of momentum conservation
When the car is going at constant velocity, the net torque and force on the wheel must be zero. this means that the traction force (F in the diagram) must equal the retarding force (f) in the diagram. The road can exert 2 forces on the tire since the the tire isn’t contacting the road in a single point, there is an area of contact (and this helps to understand some of Noah’s question about how the placement of a banana under one’s foot might cause you to fall forward or backward). The key idea is these are point objects, or points of contact, so you can have multiple forces at a single surface.
Maybe my first diagram was correct and the board exerts two forces (a traction force and a retarding force) on the back wheel of the cart that are exerted from two slightly different point on the wheel due to its deformation, but these two forces exactly cancel each other out and so we see no motion in the board. Or maybe instead this wheel really is ideal, the deformation is negligible and the the traction and retarding forces are zero.
Now I’m just confused. What do you think?
A comment on my last blog post from Neal reminded me of a problem that is part of the canon of the modeling curriculum:
Another idea related to energy scales and the energy density of gasoline… Try converting “miles per gallon” into units of area, the interpretation being, What if instead of having a tank of gas, my car slurped up the gas it needed as it drove along? How much gas would we need to drizzle along the road? WolframAlpha even provides some nice size comparisons… Shockingly, for a 40mpg car, the cross sectional area of that line of gasoline is on the order of a single pixel, or about 7 times the cross sectional area of a human hair.
I vaguely recall hearing this first as an example Feynman gave in some interview/lecture…
Here’s the question, which comes near the end of the worksheets devoted to introducing the pie chart representation.
First, this is a great problem since it really pushes student’s conception of energy to really think about thermal or dissipated energy, and they have to overcome their first instinct just to draw a pie chart that never changes and is all kinetic energy. When students first present this idea, someone asks “from the look of your pie chart, it seems like the truck could just go on forever…could it?”
Soon they end up drawing this answer:
It’s great that students have figured out that as the truck drives down the road the chemical energy of the gasoline is being transformed into thermal energy, and eventually, when the car runs out of gasoline, the kinetic energy will be transformed to thermal energy too, bringing the truck to a stop. But do they really understand what’s going on here? How quickly is this process occurring? And does it really matter if we’re talking about tractor trailer, truck, car, or motorcycle?
This problem is introduced very early in the energy unit, often before we even have a unit for energy, so I don’t want students to necessarily be able to calculate a quantitative rate at which these transfers are taking place, but what about adding a second question to this problem to probe a little bit more deeply:
I think this might generate even more thinking and discussion and lead to some real insights about energy that might help inform students future choices as energy consumers—something I find lacking in how I treat energy presently.
Finishing it off with this XKDC What if on bird droppings and miles per gallon that Neal referenced would be the icing on the cake.
I’ve been doing a bit more work with the Intro Physics course, and I think I’ve come away with two big ideas I want students to understand after our first unit.
- We ean model the flow of energy as flows between various forms within a system, and transfers via work, heat and radiation between the system and surroundings.
- We can build a general intuition about energy to gain intuition into the likelihood of various processes.
Let me illustrate these ideas a bit with some of the experimental work I’ve been doing. After 3 iterations, I’ve finally designed a halfway decent experiment to measure the energy in a battery. In a previous post, I proposed a prompt for starting this unit of having students compare the energy content in a peanut to the energy content in a battery.
Here’s a photo of my setup:
Yep—I’m using a graduated cylinder as a calorimeter with about 10ml of water, and I’ve simply shorted the battery with a thin piece of foil and a rubber band to maintain electrical contact. I know this isn’t the best experimental design, and I’m not really looking for an experiment to give very precise results—I simply want an easy experiment that will help us make a rough comparison between the energy of the battery and the energy of the peanut.
My experiment produced this very nice graph.
As you can see, the battery was able to quickly increase the temperature of 10mL the water by about 30°C in a little over 5 minutes. I haven’t done the peanut experiment in a while, but my recollection is that within this same amount of time, the peanut would have come close to boiling the water.
Hopefully, this would lead to all sorts of interesting discussions about why the energy content of the peanut is so much greater than that of the battery. Also, why is the battery so much more expensive if it contains such a tiny amount of energy?
I think we could also extend this further by devising other experiments, like connecting a genecon to a resistor immersed in the water, and seeing how much effort is required to raise the temperature of the water. Maybe we could also see how much the temperature of the water can be increased simply by holding the test tube in one’s fist.
When all of these experiments are done, I think we could could create a generalized energy scale on the board comparing the energy flows of various systems: a peanut, a battery discharging in water, 5 minutes of turning the genecon, 5 minutes of all out exertion on an exercise bike, 5 minutes of of a pot of water sitting on a stove on its maximum setting. At this point, we should be able to develop pie charts and LOL diagrams to talk specifically about the various types of energy (kinetic, thermal, gravitational interaction, and chemical interaction) in each system at various instants, and the flows of energy between the system and its surroundings between those instants.
Once we have this intuition, it might lead to a need for a more precise experiment—so we could bust out mechanical equivalent of heat experiment, or perhaps more simply by dropping shot inside a pac pipe and measuring the temperature increase. We could go back and precisely measure the energy in a battery with an ammeter and voltmeter. At this point we would probably introduce the Joule, and some specific numbers for various energy transformations e.g. it takes 4.18 J to increase the temperature of 1 g of water by 1°C. We won’t be introducing formulas for various energies at this time—we’ll save that for a later pass.
Hopefully we’ll also explore more questions along the way. Why does the temperature graph for the battery look the way it does? Why does is the rate of temperature change greatest when the temperature is greatest, and then as the water cools, the rate of temperature change is smaller? Can we develop a model of thermal energy to explain this?
By the end, I’d like students to be able to create LOL diagrams and pie charts to carefully explain the energy flows in any of the experiments we performed in the unit. I’d like them also to be able to easily debunk videos like this homemade coffee warmer I discovered previously, and make rough comparisons of the amount of energy that is wasted when you leave a window open on a cold 20° day compared to the energy wasted when leaving your lights on for the day, or calculate the mass of batteries you would need to deliver the same energy content as the gasoline in your gas tank.
So here are some questions I have:
- Does it make sense to jump right into full blown 1st law of thermodynamics stuff in this course, rather than starting with closed, isolated systems where the total energy is always constant? Is this too much?
- How much can we do with the matter model and other simulations to build a real understanding of thermal energy?
- Is it a good approach to go with simple, rough mythubster type experiments at this level?
- And maybe most importantly, are students going to be able to tease out and understand a law of conservation of energy from such a variety of experiments and demos?