Beruflich Dokumente
Kultur Dokumente
Differential Equations
CAAM 452
Spring 2005
Lecture 4
1-step time-stepping methods: stability, accuracy
Runge-Kutta Methods,
Instructor: Tim Warburton
Today
• Recall AB stability regions and start up issues
• Group analysis of the Leap-Frog scheme
• One-step methods
• Example Runge-Kutta methods:
– Modified Euler
– General family of 2nd order RK methods
– Heun’s 3rd Order Method
– The 4th Order “Runge-Kutta” method
– Jameson-Schmidt-Turkel
• Linear Absolute Stability Regions for the 2nd order family RK
• Global error analysis for general 1-step methods (stops slightly short of
a full convergence analysis)
• Warning on usefulness of global error estimate
• Discussion on AB v. RK
• Embedded lower order RK schemes useful for a posteriori error
estimates.
• Starting with the yellow AB1 (Euler-Forward) we see that as the order of
accuracy goes up the stability region shrinks.
• i.e. we see that to use the higher order accurate AB scheme we are required
to take more time steps.
Q) how many more? CAAM 452 Spring 2005
Recall:
Requirements Starting Requirements
u0 u 0
AB1: 1 solution level for start
un1 un dt f un
u1 u dt 2 solution levels for start
AB2: u0 u 0
un1 un dt f un f un1
3 1
2 2
AB3: u2 u 2dt 3 solution levels for start
u1 u dt
u0 u 0
dt
un1 un 23 f n 16 f n1 5 f n2
12 CAAM 452 Spring 2005
cont
u tn1 u tn f u t dt
tn
u tn1 u tn I f u t dt
tn
p
u tn1 u tn1 f u t dt
tn 1
4) Do we have convergence?
2 un1 un dt un un
2
un1 un dt uˆ1
CAAM 452 Spring 2005
cont
dt
2
un1 1 dt un
2
1 dt 1
2
CAAM 452 Spring 2005
cont
• The stability region is the set of nu=mu*dt in the complex
plane such that:
2
1 1
2
2
1 ei
2
CAAM 452 Spring 2005
cont
2
1 ei
2
1 1 2 1 ei
1 1 2 1 ei
CAAM 452 Spring 2005
Checking Modified Euler
at the Imaginary Axis
• As before we wish to check how much of the
imaginary axis is included inside the region of
absolute stability.
• Here we plot the real part of the “+” root
k1 f un , tn
k2 f un dtk1 , tn dt
un1 un dt ak1 bk2
• where we will determine the parameters
(a,b,alpha,beta) by consideration of accuracy.
• where: f f u tn , tn
2 3!
dt af b f dtf t dtff u
dt
2
f tt dt ff tu
2 dtf 2
f uu O dt 4
2 2
f tt dt ff tu
2 dtf 2
fuu O dt 4
2 2
• Condition 1: 1 a b 0
b f dtf
u
2! u 2 O dt 3
d 2u f d 3u 2 f 2 f
2
du
f u t 2 f , 3 2 f f
dt dt u dt u u
Tn u tn1 u tn dt u tn ; dt
dt 2
2
fuu f f u f dt b f dtff u f uu O dt 4
dt dt
dt f ffu 2 2
2 3! 2
1
b 1,
2
It is easier to generalize to higher order RK in this case when there is no explicit time dependence in f.
CAAM 452 Spring 2005
Second Example Runge-Kutta:
Heun’s Third Order Formula
• Traditional version • In terms of intermediate
variables:
a dtf un , tn
a dt
b dtf un , tn
dt
uˆ1 un f un , tn
3
3 3
2dt
2b 2dt uˆ2 un f uˆ1 , tn1/ 3
c dtf un , tn 3
3 3 1
un1 un f un , tn 3 f uˆ2 , tn2 / 3
1 4
un1 un a 3c
4
This is a 3rd order, 3 stage single step explicit Runge-Kutta method.
1 dt un
2 3 CAAM 452 Spring 2005
Stability of Heun’s 3rd Order Method
2 3 i
1 e
2 6
• This traces a curve in the nu=mu*dt complex plane.
• Since we are short on time we can plot this using
Matlab’s roots function…
rk3
rk2
rk4
• Four stages:
a dtf un , tn
b dtf un a / 2, tn1/ 2
c dtf un b / 2, tn1/ 2
d dtf un c, tn1
1
un1 un a 2b 2c d
6
see: http://web.comlab.ox.ac.uk/oucl/work/nick.trefethen/1all.pdf p76 for details
of minimum number of stages to achieve p’th order.
6
8
8 2 i.e. 2 2 2.83
72 242
CAAM 452 Spring 2005
Imaginary Axis Stability Summary
mn
1 dtL u t0 u0 Tnm 1 dtL
n 1 m
m 0
mn
Tnm 1 dtL
m
m 0
1 dtL 1
n 1
mn
max Tm max Tm
m
1 dtL
1 m
m 0
1 m n 1 dtL 1
T
dtL
1 dtL n1 1
T
dtL
e n1dtL 1
T
dtL
e L tn1 t0 1
CAAM 452 Spring 2005
proof summary
u tn1 un1
T
dtL
e L tn1 t0 1
u tn1 un1
T
dtL
e L tn1 t0 1
L
1 L t t0
e 1
CAAM 452 Spring 2005
A Posteriori Error Estimate
rk3
rk2
rk4