Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
course_planning:183_projects:f21_week_1_escape_from_ice_station_mcmurdo [2022/01/18 14:42] – pwirving | course_planning:183_projects:f21_week_1_escape_from_ice_station_mcmurdo [2024/01/15 21:39] (current) – 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/ | * Students should be able to draw the motion of both hovercrafts (position/ | ||
+ | </ | ||
+ | <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, | ||
+ | * 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, | ||
+ | * 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? | ||
+ | * 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. | ||
+ | | ||
+ | |||
+ | 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. | ||
</ | </ | ||
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 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 " | ||
+ | * 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. They need to do this before doing the computational part C. | ||
+ | </ | ||
+ | |||
+ | |||
<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. | 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. | ||
- | <WRAP download 35%> https:// | + | <WRAP download 35%> https:// |
====== 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 | ||
</ | </ | ||
+ | |||
+ | <WRAP download 35%> https:// | ||
<WRAP tip> | <WRAP tip> | ||
Line 292: | Line 343: | ||
* It is worth your time if you have it, to ask students to represent the motion of the hovercraft with arrows to see how the velocity and momentum change in each direction. They can do this altering the [[https:// | * It is worth your time if you have it, to ask students to represent the motion of the hovercraft with arrows to see how the velocity and momentum change in each direction. They can do this altering the [[https:// | ||
* If students have time, they should model the second hovercraft and be able to explain differences in the motion. | * If students have time, they should model the second hovercraft and be able to explain differences in the motion. | ||
+ | </ | ||
+ | |||
+ | <WRAP alert> | ||
+ | **==Part C Steps & Timing==** | ||
+ | * Finishing Part B if needed: 30 min | ||
+ | * Recommend to start with constant velocity cart, then duplicate/ copy& | ||
+ | * Comment code: 40 min | ||
+ | * Falling $\vec{F}_{net} = \vec{F}_{grav}: | ||
+ | * runawaycraft.p means momentum | ||
+ | * runawaycraft.pos means position | ||
+ | * Copy for rescue craft: 65 min | ||
+ | * May spend some time on adding x-acceleration (x<0) or even beyond | ||
+ | * Is there a significant change in the x-velocity over the final 200m? No, the fractional change will be quite small | ||
+ | * Adding velocity arrows - Motion Map: 70 min | ||
+ | * Questions: 85 min | ||
+ | * Extension: adding air resistance: 105 min | ||
+ | * This takes some time to complete, don't have them attempt if less than 10 minutes remaining | ||
+ | * Need to use velocity unit vector to give direction of $-\hat{v}$ | ||
+ | * Second Extension Part D, launch at an angle | ||
+ | * part D is hidden ask to open up if needed | ||
+ | * should only do if completed air resistance first | ||
+ | ==Teaching Points and tips== | ||
+ | * Use Glowscript 2.9 Vpython | ||
+ | * Given in the starter code and will not work with the new version | ||
+ | * Comments are your friend! | ||
+ | * Inexperienced coder(s) should code | ||
+ | * With one code version being edited (additional computers can view via Zoom) | ||
+ | * If on Zoom, make sure everyone is engaged and not doing their own thing on their computer. | ||
+ | * Whiteboards and pseudocode | ||
+ | * Sometimes, they get stuck. | ||
+ | * Final code should have four while loops | ||
+ | * 2 for each craft: for while y >0 (jump - as they are falling) & x<0 while they are still on top of the cliff | ||
+ | * Watch for using more complicated Python moves that inexperienced coders have never seen (for, if, etc.) | ||
+ | * May need to take some time to explain time updates | ||
+ | * t=t+dt | ||
+ | * May seem strange to novice coders, as algebraically it doesn' | ||
+ | * If they get to the air resistance extension, the drag equation is in the notes | ||
+ | |||
</ | </ | ||
Line 322: | Line 411: | ||
</ | </ | ||
</ | </ | ||
- | {{course_planning: | + | |
- | {{course_planning:project_solutions: | + | Solution Code to Part C: |
- | <code python | + | <code python> |
- | from __future__ import division | + | GlowScript 2.9 VPython |
- | from visual import * | + | |
- | from physutil | + | get_library(' |
#Window setup | #Window setup | ||
Line 335: | Line 424: | ||
#Objects | #Objects | ||
- | cliff = box(pos=vector(-100, | + | cliff = box(pos=vector(-100, |
- | ravine = box(pos=vector(245, | + | ravine = box(pos=vector(245, |
- | lake = box(pos=vector(940, | + | lake = box(pos=vector(940, |
runawaycraft = sphere(pos=vector(-200, | runawaycraft = sphere(pos=vector(-200, | ||
- | rescuecraft = sphere(pos=vector(-200, | + | rescuecraft = sphere(pos=vector(-200, |
#Parameters and Initial Conditions | #Parameters and Initial Conditions | ||
g = vector(0, | g = vector(0, | ||
- | b = 0.5 #Drag coefficient | + | b = 0 #Drag coefficient |
runawaycraftm = 1500 | runawaycraftm = 1500 | ||
- | runawaycraftv = vector(53.64, | + | runawaycraftv = vector(53.64, |
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, | rescuecraftv = vector(116.366, | ||
Line 362: | Line 452: | ||
# | # | ||
runawaycraftMotionMap = MotionMap(runawaycraft, | runawaycraftMotionMap = MotionMap(runawaycraft, | ||
- | rescuecraftMotionMap = MotionMap(rescuecraft, | + | |
+ | # Use runaway motionmap as template for: | ||
+ | rescuecraftMotionMap = MotionMap(rescuecraft, | ||
# | # | ||
while runawaycraft.pos.x < 0: | while runawaycraft.pos.x < 0: | ||
- | rate(500) | + | |
- | Fgrav = runawaycraftm*g | + | |
- | Fground = -Fgrav | + | Fground = -Fgrav |
- | Fair = -b*dot(runawaycraftp/ | + | |
- | Fnet = Fgrav + Fground + Fair | + | |
+ | runawaycraftp = runawaycraftp + Fnet*dt | ||
+ | runawaycraft.pos = runawaycraft.pos + (runawaycraftp/ | ||
- | runawaycraftp = runawaycraftp + Fnet*dt | + | runawaycraftMotionMap.update(t, runawaycraftp/ |
- | runawaycraft.pos = runawaycraft.pos + (runawaycraftp/ | + | |
- | runawaycraftMotionMap.update(t, | + | |
- | + | ||
- | 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) | + | |
+ | |||
+ | Fgrav = runawaycraftm*g | ||
+ | Fnet = Fgrav | ||
+ | |||
+ | runawaycraftp = runawaycraftp + Fnet*dt | ||
+ | runawaycraft.pos = runawaycraft.pos + (runawaycraftp/ | ||
+ | |||
+ | runawaycraftMotionMap.update(t, | ||
+ | |||
+ | 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/ | + | while rescuecraft.pos.x < 0: |
- | Fnet = Fgrav +Fair | + | rate(500) |
- | runawaycraftp | + | Fgrav = rescuecraftm*g |
- | runawaycraft.pos = runawaycraft.pos + (runawaycraftp/runawaycraftm)*dt | + | Fground = -Fgrav |
+ | Fnet = Fgrav + Fground + rescuecraftF | ||
+ | |||
+ | rescuecraftp = rescuecraftp | ||
+ | | ||
+ | |||
+ | rescuecraftMotionMap.update(t, | ||
+ | |||
+ | 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/ | ||
+ | |||
+ | rescuecraftMotionMap.update(t, | ||
+ | |||
+ | t = t + dt | ||
+ | </ | ||
- | runawaycraftMotionMap.update(t, runawaycraftp/ | + | Changes made to obtain solution of Part C: |
+ | {{course_planning: | ||
- | t = 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 well. They 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, | + | GlowScript 2.9 VPython |
- | Fnet = Fgrav + Fground + rescuecraftF + Fair | + | get_library(' |
- | rescuecraftp | + | #Window setup |
- | rescuecraft.pos = rescuecraft.pos + (rescuecraftp/ | + | scene.width |
+ | scene.height = 768 | ||
+ | scene.center = vector(600, | ||
+ | |||
+ | #Objects | ||
+ | cliff = box(pos=vector(-100, | ||
+ | ravine = box(pos=vector(245,-200, 0), size=vec(490, | ||
+ | lake = box(pos=vector(940, | ||
+ | runawaycraft = sphere(pos=vector(-200, | ||
+ | rescuecraft = sphere(pos=vector(-200, | ||
- | rescuecraftMotionMap.update(t, rescuecraftp/ | + | #Parameters and Initial Conditions |
+ | g = vector(0,-9.81,0) | ||
+ | b = 0.5 #Drag coefficient | ||
- | t = t + dt | + | runawaycraftm |
+ | runawaycraftv = vector(53.64, | ||
+ | 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/ | + | thetaindegrees = 27 |
- | Fnet = Fgrav + Fair | + | thetainrad = thetaindegrees*pi/ |
+ | dirlaunch = vector(cos(thetainrad), | ||
+ | |||
+ | #Time and time step | ||
+ | t=0 | ||
+ | tf=5 | ||
+ | dt = 0.01 | ||
+ | |||
+ | # | ||
+ | runawaycraftMotionMap = MotionMap(runawaycraft, | ||
+ | |||
+ | # Use runaway motionmap as template for: | ||
+ | rescuecraftMotionMap = MotionMap(rescuecraft, | ||
+ | |||
+ | # | ||
+ | while runawaycraft.pos.x < 0: | ||
+ | rate(500) | ||
+ | |||
+ | | ||
+ | | ||
+ | Fdrag = -b*runawaycraftp*mag(runawaycraftp)/(runawaycraftm)**2 #add drag force | ||
+ | Fnet = Fgrav + Fground + Fdrag #add drag force | ||
- | rescuecraftp | + | runawaycraftp |
- | rescuecraft.pos = rescuecraft.pos + (rescuecraftp/rescuecraftm)*dt | + | |
- | rescuecraftMotionMap.update(t, | + | runawaycraftMotionMap.update(t, |
- | 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)/ | ||
+ | Fnet = Fgrav + Fdrag #add drag force | ||
+ | runawaycraftp = runawaycraftp + Fnet*dt | ||
+ | runawaycraft.pos = runawaycraft.pos + (runawaycraftp/ | ||
+ | |||
+ | runawaycraftMotionMap.update(t, | ||
+ | |||
+ | 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)/ | ||
+ | Fnet = Fgrav + Fground + rescuecraftF + Fdrag | ||
+ | |||
+ | rescuecraftp = rescuecraftp + Fnet*dt | ||
+ | rescuecraft.pos = rescuecraft.pos + (rescuecraftp/ | ||
+ | |||
+ | rescuecraftMotionMap.update(t, | ||
+ | |||
+ | 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)/ | ||
+ | Fnet = Fgrav + Fdrag #add drag force | ||
+ | |||
+ | rescuecraftp = rescuecraftp + Fnet*dt | ||
+ | rescuecraft.pos = rescuecraft.pos + (rescuecraftp/ | ||
+ | |||
+ | rescuecraftMotionMap.update(t, | ||
+ | |||
+ | | ||
</ | </ | ||
+ | |||
+ | 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: |