Page 318 - Numerical Methods for Chemical Engineering
P. 318
The finite element method 307
We next use the divergence theorem
' '
[∇ · v]dV = v · ndS (6.212)
∂
on the second integral of (6.211) to obtain
' ' '
2
χ p [−∇ ϕ]dr = [(∇χ p ) · (∇ϕ)]dr − χ p [∇ϕ · n]dS (6.213)
∂
Equation (6.209) then becomes
' ' ' '
χ p Rdr = [(∇χ p ) · (∇ϕ)]dr − χ p [∇ϕ · n]dS − χ p (r) f (r,ϕ)dr (6.214)
∂
The algebraic equation (6.206) for node p is therefore
' ' '
0 = [(∇χ p ) · (∇ϕ)]dr − χ p [∇ϕ · n]dS − χ p fdr
∂
' '
[n]
+ w [d] [ϕ − ϕ B ]dS + w [∇ϕ · n]dS (6.215)
∂ [d] ∂ [n]
[n]
We next collect the integrals over ∂ [d] and ∂ ,
' ' '
[d]
0 = [(∇χ p ) · (∇ϕ)]dr − χ p fdr + w (ϕ − ϕ B ) − χ p [∇ϕ · n] dS
∂ [d]
'
[n]
+ w − χ p [∇ϕ · n]dS (6.216)
∂ [n]
[n]
We are still free to choose the boundary weight functions w [d] (r) > 0, w (r) > 0, and
now do so in a convenient manner to simplify (6.216).
[n]
If we set in (6.216) w [n] = χ p , this is acceptable as if p is on ∂ ,χ p ≥ 0. If not,
[n]
χ p = 0on ∂ [n] and the value of ϕ p does nothing to affect ϕ(r)on ∂ . Thus, by setting
w [n] = χ p = 0 we merely neglect this boundary condition. With this choice w [n] = χ p , the
last integral of (6.216) is zero.
To treat the Dirichlet boundary condition, we simply remove ϕ p from the list of unknowns
[d]
[p]
for any node p that lies along ∂ , and replace ϕ p with ϕ B (r ) in all other equations.
Thus, we no longer need a boundary weight, and set w [d] = 0. Equation (6.216) for node
p /∈ ∂ [d] then simplifies to
' ' '
0 = [(∇χ p ) · (∇ϕ)]dr − χ p fdr − χ p [∇ϕ · n]dS (6.217)
∂ [d]
[d]
Since we only have an instance of (6.217) for nodes that are not on ∂ , the last integral
is zero and we have the further simplification
' '
0 = [(∇χ p ) · (∇ϕ)]dr − χ p fdr (6.218)