Shuffleboard Modeling

Activity Information

Learning Goals

• Apply the principles of constant-force motion in 1D ( HS-PS2-1)
• Develop a computational model to show how a frictional force changes the velocity of an object

Prior Knowledge Required

• Vector and Scalar Quantities
• Newton’s 2nd Law
• Kinematic Equations
• Friction Equation

Code Manipulation

• Modify existing code
• Translate equations into code

Activity

Handout – Shuffleboard Modeling

Your team of shuffleboard technicians has been given the task of modeling a new type of shuffleboard surface. Unlike the old school boards with a uniform surface, the two ends of your new board have different properties. The “shooter” end is made of a special composite that is essentially frictionless. The coefficient of friction is so close to zero, you may as well call it zero. The “target” end, created in your R & D department, is a material that can be
custom ordered with a coefficient of your choosing. Clients will order that material manufactured to their specifications. The folks in sales want your team to produce a computer simulation that they can use to demonstrate the operation of the new shuffleboard to prospective clients. Your model should illustrate frictionless movement for the shuffleboard puck starting at one end of the board, and then slowing down on the second half where a frictional force will be acting on the puck. Your code should be written so that it will be easy for the sales rep to change the initial velocity and the coefficient of friction for the target end. They have also asked that your model simultaneously produces a
graph of the velocity of the puck while it is moving.

Sales have been a bit sluggish for Acme Shuffleboard, Inc. over the past few months, so your model is especially important to help boost the company’s bottom line. Good luck.

Code

``````GlowScript 2.9 VPython

#the green part is frictionless, the yellow part will have friction

box1=box(pos=vec(-103,0,0), size=vec(206,10,20), color=color.green)
box1=box(pos=vec(103,0,0), size=vec(206,10,20), color=color.yellow)
puck=box(pos=vec(-198,7,0), size=vec(10,4,6), color=color.red)

#vpuck is the initial velocity of the puck
#puckm is the initial mass of the puck
#mu is the coefficient of kinetic friction
#frict is the frictional force acting on the puck. It is currently set to 0.
#how will you calculate the correct value for the frictional force?
vpuck = vector(40,0,0)
puckm = 20
mu = 0
frict = vector(0,0,0)

#Set up timing data--dt is the small time increment, tf is the end time
dt = 0.01
t = 0
tf = 10

#the following lines set the graph parameters for plotting the velocity graph
gd = graph(width=600, height=350,title='<b>Velocity</b>',xtitle='<i>time (s)</i>', ytitle='<i>velocity m/s</i>',foreground=color.black, background=color.white,xmin=0, xmax=10, ymin=-5, ymax=60)
f1 = gcurve(color=color.cyan) # a graphics curve

#creating the animation
# the first while loop moves the puck along the frictionless portion.
while puck.pos.x<-5:
rate(180)
puck.pos = puck.pos + vpuck*dt
t = t + dt
f1.plot(t,vpuck.x)

#the second while loop illustrates the puck movement in the frictional part
#what line will you have to add to make the puck slow down due to friction?
while t<tf:
rate(180)
#delete this comment line and write code for updating the velocity of the puck
puck.pos = puck.pos + vpuck*dt
t = t + dt
f1.plot(t,vpuck.x)

#something new--an "if" statement.
#once the puck stops, we want it to stay stopped
#so if the velocity vpuck is 0, don't change anything.
if vpuck.x<=0:
puck.pos = puck.pos
vpuck.x = 0
t = t + dt
f1.plot(t,vpuck.x)

``````

Handout

The net force on the puck in the region without friction is zero. The net force on the puck in the region with friction can be given by:

Fnet = Ffric = μN = μmg => ma = -μmg => a = -μg

This can be used to update the velocity of the puck with the kinematic equation:

vf = vi +at => vf = vi -μgt

Now we need to implement this in the code. Let’s change the line that defines fric to the friction equation:

``frict = vector(-mu*puckm*g,0,0) # only in the x-direction``

Now we need to use the force to update the velocity. In the second while loop, we can add this before the position update equation:

``````while t<tf:
rate(180)
vpuck = vpuck + (frict/puckm)*dt
puck.pos = puck.pos + vpuck*dt
t = t + dt
f1.plot(t,vpuck.x)``````

Code

``````GlowScript 2.9 VPython

#the green part is frictionless, the yellow part will have friction

box1=box(pos=vec(-103,0,0), size=vec(206,10,20), color=color.green)
box1=box(pos=vec(103,0,0), size=vec(206,10,20), color=color.yellow)
puck=box(pos=vec(-198,7,0), size=vec(10,4,6), color=color.red)

#vpuck is the initial velocity of the puck
#puckm is the initial mass of the puck
#mu is the coefficient of kinetic friction
#frict is the frictional force acting on the puck. It is currently set to 0.
#how will you calculate the correct value for the frictional force?
vpuck = vector(40,0,0)
puckm = 20
mu = 0.9
g = 9.81
frict = vector(-mu*puckm*g,0,0)

#Set up timing data--dt is the small time increment, tf is the end time
dt = 0.01
t = 0
tf = 10

#the following lines set the graph parameters for plotting the velocity graph
gd = graph(width=600, height=350,title='<b>Velocity</b>',xtitle='<i>time (s)</i>', ytitle='<i>velocity m/s</i>',foreground=color.black, background=color.white,xmin=0, xmax=10, ymin=-5, ymax=60)
f1 = gcurve(color=color.cyan) # a graphics curve

#creating the animation
# the first while loop moves the puck along the frictionless portion.
while puck.pos.x<-5:
rate(180)
puck.pos = puck.pos + vpuck*dt
t = t + dt
f1.plot(t,vpuck.x)

#the second while loop illustrates the puck movement in the frictional part
#what line will you have to add to make the puck slow down due to friction?
while t<tf:
rate(180)
vpuck = vpuck + (frict/puckm)*dt
puck.pos = puck.pos + vpuck*dt
t = t + dt
f1.plot(t,vpuck.x)

#something new--an "if" statement.
#once the puck stops, we want it to stay stopped
#so if the velocity vpuck is 0, don't change anything.
if vpuck.x<=0:
puck.pos = puck.pos
vpuck.x = 0
t = t + dt
f1.plot(t,vpuck.x)``````