- •Preface
- •Contents
- •1 Introduction
- •1.1 Physics
- •1.2 Mechanics
- •1.3 Integrating Numerical Methods
- •1.4 Problems and Exercises
- •1.5 How to Learn Physics
- •1.5.1 Advice for How to Succeed
- •1.6 How to Use This Book
- •2 Getting Started with Programming
- •2.1 A Python Calculator
- •2.2 Scripts and Functions
- •2.3 Plotting Data-Sets
- •2.4 Plotting a Function
- •2.5 Random Numbers
- •2.6 Conditions
- •2.7 Reading Real Data
- •2.7.1 Example: Plot of Function and Derivative
- •3 Units and Measurement
- •3.1 Standardized Units
- •3.2 Changing Units
- •3.4 Numerical Representation
- •4 Motion in One Dimension
- •4.1 Description of Motion
- •4.1.1 Example: Motion of a Falling Tennis Ball
- •4.2 Calculation of Motion
- •4.2.1 Example: Modeling the Motion of a Falling Tennis Ball
- •5 Forces in One Dimension
- •5.1 What Is a Force?
- •5.2 Identifying Forces
- •5.3.1 Example: Acceleration and Forces on a Lunar Lander
- •5.4 Force Models
- •5.5 Force Model: Gravitational Force
- •5.6 Force Model: Viscous Force
- •5.6.1 Example: Falling Raindrops
- •5.7 Force Model: Spring Force
- •5.7.1 Example: Motion of a Hanging Block
- •5.9.1 Example: Weight in an Elevator
- •6 Motion in Two and Three Dimensions
- •6.1 Vectors
- •6.2 Description of Motion
- •6.2.1 Example: Mars Express
- •6.3 Calculation of Motion
- •6.3.1 Example: Feather in the Wind
- •6.4 Frames of Reference
- •6.4.1 Example: Motion of a Boat on a Flowing River
- •7 Forces in Two and Three Dimensions
- •7.1 Identifying Forces
- •7.3.1 Example: Motion of a Ball with Gravity
- •7.4.1 Example: Path Through a Tornado
- •7.5.1 Example: Motion of a Bouncing Ball with Air Resistance
- •7.6.1 Example: Comet Trajectory
- •8 Constrained Motion
- •8.1 Linear Motion
- •8.2 Curved Motion
- •8.2.1 Example: Acceleration of a Matchbox Car
- •8.2.2 Example: Acceleration of a Rotating Rod
- •8.2.3 Example: Normal Acceleration in Circular Motion
- •9 Forces and Constrained Motion
- •9.1 Linear Constraints
- •9.1.1 Example: A Bead in the Wind
- •9.2.1 Example: Static Friction Forces
- •9.2.2 Example: Dynamic Friction of a Block Sliding up a Hill
- •9.2.3 Example: Oscillations During an Earthquake
- •9.3 Circular Motion
- •9.3.1 Example: A Car Driving Through a Curve
- •9.3.2 Example: Pendulum with Air Resistance
- •10 Work
- •10.1 Integration Methods
- •10.2 Work-Energy Theorem
- •10.3 Work Done by One-Dimensional Force Models
- •10.3.1 Example: Jumping from the Roof
- •10.3.2 Example: Stopping in a Cushion
- •10.4.1 Example: Work of Gravity
- •10.4.2 Example: Roller-Coaster Motion
- •10.4.3 Example: Work on a Block Sliding Down a Plane
- •10.5 Power
- •10.5.1 Example: Power Exerted When Climbing the Stairs
- •10.5.2 Example: Power of Small Bacterium
- •11 Energy
- •11.1 Motivating Examples
- •11.2 Potential Energy in One Dimension
- •11.2.1 Example: Falling Faster
- •11.2.2 Example: Roller-Coaster Motion
- •11.2.3 Example: Pendulum
- •11.2.4 Example: Spring Cannon
- •11.3 Energy Diagrams
- •11.3.1 Example: Energy Diagram for the Vertical Bow-Shot
- •11.3.2 Example: Atomic Motion Along a Surface
- •11.4 The Energy Principle
- •11.4.1 Example: Lift and Release
- •11.4.2 Example: Sliding Block
- •11.5 Potential Energy in Three Dimensions
- •11.5.1 Example: Constant Gravity in Three Dimensions
- •11.5.2 Example: Gravity in Three Dimensions
- •11.5.3 Example: Non-conservative Force Field
- •11.6 Energy Conservation as a Test of Numerical Solutions
- •12 Momentum, Impulse, and Collisions
- •12.2 Translational Momentum
- •12.3 Impulse and Change in Momentum
- •12.3.1 Example: Ball Colliding with Wall
- •12.3.2 Example: Hitting a Tennis Ball
- •12.4 Isolated Systems and Conservation of Momentum
- •12.5 Collisions
- •12.5.1 Example: Ballistic Pendulum
- •12.5.2 Example: Super-Ball
- •12.6 Modeling and Visualization of Collisions
- •12.7 Rocket Equation
- •12.7.1 Example: Adding Mass to a Railway Car
- •12.7.2 Example: Rocket with Diminishing Mass
- •13 Multiparticle Systems
- •13.1 Motion of a Multiparticle System
- •13.2 The Center of Mass
- •13.2.1 Example: Points on a Line
- •13.2.2 Example: Center of Mass of Object with Hole
- •13.2.3 Example: Center of Mass by Integration
- •13.2.4 Example: Center of Mass from Image Analysis
- •13.3.1 Example: Ballistic Motion with an Explosion
- •13.4 Motion in the Center of Mass System
- •13.5 Energy Partitioning
- •13.5.1 Example: Bouncing Dumbbell
- •13.6 Energy Principle for Multi-particle Systems
- •14 Rotational Motion
- •14.2 Angular Velocity
- •14.3 Angular Acceleration
- •14.3.1 Example: Oscillating Antenna
- •14.4 Comparing Linear and Rotational Motion
- •14.5 Solving for the Rotational Motion
- •14.5.1 Example: Revolutions of an Accelerating Disc
- •14.5.2 Example: Angular Velocities of Two Objects in Contact
- •14.6 Rotational Motion in Three Dimensions
- •14.6.1 Example: Velocity and Acceleration of a Conical Pendulum
- •15 Rotation of Rigid Bodies
- •15.1 Rigid Bodies
- •15.2 Kinetic Energy of a Rotating Rigid Body
- •15.3 Calculating the Moment of Inertia
- •15.3.1 Example: Moment of Inertia of Two-Particle System
- •15.3.2 Example: Moment of Inertia of a Plate
- •15.4 Conservation of Energy for Rigid Bodies
- •15.4.1 Example: Rotating Rod
- •15.5 Relating Rotational and Translational Motion
- •15.5.1 Example: Weight and Spinning Wheel
- •15.5.2 Example: Rolling Down a Hill
- •16 Dynamics of Rigid Bodies
- •16.2.1 Example: Torque and Vector Decomposition
- •16.2.2 Example: Pulling at a Wheel
- •16.2.3 Example: Blowing at a Pendulum
- •16.3 Rotational Motion Around a Moving Center of Mass
- •16.3.1 Example: Kicking a Ball
- •16.3.2 Example: Rolling down an Inclined Plane
- •16.3.3 Example: Bouncing Rod
- •16.4 Collisions and Conservation Laws
- •16.4.1 Example: Block on a Frictionless Table
- •16.4.2 Example: Changing Your Angular Velocity
- •16.4.3 Example: Conservation of Rotational Momentum
- •16.4.4 Example: Ballistic Pendulum
- •16.4.5 Example: Rotating Rod
- •16.5 General Rotational Motion
- •Index
4.1 Description of Motion |
57 |
We implement these formulas directly in the program, and plot both data and model:
g = 9.8 # m/sˆ2 y0 = 1.6 # m
vt = -g*t
yt = y0 - 0.5*g*t**2 subplot(2,1,1) plot(t[0:imax],y[0:imax],’-r’); hold(’on’) plot(t[0:imax],yt[0:imax],’--b’); hold(’off’)
xlabel(’t [s]’) ylabel(’y [m]’) subplot(2,1,2)
plot(t([0:imax],v[0:imax],’-r’); hold on plot(t[0:imax],vt[0:imax],’--b’); hold(’off’)
xlabel(’t [s]’) ylabel(’v [m/s]’)
We use hold on to get both plots in the same figure (see Fig. 4.6e, f. Here we notice that the differences in y(t ) and v(t ) are more difficult to spot. Using the acceleration for comparisons was therefore a better approach to spot the differences. And an approach with a sound, physical basis, since we will later learn that differences in physics appear in differences in the accelerations.
Further work: We leave it to you to look more carefully at what happens during the bounce. Can you zoom in on the relevant area?
Comment: Notice that the data in this example were based on numerical results and not experimental data in order to get clear results. Experimental data will typically contain significant noise, which we did not want to include here. The program used to generate the data-set is makefallingtennisball.m.4
4.2 Calculation of Motion
Mechanics is about the motion of objects. Usually, we do not know the position as a function of time. Instead, we want to determine the motion based on measurements of the acceleration (or velocity); based on a mathematical expression for the acceleration; or based on a differential equation for the position. We therefore need tools to do the opposite of what we did above: We need tools to find the motion, x (t ), from the acceleration, a(t ), of an object (Table 4.3).
Discrete Integration
As lead developer of “The Rocket”, a new roller-coaster ride at a major themepark, you have fitted an accelerometer into a test-cart. The accelerometer records the
4http://folk.uio.no/malthe/mechbookmakefallingtennisball.m.
58 |
|
|
|
|
4 Motion in One Dimension |
||
Table 4.3 Data from the motion of “The Rocket” |
|
|
|
|
|||
|
|
|
|
|
|
|
|
i |
0 |
1 |
2 |
3 |
|
4 |
5 |
|
|
|
|
|
|
|
|
ti (s) |
0.0 |
0.1 |
0.2 |
0.3 |
|
0.4 |
0.5 |
ai (m/s2) |
0.00 |
1.43 |
2.80 |
4.13 |
|
5.62 |
7.21 |
acceleration of the cart at regular time intervals of 0.1 s. How can you use this data to determine the velocity and position of the test cart?
The problem is how to find the sequence of positions, x (ti ), from the sequence of accelerations, a(ti )? This is the reverse of what we have been doing so far, where we have estimated first the velocities and then the accelerations from the positions using numerical derivatives. Can we simply use the methods we have developed for numerical derivatives “in reverse”? The average acceleration from t1 = 0.0 s to t2 = 0.1 s is
a(t |
) |
= |
v(ti + t ) − v(ti ) |
. |
(4.27) |
¯ i |
|
t |
|
(So far this is an exact result—we have not done any approximations yet). We can
“reverse” (4.27) to find an equation for the velocity at the time t = ti + |
t : |
v(ti + t ) − v(ti ) = a¯ (ti ) t |
|
v(ti + t ) = v(ti ) + a¯ (ti ) t |
(4.28) |
This method would allow us to step one step forward in time from the time t = ti to the time t = ti + t , if only we knew the average acceleration of the time interval. Unfortunately, the accelerometer does not give the average, but rather the instantaneous acceleration of the cart, a(ti ). Let us ignore this distinction and approximate the average acceleration over the time interval by the instantaneous acceleration at the beginning of the time interval:
a¯ (ti ) a(ti ) , |
(4.29) |
We are now in a position to use (4.28) to step forward in small steps of |
t , calculating |
the changes in the velocities of the cart as we go. However, finding the velocities only takes us part of the way—we also need to determine the positions, x (ti ), of the cart, from the velocities, v(ti ), calculated using (4.28). This time, we “reverse” the numerical derivative of the position:
x (ti + t ) − x (ti ) = v¯(ti ) t |
|
x (ti + t ) = x (ti ) + v¯(ti ) t . |
(4.30) |
Where we again assume that the average velocity is approximately the same as the velocity we calculated in (4.28): v¯(ti ) v(ti ). We are now ready to use (4.28) and
4.2 Calculation of Motion |
|
|
59 |
20 |
|
|
|
10 |
|
|
|
0 |
|
|
|
-10 |
|
|
|
0 |
5 |
10 |
15 |
15 |
|
|
|
|
|
10 |
|
|
|
|
|
5 |
|
|
|
|
|
0 |
|
|
|
|
|
0 |
0.2 |
0.4 |
0.6 |
0.8 |
1 |
Fig. 4.7 Illustration of the motion of “The Rocket”. The accelerations are illustrated for the whole time interval (top figure) and the time-resolution is shown by the squares representing the measurement points (bottom figure)
(4.30) to move forwards in steps of t . However, since these methods only give the increments in the velocity and the position, we need to know the first velocity of the cart, v(t0) = v0 and where the cart starts from, x (t0) = x0. This is called the initial conditions of the problem.5
We are now ready to find the velocities and positions, starting at the time t = t0 = 0.0s:
1.At t = t0 = 0.0 s, the velocity and position of the cart is given v(t0) = v(0.0 s) = 0.0 m/s, x (t0) = x (0.0 s) = 0.0 m.
2.At t = t0 + t = 0.1 s, the velocity of the cart is:
v(0.1 s) v(0.0 s) + a(0.0 s) t = 0.5 m/s , |
(4.31) |
where the acceleration a(0.0 s) = 5.0 m/s2 is listed in the table Fig. 4.7. The position of the cart is:
x (0.1 s) x (0.0 s) + v(0.0 s) t = 0.0 m (4.32) t = 0.2 s, the velocity of the cart is:
v(0.2 s) v(0.1 s) + a(0.1 s) t = 0.9 m/s; , |
(4.33) |
where the acceleration a(0.1 s) = 7.0 m/s is listed in the table in Fig. 4.7. The position of the cart is:
x (0.2 s) x (0.1 s) + v(0.1 s) t = 0.05 m , |
(4.34) |
5Notice that we need two initial conditions, v(t0) = v0 and x (t0) = x0 to determine the position from the acceleration: This is because we need to first calculate the velocities, and this requires an initial condition of the velocities, and then calculate the position, and this also requires an initial condition, this time on the position.
60 |
4 Motion in One Dimension |
where the velocity v(0.1 s) = 0.5 m/s was found in the previous step of the calculation.
This method is called Euler’s method for numerical integration, and it is sufficiently flexible and robust to solve most problems presented in this book!
In Euler’s method we find the position, x (ti ), and velocity, v(ti ), of an object as a function of time by a stepwise summation of the acceleration, a(ti ), and the velocity, v(ti ):
v(t0) |
= v0 |
|
|
x (t0) = x0 |
|
||
|
. . . |
|
|
v(ti + |
t ) = v(ti ) + a(ti ) t |
|
|
x (ti + |
t ) = x (ti ) + v(ti ) t |
(4.35) |
We apply this method to find the position and velocities for the motion of “The Rocket”. The accelerations for the cart are stored in the file therocket.dat,6 where each line contains a time (in seconds) and an acceleration (in m/s2):
0.0000000e+000 2.7316440e-001
1.0000000e-001 1.4411079e+000
2.0000000e-001 2.6693138e+000
3.0000000e-001 4.2383806e+000
We read the data into Python find the time-step t from t2 − t1, and apply Euler’s algorithm from (4.35) for each i starting from the initial condition x (t0) = 0 m and v(t0) = 0 m/s using a for-loop.
t,a = loadtxt(’rocket.dat’,usecols=[0,1],unpack=True); dt = t[1] - t[0];
n = length(t);
x = zeros(n,float); v = zeros(n,float);
x[0] = 0.0; # Initial value v[0] = 0.0; # Initial value for i in range(1,n):
v[i] = v[i-1] + a[i-1]*dt; x[i] = x[i-1] + v[i-1]*dt;
The resulting position and velocity plots are shown in Fig. 4.8.
The procedure presented here covers the most important topic in kinematics: How to determine the motion of an object given the acceleration of the object. This is important because you will later learn that the physics of a problem—the interactions between the object and other objects—gives the acceleration of the object. Given the acceleration it will be up to you to determine the motion—and you can do this using the methods provided here: Either by using Euler’s method (or more advanced
6http://folk.uio.no/malthe/mechbook/therocket.dat.
4.2 Calculation of Motion
Fig. 4.8 Illustration of the motion of “The Rocket”, showing the measured acceleration, and the calculated velocity and position
|
|
|
|
61 |
[M] |
400 |
|
|
|
200 |
|
|
|
|
x |
|
|
|
|
|
|
|
|
|
|
0 |
|
t [S] |
|
] |
60 |
|
|
|
/S |
40 |
|
|
|
[M |
|
|
|
|
|
|
|
|
|
v |
20 |
|
|
|
|
|
|
|
|
] |
20 |
|
t [S] |
|
|
|
|
||
2 |
|
|
|
|
S |
10 |
|
|
|
[M/ |
|
|
|
|
0 |
|
|
|
|
a |
|
|
|
|
|
|
|
|
|
|
-10 |
|
|
|
|
0 |
5 |
10 |
15 |
|
|
|
t [S] |
|
techniques) to solve the problem numerically, or by finding a solution to the problem based on the specialized techniques you have learned in calculus.
Formal Integration
A more formal formulation of the problem is to assume that we know the acceleration a(t ) of an object as a function of time. How do we find the position and velocity of the object in this case?
Again, we realize that we have already solved the “reverse” problem—we know that the acceleration is the time derivative of the velocity and that the velocity is the time derivative of the position. We find the velocity by integrating the definition of acceleration:
a(t ) = dt |
|
t0 |
a(t ) dt = |
t0 |
|
dt |
dt = v(t ) − v(t0) , |
(4.36) |
|
|
dv |
|
t |
|
t |
dv |
|
|
|
|
|
v(t ) = v(t0) + |
t0t |
|
|
|
(4.37) |
||
|
|
a(t ) dt . |
When we know the velocity as a function of time, we can find the position by integrating the velocity, starting from the definition of velocity:
v(t ) = dt |
|
t0 |
v(t ) dt = |
t0 |
|
dt |
dt = x (t ) − x (t0) |
(4.38) |
|
d x |
|
t |
|
t |
|
d x |
|
|
|
|
|
x (t ) = x (t0) + |
t0t |
|
|
|
(4.39) |
||
|
|
v(t ) dt . |
62 |
|
4 Motion in One Dimension |
|
If we insert v(t ) from (4.37), we get: |
|
|
|
x (t ) = x (t0) + t0t [v(t0) + t0t |
a(t ) dt ] dt |
|
|
= x (t0) + v(t0)(t − t0) + |
t0t [ t0t |
a(t ) dt ] dt . |
(4.40) |
These equations constitute the integration method to find the position x (t ) and velocity v(t ) given the acceleration a(t ) of an object:
|
v(t ) = v(t0) + t0t |
a(t ) dt , |
(4.41) |
x (t ) = x (t0) + t0t |
v(t ) dt = x (t0) + v(t0)(t − t0) + t0t [ t0t |
a(t ) dt ] dt . |
|
|
|
|
(4.42) |
There is no need to memorize these equations. They follow from your knowledge of calculus. You only need to remember the definitions of the velocity as the time derivative of the position, and the acceleration as the time derivative of the velocity.
We can apply this method to find the motion for constant acceleration, a(t ) = a0, with initial conditions x (t0) = x0 and v(t0) = v0:
v(t ) = v(t0) + t0t |
a0 dt = v0 + a0 (t − t0) . |
(4.43) |
||||
and |
t0 |
v(t ) dt = x0 + v0 (t − t0) + |
2 a0 (t − t0)2 . |
|
||
x (t ) = x (t0) + |
(4.44) |
|||||
|
t |
|
|
1 |
|
|
Differential Equations
Usually, we do not have a set of measurements or a mathematical expression for the acceleration. Instead, we find an expression for the acceleration based on a physical model of the forces acting on the object, and from the forces we find the acceleration. Given this expression for the acceleration, we determine the velocity and position of the object. But this sounds exactly like what we did above? We integrate the acceleration to find the velocity, and then integrate again to find the position. Unfortunately, direct integration only works if the acceleration is only a function of time. In most
4.2 Calculation of Motion |
63 |
cases, we do not have an expression of the acceleration as a function of time, but instead we know how the acceleration varies with velocity and position. For example, a tiny grain of sand sinking in water has an acceleration on the form:
d2 x |
|
dt 2 = a = −a0 − c · v , |
(4.45) |
where the acceleration depends on the velocity of the grain! And a ball suspended in a vertical spring has an acceleration:
d2 x |
|
dt 2 = a = −C · x , |
(4.46) |
that depends on the position of the ball. Such problems cannot be solved by direct integration, because the function x (t ) and its derivatives occur on both sides of the equation. Such equations are called differential equations. Finding analytical solutions of differential equations require some skill and experience, but, fortunately, we can solve them numerically in exactly the same way we did above.
Numerical Solution
In most mechanics problems, we want to find the position, x (t ), which satisfies an equation on the form:
|
dt 2 |
= a t , x , |
dt |
, v(t0) = v0 , x (t0) = x0 , |
(4.47) |
|
d2 x |
|
d x |
|
|
We find the solution by moving forwards in time in small increments |
t . We start |
from the initial values x (t0) = x0 and v(t0) = v0. We find the velocity and position
after a small time-step t |
using Euler’s method (4.28): |
|
v(t0 + |
t ) v(t0) + a(t0, x (t0), v(t0)) t , |
(4.48) |
x (t0 + t ) x (t0) + v(t0) t , |
(4.49) |
where a(t0, x (t0), v(t0)) is the acceleration we get when we put the values at t = t0 into the expression we have for the acceleration in (4.47). We can now continue to step forward in time, finding subsequent values x (ti ) and v(ti ) in steps of t . This method is called Euler’s method. It is definitely not the best numerical method of integration—actually we strongly advice against using Euler’s method. It’s strength is rather in the simple, intuitive implementation. Surprisingly, changing the step in (4.49) to the following:
x (t0 + t ) x (t0) + v(t0 + t ) t , |
(4.50) |