Modeling_Simulation_Lecture7
Modeling_Simulation_Lecture7
Ali M. Sahlodin
Department of Chemical Engineering
AmirKabir University of Technology
1397 S.H
1
10/22/2019
g
Pendulum in ODE form sin( )
L
h=0.025 h=0.001
2
10/22/2019
Find eigenvectors of A
(A 1I)v1 0 Matrix of eigenvectors
(A 2 I)v2 0
R v1 | v2 | | vn
(A n I)vn 0
Column vectors
Eigenvalue decomposition of A
A RR 1 x A x RR 1 x
R 1 x R 1 x
3
10/22/2019
y R 1 x y y
This transformation resulted in a decoupled
system of differential equations
y j (t ) j y j (t ), j 1,..., n
Solution of the decoupled ODEs
4
10/22/2019
Given ODE: y y
Stability of Forward Euler
yn1 yn h yn (1 h ) yn
(1 h )( yn1 h yn1 ) yn1 (1 h ) 2
y0 (1 h ) n1
5
10/22/2019
Img
i i h
1 h e h e 1
Re
-2 -1
Stability region of forward Euler
2
For real eigenvalue h
Step size is limited by stability: too big a step unstable solution
yn1 yn h yn1
Using a similar exercise
Img h
6
10/22/2019
7
10/22/2019
true solution
h=0.001 h=0.1
8
10/22/2019
k1 0.04
C1 C2 C (0) (1,1,1)
k2 1e 4
Stiff system (why?)
C2 C3 C1
k3 3e7
C C
2 3 Implicit Euler
h=0.5 h=0.01