Sie sind auf Seite 1von 212

UNIVERSITY OF READING

DEPARTMENT OF MATHEMATICS

VARIATIONAL PRINCIPLES AND THE FINITE


ELEMENT METHOD FOR CHANNEL FLOWS
by
S. L. WAKELIN

This thesis is submitted for the degree of


Doctor of Philosophy

OCTOBER 1993

Abstract
Hamilton's principle is used to devise a variational principle which has as its
natural conditions the equations of irrotational motion of an incompressible, homogeneous, inviscid uid with a free surface. By applying the shallow water
approximation to the ow variables this variational principle is reduced to another one whose natural conditions are the shallow water equations of motion.
Boundary terms are added to the functional of this variational principle so that
the natural conditions now include boundary and initial conditions as well as the
equations of motion. A quartet of variational principles for shallow water ows
is derived by using Legendre transforms. These principles are modi ed to give
other principles for steady shallow water ows by assuming that the ow variables
do not depend on time. Variational principles are also derived for quasi onedimensional shallow water ows | both time-dependent and time-independent
| and for steady state discontinuous ows.
Approximations to continuous and discontinuous ows in channels of varying
breadth and domain bed pro les are calculated using nite element approximations for a selection of the variational principles developed. Approximations to
steady continuous ows are calculated on xed grids using both the quasi onedimensional and the two-dimensional formulations. Methods of generating adaptive grids in one dimension using the variational principles are also studied and an
algorithm is given for generating approximations on an adaptive grid to steady
discontinuous quasi one-dimensional ows. Approximations are also found for
time-dependent quasi one-dimensional ows.
i

Acknowledgements
I would like to thank Dr. M. J. Baines and Dr. D. Porter for their help and
encouragement during the last three years, and for their good humour which has
made the time so enjoyable.
I thank my parents and grandparents for their love and for being there when
I need them. My brother and sister I thank for moral support.
I also thank my colleagues in the Mathematics department and other friends
in Reading.
I acknowledge receipt of an SERC Research Studentship.

ii

Contents
Abstract

Acknowledgements

ii

Contents

iii

1 Introduction

2 Background Fluid Dynamics

2.1 Free Surface Flows

: : : : : : : : : : : : : : : : : : : : : : : : : :

2.2 The Shallow Water Approximation

: : : : : : : : : : : : : : : : :

2.2.1 Derivation of the Shallow Water Equations


2.2.2 The Gas Dynamics Analogy

11

: : : : : : : : : : : : : : : : :

15

: : : :

16

: : : : : : : : : :

19

: : : : : : : : : : : : : : : : : : : :

20

2.4 Equations for Steady State Shallow Water Flows


2.4.2 Quasi One-dimensional Flows

: : : : : : : : : : : : : : : :

22

: : : : : : : : : : : : : : : : : : : : : :

24

: : : : : : : : : : : : : : : : : : : : : : : : :

33

2.5 The Flow Variable Graphs


2.6 Discontinuous Flows

10

: : : : : : : : :

2.3 The Quasi One-dimensional Shallow Water Approximation


2.4.1 Two-dimensional Flows

2.6.1 Discontinuous Flows in One Dimension


iii

: : : : : : : : : : :

33

2.6.2 Discontinuous Flows in Two Dimensions

: : : : : : : : : :

3 Variational Principles

43

3.1 Variational Principles for Free Surface Flows


3.1.1 Luke's Principle

: : : : : : : : : : : :

43

: : : : : : : : : : : : : : : : : : : : : : : :

44

3.1.2 Hamilton's Principle


3.2 Shallow Water Flows

: : : : : : : : : : : : : : : : : : : : :

46

: : : : : : : : : : : : : : : : : : : : : : : : :

51

3.2.1 Shallow Water Principles from Free Surface Principles

: : :

52

: : : : : : : : : : : : : : : : : : : : : :

54

: : : : : : : : : : : : : : : : : : : : : : : : :

57

3.2.2 Further Functionals


3.3 Continuous Variables

39

3.3.1 General Variational Principles forOne-dimensional Flow

: :

57

3.3.2 General Variational Principles forTwo-dimensional Flow

59

: : : : : : : : : : : : : : : : : : : : : : :

62

3.4 Discontinuous Variables

3.4.1 General Variational Principles for One-dimensional Flow

62

3.4.2 General Variational Principles for Two-dimensional Flow

64

: : : : : : : : : : : : : : : :

69

: : : : : : : : : : : : : : : : : : : : :

69

3.5 Time-dependent Shallow Water Flows


3.5.1 Boundary Conditions

3.5.2 A Quartet of Functionals

: : : : : : : : : : : : : : : : : : :

3.5.3 Constrained and Reciprocal Principles


3.6 Time-independent Shallow Water Flows

: : : : : : : : : : :

78

: : : : : : : : : : : : : :

83

3.6.1 Steady Principles from Unsteady Principles

: : : : : : : :

84

: : : : : : : : : : :

89

: : : : : : : : : : : :

92

: : : : : : : : : : : : : : : : : : : :

93

3.6.2 Constrained and Reciprocal Principles


3.7 Quasi One-dimensional Shallow WaterFlows
3.7.1 Time-dependent Flows

72

3.7.2 Constrained and Reciprocal Principles


iv

: : : : : : : : : : :

97

3.7.3 Time-independent Flows

: : : : : : : : : : : : : : : : : : :

3.7.4 Constrained and Reciprocal Principles


3.8 Discontinuous Flows

101

: : : : : : : : : : :

103

: : : : : : : : : : : : : : : : : : : : : : : : :

105

3.8.1 Two-dimensional Flows

: : : : : : : : : : : : : : : : : : : :

106

3.8.2 One-dimensional Flows

: : : : : : : : : : : : : : : : : : : :

110

4 Approximations to Quasi One-dimensional Shallow Water Flows113


4.1 The Constrained `r' Principle

: : : : : : : : : : : : : : : : : : : :

114

: : : : : : : : : : : : : : : : : : : : : : : :

116

: : : : : : : : : : : : : : : : : : : : : : : : :

125

4.1.1 The Algorithm


4.1.2 Error Bounds

4.2 The Unconstrained `r' Principle

: : : : : : : : : : : : : : : : : : :

128

: : : : : : : : : : : : : : : : : : : :

133

: : : : : : : : : : : : : : : : : : : : : : : :

133

: : : : : : : : : : : : : : : : : : : : : : : : : : : : :

137

4.3 The Constrained `p' Principle


4.3.1 The Algorithm
4.3.2 Errors

4.4 The Constrained `p' Principle | Adaptive Grid

: : : : : : : : : :

4.5 Discontinuous Flows | The Constrained `r' Principle

: : : : : : :

144

: : : : : : : : : : : : : : : : :

146

: : : : : : : : : : : : : : : : : : : : : : : :

156

4.5.1 Grid with One Moving Node


4.5.2 Adaptive Grids

138

5 Approximations to Continuous Two-dimensional Shallow Water


Flows
160
5.1 The Constrained `p' Principle

: : : : : : : : : : : : : : : : : : : :

163

5.2 The Constrained `R' Principle

: : : : : : : : : : : : : : : : : : : :

170

6 Further Applications

176

6.1 Two-dimensional Free Surface Flows


v

: : : : : : : : : : : : : : : :

177

6.1.1 The Functional

: : : : : : : : : : : : : : : : : : : : : : : :

177

6.1.2 The Algorithm

: : : : : : : : : : : : : : : : : : : : : : : :

180

6.2 Time-dependent Quasi One-dimensionalFlows

: : : : : : : : : : :

187

7 Concluding Remarks

193

References

203

vi

Chapter 1
Introduction
The problem of uid ow over an uneven topography and through constricting
channels has been of interest to hydraulic engineers and meteorologists for many
years. Variational methods have been widely used in other areas for even longer
but have only recently begun to play a signi cant part in the problems of uid
mechanics. The nite element method is a relatively recent technique, which has
advanced the construction of approximate solutions, particularly in relation to
elliptic problems. This thesis brings together these three subjects.
More speci cally the aim of this thesis is to generate numerical approximations to the solutions of the equations governing the irrotational motion of an
homogeneous, incompressible, inviscid uid over a xed bed pro le. The method
implemented here depends on the derivation of variational principles which are
satis ed for the solutions of these equations of motion. Approximate solutions
to the equations are derived as those functions in a nite dimensional space for
which the functionals of the variational principles are stationary with respect to
variations in that space.
1

Luke (1967) showed that a variational principle in which the integrand (the
Lagrangian density) is taken to be the uid pressure, as given by Bernoulli's
energy integral, has as its natural conditions the equations governing a free surface
ow. The natural conditions of a variational principle are those which make the
corresponding functional stationary. The natural conditions of Luke's principle
are Laplace's equation, holding in the uid domain, the no ow condition across
the bed and the dynamic and kinematic free surface conditions. Luke assumes
that all of the variations vanish on the other space boundaries and at the ends of
the time interval.
Hamilton's variational principle in particle mechanics (see, for example, Goldstein (1980)) has, as the Lagrangian, the di erence between the kinetic and potential energies of a system. The natural conditions of the variational principle are
Lagrange's equations of motion. Salmon (1988) considers applications of classical
Hamiltonian theory to uid mechanics. Many of these applications, such as, for
example, in Serrin (1959) and in Seliger and Whitham (1968), have been within
the area of gas dynamics. However, Miles and Salmon (1985) derived equations
describing the motion of weakly dispersive non-linear gravity waves using Hamilton's principle. In this thesis Hamilton's principle is adapted to give a principle
whose natural conditions are the equations governing a free surface ow, and this
principle can be rearranged to give Luke's principle, in the case where the variations vanish on all time and space boundaries except the free surface and the
domain bed.
There is a point of contact between free surface ows and compressible gas
ows if the shallow water approximation to free surface ows is invoked (Stoker
2

(1957)). Shallow water theory is an approximation to three-dimensional free


surface ows in circumstances where the uid depth is small compared with some
characteristic length scale of the motion, such as the radius of curvature of the
free surface. In this thesis shallow water theory at its lowest order is considered;
this is the basic theory used in hydraulics to model ows in open channels and also
gives good approximations to the motion of tides in the oceans and the breaking of
waves on shallow beaches. The ow domain over which approximations to shallow
water ows are considered here, is a channel of slowly varying breadth, so that, to
a rst approximation, the ow can be thought of as being quasi one-dimensional.
A substantial part of the thesis | Chapter 3 | is devoted to the derivation
of the variational principles corresponding to three-dimensional free surface ows
and to shallow water ows. Hamilton's principle and a modi ed version of Luke's
principle are used as the starting points of the investigation. By approximating
the variables of three-dimensional ows by their shallow water counterparts it is
possible to derive variational principles which are satis ed for solutions of the
shallow water equations of motion. It is shown that Hamilton's principle and
the modi ed version of Luke's principle are essentially the same, as are the two
variational principles for shallow water which are derived from them. Di erent
representations of the variational principle for shallow water are available, based
on the notion of a closed sequence of Legendre transforms introduced by Sewell
(1987). The variational principles for shallow water ows are enhanced by the
addition of boundary terms so that variations can be allowed which do not necessarily vanish on the boundaries. This is an important step since, in the practical
implementation of a variational principle, if the variations are to vanish on the
3

boundaries then it implies that the solution must be known there.


There is, however, an undesirable feature of these principles, that conditions
on some of the ow variables must be given at both ends of the time interval.
This problem does not arise in steady shallow water ows, which are considered
in some detail. The variational principles for these ows are deduced from the
principles for time-dependent ows.
Further variational principles are created by making the assumption that the
shallow water ow is quasi one-dimensional, yielding variational principles for
time-dependent and time-independent quasi one-dimensional ows.
A number of simpler variational principles can be derived by constraining the
variations to satisfy one or more of the natural conditions. A selection of these
constrained principles is presented, some of which t with the notion of reciprocal
variational principles.
The nal section of Chapter 3 deals with the derivation of variational principles
for steady discontinuous ows, that is, for ows which contain hydraulic jumps.
The di erential equations of shallow water ow are valid in regions of the domain
excluding the discontinuity while at the discontinuity the equations of motion
are replaced by jump conditions, which relate the values of the ow variables
on either side of the discontinuity. One of the jump conditions is used in the
formulation of the variational principles and the others are derived as natural
conditions by making an assumption about the variations in the ow variables at
the discontinuity.
The remainder of the thesis is concerned with using the variational principles
to generate approximate solutions for ows in channels. The Ritz method (see
4

Strang and Fix (1973)) can be used to obtain approximate solutions of a variational principle by expanding the variables in terms of trial functions and using
the variational principle to evaluate the parameters of the expansions. The nite
element approach is implemented by choosing the trial functions to be piecewise
polynomials, which are zero over most of the domain, these trial functions being
known as nite element basis functions. The channel ows are approximated here
by using piecewise linear basis functions, where the basis function corresponding
to a particular node of a grid is linear and continuous and non-zero only in the
elements surrounding the node, and piecewise constant basis functions, where
the basis function corresponding to a particular element is non-zero only in that
element. The basic method is then to seek the functions in a nite dimensional
space, spanned by a set of nite element basis functions, for which the functional
corresponding to a particular variational principle is stationary with respect to
variations in that space.
The parameters of the expansions are found by solving one or more sets of
equations, at least one set of which is non-linear. The non-linear equations are
solved using Newton's method.
In Chapter 4, the algorithms for approximating time-independent quasi onedimensional ows in shallow water are presented. Several versions of two particular variational principles are considered and used to generate approximations to
continuous and discontinuous ows on xed and adaptive grids. In the discontinuous case the positioning of the approximation to the discontinuity requires care.
This is because, although all of the equations governing the motion are either
implicit in the variational principle or derived as natural conditions, the jump
5

conditions are only generated as natural conditions by imposing speci c conditions on the variations. It is not clear how these conditions could be implemented
in practice and the algorithm used here is based on generating separate approximations to the continuous parts of the solution and coupling the approximations
at the discontinuity by using the jump conditions, in the process of which an
approximation to the position of the discontinuity is also found.
Chapter 5 deals with nding approximations to steady two-dimensional continuous shallow water ows, by extending the algorithms of Chapter 4.
In Chapter 6 two further applications of the variational principles are investigated. In an attempt to study the accuracy of the shallow water approximation to free surface ows a version of Luke's principle for steady state ows is
used to generate approximations in this case. Finally an algorithm to generate
approximations to time-dependent quasi one-dimensional shallow water ows is
considered.

Chapter 2
Background Fluid Dynamics
In this chapter the equations governing the three-dimensional motion of an incompressible, homogeneous uid under a free surface are given and adapted to
the various problems which will be considered later. An approximation to such a
three-dimensional motion can be devised by assuming that the uid depth is small
compared with a typical horizontal length scale of the motion. This so-called shallow water approximation generates a simpli ed set of equations by removing the
vertical motion, at lowest order. Shallow water theory is often applied in channels
and this case only will be considered.

2.1

Free Surface Flows

In this section the equations governing the motion of a uid under a free surface
are given. The uid is assumed to be incompressible and homogeneous and the
motion is assumed to be irrotational.
Let

x, y , z be cartesian coordinates, with z measured vertically upwards from

the equilibrium position of the free surface, and let

be the time. Consider the

(x,y,t)

y
D

h(x,y)

Figure 2.1: The domain of the free surface problem.

domain
, extending over a xed region
surfaces

depth and

h(x; y )

and

in the

 (x; y; t), where h

xy

plane and enclosed by the

is the known undisturbed uid

is the unknown height of the free surface above the reference level

z = 0, as shown in Figure 2.1.


In the domain
the motion is governed by the laws of conservation of
mass and momentum.

u = (u; v; w).

Let

u(x; y; z; t)

be the Eulerian velocity, where

Then the conservation of mass requires

r:u
~

= 0;

(2:1)

where the operator ~ is de ned by

r
~

Let

@ @ @
; ;
:
@x @y @z

(2:2)

 be the density of the uid, a constant by assumption, let g

be the acceler-

ation due to gravity, also assumed constant, and let p


~= p
~(x; y; z; t) be the uid
pressure. Then the conservation of momentum equation is given by

Du
Dt

rp r gz ;
~ ~

~(

(2:3)

where

D
Dt

is the derivative following the motion and is de ned by

DF
Dt

+
 @F
@t

~ F:
u:r

(2:4)

The ow is irrotational so that


~
u=r

for some

(2:5)

 = (x; y; z; t), where  is called the velocity potential.

Therefore the

conservation of mass equation for irrotational ow may be written as

r~ 2 = 0:

(2:6)

The integrated version of the conservation of momentum equation for irrotational


ow is

r r

1
p~
~ : ~  + gz = 0;
+ t +
2

where the arbitrary function of

t

(2:7)

t arising on integration has been absorbed into the

term. Equation (2.7) is called the Bernoulli equation of the ow; it represents

energy balance and determines p


~ from

.

Equations (2.1), (2.3) and (2.5) govern the motion in the domain
. Further
equation are needed at the boundaries of
.
Bernoulli's equation gives rise to the dynamic free surface condition. At the
free surface,

z = ,

the uid pressure p


~ is assumed to be a constant, set to zero

for convenience. Thus Bernoulli's equation gives


1

r r

t + ~ : ~  + g = 0
2

on

z = :

(2:8)

At boundaries of
across which there is no ow the conservation of mass
equation is replaced by a boundary condition, that is, if
9

F (x; y; z; t)

= 0 is the

equation of the boundary, at every point of this boundary the equation

DF
Dt

(2:9)

=0

must be satis ed (Lamb (1932)).


The equation of the free surface is given by

= 0. Thus the kinematic

free surface condition is

D
(z
Dt

 ) = 0;

which may be rewritten as

t + ux + vy

w=0

The equation of the xed bed is given by

on

z = :

z + h = 0.

(2:10)

This gives the condition

of zero ow through the bed as

D
(z + h) = 0;
Dt
or

uhx + vhy + w = 0

on

z = h:

(2:11)

Equation (2.9) also applies at any lateral boundary across which there is no ow.
Equations (2.1), (2.3), (2.5), (2.8), (2.10) and (2.11) constitute the set of
equations governing three-dimensional ow in an arbitrary domain
.

2.2

The Shallow Water Approximation

Shallow water theory o ers an approximation to free surface ows in circumstances where the water depth is much less than some characteristic length scale
of the motion, such as the radius of curvature of the free surface. It is essentially

10

an averaging process in which the uid motion is replaced by a representative


motion in the horizontal spatial coordinates. Each particle can be thought of as
the aggregate of all the actual uid particles lying in the same vertical line.

2.2.1

Derivation of the Shallow Water Equations

To lowest order, shallow water theory can be generated by assuming that the
uid pressure is hydrostatic (Stoker (1957)). That is,

p~(x; y; z; t) = g (

z) ;

(2:12)

where the constant surface pressure has been set to zero for convenience.
Equation (2.12) can be used to determine a vertically averaged replacement
for the pressure,

p = p(x; y; t), de ned by


p=

Z

p~ dz;

from which it follows that


1

p = gd2 ;

(2:13)

where

d(x; y; t) is the uid depth at location (x; y ) and at time t, that is d = h +  .

Equation (2.12) implies that ~ p


~ is independent of
acceleration of the water particles in the

z.

z and so, from (2:3)1;2, the

x and y directions is also independent of

Thus, if the horizontal components of velocity,

any time, they will remain independent of

u and v , are independent of z at

z throughout the motion.

Substituting

(2.12) into (2:3)3 gives the result that, in lowest order shallow water theory, the
vertical acceleration of the uid particles is zero, that is, negligible compared with

g.

It is also negligible compared with

u and v .

11

These results can be summarised

as

uz

=0

vz

w = 0:

= 0 and

(2:14)

The equations of shallow water motion are derived by substituting (2.14) into
the equations governing the three-dimensional motion | (2.1), (2.3), (2.5), (2.8),
(2.10) and (2.11).
The e ect of (2:14)3 on the irrotationality condition (2.5) is that the velocity
potential

(x; y; z; t) is replaced by the velocity potential (x; y; t) and irrotation-

ality in shallow water is represented by

v = r;
where

(2:15)

v = v(x; y; t) is the velocity of the reduced problem, such that v = (u; v ),

and the operator

is given by

r

@ @
;
:
@x @y

(2:16)

The hypothesis (2.12) implies that the rst two components of the conservation of momentum equation (2.3) can be written as

vt + (v:r) v = gr:
For irrotational ow, where

(2:17)

v satis es (2.15), there exists the identity


v:r) v =

1
2

r v :v :
(

Therefore (2.17) may be written as

vt +

1
2

r v :v
(

)=

g ;

or, alternatively, as

vt + rE = grh;
12

(2:18)

where

is an energy per unit mass, referred to as an energy for short, de ned

by

gd + v:v:

(2:19)

Equation (2.18) is the equation of conservation of momentum in shallow water.


The integrated version of (2.18) is more common in the variational principles
which follow later and, for irrotational ow, this is given by

t + E
where an arbitrary function of

gh;

(2:20)

has been absorbed into

t .

Equation (2.20) is

the Bernoulli equation for shallow water.


For the particular case where the equilibrium depth,

h, is a constant, that is,

the bed is horizontal, the conservation of momentum equation is given by

vt + rE = 0:
Integrating (2.21) with respect to

x and y
t + E

where an arbitrary function of

has been absorbed into

t

and using (2.15) yields

= 0;

(2:22)

t has again been absorbed into t .

is consistent with (2.20) for the case

gh

(2:21)

Equation (2.22)

= constant. In (2.22) the constant term

which is equivalent to moving the reference level

for potential energy in the coordinate system from

z = 0 to z = h.

The conservation of mass equation for free surface ow (2.1) may be written
as

ux + vy + wz

13

= 0:

Integrating through the uid depth at a point (x; y ) gives

Z

(u +

h
Equations (2:14)1 2 imply that

ux

vy + wz ) dz = 0:

and

vy

(2:23)

are independent of

so (2.23) may be

rewritten as
(u +

Then, substituting for

wj

and

vy ) d + [w] h = 0:

wj h

using the kinematic boundary conditions of

zero ow through the free surface and the bed, (2.10) and (2.11), (2.23) becomes

d :v + v: h + v:  + t = 0:
Using

ht  0, the conservation of mass equation for shallow water can be written

as

dt +

r:Q

= 0;

(2:24)

where

Q = dv
may be called the mass ow vector since

(2:25)

plays the part of density by analogy

with gas dynamics, as will be indicated in Section 2:2:2.


Equations (2.15), (2.18) and (2.24) are the equations of motion for shallow
water ow. The variables of the ow,

d, v , Q, E

time, t, and of the horizontal spatial coordinates


Let

and

,

x and y .

be the domain of the reduced problem, where

part of the horizontal

xy

are all functions of the

plane. Let  be the boundary of

extends over a xed

D.

Then, for consis-

tency with conservation of mass, on any impenetrable portions of the boundary


the mass ow across the boundary must be zero, that is
outward normal to the boundary.
14

Q:n = 0, where n is the

In the case of channel ow it is usual to de ne a boundary function, say

C (x; y; t), on , such that

Q:n = C
where

on ;

(2:26)

 0 on the xed sides of the channel and at the inlet and outlet parts

of the boundary

is an assigned mass ow.

Stoker (1957) uses the hydrostatic approximation (2.12) to derive the shallow
water equations and also derives the same equations by a perturbation expansion method. In this latter case the ow variables in the exact equations, (2.1),
(2.3), (2.5), (2.8), (2.10) and (2.11), are expanded in terms of a parameter which
is small when the depth of uid is much less than a typical horizontal length.
The shallow water equations are obtained by equating the lowest order terms.
The perturbation expansion method can also be used to generate higher order
approximations to free surface ows.

2.2.2

The Gas Dynamics Analogy

The fact that the equations of motion for shallow water can be written in the
same form as the equations of motion for a compressible gas ow is known as the
gas dynamics analogy (Stoker (1957)).
The irrotationality condition (2.15), the conservation of momentum equation
(2.18) and the conservation of mass equation (2.24) for shallow water can be
rearranged to give

vt + (v:r) v

15

r;
rp grh;
d
1

(2.27)
(2.28)

dt +

r: dv
(

respectively, where the pressure,

p,

0;

(2.29)

is given by (2.13). Equations (2.27)|(2.29)

may be regarded as the equations governing a two-dimensional gas ow in which

plays the part of density and the term

g h

in (2.28) is thought of as a body

force or as a heat source. For the special case where the equilibrium depth,
constant, the forcing term

h, is a

g h in (2.28) is zero and (2.28) is the usual momentum

conservation equation for gas ow. Also, in gas dynamics terminology, equation
(2.13), which de nes

as a function of the `density'

d,

is an `adiabatic' relation

(Courant and Friedrichs (1948)).


In Chapter 3 variational principles for shallow water ows are derived and
subsequently used, in Chapter 4, to generate numerical approximations to channel ows. Variational principles for compressible gas ows have been developed
previously by, for example, Bateman (1929), Sewell (1963) and Wixcey (1990).
The analogy of shallow water theory with gas dynamics provides a connection
between those principles and variational principles for shallow water.

2.3

The Quasi One-dimensional Shallow Water


Approximation

For certain ow domains the motion can be approximated by making the assumption that it is dependent on one space dimension and time only.
Consider a channel which extends over the interval [x

e ; xo] of the x-axis.

B (x)

be the breadth of the channel, de ned at each point

in [x

e ; xo].

Let

Assume

that the channel is of rectangular cross-section and that it is symmetric about

16

-5
0

10

Figure 2.2:

for

2

xe = 0; xo = 10 and B (x) = 6 + 4 x5

x-axis so that the domain, D, of the problem is given by

the

D=

(x; y ) :

x 2 [xe ; xo] ; y 2

"

#)

B (x) B (x)
;
2

Then, provided that the breadth is a slowly varying function of


quasi one-dimensional in the
Figure 2.2 shows

(2:30)

x,

x-direction, to a rst approximation.

the ow is

D for the example xe = 0; xo = 10 and B (x) = 6+4 x5

2

The equations of quasi one-dimensional shallow water motion can be derived


from the full shallow water equations of Section 2:2:1 by assuming that the ow
variables are functions of

d(x; t), 

(x; t), E

and
=

only.

E (x; t), Q

the one-dimensional mass ow and

Let the ow variables be of the form


=

Q(x; t)

and

is the velocity in the

v (x; t),

where

is

x-direction, the other

variables being depth, velocity potential and energy, as before.

Although the

same symbols are used for depth, velocity potential and energy in one and two
dimensions, the context will always make clear whether the ow being studied is
quasi one-dimensional or two-dimensional. The operator
is replaced by

@
@x .

The term

r:Q

in (2.24) is replaced by

in (2.15) and (2.18)

1 @
B @x (QB ).

Thus, the quasi one-dimensional shallow water equations of motion are given
17

by

x

irrotationality condition;

(2.31)

vt + Ex

ghx

conservation of momentum;

(2.32)

dt + (BQ)x
B

conservation of mass;

(2.33)

where the mass ow,

and the energy,

Q, is given by
Q = dv;

(2:34)

(2:35)

E , is given by
E

gd + v 2:
2

The integrated version of the conservation of momentum equation (2.32) is

t + E
where

gh;

(2:36)

 is related to v by (2.31).

Let the equilibrium depth,

h, be constant.

Then the conservation of momen-

tum equation is given by

vt + Ex = 0:
Integrating (2.37) with respect to

x gives
t + E

where an arbitrary function of

(2:37)

= 0;

has been absorbed into

(2:38)

t .

Equation (2.38) is

consistent with (2.36) when the reference level for potential energy in the vertical
is moved from

z = 0 to z = h by rede ning the velocity potential to be


 := 
18

ght:

(2:39)

The boundary conditions for quasi one-dimensional ow are given, for example, by

for known functions

Ce

at

x = xe ;

(2.40)

Co

at

x = xo;

(2.41)

Ce (t) and Co (t).

Equations (2.40) and (2.41) can be derived

from the two-dimensional shallow water boundary condition (2.26) using the fact
that there is zero ow through the channel sides and that
and

varies only with

t and is constant across the channel breadth by assumption.

Equations (2.31)|(2.33) govern the motion of quasi one-dimensional shallow


water.

Notice that the irrotationality condition (2.31) has become essentially

redundant.

2.4

Equations for Steady State Shallow Water


Flows

The equations of motion for steady state shallow water can be derived from the
time-dependent equations of Sections 2:2 and 2:3. In this section the steady state
equations are derived by assuming that all of the ow variables are independent
of time. The velocity potential

,

however, is not a physical ow variable and

cannot be assumed time-independent, although its form can be deduced using


the equations of motion.

19

2.4.1

Two-dimensional Flows

First assume that the ow variables do not vary with time, that is,
and

v(x; y).

Then

E (x; y )

and

Q = Q(x; y)

d(x; y )

by the de nitions (2.19)

and (2.25).
The steady state versions of the conservation of momentum equation (2.18)
and the conservation of mass equation (2.24) can be immediately written as

rE
r:Q

and

g h

(2.42)

0;

(2.43)

respectively. The dependence of the velocity potential on

t can be deduced using

the irrotationality condition (2.15) and the integrated conservation of momentum


equation (2.20). Di erentiating equations (2.15) and (2.20) with respect to time
gives

and

vt

rt

(2.44)

tt + Et

0;

(2.45)

respectively. By the steady state assumption


equations (2.44) and (2.45),

 0 and Et  0.

Thus, from

 satis es

rt
Therefore

vt

and

tt = 0:

(2:46)

 must be of the form


(x; y; t) = f (x; y)t + ~(x; y );

~(x; y ) is an arbitrary function and


where 
Using (2.47) to substitute for

f (x; y ) is such that

(2:47)

rf

0.

 in (2.15) gives
~
v = r;
20

(2:48)

which is the irrotationality condition for steady ow.


Similarly, the integrated conservation of momentum equation for steady ow,

f +E

gh;

(2:49)

is obtained by substituting (2.47) into (2.20). Equation (2.49) implies that the
function

must satisfy

E + gh, where

E + gh) = 0 from (2.42).

Thus,

in order to satisfy conservation of momentum, the potential must be of the form

(x; y; t) = ( E (x; y ) + gh(x; y )) t + ~(x; y);

(2:50)

~(x; y ) may be identi ed as the velocity potential for steady ow.


where 
Let the equilibrium depth

h be constant.

Then the conservation of momentum

equation for steady ow is given by

rE
This implies that the energy

0:

is in fact a constant,

(2:51)

^ say, throughout the


=E

whole domain. The integrated version (2.22) becomes

t + E^

= 0:

Thus in order to satisfy conservation of momentum, the velocity potential

(2:52)

 must

be of the form
(x; y ):
^ +
(x; y; t) = Et

(2:53)

The irrotationality condition is then

v = r

(2:54)

(x; y ) is identi ed as the velocity potential for steady ow in this case.


and 

21

The boundary condition for steady ow is given by

n:Q = C
where  is the boundary of the domain

on ;

and

C (x; y )
C

consistency with conservation of mass the function

Z


is de ned on .

For

must satisfy

C d = 0:

Equations (2.42), (2.43) and (2.48) are the equations of motion for timeindependent shallow water ows.

The equations for steady state quasi one-

dimensional ows can be derived from the corresponding time-dependent equations in a similar manner.

2.4.2

Quasi One-dimensional Flows

Following the derivation of the steady state equations in two dimensions, assume
that the ow variables are independent of time, that is,
Then

E (x)

and

Q(x)

d = d(x)

and

v = v (x).

by the de nitions (2.34) and (2.35).

Section 2:4:1, the dependence of the velocity potential on

As in

must be deduced

using the equations of motion.


Using

dt

 0 and vt  0, the steady state forms of the conservation of mo-

mentum equation and the conservation of mass equation can be written as

0 represents

gh0

(2.55)

0;

(2.56)

(BQ)

and

respectively, where

E0

the

x derivative.

22

Di erentiating with respect to

the irrotationality condition (2.31) and the

integrated conservation of momentum equation (2.36) gives

and

respectively. Thus, using

xt

(2.57)

tt + Et

(2.58)

vt  0 and Et  0, the velocity potential must satisfy


xt = 0

Therefore

vt

and

tt = 0:

 must be of the form


(x; t) = f (x)t + ~(x);

(2:59)

f 0 = 0.

~ is an arbitrary function and


where 

Thus, for steady quasi one-dimensional ow,

v = ~0:
The value of the constant function

(2:60)

in (2.59) can be deduced using the

integrated conservation of momentum equation (2.36). Substituting for  in (2.36)


using (2.59) gives

f
where

E + gh;

E + gh =constant from (2.55).

Thus

 is given by

(x; t) = ( E (x) + gh(x)) t + ~(x);


~(x) is identi ed as the velocity potential for one-dimensional steady ow.
where 
Let the equilibrium depth,

h, be constant.

Then the conservation of momen-

tum equation for steady quasi one-dimensional motion is given by

E0 = 0
23

which has the solution

^ , where E
^ is an arbitrary constant. The integrated
=E

version of the conservation of momentum equation is

t + E^

= 0:

Thus the velocity potential for this case must satisfy


(x)
^ +
(x; t) = Et

and

v = 0;
(x) is now the velocity potential for these circumstances.
where 
The boundary conditions for steady ow are given by

where

Ce

and

Co

Ce

at

x = xe ;

Co

at

x = xo;

are given constants. In order to be consistent with the conser-

vation of mass equation (2.56),

Ce

and

Co

must satisfy

Ce Be = Co Bo ;
where

Be = B (xe ) and Bo = B (xo ).

Equations (2.55), (2.56) and (2.60) are the equations of steady quasi onedimensional motion for shallow water.

2.5

The Flow Variable Graphs

In this section graphs are used to relate the ow variables | depth and velocity |
to the variations in energy and mass ow. The graphs are also used to illustrate
the notion of critical ow.
24

1
g

2E
3

3
2

v
0

Figure 2.3:

2E
3

2E

Q as a function of v

E.

Q, and energy, E , (2.34) and (2.35) can be used

The de nitions of mass ow,


to express each of the variables

for constant

Q, E , d and v

other variables. Furthermore, taking

as functions of one or more of the

Q = jQj and v = jvj, the relationships also

hold for two-dimensional ows.


Rearranging the de nition of mass ow gives

Q.
v

Substituting this into

the de nition of energy and rearranging gives

Q=
The graph of the variation of

v
E
g

with

1 2
2

(2:61)

for a constant

is given in Figure 2.3.

Only the portion of the curve described by (2.61) which lies in the sector
and

Q0

v  0 is considered relevant since the motion is assumed to be always in the

positive

x direction.

Notice that the velocity

has the range 0

then, from (2.61), the mass ow,

Q,

v

2E . If

exceeded

2E

would be negative. This would contradict

the assumption of positive ow and correspond to a non-physical negative depth

25

as can be seen directly from (2.35). The value

vL =

2E

is known as the limit velocity and is the maximum velocity attainable by a ow


with energy

E.

Notice also that, for each

E , the mass ow lies in the range 0  Q  g1

The value

 2E  32

Q =
g
of

 2E  32
3

(2:62)

is known as the critical mass ow. The value of the velocity at which the

critical mass ow occurs is the critical velocity and is given by

c =

2E
3

(2:63)

A ow is termed subcritical or supercritical depending on whether

v is less than

or greater than the critical velocity.

A similar graph is constructed by substituting


(2.35), to give an expression relating

Q, E and d.

with

portion of the line shown is such that

into the de nition of

gd)) 2 d:
for a xed

(2:64)

is given in Figure 2.4. The

Q  0 and d  0, the remainder of the line

having no physical meaning.


As in Figure 2.3, the mass ow in Figure 2.4 lies in the range 0
The depth of ow is always in the range 0
(2.64),

Q is unde ned.

E,

This may be rearranged to give

Q = (2 (E
The graph of the variation of

v = Qd

 d  Eg .

The value

E
dL =
g
26

If

 Q  g1

exceeds

E
g

 2E  32
3

then, from

Q
1
g

2E
3

3
2

2E
3g

Figure 2.4:

E
g

Q as a function of d for constant E .

is known as the limit depth and is the maximum attainable depth for a ow with
energy

E.

The value of the depth which corresponds to the critical mass ow

Q,

de ned by (2.62), is called the critical depth and is given by


2E
d =
:
3g

(2:65)

The critical values of depth and velocity satisfy the relationship

gd =

2E
3

c2:

In fact, a ow is said to be critical if the velocity,

(2:66)

v, and the depth, d, satisfy

v = gd:

(2:67)

Substituting (2.67) into (2.35) yields the de nitions of critical velocity and critical
depth, as given by (2.63) and (2.65).
From (2.35) a depth in the range

d

 d  dL corresponds to a subcritical

ow; otherwise, if the depth lies in the range 0

 d  d, the ow is supercritical.

From Figures 2.3 and 2.4, when the mass ow,

Q,

has attained its critical

value there is only one possible depth and one velocity | those which correspond
27

to critical ow. If
and

Q is in the range 0  Q < Q there are two possible values of v

d | one corresponding to a supercritical ow and one to a subcritical ow.

In the case of steady quasi one-dimensional shallow water motion the ow


variable graphs, Figures 2.3 and 2.4, can be used to deduce information about
the variations of depth and velocity in a channel of slowly varying breadth.
The equations of motion for steady quasi one-dimensional ow are given by

E0

gh0 ;

0;

(BQ)

which are equations (2.55) and (2.56), that is, conservation of momentum and
conservation of mass. These equations may be integrated to give

E
and

^ and
where E
Thus, if
mass ow

gh

E^

BQ

CBe ;

are constants, to be de ned, and

Be

B (xe ).

B (x) and h(x) are given for x in [xe ; xo], the values of energy E

Q are known at each point in the interval [xe ; xo].

and

That is,

E^ + gh

(2.68)

CBe
:
B

(2.69)

Solution values for the velocity lie on the surface of which Figure 2.3 is a crosssection for constant

and for the depth lie on the surface of which Figure 2.4 is

a cross-section for constant

E.

Thus as

and

vary with

both velocity and depth can be deduced from these surfaces.

28

x,

the variations of

If the equilibrium depth of the uid is constant the energy


is also constant and the solutions of
2.4 for xed

E.

say, such that

and

given by (2.68)

d lie on the curves in Figures 2.3 and

Consider a channel whose breadth decreases to a minimum,

B (x) = Bmin

for some

x 2 (xe; xo).

An example of such a channel

is given in Figure 2.2. Moving along the channel, from the inlet at
decreases

x = xe,

increases (using (2.69)) and so, from Figure 2.3, a subcritical

increase and a supercritical


breadth has been passed,

v will decrease in value.

decreases as

Bmin

as

v will

Once the point of minimum

increases so that the subcritical

decreases and the supercritical

moving along the channel from

x = xe a subcritical d will decrease then increase

and a supercritical

will increase then decrease, in step with the increase then

decrease of mass ow
When

increases in value. Similarly, using Figure 2.4,

Q.

h0 6 0, less information about the ow can be obtained from the curves

given by (2.61) and (2.64). Consider the curve in Figure 2.3 to be a cross-section
for constant

E,

through the surface created by taking

in equation (2.61).

Q to be function of v

The solution lies on the surface and, as

in accordance with equations (2.68) and (2.69), the values that

Q
v

and

and

to be traced as

E,

and

vary

takes during

the motion can be traced on the surface. A similar surface representing


a function of

and

as de ned by equation (2.64), enables the variation of

vary during the motion. As

as

varies in response to a

changing channel breadth it is not possible, in general, to determine whether the


velocity and depth of ow will increase or decrease, since this depends also on
the change in

as determined by the variation in

29

h.

For the energy


breadth

B (x)

^ +
= E

gh,

assumed known, the mass ow in a channel of

cannot exceed the value of the critical mass ow

Q,

given by

(2.62). This bound on the maximum possible value of the mass ow imposes a
lower bound on the minimum breadth of the channel. From (2.69) the minimum
^ (x) at each point
breadth, B

x, for which a continuous ow is possible is

 1 32
0 ^
2
+
(
)
E
gh
x
CBe
A :
= CBe g @
B^ (x) =
Q

If

B (x) < B^ (x) for any x in [xe ; xo] then the ow becomes blocked.

for all

If

B (x) > B^ (x)

x in [xe ; xo] then the ow remains wholly subcritical or wholly supercritical

throughout the channel. If

B (x) = B^ (x) at a particular point in [xe ; xo] then the

ow is critical at that point and there is the possibility of transitional ow.


It can be shown, using (2.68) and (2.69), that a ow with constant energy
may be critical at a point,
with respect to

xc

say, only if the breadth at that point is stationary

x, that is B 0 (xc ) = 0.

Using the de nition of mass ow (2.34) and

the conservation of mass equation (2.33) it is possible to obtain an expression for

v0

in terms of

d0

and

v.

This is given by

v0 =
Using (2.35) to substitute for

B0
v
B

d0
v:
d

(2:70)

in (2.68) and di erentiating with respect to

gives

gd0 + vv 0 = gh0 :
Then substituting for

v 0 , using (2.70), and rearranging yields


gd0

v2
gd

!
=

30

B0
gh0 + v 2:
B

(2:71)

Equation (2.71) implies that when a ow is critical, that is, equation (2.67) is
satis ed, the breadth and equilibrium depth must be such that

B0
gh0 + v 2 = 0:
B
Thus for a domain with
Conversely, if
is critical or

h0

d0

h0  0 critical ow occurs only at a point where B 0 = 0.

= 0 and

B0

= 0 at a point then either

v2

gd

and the ow

= 0, that is, the uid depth has reached either a minimum or a

maximum at that point. For a domain where

h0

6 0 equation (2.71) provides

less information; for example, it is not possible in general to determine without


knowing the solution in advance where stationary points of the solution might lie
or whether, given appropriate conditions, the ow becomes critical.

One further ow variable graph is considered here. This involves a quantity


which is of particular use when considering discontinuous motions, namely, the
ow stress

P.

The reason for this utility is that the value of ow stress varies con-

tinuously even when the ow variables are discontinuous (in the sense of hydraulic
jumps) | as is described in Section 2:6. The ow stress is de ned by

for quasi one-dimensional ow, where


de nition of energy

p + dv 2

(2:72)

p is the pressure given by (2.13).

E , (2.35), to substitute for d = g1 E

gives

1
2g

1 2
2



1 2
2v

and

and rearranging

E + v2 :

(2:73)

Equation (2.73) can be used to draw a ow variable graph of

Using the

as a function of

v , but a more interesting relationship is that between P , Q and E .


31

Q*

Figure 2.5:

as a function of

Q for constant E .

The ow variable graph in Figure 2.5 is created by regarding

v as a parameter

in equations (2.61) and (2.73). In practice it is plotted by taking, for each xed

E , 2n

1 values of

in the permitted range, that is,

vi

vi

Then the 2n

i 1 2E
n 10 3
i n @p
2E
n 1

i = n + 1; . . . ; 2n

1:

1 points (Q

i ; Pi ), given by

Qi
Pi
for

i = 1; . . . ; n;

s 1 s
2E
A + 2E

i = 1; . . . ; 2n

vi 
E
g
1

vi ;

1 2
2

vi

1, trace the curve for

2g

1 2



3 2

E + vi ;
2

as a function of

for

xed. The

cusp of the graph in Figure 2.5 is at the critical point, for each value of

E,

and

marks the division between the subcritical (upper) branch and the supercritical
(lower) branch of each curve.
The connection with discontinuous ow is discussed in Section 2:6.

32

2.6

Discontinuous Flows

This chapter has, so far, dealt with the equations of motion for continuous ows.
In this section equations of motion for discontinuous ows in shallow water are
considered.
It is possible to control the depth and velocity, and therefore also the mass
ow and energy, of a ow at the inlet and outlet positions of a channel using, for
example, weirs or sluice gates. Thus a situation might occur where the imposed
inlet and outlet conditions cannot be achieved by a continuous ow in the channel.
In such circumstances a discontinuity may occur.
The di erential equations of Sections 2:2, 2:3 and 2:4, which model the ow in
shallow water, are only valid for continuous solutions. At points of discontinuity
the di erential equations no longer apply and other equations are needed to govern
the motion. These equations, known as jump conditions, relate the values of the
ow variables on one side of the discontinuity to their values on the other side.
In this thesis only time-independent discontinuous ows are considered, the
stationary discontinuity being known as a hydraulic jump. The jump conditions
for quasi one-dimensional and two-dimensional ows are given in Sections 2:6:1
and 2:6:2.

2.6.1

Discontinuous Flows in One Dimension

In quasi one-dimensional motion a hydraulic jump consists of a point (a value of

x) where the depth and velocity of the shallow water ow are discontinuous.
Consider the channel which extends over the interval [x

e ; xo]

and has slowly varying breadth

B (x).

Let
33

xs

of the

x-axis

2 (xe; xo) be the position of the

hydraulic jump. Then the equations of motion for continuous ow hold in the
two intervals (x

e ; xs )

and (x

s ; xo).

e ; xs ) [ (xs ; xo)

Thus in (x

the ow variables

satisfy

E0

gh0

conservation of momentum;

(2.74)

conservation of mass;

(2.75)

(BQ)

where

Q and E

are de ned by (2.34) and (2.35), as before.

At the position of the hydraulic jump,

xs, the ow variables must satisfy the

jump conditions which are alternative statements of conservation of mass and


momentum, valid at a discontinuity. The jump conditions are given by

[P ]

(2.76)

[BQ]

0;

(2.77)

xs
xs

and

from Stoker (1957), where


[

 ]x

is the ow stress de ned by (2.72). The brackets

denote the jump in the value of the quantity at the point

example, [P ]

xs

side of

xs .

P jxs+

P j xs

, where + denotes the

xo

side of

xs.
xs

That is, for

and

the

xe

The third jump condition is given by

[E ]

xs

which states that the energy

6= 0;

is not conserved at a jump.

possibility that there is an energy source at

xs

Discounting the

gives the inequality

[E ]

xs < 0;

(2:78)

which is justi ed by the fact that, in reality, mechanical energy may be converted
into heat energy through turbulence at the jump.

34

Equations (2.74)|(2.78) govern the motion of a quasi one-dimensional shallow water ow with a discontinuity at the point

xs .

In certain cases the jump

conditions (2.76)|(2.78) can be used to uniquely determine the position of the


hydraulic jump. This may be illustrated using the graph in Figure 2.5 which
relates ow stress, mass ow and energy.
The usefulness of the ow variable graph lies in the fact that equations (2.74)
and (2.75) can be solved for

and

Q,

given a particular domain. Applying the

jump conditions (2.77) and (2.78) to the solutions of (2.74) and (2.75) gives the
variations of

Q and E

throughout the channel, as follows.

Using equations (2.75) and (2.77) gives the variation of

Q(x) =

CBe
B (x)

Q in the channel as

x 2 [xe ; xo] :

(2:79)

From equation (2.74)

E (x)
Assuming that [h]

xs

gh(x) =

x 2 (xe ; xs ) [ (xs ; xo):

constant

= 0 equation (2.78) gives

[E

gh]xs < 0:

Thus let

and

where

Ee

and

Eo

gh

Ee

x 2 [xe ; xs )

gh

Eo

x 2 (xs ; xo] ;

are constants such that

Ee > Eo .

In Figure 2.6, which shows the variation of


of

E , let E1 = Ee + gh(xs ) and E2 = Eo + gh(xs ).


35

with

for two distinct values

Then the point of intersection,

P
E=E1

E=E2

Ps

Qs
Figure 2.6:
where

Ps

and

as a function of

Qs ,

Q for two distinct values of E .

is the point of discontinuity of a ow with energy

E = Ee + gh(xe ) at inlet and energy E

Eo + gh(xo ) at outlet.

Notice that the

point of intersection occurs on the supercritical branch of the line corresponding


to

E1

and on the subcritical branch of the line corresponding to

E2 .

The jump

condition (2.78) ensures that this is always true, that is, the ow on the inlet side
of a discontinuity is always supercritical and the ow immediately on the other
side of the discontinuity is always subcritical.
Let the undisturbed uid depth,
determined by

h, be constant.

Ee + gh at inlet and E

the curves corresponding to


particular, given just

Ee

E1

and

Eo ,

Ee + gh

Then the discontinuous ow,

Eo + gh at outlet, can be traced on

and

E2

Eo + gh

in Figure 2.6. In

the mass ow at the discontinuity,

Qs,

can be

deduced. In this way the position of the discontinuity in the interval [x

e ; xo] may

be found. From (2.79) the position of the discontinuity,

B (xs ) =
and, since the breadth function

CBe
Qs

xs, satis es
(2:80)

B (x) is known, the value of xs can be calculated.


36

There are three possible situations arising.

1.

xs

in (x

e ; xo) is uniquely determined by inverting equation (2.80).

2. There is no value of

x in (xe ; xo) which satis es (2.80).

3. There is more than one value of

x in (xe ; xo) which satis es (2.80).

Case 1 yields the position of the hydraulic jump. In Case 2 there is no solution
containing a hydraulic jump to the problem with

Eo + gh

Ee

gh

at inlet and

at outlet. In Case 3 there is more than one point in the channel

which satis es the jump conditions (2.76)|(2.78).

To avoid the possibility of

ambiguity conditions are sought under which Case 3 does not occur.
A unique solution could be achieved by de ning
invertible on (x

e ; xo).

so that (2.80) is uniquely

For the purpose of seeking numerical approximations to

discontinuous ows in this thesis converging/diverging channels, similar to that of


Figure 2.2, are used with boundary conditions which cause the ow to be critical
at the point of minimum breadth | the channel throat. In this circumstance
there may still be two distinct points in the channel,
and

x2

x1

and

x2

say, such that

x1

satisfy (2.80). The shape of the channel ensures that one of these points

lies on the inlet side of the channel throat and the other on the outlet side. The
condition that the ow is critical at the channel throat forces the discontinuity
to lie in the diverging section of the channel. Otherwise, because of condition
(2.78), the ow would become blocked.
The ow path for this type of discontinuous critical ow is shown by arrows
in Figure 2.7. At inlet the mass ow is given by
ow the solution moves along the

E1

Qe.

For an initially subcritical

curve, in the direction shown, as far as the

37

P
E=E1

E=E2

Qe Qo

Figure 2.7: Flow path for a discontinuous critical ow.


critical point where

Q.

The ow must become supercritical here for the

discontinuity to occur so the solution tracks along the supercritical branch until
it reaches the position of the discontinuity. The solution point then switches to
the subcritical branch of the

Qo

E2

curve until the mass ow equals the mass ow

at the outlet of the channel.


For the example with constant undisturbed uid depth Figure 2.7 can be used

to de ne a range of possible outlet conditions, given an inlet condition for the


ow. For the case of a critical ow a hydraulic jump may occur anywhere in the
range (^
x; x ), where x^ is the position of the channel throat. Let

of the ow at inlet and let

E2

curve. This requires

The value

E2

be the energy

be the energy at outlet. A discontinuity at the

channel throat requires that the curves for

E1

E1

E1

E1 and E2

intersect at the cusp of the

so that the discontinuity is of zero strength.

E = E1 is the maximum energy at outlet that a discontinuous ow can

achieve. The minimum value of


lies right at the channel outlet.

at outlet is obtained when the discontinuity

In Figure 2.7 let the curve corresponding to

38

depth

jump near throat

jump near outlet

distance along channel


Figure 2.8: Range of possible outlet depths.

E2

intersect with the curve corresponding to

Then the energy

E = E2

E1

at the point

Q = Qo .

is the minimum energy at outlet which can be achieved

by a discontinuous ow. From (2.64), using the fact that the depth at outlet is
subcritical, the minimum and maximum values of

E give minimum and maximum

achievable outlet depths. Figure 2.8 shows an example of minimum and maximum
outlet depths for the channel shown in Figure 2.2.
Some similar properties can be deduced for speci c domains with non-constant
equilibrium depths. Results are particular to each case since the solutions no
longer lie on the lines of constant energy

E.

Discontinuous motions in such

domains are not considered in this thesis.

2.6.2

Discontinuous Flows in Two Dimensions

In two dimensions a hydraulic jump is a curve in the

xy

plane which marks a

discontinuity in the depth and velocity of the ow. Although hydraulic jumps
which terminate in mid-channel do exist, for example in supercritical ow at a

39

concave bend, only hydraulic jumps which extend across the whole width of the
channel are studied here.
Consider a steady discontinuous shallow water ow in a channel

D.

Let  be

the line where the velocity and depth of ow are discontinuous, that is, the hydraulic jump. Then, in

rE
r:Q

Dns , the ow variables satisfy the di erential equations

=
=
=

r
g rh
0

irrotationality;

(2.81)

conservation of momentum;

(2.82)

conservation of mass;

(2.83)

where the energy and mass ow are de ned by (2.19) and (2.25), as before.

At the curve  the ow variables are related by the two-dimensional jump


conditions. Let

n be the unit normal vector to the line s and let 

be the unit

tangential vector. Then the jump conditions


[P ]

0;

(2.84)

Q:n]s

0;

(2.85)

v: ]s

0;

(2.86)

[E ]

<

0;

(2.87)

may be deduced from Chadwick (1976), where

is the two-dimensional ow

stress given by

P
p

p + d (v:n)2 ;

being the pressure de ned by (2.13). The symbol [

(2:88)

 ]

denotes the change in

the value of the quantity on crossing the line  , that is, for example [P ]

P js+

P j s

, where + denotes the downstream side of the discontinuity and

denotes the upstream side.


40

D
y
x

De

Do
s

y
x

Figure 2.9: Domain for two-dimensional discontinuous ows.


The rst three of these conditions (2.84){(2.86) state that the value of the

ow stress, the component of mass ow normal to 

velocity tangential to 

and the component of

are conserved on crossing the jump. Equations (2.84)

and (2.85) are the two-dimensional counterparts of the one-dimensional jump


conditions (2.76) and (2.77). Equation (2.86) is a `no shear' condition.
The nal jump condition (2.87), the two-dimensional counterpart of (2.78),
states that the energy

Consider the domain


Let
of

is not conserved on crossing the hydraulic jump.

D divided into two parts by the curve s , as in Figure 2.9.

De be the subdomain of D on the inlet side of s and let Do be the subdomain

on the outlet side. Then the equation of conservation of momentum in

is satis ed by

Ee + gh;

41

De

where

Ee

is a constant.

The equation of conservation of momentum in

Do

is

satis ed by

E
where

Eo

is a constant such that

Eo + gh;

Eo < Ee .

As in the one-dimensional case the ow is supercritical before the hydraulic


jump, that is in

De, and subcritical after the hydraulic jump, that is in Do.

42

Chapter 3
Variational Principles
The purpose of this chapter is to present a collection of functionals which are
stationary for solutions of the equations of motion for free surface ows, particularly those ows approximated using shallow water theory. The chapter starts by
establishing variational principles for three-dimensional free surface ows which
are then used to derive principles for shallow water ows. Time-dependent and
time-independent motions are considered as is quasi one-dimensional shallow water ow. In the nal section variational principles corresponding to discontinuous
shallow water ows are derived for the time-independent case.

3.1

Variational Principles for Free Surface


Flows

In this section the equations of irrotational motion of an inviscid, incompressible,


homogeneous uid with a free surface are shown to be the natural conditions of
two variational principles which, although derived from di erent viewpoints, are,
43

in fact, closely related.


Let x; y; z be cartesian coordinates, de ned as in Chapter 2, and let t be the
time. Let
= D  (

h;  ) be the spatial domain to be considered, where D

is a

xed region of the xy plane, h is the undisturbed uid depth and  is the height
of the free surface above the equilibrium position, as shown in Figure 2:1.
3.1.1

Luke's Principle

The Bernoulli equation (2.7) for free surface ows gives an expression for the uid
pressure p~ as a function of the velocity potential , that is,


p~ =  t


1
~
~
+ gz + 2 r:r ;

(3:1)

~ is de ned by (2.2).
where r
Luke (1967) uses the expression (3.1), for p~, as the Lagrangian density (the
integrand of the Lagrangian) in a variational principle. Luke's principle was
stated for a constant equilibrium depth but can be generalised to allow for a
non-constant depth and, for the given three-dimensional domain
, the modi ed
variational principle is
J~1 (; ) = 

Z t2 Z Z Z 
t1

 t



1
~
~
+ gz + 2 r:r dz dx dy dt = 0: (3:2)

Let the variations in  and  be such that  = 0 and  = 0 on the lateral


boundaries of
(that is, on the boundary of

for all

2[

h;  ])

for each

constant t 2 [t1; t2 ] and at the times t1 and t2 everywhere in


. Then, using the
First Mean Value Theorem for De nite Integrals (Johnson and Reiss (1982)) to
identify the  contribution,
44

J~1 =

Z t2 Z Z (
t1

( ( + 
Z





1
~
~
 + gz + r:r
2
=
+    ))j = ( (
t

x x

hx + y hy + z ))jz=

~ 2 dz dx dy dt = 0;
r

which yields the natural conditions

r~ 2 = 0 in
;

(3.3)

1r
~ ~
2 :r = 0 on z = ;
+    = 0 on z = ;

t + gz +
t + xx

xhx + y hy + z

= 0 on z =

h;

(3.4)
(3.5)
(3.6)

for t 2 (t1; t2 ). Equation (3.3) is the equation of conservation of mass for irrotational ow, that is, (2.6). Equations (3.4)|(3.6) are equivalent to (2.8), (2.10)
and (2.11), where the irrotationality condition (2.5) has been assumed, and are
therefore the dynamic free surface condition, the kinematic free surface condition
and the condition of zero ow through the bed, respectively. Thus the variational
principle (3.2) generates the governing equations of a free surface ow. No attempt is made at this stage to include boundary or initial conditions as natural
conditions.
Notice that using (3.1) to de ne the pressure in terms of the velocity potential
assumes conservation of momentum and that the ow is irrotational. In other
words, irrotationality and conservation of momentum, in the form of the energy
integral (3.1), are implicit constraints of the free variational principle (3.2), by
which is meant that they do not have to be applied as explicit constraints on
(3.2) nor do they belong to the set of natural conditions of (3.2).
Luke's principle can be extended to deliver irrotationality as a natural condi45

tion. The revised variational principle which achieves this is




Z t2 Z Z Z  
t1

 t



1
+ gz + 2 u:u + Q~ : u



r~ 

dz dx dy dt

= 0; (3:7)

where Q~ = (Q~ 1; Q~ 2; Q~ 3) is a Lagrange multiplier and u = (u; v; w) is the uid


velocity. The functional in (3.7) depends on , , u and Q~ . The natural conditions
of (3.7) are

9
r~ :Q~ = 0 >>>>>>>>
=
~Q = u >
>
>
>
>
>
>
~
;
u = r >


1
2

 t + gz + u:u

in
;


r~ 

+ Q~ : u

t + Q~ 1 x + Q~ 2 y

Q~ 3

Q~ 1hx + Q~ 2hy + Q~ 3

(3:8)

= 0 on z = ;

(3.9)

= 0 on z = ;

(3.10)

= 0 on z =

(3.11)

h;

for t 2 (t1; t2), obtained using the same method by which (3.3)|(3.6) were derived
from (3.2). Equations (3.8) together are equivalent to (3.3); the multiplier Q~ is
identi ed by (3:8)2 as the three-dimensional mass ow vector. Using (3:8)2 and
(3:8)3, (3.9)|(3.11) can be recognised as the dynamic free surface condition, the
kinematic free surface condition and the condition of no ow through the bed,
respectively.
3.1.2

Hamilton's Principle

Hamilton's principle, in its classical form, is given by




where the Lagrangian L = T

Z t2
t1

V, T

L dt

= 0;

(3:12)

and V respectively denoting the kinetic and

potential energies of the mechanical system being considered. Thus, if the i th


46

particle of an n-particle system has mass m and position x (t) at a time t,


i

T
V

= 12

n
X
i=1

mi x_ i :x_ i;

= V (x1; . . . ; x ) is a given function and therefore L = L(x1; . . . ; x ; x_ 1; . . . ; x_ ).


n

The principle (3.12) produces the usual Lagrange equations of motion.


A direct application of Hamilton's principle to uid ow requires the use of
Lagrangian coordinates, in which the position of a uid particle at time t is
denoted by x = x(X; t), where X is the initial location of that particle. The
label X e ectively replaces the label i in the point mass system above, and the
summation is correspondingly replaced by an integration over the domain initially
occupied by the uid.
For compressible ows, Seliger and Whitham (1968) have shown that this way
of applying Hamilton's principle to a continuum is correct, in that it produces
the momentum balance equations in Lagrangian form.
From a practical point of view, the Eulerian framework is more useful than
the Lagrangian system. Salmon (1988) discusses the translation of Hamilton's
principle from one framework to the other. Here, a direct way of using Hamilton's
principle in the Eulerian context is sought. The key point is that conservation
of mass is implicit in the Lagrangian setting because integration is carried out
over all the mass in the system. In Eulerian coordinates, however, where the
ow through a domain xed in space (by lateral boundaries and the bed for free
surface ows) is considered, conservation of mass is not automatic and must be
enforced. One way of doing this is to apply conservation of mass constraints to
the continuum version of the variational principle (3.12).
For the free surface problem, the di erence in kinetic energy and potential
47

energy for the ow in the given domain is


Z Z Z  1
D

2 u:u

gz dz dx dy:

(3:13)

The functional (3.13) is evidently the Lagrangian L in this case. Luke (1967)
refers to this form of the Lagrangian and mentions that the di erence between
his variational principle and Hamilton's principle is related to conservation of
mass.
The variational principle for free surface ow, based on Hamilton's principle,
uses (3.13) as the Lagrangian, subject to the constraint that conservation of mass
is satis ed. The constraint may be incorporated into the functional by using
Lagrange multipliers.
~ :u = 0 (equation
In the xed domain
conservation of mass is given by r
(2.1)). The kinematic free surface condition in the form
( + u + v
t

w)jz=

= 0;

(3:14)

guarantees that there is no ow across the free surface and the condition of no
ow through the bed is
(uh + vh + w)j = = 0:
x

(3:15)

These conditions must also be enforced in the variational principle being constructed.
The conservation of mass requirements are met by adding (2.1), (3.14) and
(3.15) into the functional as constraints using the Lagrange multipliers
 (x; y; z; t), 

= (x; y; t) and  = (x; y; t). The extra terms to be added to

the functional (3.13) are

 ~ :u;

48

integrated over
and (t1; t2 ), and
w)jz= +  (uhx + vhy + w)jz=

 (t + ux + vy

integrated over

and (t1; t2 ). The variational principle based on Hamilton's

principle is therefore
J2(; u; ; ;  ) = 

Z t2 Z Z Z    1
t1

+  ( + u + v
t

w)jz=



~ :u dz
u:u gz +  r
2


+  (uh + vh + w)j =
x

(3.16)
o

dx dy dt

= 0:

As in the case of Luke's principle (3.2) the variations are assumed to vanish on
the lateral space boundaries and on the time boundaries. The natural conditions
of (3.16) are given by

>
>
~ = 0 >
=
u r

in
;

r~ :u = 0 >>>;

t

~ : (u)
+r

1

(3:17)

~
2 u:u gz  r:u = 0 on z = ;
 + u + v w = 0 on z = ;
t

(
(

)

r~ (z

(3.19)

= 0 on z = ;

(3.20)

uhx + vhy + w

= 0 on z =

h;

(3.21)

r~ (z + h)

= 0 on z =

h;

(3.22)

)

)

(3.18)

for t 2 (t1; t2). The uid is homogeneous by hypothesis. Therefore, identifying





as the velocity potential, equations (3.17)|(3.22) together are equivalent to

(3.8)|(3.11) and hence to (3.3)| (3.6). For consistency of notation the Lagrange
multiplier  is relabelled as  = , so that (3:17)1 gives the usual irrotationality
condition (2.5). Then, using (3.20) and (3.22), the Lagrange multipliers  and 
may be identi ed as  = j = and  = j = .
z

49

Equation (3.16), with ,  and  as de ned above, can be shown to be the


same as equation (3.7), except for terms on the lateral boundary of
and at
times t1 and t2. The variational principle (3.16), with ,  and  as stated, can
be rearranged to give


Z t2 Z Z Z  
t1

( ( + u
t




1
~
~
r: (u) dz
gz + u:u + u: r u
2

o
+ v w))j = ( (uh + vh + w))j = dx dy dt = 0:
y

Using the divergence theorem,


I

where

Z t2 Z Z Z 
t1

t1

is the whole boundary of


. The parts of

surfaces z =  and z =
Z t2 Z Z 
t1

Z t2 Z Z

 ~ : (u) dz dx dy dt =

h, which contribute to I
w))jz=

( (u + v
x

u:n d dt;

of interest here are the

the terms

( (uh + vh + w))j =


x


h

dx dy dt:

It follows that if  denotes the lateral boundary of


and Q~ is de ned by (3:8)2
then (3.16) becomes


Z t2 Z Z Z  




1
~
~
  + gz + u:u + Q: u r dz dx dy
2
1
)

2
ZZ
Z Z Z
+ u:n d dt +
 dz dx dy = 0;

t1

which is just (3.7) with added boundary terms. The variations are assumed to
vanish on  and at times

t1

and

t2

so the boundary terms may be neglected.

Moreover, if (3.16) is constrained to satisfy the irrotationality condition by sub~  into the integrand, the resulting principle can be shown to
stituting u = r
be the same as Luke's principle (3.2), to within boundary terms which may be
neglected, as before.
50

Thus Hamilton's principle can be adapted to give (3.16) which, on relabelling




=  and using (3.20) and (3.22) to identify the Lagrange multipliers  and ,

has as its natural conditions the irrotationality condition and the conservation of
mass equation in the domain
and boundary conditions on the free surface and
the bed.
The adaptation of Hamilton's principle to uid ow is given by Seliger and
Whitham (1968) for compressible ows. In that case the conservation of mass and
two other constraints on the principle are necessary, the other constraints being
related to energy balance, in the form of entropy conservation for a particle, and
conservation of particle identities. In the current problem of irrotational free
surface ows, the entropy does not appear and conservation of particle labels is
apparently not required.

3.2

Shallow Water Flows

Variational principles for shallow water ows can be considered from two points
of view. The principles in Section 3.1 for free surface ows can be modi ed, by
applying the shallow water approximation to the variables, or Hamilton's principle
can be applied directly to the variables of shallow water theory, using the gas
dynamics analogy of Section 2.2.2. This section deals with the rst method.

51

3.2.1

Shallow Water Principles from Free Surface Principles

Consider the two variational principles for free surface ows { the `pressure' principle (3.7) and the `Hamilton' principle (3.16). The e ect of applying the shallow
water approximation to these principles is to replace the variables by their twodimensional counterparts. The velocity potential  = (x; y; z; t) reduces to a
function

~  is replaced by v =
= (x; y; t), u = r

r, where r is de ned

by (2.16), and the Lagrange multiplier Q~ is replaced by Q = (Q1; Q2), where


Q = Q(x; y; t).

Making these substitutions in the functional of the `pressure' principle (3.7)


and evaluating the integral over z yields the functional J1(Q; d; v; ) de ned by
J1 =

Z t2 Z Z
t1

1

2 gd

d t

+ 12 v:v + gd

gh

+ Q: (v

r)

dx dy dt;

(3:23)

where d = h +  is the total uid depth.


Assuming that variations vanish on the boundary of D and at t1 and t2 , the
natural conditions of J1 = 0 are
t + v:v + g
1
2

r

Q dv
dt +

where D^ =

D  (t1 ; t2 ).

r:Q

9
>
>
>
= 0>
>
>
>
>
>
>
>
>
=
= 0>
>
>
>
= 0>
>
>
>
>
>
>
>
>
;
= 0>

^
in D;

(3:24)

These equations are respectively the integrated con-

servation of momentum equation (2.20), the irrotationality condition (2.15), the


de nition of mass ow (2.25) and the conservation of mass equation (2.24) for
shallow water ow.
52

Now consider (3.16) { the `Hamilton' principle. Under the conditions of the
shallow water approximation the integral over z can be carried out and the terms
evaluated at z =

h and z = 

can be combined since, from (2.14), u and v take

the same values at these levels. The result is the functional J2 = J2(d; v; ) given
by
J2 =

Z t2 Z Z
t1

1


1
2
2 dv:v 2 gd + gdh +  (d + r: (dv)) dx dy dt:
t

(3:25)

Assuming that the variations vanish on the space and time boundaries, the natural
conditions of J2 = 0 are

9
>
>
>
v:v = 0 >
t + g + v:r
>
>
>
>
=
v r = 0 >
>
>
>
>
>
>
;
dt + r: (dv) = 0 >
1
2

^
in D;

(3:26)

which together are equivalent to (3.24).


Thus the `pressure' and `Hamilton' free surface principles reduce to `shallow
water' principles when the variables are approximated using shallow water theory.
By using the divergence theorem and integration by parts, the functional
(3.23) can be rearranged to give
J1 =

Z t2 Z Z
t1


Q

1 dv :v 1 gd2 + gdh +  (d + r:Q) dx dy dt


2
2
Z 2Z
ZZ
[d] 21 dx dy;
Q:n d
t

t1

t
t

that is, for Q = dv the two functionals (3.23) and (3.25) are the same, to within
boundary terms.

53

3.2.2

Further Functionals

Before considering variational principles with boundary conditions as natural conditions the `pressure' and `Hamilton' functionals for unsteady shallow water motion are rewritten in di erent variables. The variational principles with boundary
terms, generated using the modi ed functionals, can then be related to two further variational principles.
First consider (3.23), which was derived from the free surface principle based
on an expression for the pressure. As the uid is assumed homogeneous, the
density  can be set equal to unity without losing generality. As a further simpli cation of notation, the term
1
2

t + v:v + gd

gh

may be written as
t + E

gh:

This suggests the use of E as a new variable. From the de nition of E , (2.19),
we have



1
1
d=
E
2 v :v ;
g

which allows for the de nition of a new function p(v; E ) obtained by substituting
for d in the `pressure' 12 gd2 . Thus

2
1
1
p(v; E ) =
2g E 2 v:v :

(3:27)

The integrand of the functional being constructed is now


p(v; E )

d (t + E

gh) + Q: (v

54

r) ;

(3:28)

which is the integrand of (3.23) after making the substitutions outlined above. A
functional with integrand (3.28) will be referred to as a `p' functional for unsteady
shallow water ow.
The `Hamilton' functional (3.25) is rewritten similarly. The density  is taken
to be unity as before, the change of variable made is from v to Q using a rearrangement of (2.25), that is v = Q , and the function r(Q; d) is de ned to
d

be
r(Q; d) =

1 Q:Q
2 d

1 gd2 :
2

(3:29)

Making these substitutions in the integrand of (3.25) yields the expression


r(Q; d) + gdh +  (dt +

r:Q) :

(3:30)

A functional with integrand (3.30) will be referred to as an `r' functional for


unsteady shallow water ow.
The structures of the integrands of the `p' and `r' functionals are similar in
that they may both be expressed in the form
function + multiplier  conservation law:
For the `p' functional (3.28) is
p + multiplier 

conservation of
momentum

+ multiplier 

irrotationality
condition

and for the `r' functional (3.30) is


r + gdh + multiplier  conservation of mass:

These forms for the integrands of the `p' and `r' functionals suggest obvious
ways of constraining the variational principles based on these functionals. For
55

example, if a `p' variational principle is constrained to satisfy the conservation


of momentum equation, by setting E = gh

t ,

and irrotationality, by setting

v = r, the expression (3.28) becomes

p ( ; gh

t) ;

which depends on the variable  alone. Constrained variational principles are


dealt with in more detail in Sections 3.5, 3.6 and 3.7.
In Section 3.5 boundary terms will be added to the `p' and `r' functionals so
that variations which do not necessarily vanish at the space and time boundaries
are allowed. Two further functionals, whose integrands are related to (3.28) and
(3.30) by a closed quartet of Legendre transforms will also be constructed.
It is evident that there exists a number of constrained and unconstrained
variational principles related to time-dependent shallow water ows. To avoid
deriving separately the natural conditions of each variational principle a functional of the general form of the time-dependent shallow water functional can
be used to generate the natural conditions of a general shallow water variational
principle. Then the natural conditions for each di erent case can be obtained
immediately. This general variational principle, along with those for steady state
and quasi one-dimensional shallow water ows, is considered in Section 3.3. The
natural conditions of general variational principles for time-independent discontinuous ows are derived in Section 3.4.

56

3.3

Continuous Variables

In this section the natural conditions of a general form of variational principle


which includes the cases of shallow water ows are derived. All of the variables
are assumed to be continuous.
The general variational principles are referred to as being for one or two dimensions, by which it is meant that the corresponding principles for shallow
water theory are for ows in one or two space dimensions. In both cases an extra
coordinate is added to allow for time-dependent ows.
3.3.1

General Variational Principles for


One-dimensional Flow

Let the domain of integration of the problem be f(x; t) : x 2 [x0; x1]; t 2 [t0; t1]g :
In shallow water theory the x coordinate will represent a single space dimension
and t will represent the time.
Let u1(x; t); . . . ; u (x; t) be a set of functions which will subsequently be idenm

ti ed with the variables of shallow water theory. The u are assumed to be difi

ferentiable functions of x and t, since this is all the smoothness required for the
shallow water principles.
Consider a general functional of the form
I1 (u1 ; . . . ; um) =

+
where u 
ix

Z t1

@ui
@x

t0

Z t1 Z x 1
t0

x0

f (x; t; u1; . . . ; um; u1x ; . . . ; umx ; u1t ; . . . ; umt )dx dt

[g(x; t; u1; . . . ; u )]
m

and u 
it

@ui
@t

x1
x0

dt +

Z x1
x0

[h(x; t; u1; . . . ; u )] 10 dx; (3.31)


m

t
t

for i = 1; . . . ; m. Let the functions g and h be

di erentiable and f be twice di erentiable with respect to their arguments.


57

Using Taylor series and integrating by parts, the rst variation of (3.31) may
be written as
I1 =

Z t1 Z x 1 ( X
m 
t0

x0

i=1

Z t1 " X
m

t0

i=1

fu

(f )

ui t t

(g + f ) u
ui

ui x

# x1

(f )

ui x x

dt +

x0

ui dx dt

Z x1 " X
m
x0

i=1

(h + f ) u
ui

ui t

# t1

dx:

t0

Thus the natural conditions of I1 = 0 are


ui : fu
uijx

uijt

(f )

(f ) = 0

ui t t

ui x x

x 2 (x0 ; x1 ) ; t 2 (t0 ; t1 );

(3.32)

(g + f )j = 0

= 0; 1 ; t 2 (t0 ; t1);

(3.33)

(h + f )j = 0

= 0; 1 ; x 2 (x0 ; x1 );

(3.34)

ui

ui x

ui

ui t

xj

tj

for i = 1; . . . ; m. Equations (3.32) are the Euler equations of the variational


principle and equations (3.33) and (3.34) are natural boundary conditions.
The functions u (x; t) which cause the functional (3.31) to be stationary
i

with respect to variations in the u also satisfy equations (3.32) in the domain
i

f(x; t) : x 2 (x0; x1); t 2 (t0; t1)g and the boundary conditions (3.33) and (3.34).
In Section 3.7 variational principles are derived which have as their natural conditions, deduced using (3.32){(3.34), the equations of time-dependent quasi onedimensional motion in shallow water.
The general form of a functional for steady state quasi one-dimensional shallow
water ow is
I2 (u1 ; . . . ; um) =

Z x1
x0

f (x; u1 ; . . . ; um; u01 ; . . . ; u0m) dx + [g (x; u1; . . . ; um)]xx10 ;

(3:35)
where the general functions u now depend on x alone and u0 
i

58

dui
dx

The rst variation of (3.35) may be written as


I2 =

Z x1 ( X
m
x0

fu

i=1

d
f
dx u

ui dx +

"m 
X
i=1

gu

+f

ui0

ui

# x1

x0

using Taylor series and integration by parts. The natural conditions of I2 = 0
are therefore
ui :
uijx

fu

gu

d
dx

fu

x 2 (x0 ; x1 );

=0


+ f = 0
ui0

xj

(3.36)

= 0; 1;

(3.37)

for i = 1; . . . ; m.
3.3.2

General Variational Principles for


Two-dimensional Flow

The domain D in two-dimensional ow is a simply connected open set in the xy


plane. For the general time-dependent case a third coordinate t is added, where
t

lies in the interval [t0; t1]. Let u1 (x; y; t); . . . ; u (x; y; t) be m scalar variables
m

and let v1(x; y; t); . . . ; v (x; y; t) be n vector variables, where v = (v 1; v 2) for


n

i = 1; . . . ; n.

The variables u and v are assumed to be di erentiable functions


i

of x, y and t.
Consider a functional of the form
I3(ui ; vk ) =

Z t1 Z
t0

Z t1 Z Z
t0

F (x; y; t; ui ; ui ; uit ; vk ; :vk ; vkt ) dx dy dt

G(x; y; t; ui; vk ) d dt +

ZZ

[H (x; y; t; u ; v )] 10 dx dy; (3.38)


i

t
t

where i = 1; . . . ; m, k = 1; . . . ; n and  is the boundary of D. Let the functions


G

and H be di erentiable with respect to their arguments and let F be twice

di erentiable with respect to its arguments.


59

Using Taylor series, the divergence theorem and integration by parts the rst
variation of the functional (3.38) may be written as
I3 =

Z t1 Z Z ( X
m 
t0

Fu

i=1

r:Fr

ui

n 
X

rFr v

Fv

Z t1 Z (X
m 

uit t

ui



Fv

: k

(F )

kt

: vk dx dy dt

)
n 


X
+
Gu + Fru :n ui +
Gv + Fr:v n : vk d dt
 i=1
t0
k =1
# t1
Z Z "X
m
n 

X
+
(Hu + Fu ) ui +
Hv + Fv : vk dx dy;
k =1

i=1

it

k =1

kt

t0

where the unit vector n is the outward normal to the boundary  and the following
notation is used.
Fu

Fv




@F
@ui

 @F
@vk 1

Fu

it

; @v@F2 ; Fv

kt

@F
@uit

@F
@vk 1 t

; @v@F2

k t

The natural conditions of I3 = 0 are given by


ui :

Fu

r:Fr
rFr v

@F
@uiy

@F

: k

: k

uit t

Fv

: k

ui

@F
@uix

(F ) = 0 (x; y) 2 D ; t 2 (t0 ; t1); (3.39)

ui

 vk : Fv

r  ;
Fr v  r v :
( )

F
;

kt

= 0 (x; y) 2 D ; t 2 (t0 ; t1); (3.40)

+ Fr :n = 0

(x; y) 2  ; t 2 (t0 ; t1); (3.41)

+ Fr v n = 0

(x; y) 2  ; t 2 (t0 ; t1); (3.42)

uij :

Gu

 vk j :

Gv

uijt

(H + F )j = 0

= 0; 1 ; (x; y) 2 D;

(3.43)

Hv

= 0; 1 ; (x; y) 2 D;

(3.44)

 vk jt

ui

: k

ui

for i = 1; . . . ; m and

uit

tj


+ Fv = 0
kt

tj

= 1; . . . ; n. Equations (3.39) and (3.40) are the Eu-

ler equations of the variational principle and equations (3.41){(3.44) are natural
boundary conditions.
The functions u for i = 1; . . . ; m and v for k = 1; . . . ; n which cause I3 to
i

be stationary with respect to variations in its arguments also satisfy equations


60

(3.39){(3.44). In Sections 3.5.1 and 3.5.2 variational principles are derived whose
natural conditions, given by (3.39){(3.44), are the equations of motion for timedependent shallow water ows.
The general form of a functional for steady state shallow water ow is
I4(ui ; vk ) =

ZZ
D

F (x; y; ui ; ui ; vk ; :vk ) dx dy +

where the general variables

Z


G(x; y; ui; vk ) d;

for i = 1; . . . ; m and v for

ui

(3:45)

= 1; . . . ; n are

functions of x and y only.


Using Taylor series and the divergence theorem the rst variation of (3.45)
may be written as
I4 =

Z Z (X
m 
D

Z (X
m 


r:Fr

ui

ui +

n 
X

Fv

rFr v

: k

: vk dx dy

)
n 


X
Gu + Fru :n ui +
Gv + Fr:v n : vk d;

i=1

i=1

Fu

k =1

k =1

which yields the natural conditions


ui : Fu

r:Fr
rFr v

ui

= 0 (x; y) 2 D;

(3.46)

: k

= 0 (x; y) 2 D;

(3.47)

+ Fr :n = 0 (x; y) 2 ;

(3.48)

+ Fr v n = 0 (x; y) 2 ;

(3.49)

 vk : Fv

uij : Gu
 vk j : Gv

ui

: k

for i = 1; . . . ; m and k = 1; . . . ; n.
Using the results of this section the natural conditions of any variational principle for continuous shallow water motion can be written down immediately.

61

3.4

Discontinuous Variables

In this section general versions of the shallow water variational principles allowing
for discontinuous variables are studied. Only time-independent discontinuous
ows will be considered so the extra coordinate of Section 3.3, which is identi ed
with the time, is no longer used.
3.4.1

General Variational Principles for


One-dimensional Flow

Let the interval [x0; x1] of the x-axis be the domain over which the integrand of
the general functional is integrated and let x be a point in the interior of this
s

interval. Let u (x) i = 1; . . . ; m be a set of functions de ned on [x0 ; x1], as before.


i

Assume that all of the u are continuous in [x0; x ) [ (x ; x1]. This allows for one
i

or more of the u to be discontinuous at the point x .


i

Consider a functional of the form


I^2(u1 ; . . . ; u

; xs) =

Z x
x0

Z x1 
xs

f (x; u1 ; . . . ; um ; u01 ; . . . ; u0m) dx

+ [g(x; u1; . . . ; u )] 10 :
m

x
x

(3.50)

Using Taylor series the rst variation of I^2 is given by


I^2 =

Z x

x0

+
where the superscript
xs .

Z x1  ( X
m
xs

"m
X
i=1

i=1
x1

gu ui

fui ui + fui u0i dx


0

+ x f j
s

x0

xs

xs f jx + ;
s

(3.51)

denotes the x0 side of x and + denotes the x1 side of


s

The rst three terms are due to the variations of the u and the last two are
i

due to the variation of the position of the discontinuity, x .


s

62

Applying integration by parts to the u0 terms of (3.51) yields


i

I^2 =

Z x

x0

"m 
X

Z x1  ( X
m

xs

ui0

i=1

+f

gu

fu

i=1

ui

# x1

d
f
dx u

"m
X

i=1

x0

!
0

ui dx

fu ui

#x

+ x [f ]

xs +

(3.52)

xs
xs+

^ of the variable u at the point x is given by


The total variation u
i

^ i
u
x

= u j

+ u0 (x )x ;

i x 
s

s

s

which is the rst order term in the expansion of


(u + u )j
i

xs +xs

The only variations considered are those for which the total variations on either
side of the discontinuity are equal for each variable, that is,

^ i
u
x

^
=
u
+

^
= u
i

xs

xs

say, and, in the case of shallow water, the coecients of these terms in the
variational principle give rise to the required jump conditions. Substituting for
uijx

s

in (3.52) yields

I^2 =

Z x

x0

"m 
X
i=1

Z x1  (X
m

xs

gu

fu

i=1

+f

ui0

ui

#x1

d
f
dx u

ui dx

m h
i
X

fu

i=1

x0

xs

"

^ i + xs f
u
x

m
X

i=1

fu u0i

; (3.53)

xs

where the brackets [] denote the change in the argument on crossing x from
xs

the x0 side to the x1 side. That is, for example, [f ] = f j


xs

xs

f jx + ,
s

where

denotes the the x0 side of x and + the x1 side, as before.


s

Thus, from (3.53), the natural conditions of I^2 = 0 are


ui :

fu

d
dx

fu

x 2 (x0; xs ) [ (xs ; x1);

=0
63

(3.54)

uijx

^ i
u
x

:
:

xs :

gu


+ f = 0

h i
"

fu

m
X
i=1

ui0

xs

xj

= 0; 1;

(3.55)

= 0;

fui u0i

(3.56)
= 0;

(3.57)

xs

for i = 1; . . . ; m. Equations (3.54) are the Euler equations and (3.55) are boundary conditions at

x0

and x1 . Equations (3.54) and (3.55) are identical to the

corresponding natural conditions for continuous variables, derived in Section 3.3.


Equations (3.56) and (3.57) are due to the discontinuities in the u at the point
i

xs .

It is possible that there is a number of such points of discontinuity in the

interval (x0; x1). If so, then there are equations of the form (3.56) and (3.57)
corresponding to each of these points. In this case the Euler equations (3.54) are
derived for the interval (x0; x1) excluding all points of discontinuity.
3.4.2

General Variational Principles for


Two-dimensional Flow

The natural conditions of a variational principle with discontinuous variables,


de ned in two dimensions, are derived in this section. The method is similar
to that of the one-dimensional case in Section 3.4.1. The di erence is that in
two dimensions the variables are discontinuous across a curve in the domain of
integration instead of at an isolated point.
Let D be the domain in the xy plane over which the integrand of the functional
is to be integrated and let  be the boundary of D, as before. Let  be a smooth,
s

non self-intersecting curve which divides D into two distinct regions, D and D+ ,
as in Figure 3.1.
64

D
y
x

y
x

Figure 3.1: The two-dimensional domain.


Let u = u (x; y) for i = 1; . . . ; m and v = (v 1(x; y); v 2(x; y)) for i = 1; . . . ; n
i

be the scalar and vector variables. The u and v are assumed to be continuous
i

in the domains D and D+ but may be discontinuous across the curve  .


s

Consider a functional of the form


Z Z

I^4(ui ; vk ; s ) =

Z

+
+

ZZ 
D+

Z 
+

F (x; y; ui ; ui ; vk ; :vk ) dx dy

G(x; y; ui; vk ) d;

(3.58)

where i = 1; . . . ; m, k = 1; . . . ; n,  is the part of  which bounds D and +


is the part which bounds D+ .
The rst variation of I^4 is given by
I^4 =

Z Z
D

Z Z  (X
m 
D+

+
+

Z


ZZ

D

n 
X

Z  (X
m
+

F dx dy

i=1

Fv : vk
k

k =1

Gu ui +

ZZ

i=1

D

n
X

k =1

:
u

: k

Gv : vk d
k

F + dx dy +

65

r r (u )
)
+ Fr v r: (v ) dx dy

Fu ui + F



G d

Z


G+ d;

(3.59)

D+ D

Figure 3.2: Variation of  .


s

where D is the region of D enclosed by  and its variation  +   | see


s

Figure 3.2 | and  is the change in the length of  caused by the variation of
 . The superscripts

and + indicate that the functions are evaluated on the

or D+ sides of  , respectively.
s

Applying the divergence theorem to the r(u ) and r:(v ) terms in (3.59)
i

yields
I^4 =

+
+
+

Z Z
D

Z


ZZ

D+

ui

n 
X

ui

r:Fr

ui

rFr v

Fv

: k

: vk dx dy

)
n 


X
Gu + Fru :n ui +
Gv + Fr:v n : vk d
i=1
k =1
ZZ
Z
Z
k =1

+

F dx dy

i=1

Fu

i=1

Z  (X
m 

D
Z (X
m

s

Z Z  (X
m 

D

:n ui +

F + dx dy +

n
X
k =1

m
X
i=1



r v n:v

: k

ui

G d



G+ d

:n ui

n
X
k =1

r v n:v

: k

d:

Consider a point on the curve  . Let n be the displacement of this point,


s

under the variation, in the direction of n, the unit normal on the surface  with
s

direction out of the subdomain D . Then the integral over the domain D can
66

be written in terms of an integral along  and the variation n, that is,
s

ZZ
D

F dx dy =

Z
s

F n d:

As in the one-dimensional case equations relating the values of the variables


on either side of the discontinuity are obtained by using the total variations. Let


be the displacement of a point on  , under the variation, in the direction


s

of  , the unit tangent vector at the point. Then the total variations of the ow
variables on the curve  are given by
s

= u  +
i

s



^vk

@
@n

@ui
@n

where


 n + @u
  i = 1; . . . ; m;
@



= vk  + @@nv   n + @@v    k = 1; . . . ; n;

^ 
u

denotes di erentiation in the direction of n and

@
@

di erentiation in

the direction of  . As in the one-dimensional case, only variations whose total


variations are equal at the discontinuity are considered, that is,



+
^
^
^

u = u = u

i

s

s




+
^
^

 v =  v = ^v 
k

s

s

;
:

Thus the rst variation of I4 can be written as


I^4 =

+
+
+

Z Z

Z


Z 

Z Z  (X
m 

s

i=1

Z  (X
m 
+

ui

n 
X

ui

rFr v

Fv

F
F+

: k

: vk dx dy

)
n 


X
Gu + Fru :n ui +
Gv + Fr:v n : vk d
i

i=1

r:Fr

k =1

k =1

G+ d


Z (

D+

Fu

n

X
@ui
@ 
vk :n n
F u :n
F :v
@n
@n
i=1
k =1
!
+
m
n
X +
X + @  + 
@ui
v :n n
F u :n
F :v
@n
@n k
i=1
k =1

m
X

67

m
X

n
X
@u
F u :n i + F :v
@
i=1
k =1
+
m
n
X
X
@u
F + u :n i + F + :v
@
i=1
k =1

X
m

i=1


^i+
Fru :n Fru :n u
+


!
vk :n 
 + !
vk :n 
n 
X
@
@
@
@

k =1

rv

rv

: k

: k

n:^vk d:

The natural conditions of I^4 = 0 are

r:Fr
rFr v

ui

=0

(x; y) 2 D [ D+ ;

(3.60)

: k

=0

(x; y) 2 D [ D+ ;

(3.61)

ui : Gu

+ Fr :n = 0

(x; y) 2  [ + ;

(3.62)

 vk : Gv

+ Fr v n = 0

(x; y) 2  [ + ;

(3.63)

ui : Fu

 vk : Fv

n :


"

^vk

m
X

: k

n
X

@u
F u :n i
@n
i=1

"m
X

^ :
u

ui

@u
F u :n i
@
i=1

@
(v :n)
F :v
@n k
k =1

n
X

@
+ F :v @
(vk :n)
k =1

i
Fru :n  = 0;
h
i
i

rv

: k

s

s

s

= 0;

= 0;

= 0;

(3.64)
(3.65)
(3.66)
(3.67)

for i = 1; . . . ; m and k = 1; . . . ; n, where the brackets [] denote the change


s

in the quantity enclosed on crossing  from D to D+ . The sets of equations


s

(3.60){(3.63) are the same as the natural conditions for continuous variables, as
derived in Section 3.3.2 although, instead of being valid on the whole of D or
, (3.60) and (3.61) are valid on D and D+ separately and (3.62) and (3.63)
are valid on  and + separately. Equations (3.64) and (3.65) arise from the
variation in the position of the line of discontinuity  and equations (3.66) and
s

(3.67) are the result of matching the coecients of the total variations in the
variables at this line.
68

3.5

Time-dependent Shallow Water Flows

The previous two sections have dealt with generating general expressions for the
natural conditions of certain types of variational principles. These are used in
this section and the remaining sections of this chapter to deduce the natural
conditions of variational principles for shallow water ows.
The derivation of variational principles for time-dependent motion in shallow
water is continued here using the functionals created in Section 3.2.2.
3.5.1

Boundary Conditions

The variational principles for shallow water ows considered so far have all been
such that the variations vanish at the boundaries of the domains of integration.
In this section boundary terms are added to the functionals of Section 3.2.2 and
variations which are not necessarily zero on the space and time boundaries are
allowed. In this way boundary conditions for shallow water ows are derived.
First consider the functional with the integrand (3.28) | the `p' functional.
If we examine the associated variational principle and allow variations which
do not vanish at the boundaries, the variables Q and

will appear in terms

integrated around the space boundary of the domain and d and  will appear in
terms evaluated at the initial and nal times t1 and t2 . This can be seen using
the natural conditions (3.41){(3.44) of the general two-dimensional variational
principle in Section 3.3, where the function
the `p' functional and

and

is taken to be the integrand of

are, as yet, unspeci ed boundary functions.

With this motivation the boundary  of domain D is divided into two parts, say
 =  + , where boundary conditions for  are sought on  and for Q on 


69

for t 2 (t1; t2). Similarly the domain is divided into two parts, say D = D + D ,
d

and conditions at the time boundaries t1 and t2 are sought for d in D and for 
d

in D .


In this way it is possible to construct a `p' functional with boundary terms.


Let the functional I1(E; Q; d; v; ) be given by
I1 =

Z t2 Z Z
t1

+
+
+

Z t2 Z

(p(v; E )

Q

t1

ZZ 
D

ZZ 
Dd

d (t + E

C d dt +

Z t2 Z
t1

h2))jt2

(d (
jt2 g2



(

(d (


r)) dx dy dt

gh) + Q: (v
f ) Q:n d dt

h1))jt1 dx dy

jt1 g1 dx dy;

(3.68)

where f = f (x; y; t) and C = C (x; y; t) are given functions on  and  respec

tively and g = g (x; y) and h = h (x; y) for i = 1; 2 are given functions in D


i

and D respectively.


The natural conditions of the revised `p' principle


equations (3.39){(3.44), are
pv + Q

= 0

pE

= 0

dt +

r:Q

= 0

t + E

gh

= 0

r

= 0

= 0; deduced using

^
in D;

Q:n = 0

on  for t 2 (t1 ; t2 );

= 0

on  for t 2 (t1 ; t2 );

gi

= 0

in D for i = 1; 2;

hi

= 0

in D for i = 1; 2;

C
f
djt
jt

9
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
=
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
;

I1

70

where D^ = D  (t1; t2),

v


1
= g E 2 v:v and
pv 
Thus the rst two conditions in D^ are
@p
@v

v
g

pE

@p
@E



1
1
= g E 2 v :v :

1 v:v + Q = 0 and 1 E 1 v:v


2
2
g

d = 0;

which together give

1
2
so that the last three natural conditions in D^ are the conservation laws and the
Q = dv and E = gd + v:v;

irrotationality condition. The last four natural conditions are space and time
boundary conditions. The rst of these is a condition on the normal component
of mass ow on  and the second is a condition on the velocity potential on
Q

, both for t 2 (t1; t2 ). The remaining conditions are for depth and velocity
potential, in D and D respectively, at the initial and nal times. These last
d

conditions are not desirable in a practical sense since they require knowledge of
the solution at the nal time.
Consider now the `r' functional | that with integrand (3.30). The domain
and domain boundary are again divided into two, as for the `p' principle, to
provide a choice of boundary conditions. Using the same functions, f = f (x; y; t),
C

= C (x; y; t), g = g (x; y) and h = h (x; y) for i = 1; 2, a second functional


i

I2(Q; d; ) can be derived, namely,


I2 =

Z t2 Z Z

t1

Z t2 Z

(r(Q; d) + gdh +  (d + r:Q)) dx dy dt


t

Q

t1

ZZ 
Dd

ZZ 
D

 (C

( (d
dj t 2 h 2

Q:n) d dt
g2 ))jt2

Z t2 Z

( (d


djt1 h1 dx dy:

71

t1



f Q:n d dt

g1 ))jt1 dx dy

(3.69)

The natural conditions of the `r' principle

I2

= 0 may be deduced using

(3.39){(3.44) and are given by

9
>
>
>
rd + gh t = 0 >
>
>
>
>
=
rQ r = 0 >
>
>
>
>
>
>
;
dt + r:Q = 0 >

^
in D;

Q:n = 0

on  for t 2 (t1 ; t2 );

= 0

on  for t 2 (t1 ; t2 );

djt

gi

= 0

in D for i = 1; 2;

jt

hi

= 0

in D for i = 1; 2:

C
f

The rst two natural conditions in the domain may be rewritten as


1 Q:Q
2 d2

gd + gh

t = 0 ;

Q
d

r = 0

so that, using (2.25), the equations of motion and the irrotationality condition
have again been derived. The boundary conditions are identical to those of the
`p' principle.
Thus there exist two functionals, (3.68) and (3.69), whose natural conditions
of the rst variation are the equations of motion in the domain of the problem
together with prescribed conditions on mass ow and velocity potential on the
boundary of the domain, and conditions on the depth and velocity potential over
regions of the domain at the initial and nal times.
3.5.2

A Quartet of Functionals

A sequence of Legendre transforms can be used to generate a quartet of functionals which have as natural conditions of their rst variations the equations of
72

time-dependent motion in shallow water. Two such functionals | based on the p


and r functions | have already been described and were independently derived
from the `pressure' and `Hamilton' functionals for three-dimensional free surface
ows. Two further functionals are now sought.
By applying the divergence theorem and integration by parts, the `p' functional (3.68) can be expressed in the form
I1 =

Z t2 Z Z

t1

Z t2 Z

(p(v; E )

Q

t1

ZZ 
Dd

ZZ 
D

 (C

Ed + Q:v + gdh +  (dt +

Z t2 Z

Q:n) d dt
g2 ))jt2

( (d
djt2 h2

t1

( (d




r:Q)) dx dy dt

f Q:n d dt

g1 ))jt1 dx dy

djt1 h1 dx dy:

(3.70)

Comparing this with I2, as given by (3.69), suggests that there is a relationship
between the two functions p(v; E ) and r(Q; d) such that
r(Q; d) = p(v; E )

Ed + Q:v

in value, which can be con rmed directly using (2.19) and (2.25). The relation is
in fact a Legendre transformation as is now shown.
The Legendre transform R(v; d) of p(v; E ), with E and d as dual active variables and v passive, is de ned by
R(v; d) = Ed

p(v; E )

(3:71)

and is such that


Rv

pv ; Rd = E:

Using (2.19) R can be constructed from (3.71) and is


1
2

1
2

R(v; d) = gd2 + dv:v:

73

(3:72)

Notice that R is equal to the total energy of a uid particle.


The function R is also a Legendre transform of r(Q; d), with Q active and d
passive, in that, using (2.25), we may write
R(v; d) = Q:v

r(Q; d)

(3:73)

with the rst derivatives


Rd = rd ; Rv

= Q:

Equations (3.71) and (3.73) imply the required connection, that


r(Q; d) = Q:v

R(v; d) = p(v; E )

Ed + Q:v

in value.
The intermediate function R can be bypassed and p and r may be connected
directly by a Legendre transform. Since pv = Q and p = d, then if v and E
E

are both active variables, the transformation of p is


r(Q; d) = Q:v

Ed + p(v; E )

(3:74)

and
rQ = v ; rd = E:

A fourth function P (Q; E ) completes a closed quartet of functions related by


Legendre transforms and is derivable from p, r and R by using appropriate active
variables.
from

cannot be given explicitly, but is de ned by eliminating v and d


1
2

P (Q; E ) = gd2 + dv:v ; Q = dv ; E

= gd + 12 v:v;

(3:75)

and has the values of ow stress. The function P is related to p and r by


p(v; E )

P (Q; E )

74

Q:v

(3.76)

r(Q; d)

The functions

and

P (Q; E )

(3.77)

Ed:

can be used as bases for functionals, the natural

conditions of the rst variations of which include the equations of motion in


shallow water. The functionals may be generated by substituting for p and r in
the integrands of (3.68) and (3.69). The process is to use (3.76) to substitute for p
in the integrand of (3.68) and (3.73) to substitute for r in the integrand of (3.69)
by what is essentially a change of variables using the de nitions of

and Q,

(2.19) and (2.25). Although (3.71) could be used to substitute for p in (3.68) and
(3.77) could be used to substitute for r in (3.69) it would not change the nature
of the functionals being generated. For instance integration by parts and the
divergence theorem can be used on the `P' functional generated by substituting
(3.77) into (3.69) to give the functional formed by substituting (3.76) into (3.68).
The `P' Principle

Let the functional I3(E; Q; d; ) be de ned by


I3 =

Z t2 Z Z

+
+
+

t1

Z t2 Z

(P (Q; E ) Q:r

Q

t1

ZZ 
D

ZZ 
Dd

C d dt +

Z t2 Z

h2))jt2

(d (
jt2 g2

t1



d (t + E

(

(d (


f ) Q:n d dt

h1))jt1 dx dy

jt1 g1 dx dy:

(3.78)

Then the natural conditions of the `P' principle I3 = 0 are

r

PQ
PE

t + E

gh

dt +

r:Q

9
>
>
>
= 0>
>
>
>
>
>
>
>
>
=
= 0>
>
>
>
= 0>
>
>
>
>
>
>
>
>
;
= 0>

75

gh)) dx dy dt

^
in D;

Q:n = 0

on  for t 2 (t1; t2 );

= 0

on  for t 2 (t1; t2 );

djt

gi

= 0

in D for i = 1; 2;

jt

hi

= 0

in D for i = 1; 2:

C
f

The rst condition in D^ is

r = 0:

Thus if equations (2.19) and (2.25) are assumed, the `P' principle yields the
conservation laws and the irrotationality condition as natural conditions in D^ ,
and gives the same boundary conditions on  and Q at space boundaries and on
d and  at time boundaries as are obtained from the `p' and `r' principles.

The `R' Principle

Now consider a principle based on the function R. Let the functional I4(Q; d; v; )
be given by
I4 =

Z t2 Z Z

t1

Z t2 Z

Q

t1

ZZ 
Dd

ZZ 
D

R(v; d) + Q:v + gdh +  (dt +

 (C

( (d
djt2 h2

Q:n) d dt
g2 ))jt2

Z t2 Z

( (d


t1



f Q:n d dt

g1 ))jt1 dx dy

djt1 h1 dx dy:

(3.79)

The natural conditions of the `R' principle I4 = 0 are


Rv + Q
Rd + gh

t

r
d + r:Q
v

9
>
>
>
= 0>
>
>
>
>
>
>
>
>
=
= 0>
>
>
>
= 0>
>
>
>
>
>
>
>
>
;
= 0>

76

r:Q)) dx dy dt

^
in D;

Q:n = 0

on  for t 2 (t1 ; t2 );

= 0

on  for t 2 (t1 ; t2 );

djt

gi

= 0

in D for i = 1; 2;

jt

hi

= 0

in D for i = 1; 2:

C
f

The rst two conditions in D^ may be written as


dv + Q = 0

and

gd

1 v:v + gh
2

t = 0:

Thus the natural conditions of the `R' principle include the equations of motion
in shallow water and the same boundary conditions as obtained previously from
the `p', `r' and `P' principles.
So there exists a quartet of functionals (3.68), (3.69), (3.78) and (3.79), based
on the four functions p, r, P and R, from which the shallow water equations can
be derived as the natural conditions of the rst variations. Figure 3.3 shows the
relations between the p, r, P and R functions.

-P(Q,E)

-Q
v

-E

- Q -E
v

p(v,E)

d
Q
d

r(Q,d)

d v

E
d

R(v,d)

Q
v

Figure 3.3: A quartet of Legendre transforms.


77

3.5.3

Constrained and Reciprocal Principles

Variational principles can be constrained by allowing only variations which satisfy


one or more of the natural conditions. The principles constrained in this way will
have the remaining natural conditions as natural conditions (Courant and Hilbert
(1953)). There are several ways in which the variations of the `p', `r', `P' and `R'
principles of Sections 3.5.1 and 3.5.2 can be constrained; only those constraints
which produce variational principles which are reciprocal, in a sense to be de ned
shortly, are studied here.
Reciprocal `p' and `r' Principles

The functional (3.68), used in the `p' principle, has an integrand which contains
the integrated conservation of momentum equation and the irrotationality condition explicitly. It seems natural to constrain the `p' principle to satisfy these two
conditions. This can be done by specifying

9
>
>
=
t + gh >
;
>
>
>
;

(3:80)

r

v =

which results in the functional I1 reducing to a functional I1 (Q; d; ). The conc

strained principle is given by


I1 = 
c

+
+

(Z t Z Z
2
t1

Z t2 Z
t1



ZZ 
Dd

(

p^() dx dy dt +

Z t2 Z

f ) Q:n d dt +

jt2 g2

ZZ 

jt1 g1 dx dy

where

p^() = p( ; t

Q

t1

D

C d dt

(d (

h2))jt2

(d (

= 0;

(3.81)


1
+ gh) = 2g 

78

h1))jt1 dx dy

2
1
gh + r:r :
2

The natural conditions are


!

1 


1
+ r:
gh + r:r
2

1 

1 

1 


1
gh + r:r r
2

= 0
^
in D;

1 r:r r:n + C = 0
2

1
gh + r:r r:n + Q:n = 0
2

on  for t 2 (t1 ; t2 );

= 0

on  for t 2 (t1 ; t2 );

= 0

in D for i = 1; 2;

= 0

in D for i = 1; 2;

gh +

 !
1
gh + r:r + d

1 

1 

jt

ti

hi


1
gh + r:r + gi = 0

on  for t 2 (t1 ; t2 );

in D for i = 1; 2;
d

ti

the rst of which may be recognised as conservation of mass, written in terms of


, in the domain.

Boundary conditions are given for , d and Q.

If  =  and D = D then (3.81) becomes


Q

Z t2 Z Z
t1

p^() dx dy dt +

Z t2 Z
t1

C d dt +

ZZ 
D

jt2 g2

jt1 g1 dx dy

=0

(3:82)
in which the functional depends on the variable  alone.
A constrained `r' principle can be constructed to satisfy conservation of mass
by specifying

for some vector

9
>
>
=
d = r: >
;
>
>
>
;
Q =
t

(3:83)

= (x; y; t), and substituting into equation (3.69). The re-

sulting functional depends on

and  and the variational principle is given by

79

(Z t Z Z
2
t1

(^(
r ) + g r: h) dx dy dt +

Z t2 Z
t1



ZZ 
D

ZZ 

t :n d dt

r: j

t2

Dd

r: j

h2

t1

) = r(

t1

( (r:


h1 dx dy

where
r^(

Z t2 Z

; :

) = 12

Q

 (C +

:n) d dt

( (r:

g2 ))jt2

= 0;

:
:

r
t

g1 ))jt1 dx dy

(3.84)
1 g (r: )2 :
2

The natural conditions are


t +

ft

1 :
2
1 :
2

gh + :

^
in D;

=0

:n

= 0

on  for t 2 (t1 ; t2 );

r + gh
g r: + gh
r: j g
rj + j
rh + j

= 0

on  for t 2 (t1 ; t2 );

= 0

on  for t 2 (t1 ; t2 );

= 0

in D for i = 1; 2;

ti

ti

= 0

in D for i = 1; 2;

ti

= 0

in D for i = 1; 2;

jt

hi

= 0

on  \  ^ for i = 1; 2;

jt

= 0

on  \  for i = 1; 2;

hi

= 0

on  \  ^ for i = 1; 2;

jt

= 0

on  \  for i = 1; 2;

C+
t

1
2

r g r:
t

g :

ti

jt

f jt

f jt

where  ^ is the boundary of D and  is the boundary of D and, for neatness,




represents the term

= :

The natural condition in D^ is recognisable as the equation of conservation


of momentum | not the integrated form usually generated. The irrotationality
80

condition can be derived as a consequence of the conservation of momentum and


the boundary conditions which specify that the ow is irrotational at t = t1.
If  =  and D = D, (3.84) reduces to a variational principle involving a


functional of

alone, namely,


Z t2 Z Z
t1

(^(
r ) + g r: h) dx dy dt +

ZZ 
D

r: j

t2

h2

r: j

t1

Z t2 Z
t1

h1 dx dy

:n d dt

= 0:

(3.85)

The variational principles (3.82) and (3.85) can be described as reciprocal.


We use this term to mean that the constraints satis ed in the domain by the
variations in one principle are the natural conditions, in the domain, of the other
principle. The boundary conditions also exhibit reciprocity in that the natural
boundary conditions of (3.82) are given for mass ow, as a function of , on 
and depth, as a function of , in D for t = t1 ; t2 whereas in (3.85) conditions are
for the energy, as a function of , on  and velocity, as a function of , in D for
t = t1 ; t2.

Reciprocal `P' and `R' Principles

Now consider the other two variational principles | based on P and R. The
integrands of the `P' and `R' functionals are not expressible in either of the forms
function of (Q; d) + multiplier  conservation of mass
function of (v; E )+multiplier 

conservation of

+multiplier 

or
irrotationality

momentum
condition
which are the structures that allow the `p' and `r' variational principles to be
constrained to depend on only one variable. There is no corresponding way of
81

constraining the `P' and `R' principles and the functionals cannot be reduced to
depend on one variable. However, the following structure can be deduced.
Consider the `P' functional (3.78). Let  =  and D = D, and constrain
Q

the variables to satisfy conservation of momentum using the rst of (3.80). Then
the variational principle becomes


Z t2 Z Z
t1

(P (Q;

ZZ 
D

Q:r) dx dy dt +



t + gh)
jt2 g2

jt1 g1 dx dy

Z t2 Z
t1

C d dt

= 0;

(3.86)

where the variables are Q and . The natural conditions are given by
9
>
>
=
PQ r = 0 >
>
>
;
(P  +gh )t + r:Q = 0 >

^
in D;

C
gi

on  for t 2 (t1; t2 );

Q:n = 0

j = 0

in D for i = 1; 2:

t +gh t
i

The rst two conditions may be rewritten as

9
>
>
=
v r = 0 >
>
>
;
dt + r:Q = 0 >

^
in D;

which are the irrotationality condition and the conservation of mass equation.
In the `R' functional (3.79) let  =  and


D

and constrain the

variations to satisfy conservation of mass by imposing (3.83). Then the variational


principle becomes


Z t2 Z Z
t1

R(v; :

ZZ 
D

:v + g : h) dx dy dt +

r: j

t2

82

h2

r: j

t1

Z t2 Z


t1

h1 dx dy

:n d dt

= 0; (3.87)

which involves a functional of v and . The natural conditions are given by




r Rr

+ gh

rh

f jt

9
>
>
=
= 0>
Rv
t

>
>
;
gh + vt = 0 >

ft

= 0

on  for t 2 (t1 ; t2 );

vjt = 0

in D for i = 1; 2;

= 0

on  for i = 1; 2:

^
in D;

hi

The rst two equations are

9
>
>
=
(r: ) v t = 0 >


>
>
;
vt + r gr:
gh + 12 v:v = 0 >

^
in D;

the second of which is conservation of momentum. This, together with the natural
condition in D for t1, implies the irrotationality condition in D for t 2 [t1; t2].
The constrained `P' and `R' principles (3.86) and (3.87) are reciprocal since
the constraint of conservation of momentum in (3.86) is a natural condition of
(3.87) and the conservation of mass constraint in (3.87) is a natural condition of
(3.86). The irrotationality condition is a natural condition of both principles.

3.6

Time-independent Shallow Water Flows

The discussion so far has concerned derivation of variational principles whose


natural conditions include the time-dependent shallow water equations of motion.
We now seek to apply these principles to steady state conditions.

83

3.6.1

Steady Principles from Unsteady Principles

In Chapter 2 the equations of motion for time-independent shallow water ows are
deduced from the equations for time-dependent motion by making the assumption
that all of the ow variables | mass ow, energy, depth and velocity | are
independent of time. The potential  is not a ow variable and is not assumed
to be independent of time although its general form is deduced as
~ + ~(x; y)
(x; y; t) = Et

(3:88)

(equation (2.50)), where the constant energy E~ is the steady counterpart of E

gh.

The variational principles for time-independent motion can be derived from


the variational principles for time-dependent motion of Section 3.5 in a similar
way. That is, by assuming that the ow variables are independent of time and
that  is of the form (3.88). With appropriately modi ed boundary functions the
integrals with respect to time in the principles for time-dependent ow can be
evaluated.
Consider the four functionals (3.68), (3.69), (3.78) and (3.79). The boundary
functions C (x; y; t), f (x; y; t), g (x; y) and h (x; y) for i = 1; 2 must be treated with
i

care in transforming from unsteady to steady motion. In the natural conditions


the function C will be used to provide a boundary condition for the mass ow on
 . As mass ow is now assumed independent of time, C must be replaced by
Q

a function C^ (x; y). The function f will be used to provide a boundary condition
for

on  . The variation of


with time is known from (3.88) and so, for

~ + f~1 (x; y). The functions g1


consistency, f must be replaced by f~(x; y; t) = Et
and g2 are the time boundary conditions on the depth in domain D but since
d

the depth does not vary with time we must have g1 = g2 = g^(x; y). The functions
84

and h2 give time boundary conditions on  in D , and from (3.88) we know

h1

that
jt2

where T = t2

t1.

jt1

= E~ (t2

~
t1) = ET;

Therefore h1 and h2 must be speci ed so that h2

~
h1 = ET

for consistency.
First consider the `p' principle. The functional I1, given by (3.68), under
steady state conditions becomes
Z t2 
Z


~
^
I1 =
T p(v; E ) + Q: v r dx dy +
C
 dt d
D
t1

Z Z t2 
ZZ
 
~
+
^ ~ dx dy;
 f dt Q:n d
T gE
s

ZZ



t1

Dd

where I1 = I1 (Q; v; ). To simplify this de ne


s

f^(x; y ) = f~1 (x; y )

1 E~ (t + t )
2 1 2

so that
Z t2
t1


2


~f (x; y; t) dt = f~1(x; y)t 1 Et
~ 2 = T f~1(x; y) 1 E~ (t1 + t2) = T f^(x; y):
2
2
1
t
t

Also, let
^(x; y ) = ~(x; y )

1 E~ (t + t )
2 1 2

so that
Z t2
t1

2


1 Et
~ 2 = T ~(x; y) 1 E~ (t1 + t2) = T ^(x; y)
2
2
1

(x; y; t) dt = ~(x; y )t

t
t

and r^ = r~. Then


Z


^
^ ^ d
I1 =
T p(v; E ) + Q: v r dx dy +
T C
D

Z
ZZ


^
^
T gE
+ T  f Q:n d
^ ~ dx dy:
(3.89)
s

ZZ



Dd

85

Notice that the nal term in (3.89) is a constant and so it may be discarded.
Also, throughout the functional there is a constant non-zero multiplier T which
may be set equal to unity. Finally, for neatness, the ^ notation is suppressed and
the `p' functional for use in the steady state variational principle is written as
L1 =

ZZ
D

(p(v; E ) + Q: (v

r)) dx dy +

Z
Q

C d +

Z


(

f ) Q:n d;

(3:90)
where L1 = L1(Q; v; ) and E is the known function E = E~ + gh, for consistency
with conservation of momentum (2.42).
By the same process steady state forms of (3.69), (3.78) and (3.79) can be
generated, and using the method by which (3.90) was deduced from (3.89) the
steady state `r', `P' and `R' functionals may be written
L2

L3

L4

=
=
=

ZZ
D

(r(Q; d) + Ed + r:Q) dx dy
+

ZZ
D

Q

 (C

Q:n) d

(P (Q; E ) + r:Q) dx dy
+

ZZ

Q

 (C

Q:n) d

f Q:n d;

(3.91)

f Q:n d;

(3.92)

f Q:n d;

(3.93)



Z


R(v; d) + Q:v + Ed +  :Q) dx dy

Q

 (C

Q:n) d



where L2 = L2(Q; d; ), L3 = L3(Q; ) and L4 = L4(Q; d; v; ).


The natural conditions of the steady state variational principles

L1

= 0,

L2 = 0, L3 = 0 and L4 = 0 are expected to include the shallow water equations

of motion (2.43) and (2.48) and possibly (2.25) or (2.19). Equation (2.42) is
satis ed exactly since the energy E is regarded as a known function E = E~ + gh,
where E~ is a given constant.
86

The natural conditions of L1 = 0, the `p' principle, are


9
>
>
>
pv + Q = 0 >
>
>
>
>
=
v r = 0 >
>
>
>
>
r:Q = 0 >>>;

in D;

Q:n = 0

on 

= 0

on 

the rst equation being


v

1 v :v  + Q = 0
2

in D:

The natural conditions of L2 = 0, the `r' principle, are


9
>
>
>
rQ r = 0 >
>
>
>
>
=
rd + E = 0 >
>
>
>
>
r:Q = 0 >>>;
C

Q:n = 0

on 

= 0

on 

the rst two equations being


d

gd + E

9
r = 0 >>>=
>
>
>
;

Q
1QQ
2

in D;

in D:

= 0

The natural conditions of L3 = 0, the `P' principle, are


9
>
>
=
PQ r = 0 >
r:Q = 0 >>>;
C
f

in D;

Q:n = 0

on 

= 0

on 

87

the rst equation being

r = 0

in D;

where v is a function of Q and E using (2.25) and (2.19).


The natural conditions of L4 = 0, the `R' principle, are
Rv + Q
Rd + E

r
r:Q

C
f

the rst two equations being

gd

9
>
>
>
= 0>
>
>
>
>
>
>
>
>
=
= 0>
>
>
>
= 0>
>
>
>
>
>
>
>
>
;
= 0>

in D;

Q:n = 0

on 

= 0

on 

9
>
>
=
dv + Q = 0 >
>
>
>
1
;
v
v
+
=
0
:
E
2

in D:

Thus the natural conditions of the variational principles for steady state motion, derived from the principles for unsteady motion, include the steady state
equations in shallow water | (2.43) and (2.48). In order that the equations are
expressed in the forms of (2.43) and (2.48) it is necessary to assume in the `p'
principle that d = 1 (E
g

1
2

v:v), in the `r' principle that v = Qd and in the `P'

principle that E = gd + 12 v:v and Q = dv.


Incidentally the same `p' and `r' functionals (3.90) and (3.91) can be derived
from the `pressure' and `Hamilton' free surface functionals by a di erent route.
Instead of applying the shallow water approximation and then considering steady
ow the assumption of steady state conditions can be made rst. The method
88

is dependent on the addition of appropriate boundary terms to the free surface


functionals for unsteady ow in the same way that boundary terms were added
to the functionals for unsteady ow in shallow water in Section 3.5.
3.6.2

Constrained and Reciprocal Principles

The variational principles for steady motion can be constrained in the same way
as the ones for unsteady motion were in Section 3.5. The variational principles
for time-dependent motion have three natural conditions which can be used as
constraints | singly or in pairs | conservation of mass, conservation of momentum and the irrotationality condition. For the variational principles for steady
ow there are just two | conservation of mass and the irrotationality condition
| since conservation of momentum is satis ed implicitly.
Reciprocal `p' and `P' Principles

Consider the integrands of the functionals (3.90){(3.93). In Section 3.5 emphasis


was placed on the structure of the integrands of the `p' and `r' functionals | they
were expressed as a function of (Q; d) or (v; E ) plus a multiple of a conservation
law or the irrotationality condition. For steady ows the `p' and `P' functionals
exhibit a similar property, that is, the integrands can be expressed as functions
of Q or v plus a multiple of conservation of mass or the irrotationality condition, since E is a known function. Thus the `p' principle will be constrained by
irrotationality and the `P' principle by conservation of mass.
Let  = . Then the `p' principle constrained by irrotationality is a funcQ

tional of  alone and is given by




Z Z

p( ; E ) dx dy +

89

Z


C d

= 0;

(3:94)

with the natural conditions


!



r: g1 E 21 r:r r = 0
1 E 1 r:r r:n C = 0
2
g

in D;
on ;

the rst of which is conservation of mass in D.


Let  =  and Q:n =
Q

on . Then the constrained `P' principle is a

functional of Q alone and is given by




Z Z
D

P (Q; E ) dx dy

= 0;

(3:95)

where Q is constrained by r:Q = 0 in D and by Q:n = C on . The variational


principle (3.95) has as its only natural condition the irrotationality condition.
Thus the `p' and `P' steady principles display the same relationship as the `p'
and `r' principles for unsteady ow (3.82) and (3.85) | they are both functionals
of one variable and are reciprocal in the sense de ned earlier.
The particular relationship between the `p' and `r' principles (3.82) and (3.85)
for unsteady ow has not survived the transition to principles for steady ow.
The `p' and `r' functionals (3.90) and (3.91) cannot be constrained so that they
each depend on just one function and have reciprocal constraints and natural
conditions. The relationship of the `p' and `r' principles in unsteady motion is a
result of the integrands being expressible in the form
function of (Q; d) or (v; E ) + multiplier  conservation law
and once the variables are constrained to satisfy the relevant conservation law and,
in the case of the `p' principle, irrotationality, the functions of (Q; d) or (v; E )
can each be written in terms of one variable. In the steady motion functional
90

(3.90) the pressure function p is still expressed as a function of v and E but,


since E is a known function and no longer a variable of the problem, p is in fact a
function of v alone. The ow stress P is also a function of one variable so that the
constrained `p' and `P' principles for steady motion exhibit the same relationship
as the constrained `p' and `r' principles for unsteady motion in terms of being
reciprocal and depending on just one variable.
For the case of constant equilibrium depth h, where the energy E is a constant,
the constrained `p' and `P' principles (3.94) and (3.95) are examples of Bateman's
functions (Bateman (1929)), using the gas dynamics analogy.
Reciprocal `r' and `R' Principles

The function r depends on Q and d and cannot be written as a function of one


variable by requiring the irrotationality condition or conservation of mass to be
satis ed. The function R also depends on two variables and cannot be reduced to
a function of one variable. However the `r' and `R' principles for steady motion
can be constrained to give reciprocal principles.
Let  = . Then constraining the `R' principle to satisfy the irrotationality
Q

condition gives


Z Z
D

R( ; d) + Ed) dx dy +

Z


C d

=0

(3:96)

which depends on  and d. The variational principle (3.96) has natural conditions
9
>
>
=
Rd + E = 0 >


>
>
>
;

r: Rr
Rr :n

= 0

C=0

91

in D;
on ;

the second of which is conservation of mass in the form

r: (dr) = 0:
Let  =  and Q:n = C on . Then constraining the `r' principle to satisfy
Q

conservation of mass gives




Z Z

(r(Q; d) + Ed) dx dy = 0;

(3:97)

where r:Q = 0, which has as natural conditions


rd + E

=0

and the irrotationality condition in D.


The `r' and `R' principles are reciprocal since the constraint of one principle
is a natural condition of the other. Unlike the constrained `p' and `P' principles
though, the `r' and `R' principles are functionals of two variables which yield a
second natural condition for each.

3.7

Quasi One-dimensional Shallow Water


Flows

In the same way that variational principles for time-dependent shallow water
ows were derived from principles for free surface ows in Section 3.2, by making
the shallow water approximation, the quasi one-dimensional approximation can
be applied to (3.68), (3.69), (3.78), (3.79) and (3.90){(3.93) to give functionals
whose corresponding variational principles have as their natural conditions the
equations of unsteady and steady quasi one-dimensional motion.
92

The domain of the problem is the channel


D=

(x; y) : x 2 [x ; x ]; y 2
e

"

B (x) B (x)
;

#)

as in Section 2.3.
3.7.1

Time-dependent Flows

Consider the functionals (3.68), (3.69), (3.78) and (3.79) for time-dependent shallow water ows. Corresponding functionals for quasi one-dimensional ows may
be derived from these by assuming that all of the ow variables are independent
of y, that is, by substituting E = E (x; t), Q = Q(x; t), d = d(x; t), v = v(x; t)
and  = (x; t) for their two-dimensional counterparts. Then, after replacing the
operators by their one-dimensional versions, that is, replacing r:Q by 1 (BQ)

in (3.69) and (3.79) and r by  in (3.68) and (3.78), the integrals with respect
x

to y can be evaluated.
The boundary functions must also be independent of the y coordinate. In the
two-dimensional functionals C = C (x; y; t) and f = f (x; y; t) are de ned on 

and  respectively, where  =  +  is the boundary of D. In the natural




conditions of the corresponding variational principles the function C is identi ed


as the normal component of mass ow on  , thus C must be zero on any portion
Q

of  which lies on the channel sides across which there is no ow. Therefore the
Q

boundary conditions are much simpli ed by letting  include all parts of the
Q

boundary across which there is no ow, in fact we take  = . The boundary


Q

function

must be of the form C (x ; t) =


e

Ce (t)

at inlet, C (x ; t) =
o

Co (t)

at

outlet and C (x; t) = 0 elsewhere.


For the boundary terms evaluated at t1 and t2 in the functionals (3.68), (3.69),
93

(3.78) and (3.79) the boundary functions are

= g (x; y) and

gi

= h (x; y)

hi

for i = 1; 2 which, in the natural conditions of the variational principles, yield


boundary conditions for d and  respectively at t1 and t2 . Let D = D so that in
d

the one-dimensional case only the boundary function for d, given by g = g (x)
i

in D for i = 1; 2, exists.
Making the above substitutions into (3.68), (3.69), (3.78) and (3.79) and integrating with respect to y yields the one-dimensional functionals K1(E; Q; d; v; ),
K2 (Q; d; ), K3 (E; Q; d; ) and K4 (Q; d; v; ) given by
K1 =

+
K2 =

Z t2 Z x

t1

Z t2

xe

Co (B)jx

t1

Z t2 Z x 
o

t1

xe

Z t2 
t1

Zx 
xe

+
K4 =

t1

Z t2

xe

xe

Z t2 
t1

xe

g2 ))jt2

(B (C

( (d

(3.98)

Ce (B)jx dt +

jt1 g1 B dx;

Q))jx dt

d (t + E

Qx

jt2 g2

g1 ))jt1 B dx;

( (d

Q))jx

( (d

xe

Z x
o

xe

(3.99)

gh)) B dx dt
jt2 g2

R(v; d) + gdh + Qv +  dt

(B (C

Zx 

Z x

x)) B dx dt


1
+ B (BQ) B dx dt

(B (C

g2 ))jt2

(P (Q; E )

Z t2 Z x 
t1

Q))jx

Co (B)jx

t1

r(Q; d) + gdh +  dt

( (d
o

gh) + Q (v

Ce (B)jx dt +

Z t2 Z x

d (t + E

(B (C

K3 =

(p(v; E )

jt1 g1 B dx;


1
+ B (BQ) B dx dt

(3.100)

Q))jx dt

g1 ))jt1 B dx:

(3.101)

The functions p(v; E ), r(Q; d), P (Q; E ) and R(v; d) are the one-dimensional
counterparts of p(v; E ), r(Q; d), P (Q; E ) and R(v; d) (de ned by (3.27), (3.29),
(3.75) and (3.72)), namely,
p(v; E )


2
= 21g E 12 v2 ;

94

(3.102)

2
= 12 Qd 12 gd2 ;
1
1
R(v; d) = gd2 + v 2d
2
2

r(Q; d)

(3.103)
(3.104)

and P (Q; E ) is de ned by eliminating v and d from


P

= 12 gd2 + dv2 ;

1
2

Q = dv ; E = gd + v 2:

(3:105)

The natural conditions of K1 = 0, K2 = 0, K3 = 0 and K4 = 0 may be


deduced from the general formulae (3.32){(3.34) and are as follows.
For the `p' principle K1 = 0,
pv + Q = 0
d=0

PE

dt + B1 (BQ)x = 0
t + E

gh = 0

x = 0

Co

Qjx

Ce

Qjx

gi

djt

9
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
=
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
;

in (x ; x ) for t 2 (t1 ; t2 );
e

= 0 for t 2 (t1 ; t2);


= 0 for t 2 (t1 ; t2);
= 0 in (x ; x ) for i = 1; 2:
e

For the `r' principle K2 = 0,

9
>
>
>
rd t + gh = 0 >
>
>
>
>
=
rQ x = 0 >
>
>
>
>
>
>
1
;
dt + B (BQ)x = 0 >
Co

Qjx

Ce

Qjx

gi

djt

in (x ; x ) for t 2 (t1 ; t2 );
e

= 0 for t 2 (t1 ; t2);


= 0 for t 2 (t1 ; t2);
= 0 in (x ; x ) for i = 1; 2:
e

95

For the `P' principle K3 = 0,

9
>
>
>
PQ x = 0 >
>
>
>
>
>
>
>
>
=
PE d = 0 >
>
>
>
t + E gh = 0 >
>
>
>
>
>
>
>
>
1
;
dt + B (BQ)x = 0 >
Co

Qjx

Ce

Qjx

gi

djt

in (x ; x ) for t 2 (t1 ; t2 );
e

= 0 for t 2 (t1 ; t2);


= 0 for t 2 (t1 ; t2);
= 0 in (x ; x ) for i = 1; 2:
e

For the `R' principle K4 = 0,

9
>
>
>
Rv + Q = 0 >
>
>
>
>
>
>
>
>
=
Rd t + gh = 0 >
>
>
>
v x = 0 >
>
>
>
>
>
>
>
>
1
;
dt + B (BQ)x = 0 >
Co

Qjx

Ce

Qjx

gi

djt

in (x ; x ) for t 2 (t1 ; t2 );
e

= 0 for t 2 (t1 ; t2);


= 0 for t 2 (t1 ; t2);
= 0 in (x ; x ) for i = 1; 2:
e

Thus each set of natural conditions includes the equations of motion for timedependent quasi one-dimensional shallow water ow. The conservation of mass
equation (2.33) is explicit in each set. The conservation of momentum equation,
in its integrated form, is explicit in the natural conditions of the `p' and `P'
principles but for the `r' principle the relations Q = dv and E = gd + 12 v2 are
needed and for the `R' principle the relation
96

gd + 12 v 2

is required. The

boundary conditions in each case are the same, that is, on the mass ow at inlet
and outlet, for t 2 (t1; t2), and on the depth in (x ; x ) at t = t1 ; t2 .
e

3.7.2

Constrained and Reciprocal Principles

The variational principles for unsteady quasi one-dimensional ows can be constrained in the same ways as the corresponding variational principles for twodimensional ows. In particular, constrained `p' and `r' principles which are reciprocal to one another and constrained `P' and `R' principles which are reciprocal
to one another can be derived.
Reciprocal `p' and `r' Principles

The `p' principle corresponding to the functional (3.98) can be reduced to a


principle which depends on just one variable by constraining the variations to
satisfy the conservation of momentum equation, in its integrated form, and the
one-dimensional version of the irrotationality condition, that is, by specifying
E

9
>
>
=
t + gh >
:
>
>
>
;

(3:106)

x

The constrained `p' principle is given by


K1c = 

Z t2 Z x
t1

xe

p^()B dx dt +

Zx 
o

xe

jt2 g2

Z t2 

Co (B)jx

t1

jt1 g1 B dx

where K1 = K1 () and


c


1
p^() =
2g 

97

2
1
2
gh +  :
2
x

= 0;

Ce (B)jx dt
e

(3.107)

The natural conditions of K1 = 0 are


c

1 

1  +1
gh + 2
2
B

1 

1 
gh + 2 
2

= 0

in (x ; x ) for t 2 (t1 ; t2 );
e

Co
Ce


1
+ g 


1
2
gh +   = 0 for t 2 (t1 ; t2 );
2

 !
1
1
+ g  gh + 2 2  = 0 for t 2 (t1 ; t2);


1
1
2
g +
 gh +  = 0 in (x ; x ) for i = 1; 2;
2
g
t

xo

xe

ti

which correspond to conservation of mass in the domain and boundary conditions


on .
The `r' principle, corresponding to the functional (3.99), may be constrained
to satisfy conservation of mass by specifying
d

B
t

9
>
>
>
=
;
>
>
>
;

(3:108)

for some function (x; t). The constrained `r' principle depends on and  and
is given by
K2

=

(Z t Z x
2

Z t2
t1

Zx
xe

where

t1

r^(

)+gB h

!!

B Co +
B x
!!
x

g2
xe

B dx dt

!! !
dt
B Ce +
B x
!! !
)
x


g1 B dx = 0; (3.109)

t2

1
r^( ) =
2

t
x

t1

B2

The natural conditions of (3.109) are given by


+ 12 2 + g B
t

gh

= 0 in (x ; x ) for t 2 (t1 ; t2 );
e

98


Co +
B x

t
Ce +
B x
!
x
g + gh
B
! x
g x + gh
B
x
x

gi

= 0 for t 2 (t1; t2);

1 2
2
1 2
2

t
t

= 0 for t 2 (t1; t2);


e

= 0 for t 2 (t1 ; t2);

= 0 for t 2 (t1 ; t2);


e

= 0 in (x ; x ) for i = 1; 2;
e

ti

( + )j = 0 in (x ; x ) for i = 1; 2;
x

where =

t
x

ti

. The rst of these conditions is the conservation of momentum

equation in the domain. The equation v =  is not derived but is essentially


x

redundant anyway in quasi one-dimensional ow.


The variational principles (3.107) and (3.109) are reciprocal in that the natural
condition in D of (3.107) is the constraint of (3.109) and the natural condition in
D

of (3.109) is the constraint of (3.107).

Reciprocal `P' and `R' Principles

The `P' principle constrained to satisfy conservation of momentum by specifying


(3:106)1 is
K3c = 

Z t2
t1

Z t2 Z x

t1

xe

Co (B)jx

(P (Q;

t + gh)

Ce (B)jx dt +
e

Qx) B dx dt

Z x
o

xe

jt2 g2 jt1 g1 B dx

=0; (3.110)

which has the natural conditions

9
>
>
=
x = 0 >
>
>
>
;

PQ

(P

) + (BQ) = 0

t +gh t

Co

in (x ; x ) for t 2 (t1 ; t2 );
e

Qjx

= 0 for t 2 (t1 ; t2);


99

Qjx

Ce
gi

= 0 for t 2 (t1; t2);

j = 0 in (x ; x ) for i = 1; 2;

t +gh t
i

the second of which is the equation of conservation of mass.


The `R' principle constrained to satisfy conservation of mass by specifying
(3.108) is
K4

=

(Z t
t1

Z t2

R(v;

!!

B Co +
B x
!!
x

g2
B

xe

v+g

Rv

x
B

gh

9
>
>
=
=0 >
>
>
>
;

+v =0
t


Co +
B x

t
Ce +
B x

R + gh
x

R + gh
x
x

gi
B t

h B dx dt

!! !
dt
B Ce +
B x
!! !
)
x


g1 B dx = 0; (3.111)
t

t2

which has the natural conditions

t1

Zx

t1

in (x ; x ) for t 2 (t1; t2 );
e

= 0 for t 2 (t1; t2);




= 0 for t 2 (t1; t2);

t
t

x
B

x
B

(

v )jt

= 0 for t 2 (t1 ; t2);


= 0 for t 2 (t1 ; t2);
= 0 in (x ; x ) for i = 1; 2;
e

= 0 in (x ; x ) for i = 1; 2;
e

the second of which is the equation of conservation of momentum.


Thus the constraint on (3.110) is one of the natural conditions of (3.111) and
the constraint on (3.111) is one of the natural conditions of (3.110), that is, these
constrained `P' and `R' principles are reciprocal in the sense de ned earlier.
100

3.7.3

Time-independent Flows

Functionals for time-independent quasi one-dimensional ows can be derived either from the functionals for time-dependent one-dimensional ows (3.98){(3.101)
or from the functionals for steady two-dimensional ows (3.90){(3.93). In both
cases the procedure is to assume that the physical ow variables are functions of x
alone and in the time-dependent one-dimensional case to deduce the dependence
of  on x and t, as was done for the two-dimensional case. The integrals with
respect to t in (3.98){(3.101) and with respect to y in (3.90){(3.93) can then be
evaluated.
The functionals for time-independent quasi one-dimensional shallow water
ows, derived in either of these ways, may be written as

where

M1

M2

M3

M4

M1

Zx

(p(v; E ) + Q (v

(r(Q; d) + Ed

(P (Q; E )

xe

Zx
xe

Zx
xe

Zx
xe

0)) B dx + CBe ((xo )

(xe )) ;

(3.112)

Q0) B dx + CBe ((xo )

(xe )) ;

(3.113)

Q0) B dx + CBe ((xo )

(xe )) ;

(3.114)

R(v; d)+ Q(v 0)+ Ed) B dx + CBe ((xo ) (xe )) ; (3.115)

M1 (v; Q; ), M2

M2 (d; Q; ), M3

M3 (Q; )

and

M4

M4 (d; v; Q; ).

The boundary function C = C (x; y; t) is now de ned to have the values

and

C (x; y; t)

at x = x ;

C (x; y; t)

CBe
Bo

at x = x ;

C (x; y; t)

= 0

otherwise;

for consistency with conservation of mass, where B = B (x ) and B = B (x ).


e

The energy E is the known function E = E~ + gh, where E~ is a given constant,


101

in order to satisfy conservation of momentum.


The natural conditions of M1 = 0, M2 = 0, M3 = 0 and M4 = 0 may be
deduced from the general formulae (3.36) and (3.37) and are as follows.
For the `p' principle M1 = 0,

9
>
>
>
pv + Q = 0 >
>
>
>
>
=
0
v  =0 >
>
>
>
>
>
>
0
;
(BQ) = 0 >
C
CBe

in (x ; x );
e

Q(xe )

= 0;

Q(xo)Bo

= 0:

For the `r' principle M2 = 0,

9
>
>
>
rQ 0 = 0 >
>
>
>
>
=
rd + E = 0 >
>
>
>
>
>
>
0
;
(BQ) = 0 >
C
CBe

in (x ; x );
e

Q(xe )

= 0;

Q(xo)Bo

= 0:

For the `P' principle M3 = 0,

9
>
>
=
PQ 0 = 0 >
>
>
;
(BQ)0 = 0 >
C
CBe

in (x ; x );
e

Q(xe )

= 0;

Q(xo)Bo

= 0:

102

For the `R' principle M4 = 0,

9
>
>
>
Rv + Q = 0 >
>
>
>
>
>
>
>
>
=
Rd + E = 0 >
>
>
>
v 0 = 0 >
>
>
>
>
>
>
>
0
>
;
(BQ) = 0 >
C
CBe

in (x ; x );
e

Q(xe )

= 0;

Q(xo)Bo

= 0:

Thus each set of natural conditions contains the conservation of mass equation,
the formula v = 0, expressed in di erent variables in the cases of the `p' and `r'
principles, and also the boundary conditions Q(x ) = C and Q(x ) =
e

CBe
Bo

, that

is, the equations of motion, as required. Conservation of momentum is implicit


from using E = E~ + gh.
3.7.4

Constrained and Reciprocal Principles

The variational principles for steady quasi one-dimensional ows can be constrained in the same way as the two-dimensional versions.
Constrained `p' and `P' Principles

The `p' principle based on the functional (3.112) can be constrained to depend
on only one variable by substituting v = 0 into the integrand. The constrained
`p' principle is given by
M1

=

Z x

xe

p(0 ; E )B dx + CBe ((xo )

103

(xe ))

= 0;

(3:116)

where M1 = M1 (), which has the natural conditions


c

!0

1 E 1 02 0B
2
g
!

1 E 1 02 0

2
g
!


1 E 1 02 0B

2
g

= 0 in (x ; x );
e

= 0;

xe

CBe

= 0;

xo

the rst of which is the conservation of mass equation.


The `P' principle may be constrained to satisfy conservation of mass by specifying QB = CB in [x ; x ]. The constrained `P' principle is given by
e

M3

where Q =

CBe
B

=

Z x
xe

P (Q; E )B dx

= 0;

, which has no natural conditions since both Q and E are known

functions.
Constrained `r' and `R' Principles

Following the derivation of the two-dimensional reciprocal principles, the `r' principle can be constrained to satisfy conservation of mass by specifying Q =

CBe
B

and the `R' principle can be constrained by substituting v = 0 into the integrand
of the functional. The constrained principles are given by
M2

where Q =

CBe
B

=

Z x
xe

(r(Q; d) + Ed) B dx = 0;

(3:117)

, which has the natural condition


rd + E

= 0 in (x ; x );
e

de ning E as a function of Q and d, and


M4c = 

Z x
xe

R(0; d) + Ed) B dx + CBe ((xo )

104

(xe ))

= 0;

which has the natural conditions

>
>
=
(BR )0 = 0 >
0

in (x ; x );

>
>
;
Rd + E = 0 >

CBe

(BR )j

xe

= 0;

CBe

(BR )j

xo

= 0;

0

0

that is, conservation of mass and the de nition of E as a function of  and d in


the domain and boundary conditions on the mass ow.
The reciprocity of the constrained variational principles that occurred in twodimensional ows and time-dependent one-dimensional ows has not survived to
the steady one-dimensional case since there is essentially only the one equation
(the conservation of mass equation) which can be used as a constraint.

3.8

Discontinuous Flows

The variational principles considered so far are only valid for continuous shallow
water ows since, in deriving the natural conditions using integration by parts
and the divergence theorem, the variables have been assumed to be di erentiable.
In this section variational principles for time-independent discontinuous ows in
one and two dimensions are derived.
In the variational principles of Sections 3.6 and 3.7 for steady state shallow
water ows the conservation of momentum equation is satis ed implicitly by
specifying E = E~ + gh in D, where E~ is a constant and E is the energy de ned
by either (2.35) or (2.19), depending on whether the ow being considered is onedimensional or two-dimensional. For discontinuous ows there is a jump in the
105

value of E on crossing the discontinuity and this property is used in generating


the variational principles for discontinuous ows.
Let the domain be of the form
D=

(x; y) : x 2 [x ; x ]; y 2
e

"

B (x) B (x)
;

#)

that is, a channel, where there is ow into the channel at x = x and out of the
e

channel at x = x .
o

Consider a discontinuous ow in D which has energy E = E at inlet and E =


e

Eo

at outlet, where E and E are constants such that E


e

> Eo .

Let the channel

bed be horizontal so that the undisturbed uid depth h is a constant for x 2


[x ; x ]. Then, for a time-independent ow, E = E everywhere on the inlet side
e

of the discontinuity and E = E everywhere on the outlet side. Substituting these


o

values for the energy into the functionals (3.112){(3.115) and (3.90){(3.93) and
allowing the variables to be discontinuous yields functionals whose corresponding
variational principles have as natural conditions the equations of discontinuous
motion in one and two dimensions.
3.8.1

Two-dimensional Flows

Let  be the line in D across which the ow is discontinuous. Assume that it


s

divides D into the two regions D and D , where D borders the inlet boundary
e

and D the outlet boundary.


o

The functionals for discontinuous ows in two dimensions, derived from


(3.90){(3.93), are

106

N1 =

+
+
N2 =

+
+
N3 =

+
+
N4 =

+
+

ZZ

ZZ

Do

e

ZZ

ZZ

Do

e

o

C d;

(3.119)

(P (Q; E ) Q:r) dx dy
o

C d +

De

(3.118)

Do

ZZ

C d;

(P (Q; E ) Q:r) dx dy

ZZ

e

o

(r(Q; d) + E d Q:r) dx dy

C d +

De

Do

ZZ

(r(Q; d) + E d Q:r) dx dy

ZZ

e

(p(v; E ) + Q: (v

C d +

De

r)) dx dy
r)) dx dy

(p(v; E ) + Q: (v

De

o

C d;

R(v; d) + Q: (v

R(v; d) + Q: (v

C d +

o

(3.120)

r) + E d) dx dy
r) + E d) dx dy
e

C d;

(3.121)

where N1 = N1(v; Q; ;  ), N2 = N2(d; Q; ;  ), N3 = N3(Q; ;  ) and N4 =


s

N4 (d; v; Q; ; s).

The section of the boundary  in the functionals (3.90){


Q

(3.93) is taken to be , the whole boundary of D, and the boundary function C


is set to zero on the parts of the boundary across which there is no ow;  is
e

the inlet boundary and  is the outlet boundary.


o

The natural conditions of N1 = 0, N2 = 0, N3 = 0 and N4 = 0 may be


deduced from the general formulae (3.60){(3.67).
The natural conditions of the `p' principle N1 = 0 are
9
>
>
>
pv + Q = 0 >
>
>
>
>
=
v r = 0 >
>
>
>
>
r:Q = 0 >>>;

107

in D [ D ;
e

"

Q:n = 0 on e [ o ;
#

C
p + Q:v

@

Q:
= 0;
@ 
"
#
@
Q:n
= 0;
s

@

s

[Q:n] = 0;
s

where the brackets [] = j + j , + denotes the downstream side of  and
s

the upstream side. The rst four of these conditions are the same as for the
continuous case but are valid separately in D and D and on  and  . Using
e

the v = r natural condition the last three natural conditions can be rewritten
as
[p + (Q:n) (v:n)] = 0;
s

[v: ] = 0;
s

[Q:n] = 0;
s

which are the required jump conditions (2.84){(2.86) for discontinuous shallow
water ows.
The natural conditions of the `r' principle N2 = 0 are
9
>
>
>
rQ r = 0 >
>
>
>
>
=
rd + E = 0 >
>
>
>
>
r:Q = 0 >>>;

"

C
r + Ed

in D [ D ;
e

Q:n = 0 on e [ o ;
#

Q:r + Q:n
= 0;
@n 
"
#
@
Q:n
= 0;
@

@

s

[Q:n] = 0:
s

108

The natural conditions of the `P' principle N3 = 0 are


9
>
>
=
PQ r = 0 >
r:Q = 0 >>>;

"

Q:n = 0 on e [ o ;
#

C
P

in D [ D ;

Q:r + Q:n
= 0;
@n 
"
#
@
Q:n
= 0;
@

@

s

[Q:n] = 0:
s

The natural conditions of the `R' principle N4 = 0 are


9
>
>
>
Rv + Q = 0 >
>
>
>
>
>
>
>
>
=
Rd + E = 0 >
>
>
>
v r = 0 >
>
>
>
>
>
>
r:Q = 0 >>>;

"

C
R + Q: (v

in D [ D ;
e

Q:n = 0 on e [ o ;
#

r) + Ed + Q:n @
@n
"

@
Q:n
@

s

s

= 0;

= 0;

[Q:n] = 0:
s

Using the relationships between p and r, P and R, (3.74), (3.76) and (3.71),
the last three natural conditions of

= 0 and

N4

= 0 can be

seen to be the same as the last three natural conditions of

N1

= 0. Thus

N2

= 0,

N3

the variational principles based on the functionals (3.118){(3.121) have as their


natural conditions the equations of shallow water motion, including the jump
conditions at the discontinuity.
109

3.8.2

One-dimensional Flows

Let x be the position of the discontinuity in (x ; x ). Then the functionals for


s

discontinuous ow in one dimension, derived from (3.112){(3.115), are


S1 =

Zx

0)) B dx

(p(v; E ) + Q (v

0)) B dx

xe

Zx

(p(v; E ) + Q (v

xs

+CB ((x )
S2 =

Zx

Zx

Q0) B dx

(r(Q; d) + E d

Q0) B dx

xs

+CB ((x )
S3 =

Zx

Zx

(xe )) ;

Q0) B dx

(P (Q; E )

Q0) B dx

xs

+CB ((x )
S4 =

Zx

xe

Zx

(3.124)

R(v; d) + Q (v

0) + Ee d) B dx

R(v; d) + Q (v

0) + Eo d) B dx

xs

S1

(xe )) ;

+CB ((x )
where

(3.123)

(P (Q; E )
e

xe

(3.122)

(r(Q; d) + E d
e

xe

(xe )) ;

S1 (v; Q; ; xs), S2

(xe )) ;

(3.125)

S2 (d; Q; ; xs), S3

S3 (Q; ; xs)

and

S4

S4 (d; v; Q; ; xs).

The natural conditions of S1 = 0, S2 = 0, S3 = 0 and S4 = 0 may be


deduced using (3.54){(3.57) and are as follows.
For the `p' principle S1 = 0,

9
>
>
>
pv + Q = 0 >
>
>
>
>
=
0
v  =0 >
>
>
>
>
>
>
0
;
(BQ) = 0 >

in (x ; x ) [ (x ; x );
e

110

Q(xe )

= 0;

Q(xo)Bo

= 0;

[BQ]

= 0;

[(p + Qv) B ]

= 0;

C
CBe

xs

xs

where [] = j
xs

xs+

j , the + denotes the x side of x and the the x side;


xs

is given the value E in [x ; x ) and E in (x ; x ].


e

For the `r' principle S2 = 0,

9
>
>
>
>
rQ
>
>
>
>
=
rd + E = 0 >
>
>
>
>
>
>
0
;
(BQ) = 0 >
0 = 0

in (x ; x ) [ (x ; x );
e

Q(xe )

= 0;

Q(xo)Bo

= 0;

[BQ]

= 0;

[(r + Ed) B ]

= 0:

C
CBe

xs

xs

For the `P' principle S3 = 0,


PQ

>
>
=
0 = 0 >

>
>
;
(BQ)0 = 0 >
C
CBe

in (x ; x ) [ (x ; x );
e

Q(xe )

= 0;

Q(xo)Bo

= 0;

[BQ]

xs

= 0;

[BP ]

xs

= 0:

111

For the `R' principle S4 = 0,

9
>
>
>
Rv + Q = 0 >
>
>
>
>
>
>
>
>
=
Rd + E = 0 >
>
>
>
v 0 = 0 >
>
>
>
>
>
>
>
0
>
;
(BQ) = 0 >

in (x ; x ) [ (x ; x );
e

C
CBe

Q(xe )

= 0;

Q(xo)Bo

= 0;

[BQ]

= 0;

xs

[(

R + Qv + Ed) B ]x

= 0:

Thus the natural conditions include the equations of shallow water motion in
(x ; x ) and (x ; x ) and boundary conditions on the mass ow at x and x . The
e

rst jump condition in each case is the condition of no jump in the mass ow
(2.77). Using one-dimensional versions of the equations (3.74), (3.76) and (3.71),
which relate p to r,

and R, the second jump condition in each case can be

recognised as the condition of no jump in the value of the ow stress, de ned by


(2.72), on crossing the point of discontinuity x , that is condition (2.76).
s

112

Chapter 4
Approximations to Quasi
One-dimensional Shallow Water
Flows
The variational principles of Section 3.7 have as natural conditions the equations
of steady state quasi one-dimensional motion in shallow water. This chapter is
concerned with using some of these variational principles to generate approximations to the variables of shallow water ows in channels.
The equations of motion for quasi one-dimensional ow are satis ed by functions for which the functionals of the variational principles of Section 3.7 are
stationary. Solutions of the shallow water equations can be approximated by
nding the functions for which the functionals are stationary with respect to
variations in a nite dimensional space. In this chapter the variables of shallow
water are expanded in terms of nite element basis functions, de ned on a grid
of points extending over the domain of the problem.
113

The particular variational principles used here are the `p' and `r' principles
based on the functionals (3.112) and (3.113). The constrained versions of these
principles, (3.116) and (3.117), both depend on only one variable and are used to
develop algorithms for generating approximations, de ned on xed grids, to the
velocity and depth of ow in a channel. The constrained `p' principle is also used
to generate approximations on adaptive grids.
The nal section of this chapter is concerned with deriving approximations to
discontinuous ows in channels. The constrained `r' principle is used to generate
approximations to the depth on a grid with one moving node which is placed at
the position of the discontinuity. This algorithm is extended to give a method for
approximating discontinuous depth pro les on adaptive grids.
The domains of the problems to be considered are channels with breadth B (x)
for x 2 [xe; xo] and undisturbed uid depth h(x) for x 2 [xe; xo], where B and h
are functions to be de ned later.

4.1

The Constrained `r' Principle

The `r' principle based on the functional (3.113), with variations constrained to
satisfy the conservation of mass equation, can be used to generate approximations
to the depth of uid for shallow water ow in a channel.
The functional of the constrained principle (3.117) is given by

M2c (d) =

xo
xe

(r(Q; d) + Ed) B dx;

(4:1)

where Q and E are known functions of x, namely,


e
Q(x) = BCB
(x)

for x 2 [xe; xo];


114

(4:2)

from the conservation of mass constraint, and

E (x) = E~ + gh(x)

for x 2 [xe; xo];

(4:3)

corresponding to conservation of momentum. In practice the constants C and E~


are calculated from given values of two of the three variables mass ow, depth
and velocity at the inlet boundary. Given the values of two of these variables at

x = xe the value of the third can be deduced from (2.34). Then, using (2.35),
C = Q(xe)
E~ = gd(xe) + 12 v(xe)2 gh(xe):

and

For a continuous ow to exist notice that C and E~ must satisfy


0 

13

2 E~ + gh(x)
1
@
CBe  g
3

B (x)

for x 2 [xe; xo];

(4:4)

using (2.62) and (2.56).


The function d which satis es M2c = 0 is the depth of uid in the channel.
The nature of the stationary value of M2c can be determined by considering the
second derivative

d2M2c = Z xo r B dx:
dd
dd2
xe

From the de nition of r, (3.103),

rdd = Qd3

which is positive if

Q2
d2

g;

(4:5)

> gd, that is (using (2.34)), if v2 > gd and the ow is

supercritical and negative if Qd22 < gd, that is, if the ow is subcritical. Thus, if
the ow is supercritical in the whole of [xe; xo], the function d satisfying M2c = 0
minimises M2c and, if the ow is subcritical in the whole of [xe; xo], the stationary
115

function d maximises M2c. If the ow is critical at isolated points in the channel


then these statements still hold but, if both subcritical and supercritical ows
exist in the channel, it is not possible to say whether the stationary function
minimises or maximises M2c.
4.1.1

The Algorithm

The method used here for generating approximations to d is to substitute into


the functional (4.1) nite element expansions for d and to nd the parameters
of the expansions for which M2c is stationary with respect to variations in the
parameters.
Let the interval [xe; xo] be divided into n 1 regular intervals by the points

x1; . . . ; xn given by
xi = ((ni 1)
1) (xo xe ) + xe

i = 1; . . . ; n:

(4:6)

Let 1(x); . . . ; n(x) be nite element basis functions, de ned on the grid given
by (4.6), and let

dh (x) =

n
X
i=1

di i(x)

(4:7)

be the approximation to d, where the di (i = 1; . . . ; n) are parameters of the


solution, to be determined.
Consider the nite dimensional version of the functional (4.1),

L(d) =

xn
x1

r(Q; dh) + Edh B dx;

where d = (d1; . . . ; dn )T and Q and E are given by (4.2) and (4.3).


The parameters d for which (4.7) is an approximation to d are such that

L is stationary with respect to variations in d. They are found by solving the


116

non-linear set of equations


Z xn
@L
Fi(d) = @d = x (rdh + E ) iB dx = 0
1
i

i = 1; . . . ; n:

(4:8)

There is more than one solution of the set of equations (4.8). One possible
solution involves negative values of di and is not considered since it has no physical
meaning. In the case of approximations to non-critical ows there are two other
solutions | one which approximates subcritical ow and one which approximates
supercritical ow. In the case of ows which become critical at a point in the
domain there is a further possibility, that is, an approximation to transitional
ow.
In the present work (4.8) is solved using Newton's method. The Jacobian J
is given by
(

@ 2L = Z xn r h h B dx ;
i
=
J (d) = fJij g = @F
i j
d d
@dj
@dj @di
x1

(4:9)

and is the Hessian of L.


Given an approximation dk to the solution d, Newton's method provides an
updated approximation
dk+1 = dk +  dk ;

(4:10)

J (dk ) dk = F(dk ):

(4:11)

where
This yields a sequence of approximations to d. The process is repeated until

k
di < tolerance:
max
i

(4:12)

Then di = dik for i = 1; . . . ; n are the values of the parameters in the approximation (4.7) which make L(d) stationary. The Jacobian J and the vector F are
117

calculated using ve point Gaussian quadrature, where it is assumed that the


error introduced by the numerical integration is suciently small that the nite
element solution, for a particular tolerance in (4.12), is una ected.
Let d^ satisfy F(d^ ) = 0 and let > 0 be such that the domain S =
n

d : d d^ <  <n contains the point d^ , where jjjj is an appropriate

norm. Assume that the rst derivatives of J are continuous in S and that J
is non-singular in S . Then, there exists  > 0 such that Newton's method is

quadratically convergent whenever d0 d^ <  (Johnson and Riess (1982)).


From (4.9) J has the form of a weighted mass matrix, where Brdhdh is the
weight function. Using (4.5) it can be seen that, if the approximate solution in
[x1; xn] is subcritical throughout the Newton iteration, J is negative de nite and
the solution of (4.8) maximises L. Alternatively, if the approximate solution is
supercritical in [x1; xn] for all iterations, J is positive de nite and the solution of
(4.8) minimises L.
Thus, given values for E~ and C , it is possible, using Newton's method, to
generate nite element approximations to the depth of ow in a channel for
continuous ows which are either supercritical in the whole domain or subcritical
in the whole domain. The success of the method relies on choosing the initial
approximation d0 to d such that the approximations dk , calculated from (4.10)
and (4.11), have either all subcritical components or all supercritical components.
For each set of conditions, E~ and C , two approximations will be considered | one
corresponding to subcritical ow and the other to supercritical ow; the choice
of d0 determines which solution is found by the algorithm.
If the ow for which an approximation is being sought includes both subcritical
118

and supercritical motion and if an approximation, to the approximate solution,


at an iteration step has both subcritical and supercritical values the Jacobian is
inde nite and Newton's method may fail to converge to the solution.
The algorithm is implemented on the equi-spaced grid given by (4.6), with

xe = 0, xo = 10 and n = 21. Two sets of basis functions are considered; the


rst, li for i = 1; . . . ; n, leads to continuous piecewise linear approximations
and the second, ic for i = 1; . . . ; n 1, gives discontinuous piecewise constant
approximations. The basis functions are de ned by

l1(x) =

li(x) =

ln(x) =
and

8
>
>
>
>
<
>
>
>
>
:
8
>
>
>
>
>
>
>
>
>
<
>
>
>
>
>
>
>
>
>
:
8
>
>
>
>
<
>
>
>
>
:

x2 x x 2 [x ; x ]
1 2
x 2 x1
;
0
x 62 [x1; x2]
x xi 1 x 2 [x ; x ]
i 1
i
xi xi 1
xi+1 x x 2 [x ; x ]
i
i+1
x
x
i+1

i = 2; . . . ; n 1; (4.13)

x 62 [xi 1; xi+1]

x xn 1 x 2 [x ; x ]
n 1
n
xn xn 1
0
x 62 [xn 1; xn]
8
>
>
>
<

ic (x) = >

1 x 2 (xi; xi+1)

>
>
:

0 x 62 (xi; xi+1)
and are shown in Figure 4.1.

i = 1; . . . ; n 1;

(4:14)

For the basis functions de ned by (4.13), J is tridiagonal and (4.11) is solved
quickly for dk using Gaussian elimination and back substitution. For the basis
functions de ned by (4.14), J is diagonal and (4.11) is easily solved.
The method is used to nd approximations to ows in a number of di erent

119

a)

(x)

(x)

i=2,...,n-1

(x)

x1

x2

xi-1

xi

b)
1

xi+1

xn-1

xn

(x) i=1,...,n-1

xi

xi+1

Figure 4.1: One-dimensional basis functions a) piecewise linear and b) piecewise


constant.
channels. Several breadth functions are considered. These are

k
in [xe; xo]; for k = 2; 4; 6; 8; (4.15)
B1;k (x) = 6 + 4 1 2 xx xxe
o
e
8


 
>
>
x xe
>
< 6+4 1
in [xe;  ]
 xe
for  = 12 ; 1; 32 ; 2: (4.16)
B2; (x) = >
;





>
>
xo x
: 6+4 1
in [; xo]
xo 
Moving the reference level for potential energy from z = 0 to z = h(xe ) is

equivalent to rede ning the equilibrium depth to be h(x) := h(x) h(xe), so that

h(xe) = 0, and the constant E~ to be E~ := E~ + gh(xe). This is now assumed to


be the case. The equilibrium depth functions considered here are

h1(x) = 0

in [xe; xo];

(4.17)

h2(x) = H xx xxe
o
e
h3(x) = 4H (x xe) (xo 2 x)
(xo + xe )

in [xe; xo];

(4.18)

in [xe; xo]:

(4.19)

120

The energy E~ is given the value 50. In order to guarantee that a continuous
solution exists the value of mass ow at inlet C must satisfy
13
0 
2
~
2
+
(
)
E
gh
x
1
B (x)
@
A
in [xe; xo];
Cg
3
Be
from (4.4). For the case h = h1 this is just
~
C  g1 23E

! 32

Bmin ;
Be

where

Bmin = x2min
B (x):
[xe;xo ]
Thus, for the given breadth functions (4.15) and (4.16), C must have a value such
that C  C, where

C = p20 :

(4:20)
3
A value of C = C yields ows which are critical at the point of minimum breadth.
A value of C = 10 is used to give examples of non-critical ows.
The initial approximation d0 to the solution d determines whether the nite
element solution is an approximation to subcritical or to supercritical ow. In
practice subcritical approximations are obtained by specifying d0i > d for i =
1; . . . ; n, where d is the critical depth, given by (2.65). In this case, for h = h1 ,
0
d = 100
30  3:33. Supercritical approximations are obtained by specifying di < d

for i = 1; . . . ; n. Transitional ows are not considered because of problems with


the convergence of Newton's method with an inde nite Jacobian.
Let the tolerance on the Newton iteration be 10 3. Consider the channel with
breadth B = B1;6. Using the piecewise linear basis functions (4.13) Newton's
method converges to the supercritical approximation from the initial approximation d0i = 1 for i = 1; . . . ; n in 15 iterations for critical ow and 7 iterations
121

b)

a)

10
breadth

depth

5.0

2.5

0.0

0
0

5
x

10

5
x

10

Figure 4.2: a) Piecewise linear depth approximations on a xed grid and b)

B1;6(x).
for non-critical ow. Subcritical approximations are obtained, using d0i = 4 for

i = 1; . . . ; n, in 10 iterations for critical ow and 3 iterations for non-critical ow.


Figure 4:2a shows the nite element approximations to the depth for the critical
and non-critical ows generated under these conditions. The top two lines are
the approximations to the subcritical ows and the other two approximate the
supercritical ows, for the two values of mass ow at inlet C = 10 and C = C,
where C is de ned by (4.20). Figure 4:2b shows a linear interpolation to the
breadth function using the 21 grid points given by (4.6). The sides of the channel
are almost parallel for part of its length at the narrowest part so the depths of the
two critical approximations are close to the critical depth value for some distance
around the point x = 5.
Figure 4.3 shows corresponding results for B = B2;2 with  = 7:5.
Using the piecewise constant basis functions (4.14), in the channel with B =
122

b)
5.0

10
breadth

depth

a)

2.5

0.0

0
0

5
x

10

5
x

10

Figure 4.3: a) Piecewise linear depth approximations on a xed grid and b) B2;2(x)
with  = 7:5.

B1;6 and h = h1 , the supercritical approximation, using d0i = 1 for i = 1; . . . ; n,


is found after 14 iterations for critical ow and 7 iterations for non-critical ow
while the subcritical approximation, using d0i = 4 for i = 1; . . . ; n, is found after
10 iterations for critical ow and 3 iterations for non-critical ow. Figure 4.4a
shows these approximations and Figure 4.4b is the channel breadth.
Consider the channel with B = B1;2 and h = h2 for H = 0:2. Figure 4.5a
shows the subcritical and supercritical piecewise linear approximations for C = 10
and C = 7:7. The dashed line shows the position of the channel bed. Notice that
the depth pro les are no longer symmetric about the line x = 5. The breadth

B1;2 is shown in Figure 4.5b. With d0i = 1 for i = 1; . . . ; n the supercritical


approximations are found after 6 iterations in the C = 10 case and 5 iterations in
the C = 7:7 case. Using d0i = 4 for i = 1; . . . ; n the subcritical approximations are
found after 3 iterations in the C = 10 case and 3 iterations in the C = 7:7 case.
123

b)

a)

10
breadth

depth

5.0

2.5

0.0

0
0

5
x

10

5
x

10

Figure 4.4: a) Piecewise constant depth approximations on a xed grid and b)

B1;6(x).

a)

b)
10
breadth

depth

5.0

2.5

0.0

0
0

5
x

10

5
x

10

Figure 4.5: a) Piecewise linear depth approximations for B = B1;2 and h = h2


with H = 0:2 and b) B1;2(x).
124

4.1.2

Error Bounds

An error bound for the piecewise constant approximations to d can be calculated.


Proposition The piecewise constant approximations, de ned using (4.7) and

(4.14) and generated from (4.8), converge linearly to the shallow water depth for
wholly subcritical or wholly supercritical ows.
Proof The parameters of the approximation dh are de ned as those which sat-

isfy (4.8), that is,


Z

xn

(rdh + E ) ic B dx = 0

x1

i = 1; . . . ; n 1:

(4:21)

The exact depth d satis es the equation

rd + E = 0;
from the de nitions of r (3.103), mass ow (2.34) and energy (2.35). Thus
Z

xn
x1

(rd + E ) ic B dx = 0

i = 1; . . . ; n 1:

(4:22)

Subtracting (4.22) from (4.21) gives


Z

xn
x1

and so

(rdh rd ) ic B dx = 0

xi+1
xi

(rdh rd ) B dx = 0

i = 1; . . . ; n 1;
i = 1; . . . ; n 1;

(4:23)

using (4.14).
Both d and dh are di erentiable on each interval [xi; xi+1] and thus, using the
Mean Value Theorem,


rdh rd = dh d r (Q; )j
125

=

(4:24)

for (x) between dh(x) and d(x), where r = Q32 g, from (3.103). Thus if dh and

d are completely supercritical r > 0 and if dh and d are completely subcritical


r < 0 in [xi; xi+1]. Therefore, substituting (4.24) into (4.23) to give
Z

xi+1

dh d r (Q; )j

xi

=

B dx = 0;

implies that dh d = 0 at at least one point (say x = x^) in (xi; xi+1) for completely
subcritical or supercritical ows, since B > 0.
Now dh is constant on [xi; xi+1] so, for x 2 [xi ; xi+1],
Z

x
x
^

d0() d =

d0() dh0() d = d() dh () xx^ = d(x) dh (x):

x
^

Thus
Z

xi+1
xi

d(x) dh (x) 2 dx =

xi+1
xi
xi+1
xi

Z


x
x
^

2

d0() d dx
2

(xi+1 xi) max


jd0 j dx
Ii

= (xi+1 xi)3 max


jd0 j2 ;
Ii
0 (x)j2 .
where max
d
jd0 j2 = x2max
j
Ii
[x ;x ]
i+1

Therefore the square of the L2 error is




d d

=
=


xo
xe

n
X1 Z xi+1
i=1 xi
n
X1
i=1

d dh 2 dx


(4.25)


d dh 2 dx

(xi+1 xi)3 max


jd0 j2
Ii

(xi+1 xi)2 x2max


 max
jd0 j2
i
[x ;x ]
e

n
X1
i=1

(xi+1 xi)

= max
(xi+1 xi)2 x2max
jd0 j2 (xo xe );
i
[x ;x ]
e

that is,


0 j (x x ) 21 ;
d dh  x x2max
d
j
o
e
[xe;xo ]

where, for the equi-spaced grid (4.6), x = xne x1o .


126

critical ows

non-critical ows

x

10
2

6:028  10

8:608  10

2:687  10

5:097  10

10
22

1:870  10

3:521  10

1:188  10

2:654  10

10
23

7:249  10

1:550  10

4:882  10

1:218  10

17

10
24

3:198  10

7:249  10

2:192  10

5:772  10

33

10
25

1:504  10

3:504  10

1:038  10

2:805  10

65

10
26

7:293  10

1:722  10

5:050  10

1:382  10

129

10
27

3:592  10

8:539  10

2:491  10

6:860  10

257

10
28

1:782  10

4:252  10

1:237  10

3:417  10

513

10
29

8:878  10

2:121  10

6:164  10

1:705  10

1025

10
210

4:431  10

1:060  10

3:077  10

8:520  10

subcritical

supercritical

subcritical

supercritical

Table 4.1: L2 errors for piecewise constant depth approximations.


Thus the piecewise constant depth approximation converges linearly with n to
the solution d.
The L2 error is calculated for piecewise constant approximations on grids
with di erent numbers of nodes for the example B = B1;2, de ned by (4.15), and

h = h1, de ned by (4.17). The energy E~ = 50 and both C = C, de ned by


(4.20), and C = 10 are considered. The results are given in Table 4.1, from which
it can be seen, more especially for larger n, that as the interval length x halves
the L2 error also halves.
The L2 errors for the corresponding piecewise linear approximations are given
in Table 4.2. It can be seen that the convergence is almost quadratic.
127

critical ows

n x subcritical

non-critical ows

supercritical

subcritical

supercritical

10
2

1:178  10

9:217  10

1:087  10

3:975  10

10
22

2:087  10

2:084  10

6:606  10

9:668  10

10
23

4:395  10

5:122  10

1:155  10

1:769  10

17

10
24

9:825  10

1:235  10

2:842  10

4:714  10

33

10
25

2:304  10

3:135  10

6:858  10

1:249  10

65

10
26

5:595  10

7:657  10

1:651  10

3:976  10

129

10
27

1:280  10

2:234  10

4:401  10

1:453  10

Table 4.2: L2 errors for piecewise linear depth approximations.

4.2

The Unconstrained `r' Principle

Finite element expansions for the mass ow and the velocity potential, as well as
for the uid depth, can be obtained using the unconstrained `r' principle, based
on the functional (3.113). The method used here is a simple extension of the
algorithm in Section 4.1.
Consider the grid de ned by the points (4.6), with xe = 0, xo = 10 and n = 21.
Let

Qh(x) =

n
X
i=1

Qi i(x) ; dh(x) =

n
X
i=1

di i(x) ; h(x) =

n
X
i=1

i i(x)

(4:26)

be approximations to the mass ow, depth and velocity potential, respectively,


where the i (i = 1; . . . ; n) are nite element basis functions. Substituting (4.26)

128

into the functional (3.113) yields the nite dimensional version

L(Q; d; ) =

xn

r(Qh; dh) + Edh h0Qh B dx + CBe h(xn ) h(x1) ;

x1

(4:27)

where Q = (Q1; . . . ; Qn)T , d = (d1 ; . . . ; dn )T , =(1 ; . . . ; n)T and E (x) = E~ +

gh(x). The parameters Q, d and  are calculated by solving


@L = 0 ; @L = 0 ; @L = 0 for i = 1; . . . ; n:
@Qi
@di
@i

(4:28)

Let the i be the piecewise linear basis functions de ned by (4.13). Then
equations (4:28)3 yield
Z

xn

x1

0iQhB dx + CBe ( i(xn ) i(x1)) = 0 i = 1; . . . ; n;

which may be rewritten as


2
X
j =1
i+1
X
j =i 1
n
X
j =n 1

Qj

Qj
Qj

x2
x1

xi+1
xi 1

xn
xn 1

01 j B dx =

CBe;

0i j B dx = 0

i = 2; . . . ; n 1;

0n j B dx = CBe ;

or as,

AQQ = CQ;

(4:29)

where AQ is a constant n  n matrix and CQ is a constant n  1 vector with only


rst and last entries non-zero. The matrix AQ is of rank n 1 and is singular
but, using the boundary condition Q1 = C , the solution of (4.29) is unique. AQ is
tridiagonal and Q is calculated using Gaussian elimination and back substitution.
Equations (4:28)2 yield
Z

xn
x1

(rdh + E ) i B dx = 0 i = 1; . . . ; n;
129

which, once Qh is known, can be solved for dh by the method of Section 4.1.
Equations (4:28)1 give
Z

xn

x1

rQh h 0 iB dx = 0 i = 1; . . . ; n;

which may be written as


2
X
j =1
i+1
X
j =i 1
n
X
j =n 1

j

j
j

x2
x1

xi+1
xi 1

xn
xn 1

0 B dx
j

i 0j B dx =
n 0j B dx =

x2
x1

Z
Z

rQh 1B dx;

xi+1
xi 1
xn
xn 1

rQh iB dx i = 2; . . . ; n 1;
rQh n B dx;

or as

A = C;

(4:30)

where A is an n  n matrix and C is an n  1 vector. Once Qh and dh are


known  can be calculated directly. The matrix A is of rank n 1 and singular
but  is a potential function and the important quantity is its gradient so one of
the values, say 1, is speci ed arbitrarily. This procedure is equivalent to setting
the arbitrary constant in  by assigning its value at the boundary.
Results for critical ow in a channel with B = B1;4, de ned by (4.15), and

h = h1, de ned by (4.17), are shown in Figure 4.6. The energy E~ is taken to be
50. The piecewise linear approximation to the mass ow is shown in Figure 4.6a.
The piecewise linear approximations to the velocity potential and depth for a
supercritical ow are given in Figures 4.6b and 4.6c, respectively. Figure 4.6d
shows the piecewise constant approximation to the supercritical velocity derived
by taking the gradient of the piecewise linear velocity potential approximation
in each interval [xi; xi+1] for i = 1; . . . ; n 1. The Newton iteration to nd dh
130

a)

b)
10
Phi/10000

mass flow

20

10

0
0

10

10

d)

c)

10
velocity

5.0

depth

5
x

2.5

0.0

0
0

10

10

Figure 4.6: a) Mass ow, b) velocity potential, c) depth and d) velocity approximations for B = B1;4 | supercritical case.
converges after 13 iterations, using d0i = 1 for i = 1; . . . ; n, with a tolerance of
10 3 .
Corresponding results for the subcritical ow are given in Figure 4.7. The
Newton iteration converges from d0i = 4 for i = 1; . . . ; n in 8 iterations.
Notice that the velocity approximation is not quite symmetric about the line

x = 5, even though the breadth and equilibrium uid depth functions are. This is
probably a consequence of using approximations to mass ow and depth in (4.30).
By increasing the number of grid points the approximations can be improved |
Figure 4.8 shows the supercritical solutions for n = 61.
Thus, although approximations to all of the variables can be generated using
the unconstrained `r' principle, in the case of the velocity potential (and therefore
131

b)

a)

10
Phi/10000

mass flow

20

10

0
0

10

10

c)

d)
10
velocity

5.0

depth

2.5

0.0

0
0

10

10

Figure 4.7: a) Mass ow, b) velocity potential, c) depth and d) velocity approximations for B = B1;4 | subcritical case.
b)

a)

10
Phi/10000

mass flow

20

10

0
0

10

10

c)

d)
10
velocity

5.0

depth

2.5

0.0

0
0

10

5
x

Figure 4.8: As Figure 4.6 | n = 61.


132

10

the velocity) it is not ideal. However a variational principle exists which depends
on the velocity potential alone, that is, the `p' principle, based on the functional
(3.112), constrained by v = 0. In using this constrained principle to seek an
approximation to  (and therefore v) no other approximations are made and
more accurate results might be expected.

4.3

The Constrained `p' Principle

The functional of the constrained `p' principle (3.116) is given by

M1c () =

xo

xe

p(0; E )B dx + CBe ((xo) (xe)) ;

(4:31)

where E (x) = E~ + gh(x) and the constants E~ and C are prescribed.


The velocity potential of a shallow water ow is the function  which satis es

M1c = 0. The nature of the stationary value of M1c can be deduced by considering
d2M1c = Z xo p 0 0 B dx:
d02 xe  
From the de nition of p, (3.102),


1
3
2
0
p0 0 = g 2  E :

(4:32)

Thus, from (4.32), if the ow is supercritical in the whole of [xe; xo] then the
solution  of M1c = 0 minimises M1c and if the ow is subcritical in the whole of
[xe; xo] the solution maximises M1c.
4.3.1

The Algorithm

The algorithm for generating an approximation to the velocity potential using


(4.31) is similar to that of Section 4.1.
133

Let the xi (i = 1; . . . ; n), given by (4.6), de ne the grid. Let the nite element
approximation to the velocity potential be given by

h (x) =

n
X
i=1

i i(x);

where the i are the piecewise linear basis functions (4.13) and the i are parameters of the solution. Thus the nite dimensional version of the functional of the
constrained `p' principle is given by

L() =

xn

x1

p(h 0; E )B dx + CBe h(xn ) h(x1) ;

where E (x) = E~ +gh(x) and = (1 ; . . . ; n)T . The approximation to the velocity
potential is determined by the  which causes L to be stationary, that is, the 
which satis es

@L = Z xn p 0 0 B dx + CB ( (x ) (x )) = 0 i = 1; . . . ; n:
Fi() = @
e
i
n
i
1
h i
x
i

(4:33)

The solution of the non-linear set of equations (4.33) is found using Newton's
method. The Jacobian is given by
(

Z xn

2
@F
@
L
i
0
0
J () = fJij g = @ = @ @ = x ph 0h0 i j B dx ;
1
j
j
i

which is the Hessian of L and has the form of a weighted mass matrix, with
weight ph 0 h 0 B . From (4.32) J is negative de nite for wholly subcritical ows
and positive de nite for wholly supercritical ows.
Given an initial approximation 0 to the solution  Newton's method produces a sequence of approximations k from
k+1 = k + k ;
134

(4:34)

where

J (k ) k = F(k ):

(4:35)

The sequence ends when


k
i < tolerance:
max
i

(4:36)

The Jacobian and the vector F are integrated exactly. The Jacobian is tridiagonal
and (4.35) is solved by Gaussian elimination and back substitution. The initial
approximation 0 is given by

0i = (i 1) v0

i = 1; . . . ; n;

where v0 is assigned a value which determines whether the approximation being calculated is an approximation to subcritical or to supercritical ow. Let

cmin
c, where c is de ned by (2.63). Then, if v0 <
 = x2min
[x1 ;xn ]

c , the

xn x1 min
n 1

approximation will be subcritical. Let cmax


c. Then, if v0 > xnn
 = x2max
[x ;x ]
1

c ,

x1 max

the approximation will be supercritical.


The algorithm is implemented on the grid (4.6), with xe = 0, xo = 10 and

n = 21. The energy E~ is again taken to be 50. Approximations to ows in


channels with breadths given by (4.15) and (4.16) and uid depths below the
level z = 0 given by (4.17) and (4.18) are considered.
For h = h1 the value of mass ow at inlet C = C, where C is given by (4.20),
is used to give examples of critical ows and C = 10 is used to give examples of
non-critical ows.
Consider the channel with breadth B = B1;6 and let the tolerance in (4.36)
be 10 3 . The method converges to the subcritical approximation in 4 iterations,
using v0 = 1, and to the supercritical approximation in 5 iterations, using v0 = 5,
135

b)

a)

10
velocity

phi/12

10

0
0

10

10

Figure 4.9: a) Velocity potential and b) velocity approximations for B = B1;6 and

h = h1 .
for non-critical ows. For critical ows the method converges to the subcritical
approximation in 7 iterations, using v0 = 1, and to the supercritical approximation in 8 iterations, using v0 = 5. Results for the critical ows are shown
in Figure 4.9. Figure 4.9a shows the piecewise linear velocity potential approximations, the top line corresponding to supercritical ow and the bottom line to
subcritical ow. Figure 4.9b shows the piecewise constant velocity approximations derived from the gradients of the velocity potential approximations in each
element. Notice that the velocity approximations are approximately symmetric
about the line x = 5 as is expected for ows in a channel whose breadth and
equilibrium depth functions are symmetric about this line.
For B = B1;2 and h = h2 with H = 0:2 Figure 4.10a shows the piecewise
linear approximations to the velocity potential for subcritical and supercritical
136

a)

b)
10

velocity

phi/11

10

0
0

10

10

Figure 4.10: a) Velocity potential and b) velocity approximations for B = B1;2


and h = h2 with H = 0:2.
ows with C = 10. The corresponding piecewise constant approximations to the
velocity are given in Figure 4.10b.
4.3.2

Errors

The L2 error of the approximations to the velocity, derived in Section 4.3.1, is


de ned by


v 

Z

xo

xe

v 

0 2

1

dx 2 :

Table 4.3 shows the L2 errors for piecewise constant velocity approximations
in the channel with B = B1;2 and h = h1 . The energy E~ is given the value
50, C = C, de ned by (4.20), is used to derive the critical approximations and

C = 10 produces the non-critical approximations. It can be seen that, as the grid


is re ned, the convergence of h0 to v is linear.
137

critical ows

x

non-critical ows

subcritical

supercritical

subcritical

supercritical

10
2

3:266  100

2:744  100

1:933  100

1:444  100

10
22

1:582  100

1:352  100

8:914  10

6:549  10

10
23

7:782  10

6:653  10

4:449  10

3:261  10

17

10
24

3:861  10

3:296  10

2:227  10

1:632  10

33

10
25

1:923  10

1:640  10

1:114  10

8:164  10

65

10
26

9:597  10

8:179  10

5:569  10

4:082  10

129

10
27

4:794  10

4:084  10

2:784  10

2:041  10

257

10
28

2:396  10

2:041  10

1:392  10

1:021  10

513

10
29

1:198  10

1:020  10

6:961  10

5:103  10

1025

10
210

5:987  10

5:100  10

3:481  10

2:552  10

Table 4.3: L2 errors for piecewise constant velocity approximations.

4.4

The Constrained `p' Principle | Adaptive


Grid

The approximations derived so far in this chapter have all been de ned on the
xed regular grid given by the points (4.6). In this section a method of generating
irregular grids using the constrained `p' principle (3.116) is investigated.
The method of generating irregular grids and the corresponding approximations to the velocity potential using (3.116) is similar to the method of Section 4.3
in that a nite element expansion for the velocity potential is substituted into
the functional (4.31) and the values of the parameters of the expansion are found
138

such that the functional is stationary with respect to variations. The di erence
here is that the positions of the internal grid points are also allowed to vary.
Let the domain of integration [xe; xo] be divided initially into n 1 regular
intervals [xi; xi+1] (i = 1; . . . ; n 1) by the points xi (i = 1; . . . ; n) de ned by
(4.6). Then let

h (x; x) = 1 1(x; x1; x2) +

n
X1
i=2

i i(x; xi 1; xi; xi+1) + n n(x; xn 1 ; xn)

be the nite element expansion of the velocity potential , de ned on this grid.
The i are the piecewise linear basis functions given by

1(x; x1; x2) =

i(x; xi 1; xi; xi+1) =

n(x; xn 1; xn) =

8
>
>
>
>
<
>
>
>
>
:
8
>
>
>
>
>
>
>
>
>
<
>
>
>
>
>
>
>
>
>
:
8
>
>
>
>
<
>
>
>
>
:

x2 x x 2 [x ; x ]
1 2
x2 x1
;
0
x 62 [x1; x2]
x xi 1 x 2 [x ; x ]
i 1
i
xi xi 1
xi+1 x x 2 [x ; x ]
i
i+1
x
x
i+1

i = 2; . . . ; n 1;

x 62 [xi 1; xi+1]

x xn 1 x 2 [x ; x ]
n 1
n
xn xn 1
;
0
x 62 [xn 1; xn]

the i are the values of the approximation at the grid points and x = (x1; . . . ; xn)T
is the vector of grid points.
The discrete version of the functional of the constrained principle, in this case,
is

L(; x) =

x2
x1

++

xn
xn 1

where = (1; . . . ; n)T , h 0 

p(h 0; E )B dx + CBe h (xn ; x) h(x1; x) ;

@h
@x

and E = E~ + gh. The initial nite element


139

solution for the velocity potential is found by solving

@L =
Fi(; x) = @
i

x2
x1

++

xn
xn 1

ph 0 0iB dx + CBe [ i]xxn1 = 0 i = 1; . . . ; n


(4:37)

for  with the xi xed and given by (4.6). This is done using Newton's method,
as in Section 4.3.
New positions for the internal grid points are then found by solving

@L
Gi (; x) = @x
i
= [pB ]xi +

x2
x1

++

xn

xn 1

"

h0
h xn
@
@
0
ph @x B dx + CBe @x = 0
i
i x1
i = 2; . . . ; n 1; (4.38)

for xi (i = 2; . . . ; n 1), by Newton's method. The Jacobian is the (n 2)  (n 2)


matrix given by
(

J (; x) = fJij g = @x@L@x


j
i
8 "
#
h0
<
= : ph 0 @
@xj B xi

"

h0
ph 0 @
@xi B xj
!
Z x2
Z xn !
h0
h0
2 h0
@
@
@

+
++
ph 0h0 @x @x + ph 0 @x @x B dx
x1
xn 1
j
i
j
i
" 2 h # xn )
+CBe @x@ @x
;
j

i x1

which is tridiagonal so that the equation

J (; xk ) xk = G(; xk )


is solved for xk by Gaussian elimination and back substitution. A sequence of
approximations to x is generated using
xk+1 = xk +  xk :

140

The process is repeated until


k
xi < tolerance:
max
i

(4:39)

The procedure is to return to (4.37) and nd  on the new grid, using the
solution for  on the previous grid as the initial approximation 0. Equations
(4.38) are then solved again to modify the grid further, the initial approximation
x0 being given the values of the solution x at the previous iteration.

This process is repeated until


max
(jFij ; jGi j)
i

(4:40)

changes by less than some percentage between successive iterations on the positions of the grid nodes.
The energy E~ is assigned the value 50. The two values of mass ow at inlet C =

C, given by (4.20), which generates critical ows, and C = 10, which generates
examples of non-critical ows, are considered. The criterion for convergence using
(4.40) is that (4.40) changes by less than 5% between two successive iterations.
Results are given for the channel with xe = 0, xo = 10 and breadth B = B3,
where


x
B3(x) = 8 + 2 cos 5 ;

which is shown in Figure 4.11. The uid depth below the reference level z = 0 is

h = h1 (equation (4.17)).
The tolerance on the Newton iteration for  is taken to be 10 7 and on (4.39)
to be

xo xe
n 1

10 4 , where n is the number of grid points. The approximations to

subcritical and supercritical velocities for C = C , derived as the gradients of the


piecewise linear approximations to the velocity potential, for n = 5; 7 and 11 are
141

breadth

10

0
0

5
x

10

Figure 4.11: The breadth function B3(x).


shown in Figure 4.12. The dots represent the nal positions of the grid points.
The subcritical approximation with n = 5, Figure 4.12a, requires 28 sets of iterations to converge and the grid points have moved from their initial equi-spaced
positions. The subcritical approximations with n = 7 and 11, Figures 4.12c and
4.12e respectively, both converge after one set of iterations, the grid points have
moved slightly towards the line x = 5, although this is not obvious from the
gure. The supercritical approximations with n = 5, 7 and 11, Figures 4.12b,
4.12d and 4.12f respectively, all converge after one set of iterations; there is no
discernible motion of the grid points in these cases.
Table 4.4 gives the L2 errors of the approximate solutions for various n, in
the same channel and with the same conditions as above. For comparison, the
corresponding L2 errors for approximations generated on xed, equi-spaced grids
are also given. For the supercritical approximations there is a slight improvement
in the L2 error with n = 5, 7 and 9. For the subcritical approximations the
142

b)

a)

10

velocity

velocity

10

0
0

10

d)
10

velocity

10

velocity

10

c)

0
0

10

10

e)

f)
10

velocity

10

velocity

0
0

10

10

Figure 4.12: Velocity approximations for a) and b) n = 5, c) and d) n = 7 and e)


and f ) n = 11

143

xed grids

n x subcritical

adaptive grids

supercritical

subcritical

supercritical

10
2

3:322  100

2:730  100

3:322  100

2:730  100

10
4

1:826  100

1:574  100

1:608  100

1:572  100

10
6

1:212  100

1:054  100

1:208  100

1:053  100

10
8

9:045  10

7:876  10

9:030  10

7:875  10

11

10
10

7:211  10

6:280  10

7:204  10

6:280  10

21

10
20

3:576  10

3:111  10

3:575  10

3:111  10

31

10
30

2:377  10

2:066  10

2:376  10

2:066  10

Table 4.4: Comparison of L2 errors for piecewise constant velocity approximations.


improvement is more pronounced with n = 5, 7 and 9 but is only slight for

n = 11 and negligible for n = 21 and 31.

4.5

Discontinuous Flows | The Constrained


`r' Principle

In this section the `r' principle, based on the functional (3.113), constrained to
satisfy the conservation of mass equation is used to generate approximations to
the depths in discontinuous shallow water ows. In order to achieve an accurate
nite element approximation to the depth one of the grid nodes must be positioned
at the point of discontinuity; this requires the use of irregular grids.
The functional of the `r' principle for discontinuous ow (3.123), constrained
144

to satisfy conservation of mass, is

S2c (d; xs) =


where Q(x) =

xs

xe

CBe
B (x )

(r(Q; d) + Eed) B dx +

xo
xs

(r(Q; d) + Eod) B dx;

(4:41)

. The equilibrium uid depth h is assumed constant so that

the energy E , de ned by (2.35), has the constant value Ee in [xe; xs) and the
constant value Eo in (xs; xo]. The values of Ee and Eo are deduced from boundary
conditions and, from (2.78), are such that Ee > Eo . The natural conditions of
the rst variation of S2c are

rd + Ee = 0 in (xe; xs);
rd + Eo = 0 in (xs; xo);

(4.42)

[r + Ed]xs = 0;
where the coecients of the total variation of d on either side of xs have been
equated, that is, the equation

djxs+ + d0jxs+ xs = djxs + d0jxs xs

(4:43)

is assumed satis ed. It is not obvious how, in practice, it might be possible to


construct variations that satisfy (4.43). It is the assumption that (4.43) is true
which gives rise to the natural jump condition (4:42)3. So, if variations satisfying
(4.43) cannot be found then, in order to generate approximations to the depth in
discontinuous shallow water ows, (4:42)3 must be enforced in some way.
The method of nding approximations is based on that of Section 4.1 in
that nite element expansions for d in the regions of the domain before and
after the discontinuity are substituted into a nite dimensional version of (4.41).
Then the node which separates the pre- and post-discontinuity approximations
145

must be repositioned in order to satisfy (4:42)3. An algorithm based on this is


given in Section 4.5.1. The method is then extended in Section 4.5.2 to give an
algorithm generating approximations on grids where all of the internal grid nodes
are positioned using (4:42)3 .
4.5.1

Grid with One Moving Node

Let the domain of the problem [xe; xo] be divided into n 1 adjacent regular
intervals [xi; xi+1] by the points xi (i = 1; . . . ; n) de ned by (4.6). One of these
nodes must be chosen as being the initial approximation to the position of the
discontinuity and the number of the node nearest to the actual position of the
hydraulic jump needs to be deduced. Let xN be the initial guess for the jump
position.
The method requires that approximations to the ow in front of and behind
the jump are generated separately and coupled, by means of a discontinuity, at
the position of the hydraulic jump.
Let the approximation to the depth in the pre-jump region [x1; xN ] be

de(x) =
where

1e (x) =

ie (x) =

8
>
>
>
>
<
>
>
>
>
:
8
>
>
>
>
>
>
>
>
>
<
>
>
>
>
>
>
>
>
>
:

N
X
i=1

die ie (x);

x2 x x 2 [x ; x ]
1 2
x2 x1
;
0
x 62 [x1; x2]
x xi 1 x 2 [x ; x ]
i 1
i
xi xi 1
xi+1 x x 2 [x ; x ]
i
i+1
x
x
i+1

x 62 [xi 1; xi+1]
146

i = 2; . . . ; N 1;

8
>
>
>
>
<

Ne (x) =

x xN 1 x 2 [x ; x ]
N 1
N
xN xN 1
:
0
x 62 [xN 1; xN ]

>
>
>
>
:

Let the approximation to the depth in the post-jump region [xN ; xn] be

do(x) =
where

No (x) =

io(x) =

no (x) =

8
>
>
>
>
<
>
>
>
>
:
8
>
>
>
>
>
>
>
>
>
<
>
>
>
>
>
>
>
>
>
:
8
>
>
>
>
<
>
>
>
>
:

n
X
i=N

dio io (x);

xN +1 x x 2 [x ; x ]
N
N +1
xN +1 xN
;
0
x 62 [xN ; xN +1]
x xi 1 x 2 [x ; x ]
i 1
i
xi xi 1
xi+1 x x 2 [x ; x ]
i = N + 1; . . . ; n 1;
i
i+1
x
x
i+1

x 62 [xi 1; xi+1]

x xn 1 x 2 [x ; x ]
n 1
n
xn xn 1
:
0
x 62 [xn 1; xn]

The algorithm is in two parts. Firstly the two nite element approximations

de and do are derived by nding the values of de = (d1e ; . . . ; dNe )T and do =


(dNo ; . . . ; dno )T such that

L(d ; d ) =
e

xN

x1

(r(Q; d ) + Ee d ) B dx +
e

xn
xN

(r(Q; do ) + Eo do ) B dx

is stationary with respect to variations in de and do . This requires solving the


two sets of equations

@L = 0 i = 1; . . . ; N and @L = 0 i = N; . . . ; n;
@die
@dio
using Newton's method, as described in Section 4.1. The initial approximation to
de must be supercritical in order that the supercritical ow in the region before

the jump is approximated and the initial approximation to do must be subcritical.


147

The second stage of the algorithm is to alter the position of xN by employing


the jump condition (4:42)3. If xs is the exact position of the jump and d is the
exact solution then, from (4:42)3,
(r(Q; d) + Eed)jxs

(r(Q; d) + Eod)jxs+ = 0:

If the approximation satis es




(

r(Q; de) + Eede)jxN (r(Q; do) + Eodo)jxN < tolerance;

(4:44)

for some speci ed tolerance, then the approximate solution has been found and

xN is the approximate position of the hydraulic jump. If (4.44) is not satis ed


then a new approximation to the jump position is found using the jump condition,
as follows.
The equation

r(Qs; dNe ) + Ee dNe r(Qs; dNo ) EodNo = 0

(4:45)

is solved for Qs, the value of the mass ow which would occur at the jump if

dNe and dNo were the actual depths of the ow before and after the jump. The
conservation of mass constraint gives

Q(x)B (x) = CBe

x 2 [x1; xn]

and, since B (x) and C are to be speci ed, this can be used to nd the point xsN
in the channel where the mass ow is Qs. From the discussion in Chapter 2 only
ows which are critical at the channel throat will be considered so that
e
B (xsN ) = CB
Q
s

can be solved, by bisection, to give a unique value for xsN .


148

(4:46)

The process which occurs on solving (4.45) is explained more fully in the
following pages and then the algorithm for positioning a node at the point of
discontinuity is completed.
Let x^s be an approximation to the exact position xs of the hydraulic jump.
From the conservation of mass equation the mass ow at x^s can be calculated to
e
be Q^ s = BCB
. The ow on the inlet side of the jump must be supercritical and
(^
xs )

on the outlet side must be subcritical. Assume this to be the case here. Then
the values of the depth at points immediately either side of x^s can be calculated
using the de nitions of mass ow (2.34) and energy (2.35).
Let d be the supercritical solution of
^ s !2
1
Q
Ee = gd + 2 d ;
that is, the root which lies between 0 and 23Ege . Let d+ be the subcritical solution
of

^ s !2
1
Q
Eo = gd + 2 d+ ;
+

that is, the root which lies between 23Ego and Ego . In the approximation method, if

xN = x^s, dNe is an approximation to d and dNo is an approximation to d+ .


In Figure 4.13 the graphs of ow stress P , de ned by (2.72), against mass
ow Q for E = Ee and E = Eo , with Eo < Ee , are drawn in solid lines. The two
dotted lines are the curves

P (Q) = r(Q; d ) + Eed ;


which touches the supercritical branch of the Ee curve at Q = Q^ s , and

P + (Q) = r(Q; d+) + Eod+;


149

E=Ee
P

E=Eo

Qs

Qs Q

Figure 4.13: Intersection of P + and P for Q^ s < Q^ .


which touches the subcritical branch of the Eo curve at Q = Q^ s . If dNe and dNo are
the exact values of d and d+ then, solving equation (4.45) for Qs , is equivalent
to nding the value of Q at which the two curves P and P + intersect.
For any value of Q^ s , lying in the range 0  Q^ s 

2E o
3

3
2

, it can be shown

that the curve P lies above the supercritical branch of P (Q) for E = Ee , except
at the point Q = Q^ s where the two curves are tangent. It can also be shown that

P + lies below the subcritical branch of P (Q) for E = Eo , except at the point
Q = Q^ s where the two curves are tangent to one another.
In Figure 4.13 Q^ s is less than the actual value of mass ow Q^ at the jump and
in these circumstances the value Q = Qs, at the point of intersection of P and

P + , always lies between Q^ s and Q^ and thus is an improvement on Q^ s . Repeating


the process by letting Q^ s = Qs, generating the corresponding curves P and
150

PE=Ee

E=Eo

Qs Q

Qs

Figure 4.14: Intersection of P + and P for Q^ s > Q^ .

P + and nding the point of intersection yields a sequence of values of Qs, each
lying between the previous value of Qs and Q^ . Thus this iteration will eventually
converge to give the exact value of the mass ow at the jump, from which, using
the conservation of mass equation, can be deduced the position of the jump.
Figure 4.14 gives an example of the graph for Q^ s greater than Q^ . In these
circumstances if the P and P + curves intersect at a value of Q = Qs then

Qs < Q^ . It is not possible to prove that a value of Qs > 0 exists for which
P (Qs ) = P +(Qs ) and, even if such a value does exist, the mass ow might never
achieve the value Qs in a particular ow. If such a Qs does exist and is achieved
at a point in the domain then, letting Q^ s = Qs, gives the situation in Figure 4.13.
The situation is slightly di erent in the approximation case. Equation (2.64)

151

gives an expression for Q as a function of d, that is,


q

Q = d 2 (E gd):
Let

Q =d
e

e
N

2 (Ee gd ) and Q = d
o

e
N

o
N

2 (Eo gdNo );

where dNe is the approximation to d on the xe side of xN , the approximation to


the jump position, and dNo is the approximation on the xo side of xN . Let

P e (Q) = r(Q; dNe ) + Ee dNe


and

P o (Q) = r(Q; dNo ) + EodNo .

Figure 4.15 shows a sketch of the curves P e and P o on a graph of P as a function


of Q for two di erent values of E , Eo < Ee . Notice that P e touches the Ee curve
at Q = Qe and P o touches the Eo curve at Q = Qo. Note also that neither Qe nor
e
Qo is necessarily equal to the mass ow Q(xN ) = BCB
(xN ) . The point of intersection

of the P e and P o curves gives the value of Qs equivalent to solving (4.45). There
are four possible situations arising.
1. Qe < Q^ and Qo < Q^ so that Q^ > Qs > max(Qe ; Qo).
2. Qe < Q^ and Qo > Q^ so that Q^ > Qs > Qe.
3. Qe > Q^ and Qo > Q^ so that Qs < Q^ .
4. Qe > Q^ and Qo < Q^ so that Qs < Q^ .
These properties are deduced using the facts that P e is tangent to the Ee curve
at Q = Qe and always lies on or above the supercritical branch and that P o is
tangent to the Eo curve at Q = Qo and always lies on or below the subcritical
152

Pe
E=Ee
Po
E=Eo

e
Qo Q

Qs Q

Figure 4.15: Intersection of P e and P o curves.


branch. In cases 1 and 2, although Qe < Qs < Q^ , it does not necessarily mean
that Q(xN ) < Qs < Q^ . The convergence of the iteration using (4.45) depends
on this being true, which it will be if dNe is close to the supercritical solution
of Ee = gd +

1
2


Q(xN ) 2
d

so that Qe is close to Q(xN ). In cases 3 and 4 if

Qs > 0 exists, and is achieved in a particular ow, solving (4.45) to give a further
approximation to the mass ow at the jump may improve the approximation,
although this cannot be shown. In practice the values of Qe and Qo are suciently
close together so that situations 2 and 3 occur only when the approximation to
the jump position is very close to the actual jump position.
The algorithm for positioning a node at the jump is in two parts. Firstly,
beginning with N = n 1, the corresponding value of xsn 1 is found using (4.45)
and (4.46). Then, stepping backwards along the channel to the n 2 th node,
153

the value of xsn 2 is found. If (xn

xsn 1)(xn

xsn 2 ) < 0 then xs lies between

xn 1 and xn 2 . Otherwise the process is repeated until the node j is found, where
(xj xsj )(xj

xsj 1) < 0. Then, if jxj xsj j < jxj

xsj 1j, the number N of

the node to be moved to the jump position is j ; otherwise N = j 1.


Once the number of the node to be moved to the jump position has been
established in this way, xN is moved to xsN . The nite element approximations

de and do are recalculated on the modi ed grid and, if (4.44) is still not satis ed,
(4.45) and (4.46) are used to reposition xN and the process is repeated until
(4.44) is satis ed. The approximate solution has then been found and xN is an
approximation to the jump position.
The algorithm is applied to a grid with xe = 0, xo = 10 and n = 21. The
energy at inlet Ee is given the value 50 and the mass ow at inlet C = C, where

C is de ned by (4.20), to give a critical ow in a channel with breadth B = B1;k ,


de ned by (4.15). The depth at outlet do is given for each case and is used to
deduce the value of Eo, using the de nitions of mass ow (2.34) and energy (2.35).
e
From the conservation of mass equation Q(xo) = BCB
(xo ) , which yields

2
1
CB
e
Eo = gdo + 2 B (x )d :
o o

The piecewise linear approximation to the discontinuous depth pro le with

do = 4:69 and breadth B = B1;6 is given in Figure 4.16a. For a tolerance on


the Newton iteration of 10

and on the jump condition (4.44) of 10 3 , the

method converges in 3 iterations on the position of the discontinuity, once the


node to be placed at the discontinuity has been found; in this case it is node
number 16. These iterations require 15, 8 and 8 Newton iterations. The initial
approximation on the original regular grid is given the values die = 1 (i = 1; . . . ; N )
154

a)

b)
10

breadth

depth

5.0

2.5

0.0

0
0

10

10

Figure 4.16: a) Piecewise linear depth approximation for do = 4:69 and b) B1;6 (x).
and dio = 4:69 (i = N; . . . ; n). Once the number of the node to approximate the
jump position is found subsequent approximations to the nite element solutions
use the approximation on the previous grid as the rst guess in Newton's method
to nd the approximation on the new grid. Figure 4.16b shows the breadth B1;6 .
The piecewise linear approximation for do = 3:86 is shown in Figure 4.17.
This converges in 3 iterations on the position of node 20, which is selected by the
algorithm to be moved to approximate the jump position, requiring 15, 4 and 4
Newton iterations.
The algorithm in this section generates approximations to the depth for discontinuous ows in channels, where the approximations are de ned on grids in
which all of the grid points except one are xed. The one movable grid point is
positioned, using the jump condition (4:42)3, in such a way that (4:42)3 is approximately satis ed. In Section 4.5.2 this method is extended, by allowing all of
155

depth

5.0

2.5

0.0
0

10

5
x

Figure 4.17: Piecewise linear depth approximation for do = 3:86.


the internal grid points to move, in order to generate irregular grids.
4.5.2

Adaptive Grids

The domain of the problem [xe; xo] is divided into n 1 regular intervals by the
points xi (i = 1; . . . ; n) de ned by (4.6). Finite element approximations to the
depth are generated separately on each interval [xi; xi+1] and the jump condition
(4:42)3 is used at each internal node to reposition the node. Instead of having
just two nite element approximations coupled at a point, as in Section 4.5.1,
there will be n 1 approximations coupled at the n 2 internal grid points.
Let

dih (x) = dLi iL(x) + dRi Ri(x)

(4:47)

be the nite element approximation to d in the i th element [xi; xi+1], where

iL(x) =

8
>
>
>
>
<
>
>
>
>
:

xi+1 x x 2 [x ; x ]
i
i+1
xi+1 xi
0
x 62 [xi; xi+1]

156

i = 1; . . . ; n 1;

Ri(x) =

8
>
>
>
>
<
>
>
>
>
:

x xi x 2 [x ; x ]
i
i+1
xi+1 xi
0
x 62 [xi; xi+1]

i = 1; . . . ; n 1:

Let N be the number of the node chosen to be the initial approximation to


the position of the hydraulic jump. Then, in the element [xi; xi+1],

and

E = Ee

if i + 1  N

E = Eo

if i  N ,

where Ee is the value of the energy E at inlet and Eo is the value at outlet.
The nite element solution on each element is given by the values of di =
(dLi ; dRi) such that

L(d1; . . . ; dn 1 ) =

N
X1 Z xi+1
i=1
n
X1

i=N

xi

Z

xi+1
xi

r(Q; d ) + E d B dx
h
i

h
e i

r(Q; d ) + E d B dx ;
h
i

h
o i

where Q(x) = BCB(xe) , is stationary with respect to variations in di (i = 1; . . . ; n 1).


The solutions of the n 1 sets of non-linear equations

@L = 0 ; @L = 0 i = 1; . . . ; n 1;
@dLi
@dRi
each with two unknowns, are found using Newton's method.
Once the di have been calculated on the initial grid the jump condition is
applied at each internal node. If



r(Q; dLi) + E1dLi

where

xi

r(Q; dRi 1) + E2dRi 1

E1 = E2 = Ee




xi

if i < N;

E1 = Eo; E2 = Ee if i = N;
E1 = E2 = Eo
157

if i > N;

< tolerance;

(4:48)

for all i = 2; . . . ; n 1 and a speci ed tolerance, the required approximate solution


has been found. If (4.48) is not satis ed for a particular value of i then

r(Qi; dLi) + E1dLi r(Qi; dRi 1) E2dRi 1 = 0

(4:49)

is solved for Qi and the new position of the grid point xi is found from Qi using
the conservation of mass law and bisection.
The grid point closest to the jump position in the regular grid de ned by
(4.6) is found in the same way as in Section 4.5.1. The approximation xN to the
jump position is initially taken to be xn 1; equation (4.49) then yields the new
approximation xsn 1. The process is repeated using xn 2 as the approximation to
the jump position and then stepping backwards along the channel to each grid
point in turn until (xj
jxj

xsj 1)(xj xsj ) < 0 for some j . Then, if jxj xsj j <

xsj 1j, N = j is the number of the node which will be used to approximate

the jump position; otherwise N = j 1.


With N xed the n 1 nite element approximations (4.47) are calculated
on the new grid, using the solutions on the previous grid as the initial guess in
Newton's method. If (4.48) is not satis ed for some i in the range 2; . . . ; n 1,
the internal grid points are repositioned using (4.49). The process is repeated
until (4.48) is satis ed for all i in the range 2; . . . ; n 1. An approximation to
the depth for discontinuous shallow water ow has then been found.
The algorithm is applied in a channel where xe = 0, xo = 10 and n = 21.
The breadth B = B1;k is given by (4.15). The energy at inlet Ee is given the
value 50 and the mass ow at inlet is given the value which causes the ow to
be critical at the channel throat, that is C = C, where C is de ned by (4.20).
The initial approximations to the depth used in Newton's method has the value
158

b)

a)

5.0

depth

depth

5.0

2.5

2.5

0.0

0.0
0

5
x

10

5
x

10

Figure 4.18: Piecewise linear depth approximations for a) do = 3:86 and b) do =


4:6.
1 at the nodes on the inlet side of xN and the value of the outlet depth do at the
nodes on the outlet side of xN .
Figure 4.18a shows the result for B = B1;6 and the outlet depth do = 3:86.
The dots on the x-axis show the nal positions of the grid points, grid point 20
approximates the jump position. For a tolerance on the Newton iteration of 10

and on the jump condition (4.48) of 10 3 the algorithm converges in 3 iterations


on the positions of the grid nodes. Figure 4.18b shows the corresponding result
for do = 4:6. Here node 18 approximates the jump position and, for the same
tolerances, the algorithm converges in 3 iterations on the positions of the grid
nodes.

159

Chapter 5
Approximations to Continuous
Two-dimensional Shallow Water
Flows
In this chapter the constrained variational principles derived in Section 3.6.2 are
used to generate approximations to two-dimensional shallow water ows.

The

method is an extension of the method used in Chapter 4 to approximate onedimensional ows.


The functionals of the constrained variational principles for steady state ows,
(3.94), (3.97), (3.95) and (3.96), are

L1 ()
c

L2 (Q; d)
c

L3 (Q)
c

L4 (; d)
c

ZZ
=

ZZ
=

ZZ
=

ZZ
=

p(r; E ) dx dy +

Z


C d;

(5.1)

r Q; d) + Ed) dx dy;

( (

P (Q; E ) dx dy;
(

R(r; d) + Ed) dx dy +
160

Z


C d;

(5.2)

L2c

where, in

L3c ,

and

Q is required to satisfy r:Q

the mass ow

= 0 in

n:Q = C on , for the given boundary function C , and, in L1 and L4 , the


constraint v = r has been applied. The energy E is the function E (x; y ) =
c

and

E~ + gh(x; y), where E~ is a known constant.


In the variational principles based on
satisfy

and

r: Q Q
(

) = 0 in

n: Q = 0 on .

variable

n:(

; 

=
x)

L2c and L3c the variations, Q, of Q must

D and n:(Q + Q) = C

on , that is,

r: Q

= 0 in

This can be achieved in practice by introducing a new

x; y), such that, Q = ( y;

x ).

Then

Q = ( y ; 

x)

where

= 0 on .

In this chapter the functional


velocity potential

,

L1c

is used to generate approximations to the

from which approximations to the velocity

v are deduced

v = r, and L4 is used to generate approximations to the depth d and to


 (and hence also to v). The variational principles based on L1 and L4 do not
c

using

require the variations to satisfy any boundary conditions.


Let the domain of the problem be the channel

D=
where

x; y) : x 2 [xe; xo]; y 2

"

B (x) B (x)
;
2

#)

B (x), the breadth of the channel, is a function to be de ned. The channel

has an axis of symmetry along the line

D~ =

"

x; y) : x 2 [xe; xo]; y 2 0;

is considered, the ow over the region


property. The function

y = 0 and so only the half of the channel

DnD~

B (x)

#)

being deduced using the symmetry

h(x; y) is the depth of the uid below the level z = 0, in

line with the de nition of the one-dimensional version of


The boundary function

h.
D

is taken to be zero on the lateral sides of ~ and is


161

y=0
x=xe

x=xo
n = 9 and m = 7.

Figure 5.1: Example of triangular grid for


assigned values on the inlet section e (at
outlet section o (at

x = xe ) of the boundary  and on the

x = xo) such that


Z
e

C d +

Z
o

C d = 0;

for consistency with conservation of mass.

The domain ~ is discretised into a triangular grid using the

xi+(j

1)n

yi+(j
for

= 1 ...

;n

and

approximation to ~ .

1)n

= 1 ...

; m.

i
n

1
1( o

1 j 1
2m 1

l = mn points

xe ) + xe ;

B (xi+(j

The region

An example of a grid for

1)n )

Dh
n

(5 3)

covered by the grid is an

= 9 and

= 7 is given in

Figure 5.1.
The approximation method is similar to that in one dimension.

The ap-

proximate velocity potential and depth functions are expanded in terms of nite
element basis functions and substituted into the functionals

L1c and L4c .

The nite

dimensional versions of the functionals, generated in this way, are to be made stationary with respect to variations in the parameters of the approximations. The
162

Figure 5.2: A two-dimensional piecewise linear basis function.


basis functions considered here are two-dimensional piecewise linear. The basis
function corresponding to a particular node is of magnitude one at the node,
zero at all other nodes and linear over each triangular element. An example of a
typical basis function for an internal grid node is given in Figure 5.2.

5.1

The Constrained `p' Principle

The functional

L1c ,

velocity potential
can be shown that

de ned by (5.1), is used to generate approximations to the

.
L1c

By considering the matrix of second derivatives of

L1c

it

is maximised by subcritical solutions of the shallow water

equations and has a saddle point for supercritical solutions.


Let the approximation to the velocity potential be

h (x; y) =
where the

l
X
i=1

i i (x; y);

(5 4)

i are the two-dimensional piecewise linear basis functions de ned on

the grid given by the points (5.3) and the


163

i are the values of h at the nodes of

the grid.
Substituting (5.4) into (5.1) gives the nite dimensional version of the functional, that is,

L() =
where

ZZ

p(r ; E ) dx dy +
h

Dh

C d +
h

e

Z
o

Ch d;

 = (1; . . . ; l)T , E (x; y) = E~ + gh(x; y) and D~ is approximated by Dh,

the region covered by the triangular grid. The nite element solution is given by
the

 which satis es
Fi() =

for

@L
@i

ZZ
=

p h :r i dx dy +
h r

Z
e

C i d +

Z
o

C i d = 0

i = 1; . . . ; l and is found using Newton's method in the same way as before.

The Jacobian is given by

J () = fJij g =

@Fi
@j

@ 2L
@j @i

1
+ 2

r :r

Z Z
=

Dh

r :pr r :r dx dy
i

h

h

where

prh rh

B
B
=B
@

x

xh yh

h2

E + 12 rh :rh + yh 2

yh xh

1
C
C
C;
A

and is negative de nite for wholly subcritical ow and inde nite for wholly supercritical ow.
Given an initial approximation

0 to the solution  a sequence of approxima-

tions is generated, using Newton's method, from

k+1 = k + k ;

(5 5)

where

J (k ) k =
164

F( ):
k

(5 6)

The process is continued until

ik
i
< tolerance:
k
max i
i

max

(5 7)

Using the piecewise linear basis functions, de ned on a triangular grid, the integrands of the Jacobian

F = (F1; . . . ; F )

and the vector

are constants over

J and F are integrated exactly.

each element so

The Jacobian is no longer tridiagonal, as it was in the one-dimensional examples, although it is symmetric and banded. Equation (5.6) may still be solved
eciently for

k

using a pre-conditioned conjugate gradient method (Golub

and Van Loan (1989)), provided that

is not inde nite. The matrix

conditioned by its diagonal entries, that is, by the matrix

is pre-

P = diag(J11; . . . ; Jll).

The system

P
is solved for

k ) J (k ) P

k ) 

k ) F(k )

by the conjugate gradient method. Then the solution

 k

of

(5.6) is given by

 k = P

k )  k :

The e ect of this pre-conditioning should be to improve the convergence rate


of the conjugate gradient iteration. If

prh rh

conditioning the system using the matrix

is a constant in

Dh

then pre-

will improve the convergence rate of

the conjugate gradient iteration (Wathen (1987)).


The initial approximation to

i

where


=

 is given by

xi x1  0
v
x2 x1

i = 1; . . . ; l;

(5 8)

v0 is assigned a value which determines whether the solution being calcuE

lated is an approximation to subcritical or to supercritical ow. The energy ~ is


165

taken to be 50.
The boundary function

is given the value

constant, on the inlet boundary e and

C (xe; y)

C (xo ; y) =

KBe
Bo

K,

where

is a

on the outlet boundary

o , this is consistent with conservation of mass. The use of this boundary function
implies that the ow is uniform across the inlet and outlet boundaries. Therefore
it should ideally be applied to an in nitely long channel which has straight parallel
sides and a horizontal bed for all but a nite section of its length. In order to
investigate the e ects of applying this boundary function at the ends of a channel
of nite length, let the domain
[0,10] of the

xo

= 10 +

D be such that B and h vary only on the interval

x axis and are constant on [xe ; 0] and [10; xo ], where xe = L and

L,

L.

for some number

By using several di erent values of

inconsistencies caused by using the boundary function


studied. The constant

any

de ned above can be

is given the value 10.

The breadth functions used here are

B4(x)

B5(x)

B6(x)

8
>
>
>
<

6+4 1

>
>
>
:
8
>
>
>
>
>
>
>
>
<

2

x 2 [0; 10]

10

x 2 [ L; 0] [ [10; 10 + L]

10

x 2 [ L; 0]

>
>
>
>
>
>
>
>
:
8
>
>
>
>
>
>
>
>
<

6+4 1

>
>
>
>
>
>
>
>
:

6+4

6+4

2

 2

6+4 1

3
7

10

x 2 [0; 8]

2

x 2 [0; 3]

2

x 2 [3; 10]

(5.9)

(5.10)

x 2 [8; 10 + L]

3
5

(5.11)

x 2 [ L; 0] [ [10; 10 + L]

The depth of uid below the reference level


corresponding to a horizontal channel bed.

166

z = 0 is taken to be identically zero,

Let the grid of points be de ned by (5.3) with


channel with breadth
(5.7) of 10

B4

and let

L = 0.

n = 5 and m = 3.

Newton's method, with a tolerance in

, converges to the subcritical approximation in 4 iterations, requiring

7, 7, 7 and 4 conjugate gradient iterations, with a tolerance of 10


grid with

Consider the

= 9 and

. On a re ned

= 7, and using the same tolerances, Newton's method

converges to the subcritical approximation in 4 iterations requiring 29, 27, 24 and


7 conjugate gradient iterations. In both cases

0 is given by (5.8) with v0 = 0.

A piecewise constant velocity approximation


velocity potential approximation

can be generated from the

h using vh = rh on each triangular element.

The velocity approximations for the above two cases are shown in Figure 5.3, the
length of the arrow in each element being directly proportional to the magnitude
of

v . Both of the approximations exhibit the property of the exact solution that
h

the speed increases as the breadth decreases. They also approximately satisfy
the boundary conditions of zero ow across the channel side,

x ; xo],

[ e

and across the axis of symmetry,

B (x)

for

x2

= 0. The change in the speed, as

the breadth decreases then increases, is represented better on the more re ned
grid, in particular the maximum speed has increased (from 4.00 to 4.42) and the
minimum speed has decreased (from 2.48 to 2.33).
Figure 5.4 shows corresponding results for breadth
approximation on the grid with

B5

with

= 0.

The

n = 5 and m = 3 converges in 4 Newton iterations,

requiring 14, 14, 12 and 1 conjugate gradient iterations. The approximation for

n = 9 and m = 7 also converges in 4 Newton iterations, requiring 40, 38, 27 and


16 conjugate gradient iterations. In both cases
and the tolerances are 10

0 is given by (5.8) with v0 = 0

for the Newton iterations and 10

167

for the conjugate

a)

scale: v=5
10

0
b)

scale: v=5
0

10

Figure 5.3: Subcritical piecewise constant velocity approximations in a channel


with breadth

B4 and L = 0 for a) n = 5 and m = 3 and b) n = 9 and m = 7.

a)

scale: v=5
0

10

b)

scale: v=5
0

10

Figure 5.4: Subcritical piecewise constant velocity approximations in a channel


with breadth

B5 and L = 0 for a) n = 5 and m = 3 and b) n = 9 and m = 7.


168

a)

-5

15

b)

-10

20

c)

-15

25
scale: v=5

Figure 5.5: Subcritical piecewise constant velocity approximations in a channel


with breadth

B4 for a) L = 5, b) L = 10 and c) L = 15.

gradient iterations.
In order to investigate the e ects of applying the given boundary function

C on

a channel of nite length, approximations to ows in channels which have di erent


values of
for

L are generated.

L = 5,

Consider the channel with breadth

B4.

Approximations

10 and 15 are given in Figure 5.5. It can be seen that increasing

from 5 to 15 has very little e ect on the approximation in the region between the
lines

x=

x=

5 and

15 and

x=

x = 15.

Also notice that the velocity in the regions between

5 and between

x = 15 and x = 25 is virtually uniform and is

parallel to the channel sides.


It should be possible to generate approximations to supercritical ows by
169

taking

v0 in the range

xo x e
n 1

0
cmax
 <v <

xo xe
n 1

min
~
(x;y )2D

in (5.8), where

cmax
 is

the maximum critical speed in a particular channel for a ow with given values of

K and E~ .

However, the Jacobian

and (5.6) must be solved for

k

is inde nite for supercritical approximations


by an alternative to the conjugate gradient

method, such as can be found in Golub and Van Loan (1989).

5.2

The Constrained `R' Principle

The functional of the constrained `R' principle, given by (5.2), is used to generate
approximations to the velocity potential and to the depth of ow. By considering
the matrix of second derivatives of

L4c it can be shown that L4c

is maximised by

subcritical solutions of the shallow water equations and has a saddle point for
supercritical solutions.
Let

h (x; y) =

l
X
i=1

i i (x; y)

dh (x; y) =

and

l
X
i=1

di i (x; y)

(5 12)

be approximations to the velocity potential and the depth, where the

i are the

two-dimensional piecewise linear basis functions de ned earlier and the


the

i

and

di are parameters of the solutions whose values are to be determined.


Substituting (5.12) into (5.2) gives the nite dimensional version of the func-

tional, that is,

L(; d) =
where

ZZ

;


Dh

= ( 1 ...

R(rh ; dh ) + Edh dx dy +

; l)T ,

d = (d1; . . . ; d )
l

and

Z
e

Dh

Ch d +

o

Ch d;
D

is an approximation to ~ .

The parameters of the approximation are those values of

170

 and d for which L is

stationary with respect to variations, that is,

Fi(; d)

Fi+l (; d)

for

ZZ

@L
=
@i
@L
=
@di

ZZ

 and d satisfy

Rrh :r i dx dy +
h

Dh

C i d +

e

Z
o

C i d = 0;

Rdh E ) i dx dy = 0;

i = 1; . . . ; l.
The solution is found using Newton's method. The Jacobian is given by

J (; d) = fJij g ;
where

for

ZZ

Jij

Ji j+l

Ji+l j

Ji+l j+l

ZZ
ZZ
ZZ

Dh

Dh

Dh

Dh

Rrh rh r i:r j dx dy;

r :Rr
i

h dh

j dx dy;

iRdh rh :r j dx dy;

iRdh dh j dx dy;

i = 1; . . . ; l and j = 1; . . . ; l.
Given initial approximations

0 and d0 to  and d Newton's method yields

a sequence of approximations,

0
B
B
B
@

where

1
k+1

d +1
k

C
C
C
A

0
=

0
B

B
J (k ; dk )  B
@

B
B
B
@

1
k

C
B
C
B
C+B
A
@

1
k

C
C
C;
A

1
k

C
C
C
A

F( ; d ):
k

(5 13)

The sequence ends when

k

i
i
< tolerance
k
max i
i

max

and

171

k
d
i
i
< tolerance;
k
max di
i

max

(5 14)

F are evaluated using

for some speci ed tolerance. The Jacobian and the vector


7 point Gaussian quadrature for integrating over triangles.

The Jacobian is symmetric and banded and (5.13) is solved, when

is not

inde nite, using a pre-conditioned conjugate gradient method, with the preconditioning matrix

P = diag(J11; . . . ; J2l 2l).

The initial approximation

0 to  is given by (5.8) and the initial approxima-

tion

d0 to d is given by d0 = d^, for i = 1; . . . ; l, where d^ is a constant. The values

v0, in (5.8), must be consistent with one another, that is, if d^ is assigned

of ^ and

a value corresponding to a subcritical depth then


range 0

 v0 <

xo xe
n 1

min
cmin
 , where c =

min
~
(x;y )2D

v0 must be given a value in the

c and c is de ned by (2.63).

has a value corresponding to a supercritical depth then


xo xe
n 1

xo
o
cmax
 <v  n

xe

min
~
(x;y )2D

E , where cmax
 =

max
~
(x;y )2D

v0 must lie in the range

c.

The constant ~ is given the value 50. The boundary function


the same way as in Section 5.1, that is,
on o ;

K is taken to be 10.

If ^

is de ned in

e
C (xe; y) = K on e and C (xo ; y ) = KB
Bo

The channel breadths considered here are those given

z = 0 is

by (5.9), (5.10) and (5.11). The depth of uid below the reference level
taken to be identically zero.
Consider the channel with breadth

B4 and let L = 5.

= 3, Newton's method, with a tolerance of 10

Then, with

in (5.14), converges in 26

iterations, with a tolerance on the conjugate gradient iterations of 5


re ned grid with

n = 9 and

 10

. On a

n = 17 and m = 5 Newton's method converges in 32 iterations,


d

with the same tolerances as before. In both cases the initial data is ^ = 4 5 and

v0 = 0.
The results for

n = 9 and m = 3 are given in Figure 5.6.


172

a shows

Figure 5.6

a)
4.78
4.14

4.78
4.14

b)

-5

15

scale: v=5
n = 9 and m = 3 a) piecewise linear

Figure 5.6: Subcritical approximations for


depth and

b) piecewise constant velocity.


b the piecewise constant

the piecewise linear depth approximation and Figure 5.6


velocity approximation, calculated using

r

, where the arrows show the

approximate ow directions, the lengths being directly proportional to the magnitude of

in each element. The depths lie in the range 4.14 to 4.78 and the

speeds lie in the range 1.89 to 3.89.


Figure 5.7 shows the corresponding results for

n = 17 and m = 5.

The depths

lie between 4.03 and 4.85 and the speeds lie between 1.66 and 4.31.
Supercritical approximations may be generated by using an appropriate

method to solve (5.13) for

B
B
@

ing consistent values for ^ and

C
C
C,
A

where

J (k ; dk ) is inde nite, and by choos-

v0, corresponding to supercritical data.


173

a)
4.85

4.85

4.03

4.03

b)

-5

15

scale: v=5
Figure 5.7: Subcritical approximations for
depth and

n = 17 and m = 5 a) piecewise linear

b) piecewise constant velocity.

In this chapter two algorithms are given which can be used to generate approximations to two-dimensional shallow water ows, where the ows are subcritical.
Both methods yield approximations to the velocity of the ow and these approximations can be compared as follows.
Consider the

th triangular element of the discretised domain and let

be the area of the element.

Let

vip

be the speed in element

of the velocity

approximation generated, as in Section 5.1, by using the `p' principle based on


(5.1).

Let

viR

be the speed in element

174

of the corresponding approximation

generated, as above, by using the `R' principle based on (5.2). Then


I
X
p
vi

i=1
e= X
I
i=1

where

I = 2(n

1)(

p
i

viR 4i
v 4i

+ iR )

1) is the number of elements in the domain, is a measure

of the di erence between the two velocity approximations.


Consider the channel with breadth

B4(x), given by (5.9), where L = 5, and

let the uid depth below the reference level


of

z = 0 be identically zero. The values

e for grids with di erent values of n and m are given in Table 5.1.

The results

suggest that, as the number of elements increases, the di erences between the
approximations derived from the two principles decrease.

n m

e
:  10

:  10

:  10

49

13

36

17

32

Table 5.1: Values of

e for various n and m.

175

Chapter 6
Further Applications
In Chapters 4 and 5 the variational principles for steady state shallow water
ows in one and two dimensions, derived in Chapter 3, are used to generate
approximations to the corresponding ows. There are, however, other variational
principles in Chapter 3 which can be used to generate approximate solutions to
other problems. Two such problems are considered here.
The approximations generated so far have all been for solutions of the shallow
water equations, in which it is assumed that the component of velocity perpendicular to the

xy

plane, that is the vertical component, is negligible, see the

statement (2.14). The variational principle (3.7), based on Luke's principle (Luke
(1967)) is satis ed for solutions of the equations of time-dependent free surface
ows of an inviscid, homogeneous uid in three dimensions. If an approximation
to three-dimensional ow can be generated then it can be used to investigate the
accuracy of the assumption that, under the conditions of shallow water theory,
the magnitude of the vertical component of the velocity is negligible.
In Section 6.1 the functional of (3.7) is reduced to a functional whose cor-

176

responding variational principle has as its natural conditions the equations of


time-independent free surface ow in two dimensions, that is, the solutions of
these equations are functions of the vertical coordinate
coordinate

x.

and the one horizontal

An attempt is made to extend the algorithms of Chapter 4 to

generate approximations to free surface ows using the new functional.


In Section 6.2 the `p' functional for time-dependent quasi one-dimensional
shallow water ow (3.98) is used in an attempt to seek approximations to timedependent ows in a channel of slowly varying breadth. The problems caused by
using the functional (3.98) are also mentioned.

6.1

Two-dimensional Free Surface Flows

The functional of the modi ed version of Luke's principle (3.7) is given by

t2

ZZ Z

t1

where


h

 (x; y; t), h

t + gz + u:u

h(x; y ), 

u: u



r
~

(x; y; z; t), u

dz dx dy dt;

(6:1)

u(x; y; z; t)

and ~ is

de ned by (2.2). The functional (6.1) is used in Section 6.1.1 to derive a functional
which has as its natural conditions of the rst variation the equations of timeindependent motion in the

6.1.1

x and z

directions.

The Functional

The required functional is generated from (6.1) by rst making the assumption
that the ow variables are independent of time and evaluating the time integral
and then assuming that the domain is a channel of slowly varying breadth so that
the variables are functions of the coordinates

177

x and z

only and the integral with

respect to

can be evaluated. It is also necessary to add in boundary terms so

that variations can be allowed which do not necessarily vanish on the inlet and
outlet boundaries of the channel.

Time-independent ows
First make the assumption that the free surface ow does not vary with time.
Then the ow variable
level

z=0

and the height of the free surface above the reference

are independent of time, that is,

variation of the velocity potential

u = u(x; y; z ) and  =  (x; y ).

The

with respect to time needs to be deduced.

The ow is assumed to be irrotational so, from (2.5),


~ :
u=r
By assumption

ut  0 and so

r  0;
~

which implies that

 is of the form
(x; y; z; t) = ^(x; y; z ) + f (t);

for arbitrary functions 


^ and

f , where

r r
~

= ~ ^

and

t = f 0:

Let

E^
where

t2

t1.

t2
t1

t dt =

(f (t2 )

f (t1)) ;

Then, making these substitutions into the functional (6.1)

and integrating with respect to time gives

ZZ Z
D


h

T E^

gz

1
2

u:u + u: u
178



r
~ ^

dz dx dy:

(6:2)

Two-dimensional ows
Let

be the domain

D=
where

x 2 [xe; xo]; y 2

B (x) B (x)
;
2

#)

B (x), for x 2 [xe; xo], is the breadth of the channel and is a slowly varying

function of
on the

(x; y ) :

"

x.

Let

h,

the depth of uid below the reference level

= 0, depend

x coordinate alone.

Now make the assumption that, in this domain, all of the variables are independent of the

coordinate and rede ne the variables as follows. The velocity

u(x; y; z ) becomes u = u(x; z ), where u = (u; w), the velocity potential ^(x; y; z )
becomes 
^(x; z ) and

 (x; y )

 (x).

becomes

r

two-dimensional counterpart ^

@
@x

@
; @z

The operator ~ is replaced by its

Making these substitutions in (6.2) and integrating with respect to

xo

xe


h

T

E^

gz

u:u + u: u



^
^

gives

B dz dx:

Boundary terms
As the nal stage in the construction of the required functional, boundary terms
must be added so that variations of the functional do not necessarily have to
vanish at the ends of the channel, that is, at

x = xe

and

x = xo .

The required functional is

J (; u; ) =

xo

xe

where the constant

T


h

E^

 (xo )
h (x o )

gz

1
2

u:u + u: u

Co jxo dz

 (xe )
h (x e )



r
^

Ce jxe dz;

B dz dx
(6.3)

has been set equal to unity and the ^ notation on the

velocity potential has been dropped for simplicity.


179

The natural conditions of

9
>
>
>
=

^ : (B ) = 0

>
>
>
;

r
^

= 0 are given by

for

x 2 (xe ; xo); z 2 ( h(x);  (x));

on

z =  (x) for x 2 (xe ; xo);

uhx + w

on

z = h(x) for x 2 (xe ; xo);

Ce

B (xe ) ujxe

for

z 2 ( h(xe );  (xe ));

Co

B (xo ) ujxo

for

z 2 ( h(xo );  (xo ));

on

z =  (x) for x 2 (xe ; xo);

ux

E^

J

gz + u:u
2

^
u:r

which are, respectively, the irrotationality condition and the conservation of mass
equation for

2 (x ; x ) and z 2 (
e

h(x);  (x)),

the condition of no ow across

the free surface, the condition of no ow through the channel bed, boundary
conditions on the horizontal component of velocity at the inlet and outlet boundaries and the dynamic free surface condition, as required. Notice that the rst
six natural conditions are due to variations in the variables
last natural condition is due to the variation in

6.1.2

and

u,

while the

.

The Algorithm

The basic nite element technique, as used in Chapters 4 and 5, can only be
applied to functionals in which the integration is over a xed region. Various
algorithms (for example, Aitchison (1979), Ikegawa and Washizu (1973)) have
been developed to approximate ows in domains where the position of the free
surface is allowed to vary; the di erences are mainly in the treatment of the
variation of the free surface. The method used here to position the free surface
180

is based on the method used to approximate the position of a hydraulic jump in


Section 4.5.
The functional (6.3) depends on the three functions

 (x), u(x; z ) and (x; z ).

A functional depending on only two functions can be derived by making the


substitution

^  in (6.3), giving
u=r

J^(; ) =

xo

xe


h

gz

 (xo )

Co jxo dz

h(xo )

r:r

E^

B dz dx

 (xe )
h(xe )

Ce jxe dz:

(6.4)

The variational principle corresponding to (6.4) is equivalent to the variational


principle for (6.3), constrained to satisfy the irrotationality condition. The natural conditions of

J^ = 0 are


r: Br

for

x 2 (xe ; xo); z 2 ( h(x);  (x));

(6.5)

z

on

z =  (x) for x 2 (xe ; xo);

(6.6)

xhx + z

on

z = h(x) for x 2 (xe ; xo);

(6.7)

Ce

B (xe ) xjxe

for

z 2 ( h(xe );  (xe ));

(6.8)

Co

B (xo ) xjxo

for

z 2 ( h(xo );  (xo ));

(6.9)

on

z =  (x) for x 2 (xe ; xo):

xx

E^

gz

1
2

r:r
^

(6.10)

Let

 h (x) =
be an approximation to

i=1

i i (x)

(6:11)

i i (x; z )

(6:12)

 (x) and let


h (x; z ) =

be an approximation to

n
X

(x; z ), where

linear basis functions (4.13), the

l
X
i=1

the

are the one-dimensional piecewise

are two-dimensional piecewise linear basis


181

z=

z=-h

x=xe

x=xo

Figure 6.1: Example of a triangular grid for

n = 11 and m = 5.

functions, an example of which is given in Figure 5.2, and the


and the

i

for

i = 1; . . . ; n

i for i = 1; . . . ; l are parameters of the solution and are to be calculated.

The domain of integration in (6.4) is discretised into triangular elements using


the following set of

xi+(j
zi+(j
for

l = mn points.

1)n

1)n

i = 1; . . . ; n and j

i
n
j
m

1
1

(xo

xe ) + xe ;

 h (xi+(j

1)n ) +

h(xi+(j

1)n )

h(xi+(j

1)n );

= 1; . . . ; m. An example is given in Figure 6.1. Notice that

the grid depends on the unknown function

h^ (x) =

n
X
i=1

h .

^ be de ned by
Let h

h(xi ) i (x):

Substituting (6.11) and (6.12) into (6.4) gives the nite dimensional version
of the functional, that is,

L( ; ) =

xn

h

= (1 ; . . . ; n )

sought such that

E^

^
h

x1

Z
+

where

and

gz

n
h(xn )

1
2

r :r
^

Co h x dz
n

B dz dx

1
h(x1 )

Ce h x dz;
1

= (1 ; . . . ; l ) . The parameters


T

L is stationary with respect to variations.


182

and

are

Let

Gi ( ; )

@L
@i

then the vector

Z
=

xn

h

^
h

x1

n
h(xn )

r :r B dz dx
^

Co ijxn dz

G = (G1; . . . ; Gl )T

1
h(x1 )

Ce ijx1 dz i = 1; . . . ; l; (6.13)

may be written as

G(; ) = A() + b();


where

A() =

(Z

xn

x1

h

^
h

r :r B dz dx
^

is symmetric, positive de nite and banded and

(6:15)

is stationary with respect to variations in

 if G = 0, that

n
h(xn )

Co i jxn dz

b = (b1; . . . ; bl)T ,where


Ce i jx1 dz:

bi () =
The functional

(6:14)

1
h(x1 )

is, if

A( ) = b( ):
Therefore, for a xed
Then the solution

, 

(6:16)

can be calculated from (6.16). Let

h

in (6.4).

 of (6.16) gives an approximation to the function  satisfying

(6.5){(6.9), for the given domain, since these natural conditions are due solely to
the variations of

 in J^ = 0.
h,

The problem remains to nd


with respect to variations in

.

that is, to nd

such that

is stationary

This could be done by adapting the method in

Aitchison (1979), which is for a functional written in terms of a stream function.


The nite dimensional version of the functional (6.4) can be written as

L( ; ) =

1
2

T A( ) + bT ( ) + c( );
183

where

A( ) and b( ) are de ned by (6.14) and (6.15) and


c( ) =

Then, substituting for

xn

h

^
h

x1

 using (6.16) gives


1

L^ ( ) = bT ( )A

and

^ dz dx:
EB

may be found by solving

^
@L
@i

b

( ) ( ) + c( );

= 0 for

i = 1; . . . ; n.

In this thesis the technique used in Section 4.5 to approximate the position of
a hydraulic jump is adapted to the free surface case. In Section 4.5 the natural
condition which is generated by the variation in the jump position is used directly
to position the approximation to the jump. In the free surface case the natural
condition (6.10) is due to the variation in the position of the free surface and an
attempt is made to use (6.10) to nd the approximation to the free surface.
Let
to

k

be an approximation to

.

Then, using (6.16), an approximation

k

 can be calculated from


A(k )k

b(k );

(6:17)

by the conjugate gradient method.


An updated approximation to

 is generated using (6.10), as follows.

the node of the grid at the position (xj ; zj ), where

zj

ik

for some

1; . . . ; n. Consider the elements of the grid which neighbour node

uj

I

X
^

^

i=1

r 4

I
X
i=1

where

is the number of elements surrounding node

^(x; z ) =

l
X
i=1

184

ik i(x; z )

j,

Consider

i in the range

and let

h

is an approximation to

and

is the area of element i. Then u


j is in some

way representative of the approximate speed of ow at node

jk

is updated by
k +1
j


where 0

<

1 2
uj
2

E^

j.

The position of

+ jk ;

k
j

 1 is a relaxation parameter. Notice that if = 1 then  +1 is the


k
j

height of the free surface above

z = 0 where the speed at the point (xj ; zj ) is uj ,

from (6.10). The approximation

k+1 can now be calculated from (6.17) and the

process is repeated until

jk+1 < tolerance;

max j

for some speci ed tolerance.


The initial approximation

0

to

i0 = dh (xi )
where

dh

is given by

h(xi )

for

i = 1; . . . ; n;

is the approximation to the shallow water depth

d in the given domain,

calculated using the constrained `r' principle (3.117), as in Section 4.1.


The algorithm is implemented in the domain

f(x; z) : x 2 [
where

8
>
>
>
<

h(x) = >

>
>
:

20; 30];

The breadth function is de ned by


is given the value 50,

Ce =

x2[

H


100

k +h(x )
1
1

z 2 [ h(x);  (x)]g ;

2

20; 0]

[ [10; 30]

x 2 [0; 10]

B (x) = 10 for x 2 [
and

Co =

100

k +h(xn )
n

^
20; 30]. The constant E

The algorithm appears to work initially with max j


increases. On closer inspection however


k
max j

185

jk+1

jk+1 decreasing as k
does not decrease much

4.38

0
-20

30

scale: v=5

Figure 6.2: Piecewise constant velocity approximation for a subcritical free surface ow.
below approximately 10

, for the value

= 0:05 of the relaxation parameter.

The method perhaps should not be expected to generate approximations for any
speci ed accuracy since u
j may not be a very good approximation to the speed
of ow at the position (xj ; zj ).
Figure 6.2 shows the piecewise constant approximation to the velocity in the
given domain, with

H = 0:3, at the stage in the algorithm where max jk

reaches its minimum value of 7:0

 10

jk+1

. It can be seen that the approximation to

the velocity appears to satisfy approximately the conditions of no ow through the


free surface and through the channel bed. The maximum magnitude of the ratio

jwj
juj

in any element is 0.1, that is, in this approximation the vertical component of

velocity is less than one tenth of the horizontal component in magnitude.

186

6.2

Time-dependent Quasi One-dimensional


Flows

In this section a constrained version of the `p' principle based on (3.98) is used
to develop an algorithm for generating approximations to time-dependent quasi
one-dimensional ows in shallow water.
The functional of the constrained `p' principle (3.107) is given by

K1c () =

t2

t1

xo
xe

p^()B dx dt +
Z
+

t2

t1

xo

xe

Co (B)jxo

Ce (B)jxe dt


jt2 g2

jt1 g1 B dx;

(6.18)

where

p^() =

1
2g

gh + 2x

t

2

B (x) for x 2 [xe ; xo] is the breadth of the channel, Ce (t) and Co (t) are boundary
functions for the magnitude of the mass ow at
and

g2 (x)

xe and xo , respectively, and g1 (x)

are time boundary functions for the depth of uid at times t1 and

t2

respectively.
An approximation to the velocity potential

is generated by adapting the

algorithms of Chapter 5. Let the domain of the problem,

f(x; t) : x 2 [x ; x ]; t 2 [t1; t2]g ;


e

be discretised into regular triangular elements using the grid of points de ned by

for

i = 1; . . . ; n and j

xi+(j

1)n

Ti+(j

1)n

i
n
j
m

1
1

(xo

xe ) + xe ;

(t2

t1) + t1;

1
1

= 1; . . . ; m.
187

Let
l
X

h (x; t) =
,

be an approximation to

l = nm.

substituting (6.19) for

L() =

Tl

where the

i

basis functions, as in Figure 5.2, the


determined, and

are two-dimensional piecewise linear


are parameters of the solution, to be

 in (6.18) to give
Z

T1

xn
x1

p^(h )B dx dt +
Z

xn

Tl

T1



Co Bh x

h T g2


1

dt

h T g1 B dx;
1

x1



Ce Bh x

 = (1; . . . ; l)T .

where

The approximation for

Fi() =
Z

for

(6:19)

The nite dimensional version of (6.18) is generated by

i i (x; t);

i=1

Tl 

T1

@L
@i

Co Bo ijxn

Tl

T1

 is given by (6.19), where  satis es


Z

xn

x1

h2
x

gh + 

h
t

Ce Be ijx1 dt +

xn 

x1

@ i
@t

ijTl g2

@ i
+
B dx dt
@x
h
x

ijT1 g1 B dx = 0;

(6.20)

i = 1; . . . ; l.
One way of solving (6.20) is by using Newton's method. Given an approxi-

mation

k

to

 an updated approximation is obtained from


k+1 = k +  k ;

where

J ( k )   k

F(k )

(6:21)

and

J ( ) =

(Z

Tl
T1

xn
x1

"

@ j
@t

@ j
+
@x

h
x

h
t

188

@ i
@t

@ i
+
@x

h
x

h2
x

gh + 
2

@ j @ i
B dx dt :
@x @x

The Jacobian

is symmetric and banded and (6.21) is solved, when

is not

inde nite, using the pre-conditioned conjugate gradient method, with the preconditioning matrix

= diag(J11 ; . . . ; Jl l ). Both

and

= (F1 ; . . . ; Fl )

are

evaluated exactly. The process is continued until

max i
i

max ik

< tolerance;

(6:22)

for some speci ed tolerance.


The initial approximation

xi
x2

0i =
for some constants
Let

xe

= 0,

a channel with

xo

v0

T1) E

i = 1; . . . ; l;

(6:23)

.
and E

= 10,

and

diculty with de ning


and

is given by

x1 0
v + (Ti
x1

t1

B (x) = 10

Ce (t), Co(t), g1 (x)

0

= 0 and

and

g2 (x)

t2

h(x) = 0

= 10. The algorithm is implemented in


for

x 2 [0; 10].

The boundary functions

also need to be prescribed. There is an obvious

g2 (x), the depth for x 2 [0; 10] at the time t2 .

Here

g1 (x)

g2 (x) are de ned by g1 (x) = g2 (x) = d^, where d^ > 0 is either the subcritical

or the supercritical root of


1

gd^3

~ ^2 + C 2 = 0;
Ed
2

~ is given the value 50 and


where E

= 10, that is,

g1

and

g2

are the depths in

~ = 50 and mass ow at inlet


the channel for a steady state ow with energy E

= 10. The functions

Ce (t) and Co (t) are de ned by

Ce (t)

8
>
>
>
>
>
>
>
>
<
>
>
>
>
>
>
>
>
:

10

C^ t

t 2 [0; 2]

10

C^ (4

t) t 2 [2; 4]
t 2 [4; 10]

10

189

Co (t)

8
>
>
>
>
>
>
>
>
<
>
>
>
>
>
>
>
>
:

10

C^ t

t 2 [0; 2]

10

C^ (4

t) t 2 [2; 4]

t 2 [4; 10]

10

^ is a given constant in the range 0


where C

 C^  10.

Thus, in this example, any time-dependence of the resulting ow is due to the


changes in the mass ow at inlet and outlet with time. The conditions given above
could be generated in practice by taking an initial steady ow with energy 50,
and values of mass ow at inlet and outlet of 10, where these values are controlled
by using a weir or a sluice gate. The values of the mass ow at inlet and outlet
could be altered for

t 2 [0; 4] and then returned to their original values.

The ow

might then be expected eventually to return to a steady state.


Let

n = 9 and m = 9.

Then the algorithm converges to a subcritical approx-

^ = 0, in 5 Newton iterations for C


^ = 1 and
imation in 4 Newton iterations for C
^ = 3, for a tolerance in (6.22) of 10 3 . The initial
in 5 Newton iterations for C
approximation

0

The value of

is, in each case, given by (6.23), with

xh

v0 = 2:5 and E

= 50.

in each element may be thought of as being an average of

the velocity taken over the time period covered by the element. The piecewise
constant velocity approximations for

C^

n = 9 and m = 9, in the three cases C^

= 0,

^ = 3, are shown in Figure 6.3. The length of the arrow in each


= 1 and C

element is directly proportional to the approximate velocity,

xh, in that element.

Notice that in Figure 6.3a the ow is uniform, as is expected for the given
channel shape and for the boundary conditions

Ce

and

Co

which are independent

of time. In Figure 6.3b it can be seen that the e ect of decreasing the mass ow
at inlet and outlet for

2 [0; 4] is to reduce the velocity during this time.


190

The

e ect is more pronounced in Figure 6.3c, where the reduction in the mass ow at
inlet and outlet is larger.
The success of the algorithm is heavily dependent on choosing boundary conditions which are consistent with one another. In particular, for certain choices,
there may be no solution at all or the solution may be discontinuous, in which
case, the given algorithm will be unsuccessful since in using the functional (6.18)
an assumption is made that the variables are continuous.
Supercritical approximations may be generated by using an appropriate
method to solve (6.21) for

 k , where J ()k

191

is inde nite.

b)

10

c)

10

10

10

10

t
0

scale: v=5

Figure 6.3: Time-dependent subcritical piecewise constant velocity approximations for

a) C^

= 0,

b) C^

= 1 and

c) C^

= 3.

192

Chapter 7
Concluding Remarks
The central part of the work described in this thesis can be thought of as having two distinct components. The rst component deals with the derivation of
variational principles for free surface ows while in the second part a selection
of these variational principles is used to generate numerical approximations to
free surface ows. Variational principles for three-dimensional free surface ows
are stated in Chapter 3 and used to derive principles for shallow water ows.
Approximations to shallow water ows are generated in Chapters 4, 5 and 6, and
Chapter 6 also contains an algorithm for approximating three-dimensional steady
ows in a channel of constant breadth.
Two variational principles for general three-dimensional ows are used | one
based on Hamilton's principle, (3.12), and the other based on Luke's principle
(Luke (1967)). By approximating the variables by their shallow water counterparts, performing the integration with respect to the vertical coordinate z and
adding on appropriate boundary terms, these two principles are reduced to give
variational principles for shallow water. The process of changing variables in the
193

functionals of the two shallow water principles derived in this way then allows the
integrands to be expressed in terms of the p and r functions, de ned by (3.27)
and (3.29) respectively, and multiples of the conservation laws, (2.20) and (2.24),
and the irrotationality condition, (2.15).
The function p has the values of vertically averaged pressure while r may be
thought of as a Lagrangian density since its value at a point is the di erence
between kinetic and potential energy of a particle at that point. By recognising
that p and r are related by means of a Legendre transform, two further functions
| denoted by P and R | are constructed, so that p, r, P and R constitute a
quartet of functions related to one another by a closed set of Legendre transforms,
as shown in Figure 3.3. The function P has the values of ow stress and the value
of R at a point is the total energy of a particle at that point.
Benjamin and Bowman (1987) consider conservation laws and symmetry properties of Hamiltonian systems, including shallow water, for which they derive four
functions, two of which | identi ed by them as a Hamiltonian density and a ow
force | have the values of the functions R and P respectively, apart from constant
multipliers. The approach described here is more direct.
A set of four functionals | based on the p, r, P and R functions | is comprised of the two functionals derived from the variational principles for threedimensional free surface ows and the two functionals generated by substituting
P

and R for p and r, respectively, in these functionals using the Legendre trans-

forms. By making the assumption that the ow is independent of time, functionals


for steady state ows are derived. Then, constraining the variations in the `p'
principle for steady ow to satisfy irrotationality, giving (3.94), and constraining
194

the variations in the `P' principle for steady ow to satisfy the conservation of
mass equation and a boundary condition on the mass ow, giving (3.95), the
gas dynamics analogy may be invoked to identify (3.94) and (3.95) as examples
of Bateman's functions (Bateman (1929)). Sewell (1963) re-examined the relationships between these principles, in the context of Legendre transforms, for
three-dimensional steady ows in perfect uids. Use has been made of these variational principles, by, for example, Lush and Cherry (1956) and Wixcey (1990),
to generate approximate solutions to the equations of motion for compressible
gas ows.
For the case of shallow water there exist the extra variational principles |
the `r' and `R' principles and all of their constrained versions | which may be
used to approximate solutions of the shallow water equations. These principles
are of particular value since they contain functionals of the depth of ow and
can thus be used directly for generating approximations to the depth, unlike the
constrained `p' and `P' principles.
The implementation of variational principles for nding approximations to time
dependent ows reveals several inherent problems, which are discussed below.
Therefore, with one exception, the numerical methods are applied to variational
principles for steady state ows.
The constrained `r' principle (3.117) for steady quasi one-dimensional ow
depends on only one variable | the depth of ow | which makes it a natural candidate for developing an algorithm to generate approximations to the
depth function. The constrained `p' principle for steady ow (3.94) and the version of the variational principle for steady quasi one-dimensional ow
195

are useful too since they also depend on only one variable each | the velocity potential. Other variational principles are used as well, namely, the unconstrained `r' principle for steady quasi one-dimensional ow, which depends on the
depth, mass ow and velocity potential functions, the `R' principle for steady ow
constrained to satisfy irrotationality, which depends on the depth and velocity potential functions, the constrained `p' principle for unsteady quasi one-dimensional
ow and a version of Luke's free surface principle (Luke (1967)), which depends
on the velocity potential and the height of the free surface.
The same basic algorithm is applied to all of the variational principles and is,
on the whole, successful. The variables in the variational principles are expressed
as expansions in terms of nite element basis functions | piecewise linear and
piecewise constant basis functions in one dimension and piecewise linear basis
functions in two dimensions. The parameters of the solutions are determined as
the values which cause the functionals of the variational principles to be stationary
with respect to variations in the nite dimensional space spanned by the nite
element basis functions. In each case this leads to one or more sets of equations,
at least one of which is non-linear.
The method chosen to solve these non-linear sets of equations is Newton's
method, which has quadratic convergence to the approximate solution, given
an initial guess suciently close to the solution. The Jacobian in each case is
symmetric and banded and, in fact, tridiagonal for the equations generated from
the functionals for steady quasi one-dimensional ow. For tridiagonal Jacobians
the update to the approximation is found using Gaussian elimination and back
substitution, while for non-tridiagonal positive or negative de nite Jacobians the
196

update is found using a pre-conditioned conjugate gradient method.


In this way it is possible to nd approximations to the shallow water variables
in cases where the ow is continuous.
A slightly di erent approach is taken in order to approximate discontinuous
ows and in using a version of Luke's principle for free surface ows to approximate ows which do not necessarily satisfy the assumptions of shallow water
theory. The constrained `r' principle for steady quasi one-dimensional ow is
used to generate approximations to discontinuous depth functions. In both cases
the ow variables | depth in the `r' principle case and velocity potential in the
version of Luke's principle | are expanded in terms of the nite element basis
functions and the values of the parameters are found for which the functionals
are stationary with respect to variations in the parameters. The positioning of
the hydraulic jump in the discontinuous case and the free surface in the case of
Luke's principle is carried out by a direct application of the appropriate natural
conditions of the corresponding variational principles. The method appears to
work well in approximating discontinuous depth functions but is less successful in
approximating the height of the free surface for a ow which does not necessarily
satisfy the assumptions of shallow water theory. In this last case the method
seems initially to be converging to a solution and then the method diverges. This
may suggest that the solution algorithm is only capable of converging to the solution from one direction so that, if the algorithm causes an approximation to the
solution to overshoot the solution, it will not converge.
The constrained `r' principle for steady quasi one-dimensional ow is used in
Section 4.1.2 to derive an error bound on the piecewise constant approximation to
197

the depth function. The piecewise constant approximation is found to converge


linearly, in the L2 norm, to the depth of ow. Numerical experiments show that
the piecewise linear approximation to the depth, generated using the constrained
`r' principle, is quadratically convergent, in the L2 norm, to the exact solution.
The error in the piecewise constant approximation to the velocity, derived from
the piecewise linear approximation to the velocity potential generated using the
constrained `p' principle for steady quasi one-dimensional ow, is considered in
Section 4.3.2. The piecewise constant approximation can be seen to converge
linearly, in the L2 norm, to the velocity of the ow, using numerical experiments.
The availability of the exact one-dimensional solution for ow in a channel,
which can be found by solving (2.55) and (2.56) to give the values of energy and
mass ow at each point and then solving (2.34) and (2.35) simultaneously to give
the values of the depth and velocity at each point, enables the above conclusions
to be drawn about the accuracies of the approximations generated from `p' and `r'
functionals for steady quasi one-dimensional ow. The exact solutions of the twodimensional shallow water equations are not known and so the two-dimensional
approximations cannot be analysed in this way.
The usual method of nding error bounds for nite element approximations,
such as in Strang and Fix (1973) and Hughes (1987), depends on identifying a
norm, in which the distance between the exact solution and the nite dimensional space spanned by the nite element basis functions is minimised by the
approximation derived as being the function that either minimises or maximises
a particular functional. In the shallow water case it has not been possible to identify such a norm using either the functional of the constrained `p' principle or the
198

functional of the constrained `R' principle, both of which are used in Chapter 5
to generate approximations to the ow variables in two dimensions. However the
two principles each give rise to approximations for the velocity and, by comparing
the velocity approximations over several di erent grids, it can be seen that, as
the grid is re ned, the di erence between the two approximations decreases.
An algorithm is presented in Section 4.4 which uses the constrained `p' principle for steady quasi one-dimensional ow to generate approximations to the
velocity potential on an adaptive grid. The approximation is the nite element
expansion such that the `p' functional is stationary with respect to variations in
the parameters of the expansion and with respect to variations in the positions
of the internal nodes of the grid on which the expansion is de ned. The L2 error
of the velocity approximation, generated from the approximation to the velocity
potential, is shown to be reduced, but only slightly, when compared with the
corresponding error for an approximation de ned on a xed regular grid with the
same number of nodes.
In Chapter 6 an algorithm is described for generating approximations to timedependent velocity potential functions using the constrained `p' principle for timedependent quasi one-dimensional ow. While some success is achieved, that is,
for a particular set of prescribed boundary functions approximate solutions are
generated, the success is very dependent on de ning the boundary functions in a
consistent way. In particular the boundary functions must be such that a solution
actually exists and, if an approximation is to be found using functional (6.18),
this solution must be continuous.
The boundary functions required are the values of mass ow at the inlet and
199

outlet points of the channel, over the whole time interval being considered, and
values of the depth at every point in the channel at the initial and nal times.
In order to prescribe this last condition the solution at the nal time must be
known in advance of solving the problem. This diculty is overcome in Chapter 6
by assuming that the ow is initially time-independent and that it returns to its
original steady state before the end of the time interval. The boundary functions
for the mass ow must then be de ned consistently with this, in particular, it
is necessary that, over the period of time considered, the same amount of mass
leaves the channel as has entered.
A practical problem which might be posed is to nd the subsequent ow as
a function of time, given the depth of the uid initially and the variations of the
mass ow at inlet and outlet with time. Unless the depth function at the end
of the time interval can be deduced from this data the nite element method
using the functionals for time-dependent ow derived in Chapter 3 is of little use.
One possibility is to consider a very long time interval and to set the boundary
function for depth at the nal time equal to the asymptotic solution, given as
t

! 1. However, this would be computationally expensive because of the size of

the domain which would be necessary to accommodate a suciently long time.


The problem does not just suddenly appear; it is present in Hamilton's principle (3.12). In its general form, Hamilton's principle, with variations vanishing
at the initial and nal times, gives rise to di erential equations of motion. Once
these equations have been integrated any boundary and initial conditions may be
applied. In the same way the variational principles for shallow water, deduced
from Hamilton's principle and Luke's principle, give rise to the equations of mo200

tion for shallow water ows in the domain of integration, assuming that variations
vanish at the initial and nal times so that the time boundary terms also vanish
(the solutions are assumed known on the time boundaries and so these terms are
constants).
In order to use the variational principles for time-dependent shallow water to
generate time-dependent approximations, boundary terms are added in Chapter 3
so that non-zero variations are allowed on the time boundaries and no assumption
need be made about knowing the solution at the nal time. However, it can be
seen that this only rephrases the basic problem since the solutions at the ends of
the time interval are precisely the functions which are required for the boundary
terms.
The numerical methods employed in this thesis have been successful in generating approximations to continuous steady ows which are wholly subcritical,
for both quasi one-dimensional and two-dimensional ows, or wholly supercritical, for quasi one-dimensional ows. Success is also achieved in approximating
discontinuous steady quasi one-dimensional ows. However, as described above,
the application of the methods to the time-dependent case presents diculties.
In order to investigate the accuracy of the shallow water approximation to
free surface ows it would be useful to have nite element approximations to free
surface ows. The algorithm given in Section 6.1, which attempts to generate
such an approximation, fails but by adapting other methods, for example those
of Aitchison (1979) and Ikegawa and Washizu (1973), it should be possible to
obtain some approximations for comparison.
Other possibilities for future work include generating supercritical approxi201

mations to two-dimensional ows and approximations to discontinuous ows in


two-dimensions. In the rst case, if an attempt is made to solve the non-linear
set of equations obtained from the nite dimensional versions of the functionals
by Newton's method, the Jacobian is inde nite so that a more sophisticated technique for solving a system with an inde nite matrix must be investigated; there
is also a possibility that the Jacobian may go singular. An algorithm to approximate discontinuous ows in two dimensions could be based on the method for
approximating discontinuous ows in one dimension, that is, by generating two
continuous solutions | one subcritical and one supercritical | and coupling them
at a curve, whose position is determined using the two-dimensional jump conditions. Any such algorithm using the variational principles of Section 3.8 would
only be able to generate approximations to ows with a discontinuity which does
not terminate inside the domain, since, in deriving these variational principles,
this assumption is made.

202

References
Aitchison J. M. (1979). A variable nite element method for the calculation of
ow over a weir. Rutherford Laboratory, Chilton, Oxon.
Bateman H. (1929). Notes on a di erential equation which occurs in the twodimensional motion of a compressible uid and the associated variational
problems. Proc. R. Soc. Lond. A 125 599{618.
Benjamin T. B. and Bowman S. (1987). Discontinuous solutions of onedimensional Hamilton systems. Proc. R. Soc. Lond. B 413 263{295.
Chadwick P. (1976). Continuum Mechanics. George Allen and Unwin Ltd.,
London.
Courant R. and Friedrichs K. O. (1948). Supersonic Flow and Shock Waves.
Interscience.
Courant R. and Hilbert D. (1953). Methods of Mathematical Physics Vol. 1.
Interscience.
Goldstein H. (1980). Classical Mechanics (2nd ed.). Addison-Wesley.
Golub G. H. and Van Loan C. F. (1989). Matrix Computations (2nd ed.). The
John Hopkins University Press, Baltimore, Maryland, U.S.A.
Hughes T. J. R. (1987). The Finite Element Method. Linear Static and Dynamic
Finite Element Analysis. Prentice Hall, Englewood Cli s, N. J.

Ikegawa M. and Washizu K. (1973). Finite element method applied to analysis


of ow over a spillway crest. Int. J. Num. Meth. Eng.
203

6 179{189.

Johnson L. W. and Riess R. D. (1982). Numerical Analysis (2nd ed.). AddisonWesley.


Lamb H. (1932). Hydrodynamics (6th ed.). Camb. Univ. Press.
Luke J. C. (1967). A variational principle for uid with a free surface. J. Fluid
Mech.

27 395{397.

Lush P. E. and Cherry T. M. (1956). The variational method in hydrodynamics.


Quart. J. Mech. Appl. Math.

9 6{21.

Miles J. and Salmon R. (1985). Weakly dispersive non-linear gravity waves.


J. Fluid Mech.

157 519{531.

Salmon R. (1988). Hamiltonian uid mechanics. Ann. Rev. Fluid Mech.

20

225{256.
Seliger R. L. and Whitham G. B. (1968). Variational principles in continuum
mechanics. Proc. R. Soc. Lond. A 305 1{25.
Serrin J. (1959). Mathematical principles of classical uid mechanics. Handbuch
der Physik VIII-1 125{263 Springer-Verlag.

Sewell M. J. (1963). On reciprocal variational principles for perfect uids.


J. Math. Mech. 12 485{504.

Sewell M. J. (1987). Maximum and Minimum Principles. Camb. Univ. Press.


Stoker J. J. (1957). Water Waves. Interscience.
Strang G. and Fix G. J. (1973). An Analysis of the Finite Element Method.
Prentice Hall, Englewood Cli s, N. J.
204

Wathen A. J. (1987). Realistic eigenvalue bounds for the Galerkin mass matrix.
I.M.A. J. Numer. Anal. 7 449{457.

Wixcey J. R. (1990). Stationary principles and adaptive nite elements for


compressible ow in ducts. Ph.D. Thesis, Univ. of Reading.

205

Das könnte Ihnen auch gefallen