You are on page 1of 10

Topic 4: Computational Fluid Dynamics

Lecture 4-1: Burgers Equation


Monday, March 15, 2010
Contents
1 The equations of uid dynamics 2
2 One Dimensional Burgers Equation 4
2.1 Lax-Wendro algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.2 Godunov algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1
1 THE EQUATIONS OF FLUID DYNAMICS
1 The equations of uid dynamics
The equations of uid dynamics follow from conservation of mass and momentum.
Consider a volume V inside the uid. The mass of uid in this volume is given by
_
dV ,
where is the uid density. The rate at which this mass decreases is determined by the rate at which uid
leaves the volume
d
dt
_
dV =
_
u dS ,
where u is the uid velocity and the integral on the right is taken over the surface of the volume with dS
being a surface element with direction along the outward normal. Using the divergence theorem
_
u dS =
_
u dV ,
we obtain the continuity equation

t
+ u = 0 .
Next, consider conservation of momentum

du
dt
= F ,
2
1 THE EQUATIONS OF FLUID DYNAMICS
which is just Newtons equation of motion for an element of uid with unit mass. The total derivative on
the left has two contributions
du
dt
=
u
t
+ (u )u ,
the rst term on the right represents the change in uid velocity with t at a xed point in space, and the
second advective term represents the change in uid velocity due to motion of uid from neighboring points
in space.
The force density F has three contributions:
external or body forces acting on the uid, for example the force of gravity
F
gravity
= g ,
where g is the acceleration due to gravity
pressure forces due to neighboring uid elements

_
p dS =
_
p dV ,
F
pressure
= p ,
where p is the uid pressure and the integrals are taken over the surface and volume of the element,
respectively
viscous forces due to internal friction or shearing stresses in the moving uid
F
viscous
=
2
u + ( + )( u) ,
3
2 ONE DIMENSIONAL BURGERS EQUATION
where is the dynamic viscosity coecient and is the bulk viscosity coecient of the uid.
A special case that is interesting for many applications is that of incompressible ow
= constant , u = 0 .
Taking these forces into account results in the Navier-Stokes equations for incompressible viscous ow:
u
t
+ u u = g
1

p +
2
u ,
where = / is the kinematic viscosity.
2 One Dimensional Burgers Equation
J.M. Burgers, Adv. Appl. Mech. 1, 171 (1948), introduced Burgers equation
u
t
+ u
u
x
=

2
u
x
2
,
as a simple model of shock propagation.
This is basically a Navier-Stokes equation in one dimension without a pressure term. The convective term
on the left is nonlinear. The diusive term on the right represents the eects of viscosity.
4
2 ONE DIMENSIONAL BURGERS EQUATION
The development of a shock can be seen by letting the kinematic vicosity = 0. This gives the inviscid
Burgers equation
u
t
+ u
u
x
= 0 .
Compare this with the linear equation
u
t
+ c
u
x
= 0 ,
where c is a constant. The linear equation has the solution
u(x, t) = f(x ct) ,
where f is any dierentiable function. This solution represents a wave form with shape f(x) moving to the
right with constant speed c.
Now, in the inviscid Burgers equation, the speed c = u, i.e., the instantaneous speed of the wave form
is proportional to its amplitude u. This implies that a peak in the wave travels faster than a trough, which
implies that the wave will tend to break.
Breaking of two-dimensional surface waves is of course very familiar, see for example, Hokusais Great Wave
O Kanagawa.
In one dimension, breaking is not allowed mathematically beacuse breaking implies that the solution u(x, t)
becomes multiple valued. What actually happens is that a shock front develops: this is a moving point at
which the solution is discontinuous.
5
2 ONE DIMENSIONAL BURGERS EQUATION 2.1 Lax-Wendro algorithm
The viscous term in Burgers equation has two eects. First, it causes the wave amplitude to damp to zero
in a diusive fashion. Secondly, it prevents the development of a mathematical singularity at the shock
front: the amplitude is continuous albeit varying very rapidly through the front.
The code burgers.cpp solves Burgers equation using various algorithms.
2.1 Lax-Wendro algorithm
The Lax-Wendro algorithm is constructed in two steps. First, the time and convective derivatives are
expressed in terms of a ow function F as follows:
u
t
+ u
u
x
=
u
t
+
F
x
, F(x, t) =
1
2
u
2
(x, t) .
This is the form of a conservation equation with F representing the current of the quantity u.
Second, a Taylor series expansion in the time step of all varables is made and terms up to and including
O(
2
) are retained, e.g.,
u(x, t + ) = u(x, t) +
u
t
+

2
2

2
u
t
2
+ O(
3
) .
6
2 ONE DIMENSIONAL BURGERS EQUATION 2.2 Godunov algorithm
The resulting algorithm can be expressed as a two-step formula:
u

j+
1
2
=
1
2
_
u
n
j
+ u
n
j+1
_


2h
_
F
n
j+1
F
n
j
_
+

2h
2
_
1
2
_
u
n
j+1
+ u
n
j1
2u
n
j
_
+
1
2
_
u
n
j+2
+ u
n
j
2u
n
j+1
_
_
,
u
n+1
j
= u
n
j


h
_
F

j+
1
2
F

j
1
2
_
+

h
2
_
u
n
j+1
+ u
n
j1
2u
n
j
_
.
2.2 Godunov algorithm
Among the most interesting and dicult problems in computational uid dynamics is the simulation of
discontinuities like shock fronts. Simple nite dierence schemes cannot handle this type of singular behavior.
Following the work of Godunov, Mat. Sb. 47, 271 (1959), which was based on his Ph.D. thesis, many
eective shock-capturing schemes were developed for applications in astrophysics and the aerospace industry.
Godunovs algorithm is based on exact solutions to the Riemann Problem
7
2 ONE DIMENSIONAL BURGERS EQUATION 2.2 Godunov algorithm
u(x, 0)
x
A simple form of initial condition is a step function or piece-wise constant value for u(x, 0), for example
as shown in the gure. This type of initial condition denes a Riemann problem. Physically, this initial
condition represents a shock front which moves with constant speed c without changing its shape.
Even though this is such a simple problem with a simple solution, it is very dicult to simulate numerically.
The reason for this is that the derivative u/x is innite at the discontinuity: mathematically it is a delta
function.
8
2 ONE DIMENSIONAL BURGERS EQUATION 2.2 Godunov algorithm
Most nite dierence schemes assume that the solution is smooth, i.e., the derivatives are bounded, so that
a Taylor series expansion in the spatial step size h is valid.
When this assumption is violated by a discontinuity, a rst order scheme tends to smear out the discontinuity,
and including higher orders results in unstable oscillations of the solution at the position of the discontinuity.
Godunovs formula for updating u is
u
n+1
j
= u
n
j


h
_
F
j+
1
2
F
j
1
2
_
+

h
2
[u
j+1
+ u
j1
2u
j
] ,
where F
j
1
2
represents the average ux on the cells to the right and left of the lattice point j respectively.
These average ux values are computed from Riemann problems in the cells to the right and left of j using
upwind initial data
u
(+)
j
=
_
u
j
if u
j
> 0
0 otherwise
u
()
j
=
_
u
j
if u
j
< 0
0 otherwise
The solution to the Riemann problem on the left cell is
F
j
1
2
= max
_
1
2
(u
(+)
j1
)
2
,
1
2
(u
()
j
)
2
_
,
and for the cell on the right
F
j+
1
2
= max
_
1
2
_
u
(+)
j
_
2
,
1
2
_
u
()
j+1
_
2
_
.
9
REFERENCES REFERENCES
References
[Recipes-C19-5] W.H. Press, S.A. Teukolsky, W. Vetterling, and B.P. Flannery, Numerical Recipes in C,
Chapter 19 5: Relaxation Methods for Boundary Value Problems,
http://www.nrbook.com/a/bookcpdf/c19-5.pdf.
10

You might also like