Re: ANN: Simple Pendulum Simulation

2005-10-31 Thread Roger Guay
Thanks, Jim.  I do indeed have this inclination.  In fact my original  
intent was to use the simple pendulum to learn and apply the Runge- 
Kutta Method.  I just haven't gotten around to it yet.  Might your  
suggestion be a variation of this?


Cheers, Roger


On Oct 31, 2005, at 2:32 AM, [EMAIL PROTECTED]  
wrote:



If you have the inclination, you might want to tackle the large
amplitude pendulum. There is no nice analytic solution but you could
numerically integrate the equation of motion. Something like this:

Let A represent the angle. Then you  would do a numerical  
integration with


repeat loop
   set the location of the pendulum to R,A --using radial coordinates
   add c *  sine(A) to the angular velocity -- where c depends on the
mass, L and  g
   --The angular acceleration is proportional to  the torque which is
proportional to sine(A)
   --For small amplitudes sine(A) = A, in radial coordinates
   add the angular velocity to A
end repeat loop

Where I have assumed the time interval between loops is one second,
so that dt =1

It would be interesting to show how the period (determined by the
number of loops between changes in sign of the angular velocity)
depends on the amplitude. Show that the clock slows down as it runs
down, i.e. the period decreases with decreasing amplitude--albeit
slowly; it is a second order effect in the amplitude. That's why
pendulum clocks work so well.

Jim


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: ANN: Simple Pendulum Simulation

2005-10-31 Thread Jim Hurley


Thanks, Jim.  I do indeed have this inclination.  In fact my original 
intent was to use the simple pendulum to learn and apply the Runge-
Kutta Method.  I just haven't gotten around to it yet.  Might your 
suggestion be a variation of this?


Cheers, Roger




Roger,

Actually I was thinking of something even simpler than the 
Runge-Kutta approximation.


Using the Euler approximation, the repeat loop to generate the 
pendulum motion is really simple and looks like this:


repeat until the mouseClick
setRA r,270+psi -- Polar coordinates; 270 so that the pendulum hands DOWN
add -c*psi to angVel --Add angular acceleration to the angular velocity
add angVel to psi --Add angular velocity to the angle
end repeat

where psi is the angular displacement of the pendulum.

I am using Turtle Graphics, but I think you get the idea. To see this 
in action, put this in the message box:


go stack url http://home.infostations.net/jhurley/ControlGraphics.rev;

and go to the last card.

Control graphics is a variation on TG. It allows you to identify any 
control as a Turtle which not only responds to Transcript, but also 
to TG. So you can create a circle graphic and call it pendulum and 
then talk to the circle like it was a turtle, i.e. forward 10, right 
90, setXY 20,30, setRA 200,35 etc.


Polar coordinates are particularly  useful in the pendulum problem

I tried to show the dependence of the period on the amplitude but no 
luck so far. Maybe Runga-Kutta is required.


The period depends on the amplitude (to second order in the 
amplitude) in this way:


T = T(0) (1 + A^2/16)

where A is the angular amplitude in radians.

Jim
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: ANN: Simple Pendulum Simulation

2005-10-30 Thread Jim Hurley


A simple simulation of a simple pendulum . . .


 revOnlin - User Spaces - RogerG or 
Education.



Cheers, Roger



Roger,

Nice job! Good interface.

If you have the inclination, you might want to tackle the large 
amplitude pendulum. There is no nice analytic solution but you could 
numerically integrate the equation of motion. Something like this:


Let A represent the angle. Then you  would do a numerical integration with

repeat loop
  set the location of the pendulum to R,A --using radial coordinates
  add c *  sine(A) to the angular velocity -- where c depends on the 
mass, L and  g
  --The angular acceleration is proportional to  the torque which is 
proportional to sine(A)

  --For small amplitudes sine(A) = A, in radial coordinates
  add the angular velocity to A
end repeat loop

Where I have assumed the time interval between loops is one second, 
so that dt =1


It would be interesting to show how the period (determined by the 
number of loops between changes in sign of the angular velocity) 
depends on the amplitude. Show that the clock slows down as it runs 
down, i.e. the period decreases with decreasing amplitude--albeit 
slowly; it is a second order effect in the amplitude. That's why 
pendulum clocks work so well.


Jim


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


ANN: Simple Pendulum Simulation

2005-10-29 Thread Roger Guay

A simple simulation of a simple pendulum . . .


revOnlin - User Spaces - RogerG or  
Education.




Cheers, Roger
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution