oscillation and decay - a pictorial tour through computer programs

5
1 Oscillation and Decay: a pictorial tour! -Abhijit Kar Gupta, [email protected] Oscillatory motion is so common and so fundamental that any beginner in physics should learn to deal with them with utmost confidence and eagerness. Any textbook on Mechanics or on Sound describes the motion of a particle or a system where naturally occurring restoring force and existent damping force in the medium are present. As the system is set into motion, the restoring force wants to drive the system towards equilibrium (Hooke’s law), which is proportional to the displacement. Damping force, which also acts against the motion (basically the friction), is proportional to the velocity. These two forces play an interesting duel, who will control and how to drive the system to equilibrium and how fast. Also, there can be the additional force applied to the system which would rescue the system from decaying! Any text book would write how a simple second order differential equation can be written out of the above and then solve them exactly to achieve exact solutions, faithful to the various scenario that arise. The mathematical solutions can be plotted in order to visualize and one may have a fair idea of the various possible extents: when the damping force is comparatively small, medium or large and etc. and so on. Instead of solving the differential equations mathematically, we here discretize the equations and use the simple algorithmic steps in computer to obtain results. Thus we will have a nice tool to play with the equations and can easily plot to see whatever and whenever we like to see! Let consider the following damped harmonic oscillation: (1) To play with this in computer, we go through the following steps: Put,

Upload: abhijit-kar-gupta

Post on 27-Oct-2014

65 views

Category:

Documents


4 download

DESCRIPTION

Simple computer programs to demonstrate the beautiful results obtained from oscillator equations: SHM, Damped Harmonic Oscillation, Relaxation Oscillation...

TRANSCRIPT

Page 1: Oscillation and Decay - a pictorial tour through Computer Programs

1

Oscillation and Decay: a pictorial tour!

-Abhijit Kar Gupta, [email protected]

Oscillatory motion is so common and so fundamental that any beginner in physics should learn

to deal with them with utmost confidence and eagerness.

Any textbook on Mechanics or on Sound describes the motion of a particle or a system where

naturally occurring restoring force and existent damping force in the medium are present. As

the system is set into motion, the restoring force wants to drive the system towards equilibrium

(Hooke’s law), which is proportional to the displacement. Damping force, which also acts

against the motion (basically the friction), is proportional to the velocity. These two forces play

an interesting duel, who will control and how to drive the system to equilibrium and how fast.

Also, there can be the additional force applied to the system which would rescue the system

from decaying!

Any text book would write how a simple second order differential equation can be written out

of the above and then solve them exactly to achieve exact solutions, faithful to the various

scenario that arise. The mathematical solutions can be plotted in order to visualize and one

may have a fair idea of the various possible extents: when the damping force is comparatively

small, medium or large and etc. and so on.

Instead of solving the differential equations mathematically, we here discretize the equations

and use the simple algorithmic steps in computer to obtain results. Thus we will have a nice

tool to play with the equations and can easily plot to see whatever and whenever we like to

see!

Let consider the following damped harmonic oscillation:

(1)

To play with this in computer, we go through the following steps:

Put,

Page 2: Oscillation and Decay - a pictorial tour through Computer Programs

2

In discrete form,

(2)

Now for a fixed value of (damping term) and (restoring term), if we set the time step as

we wish, and start from an initial value of velocity, (say,) and position, (say,), we can find

the trajectory with time and all that.

From (2) we find, (3)

Now,

(4)

This is how the position (4) and velocity (3) evolve as the time increases by .

[I write a simple Fortran program on this and plot the numerical output in ‘Gnuplot’ in Linux.+

In the same way, we can numerically solve any differential equation, adding or manipulating

any suitable term we want. Then we can go for an easy pictorial tour while playing with the

simple computer program. It’s a fun! *Of course, a similar exercise can be done through

software like MATHEMATICA or MATLAB too.]

In the following two panels, the simple harmonic oscillation is shown, where we take zero damping ( ). The R.H.S. is a phase plot (velocity vs. position). In the successive panels we produce the pictures for increasing damping.

𝑑 𝑥

𝑑𝑡 𝑘 𝑥

SHM (No Damping)

Page 3: Oscillation and Decay - a pictorial tour through Computer Programs

3

𝑑 𝑥

𝑑𝑡 𝜆

𝑑𝑥

𝑑𝑡 𝑘 𝑥

Damped Harmonic Motion

[Small damping, under-damped motion, 𝜆 < 𝑘]

Phase plot:

Damped Harmonic Motion

[Larger damping, still under-damped motion,

𝜆 < 𝑘]

Phase plot:

Page 4: Oscillation and Decay - a pictorial tour through Computer Programs

4

Damped Harmonic Motion

[Critical Damping, when, 𝜆 𝑘 ]

Phase Plot: Critical Damping

Overdamped Motion:

The curve with highest peak corresponds to Critical

damping. Other curves are for overdamped

motion. Larger the damping, the slower the decay.

Overdamped Motion:

Same as the curves on the left side pannel. Only

the initial position is not at origin.ping, the slower

the decay. The lower most curve is for critical

damping.

Page 5: Oscillation and Decay - a pictorial tour through Computer Programs

5

We can do similar exercises with lots of other differential equations. For example, we

discretized the non-linear van der Pol oscillator equation which is known to produce Relaxation

oscillation.

Van der Pol Oscillator:

( )

FORTRAN Program: (Damped Harmonic Oscillator)

Open(1,file=’x.dat’)

x=0.0

v=0.5

t=0

dt=0.001

k=5.0

alam=10

dv=-k*x*dt-alam*v*dt

v=v+dv

dx=v*dt

x=x+dx

t=t+dt

write(1,*)t,x

stop

end

𝑑 𝑥

𝑑𝑡 𝜆( 𝑥 )

𝑑𝑥

𝑑𝑡 𝑘 𝑥

Relaxation Oscillation

Van der Pol Oscillator: