PH3110
HW6 Problem #1. COMP1 (20 pts)
http://www.phy.mtu.edu/~jaszczak/Ph3110/RungeKutta/
(a)
Numerical
integration has an inherent limit to its accuracy, but you can set the desired
accuracy or tolerance to be as small as you desire (though smaller tolerances
will require more computational time). In this part you will study the effects
of varying the tolerance parameter on the integration accuracy. Start with tolerance set to 1.0d-5 and
plot x(t). Now make tolerance appreciably smaller and appreciably larger and see
what effects that has by plotting these two additional cases on the same graph
as the original x(t) graph. Set your system to study an underdamped harmonic
oscillator system with damping that is linear in the velocity. Use
initial conditions x(0)=1.0d0, and v(0)=0.0d0. Before
proceeding, make sure you set tolerance back to a
sufficiently small value so that you get accurate results. Comment on your
observations.
(b)
Now change the
damping coefficient gamma to investigate no damping, underdamped, critically
damped, and overdamped cases. Plot these four cases for x(t) on one graph, and
also plot v(t) on one other graph. (Extra Credit: Plot the energy versus time
for these four cases on one graph. 5 pts.)
(c)
Now investigate
changing the initial velocity on the overdamped case. Choose at least three
different v(0) values and plot x(t) for these cases on one plot. At At least
one curve should have a crossing of the origin. Comment on your observations.
(d)
Finally, change gamma for several underdamped cases. Investigate what
happens for very lightly damped oscillations as compared to barely underdamped
and discuss the results.