<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<font face="serif">I made some slight changes to my code for the
damped/driven pendulum so that it uses SI units. For small
values of theta<br>
the undamped period is 2.00 seconds -- which agrees with
experimental results.<br>
<br>
I do not, however have a "corrected" damping term "b" or kick
amplitude "A". There is some disagreement in the literature over
those values with a friend of mine (and former Mercer professor of
physics) demonstrating that traditional methods do not correctly
account for all effects. With that said, <img
style="vertical-align: middle"
src="cid:part1.C2FF721E.3515F8C1@mercer.edu"
alt="$b\propto\frac{1}{2 m \omega}$">. Basically <br>
<br>
To minimize the work for you, I put all of the changes in the
omegadot function. You should just be able to replace what you
already have with this and make any small modifications required
for your specific implementation of the pendulum.<br>
<br>
</font><tt>double omegadot(double t, double theta, double omega)</tt><tt><br>
</tt><tt>{</tt><tt><br>
</tt><tt> double R = 0.9938; // Length of pendulum in meters</tt><tt><br>
</tt><tt> double g = 9.80665; // Normalized gravitational
constant m/s^2</tt><tt><br>
</tt><tt> double b = 0.10; // Frictional damping constant</tt><tt><br>
</tt><tt> double m = 1.00; // Mass in kg</tt><tt><br>
</tt><tt> double A = 0.00; // Amplitude of initial driving
force</tt><tt><br>
</tt><tt> double k = 0.00; // Frequency parameter of initial
driving force</tt><tt><br>
</tt><tt><br>
</tt><tt> double drag, kick, denom;</tt><tt><br>
</tt><tt> </tt><tt><br>
</tt><tt> denom = m*R*R; </tt><tt><br>
</tt><tt> drag = b*omega / denom;</tt><tt><br>
</tt><tt> kick = A*cos(k*t) / denom;</tt><tt><br>
</tt><tt> return -g/R*sin(theta)-drag+kick;</tt><tt><br>
</tt><tt>}</tt><tt><br>
</tt><font face="serif"><br>
</font>
<pre class="moz-signature" cols="72">--
Andrew J. Pounds, Ph.D. (<a class="moz-txt-link-abbreviated" href="mailto:pounds_aj@mercer.edu">pounds_aj@mercer.edu</a>)
Professor of Chemistry and Computer Science
Mercer University, Macon, GA 31207 (478) 301-5627
<a class="moz-txt-link-freetext" href="http://faculty.mercer.edu/pounds_aj">http://faculty.mercer.edu/pounds_aj</a>
</pre>
</body>
</html>