runge 4 th order method

16
06/13/22 http:// numericalmethods.eng.usf.edu 1 Runge 4 th Order Method Major: All Engineering Majors Authors: Autar Kaw, Charlie Barker http://numericalmethods.eng.u sf.edu Transforming Numerical Methods Education for STEM Undergraduates

Upload: rahim-hunt

Post on 31-Dec-2015

71 views

Category:

Documents


0 download

DESCRIPTION

Runge 4 th Order Method. Major: All Engineering Majors Authors: Autar Kaw, Charlie Barker http://numericalmethods.eng.usf.edu Transforming Numerical Methods Education for STEM Undergraduates. Runge-Kutta 4 th Order Method http://numericalmethods.eng.usf.edu. Runge-Kutta 4 th Order Method. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Runge 4 th  Order Method

04/19/23http://

numericalmethods.eng.usf.edu 1

Runge 4th Order Method

Major: All Engineering Majors

Authors: Autar Kaw, Charlie Barker

http://numericalmethods.eng.usf.eduTransforming Numerical Methods Education for STEM

Undergraduates

Page 2: Runge 4 th  Order Method

Runge-Kutta 4th Order Method

http://numericalmethods.eng.usf.edu

Page 3: Runge 4 th  Order Method

http://numericalmethods.eng.usf.edu3

Runge-Kutta 4th Order Method

where

hkkkkyy ii 43211 226

1

ii yxfk ,1

hkyhxfk ii 12 2

1,

2

1

hkyhxfk ii 23 2

1,

2

1

hkyhxfk ii 34 ,

For0)0(),,( yyyxf

dx

dy

Runge Kutta 4th order method is given by

Page 4: Runge 4 th  Order Method

http://numericalmethods.eng.usf.edu4

How to write Ordinary Differential Equation

Example

50,3.12 yeydx

dy x

is rewritten as

50,23.1 yyedx

dy x

In this case

yeyxf x 23.1,

How does one write a first order differential equation in the form of

yxfdx

dy,

Page 5: Runge 4 th  Order Method

http://numericalmethods.eng.usf.edu5

ExampleA 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

Kdt

d12000,1081102067.2 8412

Find the temperature at 480t seconds using Runge-Kutta 4th order method.

240h seconds.

8412 1081102067.2

dt

d

8412 1081102067.2, tf

Assume a step size of

hkkkkii 43211 226

1

Page 6: Runge 4 th  Order Method

http://numericalmethods.eng.usf.edu6

SolutionStep 1: 1200)0(,0,0 00 ti

5579.410811200102067.21200,0, 841201 ftfk o

38347.0108105.653102067.205.653,120

2405579.42

11200,240

2

10

2

1,

2

1

8412

1002

f

fhkhtfk

8954.310810.1154102067.20.1154,120

24038347.02

11200,240

2

10

2

1,

2

1

8412

2003

f

fhkhtfk

0069750.0108110.265102067.210.265,240

240984.31200,2400,8412

3004

f

fhkhtfk

Page 7: Runge 4 th  Order Method

http://numericalmethods.eng.usf.edu7

Solution Cont

1 is the approximate temperature at

240240001 httt

K65.675240 1

K

hkkkk

65.675

2401848.26

11200

240069750.08954.3238347.025579.46

11200

226

1432101

Page 8: Runge 4 th  Order Method

http://numericalmethods.eng.usf.edu8

Solution Cont

Step 2: Kti 65.675,240,1 11

44199.0108165.675102067.265.675,240, 8412111 ftfk

31372.0108161.622102067.261.622,360

24044199.02

165.675,240

2

1240

2

1,

2

1

8412

1112

f

fhkhtfk

34775.0108100.638102067.200.638,360

24031372.02

165.675,240

2

1240

2

1,

2

1

8412

2113

f

fhkhtfk

25351.0108119.592102067.219.592,480

24034775.065.675,240240,8412

3114

f

fhkhtfk

Page 9: Runge 4 th  Order Method

http://numericalmethods.eng.usf.edu9

Solution Cont

is the approximate temperature at

48024024012 htt

K91.594480 2

K

hkkkk

91.594

2400184.26

165.675

24025351.034775.0231372.0244199.06

165.675

226

1432112

Page 10: Runge 4 th  Order Method

http://numericalmethods.eng.usf.edu10

Solution Cont

The exact solution of the ordinary differential equation is given by the solution of a non-linear equation as

9282.21022067.000333.0tan8519.1300

300ln92593.0 31

t

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

K57.647)480(

Page 11: Runge 4 th  Order Method

http://numericalmethods.eng.usf.edu11

Comparison with exact results

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

-400

0

400

800

1200

1600

0 200 400 600

Time,t(sec)

Tem

pera

ture

,

h=120Exact

h=240

h=480

θ(K

)

Page 12: Runge 4 th  Order Method

Step size, h

(480) Et |єt|%

4802401206030

−90.278594.91646.16647.54647.57

737.8552.6601.4122

0.0336260.00086900

113.948.1319

0.218070.0051926

0.00013419

http://numericalmethods.eng.usf.edu12

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

K57.647)480( (exact)

Page 13: Runge 4 th  Order Method

http://numericalmethods.eng.usf.edu13

Effects of step size on Runge-Kutta 4th Order Method

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

-200

0

200

400

600

800

0 100 200 300 400 500

Step size, h

Tem

pera

ture

,θ(4

80)

Page 14: Runge 4 th  Order Method

http://numericalmethods.eng.usf.edu14

Comparison of Euler and Runge-Kutta Methods

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

0

200

400

600

800

1000

1200

1400

0 100 200 300 400 500

Time, t(sec)

Tem

per

atu

re,

θ(K

)

Exact

4th order

Heun

Euler

Page 15: Runge 4 th  Order Method

Additional ResourcesFor all resources on this topic such as digital audiovisual lectures, primers, textbook chapters, multiple-choice tests, worksheets in MATLAB, MATHEMATICA, MathCad and MAPLE, blogs, related physical problems, please visit

http://numericalmethods.eng.usf.edu/topics/runge_kutta_4th_method.html

Page 16: Runge 4 th  Order Method

THE END

http://numericalmethods.eng.usf.edu