ATLE Workshop Tuesday October 28, 2014 Autar Kaw Mechanical Engineering
1/16/2016 1 Runge 4 th Order Method Civil Engineering Majors Authors: Autar Kaw, Charlie Barker
-
Upload
tamsyn-strickland -
Category
Documents
-
view
215 -
download
0
description
Transcript of 1/16/2016 1 Runge 4 th Order Method Civil Engineering Majors Authors: Autar Kaw, Charlie Barker
05/03/23http://
numericalmethods.eng.usf.edu 1
Runge 4th Order Method
Civil Engineering Majors
Authors: Autar Kaw, Charlie Barker
http://numericalmethods.eng.usf.eduTransforming Numerical Methods Education for STEM
Undergraduates
Runge-Kutta 4th Order Method
http://numericalmethods.eng.usf.edu
http://numericalmethods.eng.usf.edu3
Runge-Kutta 4th Order Method
where hkkkkyy ii 43211 22
61
ii yxfk ,1
hkyhxfk ii 12 2
1,21
hkyhxfk ii 23 2
1,21
hkyhxfk ii 34 ,
For0)0(),,( yyyxf
dxdy
Runge Kutta 4th order method is given by
http://numericalmethods.eng.usf.edu4
How to write Ordinary Differential Equation
Example
50,3.12 yeydxdy x
is rewritten as
50,23.1 yyedxdy x
In this case
yeyxf x 23.1,
How does one write a first order differential equation in the form of
yxfdxdy ,
http://numericalmethods.eng.usf.edu5
ExampleA polluted lake with an initial concentration of a bacteria is 107 parts/m3, while the acceptable level is only 5x106 parts/m3. The concentration of the bacteria will reduce as fresh water enters the lake. The differential equation that governs the concentration C of the pollutant as a function of time (in weeks) is given by
710)0(,006.0 CCdtdC
Find the concentration of the pollutant after 7 weeks. Take a step size of 3.5 weeks.
CdtdC 06.0
CCtf 06.0,
hkkkkCC ii 43211 2261
http://numericalmethods.eng.usf.edu6
SolutionStep 1:
3700 /10,0,0 mpartsCti
6000001006.010,0, 77001 fCtfk
537000895000006.08950000,75.1
5.36000002110,5.3
210
21,
21 7
1002
f
fhkChtfk
543620906030006.09060300,75.1
5.35370002110,5.3
210
21,
21 7
2003
f
fhkChtfk
485840809730006.08097300,75.1
5.354362010,5.30, 73004
ffhkChtfk
http://numericalmethods.eng.usf.edu7
Solution Cont
is the approximate concentration of bacteria at 1C
weeks5.35.3001 httt
361 parts/m101059.85.3 CC
6
7
7
432101
101059.8
5.332471006110
5.3485840543620253700026000006110
2261
kkkkCC
http://numericalmethods.eng.usf.edu8
Solution ContStep 2: 6
11 101059.8,5.3,1 Cti
486350101059.806.0101059.8,5.3, 66111 fCtfk
435290725480006.07254800,25.5
5.3486350218105900,5.3
215.3
21,
21
1112
f
fhkChtfk
440648734410006.07344100,25.5
5.3435290218105900,5.3
215.3
21,
21
2113
f
fhkChtfk
393820656360006.06563600,7
5.34406488105900,5.35.3, 3114
ffhkChtfk
http://numericalmethods.eng.usf.edu9
Solution Cont
36
432112
parts/m105705.6
5.32632000618105900
5.33982044064824352902484350618105900
)22(61
hkkkkCC
is the approximate concentration of bacteria at 2C
weekshtt 75.35.312
362 parts/m105705.67 CC
http://numericalmethods.eng.usf.edu10
Solution ContThe 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=7 weeks is
503
7101)(t
etC
36 parts/m105705.6)7( C
http://numericalmethods.eng.usf.edu11
Comparison with exact results
Figure 1. Comparison of Runge-Kutta 4th order method with exact solution
Step size
73.51.75
0.8750.4375
6.5715×106
6.5705×106
6.5705×106
6.5705×106
6.5705×106
−1017.2−53.301−3.0512
−0.18252−0.011161
0.0154818.1121×10−4
4.6438×10−5
2.7779×10−6
1.6986×10−7
http://numericalmethods.eng.usf.edu12
Effect of step size
h tE %|| t
(exact)6105705.6)7( C
7C
Table 1 Value of concentration of bacteria at 3 minutes for different step sizes
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
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.
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