Numerical Solution of Single ODEs - PowerPoint PPT Presentation

1 / 11
About This Presentation
Title:

Numerical Solution of Single ODEs

Description:

Iterative calculation. Approximation error. Local truncation error: O(h2) ... Multi-step: calculation at current step uses values at several previous steps ... – PowerPoint PPT presentation

Number of Views:167
Avg rating:4.0/5.0
Slides: 12
Provided by: jaredhj
Category:

less

Transcript and Presenter's Notes

Title: Numerical Solution of Single ODEs


1
Numerical Solution of Single ODEs
  • Euler methods
  • Runge-Kutta methods
  • Multistep methods

2
Euler Methods
  • Initial value problem
  • Often impossible to generate analytical solution
    y(x)
  • Instead compute approximate solution at equally
    spaced node points
  • h step size
  • Taylor series expansion

3
Forward Euler Method
  • First-order Taylor series expansion
  • Iterative calculation
  • Approximation error
  • Local truncation error O(h2)
  • Global truncation error O(h) ? first-order method

4
Backward Euler Method
  • Forward Euler
  • Explicit formula for yn1 (explicit method)
  • Backward Euler
  • Implicit formula for yn1 (implicit method)
  • Allows larger h values to be used with comparable
    errors ? more stable
  • Generally preferred to forward Euler

5
Plug-Flow Reactor Example
0
L
6
Plug-Flow Reactor Example cont.
  • Analytical solution
  • Numerical solution
  • Convergence formula
  • Convergence of numerical solution

7
Improved Euler Method
  • Predictor-corrector formulation
  • Approximation error
  • Local truncation error O(h3)
  • Global truncation error O(h2) ? second-order
    method
  • Adaptive step size
  • Large h desirable if dy/dx changing slowly
    (speed)
  • Small h necessary if dy/dx changing rapidly
    (accuracy)
  • Adjust h to maintain the local error below a
    prespecified tolerance
  • Usually used in modern ODE solution software

8
Runge-Kutta Methods
  • Basic Runge-Kutta (RK) method
  • Global truncation error O(h4) ? fourth-order
    method
  • Runge-Kutta-Fehlberg (RKF) method involves a
    combination of two Runge-Kutta formulas (see
    text)
  • Comparison of single-step methods

9
Multistep Methods
  • Definition
  • Single-step calculation at current step only
    uses value at last step (yn ? yn1)
  • Multi-step calculation at current step uses
    values at several previous steps
  • General development
  • Integrate ODE
  • Approximate f(x,y) with an interpolation
    polynomial
  • Different polynomial produce different methods

10
Adams-Bashforth Methods
  • Utilize cubic polynomial that interpolates
  • Iterative calculation
  • Explicit method
  • Global truncation error O(h4) ? fourth-order
    method
  • Initialization
  • Must compute y1, y2, y3 by another method of
    comparable accuracy (e.g. Runge-Kutta)

11
Adams-Moulton Methods
  • Utilize cubic polynomial that interpolates
  • Iterative calculation
  • Implicit method
  • Global truncation error O(h4) ? fourth-order
    method
  • Predictor-corrector formulation
Write a Comment
User Comments (0)
About PowerShow.com