Post on 19-Dec-2015
description
Name/ Surname: Dionysios Zelios Email: dionisis.zel@gmail.com Course: Computational Physics (FK8002) Date of submission: 31/03/2014
CONTENTS
Description of the problem
i. Introduction 3 ii. Runge-Kutta method 4
Results
i. Undamped pendulum .5
ii. Stable case 9
iii. Unstable
iv. Maximum amplitude .18
v. points
vi.
vii.
References
Description of the problem
i. Introduction
Consider an idealized pendulum; a light rod (negligible mass), with length l and a mass m (negligible extension) in one end. The other end is fixed and the pendulum swings in one plane. We assume that the friction force is proportional to u and that the pendulum is driven by an external
periodic force, cos( )d dF t .
We know that three forces , gravitational, the damping force and the periodic driving force are
have:
F ma (1)
sin( ) cos( )d dF mg ku F t (2) , where k is the friction constant
Assuming a rigid pendulum (its length is fixed), the mass can move only in a circle of a radius l. The
position along this circle is given by l. The acceleration therefore is given by 2
2
da l
dt and the
velocity d
u ldt
. From equations (1), (2), we have:
2
2sin( ) cos( )d d
d dmg kl F t ml
dt dt (3) , where is (t)
This second order differential equation can be transformed to two coupled differential equations:
( )d
tdt
(4)
cos( ) cos( )( ) sin( ) ( ) ( )sin( ) ( )d d d d
F t F td t mg kl t d t g kt
dt ml ml ml dt l m ml (5)
We want to write a program that solves this equation. The friction constant k, and driving force
parameters, dF and d have to be read in. The parameters l and m were set equal to 1. For the
solution we will use a fourth order Runge-Kutta.
ii. Runge-Kutta method
Fourth order Runge-Kutta method is very popular for solving the ordinary differential equations, however, it solves only the first order differential equations. Hence, the higher ordered differential equations have to be converted into first order differential equations. Let an initial value problem can be specified as follows.
' ( , )y f t y
0 0( )y t y
For a particular case, the initial conditions are given y(1) = = 0 and y(2)= The fourth order Runge-Kutta method for this problem is given by the following equations:
5
1 1 2 3 4
1( 2 2 ) ( )
6i iy y k k k k O t
1i it t t
where the term yi+1 is the fourth order Runge-Kutta approximation of y(t i+1), and
1
12
23
4 3
[ ( , )]
[ ( , )]2 2
[ ( , )]2 2
[ ( , )]
i i
i i
i i
i i
k t f t y
ktk t f t y
ktk t f t y
k t f t t y k
where t is the size of the interval. The next value of yi+1 is determined by the present value of yi plus the product of the size of the interval and an estimated slope. The slope is a weighted average of the slopes k1, k2, k3 and k4. More precisely, k1 is the slope at the beginning of the interval, k2 is the slope at the midpoint of the interval using k1, k3 is again the slope at midpoint but it uses k2 and k4 is the slope at the end of the interval that uses k3. The error in executing this step can be characterized as the fifth order in the step size, thus this method is accurate to the fourth order.
Results
To begin with, we check the case of the undamped oscillation, with 0dF k .
In an undamped oscillation, the equation of motion (3) reduces to:
2 2
2 2sin
d g d g
dt l dt l, with a small angle approximation and general solution
0( ) sin( )t A t .
Below, we show the graphs of (t) against t, as well as (t)-t and the phase diagram. The initial conditions (, n the time interval of [0,50]with time step 0,01 at 5000 iterations.
As far as the phase diagram is concerned, we know that for a pendulum obeying a linear differential equation, the trajectory should appear as a closed curve such as an ellipse,
which repeats itself over and over. This indicates that the pendulum returns to the same point in phase-space at the beginning of each drive cycle and the trajectory is repeated.
We also check the case of 0dF and 0,1k kg/s . We notice that just a small force of friction
is able to change our initial results. The graphs are given below:
For 0dF and 0,5 /k kg s , we have:
We also tried different step-sizes in our program and noticed that we get the same results.