Webnucleo.org

Mail Lists | Developers
small logo

This tutorial describes how to use the Newton Tool to propagate the motion of a pendulum. The motion of a pendulum is well approximated by that of a simple harmonic oscillator, if the maximum angular displacement is always small. For a true pendulum, however, the solution does not have a closed form but rather involves elliptic integrals. We therefore seek a numerical solution, which we can easily obtain from the Newton Tool. If you have not already done so, launch the Newton Tool.

Acceleration Equations

While the exact solution to the simple pendulum is complicated, the acceleration equations are easy to obtain. The most convenient coordinates to solve the problem in are the polar coordinates r and θ. However, for a simple pendulum the length of the pendulum, r, won't change. So, we only need to propagate the variable θ. This means the x variable in the Newton Tool will actually correspond to the variable θ. With this in mind, the acceleration we equation need is:

Equations

In order to simulate this system, we have to pick a length. If we pick r to be about 2 meters, our simulation will resemble a child's swing set. Enter the equation into the newton tool as shown below. Then click next.

Equations

-top-

Initial Conditions

On the 'Initial Conditions' panel, enter the numbers shown below. Using the swing analogy, this would correspond to pulling the child back about 30 degrees, releasing, and watching for 20 seconds. (Notice the initial angle must be entered in radians for the sin function to operate correctly. Once this information is entered, click 'Calculate'.

Equations

-top-

Plots

Set the 'plot on x-axis' to 'Time' and 'plot on y-axis' to 'x position'. Click 'View Plot' and you'll get a graph that looks like the following.

Equations

We can change this plot depending upon what we're interested in. For example, we can view a phase portrait (position vs. velocity) for this simple system. To do this, go back to the 'Plot Results' panel, and change 'plot on x-axis' to 'x position' and 'plot on y-axis' to 'x velocity'. This generates a graph like the following.

Equations

The closed loop shown in the graph shows that our system is conserving energy. This is not surprising because of the assumptions that underlie our initial equation. Also, this graph will give us the answer to the common question, 'What speed is the child going at the lowest point of his/her swing?'

-top-

Table

Perhaps the graphs above are not quite intuitive enough. Remember the x position is actually an angle, so if we want to see what this would actually look like, we need to transform it to an Cartesian (x,y) system. We can do this using the information from the 'Table' panel of the Newton Tool. One way to do this is to select the parameters we'd like in the table and select 'View ASCII Table'.

Equations

This will generate a page of numbers we can cut and past into a text file we can use in any data manipulation program. Here is an example of the output: pendulum_1.dat. You can use a spreadsheet program and the transformation equations, x=r*sin(θ) and y=-r*cos(θ) to make the Cartesian graph. (Remember, the r we used was 2.0 meters) For example, using OpenOffice.org's Calc (or Microsoft Excel), you can make a graph that looks like this.

Equations

-top-

Challenge

We saw that the phase portrait of the system gave a closed loop indicating the energy was conserved for this problem. Now, change the value of the 'Adaptive Time Step'. Can you find a value or values for this parameter that will cause your phase portrait not to be a closed loop? What does this mean?

-top-



Valid XHTML 1.1        Copyright © 2001-2012, Clemson University. All rights reserved.        Valid CSS!
Page last modified on 2006/06/09 09:14