Picture
By modifying the code of the tutorial students will model their first real physical system: A simple bouncy ball

Outcomes

- Modify tutorial code so that the bouncy ball obeys free-fall kinematics and bounces perfectly elastically
- Measure the rebound height of a bouncy ball dropped from 1 m
- Modify the code to reproduce this rebound height and predict subsequent rebound heights
- Explain why modifications work using kinematics equations

Lesson Plan

1.  Students load their tutorial program from the previous class and run it.

2. Teacher circulates to ensure that students all have working tutorial code and answers questions

3. Students modify code so that there is only a floor and a ball that falls to the floor and bounces

4. Students modify (or teacher shows students) how to modify code to incorporate gravity. The specific code I added was:
ball.velocity.y = ball.velocity.y - 9.8*deltat
5. If Students used modified code given by the instructor, the instructor should informally assess that students can explain the how the code works line by line. Here is the code actually used
from visual import *
ball = sphere(pos=(-5,10,0), radius=0.5, color=color.cyan)
wallB = box(pos=(0,0,0), size=(12,0.2,12), color=color.green)
ball.velocity = vector(1,0,0)
ball.trail = curve(color=ball.color)
deltat = 0.005
t=0
while t < 12:
    rate(100)
    if ball.pos.y < wallB.pos.y:
#note to have the ball bounce realistically change the code below:
    ball.velocity.y = - ball.velocity.y
# to this:ball.velocity.y = C*ball.velocity.y
# where 'C' is a tuneable parameter less than 1
    ball.velocity.y = ball.velocity.y - 9.8 * deltat
    ball.pos = ball.pos + ball.velocity*deltat
    ball.trail.append(pos=ball.pos)
    print (t,ball.pos.y)
    t = t + deltat
6. Students obtain a bouncy ball and a meter stick. Students drop the bouncy ball from a height of 1 m and measure its rebound height a number of times and average

7. Students then tune the parameter 'C' (see code above) so that the program reproduces the first bounce height. They do this by checking the printout in the python shell.

8. Students verify that the second and third bounce by the ball has been reproduced by the python code.

9. The instructor should ask students to explain why the parameter
C has the value it does. Ask them to explain this in terms of either kinematics, energy conservation, or other physics formulas they might find useful.

10. (Answer Key, For teacher's eyes only) The tunable parameter 'C' is the squareroot of the ratio of sequential heights. This can be shown using conservation of energy and a bar graph of the real experiment, or by using kinematics.

11. Once the students complete their code and explanations they may want to play with their code and modify it for the sheer enjoyment of it. This should be encouraged. ;-)

Before Class

Picture
1. Purchase Bouncy Balls. Here is where I got mine

2. Judgement call: Think about if you want them to create their own code, or do you want to give them code? My experience has been that it was really hard for them. They were able to understand the code, but could not invent it themselves. Below is the completed code for a bouncy ball that bounces perfectly elastically.

elastic.bouncy.ball.py
File Size: 0 kb
File Type: py
Download File

3. Judgement call: Think about whether you want the students to modify the code to have the ball rebound realistically, or whether you want to give them the code with the arbitrary parameter that they tune.

4. You might want to think about front-loading: It might be helpful to have a discussion about inelastic vs. elastic bouncing. Having students draw energy bar graphs of the ball at the top and bottom of each bounce might be helpful for students.

5. You might want to think about front-loading: Students may also want to take an approach that uses kinematics to solve a problem being dropped or being launched from the ground

6. Lesson Plan Summary:
lesson.plan.summary.doc
File Size: 29 kb
File Type: doc
Download File

7. Answer Key to explaining code:
answer.key.pdf
File Size: 89 kb
File Type: pdf
Download File




Leave a Reply.

    Riaz Abdulla

    I hope that this blog becomes a useful resource for teachers to find lesson plans, code, and ideas for getting their high school students to explore the science of Mechanics via computational physics and Visual Python.

    Archives

    June 2012

    Categories

    All