P2820 - Midterm 1 - F2015

Name:
Student number:

There are 2 questions for a total of 35 marks.  You have 75 minutes.

Q1 (10 marks)

A monkey moving in one dimension has velocity (m/s) as a function of time (s) given by

v(t)=4 sin[ t (2 - 3 (e^(-(t/5))) )] -0.1

a) 2 marks

Remove["Global`*"]

Plot the monkey’s velocity from t = 0 to 5s.  Include axes labels with units.

v[t_]:=4 Sin[t ( 2 - 3 Exp[((-t)/5)])] - 0.1

Plot[v[t], {t, 0, 5}, AxesLabel->{"time [s]","v [m/s]"}]

b) 2 marks

Plot the monkey’s acceleration from t = 0 to 5s.  You need not bother with axes labels.

a[t_]=v'[t];

Plot[a[t], {t, 0, 5}, AxesLabel->{"time [s]","a [m/(s^2)]"}]

c) 2 marks

What is the monkey’s largest (positive) acceleration in the plotted time interval?  What is the velocity at the time of this largest accelation?

sol1=FindMaximum[a[t],{t,2}]

max_acceleration=sol1[[1]]

tmax=2.48719

vatmaxa=v[tmax]

d) 2 marks

When does the monkey come to a stop for the second time?  What is its displacement at that point in time?

sol2=FindRoot[v[t]==0,{t,4}]

tSecondStop=t/.sol2[[1]]

xSecondStop=N[(∫_0^tSecondStop)v[T]\[DifferentialD]T]

e) 2 marks

At what point in time does the monkey first return to its initial (t=0) position?  (BONUS: comment on any warnings you may encounter in carrying out the calculations.)

sol3=FindRoot[(∫_0^t)v[T]\[DifferentialD]T==0,{t,3}]

tFirstReturn=t/.sol3[[1]]

Check: Is (∫_0^tFirstReturn)v[T]dT==0

N[(∫_0^tFirstReturn)v[T]\[DifferentialD]T]

1. [23 marks]

A block of mass m1=2.4kg, initially at x1[0] = -2m with velocity x1’[0] = -4m/s (moving to the left) slides on a rough surface with friction coefficient μ(t)=0.2( exp (-t/2) + 1).  In addition to friction, gravity (acting in the -ve y direction with g=9.81 m/s/s) and the normal force, there is an applied force of constant magnitude |(OverVector[F])|=16.5 N, but whose angle of application, as shown in the figure, varies with time as θ(t)=(π/4)(1-0.9×cos(2t)) (in radians). A second block has a mass of m2=1kg is initially at y2[0]=-3m and moves upward with velocity y2’[0]=4m/s. Assume that the pulley have neglegible mass and are frictionless. i.e. the accelerations of the two massess have the same magnitude, i.e. x1’’[t]=-y2’’[t].

Remove["Global`*"]

Parameters:

m1=2.4;m2=1;g=9.81; F=16.5;
xi=-2; yi=-3; vxi=-4; vyi=4;

a) [2 marks]

Plot the coefficient of kinetic friction  for the first 5 seconds.  Include axes labels with units, but do not worry about making the graph look nice otherwise.

μ[t_]:=0.2 ( Exp[-(t/2)] + 1 )

Plot[μ[t],{t,0,5},AxesLabel->{"time [s]","μ(t)"}]

b) [2 marks]

Plot the x and y components of the applied force F on mass m1 for the first10s?

θ[t_]:=(π/4)( 1 - 0.9 Cos [2t])

Fx[t_]:= - F Cos[θ[t]]

Plot[Fx[t],{t,0,10}, AxesLabel->{"Time(s)","Fx(N)"}]

Fy[t_]:= F Sin[θ[t]]

Plot[Fy[t],{t,0,10}]

c) [3 marks]

Considering forces on mass m1 in the y direction (normal, gravity, y-component of the applied force), define a function that gives the normal force on mass m1 as a function of time.  What is the normal force at t=10s?

n[t_]:=-Fy[t] + m1 9.81

n[10]

d) [2 marks]

Plot the magnitude of friction force FfrMag[t]= μ[t] × normal force[t] for the first 10s. Define the friction force to be always opposite to velocity: Ffr[t] = - Sign[x’[t]] FfrMag[t]

FfrMag[t_]=N[μ[t] n[t]]

Plot[FfrMag[t],{t,0,10}]

Ffr[t_]:=-Sign[x1'[t]] FfrMag[t]

e) [3 marks]

What is the force of friction at time t=0?  What is its direction (right is towards +ve x, left is -ve)?

Ffr0=μ[0] n[0]

Frictin force at the begining will point in positive x-direction.

f) [6 marks]

Set up Newton’s equations as ODEs for the positions of the two  blocks along the x axis, x1[t] for the first mass and along the axis y for the second - y2[t].  Solve the differential equations for x1[t], y2[t] and tension T[t].  

Plot x(t) and tension force for the first 30 sec. (Hint: Since you have three unknown functions x1[t], y2[t] and tension T[t] you need a third equation together with the two Newton’s equations for x1’’ and y2’’. This third equation can be defined as x1’’[t]=-y2’’[t] because the accelrations of the two masses have the same magnitudes). Use NDSolve to solve the equations.

eq1:= m1 x1''[t] == T[t] + Ffr[t] + Fx[t]
eq2:= m2 y2''[t] == T[t]- m2 g
eqc:= x1''[t] ==- y2''[t]

sol1=NDSolve[{eq1,eq2,eqc,x1[0]==xi, x1'[0]==vxi, y2[0]==yi, y2'[0]==vyi},{x1[t],y2[t],T[t]}, {t,0,200}]
X1[t_]=x1[t]/.sol1[[1]]
Plot[X1[t],{t,0,20},PlotRange->All]

X1[t_]=x1[t]/.sol1[[1]]
Ten[t_]=T[t]/.sol1[[1]]

Plot[X1[t],{t,0,30},PlotRange->All,AxesLabel->{"time[s]","X1 [m]"}]

Plot[Ten[t],{t,0,30},PlotRange->All, AxesLabel->{"time(s)","Tension force (N)"}]

g) [2 marks]

At what time does the block m1 (at least momentarily), first come to rest?  Store this time in a variable called tstop.

From the figure of X1[t] we see that the mass m1 stops momentarily for the first time at t≈4.5s:

s2=FindRoot[X1'[t]==0,{t,4.5}];

tstop=t/.s2[[1]]

X1[tstop]

h) [3 marks]

At the moment found in part g that the block comes to rest, what is the magnitude of the fricition force?  What about the x component of the applied force?  Comment on whether the block will stay at rest or keep moving.

N[Fx[tstop]]

N[Ten[tstop]]

N[ μ[tstop] n[tstop]]

SumForcesInX=N[- Sign[X1'[tstop]] μ[tstop] n[tstop]]  + N[Ten[tstop]] + N[Fx[tstop]]

The x-component of the net force on mass m1 is positive and thus the mass will accelerate in positive x - direction. It will stop momentarily at x1=-0.67m, and then start moving back in positive x-direction.