course_planning:183_projects:f21_week_1_escape_from_ice_station_mcmurdo

Differences

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

Link to this comparison view

Next revision
Previous revision
Last revisionBoth sides next revision
course_planning:183_projects:f21_week_1_escape_from_ice_station_mcmurdo [2021/09/14 13:07] – created pwirvingcourse_planning:183_projects:f21_week_1_escape_from_ice_station_mcmurdo [2024/01/09 22:56] hallstein
Line 99: Line 99:
   * Students should be able to set up that relate the position and time of each hovercraft and solve them as simultaneous equations for when they are in the same location.   * Students should be able to set up that relate the position and time of each hovercraft and solve them as simultaneous equations for when they are in the same location.
   * Students should be able to draw the motion of both hovercrafts (position/velocity vs time) and explain how these graphs represent the motion given their assumptions. //It is very important that students discuss and sketch the motion of the two hovercrafts, so please ask these tutor questions even if you are pressed for time.//   * Students should be able to draw the motion of both hovercrafts (position/velocity vs time) and explain how these graphs represent the motion given their assumptions. //It is very important that students discuss and sketch the motion of the two hovercrafts, so please ask these tutor questions even if you are pressed for time.//
 +</WRAP>
 +<WRAP alert>
 +**==Part A Steps and Timning:==**
 +  * 4 quadrants, including the table and representation 20 minutes
 +  * Runaway craft - constant velocity 30 minutes  
 +    * Using $v=\frac{d}{t}$ from adjacent data points
 +    * What kind of velocity is this? (average)
 +  * Rescue craft - changing velocity 45 minutes
 +    * Accelerating - assume constant
 +    * Use $v_{avg}$=$v_{inst}$ at the midpoint in time intervals (5 sec and 15 sec)
 +    * Calculate $a=\frac{\Delta v}{\Delta t}$
 +  * Assert position of rescue craft as $x_{f,res}=x_{i,run}+\frac{1}{2} a\cdot t^2$ 55 min
 +  * Final positions need to be equal at jump point  solve for t and $x_f$ 65 min
 +    * Express final position as of runaway craft as $x_{f,run}=x_{i,run}+v_{run}\cdot t$
 +    * Algebra to solve
 +  * Graphing position and velocity of both crafts 75 min
 +
 +**== Teaching Points==**
 +  * the rescue craft uses the average velocity over each interval
 +  * The average velocity used to find its acceleration is the instantaneous velocity at the midpoint in time.
 +     * $a= \frac{v_f - v_i}{t_f - t_i}$
 +     * Ask what velocities do you use, and when do they occur?   At the midpoint in the interval
 +     * To help understand this, ask them t sketch a v-t diagram for constant acceleration - v increases at a constant rate.  Ask them where on their graph the constantly changing velocity(instantaneous) is equal to the average velocity over the interval.
 +     * They can get the correct numerical value,but for the wrong reason (using times other than the midpoint) - ask them to explicitly show the velocities and times.
 +      Intro to kinematics - stress only valid for constant force motion.
 +
 +Parts A and B are meant to be done on the same day, but in practice half of the folks do not finish part B.  It's okay to spend the first part of McMurdo day 2 to complete part B. They need to do this before doing the computational part C.
 </WRAP> </WRAP>
  
Line 169: Line 196:
   * If students are moving a bit more slowly, it is OK for them to only model the motion of the constant velocity hovercraft on Tuesday and to then consider the constant force hovercraft on Thursday for 15 minutes.   * If students are moving a bit more slowly, it is OK for them to only model the motion of the constant velocity hovercraft on Tuesday and to then consider the constant force hovercraft on Thursday for 15 minutes.
 </WRAP> </WRAP>
 +<WRAP alert>
 +
 +**==Part B Steps & Timing==**
 +  * New 4 quadrants 15 min
 +  * Calculate the speed of the rescue craft at the edge, from $v_{jump}$ 30 min
 +     * Kinematics $v_{edge}^2 = v_{jump}^2 + 2a\Delta x$ Could use from the beginning point, but the emphasis is on finding the velocity (horizontal) at the edge
 +     * Or, is time is short, assume $v_{edge}=v_{jump}$
 +     * Need to know horizontal v at the edge of the rescue craft to analyze its fall
 +  *  Finding time to fall 45 min
 +     * Relaize fall time is independent of the (horizontal)velocity at the edge
 +     * Could have a conversation about what impacts the x component of the velocity
 +     * Kinematics: $\Delta y = \frac{1}{2} a t_{fall}^2$ to get fall time
 +   * Finding landing point from the fall time for both crafts: $x=v_{edge}*t_{fall} 60 min
 +   * Which craft is "safe"? 
 +   * Plot x and y vs time; and $v_x$ and $v_y$ vs time 
 +==Teaching Points==
 +  * The diagram can be tricky
 +
 +Parts A and B are meant to be done on the same day, but in practice half of the folks do not finish part B.  It's okay to spend the first part of McMurdo day 2 to complete part B.   Thye need to do this before doing the computational part C.
 +</WRAP>
 +
 +
 <WRAP info> <WRAP info>
 ==Common Difficulties== ==Common Difficulties==
Line 178: Line 227:
 Surprisingly enough hovercrafts are an expensive piece of kit. Your employer, the Carver Media Group, is concerned by the happenings at the McMurdo ice station and would like you to produce an accident report detailing the events after you lost control of your hovercraft.  The accident report should include a detailed computational model that provides the projected motion of the runaway hovercraft. Surprisingly enough hovercrafts are an expensive piece of kit. Your employer, the Carver Media Group, is concerned by the happenings at the McMurdo ice station and would like you to produce an accident report detailing the events after you lost control of your hovercraft.  The accident report should include a detailed computational model that provides the projected motion of the runaway hovercraft.
  
-<WRAP download 35%> Code for Project 2Part C\\ Keep them in the same directory.\\ {{:183_projects:hovercraft.py|Project 2 Code (hovercraft.py)}}\\ {{:183_projects:physutil.py|PhysUtil Module}}</WRAP>+<WRAP download 35%> https://www.glowscript.org/#/user/pcubed/folder/incompleteprograms/program/CliffJump/share</WRAP>
  
 ====== Project 2 Solution: Part C: Escape from ice station McMurdo ====== ====== Project 2 Solution: Part C: Escape from ice station McMurdo ======
Line 270: Line 319:
     t = t + dt     t = t + dt
 </code> </code>
 +
 +<WRAP download 35%> https://www.glowscript.org/#/user/pcubed/folder/solutions/program/CliffJumpSolution </WRAP>
  
 <WRAP tip> <WRAP tip>
Line 322: Line 373:
 </code> </code>
 </WRAP> </WRAP>
-{{course_planning:project_solutions:project_2_code_a.png}} + 
-{{course_planning:project_solutions:project_2_code_b.png}} +Solution Code to Part C
-<code python hovercraft.sol.py+<code python> 
-from __future__ import division +GlowScript 2.9 VPython 
-from visual import * + 
-from physutil import *+get_library('https://cdn.rawgit.com/PERLMSU/physutil/master/js/physutil.js')
    
 #Window setup #Window setup
Line 335: Line 386:
    
 #Objects #Objects
-cliff = box(pos=vector(-100,0,0), size=(200,800,0), color=color.white) +cliff = box(pos=vector(-100,0,0), size=vec(200,800,0), color=color.white) 
-ravine = box(pos=vector(245,-200, 0), size=(490,400,0), color=color.white) +ravine = box(pos=vector(245,-200, 0), size=vec(490,400,0), color=color.white) 
-lake = box(pos=vector(940, -200, 0), size=(900,400,0), material=materials.wood, color=color.blue)+lake = box(pos=vector(940, -200, 0), size=vec(900,400,0), color=color.blue)
 runawaycraft = sphere(pos=vector(-200,400,0), radius=10, color=color.red) runawaycraft = sphere(pos=vector(-200,400,0), radius=10, color=color.red)
-rescuecraft = sphere(pos=vector(-200,400,0), radius=10, color=color.green)+rescuecraft = sphere(pos=vector(-200,400,0), radius=10, color=color.green)  # Use runaway as template to add rescue
  
 #Parameters and Initial Conditions #Parameters and Initial Conditions
 g = vector(0,-9.81,0) g = vector(0,-9.81,0)
-b = 0.5  #Drag coefficient+b = 0  #Drag coefficient  
  
 runawaycraftm = 1500 runawaycraftm = 1500
-runawaycraftv = vector(53.64,0,0)+runawaycraftv = vector(53.64,0,0)    # change velocity to calculated value from part A
 runawaycraftp = runawaycraftm*runawaycraftv runawaycraftp = runawaycraftm*runawaycraftv
  
 +# Add the next 5 lines for the rescue craft initialed values:
 rescuecraftm = 1900 rescuecraftm = 1900
 rescuecraftv = vector(116.366,0,0) rescuecraftv = vector(116.366,0,0)
Line 362: Line 414:
 #MotionMap/Graph #MotionMap/Graph
 runawaycraftMotionMap = MotionMap(runawaycraft, tf, 5, markerScale=1, labelMarkerOrder=False, markerColor=color.orange) runawaycraftMotionMap = MotionMap(runawaycraft, tf, 5, markerScale=1, labelMarkerOrder=False, markerColor=color.orange)
-rescuecraftMotionMap = MotionMap(rescuecraft, tf, 5, markerScale=1, labelMarkerOrder=False, markerColor=color.orange)+ 
 +# Use runaway motionmap as template for: 
 +rescuecraftMotionMap = MotionMap(rescuecraft, tf, 5, markerScale=1, labelMarkerOrder=False, markerColor=color.orange) 
  
 #Calculation Loop #Calculation Loop
 while runawaycraft.pos.x < 0: while runawaycraft.pos.x < 0:
- rate(500)+    rate(500)
  
- Fgrav = runawaycraftm*g +    Fgrav = runawaycraftm*g 
- Fground = -Fgrav +    Fground = -Fgrav 
- Fair -b*dot(runawaycraftp/runawaycraftm,runawaycraftp/runawaycraftm)*runawaycraftp/mag(runawaycraftp) +    Fnet Fgrav + Fground 
- Fnet = Fgrav + Fground + Fair+  
 +    runawaycraftp = runawaycraftp + Fnet*dt 
 +    runawaycraft.pos = runawaycraft.pos + (runawaycraftp/runawaycraftm)*dt
  
- runawaycraftp = runawaycraftp + Fnet*dt +    runawaycraftMotionMap.update(t, runawaycraftp/runawaycraftm)
- runawaycraft.pos = runawaycraft.pos + (runawaycraftp/runawaycraftm)*dt+
  
- runawaycraftMotionMap.update(t, runawaycraftp/runawaycraftm) +    t = t + dt
- +
- t = t + dt+
  
 +# Use given while as tempate for the next 8 lines
 +# Modify conditional to pos.y and remove ground force
 while runawaycraft.pos.y > 0: while runawaycraft.pos.y > 0:
- rate(500)+    rate(500) 
 +  
 +    Fgrav = runawaycraftm*g 
 +    Fnet = Fgrav 
 +  
 +    runawaycraftp = runawaycraftp + Fnet*dt 
 +    runawaycraft.pos = runawaycraft.pos + (runawaycraftp/runawaycraftm)*dt 
 +  
 +    runawaycraftMotionMap.update(t, runawaycraftp/runawaycraftm) 
 +  
 +    t = t + dt
  
- Fgrav = runawaycraftm*g +# Use the 2 working runaway while loops as template to add the following 2 resucue while loops 
- Fair = -b*dot(runawaycraftp/runawaycraftm,runawaycraftp/runawaycraftm)*runawaycraftp/mag(runawaycraftp) +while rescuecraft.pos.x < 0: 
- Fnet = Fgrav +Fair+    rate(500)
    
- runawaycraftp runawaycraftp + Fnet*dt +    Fgrav rescuecraftm*g 
- runawaycraft.pos = runawaycraft.pos + (runawaycraftp/runawaycraftm)*dt+    Fground = -Fgrav 
 +    Fnet = Fgrav + Fground + rescuecraftF 
 +  
 +    rescuecraftp = rescuecraftp + Fnet*dt 
 +    rescuecraft.pos = rescuecraft.pos + (rescuecraftp/rescuecraftm)*dt 
 +  
 +    rescuecraftMotionMap.update(t, rescuecraftp/rescuecraftm) 
 +  
 +    t = t + dt 
 +  
 +while rescuecraft.pos.y > 0: 
 +    rate(500) 
 +  
 +    Fgrav = rescuecraftm*g 
 +    Fnet = Fgrav   # May include rescuecraftF here too 
 +  
 +    rescuecraftp = rescuecraftp + Fnet*dt 
 +    rescuecraft.pos = rescuecraft.pos + (rescuecraftp/rescuecraftm)*dt 
 +  
 +    rescuecraftMotionMap.update(t, rescuecraftp/runawaycraftm) 
 +  
 +    t = t + dt 
 +</code>
  
- runawaycraftMotionMap.update(t, runawaycraftp/runawaycraftm)+Changes made to obtain solution of Part C: 
 +{{course_planning:project_solutions:project_2_code_a.png}}
  
-t + dt+====== Project 2: Part D: Escape from ice station McMurdo ======
  
-while rescuecraft.pos.x < 0: +The Carver Media Group is now asking for an accident report for the your hovercraft as wellThey want to you simulate the events from the point at which  the two hovercrafts meet to when the hovercraft reached the water, however, they want you to model the hovercraft as if it had left the cliff at angle of 27 degrees from the ground. They want this model to be in the same model as the model for the runaway craft.
- rate(500)+
  
- Fgrav = rescuecraftm*g +Solution Code including changes made to obtain the solution for Part C with air drag and Part D adding a 27-degree launch angle: 
- Fground = -Fgrav +<code python> 
- Fair = -b*dot(rescuecraftp/rescuecraftm,rescuecraftp/rescuecraftm)*rescuecraftp/mag(rescuecraftp) +GlowScript 2.9 VPython 
- Fnet = Fgrav + Fground + rescuecraftF + Fair+get_library('https://cdn.rawgit.com/PERLMSU/physutil/master/js/physutil.js')
    
- rescuecraftp rescuecraftp + Fnet*dt +#Window setup 
- rescuecraft.pos = rescuecraft.pos (rescuecraftp/rescuecraftm)*dt+scene.width 1024 
 +scene.height = 768 
 +scene.center = vector(600,0,0) 
 +  
 +#Objects 
 +cliff = box(pos=vector(-100,0,0), size=vec(200,800,0), color=color.white) 
 +ravine = box(pos=vector(245,-200, 0), size=vec(490,400,0), color=color.white) 
 +lake = box(pos=vector(940, -200, 0), size=vec(900,400,0), color=color.blue) 
 +runawaycraft = sphere(pos=vector(-200,400,0), radius=10, color=color.red) 
 +rescuecraft = sphere(pos=vector(-200,400,0), radius=10, color=color.green # Use runaway as template to add rescue
  
- rescuecraftMotionMap.update(trescuecraftp/rescuecraftm)+#Parameters and Initial Conditions 
 +g = vector(0,-9.81,0) 
 +b = 0.5  #Drag coefficient  change from zero
  
-t + dt+runawaycraftm 1500 
 +runawaycraftv = vector(53.64,0,0)    # change velocity to calculated value from part A 
 +runawaycraftp = runawaycraftm*runawaycraftv
  
-while rescuecraft.pos.y > 0: +# Add the next 5 lines for the rescue craft initialed values: 
- rate(500)+rescuecraftm = 1900 
 +rescuecraftv = vector(116.366,0,0) 
 +rescuecraftp = rescuecraftm*rescuecraftv 
 +rescuecrafta = vector(0.2093,0,0) 
 +rescuecraftF = rescuecraftm*rescuecrafta
  
- Fgrav = rescuecraftm*g +#Add angle of ramp-launch at upper edge of cliff (Extension part D): 
- Fair = -b*dot(rescuecraftp/rescuecraftm,rescuecraftp/rescuecraftm)*rescuecraftp/mag(rescuecraftp+thetaindegrees = 27 
- Fnet = Fgrav + Fair+thetainrad = thetaindegrees*pi/180 
 +dirlaunch = vector(cos(thetainrad),sin(thetainrad),0) 
 + 
 +#Time and time step 
 +t=0 
 +tf=5 
 +dt = 0.01 
 + 
 +#MotionMap/Graph 
 +runawaycraftMotionMap = MotionMap(runawaycraft, tf, 5, markerScale=1, labelMarkerOrder=False, markerColor=color.orange) 
 + 
 +# Use runaway motionmap as template for: 
 +rescuecraftMotionMap = MotionMap(rescuecraft, tf, 5, markerScale=1, labelMarkerOrder=False, markerColor=color.orange)  
 + 
 +#Calculation Loop 
 +while runawaycraft.pos.x < 0: 
 +    rate(500) 
 + 
 +    Fgrav = runawaycraftm*g 
 +    Fground = -Fgrav 
 +    Fdrag = -b*runawaycraftp*mag(runawaycraftp)/(runawaycraftm)**2   #add drag force 
 +    Fnet = Fgrav + Fground + Fdrag   #add drag force
    
- rescuecraftp rescuecraftp + Fnet*dt +    runawaycraftp runawaycraftp + Fnet*dt 
- rescuecraft.pos = rescuecraft.pos + (rescuecraftp/rescuecraftm)*dt+    runawaycraft.pos = runawaycraft.pos + (runawaycraftp/runawaycraftm)*dt
  
- rescuecraftMotionMap.update(t, rescuecraftp/rescuecraftm)+    runawaycraftMotionMap.update(t, runawaycraftp/runawaycraftm)
  
- t = t + dt+    t = t + dt 
 + 
 +# Add ramp-launch angle at upper-cliff edge: 
 +runawaycraftp = mag(runawaycraftp)*dirlaunch 
 + 
 +# Use given while as tempate for the next 8 lines 
 +# Modify conditional to pos.y and remove ground force 
 +while runawaycraft.pos.y > 0: 
 +    rate(500) 
 +  
 +    Fgrav = runawaycraftm*g 
 +    Fdrag = -b*runawaycraftp*mag(runawaycraftp)/(runawaycraftm)**2 #add drag force     
 +    Fnet = Fgrav + Fdrag         #add drag force 
 +    runawaycraftp = runawaycraftp + Fnet*dt     
 +    runawaycraft.pos = runawaycraft.pos + (runawaycraftp/runawaycraftm)*dt 
 +  
 +    runawaycraftMotionMap.update(t, runawaycraftp/runawaycraftm) 
 +  
 +    t = t + dt 
 + 
 +# Add ramp-launch angle at upper-cliff edge: 
 +runawaycraftp = mag(runawaycraftp)*dirlaunch 
 + 
 + 
 +# Use the 2 working runaway while loops as template to add the following 2 resucue while loops 
 +while rescuecraft.pos.x < 0: 
 +    rate(500) 
 +  
 +    Fgrav = rescuecraftm*g 
 +    Fground = -Fgrav 
 +    Fdrag = -b*rescuecraftp*mag(rescuecraftp)/(rescuecraftm)**2 #add drag force  
 +    Fnet = Fgrav + Fground + rescuecraftF + Fdrag 
 +  
 +    rescuecraftp = rescuecraftp + Fnet*dt 
 +    rescuecraft.pos = rescuecraft.pos + (rescuecraftp/rescuecraftm)*dt 
 +  
 +    rescuecraftMotionMap.update(t, rescuecraftp/rescuecraftm) 
 +  
 +    t = t + dt 
 + 
 +# Add ramp-launch angle at upper-cliff edge: 
 +rescuecraftp = mag(rescuecraftp)*dirlaunch 
 + 
 +while rescuecraft.pos.y > 0: 
 +    rate(500) 
 +  
 +    Fgrav = rescuecraftm*g 
 +    Fdrag = -b*rescuecraftp*mag(rescuecraftp)/(rescuecraftm)**2 #add drag force  
 +    Fnet = Fgrav + Fdrag   #add drag force   
 + 
 +    rescuecraftp = rescuecraftp + Fnet*dt 
 +    rescuecraft.pos = rescuecraft.pos + (rescuecraftp/rescuecraftm)*dt 
 +  
 +    rescuecraftMotionMap.update(t, rescuecraftp/runawaycraftm) 
 +  
 +    t = t + dt
 </code> </code>
 +
 +Changes made to the solution for Part C, adding air drag (boxed in red) and Part D adding a 27-degree launch angle (boxed in purple):
 +{{course_planning:project_solutions:project_2_code_b.png}}
  • course_planning/183_projects/f21_week_1_escape_from_ice_station_mcmurdo.txt
  • Last modified: 2024/01/15 21:39
  • by hallstein