The Convection-Diffusion Equation
The Convection-Diffusion Equation
Consider the unsteady-state convection-diffusion problem described by the equation:
∂c
∂t
2
∂
∂
2
x
∂c
∂x
where and are the diffusion coefficient and the velocity, respectively.
D
v
The initial and boundary conditions are:
t=0
c(x,0)=0
x=0
c(0,t)=1
x=∞
c(∞,t)=0
where is the concentration and is the position.
c
x
This problem has an analytical solution:
c(x,t)=erfc+erfc
1
2
x-vt
2
Dt
(vx)/D
e
x-+vt
2
Dt
This Demonstration plots the solution . The numerical solution obtained using Chebyshev orthogonal collocation is given by the red dots. The analytical solution is given by the blue curve. Excellent agreement between the two solutions is observed. You can vary the values of , , and as well as the number of Chebyshev collocation points, .
c(x,t)
t
D
v
N+1
Details
Details
In the discrete Chebyshev–Gauss–Lobatto case, the interior points are given by =cos(jπ/N). These points are the extrema of the Chebyshev polynomials of the first kind, (x).
y
j
T
N
The Chebyshev derivative matrix at the quadrature points is an matrix given by
(N+1)×(N+1)
(N+1)×(N+1)
D=
d
jk
0≤j,k⩽N
d
00
2+1
2
N
6
d
NN
2+1
2
N
6
d
jj
-
y
j
21-
2
y
j
1≤j≤N-1
d
jk
j+k
c
j
c
k
y
j
y
k
0≤j
k⩽N
j≠k
where =1 for and ==2.
c
j
1≤j≤N-1
c
0
c
N
The matrix is then used as follows: and , where is a vector formed by evaluating at , , and and are the approximations of and at the .
D
v'=Dv
v''=v
2
D
v
u
y
j
j=0,…,N
v'
v''
u'
u''
y
j
References
References
[1] P. Moin, Fundamentals of Engineering Numerical Analysis, Cambridge, UK: Cambridge University Press, 2001.
[2] L. N. Trefethen, Spectral Methods in MATLAB, Philadelphia: SIAM, 2000.
Permanent Citation
Permanent Citation
Housam Binous, Brian G. Higgins
"The Convection-Diffusion Equation"
http://demonstrations.wolfram.com/TheConvectionDiffusionEquation/
Wolfram Demonstrations Project
Published: June 11, 2013