• Tidak ada hasil yang ditemukan

Motion in One Dimension

4.2 Calculation of Motion

4.2.1 Example: Modeling the Motion of a Falling Tennis Ball

This example demonstrates how we can calculate the motion of a falling tennis ball given an expression for the acceleration.

Background: In Sect.4.1.1we studied the motion of a falling tennis ball based on measurements of its motion. However, in physics we do not only want to observe motion, we want to predict it. We do this by first analyzing the problem to find the

4.2 Calculation of Motion 65

0.0s 0.1s 0.2s

0.3s

0.4s

0.5s

30cm

y y

0

y y

0

v

0

=0

y(t) v(t)

Too detailed Good

Fig. 4.9 LeftToo detailed illustration.RightCorrect, simple sketch

forces acting on the object, and from the forces we find a mathematical model of the acceleration of the object. (You will learn to do this in the next chapter. For now we will assume that the acceleration is given). From the acceleration, we find the position and velocity by analytical or numerical integration. We call this recipe the structured problem-solving approach.

System sketch: Your first step should always be to make a sketch the process. In physics, our sketches are vessels for our thoughts. A good, functional sketch is therefore an important part of solving a problem. While the left part of Fig.4.9has a nice artistic appeal and also illustrates the motion in detail, we do not encourage such detailed sketches. Instead, you should make a sketch that only focuses on the most important features of the process, as in the rightmost figure. Here we illustrate the object (the tennis ball),its surroundings(most importantly the floor), and the coordinate system with a clearly marked axis. We have also illustrated the initial position and velocity of the ball, and its position and velocity at a timet. Drawing a simplified illustration helps you discern the important from the unimportant, and it helps you convert a physical situation into a mathematical problem: The figure shows the axis and the position of the ball,y(t), and nothing else.

Simplified model: From an analysis of the physics of the system, we have found that the acceleration of the ball is a constant:

66 4 Motion in One Dimension

a = −g = −9.8 m/s2. (4.53) (You will learn where this model comes from later. Now we only want to address the consequences of such a model). In addition, we know that the ball starts from rest at the positiony0=2.0 m at the timet0=0 s:

y(0 s)=2.0 m, v(0 s)=0 m/s. (4.54) We have now formulated a mathematical description of the problem we want to solve:

a= dv dt =d2y

dt2 = −g, v(0)=v0, y(0)=y0. (4.55) Solving this equation means to find the velocityv(t)and the positiony(t)of the ball for any timet. We call thisthe modeling step, finding the mathematical problem to solve, and the next step isto solvethis problem—to findv(t)andy(t).

Solving the simplified model: Since the acceleration is given and a constant, we can find the velocity by direct integration of the acceleration:

dv

dt = −g; (4.56)

t

t0

dv dt dt =

t

t0

g dt, (4.57) v(t)v(t0)

=0 m/s

= −g t+g t0

=0 s

, (4.58)

which gives

v(t)= −gt. (4.59) Similarly, we find the position by integrating the velocity:

d y

dt =v(t), (4.60)

t 0

d y dt dt=

t 0

v(t)dt, (4.61)

y(t)y(0)= t

0

gt dt = −1

2gt2, (4.62)

which gives

y(t)=y(0)−1

2gt2. (4.63)

4.2 Calculation of Motion 67

Analysis of the simplified model: This is the complete solution to the problem. We know the position and velocity as a function of time. When you have this solution, you are prepared to answer any question about the motion. For example, you can find out when the ball hits the ground and you can find the velocity of the ball when it hits the ground. How would you do that? You need to translate the question into a mathematical problem. We do this by stating the condition “when the ball hits the ground” in mathematical terms: The ball hits the ground when its position is that of the ground, that is, wheny(t)=0 m. (Notice, we have ignored the extent of the ball here). We can use our solution in (4.63) to find the corresponding time:

y(t)=y(0)−1

2gt2=0 m ⇒ t= 2y(0)

g . (4.64)

A more realistic model: Unfortunately, data for the motion of the tennis ball, shown in Fig.4.6b, show that the ball does not have a constant acceleration. This is due to air resistance—an effect not included in the simplified model. Fortunately, we have good models for air resistance. For a falling ball in air, a more realistic model that includes the effect of air resistance is:

a= −gDv|v|, (4.65)

wherev=v(t)is the velocity of the ball,g=9.8 m/s2is the same constant as above, and the constantDdepends on details of the ball. For a tennis ballD=0.0245 m1 is a reasonable value. (You will learn about the background for this model and how to determine values forDlater). We can now formulate a mathematical problem:

a=dv

dt = −gDv|v|, (4.66)

with initial conditionsv(0 s)=0 m/s andy(0 s)=2.0 m.

Solution of the realistic model: Our task is to solve this problem, which means to findv(t)andy(t)for the ball. This can be done either numerically or analytically.

The numerical solution is straightforward, using the approach we have derived, but the analytical solution requires some knowledge of differential equations.

Numerical solution: We apply Euler-Cromer’s method to find the positions and velocities by stepwise integration starting from the initial conditions. The integration step in Euler-Cromer’s method is:

v(ti+Δt)=v(t0)+a(ti,vi,yi) Δt (4.67) y(ti+Δt)=y(t0)+v(ti+Δt) Δt, (4.68)

68 4 Motion in One Dimension

where we insert the acceleration from (4.65):

a(ti,vi,yi)= −gDv(ti)|v(ti)|, (4.69) This is implemented as follows: We open a new script file, and start our script by clearing all variables. This is a good habit to ensure that your previous activities do not affect your new calculations:

clear all; clf;

We define the physical constants and values given in the problem:g, D, y(0)and v(0):

D = 0.0245; % mˆ-1 g = 9.8; % m/sˆ2 y0 = 2.0;

v0 = 0.0;

We need to determine for how long we want to calculate the motion: What will be our maximum value oft? There are typically two strategies: We can make an initial guess for the duration of the simulation, or we can determine when the simulation should stop during the simulation. First, we make a guess for the duration of the simulation. Based on the existing data from Fig. 4.6we guess thatt = 0.5 s is a reasonable simulation time:

time = 0.5;

Next, we need to decide the time-stepΔt. This needs to be small enough to ensure a good precision of the result, but not too small or the simulation takes too long. We try a value ofΔt=0.00001 s:

dt = 0.00001;

Based on this, we calculate how many simulation steps we need, n = t/Δt, and generate arrays for the positions, velocities, accelerations and time for the simulation.

All values are initially set to zero:

n = ceil(time/dt);

y = zeros(n,1);

v = zeros(n,1);

a = zeros(n,1);

t = zeros(n,1);

Then we set the initial conditions:

y(1) = y0;

v(1) = v0;

Before, finally, the Euler-Cromer steps are implemented in an integration loop. The whole program is given in the following:

clear all; clf;

D = 0.0245; % mˆ-1 g = 9.8; % m/sˆ2 y0 = 2.0;

v0 = 0.0;

time = 0.5;

dt = 0.00001;

n = ceil(time/dt);

4.2 Calculation of Motion 69

Fig. 4.10 Plots ofy(t),v(t), anda(t)calculated using the model for air resistance (black line) compared with analytical model (gray circles)

t[s]

y[m]

0.5 1 1.5 2

t[s]

[m/s]

-4 -2

t[s]

0 0.1 0.2 0.3 0.4 0.5

a[m/s2]

-9.8 -9.6 -9.4 -9.2

y = zeros(n,1);

v = zeros(n,1);

a = zeros(n,1);

t = zeros(n,1);

y(1) = y0;

v(1) = v0;

for i = 1:n-1

a(i) = -g -D*v(i)*abs(v(i));

v(i+1) = v(i) + a(i)*dt;

y(i+1) = y(i) + v(i+1)*dt;

t(i+1) = t(i) + dt;

end

The resulting plots ofx(t),v(t), anda(t)are shown in Fig.4.10.

Analysis of realistic model results: We can now use this result to answer questions like how long does it take until the ball hits the ground? Again, we answer the question by translating it into a mathematical question: The ball hits the ground when y(t) = 0 m. However, in this case, we must find the solution numerically.

The simplest approach to this would be to find when y becomes zero during the simulation. It is tempting to do this by checking wheny(t)=0 m:

if (y(i)==0.0) t(i)

end

But this will not work, because y(ti)will usually not be zero for anyi. Typically, the program will step right past y=0 going from a small positive value at someti

to a small negative value atti+1. We should instead find the first timey(t)passes 0, that is, we should find the firstti+1wheny(ti+1) <0. Then we know thaty(t)=0 somewhere in the intervalti <t <ti+1. We can then estimate a precise value for t using interpolation, or we can simply use the valueti+1, if we find that this gives us sufficient precision. This is implemented in the following modification to the program, where we have also stopped the calculation when the ball hits the ground:

for i = 1:n-1

a(i) = -g -D*v(i)*abs(v(i));

v(i+1) = v(i) + a(i)*dt;

y(i+1) = y(i) + v(i+1)*dt;

if (y(i+1)<0) break

70 4 Motion in One Dimension

end

t(i+1) = t(i) + dt;

end v(i+1)

plot(t(1:i),a(1:i)) xlabel(’t [s]’);

ylabel(’a [m/sˆ2]’);

where we have usedbreakto stop the loop when the condition is met. Notice that we should now only plot the values up toi, because we have not calculated any more values. The values fromi+2 tonwere set to zero initially fory,v, andaand will make your plot confusing if you include them. (Try it and see).

Test your understanding: What would happen if we considered that the ball had an initial velocity v0= −2vT when it started? Sketch the resulting position, velocity and acceleration as a function of time.

Analytical solution: The differential equation in (4.66) is one of a few equations we can solve analytically as long as the velocity does not change sign. When the ball is falling down, the velocity is negative, and we can replace|v|by−v:

dv

dt = −gDv(v)= −g+D v2. (4.70) This equation can be solved using separation of variables.

We separate the variables, so that allv’s are on the left side and allt’s are on the right:

dv

gDv2 = −1dt. (4.71)

The differential equation can now be solved by integrating each side fromv0=0 m/s tovand fromt0=0 s tot:

v v0

dv gDv2 =

t t0

−1dt= −t, (4.72) The left-side integral can be solved using your knowledge from calculus (or by using the symbolic solver in matlab) giving:

v

0

dv gDv2 = 1

gvT tanh1 v

vT

, (4.73)

where we have introduced the quantityvT =√

g/D to simplify the notation. We notice thatvT has dimensions m/s, and we may therefore call it a velocity. We insert (4.73) back into (4.72), getting

vT tanh1(v/vT)= −gtv=vTtanh(gt/vT) . (4.74)

4.2 Calculation of Motion 71 We have now found the velocity on the formv=v(t), and we can simply integrate the velocity fromt0totto findy(t):

y(t)y(t0)= t

t0

v(t)dt = t

0

vT tanh

gt vT

dt. (4.75)

This integral can solved by the symbolic integrator in matlab, giving:

y(t)=y(0)v2T/glog coshgt

vT. (4.76)

Figure4.10shows that the analytical solutions (given by circles) are identical to the numerical solutions (lines).

Symbolic solution: The differential equation in (4.66) can also be solved directly using the symbolic solver in matlab. We can solve the differential equation for the velocity,v(t):

dv

dt = −g+D v2, v(0)=0. (4.77)

First, we define the variablesgandDas symbolic variables, and the functionv(t) as a symbolic functions:

>> syms g D y(t)

Matlab can then solve the equation with the initial condition by

>> dsolve(diff(v)==-g+D*vˆ2,v(0)==0)

ans = -(gˆ(1/2)*tanh(Dˆ(1/2)*gˆ(1/2)*t))/Dˆ(1/2) We can then find the position by symbolic integration of this equation:

>> int(ans,t)

ans = log(tanh(Dˆ(1/2)*gˆ(1/2)*t) + 1)/D - (gˆ(1/2)*t)/Dˆ(1/2) Where the initial conditiony(0)=0 sets the second term to zero.

Alternatively, you can solve the differential equation for the position directly:

d2y

dt2 = −gD d y

dt 2

, y(0)=0, v(0)=0. (4.78) by using the symbolic toolbox in matlab:

>> syms g D y(t)

>> Dy = diff(y);

>> dsolve(diff(y,2)==-g-D*Dyˆ2,y(0)==0,Dy(0)==0) ans = -log(tan(Dˆ(1/2)*gˆ(1/2)*t)ˆ2 + 1)/(2*D)

Simple and powerful! You should learn to use the symbolic toolboxes, as they can greatly simplify your worklife as a physicist.

Analysis of analytical solution: We can now use the analytical solution to solve problems of interest, such as finding out when the ball hits the floor, which occurs aty(t)=0 m, that is, when

72 4 Motion in One Dimension y(0)=v2T/glog cosh gt

vTgt

vT =cosh1exp y(0)g

v2T (4.79) that is:

t =vT

g cosh1expy(0)g

v2T . (4.80)

Summary

Motion: The motion of an object is described by:

• the position,x(t), as a function of time, measured in a specified coordinate system

• the velocityv(t)=d x/dt

• the accelerationa(t)=dv/dt=d2x/dt2 Structured problem-solving approach:

• The structured problem-solving approach is illustrated in Fig.4.11.

Solution methods: In the “Solver” we solve the equation:

d2x

dt2 =a(t,x,d x dt).

with the initial conditionsx(t0)=x0andv(t0)=v0.

Numerically, we solve the equation using an iterative approach starting from the initial conditions. For example, we can use Euler-Cromer’s method:

v(ti+Δt)=v(ti)+Δt·a(x(ti),v(ti),ti),

Identify

What object is moving?

How is the position,x(t), measured? (Origin and axes of coordinate sys- tem).

Find initial conditions, x(t0) andv(t0).

Model Find the forces acting on the object.

Introduce models for the forces.

Apply Newton’s second law of motion to find the acceleration, a = a(x, v, t).

Solve

Solve the equation:

d2x dt2=a(x, v, t), with the initial conditions x(t0) =x0andv(t0) = v0using analytical or nu- merical techniques.

The solution gives the po- sition and velocity as a function of time, x(t), andv(t).

Analyse Check validity ofx(t) and v(t).

Usex(t) andv(t) the an- swer questions posed.

Evaluate the answers.

Fig. 4.11 Structured problem-solving approach. The second box, model, will be filled in Chap.5

4.2 Calculation of Motion 73

x(ti +Δt)=x(ti)+Δt·v(ti+Δt).

Analytically, when the acceleration,a=a(t), is only a function of time,t, we can solve the equations by direct integration:

v(t)=v(t0)+ t

t0

a(t)dt, x(t)=x(t0)+ t

t0

v(t)dt, A typical example is motion with constant acceleration.

• When the acceleration has a general form,a = a(t,x,v), we need to solve the differential equation. In this case, there are no general approaches that always work. Instead, you must rely on your experience and your knowledge of calculus.

Exercises

Discussion Questions