75048 Mathematical modeling 1998

Conservation laws: A terse introduction

Harald Hanche-Olsen

                       hanche@math.ntnu.no

The general equation

A conservation law is the statement that some quantity is conserved (surprise). In this note, we are concerned with quantities that exist in time and space, and which can be described by a density u. We shall mostly restrict ourselves to one space dimension, so u is a function u(x, t), and the amount of (whatever) in the interval from x = a to x = b is the integral ∫_{a}^{b} u(x, t) dx. We shall further assume that there is a flux q(x, t) associated with this conserved quantity, and so we shall assume that our conservation law, in its most general form, is of the form

\frac{d}{dt} ∫_{a}^{b} u(x, t) dx + q(b, t) − q(a, t) = ∫_{a}^{b} r(x, t) dt  (1)

where r is a source term: r > 0 signifies that the quantity of interest is being produced, while r < 0 means it is consumed or disappears in some fashion. In a true conservation law, of course, r = 0.

If u and q are sufficiently smooth functions, we can move the derivative operator under the integral sign, and write q(b, t) − q(a, t) as the integral of ∂_{x}q, leading to the formula^{1}

∫_{a}^{b} (∂_{t}u(x, t) + ∂_{x}q(x, t)) dx = ∫_{a}^{b} r(x, t) dt.

If all the integrands here are continuous, then from the assumption that the above equality holds for every possible choice of a and b we must conclude

∂_{t}u + ∂_{x}q = r  (2)

1For brevity, I use ∂_{x} for ∂/∂x, etc.

where u is the conserved quantity; q is its flux; and r is a source term.

In heat conduction and diffusion problems, we may write q = −D∂_{x}u, leading to the diffusion equation (with source term) ∂_{t}u = D∂_{xx}u + r, but these equations shall not be our interest presently.

In this note, we shall consider the case when q(x, t) is a function of u(x, t) alone, i.e., q(x, t) = f(u(x, t)). Furthermore, most of the time we shall restrict our attention to the case of no source term, so the equation of interest is really going to be

∂_{t}u + ∂_{x}f(u) = 0.

Two examples

We shall use two examples to guide us.

Traffic flow. Consider a road with traffic moving in one direction. Rather than model individual cars we adopt a continuum approach, so we assume a density ρ(x, t) of cars along the road. Individual cars are assumed to keep a speed v(ρ(x, t)), where v(ρ) is a decreasing function of ρ. In fact, for simplicity, we shall use the simple model v(ρ) = v_{max}(1 − ρ/ρ_{max}). Then the flux will be ρv(ρ) = v_{max}(ρ − ρ^{2}/ρ_{max}). Clearly, it seems useful to rescale ρ using the scale ρ_{max}, so we put ρ = ρ_{max}u. By a further rescaling of x and/or t we do in fact end up with the simple equation

∂_{t}u + ∂_{x}f(u) = 0,  f(u) = u − u^{2}.  (3)

River flow. The flow in a river can to a first approximation be modeled by a simple balance between the forces of gravity and friction.

It would seem likely that the force of friction per unit length F (units N/m = kg/s^{2}) is a function of the properties of water (density ρ and kinematic viscosity ν) as well as those of the river bed (primarily the wetted perimeter B and the roughness of the riverbed – though we shall ignore the roughness, assuming it to be a constant for the river under consideration). Also, the overall velocity U of the flow should enter the calculation. We find two dimensionless combinations of F, ρ, ν, B, and U, namely F/(ρBU^{2}) and the Reynold’s number Re = UB/ν. So, by Buckingham’s π-theorem we should have a relationship F = Ψ(Re)ρBU^{2} for some function Ψ. However, from known data for pipe flow we know that the corresponding friction factor is very nearly constant for large Reynold’s numbers. This is also consistent with the reasonable assumption that F is proportional to B.^{2}

So we end up with the simple assumption F = CρBU^{2} for the friction force, where C is a constant. This should balance the forces of gravity. If the landscape and river bed slope at an angle α, we should have F = ρgA sin α, where A is the area of a cross section through the river (the wet part of it). Putting our two expressions for F equal to each other we then arrive at CBU^{2} = ρA sin α. However, we really need to get the total flow rate Q = AU, for which we get the expression

Q(A) = \sqrt{\frac{g sin α}{C}} \frac{A^{3/2}}{B^{1/2}}

where we should think of B as a function of A: The more water is in the river, the greater is B.

In fact, in the case of a very wide, shallow river we can consider B to be fairly constant, independent of A. On the other hand, if the river fills a V-shaped depression then B is proportional to A^{1/2}, which makes Q(A) proportional to A^{3/2}/A^{1/4} = A^{5/4}.

The conservation law ∂_{t}A + ∂_{x}Q(A) = 0 can, in both of these cases, be rewritten in the form

∂_{t}u + ∂_{x}f(u) = 0,  f(u) = u^{γ}  (4)

after some suitable scaling, where γ = 3/2 in the case of a wide, shallow river, and γ = 5/4 in the case of a V-shaped cross section.

The method of characteristics

Assume u is a solution to the equation

∂_{t}u + f′(u)∂_{x}u = r(u).

2At high Reynold’s numbers, the flow velocity is nearly constant across the river, and most of the friction forces act in a turbulent layer near the bottom and sides.

A characteristic curve, more briefly called a characteristic, of the solution is any solution of the ordinary differential equation

ẋ(t) = f′(u(x(t), t)).

We differentiate u(x(t), t) along such a characteristic, and find

u̇ = \frac{d}{dt}u(x(t), t) = ∂_{t}u(x(t), t) + ẋ(t)∂_{x}u(x(t), t)
= ∂_{t}u(x(t), t) + f′(u(x(t), t))∂_{x}u(x(t), t) = r(u(x(t), t))

so u(x(t), t) does in fact solve the simple ODE u̇ = r(u).

This is usually not too hard to solve, but for now we shall simplify the problem further, and assume that r = 0. Then the equation is simply u̇ = 0, so we have found that u is constant along characteristics, provided the source term is zero.

In particular, then ẋ = f′(u) is constant along the characteristic, so that the characteristic is a straight line in this case.

We can now, at least in principle, solve the initial value problem

∂_{t}u + ∂_{x}f(u) = 0,  t > 0;
u(x, 0) = u_{0}(x).

First, for every ξ we draw the characteristic starting at (x, t) = (ξ, 0). Along this characteristic u is constant, and therefore equal to u_{0}(ξ). Hence its speed is f′(u_{0}(ξ)), so its equation must be

x = ξ + tf′(u_{0}(ξ)).  (5)

In principle, then, all we need to do is to solve (5) for ξ in terms of (x, t), and write up the solution as u(x, t) = u_{0}(ξ(x, t)).

We give an example to show how this is done. This example is from traffic flow: The equation is (3), and we take the initial data

u(x, 0) = u_{0}(x) = \begin{cases}1 & x < 0; \\ 1 − x & 0 < x < 1; \\ 0 & x > 1. \end{cases}

5 Conservation laws: A terse introduction

Note that we find f′(u) = 1 − 2u in this case, so the characteristic speed is −1 for u = 1, and +1 for u = 0. Hence we find the characteristics given by x = ξ − t for ξ < 0, which means ξ = x + t when x < t; and x = ξ + t for ξ > 1, which means ξ = x − t when x > t + 1. And finally we find x = ξ + tf′(1 − ξ) = ξ + t(2ξ − 1) = (1 + 2t)ξ − t when 0 < ξ < 1, which means ξ = (x + t)/(1 + 2t) when −t < x < 1 + t. Plugging all this into u = u_{0}(ξ), we get

u(x, t) = \begin{cases}1, & x < −t; \\ \frac{1 + t − x}{1 + 2t} , & −t < x < 1 + t; \\ 0, & 1 + t < x. \end{cases}

Next, try the same problem, but with the initial data slightly different:

u(x, 0) = u_{0}(x) = \begin{cases}0 & x < 0; \\ x & 0 < x < 1; \\ 1 & x > 1. \end{cases}

For the case 0 < ξ < 1 we now find x = ξ+tf′(ξ) = ξ+t(1−2ξ) = (1−2t)ξ+t. Now, at time t = 1/2 all those characteristics meet at x = 1/2, and it seems that our “solution” must become discontinuous! For t < 1/2 there is no problem, however, and we find

u(x, t) = \begin{cases}0, & x < t < \frac{1}{2} ; \\ \frac{x − t}{1 − 2t} , & t < x < 1 − t; \\ 1, & t − 1 < x and t < \frac{1}{2} . \end{cases}

The problem is what to do for times greater than 1/2.

Discontinuous solutions: shocks

Our experience with the traffic problem leads to a consideration of discontinuous solutions of a conservation law. Clearly, it is hard to make sense of a partial differential equation when the “solution” is discontinuous. But this is easily remedied: We just go back to the integral form of the equation! So we go all the way back to the form (1). Let us assume that u, q, and r are smooth except along a curve at x = s(t).

We shall assume that (1) is satisfied for all a and b; and it follows, just like before, that (2) is satisfied everywhere except at x = s(t).

We shall further assume that u, q, and s have one-sided limits at x = s(t). We shall write u^{±}(t) = u(s(t)±, t) and similarly for q and r.

Pick a < s(t) < b and split up the first term in (1):

\frac{d}{dt} ∫_{a}^{b} u(x, t) dx = \frac{d}{dt}( ∫_{a}^{s(t)} u(x, t) dx + ∫_{s(t)}^{b} u(x, t) dx)

= ṡ(t)u^{−}(t) + ∫_{a}^{s(t)} ∂_{t}u(x, t) dx
− ṡ(t)u^{+}(t) + ∫_{s(t)}^{b} ∂_{t}u(x, t) dx

= ṡ(t)u^{−}(t) + ∫_{a}^{s(t)} (r(x, t) − ∂_{x}q(x, t)) dx
− ṡ(t)u^{+}(t) + ∫_{s(t)}^{b} (r(x, t) − ∂_{x}q(x, t)) dx
= −ṡ(t)(u^{+}(t) − u^{−}(t)) + (q^{+}(t) − q^{−}(t))
− q(b, t) + q(a, t) + ∫_{a}^{b} r(x, t) dx

Now substitute this into (1) and conclude

q^{+}(t) − q^{−}(t) = ṡ(t)(u^{+}(t) − u^{−}(t).

This is known as the Rankine-Hugoniot shock condition. In the special case of q = f(u) it takes the form

f(u^{+}) − f(u^{−}) = ṡ · (u^{+} − u^{−})

We can now finish the solution of the initial value problem we left behind on page 5: At time t = 1/2, the solution has become

u(x, \frac{1}{2} ) = \begin{cases}0, & x < \frac{1}{2} ; \\ 1, & x > \frac{1}{2} ; \end{cases}

so we look for a shock with u^{+} = 1 and u^{−} = 0. The Rankine-Hugoniot condition becomes ṡ · (1 − 0) = f(1) − f(0) = 0, so ṡ = 0, and we have a stationary shock, and the solution is independent of t for t ≥ \frac{1}{2} .

More generally, the Rankine-Hugoniot condition for the traffic problem can be written ṡ · (u^{+} − u^{−}) = u^{+} − (u^{+})^{2} − u^{−} − (u^{−})^{2} = (u^{+} − u^{−})(1 − (u^{+} +u^{−})), leading to ṡ = 1−(u^{+} +u^{−}). This is a special case of the general formula ṡ = \frac{1}{2} (f′(u^{+}) + f′(u^{−})) valid for any quadratic flux function f.

Unphysical shocks; rarefactions

Let us consider the traffic problem again. For any choice of u^{±} in the interval [0, 1] we can find a corresponding discontinuous solution on the form

u(x, t) \begin{cases}u^{−}, & x < ṡt; \\ u^{+}, & x > ṡt; \end{cases}

where ṡ1 = (u^{+}+u^{−}). However, if you draw the characteristics starting at t = 0 corresponding to the initial values

u(x, 0) = \begin{cases}u^{−}, & x < 0; \\ u^{+}, & x > 0; \end{cases}

you will find that whenever f′(u^{−}) < f′(u+), then the characteristics move apart rather than crossing, so it is not clear that the proper solution is a discontinuity. Instead, for every v with f′(u^{−}) < v < f′(u+), you can draw a characteristic with speed v through the origin, along which u is the constant defined by f′(u) = v. We end up, then, with the solution

u(x, t) = \begin{cases}u^{−}, & x < tf′(u^{−}); \\ the solution of f′(u) = x/t, & tf′(u^{−}) < x < tf′(u^{+}); \\ u^{+}, & tf(u^{+}) < x. \end{cases}

Because of the existence of this solution, we usually reject any shock solution with f′(u^{−}) < f′(u+) as unphysical, preferring the above solution instead. The middle (non-constant) part of the above solution is called a rarefaction wave.

Conservation laws: A terse introduction 8

For the case of waves on a river, with f(u) = u^{γ} with γ > 1, we have f′(u) = γu^{γ−1}, which is of course increasing (in other words, f is convex). Thus the condition f′(u^{−}) < f′(u+) is equivalent to u^{−} < u^{+}, meaning there is less water upstream than downstream. In this case, then, we get no shocks, but rarefaction waves instead. On the other hand, when there is more water upstream than downstream, we get a shock forming. In the real world, of course, there will not be an actual discontinuity in the water level of the river. Rather, when the gradient becomes larger, new mechanisms will enter the model. Still, it is reasonable to expect a quite sudden increase in water level downstream in response to a gradual increase upstream. This behaviour is seen in practice, and takes many people by surprise almost every time it happens.

Reference

G.B. Whitham Linear and nonlinear waves. ISBN 0471940909. Chapters 2 and 3.