Default
Google
main page 3 degree-of-freedom!
  Smart Pendulum !  

Catch & Move the Knob or the Ball

If you had Java enabled browser you would see Pendulum Applet here

How does it work?

Java Applet every 1 millisecond recalculates and every 60 milliseconds redraws the new pendulum position. The calculation is based on numerical solution of the 2nd order differential equation that describes pendulum oscillation:
f        2  dR           df       g
---- = - ( - ---- + visc ) ---  -  -- sinf
dt²        R  dt           dt       R
where
  • t - time, sec
  • R - length of rope, m
  • g - acceleration of gravity, m/sec²
  • visc - fluid viscosity, 1/sec
  • f - angle between rope and vector of gravity, radian
  • df/dt; d²f/dt² - first and second time derivatives of angle

The solution implements 4-th order Runge-Kutta method for differential equations. But in case of short confidence interval (if for instance you decide to state Viscosity as 1000 !) the solution is an integral of similar equation but with pure angle instead of its sine - so called mathematical pendulum.

You may set gravity and viscosity directly in special fields, but remember to scale gravity! Whether you set it as 9.81 m/sec² you would see rather "quick" oscillation because of short rope.

Numerical performances of pendulum oscillations:

  • Period - is the calculated time of one oscillation
  • Period (mathem.) - is the theoretical value - period of mathematical pendulum of the same length but with short range of swings
  • Frequency - is the number of oscillations per 1 second

By the way, what you think the pendulum would do if you set the negative gravity or viscosity ?


Comments

Why 60 milliseconds?
Screen refreshing in Windows can not be faster then 1193180 / 216 times per second. (1193180 Hz is the quartz oscillator frequency). That's why repainting shouldn't be more often then every 0.055 seconds.

Mathematical - is the same pendulum but with f instead of sin(f) in its differential equation. This approximation simplifies the solution greatly and we can get the explicit formula of oscillation. I placed the value of Period (mathem.) just for estimating the calculation error that we could make deciding to approximate our real pendulum with the mathematical one.

Want free Windows-based version of this module? Write me !


Opinion:
Name:
E-mail:
Your Comment:


main page 3 degree-of-freedom Pendulum © Evgeni Kudriavitski



Acquiring image from ProHosting Banner Exchange