Modified Euler

advertisement
PHYS-1500 PHYSICAL MODELING
FALL 2006
9/19/2006, Class 7: Modified Euler Method
NAME _________________________________
Simple Harmonic Motion
Use the modified Euler method to construct a spreadsheet that models the motion of a mass on a
spring (Simple Harmonic Motion). This requires a very simple modification of the spreadsheet
that was previously constructed with the Euler method. If you need a copy, you can find one in
the spreadsheet called EULER1. xls that is available at the course web site under “Activities” in
“Class 4”.
The picture below shows the modified spreadsheet. I recommend that you copy the original
program onto a new sheet of the same spreadsheet, and modify the copy. You will need both
versions for the exercise that follows.
The only change that has to be made is in cell B15, which is highlighted above. The formula to
be entered is shown on the formula bar. Then copy the formula to cells B16 through B115.
Finally, graph the modified Euler solution and the analytic solution on the same set of axes.
1. Sketch the graph, for the set of parameters given in the picture above.
2. Change k to 16 dyne/cm. Sketch the graph that results.
3. Change k back to 1.0 dyne/cm, and leave t = 0.1 s. What is the error at t = 10 s?
4. Leave k = 1.0 dyne/cm, and set t = 0.4 s. What is the error at t = 10 s?
Now go back to the original Euler spreadsheet. Set it up with the same parameters that are in the
picture above.
5. What is the error at t = 10 s?
6. Leave k = 1.0 dyne/cm, and set t = 0.4 s. What is the error at t = 10 s?
Large Angle Pendulum
Copy the modified Euler program to a third sheet of the spreadsheet. Modify it to model a large
angle pendulum. The picture below shows the modified spreadsheet.
The changes are in the constants in B5, B6, E4, and E5, and the acceleration term. The
acceleration term in cell D14 is highlighted and appears in the formula bar at the top of the
picture. The key change is to make the acceleration proportional to the sine of the displacement
rather than the displacement. For the settings given in the picture, the analytic solution and the
numerical solution should agree quite well. Graph the modified Euler solution and the analytic
solution on the same set of axes. As 0 is increased, the two solutions will begin to disagree.
However, it is the analytic solution that is no longer correct.
1. The period of the 1.0 m pendulum is about 2.0 s, for small amplitudes. Increase 0 until the
difference between the period of the pendulum is 10% larger than the 2.0 s predicted by the
analytic solution (i.e. its period will be 2.2 s). What is that value of 0?
2. For the Runge-Kutta model of a pendulum, the solution made a dramatic transition as 0 was
changed from 3.14 to 3.15. The modified Euler solution should make a similar transition, but
it may not be at exactly the same value of 0. Find the values of 0 at which the transition
takes place.
 d 
3. Now set 0 = 0, and set 
 = 0.1 rad/s. The two graphs should agree quite well. Then set
 dt 0
 d 

 = 6.26 rad/s. For the Runge-Kutta model of a pendulum, the solution made a
 dt 0
 d 
dramatic transition as 
 was changed from 6.26 to 6.27. The modified Euler solution
 dt 0
 d 
should make a similar transition, but it may not be at exactly the same value of 
 . Find
 dt 0
 d 
the values of 
 at which the transition takes place.
 dt 0
Download