Professional Documents
Culture Documents
5-Finite Difference Approximation
5-Finite Difference Approximation
2
P 1 P
x 2 t
f x 2 f2
x 3 f 3
Using the notation of the previous Figure we can write the equation
Pi 1 Pi x
P
x P
2
x 3 P
2
...
3
2 3
x i 2! x i 3! x i
P Pi 1 P
O( x)
x i x
The second term on the right-hand side of the Equation denotes the error in
the approximation and is read as “order of .” The magnitude of the error is
the same as the magnitude of . In practice, the error term is dropped in
writing the finite-difference analogues. Thus, we write:
P P P
i 1
x i x
P P n 1 P n
i i
t i t
P P P
i 1 i 1
x i 2
x
Since pressures at the old time level are known at all locations, the only
unknown in Equation is the pressure at the new time level
t ( x ) 2 n
n 1 P n n
P
2 P P
i ( x ) 2
i 1
t i i 1
t n 1
2 t n 1 t n 1 n
2 P 1 2 P i 2 P P
( x ) i 1
( x ) ( x ) i 1
i
n
A k A k
y y n 1 n1 y y n 1 n 1
P P P P
B y i, j1, k i, j, k B y i, j, k i, j1, k
y i, j1 2, k
i, j1 2 , k
n
A k n 1 n 1 A k n 1 n 1
z z P P z z P P q
B z i, j, k 1
i , j, k B z i , j, k i , j, k 1
i, j, k
z i, j, k 1 2 i, j, k 2
1
V bc n 1 n
P P
5 . 615
t i, j, k i, j, k i, j, k
2A A k k
A k x i, j,k x i x i, j, k x i
x x 1 , j , k 1 , j , k
x 1
i , j, k
A k
xi , j , k x i , j , k
x i1, j, k A x k
xi
x i, j, k
2 i 1 , j , k 1 , j , k
A k k
x x rf
B x
f f i 1 / 2, j , k
k rf S f if P i +1, j,k P i, j, k
i 1, j , k
k
rf i 1 / 2 , j , k
k S
rf f if P i+ 1, j,k P i, j, k
i , j , k
1
3 k S - k S
rf f rf f
2 i 1, j ,k
i 2 , j ,k
if P P
i +1, j, k i, j, k
k
rf
1
3 k rf S f - k rf S f
i1 / 2 ,j , k
2
i , j, k i 1 , j, k
if P P
i +1, j, k i, j, k
arithmetic averaging
The strongly non-linear component is obtained using
upstream averaging
P
A
P
i , NY
for i = 1, ...NX
P P
i ,1 C
P P
i, j
D
for j = 1, ...NY
P P
NX , j B
P P
NX 1, j NX, j
C
x 1
for j = 1, ..., NY
P P
i, j 0, j
C
x 4
P P
i,1 i,0
C
y 2
for i = 1, ..., NX
P P
1,NY 1 i, NY
C
y 3
P P
NX 1, j NX 1, j
C
2 x 1
for j = 1, ..., NY
P P
2, j i,0
C
2 x 4
P P
i, 2 i, 0
C
2 y 2
for i = 1, ..., NX
P P
2, NY 1 i, NY
C
2 y 3
Z in, j,k Pin, j,k1 1 Bin, j,k Pin, j11,k D in, j,k Pin1,1j,k E in, j,k Pin, j,k1 Fin, j,k Pin1,1j,k
H in, j,k Pin, j11, k S in, j,k Pin, j,k1 1 Q i , j,k
For instance, having written it for three-dimensional flow, for one- and
two-dimensional flows some of the SIP coefficients simply drop out.