The shifted box scheme for scalar transport problems Bertil - - PowerPoint PPT Presentation
The shifted box scheme for scalar transport problems Bertil - - PowerPoint PPT Presentation
The shifted box scheme for scalar transport problems Bertil Gustafsson Uppsala University and Stanford University Joint work with: Yaser Khalighi, Stanford .
.
Scalar transport equation, incompressible flow
- ✁
- ✝
- ✝
Velocity components
☎ ✡ ☎ ✄✆✍ ✌ ✎ ✌✑✏ ✝ ✌ ✟ ✡ ✟ ✄✆✍ ✌ ✎ ✌✑✏ ✝Energy conservation:
✒ ✒ ✏ ✔✓ ✒ ✍ ✒ ✎ ✡ ☞Alternative formulation:
- ✁
- ✞
- ✠☛✡
Requirements on numerical method:
- 1. Very fast algorithm
- 2. No stability limit on the time step
- 3. Energy conservation (no loss of energy)
- 4. No unphysical oscillations
Standard centered finite difference or finite volume method, trapezoidal rule in time: (2), (3)
✕Implicit upwind scheme: (2), (4)
✕Method of characteristics: (1), (2), (3), (4)
✕Method of characteristics on a grid (interpolation): (1), (2), (4) The box scheme?
Model problem 1-D
- ✁
- ✝
- ✞
- ✄
- ✄
- ✤
- ✄
The box scheme
x t
- ✧
- ✧
- ✧
- ✧
- ✧
- ✧
- ✬
- ✬
- ✰
Box scheme vs standard Crank-Nicholson: Parasitic solution?
✒ ☎ ✒ ✍ ✡ ☞Crank-Nicholson
☎ ✧ ★ ✩ ✥ ☎ ✧✳✲ ✩ ✡ ☞ ✴ ☎ ✧ ✡ ✵ ✩ ✂ ✵ ✓ ✄ ✥ ✖ ✝ ✧Box scheme
☎ ✧ ★ ✩ ✥ ☎ ✧ ✡ ☞ ✴ ☎ ✧ ✡ ✵ ✩ ✡const
Accuracy? One step:
☎ ✄ ✍ ✌ ✫ ✝ ✡ ✶✸✷✹ ✺ ✞ ★ ✻ ✼. Approximation of
✽ ✫?
0.5 1 1.5 2 2.5 3 3.5 0.5 1 1.5 2 2.5 3 3.5 4
Box
✾ ✡ ☞ ✛ ✿, Exact and Box
✾ ✡ ✖ ✛ ☞, Box
✾ ✡ ✖ ✛ ✗, C-N(4,2)
✾ ✡ ✖ ✛ ✗, C-N(2,2)
✾ ✡ ✖ ✛ ✗Approximation at
✽ ✫ ✡ ❀ ❁ ✗(4 points per wavelength) Phase speed for
☞ ✛ ❂ ✘ ✾ ✘ ✖ ✛ ❂0.5 0.6 0.7 0.8 0.9 1 1.1 1.2 1.3 1.4 1.5 0.5 0.6 0.7 0.8 0.9 1 1.1 1.2 1.3
Box, C-N(4,2), C-N(2,2)
Constant coefficient
☎, periodic solutions
- ✁
- ✞
Fourier transform
❃❄❅ ❆ ✗ ✄ ❇- ✬
- ✤
- ✬
Unconditional stability if
☎ ❍ ✡ ☞. Note: problem with
☎ ✡ ☞ ✌ ❆ ✡ ❀!
Initial-boundary value problem:
- ✄
- ✄✆✍
Solve from left to right
t x
const
✢ ☞Energy conservation:
✤ ✤ ✦ ■✬ ★ ✩ ✤ ✤ ✓ ✻ ✂ ✤ ✤ ☎ ✭ ✗ ✪- ✬
- ✬
- ✬
- ✬
(1) Stability estimate
✤ ✤ ❋✬ ✤ ✤ ✻ ✘ ❑ ✓ ❁ ❑ ✩ ✤ ✤ ✚ ✤ ✤ ✻ ❑ ✩ ✡ ▲ ❉ ❊ ✄ ✾ ✓ ✌ ✖ ✝ ✌ ❑ ✓ ✡ ▲ ▼ ◆ ✄ ✾ ✓ ✌ ✖ ✝ ✛ ✾ ✡ ☎ ✭ ❁ ✫?
- ✬
- ✬
- ✬
- ✬
Unstable!
The shifted box scheme Add constant
❑to the velocity:
❯ ✁ ✂ ✖ ✗ ✄ ✄ ❑ ✂ ☎ ✝ ❯ ✝ ❱ ✂ ✖ ✗ ✄ ❑ ✂ ☎ ✝ ❯ ❱ ✡ ☞ ✛True solution obtained by a shift
- ✄
Choose
❑ ✭ ✡ ✫ ✌(or more generally
❑ ✭ ✡ ❲ ✫ ✌ ❲integer)
The shifted box scheme
x t
0.2 0.4 0.6 0.8 1 −0.2 0.2 0.4 0.6 0.8 1 1.2
(a) Velocity
❳ ❨❬❩ ❭0.2 0.4 0.6 0.8 1 0.2 0.4 0.6 0.8 1
(b) Initial function
❪ ❨ ❩ ❭Characteristics
x 0.4 0.6
Original box scheme unstable
0.2 0.4 0.6 0.8 1 −0.5 0.5 1 1.5 2 2.5
(c) Original box scheme
0.2 0.4 0.6 0.8 1 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6
(d) Shifted box scheme
- ✄✆✍
after 18 steps,
❫ ✡ ✿ ☞ ☞ ✌ ✾ ✡ ✖0.2 0.4 0.6 0.8 1 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6
(e) t=2
0.2 0.4 0.6 0.8 1 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6
(f) t=3
- ✄
0.2 0.4 0.6 0.8 1 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6
(g) t=2
0.2 0.4 0.6 0.8 1 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6
(h) t=3
- ✄✆✍
0.5 1 1.5 2 2.5 3 0.002 0.004 0.006 0.008 0.01
✤ ✤- ✄
10
−4
10
−3
10
−2
10
−1
10
−6
10
−5
10
−4
10
−3
Grid Spacing Error
Periodic BC Inlet BC
Second order accuracy
2 space dimensions
y x u > 0 v > 0
- ✁
- ✝
- ✝
- ✄
- ✄
- ✄✆✍
The box scheme
✦ ✞ ✦ ✠ ✄ ❘✬ ★ ✩ ✷ ✧ ✥ ✯✬ ✷ ✧ ✝ ✂ ✭ ✗❜❛ ✦ ✠ ✪ ✞ ❝ ✄ ☎- ✝
- ✝
- ✝
- ✝
x y t
Unconditional stability:
✤ ✤ ✦ ✞ ✦ ✠ ✯✬ ★ ✩ ✤ ✤ ✓ ✻ ✂ ✤ ✤ ✭ ✗ ✄✆☎ ✦ ✠ ✪ ✞ ✂ ✟ ✦ ✞ ✪ ✠ ✝- ✬
- ✬
- ✬
- ✬
- ✬
- ✬
- ✬
- ✬
Velocity field
☎ ✡ ✖ ✛ ☞ ✂ ☞ ✛ ✖ ❃ ❄ ❅ ✄ ✗ ❀ ✍ ✝ ❃ ❄ ❅ ✄ ✗ ❀ ✎ ✝ ✌ ✟ ✡ ☞ ✛ ✮ ✂ ☞ ✛ ✖ ❅ ❉❊ ✄ ✗ ❀ ✍ ✝ ❅ ❉ ❊ ✄ ✗ ❀ ✎ ✝ ✛Divergence free in the box-scheme sense:
✦ ✠ ✪ ✞ ☎ ✷ ✧ ✂ ✦ ✞ ✪ ✠ ✟ ✷ ✧ ✡ ☞Initial data
- ✄
(i)
♦ ❨ ❩ ♣ q ♣sr ❭(j)
♦ ❨ ❩ ♣ q ♣ r t ✉ ❭ ✈ ✡ ❫ ✡ ✗ ☞ ☞ ✌ ✾ ✡ ✖(k)
♦ ❨❬❩ ♣ q ♣ r t ✇ ① ❭0.2 0.4 0.6 0.8 1 0.01 0.02 0.03 0.04 0.05
(l)
② ② ♦ ❨❬③ ❭ ② ② ④ ♣ r ⑤ ③ ⑤⑦⑥and/or
✟negative in part of the domain. The shifted box scheme
❯ ✁ ✂ ✄ ✄ ❑ ✂ ☎ ✝ ❯ ✝ ❱ ✂ ✄ ✄ ✒ ✂ ✟ ✝ ❯ ✝ ⑧ ✡ ☞ ✌ ❑ ✂ ☎ ✢ ☞ ✌ ✒ ✂ ✟ ✢ ☞Velocity field:
☎ ✡ ☞ ✛ ☞ ❢ ✂ ☞ ✛ ☞ ✿ ❃ ❄ ❅ ✄ ✗ ❀ ✍ ✝ ❃❄ ❅ ✄ ☞ ✛ ✮ ✎ ✝ ✌ ✟ ✡ ☞ ✛ ❂ ✂ ☞ ✛ ✮ ❅ ❉❊ ✄ ✗ ❀ ✍ ✝ ❅ ❉❊ ✄ ☞ ✛ ✮ ✎ ✝ ✌Initial data
- ✄
(m)
③ ❷ r(n)
③ ❷ ⑥ t ❸ ✤ ✤- ✄
Robust scheme. Random data distributed on
❝ ☞ ✌ ✖ ❞for initial and boundary functions
20 40 60 80 100 0.2 0.4 0.6 0.8 1
(o)
❹ ❷ ⑥20 40 60 80 100 0.2 0.4 0.6 0.8 1
(p)
❹ ❷ ① r ✤ ✤ ❯ ✄ ✏ ✝ ✤ ✤ ✻ ✌ ☞ ✘ ✏ ✘ ✖ ☞ ☞Irregular grid Box scheme well defined over one interval
❝ ✍ ✧ ✌ ✍ ✧ ★ ✩ ❞Step size
✫ ✧ ✡random numbers
50 100 150 200 0.002 0.004 0.006 0.008 0.01 0.012 0.014
Solution
- ✄✆✍
with random step size
✫ ✧0.2 0.4 0.6 0.8 1 −0.2 0.2 0.4 0.6 0.8 1
The Taylor-Green problem T=5
x c
1 2 3 0.2 0.4 0.6 0.8 1 1.2 1.4
Analytical Shifted Box-Scheme Dissipative
T=10
x c
1 2 3 0.2 0.4 0.6 0.8 1 1.2 1.4
Analytical Shifted Box-Scheme Dissipative
T=30
x c
1 2 3 0.2 0.4 0.6 0.8 1 1.2 1.4
Analytical Shifted Box-Scheme Dissipative
T=50
x c
1 2 3 0.2 0.4 0.6 0.8 1 1.2 1.4
Analytical Shifted Box-Scheme Dissipative
High resolution T=10
x c
1 2 3 0.2 0.4 0.6 0.8 1 1.2 1.4
Analytical Shifted Box-Scheme 256 Shifted Box-Scheme 1024
High resolution, T=30
x c
1 2 3 0.2 0.4 0.6 0.8 1 1.2 1.4
Analytical Shifted Box-Scheme 256 Shifted Box-Scheme 1024
High resolution, T=50
x c
1 2 3 0.2 0.4 0.6 0.8 1 1.2 1.4
Analytical Shifted Box-Scheme 256 Shifted Box-Scheme 1024
Conclusions: * New shifted box scheme * Work
❺ ❫- n grid with