P2820 Final Exam Wednesday April 13, 2016

Name:
Student #:

Total marks: 45

Q1 [10 marks]

The dastardly Snydley Whiplash is up to no good again and pilfers an imitation Chinese vase from Betaman’s mother.  To escape from the pursuing Betaman, Snydley turns on his jetpack and flies straight up.  Before Snydley has gotten too far, Betaman (who can fly) has grabbed Snydley by the ankles and is using his flying force to try to bring Snydley down.  As usual g=9.81 m/s/s.

Thus at t=0, Snydley finds himself in the following situation:

Snydley’s mass: 65 kg (this includes the vase)

initial height: 2m
initial velocity 10 m/s (up)

Jetpack initial mass: 100 kg
Rate at which jetpack is burning fuel 4 kg /s 
[The jetpack loses mass as it provides thrust. This means the mass is a function of time.]
Jetpack upward thrust: 4000 N
 
Magnitude of downward force provided by Betaman (this increases with time): 245 + 300 t  N

And of course, air drag force with magnitude Fd = 0.2 (v^2), where v is Snydley velocity.
(Don’t forget that the sign of the drag force depends on the direction of v.)

a) [8 marks]

Solve for Snydley’s height y(t) and velocity v(t) as functions of time, using the second order Runge-Kutta (midpoint) scheme to solve Newton’s Law as an ODE.  Interpolate and plot your numerical solutions.

The longest you should solve for is 20s, at which point all the fuel in the jetpack is gone.

Remove["Global`*"]

yinit=2;
vinit=10;
g=9.81;
tf=20;
m1=65;

FJ=4000;

b) [2 marks]

From v(t), determine the time at which the maximum height is reached and the maximum height.

Q2 [15 marks]

Remove["Gobal`*"]

Two light pith balls with masses m1 and m2 both carry small positive charges q1 and q2 and are constrained to be on the x axis.

Initially, m1 as located at x1init and m2 is located at x2init.  They are initially both at rest.

The electric (Coulomb) potential energy between them is

Uc(r)=k ((q1 q2)/r)

Here are the parameters in MKS units.

ke=8.99 (10^9);

q1=6 (10^(-6)); (* i.e. 6 microcoulombs*)
q2=2 (10^(-6));
m1=0.010; (* i.e. 10 grams *)
m2=0.025;

x1init=-1; (* initial position of mass 1 in metres *)
x2init=0.2;
v1init=0;
v2init=0;

(a) [2 marks]

What is the force (in N) on pith ball #1 due to the electrostatic repulsion between the two pith balls?  [positive is to the right, negative to the left]

(b) [2 marks]

Additionally, there is an external conservative force field which provides a pith ball with potential energy,

U(x)=(x^4)

What is the force due to this conservative field on pith ball #1? On pith ball #2?

(c) [6 marks]

Set up and solve the equations of motions for the two pith balls out to 1 second.  Plot their positions as functions of time on the same plot. If your solutions are stored in functions called X1[t] and X2[t], the following line of code should produce an animation of their motion.

What evidence is there in the motion that m1 < m2 ?

d) [3 marks]

Plot the combined kinetic energy of the two pith balls, the potential energy energy of the system and the mechanical energy (sum of kinetic and potential energies) to show that energy is conserved.

e) [2 marks]

If Einitial is the initial mechanical energy and Emech(t) is the total energy as a function of time, plot the fractional change in mechanical energy as a function of time.  This is a measure of how good the numerical solution is.

Q3 [15 marks]

Download the file vdata.dat from the course website.  It contains two columns of data: time (s) in the first, velocity (m/s, positive means upwards) in the second.  The data represent a projectile fired straight up.  Acceleration due to gravity is not known because this experiment was done on a different planet.

a) [2 marks]

Import and plot the data.  Include axes labels.

b) [4 marks]

Determine the accelation of the projectile as a function of time using the (discrete form of) the forward difference approximation for the first derivative of a function.  Plot the acceleration as a function of time.

c) [6 marks]

Assume that the drag force on the projectile can be approximated with -b v, where v is the velocity and b is the drag coefficient.  Report the drag coefficient b and the gravitational accelaration g to three figures by appropriately plotting the data and determining the slope and intercept through a linear least-squares fit.  Report uncertainties in these quantities. The mass of the projectile is 2.5kg.

d) [3 marks]

If the initial height of the projectile is 25m, how high off the ground is the projectile at t=3s (the end of the data sampling)?  Use the trapezoid rule to integrate the data.

Q4  [5 marks]

In optoacoustic imaging, specific tissues aborb laser light at particular frequencies.  A short laser pulse will quickly heat the tissue ever so slightly, which causes a small but rapid expansion of the tissue.  This expansion causes ultrasonic waves to emanate from the tissue.  With this technique, specific tissues can be imaged within the body in a targeted way.

A simple 1-D model of how the pressure (sound wave) propagates is given by the following PDE, which is just the damped wave equation with a forcing term on the right hand side that is proportional to the time derivative of the light intensity f, which is localized in both space and time.

(((∂^2)η)/(∂ (t^2)))+γ((∂η)/(∂ t))-(c^2)(((∂^2)η)/(∂ (x^2)))=k ((∂ f)/(∂ t))

For simplicity, we set c=1 and k=1, while γ=0.02.  k describes how the tissue absorbs laser light and expands. η is the pressure variation.

In our model

f(x,t)=exp(-((((t-3))^2)/(2 (((0.4))^2)))) exp(-((((x-4))^2)/(2 (((0.5))^2)))),

i.e. the light is shone at x=4 briefly at t=3.

You need to solve this PDE from t=0 to t=20 and on x=0 to x=10.

The initial conditions are the η=0 everywhere, and that initially it is not changing in time.

The left boundary condition is that η(0,t)=0 [fixed boundary]. On the right boundary condition (at x=L for all t), ((∂η)/(∂x))=0.

a)

To start, use Manipulate to visualize both f(x, t) and it first derivative with respect ot time (plot both as a function of x on the same graph, and use a slider to change t).

Also plot f(4,t) and  ((∂ f(4,t))/(∂ t)) as functions of t. [You may wish to employ the Derivative function.]

Remove["Global`*"]

L=10;
tf=20;
k=1;
c=1;
γ=0.02;

f[x_,t_]:=Exp[-((((t-3))^2)/(2 (((0.4))^2)))]Exp[-((((x-4))^2)/(2 (((0.5))^2)))]

b)

Now solve the PDE with the given initial and boundary conditions and use Manipulate to visualize your solution.

Also plot the pressure variation at x=L as a function of time.