Page 279 - Numerical Methods for Chemical Engineering
P. 279
268 6 Boundary value problems
ϕ A (1) = 1 by placing a hypothetical (nonexistent) grid point at ξ N+1 = 1 for which we
set ϕ N+1 = 1. We then modify (6.53) for j = N to use this value for the nonexistent grid
point,
γβ(1 − ϕ N )
2
2
f N = A N,N−1 ϕ N−1 + A NN ϕ N + A N,N+1 − ξ exp ϕ N = 0
N
1 + β(1 − ϕ N )
(6.54)
We treat the von Neumann boundary condition similarly, applying (6.53) to j = 1, referring
to a nonexistent point at ξ 0 = 0,
γβ(1 − ϕ 1 )
2
2
f 1 = A 10 ϕ 0 + A 11 ϕ 1 + A 12 ϕ 2 − ξ exp ϕ 1 = 0 (6.55)
1
1 + β(1 − ϕ 1 )
To enforce dϕ/dξ| 0 = 0 we might think to set ϕ 0 = ϕ 1 . However, this approximation is
based upon the first-order finite difference
dϕ A ϕ 1 − ϕ 0
= + O(ξ 1 ) (6.56)
dξ 0 ξ 1
When solving diffusion equations it is common to use second-order accurate approxima-
tions, so that simply setting ϕ 0 = ϕ 1 is not the preferred way to treat a von Neumann
boundary condition. Rather, we obtain second-order accuracy by fitting a quadratic poly-
nomial to ϕ(ξ) near ξ = 0,
2
ξ − ξ k
0
ϕ(ξ) ≈ ϕ 0 L 0 (ξ) + ϕ 1 L 1 (ξ) + ϕ 2 L 2 (ξ) L j (ξ) = (6.57)
ξ j − ξ k
k=0
k = j
The discretized form of the von Neumann boundary condition is then
dϕ A
= 0 = ϕ 0 L (0) + ϕ 1 L (0) + ϕ 2 L (0) (6.58)
0 1 2
dξ
0
where
−(ξ 1 + ξ 2 ) ξ 2 −ξ 1
L (0) = L (0) = L (0) = (6.59)
0 1 2
ξ 1 ξ 2 ξ 1 (ξ 2 − ξ 1 ) ξ 2 (ξ 2 − ξ 1 )
For a locally uniform grid with ξ 1 = ξ, ξ 2 = 2( ξ), (6.58) becomes
dϕ A −3ϕ 0 + 4ϕ 1 − ϕ 2
= 0 = (6.60)
dξ 2( ξ)
0
From this discretized boundary condition, we write the nonexistent grid value as
ϕ 0 = a 1 ϕ 1 + a 2 ϕ 2 a j =−[L (0)]/[L (0)] (6.61)
j
0
and substitute for ϕ 0 in (6.55),
γβ(1 − ϕ 1 )
2
2
f 1 = (A 11 + a 1 A 10 )ϕ 1 + (A 12 + a 2 A 10 )ϕ 2 − ξ exp ϕ 1 = 0
1
1 + β(1 − ϕ 1 )
(6.62)
Together, (6.53), (6.54), and (6.62) provide a set of N nonlinear algebraic equations for the
N unknowns {ϕ 1 , ϕ 2 ,..., ϕ N } that can be solved numerically (e.g. by fsolve). The nonzero