Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Runge-Kutta 4 Method

Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

Runge-Kutta 4 Order Method

th

1
Runge-Kutta 4 Order Method th

Fo
r
Runge Kutta 4 th order method is given by

wher
e

2
How to write Ordinary
Differential Equation
How does one write a first order differential equation in the form of

Exampl
e

is
rewritten
as

In this
case

3
Example
A ball at 1200K is allowed to cool down in air at an ambient
temperature of 300K. Assuming heat is lost only due to
radiation, the differential equation for the temperature of the
ball is given by

Find the seconds using Runge-Kutta 4th order


temperature at method.
Assume a step second
size of s.

4
Solution
Step 1:

5
Solution Cont

is the approximate temperature at

6
Solution Cont
Step 2:

7
Solution Cont

θ2 is the approximate temperature at

8
Solution Cont

The exact solution of the ordinary differential equation is given by the


solution of a non-linear equation as

The solution to this nonlinear equation at t=480 seconds is

9
Comparison with exact results

Figure 1. Comparison of Runge-Kutta 4th order method with exact solution


10
Effect of step size
Table 1. Temperature at 480 seconds as a function of step size, h

Step size, h θ (480) Et |єt|%

480 −90.278 737.85 113.94


240 594.91 52.660 8.1319
120 646.16 1.4122 0.21807
60 647.54 0.033626 0.0051926
30 647.57 0.00086900 0.00013419
(exact
)
11
Effects of step size on Runge-
Kutta 4 Order Method
th

Figure 2. Effect of step size in Runge-Kutta 4th order method

12
Comparison of Euler and Runge-
Kutta Methods

Figure 3. Comparison of Runge-Kutta methods of 1st, 2nd, and 4th order.


13

You might also like