Professional Documents
Culture Documents
Viscosity
Viscosity
Viscosity
DANIEL TOPA
INFORMATION ANALYSIS CENTER
DEFENSE THREAT REDUCTION AGENCY
KIRTLAND AFB, NM
1. Problem Statement
The advection equation is an elementary hyperbolic differential equation. Given a func-
tion u : R × R → R the spatial and temporal derivatives are related by the wave speed
c
(1.1) ux + cut = 0.
As the velocity of propagation is constant, all points on the initial profile translates without
changing shape. The advection equation is sometimes called the linear convection equation.
Given the initial condition,
The wavefront travels without distortion along the characteristic curve x = ct; this un-
changing form provides a simple comparison with numerical solutions.
Key words and phrases. Courant-Freidrichs-Levy Limit, dissipation, artificial viscosity, Lax scheme,
advection, hyperbolic differential equations, forward time centered space.
1Solving the advection equation is a staple of introductory texts on partial differential equations. See,
for example, [4, Example 2.2], [2, §11.2.2], and, [5, p. 89].
1
ARTIFICIAL VISCOSITY: A CAUTIONARY TALE 2
2. Numerical implementation
Just as the analytic solution is an archetypal example, so too is the numeric solution.
Clear examples are in the works of Levesque [3, p. 224] and Garcia [1, (7.7)]. Garcia’s text
includes implementations in C and MATLAB; later editions include Python code. There
are many sample Python scripts on line with helpful plots.2
At the moment, The forward time, centered space (FTCS) discretization uses derivatives
forward in time
∂a a(xj , tµ + τ ) − a(xj , tµ )
(2.1) ≈ + O (τ ) ,
∂t τ
and centered in space
∂a a(xj + h, tµ ) − a(xj − h, tµ )
+ O h2 .
(2.2) ≈
∂x 2h
The numerical scheme of Lax advances the time step according to
1 µ cτ
(2.3) aµ+1
j = a + a µ
− a µ
− a µ
2 j+1 j−1
2h j+1 j−1
where the mesh points are represented by subscripts j = 1, 2, . . . , n and the time steps are
denoted by the superscript µ = 0, 1, 2, . . . .
3. Example
A toy problem demonstrates the effect of the artificial viscosity in a problem with periodic
boundary conditions: a(x+L, t) = a (x, t). The input wave is a cosine modulated Gaussian
pulse with periodic boundary conditions. The simulation parameters are shown in table
(3.1).
Figure (4.1) shows the numerical computation (blue dots) against the analytic solution
(gray line) at time steps 0 and 5; the damping of the wave is immediately apparent. Figure
(4.2) shows time steps 10 and 50 and strong damping of the signal.
4. Discussion
The artificial viscosity is an essential feature of the discretization of the problem whose
strength is inversely proportional to the magnitude of the time step τ . When the time
step is too large (τ > tmax ) the damping does not have the strength to stabilize the nu-
meric problem. The figures below show that when the time step is too small the damping
overwhelms the signal.
ARTIFICIAL VISCOSITY: A CAUTIONARY TALE 4
Figure 4.1. Early time evolution; the gray line is the analytic solution.
The black dots are the numerical solution.
References
[1] A. L. Garcia, Numerical methods for physics, Prentice Hall, Upper Saddle River, N.J, 2nd ed ed.,
2000.
[2] R. Haberman, Elementary Applied Partial Differential Equations, vol. 10, Prentice-Hall, 2 ed., 1987.
[3] R. J. LeVeque, Finite difference methods for ordinary and partial differential equations: steady-state
and time-dependent problems, SIAM, 2007.
ARTIFICIAL VISCOSITY: A CAUTIONARY TALE 5
[4] Y. Pinchover and J. Rubinstein, An introduction to partial differential equations, vol. 10, Cambridge
University Press, 2005.
[5] E. Vázquez-Cendón, A. Hidalgo, P. G. Navarro, and L. Cea, Numerical methods for hyperbolic
equations, CRC Press, 2012.