Sie sind auf Seite 1von 12

Ordinary Differential Equations (Chapter 8)

= ,


Taylor Series Expansion
+ = +

+
Given

we can calculate higher order derivatives and substitute in the above


equation.
Local Truncation Error =
+
. Global Truncation Error =


Eulers method
+ = +, + (

)

Runge-Kutta Methods
+ = +

+
From the differential equation we have

() =
Applying chain rule

+(

)
Substituting in the top equation we have
+ = + +

+ (

)
We can rewrite this as
+ = +

+ (

)
We can expand
+, + = +

+ (

)

Giving
+ = +

+, + +

[ ]
which can be rewritten as
+ = +

= ,

= ( +, +

)

This is second order RK method known as Heuns method. We can write a general
second order method as

+ = +

+

+, + + (

)

+ = +

+

[ ]
Comparing Eqns a and b we get



Have one less equation than unknowns. If we set

= = =
We get Heuns method. If we set

= ,

= = =

we get a
modified Eulers method
+ = +

= , ;

= ( +

, +

)

Exercise :
Derive a 3
rd
order method.

Fourth-Order RK method

+ = +

+ (

)
Where

= ,

= +

, +

= +

, +

= +, +



Lorenz Equations

A simplified system of equations for atmospheric dynamics

= +

=
Equations are non-linear

Parameters
= , = , =


Show code
General form of linear multistep methods (LMM)

+ . .

+ . +



If

= , method is explicit.

Let
=



The LMM is convergent if

(1) All roots of p lie in the unit circle and each root of modulus 1 is simple.
(2) p(1) = 0 and

= ()

Explicit methods are conditionally stable. Can use LMMs for predictor-corrector.
Higher order differential equations

Let

()
= (, ,

)

With initial conditions
=

. ;



Define new variables

= ;

=
()


Now we can form the linear system of first-order-ODES

= (,

, . ,

)

1-D unsteady heat/diffusion equation

,


, =

; , =


, = ()

Let us discretise the above

= ; =

+
; = ,

= ; = , . .

()



Question: How does one write a finite difference formulation?


1. FTCS (Forward in time and centered in space)

+
+

+
+

+
=

+
+



For this method to be stable we need

> 0 <



This is called the CFL condition. Given the initial condition

()
= (

)

we can march forward in time.
Reference:

Dale R Durran, Numerical methods for wave equations in geophysical fluid
dynamics, Springer.

Backward time differencing

+
+
+
+



No explicit relationship for time stepping. If =

(+)
+ +

(+)

+
(+)
=

()


This can be written as

(+)
=

Can use TDMA or Iterative Methods to solve the above. The method is
unconditionally stable.

Das könnte Ihnen auch gefallen