You are on page 1of 16

# Introduction to Computational Methods in Chemical Engineering

## Ordinary Differential Equations

For most of the Chemical engineering problems in real life analytical solution is not possible!
We need to solve them numerically!

Eulers Method

Where

## CH2007: Computational Methods in Chemical Engineering

Implicit Methods
Forward Euler Method:

## Evaluation of (n+1)th stage depends only information on nth stage !

Backward Eulers Method:

In general, we would need an iterative scheme to advance further ! In general, implicit method allows for much larger time steps!

## Backward Euler Method: Linear Case

dy = ! y +1 dt
With Initial Condition

y (0) = 0

## CH2007: Computational Methods in Chemical Engineering

Multi-Step Method
We Know from central difference formula:

Leap-Frog Method:

## Explicit Multi-Step Method

Explicit Adams-Bashforth Methods: 1 Step : 2 Step : 3 Step :

Accuracy is

1 Step:

2 Step:

3 Step :

## Notice coefficient in front of f(y) add up to one.

Accuracy is
CH2007: Computational Methods in Chemical Engineering
9

## Single-Step versus Multi-Step Method

step methods require some other method to start with. The time step can be changed at any stage in single step methods. Single step methods can work much better in presence of discontinuity. Higher order single step method may be more expensive due to evaluation of function too many time per time step.
CH2007: Computational Methods in Chemical Engineering
10

Accuracy
Eulers Method: Taylors Series:

## CH2007: Computational Methods in Chemical Engineering

11

Stability:Forward Euler
dy = "100 y + 1 dt
Forward Euler Scheme:

Take

## Method is unstable !!!

CH2007: Computational Methods in Chemical Engineering
12

## Stability: Backward Euler

Both methods have similar error why forward Euler is unstable but Backward Euler is stable?

13

## Stability Analysis: Growth of Error

Eulers Scheme: Taylor Series for Exact Solution:

as:

## CH2007: Computational Methods in Chemical Engineering

14

Stability Analysis
Which means: Or,

Or,

## CH2007: Computational Methods in Chemical Engineering

15

Stability Analysis
Thus, forward Eulers method is stable only if:

## Thus, we cannot take step size larger than this limit !

For Backward Euler:

## So Method is stable for every value of h!

CH2007: Computational Methods in Chemical Engineering
16