Documente Academic
Documente Profesional
Documente Cultură
AND PDE
Haryo Tomo
Numerical methods: properties
Finite differences - time-dependent PDEs
-> robust, simple concept, easy to
parallelize, regular grids, explicit method
f ( x dx) f ( x)
x f lim
dx0 dx
f ( x) f ( x dx)
x f lim
dx0 dx
f ( x dx) f ( x dx)
x f lim
dx0 2dx
f ( x dx) f ( x)
x f forward difference
dx
f ( x) f ( x dx)
x f backward difference
dx
f ( x dx) f ( x dx)
x f centered difference
2dx
The big question:
How good are the FD approximations?
2 3 4
dx dx dx
f ( x dx) f ( x) dxf ' ( x) f '' ( x) f ''' ( x) f '''' ( x) ...
2! 3! 4!
f ( x dx) f ( x)
x f ?
dx
Taylor Series
... that leads to :
f ( x dx) f ( x) 1 dx 2
dx 3
dxf ( x)
'
f ( x)
''
f ( x) ...
'''
dx dx 2! 3!
f ' ( x) O(dx)
f ( x dx / 2) f ( x dx / 2) 1 dx 3
dxf ( x)
'
f ( x) ...
'''
dx dx 3!
f ' ( x) O(dx 2 )
... again we are looking for the coefficients a,b,c,d with which
the function values at x±(2)dx have to be multiplied in order
to obtain the interpolated value or the first (or second) derivative!
... Let us add up all these equations like in the previous case ...
Problems: Stability
c 2 dt 2
p (t dt ) 2
p( x dx) 2 p( x) p( x dx)
dx
2 p (t ) p (t dt ) sdt 2
dt
c 1
dx
Problems: Dispersion
c 2 dt 2
p (t dt ) 2
p( x dx) 2 p( x) p( x dx)
dx
2 p (t ) p (t dt ) sdt 2
2 2 2
a 2 b c 2 d e f g 0
x xy y x y
• Menyatakan bagaimana variabel tak bebas Ø berubah
terhadap variabel bebas x,y. Disini a,b,c,d,e,f, dan g
mungkin merupakan fungsi dari Ø
Jenis2 PDP
• Ditentukan oleh harga b2-4ac
< 0, eliptic
= 0, parabolic
> 0, hyperbolic
• Adveksi…
• Difusi….
• Gelombang…
JENIS-
JENIS
PDP
by Lale Yurttas, Texas A&M
University
18
The Laplacian Difference Equations/
2T 2T
2 0
x 2
y Laplace Equation
2T Ti 1, j 2Ti , j Ti 1, j O[(x)2]
x 2 x 2
2T Ti , j 1 2Ti , j Ti , j 1
O[(y)2]
y 2
y 2
x y
Ti 1, j Ti 1, j Ti , j 1 Ti , j 1 4Ti , j 0 Laplacian difference
equation.
Diffusion
x
h 2h
D 2 Diffusion Equation
t x
h
ud D
x
x
h
ud
ud ud x
x
x
ud
h x xt
x x
ud
h x xt
x
t 0
h ud h
ud D
t x x
h h 2
D 2 Diffusion Equation
t x
Numerical Solution of Diffusion Eq.
h
h(i 1)
h(i)
h(i 1)
x
h h(i ) h(i 1) h h(i 1) h(i)
x 1 x x 2 x
2 h 1 h h
x 2
x x 2 x 1
Numerical Calculation of Diffusion Equation
t
J
h(i 1, j 1)
j+
h(i, j )
j
t
2 ・・ j-1
1
x
x
1 2 ・・・・・ i-1 i i+1 ・・・・ N
h h(i, j 1) h(i, j )
t t
h D h(i 1, j ) h(i, j ) h(i, j ) h(i 1, j )
2
D 2
x x x x
h(i 1, j ) 2h(i, j ) h(i 1, j )
D
Unknown x 2
J
j+
j
t
2 ・・ j-1
1
x
x
Initial Condition
1 2 ・・・・・ i-1 i i+1 ・・・・ N (Given)
Dt
h(i, j 1) h(i, j ) 2 {h(i 1, j ) 2h(i, j ) h(i 1, j )}
x
do i 2,N-1
t
hnew (i ) hold (i ) hold (i 1) 2hold (i ) hold (i 1) 2 D
x
end do
do i 2,N-1
hold (i ) hnew (i )
end do
Contoh
d2y dy
2
3 2 y 4 x 2
, y(1) 1, y(2) 6
dx dx
yi 1 2 yi yi 1 yi 1 yi 1
3 2 yi 4 xi
2
2
h
Buat persamaan untuk semua 2htitik, mulai dari i=1,
hingga i=4
x0=a x1 x2 x3 x4 x5=b
Domain Solusi
y5=6
y0=1
x0=1 x5=2
Penyelesaian dg Finite Diff.
• Dengan h = 0,2
32,5 yi 1 48 yi 17,5 yi 1 4 xi
2
k
penyelesaian
persamaan
parabolik
dengan
skema
implisit