You are a group of scientists working for Zevo Toy Company a subsidiary of the Carver Media Group. A mysteriously large shipment of discontinued toy boats (which can neither turn nor change speed) has been delivered to Zevo for a classified project. The manuals for the boats have been long lost which is problematic as you have been tasked with determining the speed of these boats as they are going to be shipped out soon as part of the project EverReady. At your disposal, you have a handful of toy boats, a uniformly flowing river of width $W=20\,{\rm m}$ with unknown speed, and your trusty stopwatch.
While you are at the river, you are approached by an anonymous environmentalist group who have asked you if you can figure out the speed of the river for them. You are environmentally conscious and decide to help the group out.
To figure out the speed of the boat with respect to the water ($v_{\rm b/w}$), you must first recognize that vectors can be broken down into components. Since the water has no velocity perpendicular to the shore, if we send the boat directly across the river it will traverse the width $W$ in a time $t_{\rm across}$ having velocity $v_{\rm b/w}$. So, we send it across and measure the time it takes $t_{\rm across}$. Since this is constant velocity motion, we have $$x(t)=v\,t\quad\longrightarrow\quad W=v_{\rm b/w}t_{\rm across},$$ which we can simply solve for the desired: $$v_{\rm b/w}=\frac{W}{t_{\rm across}}.$$ $t_{\rm across}=2\,{\rm s}$ $\quad\longrightarrow \quad v_{\rm b/w}=10\,{\rm m/s}.$
To figure out the speed of the river, you must recognize that you can add relative velocity vectors, and you are taking time measurements with respect to the shore: $$\vec{v}_{\rm b/s}=\vec{v}_{\rm b/w}+\vec{v}_{\rm w/s}.$$ Now, since we don't have a ruler, we have to eliminate distance in all measurements. This is done by sending the boat up and down the river along the same distance (mind you the times will be different). As we send the boat downstream, we have a speed with respect to the shore $$v_{\rm b/s}^{\rm down}=v_{\rm b/w}+v_{\rm w/s}.$$ As we send the boat upstream, we have a speed with respect to the shore $$v_{\rm b/s}^{\rm up}=v_{\rm b/w}-v_{\rm w/s}.$$
If students are having a difficult time with this, you can ask the following leading questions:
Again, since this is constant velocity, we have $$D=v_{\rm b/s}^{\rm down}t_{\rm down}\qquad\mbox{and}\qquad D=v_{\rm b/s}^{\rm up}t_{\rm up}.$$ Making the requisite substitutions and solving for the desired, we come to find $$v_{\rm w/s}=v_{\rm b/w}\bigg(\frac{t_{\rm up}-t_{\rm down}}{t_{\rm up}+t_{\rm down}}\bigg).$$ $t_{\rm down}=1\,{\rm s},\,\,\,t_{\rm up}=3\,{\rm s}$ $\quad\longrightarrow\quad v_{\rm w/s}=5\,{\rm m/s}.$
Impressed with your skills, the head of the Zevo Simulation Division tasks you with the completion of a “projected trajectory simulator” for the toy boat and river. You are not sure why this would be necessary, but you decide to proceed with the project. This simulator must display the motion of a toy boat crossing the river, with respect to the shore. The previous design team has already done the majority of the work, but they mysteriously disappeared without completing it… The head of the division suggests you complete the project as quickly as possible!
Code for Project 1: part B
https://www.glowscript.org/#/user/pcubed/folder/incompleteprograms/program/RiverCrossing
Running the original code, we should notice that even though the boat is being directed perpendicularly to the shore, it should be carried sideways by the water. This ought to prompt students to add in the velocity of the boat relative to the shore and to modify the position update of the boat:
vboatshore = vboatwater + vwatershore boat.pos = boat.pos + vboatshore*dt
vboatshoreMotionMap = MotionMap(boat, tf, 15, markerScale=0.5, labelMarkerOrder=False, markerColor=color.white) vwatershoreMotionMap = MotionMap(boat, tf, 15, markerScale=0.5, labelMarkerOrder=False, markerColor=color.blue)
vboatshoreMotionMap.update(t, vboatshore) vwatershoreMotionMap.update(t, vwatershore)
Solution code for Project 1: part B
https://www.glowscript.org/#/user/pcubed/folder/solutions/program/RiverCrossingSolution/edit
Solution Code:
GlowScript 2.9 VPython get_library('https://cdn.rawgit.com/PERLMSU/physutil/master/js/physutil.js') scene.width = 900 scene.height = 500 scene.range = 20 #Objects W = 20 origin = cylinder(pos=vector(0,0,0), axis=vector(0,0,5), radius=0.2, color=color.red) water = box(pos=vector(-30,0,0), height=W, width=0, length=200, color=color.blue, opacity=0.4) boat = sphere(pos=vector(0,-W/2,0), radius=0.4, color=color.white) #Parameters and Initial Conditions sboatwater = 10 thetaindegrees = 90 thetainrad = thetaindegrees*2*pi/360 dirboat = vector(cos(thetainrad),sin(thetainrad),0) vboatwater = sboatwater*dirboat vwatershore = vector(5,0,0) vboatshore = vboatwater + vwatershore #ADD calculation of velocity of boat rel to shore #Time and time step t=0 tf=10 dt=0.01 #MotionMap/Graph vboatwaterMotionMap = MotionMap(boat, tf, 15, markerScale=0.5, labelMarkerOrder=False, markerColor=color.orange) #Use given maotionmap of vboatwater to add motionmaps for vboatshore and vwatershore vboatshoreMotionMap = MotionMap(boat, tf, 15, markerScale=0.5, labelMarkerOrder=False, markerColor=color.green) #Added vwatershoreMotionMap = MotionMap(boat, tf, 15, markerScale=0.5, labelMarkerOrder=False, markerColor=color.blue) #Added #Calculation Loop while boat.pos.y <= W/2: rate(100) water.pos = water.pos + vwatershore*dt boat.pos = boat.pos + vboatshore*dt #edit final term from vwatershore*dt to vboatshore*dt vboatwaterMotionMap.update(t, vboatwater) #Use vboatwater motionmap as template to add vboatshore and vwatershore motion maps: vboatshoreMotionMap.update(t, vboatshore) #ADD vwatershoreMotionMap.update(t, vwatershore) #ADD t = t + dt