Exercise 11
Diffusion in 2D ADI, Thomas algorithm, OpenMP HPCSE I, Fall 2018
Exercise 11 Diffusion in 2D ADI, Thomas algorithm, OpenMP HPCSE I, - - PowerPoint PPT Presentation
Exercise 11 Diffusion in 2D ADI, Thomas algorithm, OpenMP HPCSE I, Fall 2018 Diffusion Di ff usion Process that describes the spreading of a quantity of interest driven by its concentration gradient towards regions with lower density.
Diffusion in 2D ADI, Thomas algorithm, OpenMP HPCSE I, Fall 2018
interest driven by its concentration gradient towards regions with lower density.
that can be described by the diffusion equation of the form:
and time
Diffusion
The movement of molecules from an area of high concentration to an area of low concentration until the concentration on both sides is equal.
egion
∂ρ (r, t) ∂t = Dr2ρ (r, t) ρ (r, t) t D r = (x, y)
ρ(x, y, t) = 0 ∀ t ≥ 0 and (x, y) / ∈ Ω ρ(x, y, 0) = ⇢ 1 |x, y| < 1/2
x
y
ρ = 1 ρ = 0 ρ = 0
Condition on step size for stability is very small for 2D: for we get
independent 1D systems with tridiagonal matrices.
ρ(n+1)
i,j
− ρ(n)
i,j
∆t = D " ρ(n)
i−1,j − 2ρ(n) i,j + ρ(n) i+1,j
∆x2 + ρ(n)
i,j−1 − 2ρ(n) i,j + ρ(n) i,j+1
∆y2 # ρ(n+1)
i,j
− ρ(n)
i,j
∆t = D " ρ(n+1)
i−1,j − 2ρ(n+1) i,j
+ ρ(n+1)
i+1,j
∆x2 + ρ(n+1)
i,j−1 − 2ρ(n+1) i,j
+ ρ(n+1)
i,j+1
∆y2 # ∆x ≈ ∆y ≈ h ∆t ∼ O(h2)
ρ(n+1/2)
i,j
− ρ(n)
i,j
∆t/2 = D " ρ(n+1/2)
i−1,j
− 2ρ(n+1/2)
i,j
+ ρ(n+1/2)
i+1,j
∆x2 + ρ(n)
i,j−1 − 2ρ(n) i,j + ρ(n) i,j+1
∆y2 # ρ(n+1)
i,j
− ρ(n+1/2)
i,j
∆t/2 = D " ρ(n+1/2)
i−1,j
− 2ρ(n+1/2)
i,j
+ ρ(n+1/2)
i+1,j
∆x2 + ρ(n+1)
i,j−1 − 2ρ(n+1) i,j
+ ρ(n+1)
i,j+1
∆y2 #
step 1: step 2:
ρ(n) ρ(n+1/2) ρ(n+1/2) ρ(n+1)
Tridiagonal systems Tridiagonal systems
…solve tridiagonal systems with Thomas algorithm