Lecture3 Pss

download Lecture3 Pss

of 12

Transcript of Lecture3 Pss

  • 8/11/2019 Lecture3 Pss

    1/12

    Ordinary Differential Equations (Chapter 8)

    =

    =

    ,

    = Taylor Series Expansion

    + = + +

    ! +

    ! +

    Given we can calculate higher order derivatives and substitute in the aboveequation.

    Local Truncation Error = +. Global Truncation Error = Eulers method

    + = + ,+ ()

  • 8/11/2019 Lecture3 Pss

    2/12

    Runge-Kutta Methods

    + = + +

    ! +

    ! +

    From the differential equation we have

    () =Applying chain rule

    = + = ++ + +( +)

    Substituting in the top equation we have

    + = + + ++ (

    )

    We can rewrite this as

    + = + ++ + + (

    )

  • 8/11/2019 Lecture3 Pss

    3/12

    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

    + = + + + , + + () + = + + + + + []

  • 8/11/2019 Lecture3 Pss

    4/12

    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 3rdorder method.

  • 8/11/2019 Lecture3 Pss

    5/12

    Fourth-Order RK method

    + = + + + + + ()Where

    = , = +

    , +

    = + , + = + ,+

  • 8/11/2019 Lecture3 Pss

    6/12

  • 8/11/2019 Lecture3 Pss

    7/12

    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) = 0and

    =

    (

    )

    Explicit methods are conditionally stable. Can use LMMs for predictor-corrector.

  • 8/11/2019 Lecture3 Pss

    8/12

    Higher order differential equations

    Let

    () =(,, , ,)With initial conditions

    = ; = . ; =

    Define new variables

    = ; = = ()Now we can form the linear system of first-order-ODES

    =

    = =(,,, . ,)

  • 8/11/2019 Lecture3 Pss

    9/12

    1-D unsteady heat/diffusion equation

    ,

    =

    ,

    , = ; , = , =()Let us discretise the above

    = ; = + ; = , = ; = , . .

    ()

    Question: How does one write a finite difference formulation?

  • 8/11/2019 Lecture3 Pss

    10/12

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

    , =

    + +

    , =

    +

    + =

    + +

    + =

    + +

    +

    For this method to be stable we need

    > 0 <

  • 8/11/2019 Lecture3 Pss

    11/12

  • 8/11/2019 Lecture3 Pss

    12/12

    This can be written as

    (+) = Can use TDMA or Iterative Methods to solve the above. The method is

    unconditionally stable.