[CSC 415] Modified Constants for Pendulum

Andrew J. Pounds pounds_aj at mercer.edu
Sat Feb 25 11:56:27 EST 2017


I made some slight changes to my code for the damped/driven pendulum so 
that it uses SI units.   For small values of theta
the undamped period is 2.00 seconds -- which agrees with experimental 
results.

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, $b\propto\frac{1}{2 m \omega}$.  Basically

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.

double omegadot(double t, double theta, double omega)
{
    double R = 0.9938;   // Length of pendulum in meters
    double g = 9.80665;  // Normalized gravitational constant m/s^2
    double b = 0.10;     // Frictional damping constant
    double m = 1.00;     // Mass in kg
    double A = 0.00;     // Amplitude of initial driving force
    double k = 0.00;     // Frequency parameter of initial driving force

    double drag, kick, denom;

    denom = m*R*R;
    drag = b*omega / denom;
    kick = A*cos(k*t) / denom;
    return -g/R*sin(theta)-drag+kick;
}

-- 
Andrew J. Pounds, Ph.D.  (pounds_aj at mercer.edu)
Professor of Chemistry and Computer Science
Mercer University,  Macon, GA 31207   (478) 301-5627
http://faculty.mercer.edu/pounds_aj

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://theochem.mercer.edu/pipermail/csc415/attachments/20170225/c6c80b0b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tblatex-5.png
Type: image/png
Size: 879 bytes
Desc: not available
URL: <http://theochem.mercer.edu/pipermail/csc415/attachments/20170225/c6c80b0b/attachment.png>


More information about the csc415 mailing list