This is an old revision of the document!


Rear-End Collision

Activity Information

Learning Goals

*Apply the principles of constant velocity motion *Create and modify computational models to describe/show a given system

Prior Knowledge Required

  • 1-Dimensional Kinematics
    • The relationship between position, distance, displacement, speed, and velocity
    • Position vs. Time and Velocity vs. Time graphs
  • Scalar and Vector Quantities

Code Manipulation

  • Copying/pasting code
  • Creating/using while loops
  • Converting mathematical equations into code

—-

Activity

Handout

Rear-End Collision

You are driving on the freeway and there is a blue car next to you in the left lane. The blue car is driving at a constant velocity. You notice a red car in your rear-view mirror in the left lane a certain distance behind the blue car. The red car appears to be going very fast and the driver is also looking down, likely texting. If the red car dirver continues to text and remains oblivious to the blue car in their lane, how much time does the driver of the blue car have to notice and take evasive cation before they are rear-ended?

  1. When and where will the crash occur?
  2. Create a position vs. time graph that includes both cars' motion (optional).

Code

Link

  1. GlowScript 2.7 VPython
  2. ## Code for a particle object and a red buggy and a blue buggy *Do not change!*
  3. #assume buggy positions are in meters
  4. redbuggy = box(pos=vector(-5,1,0), length = 2, width = 1, height = 1,color = color.red)
  5. bluebuggy = box(pos=vector(0,1,0), length = 2, width = 1, height = 1,color = color.blue)
  6. ground = box(pos=vector(0,0,0), length = 20, width = 1, height = 1, color=color.white)
  7.  
  8. ##Get your red/fast buggy and determine its velocity and define it in the redbuggy x vector below
  9. ##take your red/fast buggy back to your teacher
  10. ##Get your blue/slow buggy and determine its velocity and define it in the bluebuggy x vector below
  11. ##take your blue/slow buggy back to your teacher
  12. redbuggy.velocity = vector(5,0,0)
  13. bluebuggy.velocity = vector(3,0,0)
  14.  
  15. ## Set up the time variables for the while loop for a tf that seems to make sense
  16. dt = 0.01
  17. t = 0
  18. tf = 5
  19.  
  20. #a function to show accumulated time *Do not change!*
  21. def add_time(t,dt):
  22. new_t = t+dt
  23. return new_t
  24.  
  25. #Code for a way to start the program after a person clicks on screen *Do not change!*
  26. scene.waitfor('click')
  27.  
  28. ##Code for a "while loop" to make the program iterate over the time interval *Do not change!*
  29. while redbuggy.pos.x < bluebuggy.pos.x-2:
  30.  
  31. ## Define the rate at which the program runs the loop *Do not change!*
  32. rate(100)
  33.  
  34. ## Write a way for the program to update position of each buggy based on its velocity *Do not change!*
  35. redbuggy.pos = redbuggy.pos + redbuggy.velocity*dt
  36. bluebuggy.pos = bluebuggy.pos + bluebuggy.velocity*dt
  37.  
  38. #define how the program will calculate time for each iteration *Do not change!*
  39. t=add_time(t,dt)
  40.  
  41. #create a way for the program to show the time and postitions of the buggies *Do not change!*
  42. print("time=",t,"RedPos = ",redbuggy.pos.x,"BluePos = ", bluebuggy.pos.x)
  43.  
  44. #Use the program to determine how you will know when and where your buggies will collide!

Answer Key

Handout

  1. We can solve for where and when the crash will occur by creating a system of equations and solving (much like we did in the [[https://www.msuperl.org/wikis/icsam/doku.php?id=repository:head-on_collision | Head-On Collision] activity). Let's start by creating a kinematic equation describing the motion of the fast, red buggy: $x=-5+5t$. This equation is essentially saying that the red buggy starts 5 units to the left of the origin and moves to the right 5 units for every unit of time (lines 4 and 12). Now let's do the same for the slower, blue buggy: $x=0+3t$ (lines 5 and 13). Setting these equations equal to each other will allow us to find out how long until the collisions: $$-5+5t=0+3t$$ Solving for $t$: $2t=5$ therefore $t=\dfrac{5}{2}=1.5$. The crash will occur after 2.5 units of time. We can plug this back into any of our two initial kinematic equations to find out where the crash will occur: $x=-5+5*2.5=7.5$ units.

Code

  1.  

See Also

  • repository/rear-end_collision.1598301152.txt.gz
  • Last modified: 2020/08/24 20:32
  • by porcaro1