Академический Документы
Профессиональный Документы
Культура Документы
Spring 2015
Lecture Agenda
Lecture Agenda
{ I *} = { I * (1), I * ( 2 ), K , I * ( N )}
{ y } = { y1 , y 2 , K, y N }
Prof. Nayer El-Esnawy – CEI-SC-I 300 Scientific Computing I
T avg = ⎛⎜
1 ⎞ 6 8
⎟ × ∫ ∫ T ( x , y ) dx dy 3m
⎝ area ⎠ 0 0
4m 4m
T avg = ⎛⎜
1 ⎞ 6 8
⎟ × ∫ ∫ T ( x , y ) dx dy 3m
⎝ area ⎠ 0 0
4m 4m
Lecture Agenda
df f(x i +1 ) − f(x i −1 )
@xi : = h h
dx 2h m ate
xi
xi pro dx
df f i +1 − f i −1 e p
A df /
@xi : = Tru x xi+1
dx 2h d
df / (xi+h)
xi-1
df − 0.5 f i −1 + 0.5 f i +1 (xi-h)
@xi : =
dx h
Prof. Nayer El-Esnawy – CEI-SC-I 300 Scientific Computing I
2. Numerical Differentiation & Differential Equations
df f k +1 − f k
@xk : =
dx h
h
x
xk−1 xk xk+1
Prof. Nayer El-Esnawy – CEI-SC-I 300 Scientific Computing I
2. Numerical Differentiation & Differential Equations
n
df f k − f k −1
io
xi e
ro nit =
at
@xk :
m
pp Fi
dx h
A
h
x
xk−1 xk xk+1
Prof. Nayer El-Esnawy – CEI-SC-I 300 Scientific Computing I
nite tion df f k +1 − f k −1
i
F ima @xk : =
pr
o x dx 2h
Ap
2h
x
xk−1 xk xk+1
Prof. Nayer El-Esnawy – CEI-SC-I 300 Scientific Computing I
2. Numerical Differentiation & Differential Equations
x
k-2 k-1 k k+1 k+2
Prof. Nayer El-Esnawy – CEI-SC-I 300 Scientific Computing I
⎡ h2 h4 ⎤
⇒ f ( x i +1 ) + f ( x i −1 ) = 2 ⎢ f ( x i ) + ′′
f ( xi ) + f ′′′′( x i ) + L⎥
⎣ 2! 4! ⎦
f ( xi +1 ) − 2 f ( xi ) + f ( xi −1 ) h2
f ′′( x i ) = 2
− f ′′′′(ξ )
h 4!
h h h h h h
For state variable “u”, central FD expressions at discrete point “k” are:
du 1 (
1. = − 0.5 u k -1 + 0.5 u k +1 ) h = constant spacing between
dx h discrete points inside domain
d2u
2. = 1 ( u k -1 − 2 u k + u k +1 )
dx 2 h 2
d3u
3. = 1 ( − 0.5 u k -2 + u k -1 − u k +1 + 0.5 u k + 2 )
dx 3 h 3
d4u
4. = 1 ( u k -2 − 4 u k -1 + 6 u k − 4 u k +1 + u k + 2 )
dx 4 h 4
Prof. Nayer El-Esnawy – CEI-SC-I 300 Scientific Computing I
2. Numerical Differentiation & Differential Equations
h h h h h h
FD Computation
Molecules
Derivative operator D = d / dx
Prof. Nayer El-Esnawy – CEI-SC-I 300 Scientific Computing I
h h h h h h
For state variable “u”, forward FD expressions at discrete point “k” are:
du 1 (
1. = − u k + u k +1 ) h = constant spacing between
dx h discrete points inside domain
d2u
2. = 1 ( u k − 2 u k +1 + u k + 2 )
dx 2 h 2
d3u
3. = 1 ( − u k + 3 u k +1 − 3 u k + 2 + u k +3 )
dx 3 h 3
d4u
4. = 1 ( u k − 4 u k +1 + 6 u k + 2 − 4 u k +3 + u k + 4 )
dx 4 h 4
Prof. Nayer El-Esnawy – CEI-SC-I 300 Scientific Computing I
2. Numerical Differentiation & Differential Equations
h h h h h h
For state variable “u”, backward FD expressions at discrete point “k” are:
du 1 (
1. = u k − u k -1 ) h = constant spacing between
dx h discrete points inside domain
2
d u
2. = 1 ( u k − 2 u k -1 + u k -2 )
dx 2 h 2
d3u
3. = 1 ( u k − 3 u k -1 + 3 u k -2 − u k -3 )
dx 3 h 3
d4u
4. = 1 ( u k − 4 u k -1 + 6 u k -2 − 4 u k -3 + u k -4 )
dx 4 h 4
Prof. Nayer El-Esnawy – CEI-SC-I 300 Scientific Computing I
0.06
0.04
w(x) = 2
0.02
0.01
wx
( x 3 − 2 Lx 2 + L3 )
0.00
v(x) = 0.0 1.0 2.0 3.0 4.0
24 E I x
= x ( x 3 − 8 x 2 + 64 ) M(x)
1200 4.5
4.0
3.5
3.0
wx 2.5
2 1.5
= (4x − x 2 )
1.0
0.5
0.0
0.0 1.0 2.0 3.0 4.0
x
Lecture Agenda
d 4 v w(x) d v P d2v
4
− =0 v
L + × =0
dx 4 EI dx 4 E I dx 2
4
d v w(x)
= d4v d2v λ=
P
dx 4 EI +λ 2 =0
dx 4 dx EI
Unknown Forcing
Response Term Unknown No
Response Forcing
Discretization Term
Discretization
[ A]{x} = {b}
Non-homogenous
[ A ]{ x } − λ { x } = { 0}
Algebraic Equations
Unique solution exist
[ B ]{ x } = { 0} [ B ] = [ A ] − λ [ I ]
If [A] is not singular Homogenous Algebraic Equations
det[A] ≠ 0 NO unique solution exist
d 4 v w(x) d v P d2v
4
− =0 v
L + × =0
dx 4 EI dx 4 E I dx 2
[ A]{x} = {b} [ A ]{ x } − λ { x } = { 0}
Equilibrium Problem [ B ]{ x } = { 0} [ B ] = [ A ] − λ[ I ]
Eigenvalue Problem
λ = eigenvalue or characteristic value
{x} = eigenvector
Theorem 2
There is one eigenvalue inside each isolated disc. If “m” number of discs
intersect, then there are “m” eigenvalues inside intersecting discs.
det [ [ A ] − λ [ I ] ] = 0
Expansion of det[B] gives a polynomial of order “N” in λ, which is known
as the characteristic equation or characteristic polynomial
c N λ N + c N −1 λ N −1 + K + + c 2 λ 2 + c1 λ + c 0 = 0
⎡ 32 − 16 ⎤
>> A = [32,-16; -16,16];
Example 1 [ A ] = ⎢ ⎥
>> cheq = poly(A)
⎣ − 16 16 ⎦ cheq =
1 -48 256
>> lamda = roots(cheq)
lamda =
41.8885
6.1115
Power iterations are effective if [A] is large and sparse, and when λN and
λN-1 are well separated
⎡ −11.2904 4 3 ⎤ ⎧ x1 ⎫ ⎧0⎫
⎢ ⎪ ⎪ ⎪ ⎪
4 − 7.2904 6 ⎥ ⎨ x 2 ⎬ = ⎨0 ⎬
⎢ 3 6 − 9.2904⎥⎦ ⎪⎩ x3 ⎪⎭ ⎪⎩0⎪⎭
⎣ 1
⎡ −11.2904 4 ⎤ ⎧ x1 ⎫ ⎧ − 3⎫ ⎧ x1 ⎫ ⎧ 0.6918⎫
= ⎨ x ⎬ = ⎨1.2025 ⎬
⎢⎣ 4 − 7.2904⎥⎦ ⎨⎩ x2 ⎬⎭1 ⎨⎩− 6 ⎬⎭ ⎩ 2 ⎭1 ⎩ ⎭
⎧ x1 ⎫ ⎧ 0.6918⎫ ⎧ x1 ⎫ ⎧ 0.4045 ⎫
⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪
⎨ x 2 ⎬ = ⎨1.2025 ⎬ || {x}1 || = 1.7101
⎨ x 2 ⎬ = ⎨ 0.7032 ⎬
⎪⎩ x 3 ⎪⎭ ⎪⎩ 1.0 ⎪⎭ ⎪⎩ x 3 ⎪⎭ ⎪⎩ 0.5848 ⎪⎭
1 1