12
JJ J N I II 1/35JJ J N I II 1/35
Implicit Spatial Discretization forAdvection-Diffusion-Reaction Equation
Kundan Kumar
10-Dec-2008
12
JJ J N I II 2/35JJ J N I II 2/35
Introduction
Applications of Advection-Diffusion ReactionEquationsChemical Vapor Deposition
12
JJ J N I II 3/35JJ J N I II 3/35
Introduction
Setting:
• Advection-Diffusion-Reaction Equation
•φt + uφx = εφxx + s(x, t),
• Advection Velocity : u
• Diffusion Coefficient : ε
• Source term : s(x, t)
s(x, t) = b2ε cos(b(x− ut)).
12
JJ J N I II 4/35JJ J N I II 4/35
Introduction
Setting:
• Exact Solution:
φ = cos(b(x− ut)) + exp(−a2εt) cos(a(x− ut)).
• Dirichlet Boundary Conditions.
• Initial Condition, φ(x, t) at t = 0.
12
JJ J N I II 5/35JJ J N I II 5/35
Contents
1 Discretization 61.1 Order Condition . . . . . . . . . . . . . . . . . . . . . . . . 8
2 Examples 10
3 Stability 16
4 Time Integration Aspect 18
5 Numerical Computations 19
6 Conclusion 35
12
JJ J N I II 6/35JJ J N I II 6/35
1. Discretization
φt + uφx = εφxx + s(x, t)
Discretization:1∑
k=−1
βkw′j+k(t) = h−2
1∑k=−1
αkwj+k(t)
+
1∑k=−1
βkgj+k(t)
wj(t) ≈ φ(xj, t); gj(t) = s(xj, t);1∑
k=−1
βk = 1.
12
JJ J N I II 7/35JJ J N I II 7/35
Discretization
Vector Notation:
Bw′(t) = Aw(t) +Bg(t),
A = (aij) = (h−2αj−i)
B = (bij) = (βj−i).
Define:ξk = (−1)
kα−1 + α1, ηk = (−1)
kβ−1 + β1.
12
JJ J N I II 8/35JJ J N I II 8/35
1.1. Order Condition
Let φh be the restriction of the exact solution φ to the grid.Spatial truncation error:
σh(t) = Bφ′h(t)− Aφh(t)−Bg(t).
Truncation error in a point (xj, t) equals:
σh,j(t) = h−2(C0φ + hC1φx + h2C2φxx + h3C3φxxx + ...)|(xj ,t)
Order Condition: The discretization has order q if:
σh = O(hq),
translates to:Ck = O(hq+2−k), k = 0, 1, · · · , q + 2.
12
JJ J N I II 9/35JJ J N I II 9/35
Order Condition
Error coefficients:
C0 = −ξ0, C1 = −ξ1 − uhη0,
Ck =−1
k!(ξk + kuhηk−1 − k(k − 1)εηk−2); k ≥ 2.
where,ξk = (−1)
kα−1 + α1, ηk = (−1)
kβ−1 + β1.
Use the order condition to determine αj and βj.
12
JJ J N I II 10/35JJ J N I II 10/35
2. Examples
Explicit Central Difference
w′j =u
2h(wj−1 − wj+1) +
ε
h2(wj−1 − 2wj + wj+1) + gj,
Implicit Central Difference
1
6(w′j−1 + 4w′j + w′j+1) =
u
2h(wj−1 − wj+1)
+ε
h2(wj−1 − 2wj + wj+1) +
1
6(gj−1 + 4gj + gj+1)
12
JJ J N I II 11/35JJ J N I II 11/35
Examples
Define:µ = uh/ε (Peclet Number).
Explicit Adaptive Upwinding
w′j =u
2h(wj−1 − wj+1) +
ε + 0.5uhκ
h2(wj−1 − 2wj + wj+1) + gj,
Where κ is defined as:
κ = max(0, 1− 2/µ).
12
JJ J N I II 12/35JJ J N I II 12/35
Examples
Implicit Adaptive Upwinding
1
2κw′j−1 + (1− 1
2κ)w′j =
u
2h(wj−1 − wj+1)
+ε + 0.5uhκ
h2(wj−1 − 2wj + wj+1)
+1
2κgj−1 + (1− 1
2κ)gj.
12
JJ J N I II 13/35JJ J N I II 13/35
Examples
Peclet Number µ:µ = uh/ε.
Explicit Exponential Fitting
w′j =
1∑k=−1
αkwj+k + gj,
α−1 = uhexp(µ)
exp(µ)− 1, α1 = uh
1
exp(µ)− 1, α0 = −(α1 + α−1).
12
JJ J N I II 14/35JJ J N I II 14/35
Implicit Exponential Fitting
β−1w′j−1 + β0w
′j + β1w
′j+1 =
1∑k=−1
αkwj+k + β−1gj−1 + β0gj + β1gj+1.
where
β−1 =1
2
(exp(µ)
exp(µ)− 1− 1
µ
),
β0 =1
2,
β1 =1
2
(1
µ− 1
exp(µ)− 1
).
12
JJ J N I II 15/35JJ J N I II 15/35
Examples
Compact Schemes:
α−1 = ε +1
2uh− uh(β1 − β−1),
α1 = ε− 1
2uh− uh(β1 − β−1),
α0 = −(α−1 + α1),
β−1 =1
γ(6 + 3µ− µ2),
β0 =1
γ(60− 4µ2),
β1 =1
γ(6− 3µ− µ2)
and γ is a scaling factor given by:
γ = 72− 6µ2.
12
JJ J N I II 16/35JJ J N I II 16/35
3. Stability
Requirement:|| exp(tB−1A)|| ≤ C, for all t > 0.
We can write:
A = V diag(ak)V−1, B = V diag(bk)V
−1,
with ak, bk eigenvalues of A,B respectively. Define global error e(t):
e(t) = φh(t)− w(t), e(t) = V −1e(t)
Discretization error σh(t):
σh(t) = Bφ′h(t)− Aφh(t)−Bg(t), σh(t) = V −1σh(t).
12
JJ J N I II 17/35JJ J N I II 17/35
Stability
The error equation then reads:
bkd
dte(t) = ake(t) + σh(t).
Stability if:Re(ak/bk) ≤ 0 and |ak| + |bk| > 0.
Result: For the three point scheme considered with C0 = C1 = 0, C2 =O(h), and assume that:
h−2|α0| + |β0 −1
2| > 0,
then the stability condition holds iff:
2ah(β1 − β−1) ≥ α0, and α0(1− 2β0) ≥ 0.
12
JJ J N I II 18/35JJ J N I II 18/35
4. Time Integration Aspect
Ode system:Bw′(t) = Aw +Bg(t).
Define:F (t, w) = Aw(t) +Bg(t).
• We use the θ method (with θ = 0.5:
Bwn+1 = Bwn + 0.5τF (tn, wn) + 0.5τF (tn+1, wn+1).
• With Explicit method, there is some amount of ’implicitness’!.
• Stability conditions in general become more stringent in case of implicitdiscretization method.
• For an implicit A-stable ODE method for time stepping, little differencebetween the two methods.
12
JJ J N I II 19/35JJ J N I II 19/35
5. Numerical Computations
Error for Implicit vs Explicit Central Difference
12
JJ J N I II 20/35JJ J N I II 20/35
Implicit vs Explicit Adaptive Upwinding
12
JJ J N I II 21/35JJ J N I II 21/35
Implicit vs Explicit Exponential Fitting
12
JJ J N I II 22/35JJ J N I II 22/35
Implicit vs Explicit
12
JJ J N I II 23/35JJ J N I II 23/35
Implicit vs Explicit Central Difference
12
JJ J N I II 24/35JJ J N I II 24/35
Implicit vs Explicit Adaptive Upwinding
12
JJ J N I II 25/35JJ J N I II 25/35
Implicit vs Explicit Exponential Fitting
12
JJ J N I II 26/35JJ J N I II 26/35
12
JJ J N I II 27/35JJ J N I II 27/35
12
JJ J N I II 28/35JJ J N I II 28/35
12
JJ J N I II 29/35JJ J N I II 29/35
12
JJ J N I II 30/35JJ J N I II 30/35
12
JJ J N I II 31/35JJ J N I II 31/35
12
JJ J N I II 32/35JJ J N I II 32/35
12
JJ J N I II 33/35JJ J N I II 33/35
12
JJ J N I II 34/35JJ J N I II 34/35
12
JJ J N I II 35/35JJ J N I II 35/35
6. Conclusion
When do we use Implicit Spatial Discretization?
• To achieve higher order without using wider stencils.
• To reduce the artificial oscillations in the numerical solution.
• Provides extra degrees of freedom for the numerical scheme.
Disadvantages
• Positivity may be lost.
• Stringent conditions for explicit time integration methods.