Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
repository:head-on_collision [2020/08/18 15:45]
porcaro1 [Answer Key]
repository:head-on_collision [2021/02/17 18:02] (current)
porcaro1
Line 2: Line 2:
 ====Activity Information==== ====Activity Information====
 ===Learning Goals=== ===Learning Goals===
-*Students will be able to apply the principles of constant velocity motion +  ​*Students will be able to apply the principles of constant velocity motion ​([[https://​www.nextgenscience.org/​pe/​hs-ps2-1-motion-and-stability-forces-and-interactions | HS-PS2-1]]) 
-*Students will be able to create and modify computational models to describe and show a given system+  *Students will be able to create and modify computational models to describe and show a given system
 ===Prior Knowledge Required=== ===Prior Knowledge Required===
   *Units   *Units
-    *Dimensional analysis 
   *Constant velocity equation (kinematics)   *Constant velocity equation (kinematics)
   *Vector and scalar quantities   *Vector and scalar quantities
Line 17: Line 16:
 ====Activity==== ====Activity====
 ===Handout=== ===Handout===
 +{{ :​repository:​head-on_collision_1.png?​nolink&​600|}}
 ** Head-On Collision ** ** Head-On Collision **
 +
 You are part of a team that has been directed to film a head-on car crash for an action movie. You only have the funding for one take! So you must calculate where the crash will occur so that you can determine where to place the camera to get the shot. You are part of a team that has been directed to film a head-on car crash for an action movie. You only have the funding for one take! So you must calculate where the crash will occur so that you can determine where to place the camera to get the shot.
 Look over the code (provided below) and determine: Look over the code (provided below) and determine:
Line 25: Line 26:
 Once you have answered these questions, modify the code to test your answers. Once you have answered these questions, modify the code to test your answers.
  
 +//​**Note:​**//​ when conducting this activity with students, the initial positions and velocities of the vehicles can be provided by the instructor, but for demonstration purposes they have been included in the code below.
 ===Code=== ===Code===
 +[[https://​www.glowscript.org/#/​user/​porcaro1/​folder/​RepositoryPrograms/​program/​Head-OnCollision-Incomplete | Link]]
 <code Python [enable_line_numbers="​true"​]>​ <code Python [enable_line_numbers="​true"​]>​
 GlowScript 2.7 VPython GlowScript 2.7 VPython
Line 35: Line 38:
 scene.height = 400 scene.height = 400
 scene.background = vector(0.7,​0.7,​0.6) scene.background = vector(0.7,​0.7,​0.6)
- 
- 
  
 #Definition of objects in the system...***DO NOT CHANGE ANY OF THESE VALUES!! #Definition of objects in the system...***DO NOT CHANGE ANY OF THESE VALUES!!
Line 44: Line 45:
  
 #Set the velocity for each vehicle #Set the velocity for each vehicle
-greentruck.velocity ​ = vector(0,0,0) +redcar.velocity = vector(25,0,0) 
-redcar.velocity = vector(0,0,0)+greentruck.velocity ​ = vector(-40,0,0)
  
 #Time and Time step #Time and Time step
Line 62: Line 63:
     ​     ​
     greentruck.pos.x = greentruck.pos.x + greentruck.velocity.x *dt     greentruck.pos.x = greentruck.pos.x + greentruck.velocity.x *dt
-    ​ 
     ​     ​
     t = t + dt     t = t + dt
Line 75: Line 75:
 ====Answer Key==== ====Answer Key====
 ===Handout=== ===Handout===
-  ​- The initial position of the red car is 350 feet to the left of the origin (line 13) and the initial position of the green truck is 450 feet to the right of the origin (line 14+{{ :​repository:​head-on_collision.png?​nolink&​600|}} 
-  - The velocity of the red car is 25 ft/s in the positive x-direction (line 17) and the velocity of the green truck is -40 ft/s in the negative x-direction (line 18+  ​- The initial position of the red car is 350 feet to the left of the origin (line 11) and the initial position of the green truck is 450 feet to the right of the origin (line 12
-  - We can determine where and when the crash occurs by using the following kinematic equation: $x=x_0 + vt$, where $x$ is the final position, $x_0$ is the initial position, $v$ is the velocity, and $t$ is the time. We can create an equation for the red car ($x=-350 + 25t$) and the green truck ($x=450 - 40t$). Since we want to know where and when the vehicles are when they collide, we can set these two equations equal to each other to solve for the unknowns ($x$ and $t$): $$-350 + 25t=450 - 40t$$ Using algebra, we can solve for $t$: $65t = 800$, therefore $t = 12.3 \text{ ​s}$. We can plug this into either of the two equations we created to find out the position where the vehicles collide: $x=-350 + 25*12.3=-42.5 ​\text{ ​ft}$. In other words, the vehicles will collide 42.5 ft to the left of the origin after 12.3 seconds.+  - The velocity of the red car is 25 ft/s in the positive x-direction (line 15) and the velocity of the green truck is -40 ft/s in the negative x-direction (line 16
 +  - We can determine where and when the crash occurs by using the following kinematic equation: $x=x_0 + vt$, where $x$ is the final position, $x_0$ is the initial position, $v$ is the velocity, and $t$ is the time. We can create an equation for the red car ($x=-350 + 25t$) and the green truck ($x=450 - 40t$). Since we want to know where and when the vehicles are when they collide, we can set these two equations equal to each other to solve for the unknowns ($x$ and $t$): $$-350 + 25t=450 - 40t$$ Using algebra, we can solve for $t$: $65t = 800$, therefore $t = 12.3s. We can plug this into either of the two equations we created to find out the position where the vehicles collide: $x=-350 + 25*12.3=-42.5ft. In other words, the vehicles will collide 42.5 ft to the left of the origin after 12.3 seconds.
  
 The correctly modified code is shown below, with highlighted areas revealing important modifications. The correctly modified code is shown below, with highlighted areas revealing important modifications.
 ===Code=== ===Code===
-<code Python [enable_line_numbers="​true",​ highlight_lines_extra=""​]>​+[[https://​www.glowscript.org/#/​user/​porcaro1/​folder/​RepositoryPrograms/​program/​Head-OnCollision-Solution | Link]] 
 +<code Python [enable_line_numbers="​true",​ highlight_lines_extra="​28"]>
 GlowScript 2.7 VPython GlowScript 2.7 VPython
  
Line 89: Line 91:
 scene.height = 400 scene.height = 400
 scene.background = vector(0.7,​0.7,​0.6) scene.background = vector(0.7,​0.7,​0.6)
- 
- 
  
 #define objects in system #define objects in system
Line 117: Line 117:
     ​     ​
     greentruck.pos.x = greentruck.pos.x + greentruck.velocity.x *dt     greentruck.pos.x = greentruck.pos.x + greentruck.velocity.x *dt
-    ​ 
     ​     ​
     t = t + dt     t = t + dt
Line 130: Line 129:
 ---- ----
 ====See Also==== ====See Also====
-  *+  *[[colliding_crates | Colliding Crates]] 
 +  *[[rear-end_collision | Rear-End Collision]] 
 +  *[[phineas_&​_ferb | Phineas & Ferb]]
   ​   ​
  • repository/head-on_collision.1597765540.txt.gz
  • Last modified: 2020/08/18 15:45
  • by porcaro1