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:beating_the_train [2020/02/27 21:57]
porcaro1 [Answer Key]
repository:beating_the_train [2021/02/18 19:12] (current)
porcaro1 [Answer Key]
Line 8: Line 8:
 ===Prior Knowledge Required=== ===Prior Knowledge Required===
   * Units   * Units
-    * Dimensional Analysis 
   * Kinematic Equations   * Kinematic Equations
   * Newton'​s 2nd Law of Motion   * Newton'​s 2nd Law of Motion
Line 14: Line 13:
 ===Code Manipulation=== ===Code Manipulation===
   * Modify existing code   * Modify existing code
-      * [[https://​www.glowscript.org/#/​user/​kstedman/​folder/​Public/​program/​CollidingCars|Colliding Crates]]+      * [[colliding_crates|Colliding Crates]]
 ---- ----
 ====Activity==== ====Activity====
 ===Handout=== ===Handout===
-**Beating the Train**+{{ :​repository:​beating_the_train1.png?​nolink&​600|}} 
 +**Beating the Train**\\ 
 A train is approaching a crossing, traveling at a constant velocity if 15 m/s to the east. You are on an afternoon ride on your motorcycle when you get stopped at a stoplight 50 m south of the crossing. At the instant the light turns green, the train is 90 m west of the crossing. Your mass, including the motorcycle, is 400 kg A train is approaching a crossing, traveling at a constant velocity if 15 m/s to the east. You are on an afternoon ride on your motorcycle when you get stopped at a stoplight 50 m south of the crossing. At the instant the light turns green, the train is 90 m west of the crossing. Your mass, including the motorcycle, is 400 kg
  
Line 26: Line 27:
   - Modify the [[https://​www.glowscript.org/#/​user/​kstedman/​folder/​Public/​program/​CollidingCars| Colliding Crates]] program to fit this scenario.   - Modify the [[https://​www.glowscript.org/#/​user/​kstedman/​folder/​Public/​program/​CollidingCars| Colliding Crates]] program to fit this scenario.
 ===Code=== ===Code===
-[[https://​www.glowscript.org/#/​user/​kstedman/folder/Public/program/CollidingCars| Link]] +[[https://​www.glowscript.org/#/​user/​porcaro1/folder/RepositoryPrograms/program/BeatingtheTrain-Incomplete| Link]] 
-<code Python [enable_line_numbers="​true",​ highlight_lines_extra=""​]>​+<code Python [enable_line_numbers="​true",​ highlight_lines_extra="​0"]>
 GlowScript 2.7 VPython GlowScript 2.7 VPython
  
Line 61: Line 62:
 ====Answer Key==== ====Answer Key====
 ===Handout=== ===Handout===
 +{{ :​repository:​beating_the_train2.png?​nolink&​600|}}
   - To find the time it will take for the train to reach the crossing, divide the distance between the train and the crossing by the velocity of the train:   - To find the time it will take for the train to reach the crossing, divide the distance between the train and the crossing by the velocity of the train:
     - $t=\dfrac{90\text{m}}{15\text{m/​s}}=6\text{s}$     - $t=\dfrac{90\text{m}}{15\text{m/​s}}=6\text{s}$
Line 79: Line 81:
     - Plugging in our known values:     - Plugging in our known values:
       - $a=\dfrac{2(50\text{m}-0\text{m}-0\text{m/​s}*6\text{s})}{(6\text{s})^2}=\dfrac{100\text{m}}{36\text{s}^2}=2.78\text{m/​s²}$       - $a=\dfrac{2(50\text{m}-0\text{m}-0\text{m/​s}*6\text{s})}{(6\text{s})^2}=\dfrac{100\text{m}}{36\text{s}^2}=2.78\text{m/​s²}$
 +  - To find out the minimum force your motorcycle must exert, we must first create a free body diagram. From this diagram, we know that the sum of the frictional force $F_{f}$ and the force of your motorcycle $F_{m}$ must be equal to the total mass of you and the motorcycle (400 kg) multiplied by the acceleration we just calculated (2.78 m/s²). Mathematically,​ this looks like:
 +    - $F_{f}+F_{m}=ma$
 +    - Solving for the force of your motorcycle:
 +      - $F_{m}=ma-F_{f}$
 +    - Plugging in our known values:
 +      - $F_{m}=400\text{kg}*2.78\text{m/​s²}-(-100\text{N})=1212\text{N}$
 +        - Note that $F_{f}$ is negative because it points in the negative y-direction. This is determined from your free body diagram ​
 +  - See below
 ===Code=== ===Code===
 +[[https://​www.glowscript.org/#/​user/​porcaro1/​folder/​RepositoryPrograms/​program/​BeatingtheTrain-Solution | Link]]
 +<code Python [enable_line_numbers="​true",​ highlight_lines_extra="​3,​4,​16,​17,​18,​19,​20,​21,​22,​23"​]>​
 +GlowScript 2.7 VPython
 +#Creating the objects
 +train = box(pos=vector(-100,​-5,​0),​ size=vector(20,​5,​8),​ color=color.red) ​          #​I'​ve created the crate, along with its dimensions and initial position resting on the floor
 +cycle = box(pos=vector(0,​-51,​0),​ size=vector(2,​2,​2),​ color=color.white)
  
 +#Setting the time interval
 +t=0                                                                             #​I'​ve set the initial time to zero.
 +dt=0.01 ​                                                                        #I want my time interval set at 1/100th of a time unit
 +
 +#Creates velocity vectors as a function of time
 +get_library('​https://​rawgit.com/​perlatmsu/​physutil/​master/​js/​physutil.js'​) ​     #The program needed to know what a motion map is defined as
 +#motionMap1 = MotionMap(crate1,​ tf, 5, markerScale=0.1) ​                          #I want to display 5 arrows showing the motion of the crate
 +#motionMap2 = MotionMap(crate2,​ tf, 5, markerScale=0.1)
 +
 +#Giving the objects an initial velocity
 +trainv=vector(15,​0,​0) ​                                                          #​I'​m defining the constant velocity of my crate to be 75 in the x-direction(left to right) ​                                      
 +cyclev=vector(0,​0,​0)
 +cycleacc=vec(0,​2.78,​0)
 +while cycle.pos.y<​=10: ​                                                          #I want the crate to stop before it slides off the floor
 +    rate(100) ​                                                                   #This rate can speed up or slow down the replay
 +    train.pos=train.pos+trainv*dt ​                                              #​I'​m moving the crate by adding the change in position (cratev*dt) to the previous position (crate.pos)
 +    cyclev=cyclev + cycleacc*dt
 +    cycle.pos=cycle.pos+cyclev*dt
 +    t=t+dt ​                                                                     #I'm updating the time
 +    ​
 +#This updates the velocity vectors
 +    #​motionMap1.update(t,​crate1v) ​                                                 #This updates the motion map and display of the arrows as the crate slides across the floor
 +    #​motionMap2.update(t,​crate2v)
 + 
 +#This creates the graph of the kinetic energy of the crate
 +#f1 = gcurve(color=color.blue) ​                                                  #​Setting up a graph to show the kinetic energy of the crate as a function of time
 +#for t in arange(0, 0.94, 0.01): ​                                                # Time goes from 0 to 0.94 in 0.01 time intervals
 + # ​  ​f1.plot(pos=(t,​crate1v.mag**2)) ​                                               # plot time vs. kinetic energy of the crate </​code>​
 ---- ----
 ====See Also==== ====See Also====
 +  * [[terminal_velocity | Terminal Velocity]]
  • repository/beating_the_train.1582840630.txt.gz
  • Last modified: 2020/02/27 21:57
  • by porcaro1