0% found this document useful (0 votes)
17 views

Artificial Viscosity

The document discusses artificial viscosity in numerical solutions of partial differential equations. It uses the example of the advection equation solved using a Lax scheme. Small time steps can over-dampen the solution by increasing artificial viscosity introduced by spatial averaging. The example problem simulates advection of a Gaussian pulse, showing strong damping at later time steps as the artificial viscosity overwhelms the signal with a time step smaller than the stability limit.

Uploaded by

Daniel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

Artificial Viscosity

The document discusses artificial viscosity in numerical solutions of partial differential equations. It uses the example of the advection equation solved using a Lax scheme. Small time steps can over-dampen the solution by increasing artificial viscosity introduced by spatial averaging. The example problem simulates advection of a Gaussian pulse, showing strong damping at later time steps as the artificial viscosity overwhelms the signal with a time step smaller than the stability limit.

Uploaded by

Daniel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Artificial Viscosity

Daniel Topa

September 22, 2016

Abstract
A popular misconception about numerical solutions of partial di↵erential equations
is that smaller time steps produce better solutions; shrinking the time step can com-
pletely dissipate the propagating wave. The archetypical case is the advection equation
solved below using a Lax scheme. The averaging in the spatial derivative introduces
artificial viscosity; as the time step shrinks this viscosity damps out the solution. A
demonstration follows.

1 Problem statement
One of the most elementary hyperbolic di↵erential equations is the advection equation.
Given a function a : R2 7! R the spatial and temporal derivatives are related by the
wave velocity c:
@a @a
= c . (1)
@x @t
Given the initial condition
a(x, 0) = f0 (x) (2)
the analytic solution is
a(x, t) = f0 (x ct) . (3)
The wavefront travels without distortion; this provides a simple comparison with nu-
merical solutions.

2 Numerical implementation
The forward time, centered space (FTCS) discretization uses derivatives forward in
time
@a a(xj , tµ + ⌧ ) a(xj , tµ )
⇡ + O (⌧ ) , (4)
@t ⌧
and centered in space

@a a(xj + h, tµ ) a(xj h, tµ )
⇡ + O h2 . (5)
@x 2h

1
The numerical scheme of Lax advances the time step according to
1 µ c⌧ µ
aµ+1
j = a + aµj a aµj (6)
2 j+1 1
2h j+1 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 e↵ect of the artificial viscosity in a problem with
periodic boundary conditions: a(x + L, t) = a (x, t). The input wave is a cosine mod-
ulated Gaussian pulse with periodic boundary conditions. The simulation parameters
are shown in table (1).

parameter value use


n 50 points in spatial mesh
⌧ 0.15 time step
L 1 domain length
c 1 wave velocity

Table 1: Input parameters for the simulation.

The derived parameters are the grid spacing

h = L/n = 0.02 (7)

and the Courant-Freidrichs-Lewy (CFL) parameter

h
tmax = = 0.02 (8)
c
The time step is ⌧ = 0.015 < tmax which will quickly damp out the signal.
Figure (1) shows the numerical computation (blue dots) against the analytic solu-
tion (gray line) at time steps 0 and 5; the damping of the wave is immediately apparent.
Figure (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
numeric problem. The figures below show that when the time step is too small the
damping overwhelms the signal.

2
References
[1] Randall J. LeVeque, Finite Di↵erence Methods for Ordinary and Partial Di↵er-
ential Equations, SIAM, Society for Industrial and Applied Mathematics (2007).
[2] Alejandro L. Garcia, Numerical Methods for Physics, Prentice Hall (2000).
[3] Michelle Schatzman, Numerical Analysis: a mathematical introduction, Oxford
University Press (2002).
[4] Mathematica notebook,
/Users/rditldmt/Dropbox/ nb/drc/AdH/advection/advection basics 03.nb (2016)

3
Time step 000

Time step 005

Figure 1: Early time evolution; the gray line is the analytic solution. The black dots are
the numerical solution.

4
Time step 035

Time step 065

Figure 2: Late time evolution.

You might also like