8/13/2019 NTU, adsorption
1/16
Introduction to Computational Methodsin Chemical Engineering
by
Santosh Ansumali
and
Kwak Sang Kyu
8/13/2019 NTU, adsorption
2/16
2CH2007: Computational Methods in Chemical Engineering
Ordinary Differential Equations
For most of the Chemical engineering problems in real lifeanalytical solution is not possible!
With Initial condition
We need to solve them numerically!
We can rewrite our equation as:
8/13/2019 NTU, adsorption
3/16
3CH2007: Computational Methods in Chemical Engineering
Eulers Method
This method has an error of
Where
In general
Where
8/13/2019 NTU, adsorption
4/16
4CH2007: 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!
8/13/2019 NTU, adsorption
5/16
5CH2007: Computational Methods in Chemical Engineering
Backward Euler Method: Linear
Case
1+!= ydt
dy
0)0( =yWith Initial Condition
Which can be made explicit as
8/13/2019 NTU, adsorption
6/16
6CH2007: Computational Methods in Chemical Engineering
Backward Euler Method: Non-
Linear Case
With Initial Condition
8/13/2019 NTU, adsorption
7/16
7CH2007: Computational Methods in Chemical Engineering
Multi-Step Method
We Know from central difference formula:
Leap-Frog Method:
Compare it with the trapezoidal rule result:
This is an example of 2-Step method!
8/13/2019 NTU, adsorption
8/16
8CH2007: Computational Methods in Chemical Engineering
Explicit Multi-Step Method
Explicit Adams-Bashforth Methods:
1 Step :
2 Step :
3 Step :
Accuracy is for a r-step method !
8/13/2019 NTU, adsorption
9/16
8/13/2019 NTU, adsorption
10/16
10CH2007: Computational Methods in Chemical Engineering
Single-Step versus Multi-Step
Method Single step methods are self starting while multi-
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 toomany time per time step.
8/13/2019 NTU, adsorption
11/16
11CH2007: Computational Methods in Chemical Engineering
Accuracy
Eulers Method:
TaylorsSeries:
8/13/2019 NTU, adsorption
12/16
12CH2007: Computational Methods in Chemical Engineering
Stability:Forward Euler
dy
dt= "100y +1
Forward Euler Scheme:
Take
Method is unstable !!!
8/13/2019 NTU, adsorption
13/16
13CH2007: Computational Methods in Chemical Engineering
Stability: Backward Euler
Both methods have similar error why forward Euler is unstablebut Backward Euler is stable?
8/13/2019 NTU, adsorption
14/16
14CH2007: Computational Methods in Chemical Engineering
Stability Analysis: Growth of
Error
Eulers Scheme:
Taylor Series for Exact Solution:
Subtracting the two equations give equation for error as:
By taking absolute values on both sides:
8/13/2019 NTU, adsorption
15/16
15CH2007: Computational Methods in Chemical Engineering
Stability Analysis
Which means:
Or,
Thus, we can say that error is growing if:
So Method is stable or error is bounded with time if:
Or,
8/13/2019 NTU, adsorption
16/16
16CH2007: Computational Methods in Chemical Engineering
Stability Analysis
Thus, forward Eulers method is stable only if:
Thus, we cannot take step size larger than this limit !
For Backward Euler:
Taking absolute magnitude, we see that:
So Method is stable for every value of h!