course_planning:183_projects:s23_week_1_problem_toy_boat_problem_solution

Spring 2016 Project 1

  • Perform the following mathematical operations on (physical) vector quantities: vector addition/subtraction, magnitude/unit vector.
  • Sketch vector quantities and perform graphical (physical) vector addition/subtraction.
  • Predict the motion of a single-particle system executing constant velocity or constant acceleration motion using appropriate representations (this includes verbal, graphical, diagrammatic, mathematical, and computational representations).
  • Breaking vectors into their components
  • Vector addition
  • Relative velocity
  • Position update formula - iterative motion
  • Familiarizing yourself with VPython

Project 1: Part A: Zevo toy boats

boat_test.jpg

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.

Project 1 Solution: Part A: Zevo toy boats

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}.$$

Tutor - Leading Questions

If students are having a difficult time with this, you can ask the following leading questions:

  • Question: When do you expect the boat to move faster relative to the shore: when it is pointed directly upstream/against the current or downstream with the current?
  • Expected Answer: …we expect it to move faster relative to shore when it is pointed with the current…
  • Question: Algebraically, what is different?
  • Expected Answer: …when upstream the two velocities are opposite each other and we need to subtract one from the other, but when it is pointed downstream they are in the same direction and add…

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}.$

Tutor Questions
  • Question: How did you find the speed of the boat with respect to the water?
  • Expected Answer: …we sent the boat perpendicular to the shore…
  • Question: How did you know to send the boat perpendicularly across the river?
  • Expected Answer: …the only distance we have to use in $x=v\,t$ is the perpendicular distance $W$…
  • Question: Why is $x=v\,t$ applicable here?
  • Expected Answer: …the velocity is constant…
  • Question: How did you find the velocity of the river?
  • Expected Answer: …we sent the boat up and down the shore…
  • Question: How did you know to send it up and down the river?
  • Expected Answer: …we had no ruler, so we had to eliminate the distance involved…
  • Question: Why does the distance you send it up and down the shore not matter?
  • Expected Answer: …different distances will give different times, but in each case the distance divides out…
  • Question: Why is it okay to add/subtract the velocities?
  • Expected Answer: …we can use relative velocity $\vec{v}_{\rm a/c}=\vec{v}_{\rm a/b}+\vec{v}_{\rm b/c}$…
Main Points:
  • Velocity vectors start on the object of interest.
  • Velocity vectors can be added/subtracted to give relative velocities with respect to various “frames.”
  • The kinematic equations are useful in solving constant velocity problems.
Common Difficulties:
  • Sending the boat up and down the river in order to “eliminate time.”
  • Solving the two equations in two unknowns (the up and down distance equations).
  • Because this is the first project, students are often uncomfortable with the format at first. They are learning what it means to participate in this course and what knowledge and work will be valued. It's important to assure them of the process and activities in this and several future projects.

Project 1: Part B: Zevo toy boats

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!

Project 1 Solution: Part B: Zevo toy boats

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
Tutor Questions
  • Question: How did you know you needed to modify the position update of the boat?
  • Expected Answer: …the boat was not being dragged by the water…
  • Question: Of what use is the while loop?
  • Expected Answer: …it allows you to increment to the position in the form $dx=v\,dt$…
  • Question: What analytical equation gives the same result as the computational position update?
  • Expected Answer: …$x(t)=x_{0}+v_{0}t$ where $t$ is the total time elapsed…
  • Question: Can you add in the velocity vector of the boat with respect to the water $\vec{v}_{\rm b/w}$, the velocity vector of the boat with respect to the shore $\vec{v}_{\rm b/s}$, and the velocity vector of the water with respect to the shore $\vec{v}_{\rm w/s}$)?
  • Expected Answer: Adding in the relative velocity vectors is as easy as copying the MotionMap for the water with respect to the shore and making the necessary substitutions:
    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)
Main Points:
  • Comprehend what each line/variable represents physically.
  • The calculation loop is where quantities that change with time must go.
  • Quantities are updated through the form $a=a+da$.
Common Difficulties:
  • Time. Since the day is split in half, not all students will make serious progress on this half.
  • Syntax. Encourage Googling/just help with syntax mistakes.

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

Changes to given code: boat-codesoln.jpg

  • course_planning/183_projects/s23_week_1_problem_toy_boat_problem_solution.txt
  • Last modified: 2023/01/11 15:56
  • by hallstein