Finding position of simple pendulum?

Click For Summary
To model the position of a simple pendulum over time, one must consider parameters such as string length, gravitational acceleration, and initial angle. The discussion emphasizes using Newton's second law to derive the motion equations, factoring in both restoring and resistive forces, particularly if air resistance is included. The angle, represented as phi, can be expressed as a function of time through integration, resulting in a formula that incorporates a dampening parameter. To determine constants A and B in the equation, initial conditions must be applied. This approach provides a framework for simulating pendulum motion accurately.
DevonV
Messages
4
Reaction score
0
I'm trying to write a program to model a simple pendulum, and I'm having some trouble seeing how I would solve for the position w.r.t. time.

I would ultimately like to be able to specify a length of string, acceleration due to gravity, mass (though I know it has no effect on the period) and angle it's pulled back.

Any help would be great, thanks!

PS: I don't think this qualifies as homework because I'm doing it for fun, but I'm very sorry if I'm wrong!:smile:
 
Physics news on Phys.org
I'm assuming you are using a pendulum with a dampening force such as air resistance. If not you will be able to exclude the resistive force parameters from this adaptation of Newtons second law, allowing your pendulum to follow free oscillation. the angle in this case is equal to phi and anything following after the symbol \cdot is meant to be the time derivative of that variable.
Force=m(L \cdot \cdot\phi)=restoring force+resistive force
=-mgsin(\phi)-2m\sqrt{g/l}(L \cdot\phi) [note: the rsistive force in this case is a obscure example. you will need to create your own depending on what you would like your program to do.

from here you will integrate solving for your angle as a function of time.
\phi(t)=(A+Bt)e^(-\sqrt{g/l}t)

[note: the value \sqrt{g/l} is considered your dampening parameter which i defined in this case. if you chose to exclude a dampening force or use a different dampening scenario this will not be similar]

to solve for A and B you need to use the first equation and the previous in combination and also set initial parameters. hope this helped!
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 19 ·
Replies
19
Views
3K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 36 ·
2
Replies
36
Views
4K
  • · Replies 3 ·
Replies
3
Views
7K
  • · Replies 27 ·
Replies
27
Views
2K
  • · Replies 14 ·
Replies
14
Views
2K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 4 ·
Replies
4
Views
13K
Replies
2
Views
2K