On The Accuracy of Finite Difference Solutions For Nonlinear Water Waves
On The Accuracy of Finite Difference Solutions For Nonlinear Water Waves
water waves
Harry B. Bingham
(hbb@mek.dtu.dk)
Mechanical Engineering, Technical University of Denmark, DK-2800 Lyngby,
Denmark
Haiwen Zhang (hazh@cowi.dk)
Marine & Foundation Eng., COWI A/S, DK-2800, Lyngby, Denmark
Abstract. This paper considers the relative accuracy and eciency of low- and
high-order nite dierence discretisations of the exact potential ow problem for
nonlinear water waves. The method developed is an extension of that employed
by [1] to allow arbitrary order nite dierence schemes and a variable grid spacing.
Time-integration is performed using a fourth-order Runge-Kutta scheme. The linear
accuracy, stability and convergence properties of the method are analysed and high-
order schemes with a stretched vertical grid are found to be advantageous relative
to second-order schemes on an even grid. Comparison with highly accurate periodic
solutions shows that these conclusions carry over to nonlinear problems and that
the advantages of high-order schemes improve with both increasing nonlinearity and
increasing accuracy tolerance. The combination of non-uniform grid spacing in the
vertical and fourth-order schemes is suggested as optimal for engineering purposes.
Keywords: Nonlinear waves, nite dierence methods, convergence, accuracy, sta-
bility.
1. Introduction
Marine, coastal and ocean engineers require a means for predicting the
propagation of nonlinear water waves and their subsequent interaction
with xed or oating structures. The physics of most such problems
is well described by the incompressible Navier-Stokes equations, but
direct numerical solution of these equations is limited to very small
Reynolds number ows (Re = O(1000).) The introduction of Reynolds
averaging to obtain the Reynolds Averaged Navier Stokes Equations
(RANSE) and a turbulence closure model allows solutions to be ob-
tained at realistic Reynolds numbers. Although progress has been rapid
over the past several decades, the computational eort required by
RANSE solvers still imposes severe limitations on domain size and
resolution. The next level of approximation is to neglect viscosity and
assume an irrotational ow to obtain a potential ow problem governed
z=
t
=
+ w(1 + ) (1a)
t
= g
1
2
+
1
2
w
2
(1 + ). (1b)
Here = [/x, /y] is the horizontal gradient operator, g the grav-
itational acceleration and partial dierentiation is indicated when the
independent variables appear as subscripts. These relations can be
viewed as evolution equations for and
to be integrated forward
in time from initial conditions. The horizontal gradients appearing on
the right hand sides can be immediately computed, but obtaining the
vertical component of velocity w, requires a means of satisfying the
Laplace equation throughout the depth of the uid along with the
kinematic bottom boundary condition:
2
+
zz
= 0, h < z < (2a)
z
+h = 0, z = h. (2b)
For a direct solution of this Laplace problem, it is convenient to
make a change of variables in the vertical coordinate (the widely used
transformation) dened by
(x, z, t) =
z + h(x)
(x, t) + h(x)
=
z + h(x)
d(x, t)
, (3)
where the total thickness of the uid layer d = + h has been intro-
duced. This transformation converts the Laplace problem to
2
+
2
+ 2
+
_
+
2
z
_
+h = 0, = 0, (4b)
where the derivatives of can be expressed as
= (1 )
h
d
d
(5)
2
=
1
d
_
2
h
h h
d
_
d
_
2
d
_
(6)
1 2
d
2
h
d
(h +)
z
=
1
d
(7)
which illustrates the specic derivatives of h and required for their
evaluation. After solving (4) for the potential (x, ), the vertical com-
ponent of uid velocity on the free surface is given by
w =
1
d
|
=1
(8)
BinghamZhang.tex; 9/06/2006; 11:05; p.4
Accuracy of nite dierence wave solutions 5
which allows (1) to be stepped forward in time, closing the problem.
If the internal kinematics of the ow are desired they can also be
computed from (x, ), for example the uid velocities are given by
u(x, z) =
x
(x, z) =
x
(x, ) +
x
(x, ) (9)
v(x, z) =
y
(x, z) =
y
(x, ) +
y
(x, ), (10)
w(x, z) =
z
(x, t) =
1
d
(x, ). (11)
3. Numerical solution
For the time-integration of (1) we employ the classical explicit four-
stage, fourth-order Runge-Kutta scheme (see e.g. [19]). For the spatial
discretisation, a grid of N
x
points is dened along the x-axis at which
the time-stepping variables and
are to be evolved. Periodic or Neu-
mann (specied normal component of velocity) conditions are imposed
at the horizontal boundaries. For the solution of (4a) & (4b), N
z
points
are dened in the vertical under each horizontal grid point, arbitrarily
spaced between = 0 and = 1 (the same vertical spacing is however
chosen under each horizontal grid point.) Choosing r nearby points,
allows order (r 1) nite-dierence schemes for the rst and second
derivatives in x and to be developed in the standard way by means
of Taylor series expansion and the inversion of a small linear system at
each grid point.
3.1. Finite-difference discretisations
For the one-dimensional rst- and second-derivatives in x and , r =
+ + 1 points are used where indicates the number of points to
the right (or top) and the number of points to the left (or bottom)
of the point of interest. With periodic conditions all x-derivatives are
centrally discretised with = , while for Neumann conditions only
points within the computational domain are used leading to o-centred
schemes near the boundaries. For -derivatives o-centred schemes are
used near the bottom and free-surface. For the mixed x-derivative,
a full square stencil of r
2
-points is used and the schemes are thus
o-centred near non-periodic boundaries. In this way, all derivatives
are formally accurate to O(x
r1
) where x
t
= w (13)
BinghamZhang.tex; 9/06/2006; 11:05; p.7
8 Bingham & Zhang
t
= g (14)
2
+
zz
= 0, h < z < 0 (15)
z
= 0, z = h (16)
where for the linear problem
= (x, 0, t) and w = w(x, 0, t). This
problem has the well known travelling wave solution
=
_
H
2
e
i(kxt)
_
(17)
=
_
i g
H
2
cosh [k(z + h)]
cosh (kh)
e
i(kxt)
_
(18)
where H is the wave height, L = 2/k the wave length, T = 2/
the wave period, and and k are related by the dispersion relation
2
= gk tanh (kh).
4.1. Convergence
The essential ingredient of the discrete solution scheme is the evaluation
of w from
. To verify the convergence of the method, we compare the
computed value to the exact result w = k tanh (kh)
, for increasingly
ne discretisations. To simplify the analysis, we consider a periodic
domain in x with a uniform grid spacing x. This makes all x-grid
points equivalent and allows this part of the problem to be expressed
in closed form as a function of the x-resolution (number of grid points
per wavelength.) For example, the second-order scheme
1
x
2
(
i1
2
i
+
i+1
), where
i
= (x = ix) becomes
2
x
2
N
2
x
_
2 + 2 cos
_
2
N
x
__
(19)
where we have taken L = N
x
x so that N
x
represents the number of
grid points per wavelength. This is standard von Neumann (Fourier)
analysis (e.g. [24]). Choosing a convenient wavelength, L = 1, xes
the wavenumber and choosing a value of kh then determines the depth
h. Since the discretisation in the vertical is on a (possibly) variable
grid and non-periodic, the rest of the problem is solved numerically.
Choosing N
z
points in the vertical thus produces a reduced version of
(12) which is of rank N
z
B[] = [b]. (20)
Numbering the grid points from the bottom to the free-surface, [b]
is a vector of zeros except for the last entry which holds the known
BinghamZhang.tex; 9/06/2006; 11:05; p.8
Accuracy of nite dierence wave solutions 9
magnitude of
. B is the matrix holding the coecients for /z in the
rst row, those for
2
/z
2
for rows 2 : N
z
1 (plus the discrete version
of
2
/x
2
on the diagonal) and nally a 1.0 on the last diagonal. After
solving this system for at each vertical grid point, the vertical rst-
derivative scheme is applied to get the approximation for w which can
be compared to the exact result.
Figure 2 shows the convergence of the calculations for several choices
of discretisation scheme at a relative water depth of kh = 4. The left
column plots results for a uniform grid using second-, fourth-, and sixth-
order schemes (r = 3, 5, & 7 points respectively) while the right hand
column shows the same order schemes applied to a stretched grid which
clusters points towards the free-surface. The stretched grid used here
is dened by
j
= [sin ((j 1))] where = /[2(N
z
1)]. Each
plot shows the relative error (| w w
e
|/ w
e
) versus N
z
on a log-log scale
with w
e
the exact result. The dierent lines represent dierent values
of N
x
as shown in the legend on the rst plot. An approximate value
for the asymptotic slope of the nest x-resolution (N
x
= 1000) line
also appears on each plot, and this has been computed using a least
squares t to the last four data points on that line. Two points are
notable from these plots: First, the estimated asymptotic convergence
rate of each method is close to the expected second-, fourth-, or sixth-
order rate. Secondly, and perhaps of more practical signicance, is the
dierence in magnitude of the errors for the dierent order schemes.
Of particular interest is the resolution required by each method to
achieve a given accuracy of solution, and especially notable are the large
gains in accuracy obtained by a fourth-order scheme on a stretched grid
relative to the widely used second-order scheme on an even grid. We
will return to this point in the next section.
The general trend of the calculations is the same at other values of
kh but, as might be expected, the errors get better with smaller kh
and worse with larger kh reecting the transition from a linear to an
exponential behaviour of (z).
4.2. Stability and accuracy
Fructus et al. [10] have shown how the linear part of the time stepping
problem can be integrated exactly by means of a Fourier transform,
allowing much larger time steps to be taken for the nonlinear contribu-
tion. We have chosen not to do so here because our goal is a model which
can treat problems with an abitrary horizontal boundary and including
xed and oating bodies of complicated form within the computational
domain. In this case it is not clear how to apply the required Fourier
transform in a robust way.
BinghamZhang.tex; 9/06/2006; 11:05; p.9
10 Bingham & Zhang
The linear accuracy and stability of the method can be quantied
by considering the semi-discrete form of the time-stepping equations
(13) & (14)
t
_
_
=
_
0 J
12
g 0
_ _
_
, (21)
applied to the wave solution of (17). Here and
are the Fourier
amplitudes of and
, while the factor J
12
is the discrete approximation
for k tanh (kh) discussed in the previous section (i.e. w = J
12
). This
is a method of lines approach (see e.g. [19, 25]) and is valid as long as
the above 2 2 matrix is amenable to an eigenvalue decomposition,
in which case stability is governed by the largest of these and the
stability region of a particular time-stepping scheme. For the discreti-
sations discussed here, the eigenvalues are purely imaginary, with the
largest occurring at the Nyquist mode. Figure 3 plots the magnitude
of the maximum eigenvalue (normalised by the Nyquist frequency) as
a function of relative depth for the Nyquist wave. These curves are for
second-order discretisations (r = 3), showing the eect of increasing
vertical resolution. A uniform vertical spacing is shown to the left and
a stretched grid to the right. Figure 4 plots the same quantities but
with a xed vertical resolution of N
z
= N
x
and using second-, fourth-,
and sixth-order discretisations. These plots can be used to nd the
stability limit for any desired time-stepping scheme. For a given dis-
cretisation, stability is insured by keeping the quantity
max
t within
the stability region of the time-stepping scheme of interest (e.g. for
fourth-order Runge-Kutta, |
max
| t 2
2
5
e
2
,
2
two norm, (25)
where
5
is the computed surface elevation after exactly ve wave
periods and
e
is the target result from stream function theory. A
Courant number of C
r
= 1 was used for all cases. The results are
collected in Figure 9 with the mildly nonlinear case to the left and
the strongly nonlinear case to the right, kh values increase from top to
BinghamZhang.tex; 9/06/2006; 11:05; p.12
Accuracy of nite dierence wave solutions 13
Table III. The four models tested.
r Order of accuracy Vertical grid
3 2
nd
even
3 2
nd
cosine
5 4
th
cosine
7 6
th
cosine
bottom. The point values correspond to the grid resolutions: (N
x
, N
z
) =
[(16, 9), (32, 9), (64, 12), (128, 24)].
The behaviour of the errors for the 10% case are consistent with
the predictions made in 4. A relative residual tolerance of 10
7
was
used in the iterative scheme for these calculations, so relative errors of
less than 10
5
to 10
6
can not be expected. For the highly-nonlinear
cases the errors are typically larger, but follow a similar trend. The
case at kh = 0.5 resembles a very high solitary wave (very sharp and
narrow peak) and required the application of a lter to obtain stable
results. The lter used was a simple truncation of the Fourier space at
a cut-o frequency of half the Nyquist frequency (i.e. FFT, truncate,
FFT back). Apart from this case, no smoothing or ltering was used
in these calculations.
Figure 10 plots the iterations required by each model vs. N for the
90% steepness case in deep and shallow water. The 10% case required
approximately half as many iterations.
These results are consistent with the linear analysis and demonstrate
that if results at a given accuracy are desired, a signicant improvement
in eciency can be obtained by moving from second-order to fourth-
order in the spatial dierencing scheme and stretching the vertical
grid. It is also clear that decreasing accuracy tolerance and increasing
nonlinearity favour higher-order methods.
6. Sample applications to shoaling wave problems
The analysis described above suggests that a fourth-order model with a
stretched vertical grid of around ten points and a horizontal resolution
of fteen to twenty points per wavelength will be suitable for general
applications of the method. We include here calculations using such a
model for two wave-bottom interaction test cases: Linear shoaling up
a beach; and nonlinear harmonic generation over a submerged bar.
BinghamZhang.tex; 9/06/2006; 11:05; p.13
14 Bingham & Zhang
6.1. Linear shoaling
The derivatives of appearing in the sigma-transformed Laplace prob-
lem where validated by the nonlinear periodic test cases described
above, but the terms involving derivatives of h were not. To validate
these terms, and to test the variable horizontal grid spacing features of
the code we consider the problem of a linear wave shoaling up a beach.
We use a bathymetry dened by
h(x) = h
0
h
0
h
1
2
_
1 + tanh
_
sin (
x
l
)
1 (
2x
l
)
2
__
,
l
2
x
l
2
(26)
with h
0
= 0.5, h
1
= .025, and l = 12 (see Figure 11). This gives a mean
slope of h
x
0.05. A linear wave of period T = .8014s and deep water
length L
0
= 1m is generated at the left end of the domain and allowed
to propagate until a steady state has been reached everywhere. This
produces relative conditions from deep to shallow water, corresponding
to 0.4 kh .
Wave generation and absorption is achieved by relaxing the numer-
ical solution towards a specied analytic solution over regions near the
boundaries of the domain. This is an idea which is often applied in ocean
circulation modelling (see e.g. [28] who modied the idea proposed by
[29]). Relaxation zones for simultaneous generation and absorption of
waves are created by dening a relaxation coecient 0 c
r
(x) 1,
and an exact desired solution (
e
,
e
). After each stage of the time
integration the solution within a relaxation zone is then redened to
be
(x, t) = [1 c
r
(x)] (x, t) + c
r
(x)
e
(x, t)
(x, t) = [1 c
r
(x)]
(x, t) + c
r
(x)
e
(x, t). (27)
To avoid reections, c
r
should be smooth near the junction between
the relaxation zone and the rest of the computational domain. For
pure absorption, the exact solution is simply taken to be zero. Zones of
two wave lengths near both ends have been used here which generally
results in overall reected wave heights of less than 0.1%.
Figure 11 plots the amplitude envelope of the converged steady state
time signals for several choices of horizontal discretisation, along with
the exact result predicted by energy conservation:
a(x)
a
0
=
_
_
k(x)
_
1 +
2k
0
h
0
sinh (2k
0
h
0
)
_
k
0
_
1 +
2k(x)h(x)
sinh (2k(x)h(x))
_
_
_
1
2
. (28)
BinghamZhang.tex; 9/06/2006; 11:05; p.14
Accuracy of nite dierence wave solutions 15
For all four discretisations, N
z
= 9 points in the vertical have been
used and the time step is chosen to give a deep water C
r
= 1. Results
are shown using a coarse and a ne grid (N
x
= 257 & 513 points)
and with both a uniform and a stretched horizontal grid spacing. The
uniform grids provide resolutions of 16 and 32 points per wavelength
respectively at the deep end of the domain but at the shallow end, where
the wavelength has been reduced to 0.4m, the resolution is much
coarser. The stretched grids keep the resolution approximately constant
along the length of the domain by dening x
i
= l tanh (C s
i
)/ tanh (C),
s
i
= (i 1)ds, ds = 1/(N
x
1), with l the length of the domain and
C a constant which controls the stretching. For this case, l = 16 and
C = 1.5 were chosen. While the three other results can be seen to
have converged to the exact solution, the uniformly spaced coarse grid
results show signicant errors due to the under-resolution towards the
shallow end of the domain.
6.2. Harmonic generation over a submerged bar
As a nal example testing all the features of the model, we consider the
transformation of a mildly-nonlinear, monochromatic wave as it travels
up and over a submerged bar. As the wave shoals up the front face of
the bar it steepens dramatically, accumulating higher harmonics which
are released on the down slope producing an irregular pattern behind
the bar. This phenomenon is widely used as a strenuous test case for
nonlinear models of surface wave propagation on a variable bottom.
Details of the experiment can be found in [30], which is usually scaled
by a factor of two, to make it equivalent to [31].
The top plot in Figure 12 shows the bathymetry of the experiment
and a snapshot of the steady-state surface elevation scaled by a factor
of three to make it more visible. The lower plot in this gure shows
a harmonic analysis of the time series after a steady-state has been
reached over the entire domain for the long-wave case (T = 2.01s).
The calculations were made using N
x
= 513, N
z
= 9 and t = .025s
(deep water C
r
0.75.) Relaxation zones of length 2L at both ends
of the domain were used to generate and absorb the waves. Stream
function theory was used for the incident wave. The harmonic analysis
was performed by making a least-squares t of a sum of nine harmonics
to the time series (measured or computed) at a number of points along
the tank length. This gave a residual of at least four orders of magnitude
smaller than the rst harmonic, indicating that level of accuracy. Time
series of the elevations at the points indicated in Figure 12 are shown
in Figure 13. The comparison with the measured results is quite good.
BinghamZhang.tex; 9/06/2006; 11:05; p.15
16 Bingham & Zhang
7. Conclusions
The accuracy and eciency of a nite dierence based solution to the
exact potential ow problem for nonlinear waves has been established
in 2D. The model is exible in terms of the order of the numerical
schemes and the grid spacing; with a computational eort which scales
with N the total number of grid points used. A fourth-order accurate
model with a stretched vertical grid of approximately ten points, a
resolution of 15-20 points per wavelength and a Courant number of
one has been shown to be adequate for general purpose applications.
This model is readily extended to 3D and the inclusion of xed and
oating bodies is conceptually straightforward, which are the topics of
ongoing development.
References
1. B. Li and C.A. Fleming. A three-dimensional multigrid model for fully
nonlinear water waves. Coastal Engineering, 30:235258, 1997.
2. J. N. Newman. Marine Hydrodynamics. The MIT Press, Cambridge,
Massachusetts, 1977.
3. J. N. Newman. Ecient hydrodynamic analysis of very large oating
structures. Marine Structures, 18:169180, 2005.
4. J. N. Newman and C.-H. Lee. Boundary-element methods in oshore structure
analysis. Journal of Oshore Mechanics & Arctic Engineering, 124:8189, 2002.
5. P. D. Sclavounos and H. Borgen. Seakeeping analysis of a high-speed monohull
with a motion-control bow hydrofoil. J. Ship Res., 48:77117, 2004.
6. V. Bertram, H. Yasukawa, and G. Thiart. Evaluation of local pressures in
ships using potential ow models. In Oceans 2005 - Europe (IEEE Cat. No.
05EX1042), pages 11317 Vol.1. IEEE, 2005.
7. B. B uchmann, P. Ferrant, and J. Skourup. Run-up on a body in waves and
current. fully nonlinear and nite-order calculations. Applied Ocean Res.,
22:349360, 2000.
8. S.T. Grilli, P. Guyenne, and F. Dias. A fully non-linear model for three-
dimensional overturning waves over an arbitrary bottom. Int. J. Num. Methods
in Fluids, 35:829867, 2001.
9. D. G. Dommermuth and D. K. P. Yue. A high-order spectral method for the
study of nonlinear gravity waves. J. Fluid Mech., 184:267288, 1987.
10. D. Fructus, D. Clamond, J. Grue, and . Kristiansen. An ecient model for
three-dimensional surface wave simulations. part i: Free space problems. J.
Comput. Phys., 205:665685, 2005.
11. D.R. Fuhrman, H.B. Bingham, and P.A. Madsen. Nonlinear wave-structure
interaction with a high-order Boussinesq model. Coastal Engineering, 52:655
672, 2005.
12. F. Shi, J.T. Kirby, R.A. Dalrymple, and Q Chen. Wave simulations in ponce
de leon inlet using Boussinesq model. J. of Waterway Port Coastal and Ocean
Eng., 129:124135, 2003.
BinghamZhang.tex; 9/06/2006; 11:05; p.16
Accuracy of nite dierence wave solutions 17
13. H.-C. Chen and S.-K. Lee. Rans/laplace calculations of nolinear waves induced
by surface-piercing bodies. J. Engineering Mech., 125(11):12311242, 1999.
14. G.X. Wu, Q.W. Ma, and R. Eatock-Taylor. Numerical simulation of sloshing
waves in a 3d tank based on a nite element method. Applied Ocean Res.,
20:337355, 1998.
15. H. O. Kreiss and J. Oliger. Comparison of accurate methods for the integration
of hyperboloic equations. Tellus Series A, 24(3):199215, 1972.
16. D.R. Fuhrman and H.B. Bingham. Numerical solutions of fully nonlinear
and highly dispersive Boussinesq equations. Int. J. Num. Methods in Fluids,
44(3):231255, 2004.
17. J.D. Fenton. The numerical solution of steady water wave problems. Comput.
Geosci., 14(3):35768, 1988.
18. V. E. Zakharov. Stability of periodic waves of nite amplitude on the surface
of a deep uid. J. Appl. Mech. Tech. Phys., 9:190194, 1968.
19. A. Iserles. A rst course in the numerical analysis of dierential equations.
Cambridge University Press, 1996.
20. Y. Saad and M. H. Schultz. GMRES: a generalized minimal residual algorithm
for solving nonsymmetric linear systems. SIAM J. Sci. Stat. Comput., 7:856
869, 1986.
21. P.R. Amestoy, T.A. Davis, and I.S. Du. An approximate minimum degree
ordering algorithm. SIAM J. on Mat. Anal. Appl., 17:886905, 1996.
22. R.C. Whaley, A. Petitet, and J.J. Dongarra. Automated empirical opti-
mization of software and the atlas project, 2000. Available: http://math-
atlas.sourceforge.net/, 2000.
23. I.S. Du. Multiprocessing a sparse matrix code on the alliant fx/8. J. Comput.
Appl. Math., 27:229239, 1989.
24. Hirsch. Numerical computation of internal and external ows. Volume 1:
Fundamentals of numerical discretizaton. John Wiley & Sons, New York, 1988.
25. L.N. Trefethen. Finite Dierence and Spectral Methods
for Ordinary and Partial Dierential Equations. Available:
http://web.comlab.ox.ac.uk/oucl/work/nick.trefethen/pdetext.html,
Unpublished text, 1996.
26. J. M. Williams. Limiting gravity waves in water of nite depth. Phil. Trans.
Roy. Soy. Lond. A, 302:139188, 1981.
27. J.D. Fenton. Nonlinear wave theories. In B. Le Mehaute and D.M. Hanes,
editors, The Sea, pages 325. John Wiley & Sons., 1990.
28. T.G. Jensen. Open boundary conditions in stratied ocean models. J. Marine
Systems, 16:297322, 1998.
29. J. Larsen and H. Dancy. Open boundaries in short wave simulations - a new
approach. Coastal Engineering, 7:285297, 1983.
30. H.R. Luth, B. Klopman, and N. Kitou. Projects 13g: Kinematics of waves
breaking partially on an oshore bar; ldv measurements for waves with and
without a net onshore current. Technical Report H1573, Delft Hydraulics,
Delft, The Netherlands, 1994.
31. S. Beji and J.A. Battjes. Experimental investigation of wave propagation over
a bar. Coastal Engineering, 19:151162, 1993.
BinghamZhang.tex; 9/06/2006; 11:05; p.17
18 Bingham & Zhang
Even grid Cosine grid
10
0
10
1
10
2
10
4
10
3
10
2
10
1
N
z
E
r
r
o
r
r=3
slope=1.9812
N
x
=7
N
x
=10
N
x
=15
N
x
=20
N
x
=50
N
x
=100
N
x
=300
N
x
=1000
10
1
10
2
10
5
10
4
10
3
10
2
10
1
N
z
E
r
r
o
r
slope=2.0421
r=3
10
1
10
2
10
6
10
4
10
2
N
z
E
r
r
o
r
r=5
slope=3.9202
10
1
10
2
10
8
10
6
10
4
10
2
N
z
E
r
r
o
r
slope=4.0132
r=5
10
1
10
2
10
8
10
6
10
4
10
2
N
z
E
r
r
o
r
r=7
slope=5.878
10
1
10
2
10
10
10
8
10
6
10
4
10
2
N
z
E
r
r
o
r
slope=6.4604
r=7
Figure 2. Convergence of the linear w calculated from
at kh = 4. The slope
is the asymptotic slope of the line for Nx = 1000. Nz point values are at
[9,12,16,24,32,48,100].
BinghamZhang.tex; 9/06/2006; 11:05; p.18
Accuracy of nite dierence wave solutions 19
10
0
10
5
0
0.5
1
1.5
k
N
h
m
a
x
/
(
g
k
N
)
1
/
2
Even grid
N
z
=N
x
/ 2
N
z
=N
x
N
z
=2 N
x
10
0
10
5
0
0.5
1
1.5
k
N
h
m
a
x
/
(
g
k
N
)
1
/
2
Cosine grid
N
z
=N
x
/ 2
N
z
=N
x
N
z
=2 N
x
Figure 3. Maximum eigenvalues (r = 3) vs. relative Nyquist depth. Variation with
vertical grid renement shown by the dierent lines.
10
0
10
5
0
0.5
1
1.5
k
N
h
m
a
x
/
(
g
k
N
)
1
/
2
Even grid
r=3
r=5
r=7
10
0
10
5
0
0.5
1
1.5
k
N
h
m
a
x
/
(
g
k
N
)
1
/
2
Cosine grid
r=3
r=5
r=7
Figure 4. Maximum eigenvalues using Nz = Nx grid points in the vertical vs. relative
Nyquist depth. Variation with increasing order shown by the dierent lines.
BinghamZhang.tex; 9/06/2006; 11:05; p.19
20 Bingham & Zhang
0 10 20 30 40
10
8
10
6
10
4
10
2
10
0
N
x
/L
1
A
Cr=0.5
Cr=1
0 10 20 30 40
10
8
10
6
10
4
10
2
10
0
N
x
/L
1
A
Cr=0.5
Cr=1
0 10 20 30 40
10
2
10
1
10
0
10
1
N
x
/L
|
1
Q
|
Cr=0.5
Cr=1
0 10 20 30 40
10
4
10
3
10
2
10
1
10
0
10
1
N
x
/L
|
1
Q
|
Cr=0.5
Cr=1
Figure 5. Relative amplitude and phase errors over one period as a function of
resolution for two Courant numbers. 2nd-order model (r = 3) with Nz = 15 at
kh = 4.
BinghamZhang.tex; 9/06/2006; 11:05; p.20
Accuracy of nite dierence wave solutions 21
0 10 20 30 40
10
8
10
6
10
4
10
2
10
0
N
x
/L
1
A
r=3
r=5
r=7
0 10 20 30 40
10
8
10
6
10
4
10
2
10
0
N
x
/L
1
A
r=3
r=5
r=7
0 10 20 30 40
10
4
10
3
10
2
10
1
10
0
N
x
/L
|
1
Q
|
r=3
r=5
r=7
0 10 20 30 40
10
5
10
4
10
3
10
2
10
1
10
0
N
x
/L
|
1
Q
|
r=3
r=5
r=7
Figure 6. Relative amplitude and phase errors over one period as a function of
horizontal resolution with Nz = 10 using 2nd- through 6th-order discretisations.
For Cr = 0.5, Nz = 10, and kh = 4.
BinghamZhang.tex; 9/06/2006; 11:05; p.21
22 Bingham & Zhang
0 10 20 30 40
10
5
10
4
10
3
10
2
10
1
10
0
N
x
/L
|
1
Q
|
r=3
r=5
r=7
0 10 20 30 40
10
6
10
4
10
2
10
0
N
x
/L
|
1
Q
|
r=3
r=5
r=7
0 10 20 30 40
10
6
10
4
10
2
10
0
N
x
/L
|
1
Q
|
r=3
r=5
r=7
0 10 20 30 40
10
8
10
6
10
4
10
2
10
0
N
x
/L
|
1
Q
|
r=3
r=5
r=7
Figure 7. Relative phase errors over one period as a function of horizontal resolution
with Nz = 15 & 20 using 2nd- through 6th-order discretisations. For Cr = 0.5,
Nz = 10, and kh = 4.
BinghamZhang.tex; 9/06/2006; 11:05; p.22
Accuracy of nite dierence wave solutions 23
Even grid Cosine grid
10
0
10
1
10
2
10
4
10
3
10
2
10
1
|
1
Q
|
N
z
r=3
N
x
=7
N
x
=10
N
x
=15
N
x
=20
N
x
=50
N
x
=100
N
x
=300
N
x
=1000
10
1
10
2
10
5
10
4
10
3
10
2
10
1
N
z
|
1
Q
|
r=3
10
1
10
2
10
6
10
4
10
2
|
1
Q
|
N
z
r=5
10
1
10
2
10
8
10
6
10
4
10
2
N
z
|
1
Q
|
r=5
10
1
10
2
10
10
10
8
10
6
10
4
10
2
|
1
Q
|
N
z
r=7
10
1
10
2
10
10
10
8
10
6
10
4
10
2
N
z
|
1
Q
|
r=7
Figure 8. Linear dispersion errors for 2nd-, 4th- & 6th-order discretisations as a
function of resolution. The Courant number Cr = 1, and kh = 4.
BinghamZhang.tex; 9/06/2006; 11:05; p.23
24 Bingham & Zhang
10% Max. H/L 90% Max. H/L
10
2
10
3
10
4
10
5
10
0
N
R
e
l
a
t
i
v
e
e
r
r
o
r
p
e
r
w
a
v
e
p
e
r
i
o
d
kh=0.5
r=3, Even
r=3, Cos
r=5, Cos
r=7, Cos
10
2
10
3
10
4
10
3
10
2
10
1
10
0
kh=0.5
N
R
e
l
a
t
i
v
e
e
r
r
o
r
p
e
r
w
a
v
e
p
e
r
i
o
d
10
2
10
3
10
4
10
5
10
0
kh=2
N
R
e
l
a
t
i
v
e
e
r
r
o
r
p
e
r
w
a
v
e
p
e
r
i
o
d
10
2
10
3
10
4
10
6
10
4
10
2
10
0
kh=2
N
R
e
l
a
t
i
v
e
e
r
r
o
r
p
e
r
w
a
v
e
p
e
r
i
o
d
10
2
10
3
10
4
10
6
10
4
10
2
10
0
kh=6.2832
N
R
e
l
a
t
i
v
e
e
r
r
o
r
p
e
r
w
a
v
e
p
e
r
i
o
d
10
2
10
3
10
4
10
6
10
4
10
2
10
0
kh=6.2832
N
R
e
l
a
t
i
v
e
e
r
r
o
r
p
e
r
w
a
v
e
p
e
r
i
o
d
Figure 9. Nonlinear errors (25) for the four versions of the model listed in Table III.
All plots follow the legend shown.
BinghamZhang.tex; 9/06/2006; 11:05; p.24
Accuracy of nite dierence wave solutions 25
kh = 0.5 kh = 2
0 1000 2000 3000
0
5
10
15
20
N
A
v
e
.
i
t
e
r
a
t
i
o
n
s
r=3, even
r=3, cos
r=5, cos
r=7, cos
0 1000 2000 3000
0
5
10
15
20
N
A
v
e
.
i
t
e
r
a
t
i
o
n
s
Figure 10. Average iteration counts for the 90% steepness case.
0.7
0.8
0.9
1
1.1
1.2
1.3
2 4 6 8 10 12 14
-0.5
-0.25
0
a
(
x
)
/
a
0
-
h
(
x
)
/
L
x/L
Linear theory
Nx=513, uniform
Nx=513, stretched
Nx=257, uniform
Nx=257, stretched
-h(x)
Figure 11. Harmonic analysis of a linear wave shoaling up a beach.
BinghamZhang.tex; 9/06/2006; 11:05; p.25
26 Bingham & Zhang
-0.5
-0.4
-0.3
-0.2
-0.1
0
0.1
0.2
0.3
0.4
0 5 10 15 20 25
z
x
12.5 14.5 17.3 21
0
0.2
0.4
0.6
0.8
1
1.2
1.4
0 5 10 15 20 25 30 35 40
a
(
x
)
/
a
1
(
0
)
x
1st harmonic
Exp
2nd harmonic
Exp
3rd harmonic
Exp
4th harmonic
Exp
5th harmonic
Exp
Figure 12. Top: Bar test geometry with a snapshot of the surface elevation (scaled
by a factor 3) along with the measurement locations. Bottom: Harmonic analysis of
the time series at steady-state.
BinghamZhang.tex; 9/06/2006; 11:05; p.26
Accuracy of nite dierence wave solutions 27
-0.02
-0.01
0
0.01
0.02
0.03
25 26 27 28 29 30
t
x=12.5m
-0.02
-0.01
0
0.01
0.02
0.03
25 26 27 28 29 30
t
x=14.5m
-0.02
-0.01
0
0.01
0.02
0.03
30 31 32 33 34 35
t
x=17.3m
-0.02
-0.01
0
0.01
0.02
0.03
35 36 37 38 39 40
t
x=21m
Figure 13. Time series of wave elevations over the bar. Solid line - Calculations;
dots - Measurements.
BinghamZhang.tex; 9/06/2006; 11:05; p.27
BinghamZhang.tex; 9/06/2006; 11:05; p.28