Directory UMM :Data Elmu:jurnal:A:Advances In Water Resources:Vol23.Issue8.2000:

Advances in Water Resources 23 (2000) 849±865
www.elsevier.com/locate/advwatres

Adaptive hierarchical grid model of water-borne pollutant dispersion
A.G.L. Borthwick a,*, R.D. Marchant a,b, G.J.M. Copeland b
b

a
Department of Engineering Science, Oxford University, Parks Road, Oxford OX1 3PJ, UK
Department of Civil Engineering, Strathclyde University, 107 Rottenrow, Glasgow G4 0NG, UK

Abstract
Water pollution by industrial and agricultural waste is an increasingly major public health issue. It is therefore important for
water engineers and managers to be able to predict accurately the local behaviour of water-borne pollutants. This paper describes
the novel and ecient coupling of dynamically adaptive hierarchical grids with standard solvers of the advection±di€usion equation.
Adaptive quadtree grids are able to focus on regions of interest such as pollutant fronts, while retaining economy in the total number
of grid elements through selective grid re®nement. Advection is treated using Lagrangian particle tracking. Di€usion is solved
separately using two grid-based methods; one is by explicit ®nite di€erences, the other a di€usion-velocity approach. Results are
given in two dimensions for pure di€usion of an initially Gaussian plume, advection±di€usion of the Gaussian plume in the rotating
¯ow ®eld of a forced vortex, and the transport of species in a rectangular channel with side wall boundary layers. Close agreement is
achieved with analytical solutions of the advection±di€usion equation and simulations from a Lagrangian random walk model. An

application to Sepetiba Bay, Brazil is included to demonstrate the method with complex ¯ows and topography. Ó 2000 Elsevier
Science Ltd. All rights reserved.

1. Introduction
Water pollution has long been recognised as of extreme importance as a public health issue. For example,
the Victorian water supply and sewerage system in
London was constructed as a direct consequence of the
cholera epidemic in 1854 centred at the Broad Street
Pump. In the late 20th century, water pollution from
industrial and agricultural e‚uent a€ects all types of
water source, ranging from groundwater aquifers to
oceans. Examples include the dumping of sludge and
other toxic wastes at sea, oil spills from ships, the discharge of low-grade radioactive waste from nuclear
power stations into coastal waters, runo€ of agricultural
chemicals (fertilisers and pesticides) into watercourses,
municipal and industrial e‚uent discharge into rivers
from outfalls, and algal blooms in shallow lakes and
reservoirs.
Accurate, ecient modelling of water-borne pollution
is essential for an understanding of the dispersion of

industrial and agricultural materials that enter overland
or groundwater ¯ows. In general, water-borne pollution
commences with a highly concentrated and possibly
sudden discharge of toxic material. Inert pollutants are

*

Corresponding author.

advected by the ¯ow velocities and di€used by turbulent
mixing and, to a lesser extent, molecular di€usion. The
term dispersion is commonly used to describe pollutant
spreading. For typical watercourses, the ¯ow is fully
turbulent and mixing due to eddies is several orders of
magnitude larger than mixing by molecular di€usion. It
is vital that any model of pollution transport should be
able to simulate the localised features such as occur at
pollutant fronts or in oscillating ¯ows. It is to this end
that the work presented here is directed.
Mathematical modelling of water-borne pollutant

transport is usually based on the governing ¯ow equations (mass and momentum conservation) coupled with
a species transport equation which linearly combines
advection, di€usion and source/sink terms. Various numerical solution techniques have been devised for discretising and solving the species transport equation. One
important approach is Lagrangian particle tracking
whereby the continuous mass of pollutant is discretised
into a prescribed set of masslets, each of which is advected with the ¯ow velocity and then di€used by further
particle motions (in keeping as far as possible with the
mathematical solution of the pure di€usion equation).
For example, J
ozsa [16] applied Gaussian random walks
to each particle, whereas Addison [1] employed a fractional Brownian motion approach in conjunction with
white noise. Lagrangian techniques have the advantage

0309-1708/00/$ - see front matter Ó 2000 Elsevier Science Ltd. All rights reserved.
PII: S 0 3 0 9 - 1 7 0 8 ( 0 0 ) 0 0 0 2 1 - X

850

A.G.L. Borthwick et al. / Advances in Water Resources 23 (2000) 849±865


that the advection process is correctly modelled, but the
drawback that a very large number of masslets is required to deal with the di€usion step accurately. It
should also be noted that it is necessary to couple the
masslet motions to the ¯ow solver, which is invariably
undertaken in an Eulerian frame of reference. An interpolated velocity ®eld has to be used which has a
smoothing e€ect on the solution. Another approach is to
solve the advection±di€usion equation entirely on a
®xed Eulerian grid. In this case, the di€usion calculation
is relatively straightforward, but great care has to be
taken with the ®rst derivative advection terms to avoid
instability or numerical dissipation. For example, Ekebjñrg and Justesen [9] used a cartesian grid-based explicit third-order accurate ®nite-di€erence method.
Borthwick and Kaar [3] solved the curvilinear species
equation on boundary-®tted grids with the donor cell
method for advection.
An attractive option is to use Lagrangian particle
tracking or the method of characteristics for advection
(e.g., [6]), and then to solve di€usion on an Eulerian
grid. Holly and Usseglio-Polatera [15] employed ®nite
di€erences for di€usion and a high-order method of
characteristics for advection. Karpik and Crockett [18]

combined ®nite volumes on a curvilinear grid for di€usion with method of characteristics for advection. Bruneau et al. [4] have reviewed use of the method of
characteristics as opposed to ®nite di€erences for convection dominated problems. For mixed Lagrangian±
Eulerian schemes, it is necessary to use interpolations
when exchanging species information between the grid
nodes and the masslets. High grid resolution may be
extremely important when simulating di€usion. Pollutant fronts are often sharp and the transportive motions
are tied into the local ¯ow ®eld, which may vary greatly
in scale. It is also possible for advecting pollutants to
exhibit chaotic trajectories because of time-dependent
¯ow ®elds. An example where the local ¯ow ®eld is extremely important is at the end of an outfall where ef¯uent is discharged into tidal receiving waters.
Anastasiou and Chan [2] used non-adapted unstructured triangular grids generated using the advancing
front technique in demonstrating the ability of a ®nitevolume scheme to model the linear advection of steep
fronts. Gaspar et al. [12] used hierarchical, but nonadaptive, multi-grid methods for di€usion, with particle
tracking for advection. The foregoing references show
that unstructured and hierarchical grids are well suited
to local mesh re®nement.
This paper describes an adaptive hierarchical gridbased numerical scheme for predicting localised waterborne pollutant transport in two-dimensions. The grid
generator utilises a novel approach whereby grid regularisation is undertaken eciently in a single sweep. This
permits dynamic coupling between the adaptive quadtree grid and the advection±di€usion solver. In the


present work, the prescribed initial pollutant mass is
discretised into a set of masslets and the ¯ow domain
rescaled within the unit square. The solution process is
as follows: (i) move the masslets in a Lagrangian manner
according to the ¯ow velocity components, (ii) create a
re®ned hierarchical grid about the masslets, (iii) calculate the concentration at the centre of each cell, (iv) solve
the di€usion equation for each cell either by explicit ®nite di€erences or using a di€usion-velocity approach
and (v) repeat the calculations from (i). Results are
presented for standard benchmark tests (for which analytical and alternative numerical solutions are available), and the model is found to be accurate and
computationally ecient. An application to a real location (Sepetiba Bay, Brazil) is also presented, which
demonstrates the ability of the model to represent
complex topography and an evolving plume from a
continuous discharge.

2. Hierarchical grids
In order to achieve local grid densities which relate
properly to evolving pollutant and ¯ow features, it is
necessary to use either unstructured or hierarchical
adaptive grids. Hierarchical grids involve recursive
spatial decomposition and represent a sensible compromise between control of local mesh re®nement, speed

of generation and array storage requirements. Quadtrees
have been applied to two-dimensional domains in image
processing (e.g., [20]) and increasingly in computational
¯uid dynamics (e.g., [8,12,13,17,22]). Here, a square
quadtree grid generator has been selected because of its
robustness and relative ease of generation in comparison
with other unstructured grid generation techniques.
The quadtree grid generation method is summarised
below:
(i) create a set of seeding points according to the discretised pollutant distribution and ¯ow boundaries;
(ii) rescale the ¯ow domain to ®t within the unit
square (i.e., grid level 0);
(iii) input the subdivision level of the ®nest grid, m;
(iv) divide the square into four panels (i.e., grid re®nement level 1);
(v) recursively check each panel for masslets, and, if
it contains more than p masslets and is at a level below m, then subdivide into four sub-panels;
(vi) carry out grid regularisation (by further subdivision) to ensure adjacent and diagonally touching
cells should not be more than one level apart.
Data on each cell are stored in an integer tree array of
n elements, including pointers to the next cell and information on neighbouring cell levels. Each cell has a

unique identi®cation number created by the concatenation of local reference numbers determined from the
domain decomposition as it proceeds. At any arbitrary

A.G.L. Borthwick et al. / Advances in Water Resources 23 (2000) 849±865

level, the local reference number is determined from
which quadrant the panel lies in as follows: northwest ˆ 11; north-east ˆ 21; south-west ˆ 12; and southeast ˆ 22. Trailing zeros are then added to the cell
identi®cation number to ensure commonality of length.
In order to facilitate neighbour ®nding, pointers to the
cell parent and its children, if any, are stored with the
cell identi®cation number. For any cell, its level is equal
to the number of pairs of non-zero digits in the identi®cation number. The cell-centre co-ordinates are calculated from
x ˆ 0:5 ‡

l
X
1
…2im ÿ 3†;
m‡1
2

mˆ1

im 2 O

…1a†

im 2 E;

…1b†

and
y ˆ 0:5 ÿ

l
X
1
…2im ÿ 3†;
m‡1
2
mˆ1


where l is the cell level, and im are successive odd (O) or
even (E) digits of the cell identi®cation number. In the
above system, the co-ordinates start from the south-west
corner of the unit square root panel.
Grid regularisation and neighbour ®nding are undertaken together in strict order, starting from the
smallest cells (i.e., highest level). For any object cell, its
identi®cation number is manipulated to give the identi®cation numbers of eight hypothetical (same size) adjacent and corner neighbour cells. Full details of the cell
number manipulations are given by Greaves and
Borthwick [14], and so only a brief summary follows.
Cell number manipulation initially involves removing
trailing zeros, and splitting the remaining non-zero integers into odd and even strings as before. From the
quadtree structure, one of the east or west (and north or
south) neighbours must have the same parent as the
object cell. This neighbour will hereafter be referred to
as the sister cell, and by de®nition, each cell will have
one east or west lateral, one north or south lateral, and
one diagonal sister neighbour. The other neighbours are
more distantly related in the quadtree, entailing a search
upwards in the tree via parents of parents, etc., and then

downwards via an aunt or great aunt, etc., until the
more distant cousin neighbour is located. In practice,
hypothetical sister neighbour numbers are obtained by
converting the ®nal digit in O or E from 1 to 2 (or vice
versa), recombining the new and old O and E digits, and
adding back the trailing zeros. It should be noted that
the initial conversion is equivalent to a re¯ection in the
central axis of the parent cell. Each cousin neighbour is
located by a direct re¯ection in one of the central axes of
its nearest common ancestor (i.e., the (lowest-level) ancestor shared by the cell and its neighbour). Due to the
quadtree structure, both the object and neighbouring
cousin cells border this axis, while occupying separate
quadrants of the nearest common ancestor. In imple-

851

mentation, cousins are identi®ed as follows. Retain the
O and E digits of the nearest common ancestor (e.g.,
grandparent in the case of ®rst cousins). Swap the next
integer (1 for 2, or vice versa) in either, or both, of the O
or E digits. Set the remaining digits to zero. Recombine
to form the cousin cell identi®cation number. Sister and
cousin cell identi®cations are illustrated in the example
application given below.
In practice, the quadtree is searched for the existence
of each hypothetical neighbour cell because a same size
neighbour cannot exist if an undivided lower-level cell is
encountered at the end of the tree path. If the tree search
fails for a particular hypothetical neighbour cell, then
the following strategy is adopted. The tree is descended
from the nearest common ancestor using pointers to
children until a child cell identi®cation number is found,
which is the same as that of an existing cell. This determines the identi®cation number of the neighbour cell.
If it is more than four times the size of the object cell, the
neighbour cell is further subdivided recursively and the
new cells numbered accordingly. Hence, any new
neighbour cells created are always one level lower than
the object cell, and are therefore considered later with
cells at the next (lower) level. This has the major (and
novel) advantage that regularisation spreads out from
regions of high cell density, and is therefore completed
in a single sweep.
The following example illustrates the relationship
between the quadtree grids and the integer tree. Fig. 1
depicts the non-regularised level 4 quadtree grid that
would be created about a pair of seeding points located
at (0.3, 0.3) and (0.35, 0.35) within the unit square. The
associated tree structure is shown in Fig. 2. Cell information is held in the following arrays:

Fig. 1. Initial non-regularised quadtree grid.

852

A.G.L. Borthwick et al. / Advances in Water Resources 23 (2000) 849±865

Fig. 3. Regularised quadtree grid.
Fig. 2. Tree structure for non-regularised grid.

Cell
number

Identi®cation
number

Parent
pointer

Child pointers

0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

00000000
11000000
21000000
12000000
12110000
12210000
12211100
12212100
12211200
12211211
12211221
12211212
12211222
12212200
12120000
12220000
22000000

±
0
0
0
3
3
5
5
5
8
8
8
8
5
3
3
0

1
±
±
4
±
6
±
±
9
±
±
±
±
±
±
±
±

2
±
±
5
±
7
±
±
10
±
±
±
±
±
±
±
±

3
±
±
14
±
8
±
±
11
±
±
±
±
±
±
±
±

16
±
±
15
±
13
±
±
12
±
±
±
±
±
±
±
±

To illustrate the neighbour ®nding techniques, consider cell 10 in Fig. 3, which has identi®cation number
12211221. The odd and even digits are O ˆ …1; 2; 1; 2†
and E ˆ …2; 1; 2; 1†. After conversion, we have
Onew ˆ …1; 2; 1; 1† and Enew ˆ …2; 1; 2; 2†. Combining
Onew with E, gives 12211211 corresponding to the
identi®cation number of cell 9, which is the west sister of
cell 10. Similarly, O combined with Enew gives 12211222,
which refers to the south sister cell 12. Now return to
cell 10 with identi®cation number 12211221. Its parent
and grandparent are cells 8 and 5 with identi®cation
numbers 12211200 and 12210000, respectively. First,
cousins are obtained by integer manipulation of the ®nal
two digits of the parent cell to give 12211100 (i.e., north

Fig. 4. Tree structure for regularised grid.

cell 6), 12212200 (i.e., east cell 13) and 12212100 (i.e.,
north-west cell 7). Second, cousins are obtained using
the grandparent cell number and again altering the last
pair of digits to obtain 1211 (cell 4), 1222 (cell 15) and
1212 (cell 14).
After regularisation, the quadtree grid and integer
tree are as indicated in Figs. 3 and 4 with the cell information arrays becoming:
Cell
number
0
1
2
3
4

Identi®cation
number
00000000
11000000
21000000
12000000
12110000

Parent Child pointers
pointer
±
0
0
0
3

1 2
29 30
37 38
4 5
17 18

3
31
39
14
19

16
32
40
15
20

A.G.L. Borthwick et al. / Advances in Water Resources 23 (2000) 849±865

5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40

12210000
12211100
12212100
12211200
12211211
12211221
12211212
12211222
12212200
12120000
12220000
22000000
12111100
12112100
12111200
12112200
12221100
12222100
12221200
12222200
12121100
12122100
12121200
12122200
11110000
11210000
11120000
11220000
22110000
22210000
22120000
22220000
21110000
21210000
21120000
21220000

3
5
5
5
8
8
8
8
5
3
3
0
4
4
4
4
15
15
15
15
14
14
4
14
1
1
1
1
16
16
16
16
2
2
2
2

6
±
±
9
±
±
±
±
±
25
21
33
±
±
±
±
±
±
±
±
±
±
±
±
±
±
±
±
±
±
±
±
±
±
±
±

7
±
±
10
±
±
±
±
±
26
22
34
±
±
±
±
±
±
±
±
±
±
±
±
±
±
±
±
±
±
±
±
±
±
±
±

8
±
±
11
±
±
±
±
±
27
23
35
±
±
±
±
±
±
±
±
±
±
±
±
±
±
±
±
±
±
±
±
±
±
±
±

13
±
±
12
±
±
±
±
±
28
24
36
±
±
±
±
±
±
±
±
±
±
±
±
±
±
±
±
±
±
±
±
±
±
±
±

Fig. 5 shows the quadtree grid generated about 3143
boundary seeding points, which represent a river bifurcation. The grid has a maximum level of 9 and is composed of 9220 panels. The grid is identical to that
produced by Yiu et al. [23].

In vector form, the Fickian species transport equation
governing the spatial and temporal distribution of pollutant concentration c at any point in a continuous
medium is
oc
‡ urc ÿ r… Drc† ˆ s
ot

gradient operator. In two dimensions, assuming D to be
the molecular di€usivity, which is constant in space and
time,
 2

oc
oc
oc
o c o2 c
‡u ‡v ÿD
‡
ˆ s;
…3†
ot
ox
oy
ox2 oy 2
where u and v are the velocity components in the horizontal cartesian-coordinate directions, x and y. The twodimensional species equation is subject to the following
boundary conditions. At solid walls, there is no mass
¯ux and so the concentration gradient is zero from
FickÕs law. Thus,
oc
ˆ 0 at x ˆ xB
ox

and

oc
ˆ 0 at y ˆ yB ;
oy

…2†

in which t is time, u the ¯ow velocity vector, D the diffusivity tensor, s a source term, and r is the spatial

…4†

where boundaries are located at x ˆ xB and y ˆ yB . At
open boundaries, it is assumed that pollutant advects
across the boundary at the ¯ow velocity.
Free surface ¯ows which transport water-borne pollutants are almost invariably turbulent. It is usual to
de®ne the instantaneous concentration and instantaneous velocity vector as
c ˆ c ‡ c0

and

u ˆ u ‡ u0 ;

…5†

where the overbar and prime denote temporal mean and
¯uctuating components. Time-averaging the species
transport equation, we obtain


o
c
‡ ur
c ÿ r Dr
c ÿ u0 c0 ˆ s:
…6†
ot

Taking the turbulent concentration ¯ux to be analogous
to Reynolds stresses in the momentum equations, we
may assume
c;
ÿu0 c0 ˆ er

…7†

where e is a turbulent di€usivity coecient. Turbulent
¯uxes are much larger than molecular ¯uxes, and so


o
c
‡ ur
c ÿ r er
c ˆ s:
…8†
ot
For nearly horizontal ¯ows in shallow water, where
there are no ¯uxes through the bed or free surface, the
depth-averaged form of Eq. (8) is

oC
1
‡ UrC ÿ
r… qH erC † ˆ S
ot
qH

3. Governing equations

853

…9†

in which q is density and the total depth H ˆ d ‡ f
where d is the still-water depth and f is the free surface
elevation. The depth-averaged concentration, C, is de®ned as
Z f
1
c dz:
…10†

H ÿd
Note that U ˆ iU ‡ jV is the vector of depth-averaged
velocities, such that

854

A.G.L. Borthwick et al. / Advances in Water Resources 23 (2000) 849±865

Fig. 5. Example quadtree grid for river geometry.



1
H

Z

f

ÿd

u dz

and

V ˆ

1
H

Z

f

v dz:

…11†

 2

oC
oC
oC
o C o2 C
‡U
‡V
ÿe
‡
ˆ S;
ot
ox
oy
ox2
oy 2

…12†

which is exactly equivalent to Eq. (3), but with depthaveraged instead of instantaneous two-dimensional
quantities. For depth-averaged pollutant transport, the
solid wall boundary conditions are

ÿd

Similarly the depth-averaged source term is
Z f
1
s dz:

H ÿd

Writing out Eq. (9) assuming isotropic turbulent di€usivity, we have
oC
oC
oC
‡U
‡V
ot
ox
oy
 



1
o
oC
o
oC
qH e
qH e
‡
ˆ S:
ÿ
qH ox
ox
oy
oy

…13†

It should be noted that a more complicated discretisation scheme than presented in this paper would be
needed to deal with the additional second order cross
derivative terms encountered for anisotropic e, which is
particularly important in groundwater ¯ow. For uniform e, Eq. (13) reduces to
oC
oC
oC
‡U
‡V
ot
ox
oy
 



e
o
oC
o
oC
qH
qH
ÿ
‡
ˆ S:
qH ox
ox
oy
oy

…14†

For uniform ¯uid density and negligible variation in
total depth, further simpli®cation gives

oC
ˆ 0 at x ˆ xB
ox

and

oC
ˆ 0 at y ˆ yB :
oy

…15†

…16†

4. Numerical solver
In a similar manner to ChorinÕs [5] operator splitting
method, the advection and di€usion processes are
treated separately. The advection step is undertaken
using Lagrangian particle tracking. The new particle
positions are then used as seeding points, about which a
regularised quadtree grid is generated. Cell-centre concentrations are determined from the numbers of masslets in each cell times their individual masses divided by
the mass of water in the cell. Two methods are implemented to model the di€usion step: a predictor±corrector ®nite-di€erence scheme and a di€usion-velocity
approach. In the former, the concentration values are
updated, and a new distribution of masslets created

A.G.L. Borthwick et al. / Advances in Water Resources 23 (2000) 849±865

according to the nodal concentrations, ready for the
next advection step. In the latter scheme, concentration
gradients are computed for each cell and interpolation
used to compute the di€usion-velocity components. The
masslets are then moved again in a Lagrangian sense by
the di€usion velocities to new positions, ready for the
next advection step.
4.1. Advection
Initially, the total mass of pollutant, M, is divided
equally amongst a prescribed integer number of masslets, N. These are distributed in proportion to the initial
concentration pro®le, and a grid generated with the
masslets as seeding points. Cells in regions with nonzero concentrations but which contain no masslets are
each assigned a single masslet. For each cell, the mass of
each masslet, mc , is then revised so that mc ˆ Mc =Nc
where Mc is the cellÕs pollutant mass and Nc is the
number of masslets in the cell. Once the number of
masslets per cell has been determined, their starting
positions within each cell are speci®ed by random distribution. The masslets serve two purposes: one to
control mesh density; the other to enable advection to be
calculated by Lagrangian particle tracking.
The advection step is accomplished by moving
masslets with the ¯ow velocity components such that
dx
ˆU
dt

and

dy
ˆV:
dt

…17†

Using the predictor±corrector scheme, this becomes

Dt ÿ n
Uk ‡ Ukn‡1 and
2

Dt ÿ n
n
Vk ‡ Vkn‡1 ;
ˆ yk ‡
2

ˆ xnk ‡
xn‡1
k
ykn‡1

…18†

where k refers to the kth masslet located at (xk ; yk ), and
time t ˆ nDt. The corresponding ¯ow velocity components are (Uk ; Vk ), and are either interpolated from an
underlying grid in an engineering application or prescribed analytically for the validation tests. After the
masslets have been advected, their new positions are
used as seeding point locations for the construction of a
new grid. By numerical experimentation, it was found
that sensible results were achieved by setting the panel
subdivision parameter p ˆ 10, for a total of 10,000
masslets. This represents a compromise between resolution and computational eciency, and worked satisfactorily within the range of test cases considered
herein. Cell-centre concentration values are then calculated (ready for the di€usion step) by summing the mass
contributions from each masslet in the cell. The individual masslet positions are stored at this point in order
to minimise numerical di€usion on their subsequent replacement.

855

4.2. Di€usion: ®nite-di€erence scheme
The regularised quadtree grid contains 12 cell con®gurations. For each con®guration, the Laplacian (diffusion) operator was discretised using general Taylor
expansions [10]. Using the predictor±corrector scheme
to discretise the temporal derivative, an explicit algebraic formula was derived for each cell con®guration,
such that
n
n‡1 !
Dt oC
oC
n‡1
n
Cc ˆ Cc ‡
‡
:
…19†
2
ot c
ot c

The resulting expressions for the cell layouts depicted
in Fig. 6 are
n

oC
e ÿ
ˆ 2 Cwn ‡ Cnn ‡ Cen ‡ Csn ÿ 4Ccn ;
…20†

ot
4h
c

n

oC
4e ÿ n
n
n
5Cn ‡ 5Csn ‡ 4Cwn
‡ 4Cws
‡ 6Cen ÿ 24Ccn ;
ˆ

2
ot c 21h

…21†

n
oC
4e ÿ n
n
3Cw ‡ 3Csn ‡ 2Cnw
ˆ

ot c 11h2


n
n
‡ 2Cne
‡2Cen
‡ 2Cesn ÿ 14Ccn ;

…22†

n

oC
8e ÿ
n
n
n
‡ Cws
‡ Cen
‡ Cesn ÿ 6Ccn ;
ˆ 2 Cnn ‡ Csn ‡ Cwn

ot c 9h

…23†
n
oC
8e ÿ n
n
n
6Cn ‡ 5Cen
ˆ
‡ 5Cesn ‡ 4Csen ‡ 4Csw
ot c 47h2

n
n
‡ 5Cws
…24†
‡ 5Cwn
ÿ 34Ccn ;
n
oC
4e ÿ n
n
n
n
‡ Cen
‡ Cesn ‡ Csen ‡ Csw
ˆ 2 Cnw
‡ Cne

ot c 5h

n
n
…25†
‡ Cws
‡ Cwn
ÿ 8Ccn ;
n
oC
4e ÿ
n
n
n
‡ 6Cne
‡ 8Cen ‡ 12Csw
12Cnw
ˆ

ot c 75h2

‡ 15Csn ‡ 13Cnn ÿ 66Ccn ;
…26†
n
oC
4e ÿ n
n
4Cnw ‡ Cne
ˆ
‡ 5Cnn ‡ 3Cen ‡ 5Csn

ot c 27h2

n
…27†
‡ 4Csw
ÿ 22Ccn ;
n

oC
2e ÿ n
n
9Cn ‡ 9Cen ‡ 4Csn ‡ 3Csw
‡ 8Cwn ÿ 33Ccn ;
ˆ

2
ot c 21h
…28†
n

oC
2e ÿ n
5Cw ‡ 5Cnn ‡ 2Cen ‡ 2Csn ‡ 3Csen ÿ 17Ccn ;
ˆ

2
ot c 13h

…29†

856

A.G.L. Borthwick et al. / Advances in Water Resources 23 (2000) 849±865

Fig. 6. Cell con®gurations.

n

oC
2e ÿ n
6Cn ‡ 6Cen ‡ 3Csn ‡ Csen ‡ 6Cwn ÿ 22Ccn ;
ˆ

2
ot c 15h

…30†

and
n

oC
e ÿ
ˆ 2 6Cwn ‡ 6Cnn ‡ 6Cen ‡ 3Csn ‡ 2Csen ÿ 20Csn :

ot c 9h

…31†

On updating the concentrations, a new distribution of
masslets was calculated. For each cell, the cell-centre
concentration was assumed to be the mean value over
the cell, from which the new mass of pollutant in the cell

is computed as Mc . Hence, the number of new masslets
in the cell, Nc , is the nearest integer value of …Mc N =M†.
There is an integer round-o€ error, which a€ects mass
conservation. Here, this e€ect was counteracted by
summing the total number of new masslets created per
cell, and reassigning each masslet with a new mass
mc ˆ Mc =Nc . As in all classical explicit methods, to ensure stability of the scheme a time-step criterion must be
adhered to, and in this case is determined by the di€usion coecient and the grid spacing (rather than an
advection-based criterion). The one employed here is
given by Fletcher [10], and relates to the smallest (i.e.,
highest level) cells. For the scheme to remain stable
across the entire grid, it was necessary to ensure that

A.G.L. Borthwick et al. / Advances in Water Resources 23 (2000) 849±865

857

Fig. 6. (Continued )

eDt=h2 6 0:5. However, in order to reduce numerical
di€usion caused by reseeding particles in cells of dimension h at each time step Dt, it is required that
h2 =Dt  e. This is inconsistent with the stability requirement, and so another strategy has been used to
reduce numerical di€usion. This strategy ensures that
particles are reseeded as close as possible to their previous locations. It should be noted that random positioning is used if the new number of masslets is greater
than the old. It was found that the stability requirement
for a small time step could be relaxed somewhat from
that of an Euler integration by using the predictor±
corrector scheme. This e€ectively reduced numerical

di€usion further by allowing a larger time step to be
used.
4.3. Di€usion: di€usion-velocity method
This method is analogous to that proposed by Ogami
and Akamatsu [19] for viscous di€usion in momentum
transport. In two dimensions, the species equation,
without the source term, may be rewritten as


 
 
oC o
e oC
o
e oC
‡
Uÿ
V ÿ
C ‡
C ˆ 0:
ot ox
C ox
oy
C oy
…32†

858

A.G.L. Borthwick et al. / Advances in Water Resources 23 (2000) 849±865

This indicates that the pollutant concentration disperses
with a velocity U ÿ …e=C†…oC=ox† in the x-direction and
a velocity V ÿ …e=C†…oC=oy† in the y-direction. Since U
and V are the advection velocities, Ogami and Akamatsu therefore de®ned the di€usion velocities as
Ud ˆ ÿ

e oC
C ox

and

Vd ˆ ÿ

e oC
:
C oy

…33†

The (predictor±corrector) di€usion step for the kth
masslet is therefore

Dt ÿ n
n‡1
Udk ‡ Udk
ˆ xnk ‡
and
xn‡1
k
2
…34†

Dt ÿ n
n‡1
n‡1
n
V ‡ Vdk :
yk ˆ yk ‡
2 dk
where Dt is the time step. The di€usion velocities
are proportional to the negative of the concentration
gradient in accordance with FickÕs law of di€usion, and
inversely proportional to the concentration. In order to
evaluate the di€usion velocities, values of concentration
and concentration gradients are estimated at the masslet
positions using Shepard-type scattered data interpolation [11]. The interpolation formula is
PK
wk …x; y†fk
;
…35†
f …x; y† ˆ Pkˆ1
K
kˆ1 wk …x; y†
where f …x; y† is the interpolated function of interest,
K is the total number of nodal values of f used in the
interpolation, and w is an inverse distance weighting
function speci®ed by
h
iÿ1=2
2
2
:
…36†
wk …x; y† ˆ …x ÿ xk † ‡ …y ÿ yk †

The interpolations were implemented by ®rst estimating
values of pollutant concentration at the corners of each
grid cell using the cell-centre values. Weighting functions were applied according to the six possible vertex
topologies illustrated in Fig. 7. Concentration gradients
were then calculated along the cell edges using the interpolated corner concentrations. Concentration gradients were obtained within the cell by linear interpolation
of the cell edge gradients, and the Shepard-type scattered data interpolation used to estimate the concentrations at each masslet position. Di€usion velocities
were then calculated from (33).
4.4. Di€usion: random walks

For comparison purposes, di€usion was also simulated using a gridless random walk technique, analogous
to Brownian motion. It is assumed that the massletsÕ
displacements and velocities have the same standard
deviation as the Gaussian solution of pure di€usion. In
this case, the random walk di€usion velocities are
r
r
2e
2e
and Vd ˆ b
;
…37†
Ud ˆ b
Dt
Dt

Fig. 7. Vertex topologies.

where b is a mean zero random number with unit
standard deviation and Dt is the time step.
4.5. Initial and boundary conditions
The initial concentration pro®le is speci®ed. For example, a Gaussian distribution is applied for the still
water pure di€usion test, and for the rotating ¯ow case.
An initial regular grid of level 5 is employed to position
pseudo-masslets according to the speci®ed pro®le. The
pseudo-masslets are then used as seeding points for a
revised quadtree grid, which replaces the regular grid.
The pseudo-masslets are discarded, and a revised initial
distribution of masslets created about the quadtree grid.
In order to simulate a continuous discharge of
strength J units sÿ1 (noting that the source S ˆ J =h2 H
pollution units mÿ3 sÿ1 ), masslets are injected at a rate of
n every time step Dt. The initial mass of each masslet, mic ,
is therefore J Dt=n units. These masslets are released
uniformly within an area described by a radius ri .
At solid boundaries, masslets are re¯ected whether
advecting or subject to a di€usion velocity or random
walk. For the ®nite-di€erence di€usion step, a von
Neumann condition was applied whereby the concentration gradient normal to the boundary is set to zero.

A.G.L. Borthwick et al. / Advances in Water Resources 23 (2000) 849±865

859

Advecting masslets are directly transported across
open boundaries by the ¯ow ®eld. In the random walk
and di€usion-velocity schemes, the di€using masslets
also crossed the open boundaries by means of the walk
or di€usion-velocity component themselves (i.e., analogous to advection). Reintroduction of masslets was
undertaken at periodic open boundaries, according to
the local velocities. In the ®nite-di€erence scheme, the
boundary concentration values were determined using
linear extrapolation (with a cut-o€ value of zero concentration to prevent negative concentrations being introduced at the boundary).

5. Results
Three cases and one application are used to validate
the model and indicate its potential for simulating
water-borne pollutant transport.
5.1. Pure di€usion
An initial Gaussian pro®le is speci®ed from the analytic solution of the pure di€usion equation [7] as


M0
…x 2 ‡ y 2 †
exp ÿ
;
C…x; y; t† ˆ
4pet
4et

…38†

where M0 ˆ 4p is the initial pollutant mass at initial time
t ˆ t0 ˆ 2:5 s. The di€usion coecient was set to
e ˆ 0:001 m2 sÿ1 , corresponding to a maximum initial
concentration of 400 units mÿ2 , and the source term S
was omitted. The starting grid was of level 5 and contained 10,235 masslets (after integer rounding) distributed according to the concentration pro®le. The time
step was Dt ˆ 0:05 s. Fig. 8 shows the concentration
pro®le (depicted using MATLAB as a surface plot) and
the adapted quadtree grids (with two-dimensional
shading) at times t ˆ 2:55, 3.5 and 4.5 s, respectively, for
the ®nite-di€erence di€usion scheme. Corresponding
concentration pro®les obtained using the di€usion-velocity and random walk di€usion schemes are presented
in Figs. 9 and 10. In general, the concentration distributions are in reasonably close agreement; the ®nitedi€erence scheme gives the smoothest representation,
whereas the random walk results are much rougher as
would be expected. Figs. 11 and 12 show the concentration pro®le diagonally across the computational domain at times t ˆ 2:75 and 4.0 s. The ®nite-di€erence
scheme gives results that are almost identical to the
analytical solution. This demonstrates that the scheme
replicates the correct level of di€usion without contamination by numerical di€usion. The di€usion-velocity model is also in reasonable agreement, but the
random walk model is the least accurate. The ®nite-

Fig. 8. Pure di€usion case: ®nite-di€erence scheme: (a) concentration
pro®le and shaded quadtree grid, t ˆ 2:55 s; (b) concentration pro®le
and shaded quadtree grid, t ˆ 3:5 s; (c) concentration pro®le and
shaded quadtree grid, t ˆ 4:5 s.

di€erence scheme results are reasonably symmetric, indicating that there is little or no in¯uence from the
cartesian quadtree grid.

5.2. Advection±di€usion of rotating Gaussian
A Gaussian distribution of the pollutant (identical to
the above case) was initially located with its peak concentration at (0.7, 0.7) and then rotated anticlockwise in
an analytic ¯ow ®eld about the centre of the unit square
domain by an angular displacement of p=12 each time
step. In this case, an initial 10,000 masslets are created
about a quadtree grid of minimum level 4 and maximum
level 6, and di€usion incorporated with e ˆ 0:001 m2 sÿ1 ,
S ˆ 0, and Dt ˆ 0:025 s using the ®nite-di€erence

860

A.G.L. Borthwick et al. / Advances in Water Resources 23 (2000) 849±865

Fig. 9. Pure di€usion case: di€usion-velocity scheme: (a) concentration
pro®le, t ˆ 2:55 s; (b) concentration pro®le, t ˆ 3:5 s; (c) concentration
pro®le, t ˆ 4:5 s.

Fig. 10. Pure di€usion case: random walk scheme: (a) concentration
pro®le, t ˆ 2:55 s; (b) concentration pro®le, t ˆ 3:5 s; (c) concentration
pro®le, t ˆ 4:5 s.

A.G.L. Borthwick et al. / Advances in Water Resources 23 (2000) 849±865

861

Fig. 11. Pure di€usion concentration distributions, t ˆ 2:75 s.

Fig. 13. Advection±di€usion of a rotating Gaussian: ®nite-di€erence
scheme: (a) shaded quadtree grids at t ˆ 2:8 and 3.1 s; (b) concentration pro®les at t ˆ 2:8 and 3.1 s.

Fig. 12. Pure di€usion concentration distributions, t ˆ 4:0 s.

scheme. Fig. 13 shows concentration plots as shaded
grids and pro®les along the south-west to north-east
diagonal across the grid for the Lagrangian advection
and ®nite-di€erence di€usion scheme at times t ˆ 2:8
and 3.1 s. These times correspond to one-half and a full
revolution, respectively, of the Gaussian. Note that
t0 ˆ 2:5 s. Close agreement is achieved with the analytic
solution, also presented in Fig. 13 as concentration
pro®les. This case demonstrates that the model is capable of reproducing accurately an advection dominated

transport process while properly accounting for di€usion. In the ®nite-di€erence di€usion scheme, no negative concentrations resulted. Moreover, negligible
arti®cial di€usion was found to occur, even though the
®nite-di€erence scheme involved regridding, interpolation and asymmetric grids at each time step. There was
no perceptible radial shift in the centre of mass of the
pollutant, which con®rms that the predictor±corrector
calculations are properly tracking the advection
transport.
This case was also used to examine the trade-o€ between accuracy and computational eciency. After one
revolution, the error between the predicted and analytical solutions was computed as a normalised standard
error, whereby
q
Pn
2
1=…n…n ÿ 1†† iˆ1 …Ci ÿ C †
P
;

1=n niˆ1 Ci

862

A.G.L. Borthwick et al. / Advances in Water Resources 23 (2000) 849±865

where Ci is the ith computed concentration, C the
corresponding analytical value and n the number of
cells that lie along the pro®le. The values were found
to be E ˆ 0:066, 0.017, 0.011, and 0.008 for 1000,
10,000, 20,000 and 50,000 masslets, respectively for
p ˆ 10. Since computing time increases approximately
linearly with the number of masslets, a satisfactory
compromise between accuracy and run time should be
sought for each application. The accuracy was found
not to be very sensitive to the value of p, provided
that more than 1000 masslets were used. For low
masslet numbers, the accuracy becomes poor as may
be expected and depends in a complex way on p. It
should be noted that the quadtree gridding does lead
to signi®cant savings in storage. The grids in Fig. 13
consist of 778 and 823 panels, respectively, a uniform
grid at the ®nest resolution would comprise 4096
panels.
5.3. Advection±di€usion of Gaussian in a shear ¯ow
Fig. 14 illustrates the transport of a Gaussian pollutant spill placed in a laminar ¯ow ®eld with no-slip side
walls. The velocity pro®le is parabolic in the x-direction
with peak velocity of 3 m sÿ1 , and the ¯ow is sheared
because of the lateral boundary layers. The mean average velocity is 2 m sÿ1 . The initial Gaussian is again the
same as in the pure di€usion case, with its peak value at

Fig. 14. Advection±di€usion of a Gaussian in a shear ¯ow: ®nite-difference scheme: (a) shaded quadtree grids, t ˆ 0:45 and 1.175 s; (b)
concentration pro®les, t ˆ 0:45 and 1.175 s.

(0.25, 0.5). Shaded quadtree grids and longitudinal
concentration pro®les are presented at times t ˆ 0:45
and 1.175 s; the simulation starting at time t0 ˆ 2:5 s.
Here, e ˆ 0:001 m2 sÿ1 , S ˆ 0, and Dt ˆ 0:025 s. This
case demonstrates the modelÕs ability to simulate the
transport of a sharp front in a shear ¯ow. There is some
evidence of the build up of a tail and a slightly sharper
front, which compares favourably with similar analytical results presented by Smith [21]. Here, the mean
velocity of 2 m sÿ1 is equivalent to SmithÕs bulk velocity,
and corresponds to a Peclet number of 1000, as considered in SmithÕs Fig. 1.

6. Application
The method was applied to a tidal embayment (Sepetiba Bay, Brazil; Latitude 23°00 South, Longitude
44°00 West) which has a complex coastal topography
with several islands, see Fig. 15. The overall east to west
extent of the computational domain was 50 km and the
north±south extent was 19 km. The coastline was represented by a series of x, y data points which were used
to seed the quadtree representation of the coastal
boundaries, see Fig. 16, in which the smallest coastline
cell is at level 9 (i.e., 2ÿ9 of the maximum domain dimension which is about 100 m). These coastline seeding
points together with the e‚uent masslets are used to
generate the computational quadtree mesh. Note that all
information was scaled to the unit square and that part
of the square which lay outside of the rectangular domain shown in these ®gures was excluded from the
calculations and is not shown in the results. A linear
scaling factor r was de®ned as the ratio of the unit
square (1 m) to the longest dimension of the domain, in
this case about 50,000 m.
The tidal ¯ow ®elds were calculated on a regular
grid of cell size 250 m. An explicit ®nite-volume code
was used to solve the shallow water equations (swe)
with a QUICK scheme to treat the convective acceleration terms. A simple interpolation scheme was used
to deliver the current velocities to each masslet position
at each time in the dispersion calculation. The velocities were also scaled by the factor r; time remained
unscaled. A simulated discharge of sewage e‚uent was
created with a strength J ˆ 109 bacteria sÿ1 . Bacterial
decay was represented by a T90 ˆ 4 hr. Decay was incorporated into the model calculations by reducing the
concentrations in each cell by a factor of 10ÿDt=T90 each
time step. Isotropic turbulence was assumed and a
value of e ˆ 0:25 m2 sÿ1 was used to represent prototype conditions. This value had to be scaled by a
factor of r2 to represent conditions in the model unit
square.
The adapting quadtree meshes representing the mid®eld plume are shown in Figs. 17(a) and (b) in which

A.G.L. Borthwick et al. / Advances in Water Resources 23 (2000) 849±865

863

Fig. 15. Sepetiba Bay, Rio de Janeiro State, Brazil. The bay opens into the Atlantic Ocean at the south-west corner of the ®gure.

Fig. 16. (a) The quadtree mesh representing Sepetiba Bay generated by the coastline seeding points; (b) a detail of the quadtree mesh representing
Sepetiba Bay showing the area containing the e‚uent discharge.

the smallest cell is of level 11 which is a cell size of about
25 m.

7. Conclusions
In the present work, details have been presented of an
adaptive hierarchical grid generator, with local mesh
enrichment and coarsening controlled by the level of
pollution concentration. The quadtree stores grid infor-

mation eciently, while allowing the grid to have fractallike re®nements. In a novel approach, grid regularisation
is achieved in a single sweep starting from the ®nest cells
and moving up the quadtree. The species equation is
solved using Lagrangian particle tracking for advection,
regridding about the new masslet positions, estimation
of cell-centre concentrations and di€usion by either diffusion-velocity or ®nite-di€erence grid-based schemes.
Good agreement is obtained with analytical solutions
and numerical random walk simulations of standard

864

A.G.L. Borthwick et al. / Advances in Water Resources 23 (2000) 849±865

Fig. 17. Quadtree mesh generated by the dispersion model representing the evolving e‚uent plume.

advection±di€usion test cases, with the ®nite-di€erence
scheme giving the most accurate results. It is clear that
localised features such as sharp pollutant fronts can be
captured properly by the quadtree-based model, while
retaining computational eciency in terms of storage
and CPU time. The method has been demonstrated to be
e€ective at prototype scale and with real topography.

Acknowledgements
This work has been supported by the UK Engineering and Physical Sciences Research Council through
EPSRC Grant GR/L11861, and co-investigated by
Professor R Eatock Taylor (Oxford University) and Dr
A Folkard (Strathclyde University). The authors would
like to acknowledge Dr J J
ozsa of the Technical University of Budapest, Hungary, who substantially contributed to the concepts described herein. The
contribution of Mr. Scott Couch (Strathclyde University) is also acknowledged who developed the swe solver
used in the application to Sepetiba Bay and to Prof.
Teo®lo Monteiro (Fiocruz, Rio de Janeiro), who started
the project in this area.

References
[1] Addison PS. A method for modelling dispersion dynamics in
coastal waters using fractional Brownian motion. J Hydraulic Res
1996;34(4):549±61.
[2] Anastasiou K, Chan CT. Solution of the 2D shallow water
equations using the ®nite volume method on unstructured
triangular meshes. Int J Numer Meth Fluids 1997;24:1225±45.
[3] Borthwick AGL, Kaar ET. A non-orthogonal curvilinear systems
model of species transport in shallow ¯ow domains. Adv Water
Resour 1994;16:331±50.
[4] Bruneau CH, Fabrie P, Raseterinera P. An accurate ®nitedi€erence scheme for solving convection-dominated di€usion
equations. Int J Numer Meth Fluids 1997;24:169±83.
[5] Chorin AJ. Numerical solution of the Navier±Stokes equations.
Math Comput 1968;22:745±62.
[6] Crowley WP. Numerical advection experiments. Mon Weather
Rev 1968;96(1):1±11.
[7] Crank J. The mathematics of di€usion. 3rd ed. Oxford, UK:
Oxford University Press, 1979.
[8] Cruz S. Numerical solution of the shallow water equations on
quadtree grids. D.Phil. thesis. UK: University of Oxford, 1997.
[9] Ekebjñrg L, Justesen P. An explicit scheme for advection±
di€usion modelling in two-dimensions. Comput Meth Appl Mech
Eng 1991;88:287±97.
[10] Fletcher CAJ. Computational techniques for ¯uid mechanics. 2nd
ed. Berlin: Springer, 1991.
[11] Franke R. Scattered data interpolation: test of some methods.
Math Comput 1982;38(157):181±200.

A.G.L. Borthwick et al. / Advances in Water Resources 23 (2000) 849±865
[12] Gaspar C, J
ozsa J, Simbierowicz P. Lagrangian modelling of the
convective di€usion problem using unstructured grids and multigrid technique. In: Proceedings of the First International
Conference on Water Pollution (Modelling, Measuring and
Prediction), 3±5 September, Southampton, UK, 1991.
[13] Greaves DM, Borthwick AGL. On the use of adaptive hierarchical meshes for numerical simulation of separated ¯ows. Int J
Numer Meth Fluids 1998;26:303±22.
[14] Greaves DM, Borthwick AGL. Hierarchical tree-based ®nite
element mesh generation. Int J Numer Meth Eng 1999;45:447±71.
[15] Holly FM, Usseglio-Polatera JM. Dispersion simulation in twodimensional tidal ¯ow. J Hydraulic Eng, ASCE 1984;110(7):905±
26.
[16] J
ozsa J. 2-D particle model for predicting depth-integrated
pollutant and surface oil slick transport in rivers. In: Falconer
RA, Goodwin P, Matthew RGS, editors. Hydraulic and Environmental Modelling of Coastal, Estuarine and River Waters. UK
Gower, 1989. p. 332±40.
[17] J
ozsa J, Gaspar C. Fast, adaptive approximation of wind-induced
horizontal ¯ow patterns in shallow lakes using quadtree-based
multigrid method. In: Proceedings of the Ninth International

[18]

[19]

[20]
[21]

[22]

[23]

865

Conference on Computational Methods in Water Resources.
USA: Denver, June 1992. p.9±11.
Karpik SR, Crockett SR. Semi-Lagrangian algorithm for twodimensional advection±di€usion equation on curvilinear coordinate meshes. J Hydraulic Eng, ASCE 1997;123(5):389±401.
Ogami Y, Akamatsu T. Viscous ¯ow simulation using the discrete
vortex model ± the di€usion velocity method. Comput Fluids
1991;19:433±41.
Samet H. Neighbor ®nding techniques for images represented by
quadtrees. Comput Graphics Image Process 1982;18:37±57.
Smith R. Review of recent developments in mixing and dispersion.
In: Falconer RA, Goodwin P, Matthew RGS, editors. Hydraulic
and Environmental Modelling of Coastal, Estuarine and River
Waters. Paper 25, 1989. p. 277±90.
Van Dommelen L, Rundensteiner EA. Fast, adaptive summation
of point forces in the two-dimensional Poisson equation. J
Comput Phys 1989;83:126±47.
Yiu KFC, Greaves DM, Cruz S, Saalehi A, Borthwick AGL.
Quadtree grid generation: information handling, boundary
®tting and CFD applications. Comput Fluids 1996;25(8):
759±69.