lecture3

advertisement
Chapter 3
Simple Harmonic Motion
3.1 Simple Harmonic Motion
Force on the pendulum
Equation of motion (EoM)
Analytical solution:
constants determined by
initial conditions.
The period of the SHO is
given by T  2 l
g
Euler method to solve the EoM
Run t for a few period (T)
to see the oscillatory
behavior
Set Dt, q0, w0, l, g, iterate
ti+1=ti + Dt
sample code 3.1.1
Total energy of SHO
 You may use the Mathematica command Series[Cos[x],{x,0,2}]
to obtain the Taylor series expansion of cosq at q = 0. This is
amount to making the assumption that q  0.
Euler method fails in this case
 The oscillation amplitude increases with time  Euler





method is not suitable for oscillatory motion (but may
be good for projectile motion which is non-periodic)
The peculiar effect of the numerical solution can also
be investigated from the energy of the oscillator when
Euler method is applied:
E ≈ (1/2)m l2 [w2 + (g/l)q 2]
(with q  0 )
Descretise the equation by applying Euler method,
Ei+1 = Ei + (1/2)mgl2[wi2 + (g/l)qi2](Dt)2
 E increases with i  this is an undesirable result.
Euler vs. Euler-Cromer method
 In the Euler method:
wi+1 is calculated based on previous values wi and qi
 So is qi+1 is calculated based on previous values wi
and qi

 In the Euler-Cromer method:
wi+1 is calculated based on previous values wi and qi
 but qi+1 is calculated based on present values wi+1
and previous value qi

sample code 3.2.2
Why Euler-Cromer works better?
 Because it conserver energy over each complete
period of motion.
3.2 Forced SHM
Drag force on a moving
object, fd = - kv
For a pendulum, instantaneous velocity v = wl = l (dq/dt)
Hence, fd = - kl (dq/dt).
l
The net force on the forced pendulum along the
tangential direction
- kl (dq/dt).
dq
dq
 mgq  kl
;
dt
dt
d 2r
d2
d 2q
m 2  m 2  lq   ml 2 ;
d t
dt
dt
d 2r
d 2q
g
k dq
g
dq
k
F m 2  2  q
  q q
;q 
l
m dt
l
dt
m
d t
dt
fd
r
F  mg sin q  kl
w
E.o.M
Analytical solution
Underdamped regime (small damping). Still oscillate,
but amplitude decay slowly over many period before
dying totally.
q  t   q0e  qt /2 sin   t 2  q2 / 4


  g / l the natural frequency of the system
Overdamped regime (very large damping), decay slowly
over several period before dying totally. q is dominated
by exponential term.
 qt /2 q2 /42 t
q  t   q0 e
Critically damped regime, intermediate between
under- and overdamping case.
q t   q0  Ct  eqt /2
Cromer-Euler descretisation
d 2q
g
dq


q

q
l
dt
dt 2
dw
g
  q  qw
dt
l
w  wi
g
 i 1
  qi  qwi
Dt
l
g

 wi 1  wi   qi  qwi  Dt
l

dq
From w 
 qi 1  qi  wi 1Dt
dt
(Euler-Cromer)
sample code 3.2.3
Numerical solution of the damped
oscillator for q = 10,5,1, l=1.0 m
0.2
0.1
2
0.1
0.2
4
6
8
This is generated with
NDSolve
sample code 3.2.4
10
Adding driving force
- kl (dq/dt) + FD sin(Dt)
D frequency of
the applied force
dq
dq
 mgq  kl
 FD sin   D t  ;
dt
dt
d 2r
d2
d 2q
m 2  m 2  lq   ml 2 ;
d t
dt
dt
d 2r
d 2q
g
k dq FD
g
dq FD
F m 2  2  q

sin   D t    q  q

sin   D t 
l
m
dt
m
l
dt
m
d t
dt
d 2q
g
dq FD


q

q

sin   D t 
2
l
dt
m
dt
F  mg sin q  kl
Analytical solution
q  t   q0 sin   D t   
q0 

FD / m
2
   q 
2 2
 D
2
D
Resonance happens when  D  
Euler-Kromer descretisation
d 2q
g
dq FD
  q q

sin   D t 
2
l
dt
m
dt
wi 1  wi
dw
g
FD
g
FD
  q  qw 
sin   D t  
  qi  qwi 
sin   D ti 
dt
l
m
Dt
l
m
F
g

 wi 1  wi   qi  qwi  D sin   DiDt   Dt
m
l

dq
From w 
 qi 1  qi  wi 1Dt
(Euler-Cromer)
dt
sample code 3.2.5
Second order Runge-Kutta method
 Consider a generic second order differential equation.
d 2 y t 
dt
2
 f  y
 It can be numerically solved using second order
Runge-Kutta method.
 First, split the second order DE into two first order
parts:
dv  t 
dy  t 
 f  y
v t  
dt
dt
Algorithm
 Set initial conditions:
 Calculate
 Calculate
1
y '  yi  vi Dt
2
1
v '  vi  f  y '  Dt
2
 Calculate yi 1  yi  v ' Dt
 Calculate vi 1  vi  f  y '  Dt
RK2 for SHO
Use RK2 to calculate the total energy
of SHO
 We have seen previously that energy as calculated
using Euler method is unstable.
 Now try to calculate E again, using the values of wi and
qi as calculated using RK2.
Ei+1
 You will have to do this in the HA3.
Download