—-
Terminal Velocity
A coin is being dropped from the top of a building. When will it reach terminal velocity? How does the force of gravity compare to the force of air resistance? Take a look at the unfinished code and answer the following questions:
Now with your group, complete the provided code. Be sure to include arrows showing the magnitude of forces acting on the coin. As well, create a velocity vs. time graph and a forces vs. time graph (Pre-coding Questions 1 and 2). When your code is complete, answer the following questions:
Link
GlowScript 2.8 VPython #Window Setup scene.width = 500 scene.height = 400 #Objects ground = box(pos=vec(0,-250,0), size=vec(700,100,2), texture="https://images.pexels.com/photos/207204/pexels-photo-207204.jpeg?auto=compress&cs=tinysrgb&h=750&w=1260" ) coin = cylinder(pos=vector(0,0,0), axis=vector(0.5,0,0), radius=15.305, textures=textures.metal) coin.rotate(angle=90, axis=vector(1,1,1)) #Initial Object Properties and Constants (time and time step) g = vec(0,-9.81,0) #Acceleration due to Gravity coin_m = 0.01135 #mass of the object drag_co = 1.15 #Drag Coefficient of t = 0 #Initial Time dt = 0.01 #Time Step tf = 0 #Final Time air_density = 1.2754 #Density of the air coin_r = .015305 Fgrav = vec(0,0,0) Fdrag = vec(0,0,0) #Initial Velocity (coin_v) and Momentum Vectors (coin_p) #coin_v = #coin_p = #Create an arrow to visualize the particle's forces #Set up the graphs force_comparison_graph = graph(title='Comparison of Forces on a Coin Reaching Terminal Velocity',xtitle='time (s)',ytitle='Force (N)',fast=False,width=1000) velocity_graph = graph(title='Velocity of a Coin in Freefall Over Time',xtitle='time (s)', ytitle='Velocity (m/s)',fast=False,width=1000) #Drag and Fgrav and Fnet on the same plot Fdrag_f = gcurve(graph=force_comparison_graph,color=color.red,width=4,markers=False,label='Drag Force') Fgrav_f = gcurve(graph=force_comparison_graph,color=color.blue,width=4,markers=False,label='Fgrav') Fnet_f = gcurve(graph=force_comparison_graph,color=color.purple,width=4,markers=False,label='Fnet') #Velocity on its own plot velocity_f = gcurve(graph=velocity_graph,color=color.green,width=4,markers=False,label='Coin Velocity') #Calculation Loop while True: #Change this so the coin stops when it hits the ground rate(100) #Make the coin move #Keep the arrows representing the particle's velocity and acceleration #Plot on the graphs velocity_f.plot(t,coin_v.y) Fdrag_f.plot(t,Fdrag.y) Fgrav_f.plot(t,Fgrav.y) Fnet_f.plot(t,Fnet.y) t += dt #Advance the time by 1 time step
Use the previous answers and the completed code below to guide your reflection.
GlowScript 2.8 VPython #Window Setup scene.width = 500 scene.height = 400 #Objects ground = box(pos=vec(0,-250,0), size=vec(700,100,2), texture="https://images.pexels.com/photos/207204/pexels-photo-207204.jpeg?auto=compress&cs=tinysrgb&h=750&w=1260" ) coin = cylinder(pos=vector(0,0,0), axis=vector(0.5,0,0), radius=15.305, textures=textures.metal) coin.rotate(angle=90, axis=vector(1,1,1)) #Initial Object Properties and Constants (time and time step) g = vec(0,-9.81,0) #Acceleration due to Gravity coin_m = 0.01135 #mass of the object drag_co = 1.15 #Drag Coefficient of t = 0 #Initial Time dt = 0.05 #Time Step tf = 0 #Final Time air_density = 1.2754 #Density of the air coin_r = .015305 Fgrav = vector(0,coin_m*g.y,0) Fdrag = vec(0,0,0) #Velocity and Momentum Vectors coin_v = vec(0,0,0) #Initial Velocity coin_p = coin_m*coin_v #Initial Momentum #Create an arrow to visualize the particle's forces FdragArrow = arrow(pos=coin.pos, axis = Fdrag*1000, color = color.green) FgravArrow = arrow(pos=coin.pos, axis = Fgrav*1000, color = color.red) #Set up the graphs force_comparison_graph = graph(title='Comparison of Forces on a Coin Reaching Terminal Velocity',xtitle='time (s)',ytitle='Force (N)',fast=False,width=1000) velocity_graph = graph(title='Velocity of a Coin in Freefall Over Time',xtitle='time (s)', ytitle='Velocity (m/s)',fast=False,width=1000) #Drag and Fgrav and Fnet on the same plot Fdrag_f = gcurve(graph=force_comparison_graph,color=color.red,width=4,markers=False,label='Drag Force') Fgrav_f = gcurve(graph=force_comparison_graph,color=color.blue,width=4,markers=False,label='Fgrav') Fnet_f = gcurve(graph=force_comparison_graph,color=color.purple,width=4,markers=False,label='Fnet') #Velocity on its own plot velocity_f = gcurve(graph=velocity_graph,color=color.green,width=4,markers=False,label='Coin Velocity') #Calculation Loop while coin.pos.y > -200: #Makes the coin stop when it hits the ground rate(100) Fgrav = vector(0,coin_m*g.y,0) Fdrag = vec(0,air_density*drag_co*pi*coin_r**2*coin_v.y**2/2,0) Fnet = Fgrav+Fdrag coin_p += Fnet*dt coin.pos += (coin_p/coin_m)*dt coin_v = coin_p/coin_m #Keep the arrow representing the particle's velocity and acceleration FdragArrow.pos = coin.pos FdragArrow.axis = Fdrag*1000 FgravArrow.pos = coin.pos FgravArrow.axis = Fgrav*1000 #Plot on the graphs velocity_f.plot(t,coin_v.y) Fdrag_f.plot(t,Fdrag.y) Fgrav_f.plot(t,Fgrav.y) Fnet_f.plot(t,Fnet.y) t += dt #Advance the time by 1 time step