@zqbinggong 2016-04-26T16:26:13.000000Z 字数 6705 阅读 513

# the motion of the pendulum

homework of Computational Physics

pendulum.py

## Abstract

In constructing the Poincare section, we plotted points only at times that were in phase with the drive force;that is at times $t \approx 2 \pi n/ \Omega _{D}$,where $n$ is an integer.At these values of t the driving forcfe passed thri=ough zero .However,we could just as easily have chosen to make the plot at times corresponding to a maximum of the drive force,or at times $\pi/4$ out-of-phase with this force,etc.Cinstruct the Poincar sections for these cases and compare them with figure3.9 in the textbook.

## Key word

pendulum,Poincaré section,attactor,Euler-Cromer method

## Background A pendulum is a weight suspended from a pivot so that it can swing freely. When a pendulum is displaced sideways from its resting, equilibrium position, it is subject to a restoring force due to gravity that will accelerate it back toward the equilibrium position. When released, the restoring force combined with the pendulum's mass causes it to oscillate about the equilibrium position, swinging back and forth. The time for one complete cycle, a left swing and a right swing, is called the period. The period depends on the length of the pendulum and also to a slight degree on the amplitude, the width of the pendulum's swing.

From its examination in around 1602 by Galileo Galilei, the regular motion of pendulums was used for timekeeping, and was the world's most accurate timekeeping technology until the 1930s. Pendulums are used to regulate pendulum clocks, and are used in scientific instruments such as accelerometers and seismometers. Historically they were used as gravimeters to measure the acceleration of gravity in geophysical surveys, and even as a standard of length. The word "pendulum" is new Latin, from the Latin pendulus, meaning 'hanging'.

The simple gravity pendulum is an idealized mathematical model of a pendulum. This is a weight (or bob) on the end of a massless cord suspended from a pivot, without friction. When given an initial push, it will swing back and forth at a constant amplitude. Real pendulums are subject to friction and air drag, so the amplitude of their swings declines.

## Body

### 1Hharmonic oscillator

A simple harmonic oscillator is an oscillator that is neither driven nor damped,where we can set $\alpha=1$. It consists of a mass ''m'', which experiences a single force, ''F'', which pulls the mass in the direction of the point ''x''=0 and depends only on the mass's position ''x'' and a constant ''k''. Balance of forces for the system is

$F = m a = m \frac{\mathrm{d}^2x}{\mathrm{d}t^2} = m\ddot{x} = -k x$

Solving this differential equation, we find that the motion is described by the function

$x(t)=Acos(wt+ \varphi )$

where

$\omega = \sqrt{ \frac{k}{m} }= \frac{2 \pi }{T}$
Remark:in question3.4,we just consider the more simple situation where $\frac{\partial^2x}{\partial t^2} =-k x^{ \alpha }$,so we have $x(t)=Acos( \sqrt{k} t+ \varphi )$ and $T= \frac{2 \pi }{ \sqrt{k} }$.

The motion is periodic, repeating itself in a sinusoida fashion with constant amplitude, ''A''. In addition to its amplitude, the motion of a simple harmonic oscillator is characterized by its period ''T'', the time for a single oscillation or its frequency $f= \frac{1}{T}$ , the number of cycles per unit time. The position at a given time ''t'' also depends on the phase, $φ$, which determines the starting point on the sine wave. The period and frequency are determined by the size of the mass ''m'' and the force constant ''k'', while the amplitude and phase are determined by the starting position and velocity.

The velocity and acceleration]of a simple harmonic oscillator oscillate with the same frequency as the position but with shifted phases. The velocity is maximum for zero displacement, while the acceleration is in the opposite direction as the displacement.

The potential energy stored in a simple harmonic oscillator at position ''x'' is

$U = \frac{1}{2}kx^2$

### 2.Pendulum

A more realsitic pendulum can be dexcribed by the euation$\frac{\partial^2 \theta }{\partial t^2} =-k \theta -q \frac{\partial\theta}{\partial t} + F_{D} sin( \Omega _{D} t)$.We can use Euler-Cromer method to slove the differential this equation.Fortunataly,this equation has a analytical solution.That is $\theta (t)= \theta _{0} sin( \Omega _{D} + \phi )$,where $\theta_{0}= \frac{ F_{D} }{ \sqrt{ ( \Omega ^{2}- \Omega _{D} ^{2})^{2}-(q\Omega _{D})^{2} } }$

### 3.Euler-Cromer method

We can use Euler-Cromer methon to find the solution. The explicit progress of Euler-Cromer method is showed there:
For each time step $i$ calculate $\omega$ and $\theta$ at time step $i+1$

• $\omega _{i+1} = \omega _{i}-[(g/l)sin \theta _{i} -q\omega _{i}+ F_{D} sin( \Omega _{D} t_{i})] \Delta t$
• $\theta _{i+1} = \theta _{i}- \omega _{i+1} dt$
• If $\theta _{i+1}$ is out of the range [$-\pi,\pi$],add or subtract $2\pi$ to keep tit in this range.
• $t _{i+1} = t _{i}+ dt$
• Repeat for the desired number of time steps.

### 4.Poincaré section

In mathematics, particularly in dynamical systems, a first recurrence map or Poincaré map, named after Henri Poincaré, is the intersection of a periodic orbit in the state space of a continuous dynamical system with a certain lower-dimensional subspace, called the Poincaré section, transversal to the flow of the system. More precisely, one considers a periodic orbit with initial conditions within a section of the space, which leaves that section afterwards, and observes the point at which this orbit first returns to the section. One then creates a map to send the first point to the second, hence the name first recurrence map. The transversality of the Poincaré section means that periodic orbits starting on the subspace flow through it and not parallel to it.
A Poincaré map can be interpreted as a discrete dynamical system with a state space that is one dimension smaller than the original continuous dynamical system. Because it preserves many properties of periodic and quasiperiodic orbits of the original system and has a lower-dimensional state space it is often used for analyzing the original system. In practice this is not always possible as there is no general method to construct a Poincaré map.
A Poincaré map differs from a recurrence plot in that space, not time, determines when to plot a point. For instance, the locus of the moon when the earth is at perihelion is a recurrence plot; the locus of the moon when it passes through the plane perpendicular to the Earth's orbit and passing through the sun and the earth at perihelion is a Poincaré map. It was used by Michel Hénon to study the motion of stars in a galaxy, because the path of a star projected onto a plane looks like a tangled mess, while the Poincaré map shows the structure more clearly.

### 5. Implementation of the program

1.*Firstly,the program pop-up several graphical interface ask you to choose the when to plot the diagram,the amplitude of the driving force$F_{D}$ and the value of $g$, which is the parameter of drag. *

2.Then,the program run ,drae the figure and save it.

3.There are too mani combinations betweent this three arguments.So if you are patient, you can get 27 figures. And I have drawen 15 of them and show them in the paper.!

## Results(with easygui)

### the graphical interface ## Results(figure)

### 1.for $F_{D} =1.2,q=0.5$   ### 2.for $F_{D} =0,q=0$   ### 3.for $F_{D} =1.2,q=1.0$   ### 4.for $F_{D} =1.2,q=0$   ## Connclusion

1.Acoording to the results we draw a conclusion that the poincare section is dependent on the driving force,the drag and the time to display the point.

2.If the value of drag is close to the value of the drivinf force,the chaos disapper and we just get one point in the figure.

3.If we set $F_{D} =0,q=0$, the points form an ellipse.

4.If we set $F_{D} \neq 0,q=0$ , the points in the figure are in a shambles.

## Acknowledgement

Thanks to Liu Xingcheng for his template.  • 私有
• 公开
• 删除