@feipai11
2016-04-19T23:58:05.000000Z
字数 2383
阅读 1632
郭帅斐
As we all know, the single pendulum is a simplified liner model, which motion as a harmonic oscillator. But this model only suit for the conditions that the amplitude is very small. Actually, the real motion of pendulum is nonliner, where the acceleration is proportional to the . We can find that the approximation is well suitable when the amplitude is small through this program. Also, we get the conclusion that the real pendulum has a longer period compared to the ideal pendulum.
I used the class function to form the structure of this progrem. In fact, this is a more clear and more handy way to write a founctional progrem. A new finding is that the 'plot' punction can be inserted into the class, as a result, we can show many object in one figure conveniently. As usual, the 'calculate' section is the most important. Here we use Euler-Cromer method as the correct method, the algorithm show as follows:
From this simple progrem, we draw the conclusion as these: (1) In the perodic prossess, we'd better choose the Euler-Cromer mathod to keep the energy conserved. (2) The liner approximation of real pendulum in small amplitude is resonable. (3) The period of the real pendulum become longer compared with the liner pendulum. We can use the Lissajous to analyse the perodic propertity of the pendulum.