waqua/triwaq - two- and three-dimensional shallow water...

233
WAQUA/TRIWAQ - two- and three-dimensional shallow water flow model. Technical documentation SIMONA report number 99-01

Upload: others

Post on 24-Feb-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

WAQUA/TRIWAQ -two- and three-dimensionalshallow water flow model.Technical documentationSIMONA report number 99-01

Page 2: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

2

Page 3: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

WAQUA/TRIWAQ -two- and three-dimensionalshallow water flow model.Technical documentationIn this manual background information is given on thecomputational methods in WAQUA/TRIWAQ.

Version number : Version 3.17, November 2016Maintenance : see www.helpdeskwater.nl/waquaCopyright : Rijkswaterstaat

Page 4: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

Log-sheet

4

Page 5: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Version Author Date Description

1.1 M. Zijlema May 1998 first version of report

2.0 VORtech Oct 2000 parallelization of TRIWAQ

3.0 VORtech 28-11-2006 c66923: conversion of report to LATEX

3.1 E. Vollebregt 07-12-2006 c65666: extension to non-hydrostatic flows

3.2 E. Vollebregt 27-12-2006 c65667: horizontal k-epsilon turbulence model

3.2.1 E. Vollebregt 11-01-2007 c65666: extension to non-hydrostatic flows

3.3 VORtech 13-03-2008 c80842: included tech.documentation of WAQUA

3.4 A. Verhoeven 22-05-2008 c81402: added tidal forces

3.5 L.A. Ros 18-11-2008 c85419: introduced space varying viscosity

3.6 J. Gerrits 03-02-2009 c84230: added coupling to wave model

3.7 B. van ’t Hof 10-04-2009 c88684: improved explanation solution method fordispersion equation

3.8 B. van ’t Hof 14-08-2009 c91583: barrier regime with only 4 regimes;introduction of barrier-barrier structures

3.9 B. van ’t Hof 27-08-2009 c88719: Horizontal large eddy simulation

3.10 B. van ’t Hof 02-09-2009 c81107: Villemonte model for weirs, vegetation onweirs

3.11 B. van ’t Hof 01-10-2009 c81107: corrections after review by Jan van Kester

3.12 J. Gerrits 21-01-2010 c1738: added remark on limitation of eddy viscosityand diffusivity in HLES model

3.13 E.J. Spee 22-03-2010 c3194: Chezy_3D based on velocities

3.14 E. Vollebregtand L. Ros

30-03-2010 c3228: Improved weakly reflecting boudaries

3.15 E.J. Spee 30-03-2010 c3194: corrections in Table 3.3

3.16 E. de Goedeand J. Gerrits

28-03-2012 c3692: improved anti-creep implementation

3.17 E. de Goede 03-11-2016 c4442: new Villemonte formula

3.18 E. de Goede 24-08-2017 c4524: Description of CDCON removed

File location: $SIMONADIR/src/waqua/waquapublic/doc/techdoc

Version 3.17, November 2016 5

Page 6: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

Contents

Log-sheet 4

1 Introduction 12

1.1 Historical background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

1.2 Purpose and motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

1.3 Readership . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

1.4 Scope of this document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

1.5 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

2 Shallow water flow model 18

2.1 The prescription of layer interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . 18

2.2 The shallow water equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

2.2.1 The incompressible Reynolds-averaged Navier-Stokes equations . . . . . . 22

2.2.2 The assumption of shallowness . . . . . . . . . . . . . . . . . . . . . . . 23

2.2.3 The layer-averaged continuity and horizontal momentum equations . . . . 24

2.2.4 Pressure gradient formulation with non-uniform density . . . . . . . . . . 28

2.3 The transport equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

2.4 Turbulence models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

2.4.1 Models for vertical turbulence . . . . . . . . . . . . . . . . . . . . . . . . 36

2.4.1.1 An algebraic turbulence model . . . . . . . . . . . . . . . . . . 36

2.4.1.2 The k-ε model and its variants . . . . . . . . . . . . . . . . . . 37

2.4.1.3 The adapted formulation of the k-ε model used in TRIWAQ . . . 40

2.4.2 Models for horizontal turbulence . . . . . . . . . . . . . . . . . . . . . . . 40

2.4.2.1 An algebraic turbulence model for breaking waves . . . . . . . . 40

2.4.2.2 Horizontal large eddy simulation (HLES) . . . . . . . . . . . . . 41

2.4.2.3 A depth-averaged k-ε model . . . . . . . . . . . . . . . . . . . . 43

6

Page 7: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

CONTENTS

2.4.2.4 Large Eddy Simulation . . . . . . . . . . . . . . . . . . . . . . 45

2.5 Simulation of non-hydrostatic flows . . . . . . . . . . . . . . . . . . . . . . . . . 45

2.6 Equations governing shallow water flow in curvilinear coordinates . . . . . . . . . 46

2.7 Model equations in spherical coordinates . . . . . . . . . . . . . . . . . . . . . . . 49

2.8 Barriers and sluices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

2.8.1 Barrier-Barrier Structures . . . . . . . . . . . . . . . . . . . . . . . . . . 57

2.9 Weirs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58

2.9.1 Villemonte model for weirs . . . . . . . . . . . . . . . . . . . . . . . . . 60

2.9.1.1 Empirical formula for discharge across weir . . . . . . . . . . . 60

2.9.1.2 Criterion for perfect discharge . . . . . . . . . . . . . . . . . . . 62

2.9.1.3 Processing the empirical discharge in subcritical flow . . . . . . 62

2.9.1.4 Processing the empirical discharge in critical flow . . . . . . . . 62

2.9.2 Tabellenboek model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63

2.9.2.1 Subcritical flow . . . . . . . . . . . . . . . . . . . . . . . . . . 63

2.9.2.2 Vegetation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

2.9.2.3 Supercritical flow . . . . . . . . . . . . . . . . . . . . . . . . . 67

2.9.2.4 Criterion for perfect discharge . . . . . . . . . . . . . . . . . . . 67

2.9.2.5 Determination of the velocity on the weir . . . . . . . . . . . . . 68

2.10 Waves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69

2.10.1 Bottom boundary stress . . . . . . . . . . . . . . . . . . . . . . . . . . . 70

2.10.2 Stokes drift . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71

2.10.3 Wave numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72

3 Considerations on numerical techniques used in TRIWAQ 75

3.1 Computational grid and associated geometrical properties . . . . . . . . . . . . . . 76

3.2 Analysis of inaccuracy due to averaging and orthogonality deviation . . . . . . . . 77

3.3 The representation of the continuous data into discrete data . . . . . . . . . . . . . 78

3.4 The finite difference approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81

3.5 Introduction to the ADI method . . . . . . . . . . . . . . . . . . . . . . . . . . . 82

4 Space discretization of the differential equations 85

4.1 Discretization of the depth-averaged continuity equation . . . . . . . . . . . . . . 85

4.2 Upwind computation of water depth . . . . . . . . . . . . . . . . . . . . . . . . . 86

4.3 Discretization of the layer-averaged continuity equation . . . . . . . . . . . . . . . 87

Version 3.17, November 2016 7

Page 8: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

4.4 Discretization of the u-momentum equation . . . . . . . . . . . . . . . . . . . . . 88

4.4.1 Time derivative . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88

4.4.2 Horizontal advective terms including curvature: WAQUA-scheme . . . . . 88

4.4.3 Horizontal advective terms including curvature: TRIWAQ-scheme . . . . . 90

4.4.4 A conservative discretization for the horizontal advective terms . . . . . . 91

4.4.5 Vertical advective term . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92

4.4.6 Water level gradient ∼ barotropic pressure gradient . . . . . . . . . . . . . 92

4.4.7 Baroclinic pressure gradient due to density gradients . . . . . . . . . . . . 93

4.4.8 Energyloss due to weirs . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

4.4.9 Horizontal viscous terms including curvature . . . . . . . . . . . . . . . . 93

4.4.10 Discretization of the full Reynolds stress tensor . . . . . . . . . . . . . . . 94

4.4.11 Vertical viscous term . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95

4.4.12 Coriolis force term . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95

4.4.13 Bottom friction term . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95

4.5 Discretization of the v-momentum equation . . . . . . . . . . . . . . . . . . . . . 96

4.6 Space discretization figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96

4.7 Discretization of the transport equation . . . . . . . . . . . . . . . . . . . . . . . . 99

4.7.1 Finite volume strategy . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99

4.7.2 Horizontal advective fluxes: WAQUA-scheme . . . . . . . . . . . . . . . . 100

4.7.3 Horizontal advective fluxes: TRIWAQ-scheme . . . . . . . . . . . . . . . 101

4.7.4 Vertical advective term . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102

4.7.5 Horizontal diffusive fluxes . . . . . . . . . . . . . . . . . . . . . . . . . . 102

4.7.6 Vertical diffusive term . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102

4.7.7 Anti-creepage terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103

4.8 Discretization of the vertical k-ε model . . . . . . . . . . . . . . . . . . . . . . . 104

4.8.1 Time derivative . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104

4.8.2 Horizontal and vertical advective terms . . . . . . . . . . . . . . . . . . . 104

4.8.3 Vertical diffusive term . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105

4.8.4 Production term . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106

4.8.5 Buoyancy term . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106

4.9 Discretization of the depth-averaged k-ε model . . . . . . . . . . . . . . . . . . . 107

4.9.1 Discretization of the Reynolds stresses in momentum equations . . . . . . 107

4.9.2 Time derivative . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108

8

Page 9: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

CONTENTS

4.9.3 Horizontal advective terms . . . . . . . . . . . . . . . . . . . . . . . . . . 108

4.9.4 Horizontal diffusive terms . . . . . . . . . . . . . . . . . . . . . . . . . . 108

4.9.5 Production term . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109

4.10 Discretization of the physical vertical velocity . . . . . . . . . . . . . . . . . . . . 109

4.11 Discretization of the w-momentum equation . . . . . . . . . . . . . . . . . . . . . 110

5 Time discretization with an alternating direction implicit technique 112

5.1 Time integration of the continuity and momentum equations . . . . . . . . . . . . 114

5.2 Time integration of the transport equation . . . . . . . . . . . . . . . . . . . . . . 116

5.3 Time integration of the vertical k-ε model . . . . . . . . . . . . . . . . . . . . . . 118

5.4 Time integration of the depth-averaged k − ε model . . . . . . . . . . . . . . . . . 120

5.5 Time integration of the Reynolds stresses due to 2D turbulence . . . . . . . . . . . 121

5.6 Time integration aspects of the non-hydrostatic pressure . . . . . . . . . . . . . . . 121

6 Sequence of the computation 123

7 Implementation of the boundary conditions 128

7.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128

7.2 Adaptation of the discretizations near the boundary . . . . . . . . . . . . . . . . . 130

7.3 Types of boundary conditions and their implementation . . . . . . . . . . . . . . . 132

7.3.1 Boundary conditions for the momentum equations at free surface . . . . . 133

7.3.2 Boundary conditions for the momentum equations at bottom . . . . . . . . 135

7.3.2.1 User-options for C2D . . . . . . . . . . . . . . . . . . . . . . . 137

7.3.2.2 Determination of C3D . . . . . . . . . . . . . . . . . . . . . . . 138

7.3.3 Boundary conditions for the transport equation at bottom and free surface . 141

7.3.4 Boundary conditions for the vertical k-ε model at bottom and free surface . 141

7.3.5 Boundary conditions for the continuity and momentum equations at closedboundary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142

7.3.6 Boundary conditions for the transport equation at closed boundary . . . . . 143

7.3.7 Boundary conditions for the vertical k-ε model at closed boundary . . . . . 143

7.3.8 Boundary conditions for the horizontal k-ε model at closed boundary . . . 143

7.3.9 Boundary conditions for the continuity and momentum equations at openboundary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144

7.3.10 Implementation of the forcing functions . . . . . . . . . . . . . . . . . . . 150

7.3.11 Boundary conditions for the transport equation at open boundary . . . . . . 151

Version 3.17, November 2016 9

Page 10: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

7.3.12 Boundary conditions for the vertical k-ε model at open boundary . . . . . 152

7.3.13 Boundary conditions for the horizontal k-ε model at open boundary . . . . 152

7.4 Three-dimensional barrier formulation and its implementation . . . . . . . . . . . 153

7.5 Drying and flooding procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160

7.5.1 Description of the general method . . . . . . . . . . . . . . . . . . . . . . 160

7.5.2 Description of alternative methods available in WAQUA . . . . . . . . . . 163

7.5.3 Flooding and drying at weir point . . . . . . . . . . . . . . . . . . . . . . 166

8 Linear solvers 167

8.1 Introduction of Gaussian elimination for tridiagonal systems . . . . . . . . . . . . 167

8.2 Introduction to iterative methods: Jacobi and Gauss Seidel . . . . . . . . . . . . . 169

8.3 System of equations for u-momentum equation: line Gauss-Seidel . . . . . . . . . 171

8.4 System of equations for 3D u-momentum equation: red-black Jacobi method . . . 172

8.5 Coupled systems for the continuity and u-momentum equations . . . . . . . . . . 174

8.6 Parallel runs: the two-way Gaussian Elimination algorithm . . . . . . . . . . . . . 175

8.6.1 Two-way Gaussian Elimination . . . . . . . . . . . . . . . . . . . . . . . 176

8.6.2 Combination of BJ and TWGE . . . . . . . . . . . . . . . . . . . . . . . . 176

8.6.3 A scheme for coloring of sub-rows . . . . . . . . . . . . . . . . . . . . . . 178

8.7 System of equations for transport: double sweep or red-black Jacobi method . . . . 178

8.8 Turbulence equations: flow-dependent Gauss-Seidel method . . . . . . . . . . . . 179

8.9 Convergence criteria for sequential and parallel runs . . . . . . . . . . . . . . . . . 179

9 The overall solution algorithm 182

A Leibniz’ rule 185

B Tensor analysis 187

B.1 Tensor notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187

B.2 Coordinate transformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188

B.3 Geometric quantities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188

B.4 Tensor calculus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191

C Coefficients of v-momentum equation at first stage 194

D Coefficients of u-momentum equation at first stage 196

10

Page 11: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

CONTENTS

E Coefficients of u-momentum equation at first stage after double sweep 198

F Coefficients of transport equation at first stage 199

G Coefficients of discretized k − ε models 202

G.1 Coefficients of vertical k-equation at first stage of first half timestep . . . . . . . . 202

G.2 Coefficients of vertical k-equation at second stage of first half timestep . . . . . . . 202

G.3 Coefficients of horizontal k-equation at First Stage . . . . . . . . . . . . . . . . . 203

H Reference and data structures 204

H.1 Reference structure of WASSTP . . . . . . . . . . . . . . . . . . . . . . . . . . . 204

H.2 Reference and data structures of WASSPU . . . . . . . . . . . . . . . . . . . . . . 206

H.3 Reference and data structures of WASCVU . . . . . . . . . . . . . . . . . . . . . 211

H.4 Reference and data structures of WASTRU . . . . . . . . . . . . . . . . . . . . . . 211

H.5 Reference and data structures of WASXRU and WASXRV . . . . . . . . . . . . . 213

H.6 Reference and data structures of WASYRU and WASYRV . . . . . . . . . . . . . 215

H.7 Reference and data structures of WASMAF . . . . . . . . . . . . . . . . . . . . . 216

I Cross-reference tables of formulas and subroutines 217

J Generalized Lagrangian Mean method 221

Index 223

Bibliography 227

Version 3.17, November 2016 11

Page 12: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

Chapter 1

Introduction

The system “WAQUA in SIMONA” (shorthand: “WAQUA” or also “SIMONA”) is used for two-and three-dimensional hydrodynamic and water quality simulation of well-mixed estuaries, coastalseas and rivers.

WAQUA in SIMONA contains the shallow water flow models WAQUA and TRIWAQ, which areintended to solve the shallow water equations in two (WAQUA) and three dimensions (TRIWAQ) inan accurate and fast way. To guarantee this accuracy the program uses curvilinear orthogonal gridsto allow for curved domain boundaries in the horizontal direction and a general prescription of layerinterfaces in vertical direction to account for complicated bottom topography. Also, computationalspeedup and extra modelling flexibility are provided by several forms of domain decomposition,implemented with the public domain package MPI [80]. Finally, the portability of the code betweensingle processor machines is guaranteed by the use of standard FORTRAN 77/90.

The models WAQUA and TRIWAQ are implemented in a single program, “WAQUA/TRIWAQ”,actually using the same computational routines for both models, using switches to distinguish be-tween specific features of the “WAQUA-scheme” or “TRIWAQ-scheme”. The information aboutthe WAQUA/TRIWAQ program is distributed over several different documents. The User’s GuideWAQUA [52] contains all information needed to run the program for an arbitrary problem on a givengrid. Note that TRIWAQ has the same input structure as WAQUA. The System documentation [51]explains the internals of the program. Information about the domain decomposition methods andtheir use is given in [86] and [85]. This Technical documentation discusses the mathematical de-tails and the discretization that are used in the WAQUA/TRIWAQ program. The mapping of thesenumerical techniques in WAQUA/TRIWAQ code is also discussed.

1.1 Historical background

The Dutch National Institute of Coastal and Marine Management (RIKZ) provides advice and in-formation on fluid flow that occur in the natural environment. In particular, coastal hydraulics,estuaries, flooding and water quality have emerged as key issues. For this purpose, RIKZ developsand maintains a knowledge infrastructure. To achieve knowledge in this respect information on thestatus of various physical and ecological processes are strongly needed. This information can be

12

Page 13: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 1. Introduction

provided by mathematical modelling and numerical simulation of the processes that are involved.In this way, methods can be constructed to develop a model for the prediction of water movementand dispersion of dissolved substances.

In the past, shallow water flows were usually predicted by physical scale models. Later, with in-creasing computer capacity these scale models have been replaced by mathematical ones. Thisdevelopment began with one-dimensional models for the calculation of water movement that wereused in the first half of this century for the closure of the Southern Sea [41]. At the end of thesixties two-dimensional models were introduced for the simulation of estuaries. Based on the workof Leendertse ([36], [37]) the first version of WAQUA was made. This model can be used for hydro-dynamic computations and transport of conservative constituents. Major improvements have beenmade by Stelling [63] which resulted in a more robust WAQUA system.

Today, numerical simulation is being used increasingly as a means of analysing the underlyingfluid dynamic behaviour. It is very important therefore that the physical models and numericalmethods employed are both accurate and reliable. Since, WAQUA is based on the so-called "shallowwater approximation", which means that the vertical component of the velocity and the variation ofvelocity across the depth are both neglected, there is a fundamental loss of information in the verticaldirection. For this reason and due to fast developments in computer technology in the last decades,the construction and the use of three-dimensional hydrostatic models are rapidly becoming moreimportant.

These models are based on the fact that in the vertical direction the physical domain is divided into afixed number of layers. As a consequence, by integrating the equations governing the shallow waterflow over each layers, the loss of information of the vertical distribution of flow quantities is reduced.These models are not fully three-dimensional, but for shallow water they give useful informationabout the vertical structures of velocity distributions. In [28], a comparison has been made betweenhydrostatic and non-hydrostatic models, of which the latter is fully three-dimensional. Also, thedevelopment of efficient methods for generating computational grids makes it now possible to com-pute flows in a wide range of complicated geometries with boundary-fitted grids [71]. Such gridspermit local refinement without affecting the rest of the domain. The curvilinear coordinates havebeen embedded in the WAQUA code [94] and the TRIWAQ code. Also TRIWAQ has been extendedwith an option to incorporate non-hydrostatic effects in the computation.

In [38] a discretization of the three-dimensional shallow flow equations in Cartesian coordinates onstaggered grids has been developed. A short time later Van Kester et al. [29] proposed to employ thismodel with so-called sigma-coordinates. The advantages of making use of these terrain-followingcoordinates are a better representation of bottom topography, a better resolution in shallow areas andfavourable features for vectorization. A disadvantage is the false generation of vertical circulationdue to incorrect computation of density pressure gradients and errors in constituent transport, whichis most evident when the bottom slope is relatively large. This effect is generally called artificialcreep [66].

During the beginning of the ninties, efforts have been made by RIKZ in coorporation with DelftHydraulics to make progress in development of three-dimensional shallow flow model with bottom-aligned grids, which effectively eliminated creep [73]. Based on the conclusions of this study athree-dimensional model, called TRIWAQ, has been developed with curvilinear coordinates in thelongitudinal plane and a general prescription of layer interfaces in the transverse direction. Thisprescription can be made by defining the layer thickness in a relative manner (a constant part of the

Version 3.17, November 2016 13

Page 14: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

total water depth) or in an absolute way (a constant layer thickness). The relative layer thicknessesare usually non-uniformly distributed, which allows for more resolution in zones of interest, such asthe near surface area (important for e.g. wind driven flow and heat exchange with the atmosphere)and the near bottom area (sediment transport).

TRIWAQ has been implemented in the SIMONA framework [50] and is based on the reuse ofWAQUA software in order to reduce the effort of maintenance. SIMONA is designed for stan-dardization of the simulation software at RIKZ and for integration of modelling systems, such asecological and morphodynamical models [8]. It provides a data management system and standardfunctionalities for pre- and post-processing.

1.2 Purpose and motivation

The purpose of this document is to provide relevant information on the mathematical models andnumerical techniques for the simulation of the three-dimensional shallow flows in water bodies andsubstances which are moved by the flowing water. Furthermore, this document explains the essentialsteps involved in the implementation of various numerical methods, and thus provides an adequatereference with respect to the structure of the WAQUA/TRIWAQ program.

1.3 Readership

This document is, in the first place, addressed to those, who wish to modify and to extend mathe-matical and numerical models for shallow flow problems. However, this material is also useful forthose who are interested in the application of the techniques discussed here.

The text assumes the reader has basic knowledge of analysis, partial differential equations andnumerical mathematics and provides what is needed both in the main text and in the appendices.For example, Appendix A introduces Leibniz’ rule to facilitate manipulation of the shallow flowequations, which is done extensively in Chapter 2.

1.4 Scope of this document

In this document we shall outline the features of the WAQUA/TRIWAQ program that can deal withthe three-dimensional incompressible shallow flow equations, coupled with a number of transportequations for several constituents such as salinity, sediment and other substances. Characteristic ofthese equations is that the dominating processes in longitudinal and transverse directions are differ-ent due to difference in length scales, so that the effects of vertical accelerations on the pressure dis-tribution can be neglected without loss of accuracy (using the hydrostatic pressure assumption), orcan be modelled separately using a pressure correction equation (i.e. incorporating non-hydrostaticeffects in the simulation). The equations are formulated in general orthogonal coordinate systemin horizontal planes, whereas in the vertical direction a general definition of layer interfaces is em-ployed. Although considerable flexibility is offered through the use of non-uniform structured grids,there is no provision to handle unstructured grids.

14

Page 15: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 1. Introduction

The program allows for inclusion of different physical effects such as temperature and density dif-ferences, turbulence and spatially varying wind and pressure. 3D turbulence effects due to bottomfriction, vertical shear and wind are represented by either an algebraic model (zero-equation model)based on the Prandtl-Kolmogorov type [74] or three two-equation models of high-Reynolds-numberk-ε variant, namely the standard k-ε model [35], the RNG based k-ε variant [96] and the extendedk-ε closure [10]. Both RNG and extended models may also prove useful for hydraulic applications[97]. These models, however, only contain vertical gradients. On the other hand, 2D turbulencephenomena occuring for instance in mixing layers are modelled by means of the depth-averagedk-ε model [3, 6], which only contains horizontal gradients. Moreover, the user may also choose theRNG based k-ε [96] and the extended k-ε closure [10] for the calculation of 2D turbulence. Log-lawbased wall laws for both smooth and rough walls are employed to bridge the semi-viscous near-wallregion (see e.g. [54], [74]). Furthermore, the code accounts for movable barriers or sluices andtime-dependent computational domain due to drying and flooding.

In order to solve the shallow water and transport equations uniquely it is necessary to prescribeboundary conditions at closed (land) and open boundaries. Along an open boundary one of thefollowing type of boundary conditions may be specified: water level, horizontal velocities, dischargeand Riemann-invariant. These boundary conditions may sometimes be specified in a powerful way,e.g. discharges may be distributed automatically along an opening, or the waterlevels of an riveroutflow boundary may be derived using a Q-H relation. Also, at free surface and bottom suitableboundary conditions need to be given, e.g. for taking into account wind stress and bottom friction.

The set of partial differential equations are solved by an alternating direction implicit (ADI) finitedifference scheme on a staggered grid ([36], [63]). The basic requirements of the discretizationare second order accuracy and unconditionally stability. Each time step is split up into two stagesof each a half time step. In each stage the equations are discretized in different way in order tomaintain the second order accuracy in time [63]. In a certain stage, horizontal advection terms inone of the horizontal momentum equations are approximated with second order upwind scheme[62], whereas for the other horizontal momentum equation central differences are used. A fullyimplicit integration is used for the vertical momentum exchange terms.

Concerning the transport equation, in each stage, horizontal advection terms in one specific direc-tion are discretized with fourth order upwind scheme of Stelling and Leendertse [65], while in theother direction central differences are employed. The vertical terms in the transport equation are dis-cretized in time by means of a linear combination of the forward and backward Euler schemes, theso-called θ-method. For the transport equation, special anti-creepage terms are added for correctingagainst side effects from the non-orthogonal grid schematization in vertical planes [66].

With respect to both the depth-averaged and vertical k-ε models, the first order upwind scheme forthe approximation of turbulence advection is used in order to ensure positivity of the turbulencequantities.

The solutions are obtained by either inverting a tridiagonal matrix through Gaussian elimination(“double sweep”) or solving a linear system of equations with a more complicated structure inhorizontal direction with a red-black Jacobi iteration process. By a double sweep on that systemof equations the vertical dependencies are removed. The equations for the layer-averaged k and εare solved using a Gauss-Seidel iterative technique in combination with a double sweep, whereaseach of the depth-averaged k-ε equations is solved through Gaussian elimination. The equationsfor the non-hydrostatic pressure correction are solved by the BiCGStab iteration method with ILU

Version 3.17, November 2016 15

Page 16: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

postconditioning. All these solution methods are adapted in an appropriate way for use in paralleland domain decomposition runs.

1.5 Overview

The remainder of this document is subdivided as follows:

In Chapter 2 the shallow water flow and transport equations for each layer of the interested flowdomain are described. Next, in case of variable water density the pressure gradient, in which abarotropic and a baroclinic part are distinguished, is derived. Also, special attention is paid to thederivation of the anti-creepage terms in the transport equation. Furthermore, the turbulence modelsare described. Then the computation of the non-hydrostatic pressure and the subsequent correctionof the velocities is discussed. This all is followed by a formulation of the governing equations incurvilinear coordinates with respect to the horizontal planes.

In Chapter 3 the main characteristics of the finite difference method for the discretization of thegoverning equations in irregular horizontal planes are outlined. Special attention is paid to thegeometrical properties and the storage of the unknowns. Next, a short introduction to the alternatingdirection implicit (ADI) technique is given.

Chapter 4 deals with discretizations of the governing equations in the inner region by employing thefinite difference method. Various differencing schemes for advection are reported.

In Chapter 5 the time discretization of the time-dependent differential algebraic equations by meansof ADI method is discussed. Also, the treatment of turbulence source terms in the k-ε model thatguarantee the positivity of turbulence quantities is given.

In Chapter 6 the description of the sequence of the computation in WAQUA/TRIWAQ is outlined.

Chapter 7 is concerned with discussing several boundary conditions and their implementation andis preceded by a discussion of the modification of the advection approximations near boundaries.In addition, a three-dimensional barrier formulation and its implementation is outlined. Finally, theimplementation of flooding and drying due to tidal motion is considered.

Chapter 8 is devoted to the linear solvers for the solution of the resulting linear systems of equations.

Chapter 9 concludes this document by summarizing the overall solution algorithm of TRIWAQ.

This document, however, is not intended as being complete. Although, this document describes theessential steps involved in the simulation of shallow flows, so that the user can see which can bemodified or extended to solve a particular problem properly, some issues involved in WAQUA/TRI-WAQ are not included. Below, a list of these issues is given, of which the information is available.

It is possible to compute time integrals of the water depth, velocities and discharges over one ormore succesive periods during a WAQUA/TRIWAQ simulation. Apart from the momentary waterdepth, velocities and discharges, these integrals can be used for output purposes. It should be noted,however, that the position of the layer thicknesses changes in time (see Chapter 2), so that thephysical interpretation of these integrals is questionable. Details can be found in Chapter “Generalinformation” of the User’s Guide WAQUA [52].

Further the calculation of Lagrangian displacements of points is provided. In this way the dis-

16

Page 17: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 1. Introduction

placement of a water mass can be computed by means of the velocities at the position moving withthe mass. The computation of displacements in a Lagrangian manner can be useful for areas inwhich the flow is strongly non-uniform. By following a mass through grid cells, the trajectory alongwhich the mass is displaced is then better reproduced numerically. The detailed description of thistechnique can be found in Chapter “General information” of the User’s Guide WAQUA [52].

WAQUA/TRIWAQ is also capable of performing a harmonic analysis of the computed waterlevelsor the vertically averaged flow velocities. This yields the amplitudes and phases of several selectedharmonic components. Other derived output quantities that can be obtained are the minimal andmaximal waterlevels and flow velocities during the computation.

In [33], a stability analysis, which uses linearized coefficients in the nonlinear terms of the shallowflow and transport equations, is presented. This analysis indicates that the numerical method de-scribed in this document is unconditionally stable. Difference schemes that may impair the stabilityof the solution process should be avoided. The stability analysis would be helpful for this, and alsofor the refinement of the discretization. For example, in stratified flows, the diffusion of salinity invertical direction tends to zero, for which certain precautions will have to be taken; see Chapter 5.

Version 3.17, November 2016 17

Page 18: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

Chapter 2

Shallow water flow model

In this chapter we shall give an overview of the equations that can be solved by the WAQUA/-TRIWAQ program for shallow water flow. The formulation of pressure gradient for variable waterdensity will be given as well as the available turbulence models. Mathematical details, in so far theyare not necessary for the reader, will not be treated; we refer to the literature used.

In the vertical direction the physical domain is divided into a fixed number of layers. For WAQUAthis number is restricted to one. A flexible scheme is employed for the prescription of the layerinterfaces which move with the water surface, which is discussed in Section 2.1. Using this scheme,we shall derive the three-dimensional shallow water and transport equations per layer. Starting pointfor the derivation of the depth-averaged shallow water equations are the so-called Navier-Stokesequations for fluid flow, see e.g. [42].

The formulation of the shallow water, transport, turbulence model and non-hydrostatic pressureequations in Cartesian coordinates is presented first in Sections 2.2, 2.3, 2.4 and 2.5 respectively,and is then used to formulate the equations in an invariant form, i.e. a form that is independent ofthe coordinate system, with respect to the horizontal planes, as treated in Section 2.6.

For the case of variable water density, the derivation of an expression for the horizontal pressuregradients, in which a barotropic and a baroclinic part are distinguished, is given in Section 2.2.4.The invariant formulation of this equation is also discussed in Section 2.6.

2.1 The prescription of layer interfaces

In the TRIWAQ code we are dealing with curvilinear boundary fitted grids. A distinction is madebetween the definition of grids in horizontal and vertical directions. In the horizontal direction curvi-linear coordinates are used. The formulation of the model in curvilinear coordinates is postponedin Section 2.6, so that the shallow water equations to be presented below are written in Cartesiancoordinates only.

Let us consider a Cartesian coordinate system denoted by

x = (x1, x2, x3) = (x, y, z) (2.1)

where x and y are the longitudinal or horizontal coordinates and z represents the transverse or

18

Page 19: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 2. Shallow water flow model

vertical coordinate. It is assumed that the z-coordinate is oriented positive upward.

We consider the physical domain as depicted in Figure 2.1.

d

plane of reference H

ζ

Figure 2.1: Water area with bottom and free surface.

The vertical water boundaries are defined as follows. The free surface is represented by the functionζ at position (x, y) and time t, which is the distance between the surface and a plane of reference.This function is called the water level. The bottom is described by the function d(x, y), which givesthe time-independent depth below the plane of reference. The function H(x, y, t) = ζ(x, y, t) +d(x, y) is called the total water depth or the local temporal depth.

The grid definition in vertical direction is defined by means of layers. The interface between twolayers is defined as:

zk = zk(x, y, t), 0 ≤ k ≤ K (2.2)

where k and K are the layer index of the layer between zk and zk−1 and the total number of layersin the domain, respectively. Note that z0 = ζ and zK = −d (i.e. k is oriented positive downwards).See also Figure 2.2.

ζ

zK = -

z

zk

k-1

d

hk

z0 =

Figure 2.2: Vertical grid definition with layer interfaces

Version 3.17, November 2016 19

Page 20: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

Next, we define the layer thickness hk as follows:

hk = zk−1− zk (2.3)

In TRIWAQ a flexible scheme is used for the determination of the layer interfaces. Aspects to beconsidered are the representation of bottom topography, resolution in shallow areas and possibilitiesfor increased resolution in area of interest (e.g. near the bottom). A short overview on the descriptionof the layer interfaces is given in [39]. A way to calculate the layer interfaces is by means of theso-called sigma-coordinates ([48],[29]). The basic idea of this concept is to have a constant numberof layers over the longitudinal plane. The sigma-coordinate is defined as:

σ =z − ζH

(2.4)

so that −1 ≤ σ ≤ 0; σ = −1 and σ = 0 correspond to the bottom and free surface, respectively.The layer thickness is then given by

hk = (σk−1−σk)H, σk = constant (2.5)

Thus, hk is defined in a relative manner as a constant part of the total water depth. Using (2.3) and(2.5), the layer interface zk can be computed. For practical purposes it is desirable to allow one ormore layers having a constant thickness throughout the horizontal plane. For instance, in case ofpredicting bottom topography changes, the use of layers with constant thickness near the bottomis recommended [31]. To make sure that the sum of the layer thicknesses equals the total waterdepth, at least one layer should be defined in a relative way. As a result, a flexible scheme for thecalculation of the layer interfaces can be constructed, in which some layers may have a constantthickness and others are defined by partitions of the remaining depth. Hence, if a layer k has aconstant thickness hk, then

zk = zk−1−hk (2.6)

Otherwise, the layer interface zk is evaluated as follows:

zk = zk−1−(H − htot)(σk−1−σk) (2.7)

where htot is the sum of all constant layer thicknesses. Note that in this approach no direct use ismade of the sigma-transformation. However, in regions of tidal flats it is possible that H ≤ htot. Insuch a case we introduce a so-called "shadow" sigma-coordinates approach. The idea behind thismethod is to set the sum of all constant layer thicknesses exactly to half the total water depth. Theremaining half of the water column is partitioned in the same relative fashion (as determined by theuser). Thus, this approach can be summarised as follows:

H ≤ 2htot : zk = zk−1− fkH (2.8)

with

fk =

hk

2htot, if layer k has a constant thickness hk

σk−1−σk2

, if layer k is a part of the depth(2.9)

The calculation of the layer interfaces is given in pseudo code in Algorithm 2.1.

20

Page 21: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 2. Shallow water flow model

Algorithm 2.1 - Calculation of the layer interfaces.

Given:- number of fixed layers Nfix ,- layer thickness for each layer hlay (in percentage or meter),- sum of constant layer thicknesses htot

Determine z0 and zK : z0 = ζ , zK = −dH = z0 − zKif ( Nfix = 0 ) then

for k = 1 to K dozk = zk−1 − hlayH

end forelse

for k = 1 to K doif ( H > 2htot ) then

if ( if layer k has constant thickness ) thenzk = zk−1 − hlay

elsezk = zk−1 − hlay(H − htot)

end ifelse

if ( layer k has constant thickness ) thenfk =

hlay2htot

elsefk = 1

2hlay

end ifzk = zk−1 − fkH

end ifend for

end if

2.2 The shallow water equations

In this section we formulate the three-dimensional shallow water equations per layer as they aresolved by TRIWAQ. Shallow water flows are classified as flows, in which the horizontal lengthscale is much larger than the vertical one. The assumption of shallowness give rise to simplified flowequations. A result of this simplification is, that the momentum equation in vertical direction canbe rewritten to an easier relation which can be substituted in the horizontal momentum equations.Moreover, the pressure is eliminated and replaced by the unknown water level. The shallow waterflow equations per layer can be obtained by integrating the momentum equations for each layer.

Version 3.17, November 2016 21

Page 22: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

2.2.1 The incompressible Reynolds-averaged Navier-Stokes equations

The equations describing the mean velocity field in incompressible turbulent flow follow from theNavier-Stokes equations by the Reynolds decomposition of the instantaneous velocity field into amean1 and a fluctuating part, i.e., u = u + u′. For brevity, the overbars indicating averaged valueswill be dropped from here on. Note that incompressibility does not mean that the density is constant,but rather that the density is independent of the pressure. The governing equations can be written as(see e.g. [23] and [69]):

∂ρ uα∂t

+∂ρ uα uβ∂ xβ

+∂ρu′α u′β∂ xβ

+∂p

∂ xα− ∂ ταβ∂ xβ

= ρ fα (2.10)

using Cartesian tensor notation and the summation convention in which repeated Greek indices areto be summed over the three coordinate directions, i.e. α, β = 1, 2, 3 (see Appendix B). Here ρ isde fluid density, uα is the Cartesian mean velocity component, p is the mean pressure, fα representsan external force per unit volume, −ρu ′α u ′β is the Reynolds stress tensor and ταβ is the meandeviatoric stress tensor. For a Newtonian fluid, this tensor is given by

ταβ = µ

(∂ uα∂ xβ

+∂ uβ∂ xα

)(2.11)

where µ is the dynamic viscosity of the fluid. Due to the assumption of incompressibility, thevelocity field is divergence-free, i.e.,

∂ uα∂ xα

= 0 (2.12)

Forces of interest are:

• the gravity force,

• the Coriolis force,

• the tidal forces,

• the pressure,

• the unbalance (force) in Reynolds stresses.

On request of the user the forces for tide generation can be included explicitly in the equations, butin the default case their effect is represented in the open boundary conditions. The external forceconsists of the gravity, the Coriolis force and optionally the tidal forces and is given by

fα = − δα3 g + 2 εαβγ uβ Ωγ +∂ UP∂ xα

, (2.13)

where δαβ is the Kronecker delta, εαβγ is the permutation symbol (see also Appendix B), g is theacceleration of gravity, Ω = (Ω1,Ω2,Ω3) is the earth rotation vector, and UP is the tide generat-ing potential that explicitly depends on time and space. More background information about thispotential can be found in [57].

1 The mean field may be obtained by averaging the instantaneous Navier-Stokes equations over time, space orensemble.

22

Page 23: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 2. Shallow water flow model

All effects of turbulence on the mean flow are contained in the Reynolds stress term. By analogywith the viscous stresses, the Boussinesq hypothesis assumes that the Reynolds stresses depend onthe deformation rates of the mean flow as follows:

− ρu′α u′β = µt

(∂ uα∂ xβ

+∂ uβ∂ xα

)− 2

3ρk δαβ, (2.14)

where µt denotes the so-called dynamic eddy viscosity, which is not a characteristic of the fluidbut of the flow, and k is the turbulent kinetic energy per unit volume mass. The value of the eddyviscosity is usually much larger than the dynamic one.

Remark The latter term of (2.14) enables to take in consideration normal stresses. With equation(2.12), from (2.14) it follows that their sum is twice the kinetic energy. Furthermore, this term canbe absorbed by the pressure gradient term. We then have to replace static pressure by p+ 2/3k.

The equations (2.10)-(2.14) form the Reynolds-averaged Navier-Stokes equations in conservationform with the eddy viscosity µt to be described. Usually, the shallow water equations to be derivedbelow are written in non-conservation form. The main reason for this is that we are then able toformulate the finite difference equations (see Chapter 4) in such a way that these equations can besolved one time step after another with relatively large time steps. Therefore, the Reynolds-averagedmomentum equations to the neglect of dynamic viscosity are rewritten as follows:

∂ uα∂t

+uβ∂ uα∂ uβ

+1

ρ

∂p

∂ xα− ∂

∂ xβ

(νt

(∂ uα∂ xβ

+∂ uβ∂ xα

))+ δα3 g−2 εαβγ uβ Ωγ −

∂ UP∂ xα

= 0 (2.15)

with the kinematic eddy viscosity νt given by νt := µt/ρ of which the determination will be treatedin Section 2.4. Use has been made in (2.15) of the Boussinesq approximation so that the influenceof variable density appears only in the pressure terms.

2.2.2 The assumption of shallowness

Before applying vertical integration of the equations, the momentum equation for the vertical ve-locity component u3 in equation (2.10) will be simplified. WAQUA is applied for flows where thecharacteristic horizontal length scales (dimensions of the flow domain and wavelengths) are muchlager than the vertical length scale (the water depth). The flows are boundary-layer type of flows.The motion of a fluid particle is therefore mainly horizontal and the vertical accelerations are ne-glected with respect to the gravity. From linear wave theory it can be found that a long shallowwater wave results if the ratio of water depth to wave length is less than about 0.05 [89].

In shallow water flows the fluid motions are predominantly horizontal. The vertical acceleration ofthe large scale motion is very small, particularly if compared with the acceleration due to gravity.Hence, it is justifiable to neglect the vertical acceleration and advection. For the same reason thevertical component of the Coriolis force and the stress components in the vertical direction maybe neglected. Under these assumptions, the vertical momentum equation (α = 3) is reduced to ahydrostatic pressure equation:

∂p

∂z= −ρg (2.16)

Extended details on this simplification may be found in [49].

Version 3.17, November 2016 23

Page 24: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

Remark This simplification is not always appropriate, for instance in the presence of strong densityeffects due to salinity or temperature or locally steep bottom gradients. For this the non-hydrostaticeffects should be incorporated in the model. This is done in TRIWAQ using a pressure correctionmechanism, see Section 2.5.

Another consequence of the shallow water assumption is the neglect of 2Ωαu3 (α = 1, 2) in thehorizontal components of the Coriolis force since, the vertical velocity component is an order ofmagnitude smaller than the horizontal components. The magnitude of Ω3 depends on the geograph-ical position of the grid, expressed in the earth’s latitude Φ, as follows:

Ω3 = |Ω| cos Φ (2.17)

Usually, this is expressed as a Coriolis parameter f = 2Ω3.

Defining (u1,u2,u3) = (u,v,w), the horizontal momentum equations can be written in a form whichis suitable for derivation of shallow water equations for layer k:

∂u

∂t+ u

∂u

∂x+ v

∂u

∂y+ w

∂u

∂z+

1

ρ

∂p

∂x−∇ · (νt∇u)− fv − ∂ UP

∂x= 0 (2.18)

∂v

∂t+ u

∂v

∂x+ v

∂v

∂y+ w

∂v

∂z+

1

ρ

∂p

∂y−∇ · (νt∇v) + fu− ∂ UP

∂y= 0 (2.19)

2.2.3 The layer-averaged continuity and horizontal momentum equations

The vertical grid schematisation, introduced in the first section of this chapter, gives rise to thedefinition of the vertical velocity with respect to the moving layer interfaces. The vertical velocityrelative to layer interface zk, denoted as ωk, is defined as the difference between the vertical velocityalong a streamline and the vertical velocity along the layer interface:

ωk = w(zk)−∂ zk∂t− u(zk)

∂ zk∂x− v(zk)

∂ zk∂y

(2.20)

The velocity ωk is oriented orthogonal to the layer-interface, and therefore need not be directed inthe z-direction. This is the origin of the latter two terms of (2.20).

Taken into account the kinematic conditions on the vertical velocityw at the free surface and bottom,which state that the fluid moves with the vertical boundaries and thus, the water particles will notleave the area:

w(ζ) = ∂ζ∂t

+ u(ζ) ∂ζ∂x

+ v(ζ)∂ζ∂y

w(−d) = −u(−d) ∂d∂x− v(−d)∂d

∂y

(2.21)

we haveω0 = ωK = 0 (2.22)

Since the distribution of velocities over a layer k is not of great interest, we consider the layer-averaged horizontal velocities, which are defined as:

uk =1

hk

zk−1

∫z′=zk

udz′, vk =1

hk

zk−1

∫z′=zk

vdz′ (2.23)

24

Page 25: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 2. Shallow water flow model

The remainder of this section deals with the derivation of the layer-averaged continuity and momen-tum equations. This derivation is based on the integration over a layer k. Using Leibniz’ rule (seeAppendix A), the layer integrals can be expressed in layer-averaged quantities.

The continuity equation for layer k is obtained as follows:

zk−1

∫z′=zk

∂ uα∂ xα

dz′ =zk−1

∫z′=zk

(∂u∂x

+ ∂v∂y

+ ∂w∂z

)dz′ =

∂∂x

zk−1

∫z′=zk

udz′ + ∂∂y

zk−1

∫z′=zk

vdz′ −(u∂z

∂x+ v ∂z

∂y

)∣∣∣zk−1

zk+w(zk−1)− w(zk) = 0

(2.24)

By virtue of (2.20) and (2.23), this equation becomes

∂ hk∂t

+∂ hk uk∂x

+∂ hk vk∂y

+ ωk−1−ωk = 0 (2.25)

Hence, the effect of vertical grid schematisation on the continuity equation is that the physicalvertical velocity w(zk) is replaced by ωk. The depth-averaged continuity equation can be derivedby taking the sum of (2.25) over all layers of the domain. For this purpose, the depth-averagedhorizontal velocties U and V are defined by

U =1

H

ζ

∫z′=_d

udz′ =1

H

K∑k=1

hk uk, V =1

H

ζ

∫z′=_d

vdz′ =1

H

K∑k=1

hk vk (2.26)

From (2.22), (2.25) and (2.26) we deduce the depth-averaged continuity equation:

∂ζ

∂t+∂HU

∂x+∂HV

∂y= 0 (2.27)

Next, the momentum equations (2.18) and (2.19) are integrated over layer k. We restrict ourselvesto the u-momentum equation. The layer-averaged v-momentum equation can be obtained easily byinterchanging u and v and the Coriolis force term changing in sign. Furthermore, for the sake ofeasier manipulations, the advection and viscous terms will hereafter be expressed as, respectively,

u∂u

∂x+ v

∂u

∂y+ w

∂u

∂z=∂ u2

∂x+∂uv

∂y+∂uw

∂z(2.28)

and

∇ · (νt∇u) =∂

∂x

(νt∂u

∂x

)+

∂y

(νt∂u

∂y

)+

∂z

(νt∂u

∂z

)(2.29)

Using Leibniz’ rule and (2.23), integration of the time derivative, pressure gradient and Coriolisterm over layer k gives:

zk−1

∫z′=zk

(∂u

∂t+

1

ρ

∂p

∂x− fv

)dz′ =

∂ hk uk∂t

− u∂z′

∂t

∣∣∣∣zk−1

zk

+1

ρk

zk−1

∫z′=zk

∂p

∂xdz′ − f hk vk (2.30)

Version 3.17, November 2016 25

Page 26: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

assuming that the layer-averaged fluid density, defined as

ρk =1

hk

zk−1

∫z′=zk

ρdz′ (2.31)

is constant across layer k. Similarly to the derivation of continuity equation (2.24), the followinglayer-averaged advection terms are obtained:

zk−1

∫z′=zk

(∂ u2

∂x+ ∂uv

∂y+ ∂uw

∂z

)dz′ =

∂∂x

zk−1

∫z′=zk

u2 dz′ + ∂∂y

zk−1

∫z′=zk

uvdz′ + u(zk−1)ωk−1 +∂ zk−1

∂t

− u(zk)

ωk +∂ zk

∂t

(2.32)

in which (2.20) has been substituted. Since,

hk u2k =

zk−1

∫z′=zk

(2uuk−u2

k

)dz′ (2.33)

one can verify that∂

∂x

zk−1

∫z′=zk

u2 dz′ =∂ hk u

2k

∂x+

∂x

zk−1

∫z′=zk

(u− uk)2 dz′ (2.34)

In analogy with (2.34), we also have

∂y

zk−1

∫z′=zk

uvdz′ =∂ hk uk vk

∂y+

∂y

zk−1

∫z′=zk

(u− uk) (v − vk) dz′ (2.35)

The latter terms of (2.34) and (2.35) are the so-called dispersion terms which are due to vertical non-uniformities of the mean-flow velocities. It should be noted that these terms are resulted merely fromlayer-averaged treatment of nonlinear terms and thus have to be modelled. A common practice is totreat the dispersion effects as molecular diffusion.

Depth-averaging the three-dimensional Reynolds-averaged momentum equations discards the meanvertical exchange of horizontal momentum, such as induced by tidal motions, flow over bed topog-

raphy, wind, vertical stratification, etc. These effects are contained in the stresseszk−1

∫z′=zk

(u− uk)2 dz′

andzk−1

∫z′=zk

(u− uk) (v − vk) dz′. To close the system of equations the stresses have to be expressed

as functions of the depth-averaged velocities. A well-known approximation is to assume thatzk−1

∫z′=zk

(u− uk)2 dz′ andzk−1

∫z′=zk

(u− uk) (v − vk) dz′ will have the same behaviour as molecular viscos-

ity and it leads to an additional viscosity (dispersion) term in the right-hand side. The eddy viscosityin the depth-averaged equations is increased compared to the one appearing in the three-dimensionalequations. For the applications of the WAQUA system these terms must be of secondary importancebecause otherwise the 3D-system TRIWAQ should be used.

Finally, we consider the integration of the viscous terms over layer k. For example, the first term inthe right-hand side of (2.29) is integrated as follows:

zk−1

∫z′=zk

∂x

(νt∂u

∂x

)dz′ =

∂x

zk−1

∫z′=zk

νt∂u

∂xdz′ − νt

∂u

∂x

∂z′

∂x

∣∣∣∣zk−1

zk

(2.36)

26

Page 27: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 2. Shallow water flow model

Before we apply Leibniz’ rule (see Appendix A) to calculate the first term in the right-hand side of(2.36), we first assume that νt is a superposition of three parts, namely the molecular diffusion ν, apart due to layer-averaging of advection (i.e. dispersion effect) and a part due to turbulence.

Since the horizontal resolution of the grid and time steps are much larger than the typical lengthand time scales of turbulent motions, it is usually sufficient to take the turbulent viscosity being asa constant (see [74]). Hence,

zk−1

∫z′=zk

νt∂u

∂xdz′ = νh

zk−1

∫z′=zk

∂u

∂xdz′ = νh

∂x

zk−1

∫z′=zk

udz′ − νh u∂z′

∂x

∣∣∣∣zk−1

zk

(2.37)

where the horizontal viscosity νh is the sum of the three parts mentioned above, which is constant.Substitution of (2.37) in (2.36) gives:

zk−1

∫z′=zk

∂x

(νt∂u

∂x

)dz′ ≈ νh

∂2 hk uk∂x2

− ∂

∂x

(u∂z′

∂x

∣∣∣∣zk−1

zk

)− ∂u

∂x

∂z′

∂x

∣∣∣∣zk−1

zk

(2.38)

In order to simplify (2.38) we assume that

u(zk−1) ≈ uk, u(zk) ≈ uk (2.39)

as long as hk is small enough. Thus, with

∂z′

∂x

∣∣∣∣zk−1

zk

=∂hk∂x

(2.40)

and using the chain rule, we have

zk−1

∫z′=zk

∂x

(νt∂u

∂x

)dz′ ≈ νh hk

∂2 uk∂x2

(2.41)

A similar procedure is applied to the second term in the right-hand side of (2.29). Instead of makingthis simplification for the horizontal viscosity, it is also possible to incorporate the full Reynoldstress tensor in a TRIWAQ simulation.

When considering the last term of (2.29) it is important to note that the eddy viscosity νt in thevertical direction, to be denoted as νv, should be determined by a turbulence model, since turbulenceis mainly generated by vertical gradients whose typical length scale is smaller than or equal to thewater depth. Hence, in constrast to the horizontal viscosity νh, the vertical viscosity νv generallydepends on space and time. The vertical viscous term is represented as follows:

zk−1

∫z′=zk

∂z

(νt∂u

∂z

)dz′ = νv

∂u

∂z

∣∣∣∣zk−1

zk

(2.42)

Since, the zk-planes are generally curved, the viscous terms should be properly transformed, so thatthe curvature terms are taken into account. However, in practice, these terms are neglected. Thereason is that here advection and pressure gradient are in good balance, which dictates the levelof momentum, and the role of the viscous terms are minor. The effect of neglecting the curvatureterms is known as the artificial creep. In Section 2.3 we shall see that for the formulation of thelayer-averaged transport equation the curvature terms are found to be important.

Version 3.17, November 2016 27

Page 28: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

The integration has now been completed. The resulting layer-averaged u-momentum equationreads:

∂ hk uk∂t

+∂ hk u

2k

∂x+ ∂ hk uk vk

∂y+ u(zk−1)ωk−1−u(zk)ωk =

− 1ρk

zk−1

∫z′=zk

∂p∂xdz′ + νh hk

∂2 uk∂ x2 + νh hk

∂2 uk∂ y2 + νv

∂u∂z

∣∣zk−1

zk+f hk vk

(2.43)

Since u(zk), νv(zk) and ∂u∂z

(zk) are unknown, further approximations are needed. These approxi-mations will be discussed in Chapter 4. When substituting the layer-averaged continuity equation(2.25) in (2.43) while dividing the equation by hk, the layer-averaged u-momentum equation can bewritten in the following non-conservation form:

∂ uk∂t

+ uk∂ uk∂x

+ vk∂ uk∂y

+ωk−1

hk(u(zk−1)− uk)− ωk

hk(u(zk)− uk) =

− 1hk ρk

zk−1

∫z′=zk

∂p∂xdz′ + νh

∂2 uk∂ x2 + νh

∂2 uk∂ y2 + νv

∂u∂z

∣∣zk−1

zk

1hk

+ f vk

(2.44)

Note that we still need an appropriate expression for the pressure gradient. Section 2.2.4 deals withthe formulation of the pressure gradient, which will be used in TRIWAQ. The invariant formula-tion in the horizontal direction of the three-dimensional shallow water equations (2.25), (2.27) and(2.44) will be considered in Section 2.6. Furthermore, these equations require suitable boundaryconditions, e.g. for taking into account wind stress and bottom friction. Boundary conditions willbe treated in Chapter 7.

The system of equations (2.25), (2.27) and (2.44) is hyperbolic, because the viscosity terms are ofsecondary importance. In 1D the system of shallow water equations has two characteristics. Withoutfriction, the quantities that are conserved, the so-called Riemann invariants, are given by:

R+ = u +√g(ζ + d)

R− = u −√g(ζ + d)

(2.45)

The characteristic wave propagation velocity is√g(ζ + d). In 2D the characteristic lines turn into

characteristic surfaces, see [18].

2.2.4 Pressure gradient formulation with non-uniform density

In Section 2.2.2 we have derived the pressure term in the depth-averaged equations using a constantdensity. For a constant density the pressure gradient is determined by the free surface slope, theso-called barotropic pressure gradient defined by equation (2.16). In this section we will derive apressure gradient term for variable density. As will be stated in Section 2.3 a transport solver forsalinity and heat is part of the WAQUA/TRIWAQ system.

In this section we consider the formulation of the pressure gradient in case of a non-uniform fluiddensity. Again, we restrict ourselves to the x-direction. After integration of (2.16), the hydrostaticpressure is given by:

p = patm + gζ

∫z′=z

ρ(x, y, z′, t)dz′ (2.46)

28

Page 29: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 2. Shallow water flow model

where patm is the atmospheric pressure. The atmospheric pressure may be constant. However, itis possible to drive a model covering a considerable area with given space-distributed air pressuredata.

When non-hydrostatic effects are incorporated in the model, the complete w-momentum equationas characterized by (2.15) is retained instead of being simplified to equation (2.16). This is workedout by incorporating a so-called non-hydrostatic pressure correction q in equation (2.46):

p = patm + gζ

∫z′=z

ρ(x, y, z′, t)dz′ + q (2.47)

The computation of the (yet unknown) correction q is described in Section 2.5.

If the fluid density is constant, the pressure can be simply replaced by the water level and hence, the(barotropic) pressure gradient in (2.44) is given by:

1

hk ρk

zk−1

∫z′=zk

∂p

∂xdz′ =

1

ρk

∂patm∂x

+ g∂ζ

∂x+∂q

∂x(2.48)

Generally, the density of fluid ρ is a function of space and time. For example, in a tidal river, saltwater from the sea penetrates due to its larger density. In TRIWAQ, the density is computed by thefollowing empirical formula as given in [15]:

ρ =P0

λ+ α0 P0

(2.49)

whereP0 = 5890 + 38T − 0.375T 2 +3s

λ = 1779.5 + 11.25T − 0.0745T 2−(3.80 + 0.01T )s

α0 = 0.6980

(2.50)

Here T is the temperature in degrees Celsius and s is the salinity in parts per thousand. Becausethe density varies only weakly with the temperature, usually a constant temperature is applied. Thedefault temperature in WAQUA/TRIWAQ is 14 ˚C. Hence, for the determination of evolution of thedensity it is sufficient to calculate the transport of salinity. The formulation of the layer-averagedtransport equation for a constituent will be presented in Section 2.3.

We now derive an expression for the pressure gradient in case of non-uniform density. Equation(2.46) can be rewritten as:

p = patm + gzk−1

∫z′=z

ρdz′ + gk−1∑j=1

zj−1

∫z′=zj

ρdz′

= patm + gzk−1

∫z′=z

ρdz′ + gk−1∑j=1

hj ρj

(2.51)

Differentation in x-direction and integration over layer k gives:

zk−1

∫z′=zk

∂p

∂xdz′ = g

zk−1

∫z′′=zk

∂x

zk−1

∫z′=z

ρdz′dz′′ + g hk

k−1∑j=1

(hj∂ ρj∂x

+ ρj∂ hj∂x

)(2.52)

Version 3.17, November 2016 29

Page 30: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

The second term in the right-hand side of (2.52) can be computed as follows:

zk−1

∫z′′=zk

∂∂x

zk−1

∫z′=z

ρdz′dz′′ = hk ρk∂ zk−1

∂x+

zk−1

∫z′=zk

(zk−1−z′) ∂ ρk∂xdz′

= hk ρk∂ζ∂x− hk ρk

k−1∑j=1

∂ hj∂x

+ 12 h

2k∂ ρk∂x

(2.53)

where we have used the fact that the density is constant across the layer and

k−1∑j=1

hj = ζ − zk−1 (2.54)

With the above considerations, the final expression of the pressure gradient as given in (2.44) be-comes

1hk ρk

zk−1

∫z′=zk

∂p∂xdz′ = g ∂ζ

∂x+ 1

ρk

∂patm∂x

+ ∂q∂x

+ gρk

12 hk

∂ ρk∂x

+k−1∑j=1

(hj

∂ ρj∂x

+ (ρj − ρk)∂ hj∂x

) (2.55)

The fourth term in the right-hand side of (2.55) is denoted as the baroclinic pressure gradient. Intidal areas it may be small compared to the barotropic gradient, but it may significantly influence theresidual flow. Following the Boussinesq hypothesis the influence of variable density appears onlyin the baroclinic pressure term. In the other terms a constant reference density ρ0 is assumed.

2.3 The transport equation

From the principle of conservation of a constituent in an incompressible fluid flow, the transportequation is obtained immediately in Cartesian coordinates:

∂c

∂t+∂ uα c

∂ xα=

∂ xα(Dt

∂c

∂ xα) + Sc (2.56)

where c stands for the concentration of a constituent, Dt is an eddy diffusivity coefficient and Sc isa source/sink term which depends on c, velocities and other constituents. The coefficient Dt includeparametrizations of turbulence. Special constituents are salinity and sediment. These quantitiesinfluence the density of water, which can be employed as an extra forcing term in the momentumequations (see also Section 2.2.4 ).

We continue with the formulation of layer-averaged transport equation. First, we define the layer-averaged constituent as follows:

ck =1

hk

zk−1

∫z′=zk

cdz′ (2.57)

30

Page 31: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 2. Shallow water flow model

and we assumed that ck is constant across layer k. Integration of the time derivative and convectionterms over layer k gives similar results as in the momentum equations. Hence, we have

zk−1

∫z′=zk

(∂c∂t

+ ∂ uα c∂ xα

)dz′ =

∂ hk ck∂t

+ ∂ hk uk ck∂x

+ ∂ hk vk ck∂y

+ ωk−1 c(zk−1)− ωk c(zk)

(2.58)

The dispersion terms

zk−1

∫z′=zk

(c− ck)(u− uk)dz′,zk−1

∫z′=zk

(c− ck)(v − vk)dz′ (2.59)

which are the result of the layer-averaging of the convection terms, will be modelled as diffusionand thus absorbed by the horizontal diffusion terms to be presented below.

The source term is integrated as follows:

zk−1

∫z′=zk

Sc dz′ = hk(Sc )k (2.60)

where (Sc )k is the layer-averaged source and sink term that is described by the user. It is definedby:

Sc = SIN cIN − SOUT c (2.61)

with

cIN concentration of global source

QIN global source per unit area in (m/s)

QOUT global sink per unit area in (m/s)

We consider the integration of the diffusion terms. First, a distinction is made between horizontaland vertical eddy diffusivity coefficients. For oceanographic applications and for flow in rivers andestuaries the horizontal eddy diffusivity, denoted as Dh, may be much larger than the vertical oneDv. Note that Dh usually also represents the effect of dispersion (2.59) and not only of turbulenttransport. By virtue of Leibniz’ rule, integration over layer k yields:

zk−1

∫z′=zk

( ∂∂x

(Dh∂c∂x

) + ∂∂y

(Dh∂c∂y

) + ∂∂z

(Dv∂c∂z

))dz′ =

∂∂x Dh

zk−1

∫z′=zk

∂c∂xdz′ + ∂

∂y Dh

zk−1

∫z′=zk

∂c∂ydz′ + Dv

∂c∂z

∣∣zk−1

zk−Dh

∂c∂x

∂z′

∂x

∣∣zk−1

zk−Dh

∂c∂y

∂z′

∂y

∣∣∣zk−1

zk

(2.62)

Note that the horizontal eddy diffusivity coefficients are constant across layer k and may depend onx and y. Next, the remaining integrals will be evaluated. For convenience, only the first term in theright-hand side of (2.62) will be considered. With Leibniz’ rule, we have

zk−1

∫z′=zk

∂c

∂xdz′ =

∂x

zk−1

∫z′=zk

cdz′ − c∂z′

∂x

∣∣∣∣zk−1

zk

=∂ hk ck∂x

− c∂z′

∂x

∣∣∣∣zk−1

zk

(2.63)

Version 3.17, November 2016 31

Page 32: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

In Chapter 4 we shall make use of the staggered grid arrangement. As a consequence, the scalarvariables are located centrally in between the layer interfaces. Hence, using the Taylor series weobtain

c(zk−1) = c(zk−1/2) + 12 hk

∂c∂z

(zk−1/2) +O(h2k)

c(zk) = c(zk−1/2)− 12 hk

∂c∂z

(zk−1/2) +O(h2k)

(2.64)

where zk−1/2 represents the point located centrally in layer k. So, we have

c∂z′

∂x

∣∣zk−1

zk= c(zk−1/2)∂ hk

∂x+ 1

2 hk(∂ zk−1

∂x+ ∂ zk

∂x) ∂c∂z

(zk−1/2) +O(h2k)

≈ ck∂ hk∂x

+ hk∂ zk∂x

∂c∂z

(zk−1/2)

(2.65)

with zk = 12(zk−1 + zk).

With the chain rule, the integral (2.63) is then found to bezk−1

∫z′=zk

∂c

∂xdz′ ≈ hk(

∂ ck∂x− ∂ zk

∂x

∂c

∂z(zk−1/2)) (2.66)

This approximation is second order accurate in space. We now find an appropriate expression forthe first term in the right-hand side of (2.62):

∂xDh

zk−1

∫z′=zk

∂c

∂xdz′ =

∂x(Dh hk

∂ ck∂x

)− ∂

∂x(Dh hk

∂ zk∂x

∂c

∂z(zk−1/2)) (2.67)

A similar expression for the second term in the right-hand side of (2.62) can be found.

Although, the integration has now been completed, one important step need to be done. Since thezk-planes are generally curved, the transport equation needs to be transformed, so that the curvatureterms are involved. These curvature terms are due to the fact that the unit base vectors changefrom point to point according to the geometrical properties of the layer interfaces. In contrast to themomentum equations, these terms should not be neglected. This can be argued as follows. The levelof constituent is mainly determined by the transport mechanism, namely convection and diffusion.These terms must be in balance with each other. Hence, it is important to approximate the diffusion,which is augmented with curvature terms, accurately. When curvature terms are neglected, this maylead to "mixing" of the constituent in vertical direction. This effect, known as the artificial creeping,becomes significant in regions of strong stable stratification. The importance of the balance betweenconvection and diffusion also explains why the transport equation must be written in conservationform.

We introduce a local coordinate system as follows:x′ = x

y′ = y

z′ = z − zk(x, y)

(2.68)

By virtue of this transformation (2.68), the expressions of the partial derivatives read:

∂x=

∂x′− ∂ zk

∂x

∂z′,

∂y=

∂y′− ∂ zk

∂y

∂z′,

∂z=

∂z′(2.69)

32

Page 33: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 2. Shallow water flow model

Since, the layer-averaged scalar ck is constant across layer k, we thus have

∂ ck∂x

=∂ ck∂x′

(2.70)

Similarly,∂

∂x(Dh hk

∂ ck∂x

) =∂

∂x′(Dh hk

∂ ck∂x′

) (2.71)

Furthermore,

∂∂x

(Dh hk∂ zk∂x

∂c∂z

(zk−1/2)) = ∂∂x′

(Dh hk∂ zk∂x′

∂c∂z′

(zk−1/2))

−∂ zk∂x

∂∂z′

(Dh hk∂ zk∂x′

∂c∂z′

(zk−1/2))

≈ ∂∂x′

(Dh hk∂ zk∂x′

∂c∂z′

(zk−1/2))

(2.72)

In (2.72) we have neglected the second order derivative of c with respect to z’. Approximation(2.72) is exact for vertically linear concentration fields. Application of the local transformation andsubstitution of the above relations gives the layer-averaged transport equation for any layer-averagedconstituent ck:

∂ hk ck∂t

+ ∂ hk uk ck∂x′

+ ∂ hk vk ck∂y′

+ ωk−1 c(zk−1)− ωk c(zk) =

∂∂x′

(Dh hk∂ ck∂x′

) + ∂∂y′

(Dh hk∂ ck∂y′

) + Dv∂c∂z′

∣∣zk−1

zk+hk(Sc )k +

− ∂∂x′

(Dh hk∂ zk∂x′

∂c∂z′

(zk−1/2))− ∂∂y′

(Dh hk∂ zk∂y′

∂c∂z′

(zk−1/2))+

−Dh∂c∂x′

∂z∂x

∣∣zk−1

zk−Dh

∂c∂y′

∂z∂y

∣∣∣zk−1

zk+Dh(

∂z∂x

)2 ∂c∂z′

∣∣zk−1

zk+Dh(

∂z∂y

)2 ∂c∂z′

∣∣zk−1

zk

(2.73)

We conclude that the latter six terms in (2.73) are correction terms to reduce the artificial creeping,whereas the latter two terms further abate the creeping due to the local transformation. These sixterms are called the anti-creepage terms. It should be noted that these six anti-creepage terms are notpresent anymore in the numerical discretization. The approximations for the horizontal gradients inthe remaining terms of Eq. (2.73) are now discretized according to the approach of Stelling & VanKester [66].

2.4 Turbulence models

In the previous sections we derived the layer-averaged continuity, momentum and transport equa-tions for water level, layer-averaged velocities, relative vertical velocity and constituents. Theseequations do not form a closed system, since the vertical and horizontal eddy viscosities νv and νh,as well as the eddy diffusivities Dv and Dh are undetermined.

The turbulence structure of the flow in shallow water is characterized by the coexistence of 3Dturbulence, having length scales less than the water depth, and horizontal two-dimensional eddies

Version 3.17, November 2016 33

Page 34: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

with much larger length scales. Such a non-isotropic character of shallow-water turbulence mayproduce a large difference between horizontal and vertical eddy viscosity coefficients.

The following turbulence models are available in WAQUA:

Vertical turbulence models

Choosing the turbulent energy k as the basis of the characteristic velocity scale for turbulence,dimensional analysis tells us that

νv ∼√k` (2.74)

with ` the characteristic length of the turbulent eddies. To close the system of equations, wenow need algebraic expressions or transport equations for k and `.

Constant viscosity coefficientIn certain cases, the vertical eddy viscosity coefficient νv can be modeled by a constantvalue.

Algebraic modelIn section 2.4.1.1, we consider a turbulence model that does not involve transport equa-tions for turbulence quantities. This so-called zero-equation or algebraic model deter-mine the eddy viscosity through empirical formulae for k and `, which are suitable forshallow flow applications. In case of vertical density gradients, the turbulent exchangesare limited by buoyancy forces. Therefore, the influence of density stratification is alsoaccounted for via the empirical formulae.

Vertical k − ε-modelVertical turbulence is mainly generated by vertical velocity gradients (including bottomand wind stresses) whose length scale is smaller than the water depth. Therefore, a 3Dturbulence model is often necessary to properly evaluate vertical turbulence in flows.Turbulent flows contain length and time scales that can change dramatically from oneflow configuration to the next. Consequently, two-equation turbulence models - whereintransport equations are solved for two turbulent fields that are directly related to thelength and time scales - represent the simplest level of Reynolds stress closure that can begeometry independent. During the past two decades, the standard k-ε model of Launderand Spalding [35] has played a central role in the calculation of many of the turbulentflows of scientific and engineering interest. In this model, to be presented in Section2.4.1.2, the length and time scales are built up from the turbulent kinetic energy k anddissipation rate of turbulent energy ε.

Horizontal turbulence models

Depending on the characteristics of the flow, horizontal turbulence may be modeled in one ofthe following ways:

Constant viscosity coefficientIn estuaries and coastal seas the large-scale flow patterns are usually determined bytidal forcing, the baroclinic pressure gradient, wind and bottom friction, whereas thehorizontal turbulent stresses have little effect. Hence, for far field calculations the use

34

Page 35: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 2. Shallow water flow model

of a horizontal eddy-viscosity model has a negligible role. However, the dispersionterms, which are due to vertical non-uniformities of the mean-flow velocities, have to beadded to the momentum equations. These dispersion terms are usually modelled with aconstant horizontal eddy viscosity coefficient.

Horizontal large eddy simulation (HLES)The effect of turbulence is that energy dissipation is under-estimated on the grid, becausethe sub-scale variations are ignored in the calculation of viscosity. The (eddy) viscositycoefficient νh is therefore chosen larger in turbulent flows than the molecular viscosityνmol.In certain cases, the larger turbulent eddies are resolved on the grid. The turbulencemodel should only account for energy dissipation in the smaller (sub-grid) eddies. Asthe grid is refined, the the (eddy) viscosity coefficient νh is reduced.Such a model is presented in section 2.4.2.2.

Horizontal k − ε modelFor near field flows, horizontal large-scale eddies generated by lateral shear may havea significant role in horizontal mixing. Examples are mixing layers developing at har-bour entrances, along groyne fields and flood planes, separation flows, wakes and jets,flows near discharges and in nearshore region. The horizontal exchange of turbulent mo-mentum needs to be modelled properly, since, a constant value for the horizontal eddyviscosity is too crude as an assumption for such near field predictions.It is assumed that horizontal turbulence consists of horizontal 2D eddies and 3D turbu-lence [74]:

νth = νt2D + νv (2.75)

In the horizontal k−εmodel of TRIWAQ, the 3D part νv is predicted by a 3D turbulencemodel, whereas the 2D part νt2D is computed using a depth-averaged k − ε model. Thismodel will be discussed in Section 2.4.2.3.

Apart from the eddy viscosities νv and νh, the eddy diffusivities Dv and Dh are needed in thesimulation of the flow. The eddy diffusivities are assumed to be proportional to the eddy viscosity.

The vertical eddy diffusivity is then given by

Dv =νvσc

(2.76)

where σc is the turbulent Prandtl or Schmidt number for constituent c. In most cases this Prandtl/-Schmidt number is constant. For the transport of salinity, σc is set to 0.5. It should be mentionedhowever that buoyancy affects the value of σc.

In direct analogy to the horizontal eddy viscosity, the horizontal eddy diffusivity of a constituent isrepresented by the summation of 2D and 3D eddy diffusivities:

Dth = Dt

2D +Dv, with Dt2D =

νt2Dσc

. (2.77)

Version 3.17, November 2016 35

Page 36: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

2.4.1 Models for vertical turbulence

2.4.1.1 An algebraic turbulence model

The simplest of all turbulence models are known as algebraic models. These models do not ac-count for transport and history effects of turbulence. This shortcoming is not serious as long as theturbulence is in a local state of equilibrium, which means that, at each point in the flow, turbulentenergy is dissipated at the same rate as it is produced, so that there can be no influence of turbulenceproduction at other points in the flow or at earlier times. An algebraic model that will be used inTRIWAQ is based on the Kolmogorov-Prandtl relation:

νv = c′µ√kL (2.78)

where L is a specific length scale and c′µ is an empirical constant. Details may be found in [54].According to Uittenbogaard et al. [74], c′µ = 0.58. The length scale L, which depends on the flowgeometry, needs to be prescribed. The following algebraic expression for L suitable for hydraulicapplications will be used [4]:

L = κ(z + d)

√1− z + d

H(2.79)

with κ the Von Kármán constant (≈ 0.41). Hence, at the bottom and free surface the length scaleequals zero. Uittenbogaard et al. [74] proposed the following expression for k:

k =1√cµ

(1− z + d

H

)(ub∗)

2 +z + d

H(uw∗ )2

(2.80)

where ub∗ =√|τb|/ρ and uw∗ =

√|τw|/ρ are the friction velocities at the bottom and free surface,

respectively, whereas τb and τw are bottom and wind stresses, respectively. Moreover, cµ is a closureconstant of which the value equals 0.09 (see Section 2.4.1.2 ). The magnitude of the wind stressis given in (7.15). Furthermore, the bottom friction velocity ub∗ will be implemented in a specialmanner as given in Section 7.3.2. In absence of wind (uw∗ = 0), substitution of (2.79) and (2.80)in (2.78) gives a parabolic eddy viscosity profile across the total water depth and its maximum islocated at half the depth.

The buoyancy forces have been found to influence the length scale distribution significantly. Em-pirical relations were developed to account for the influence of buoyancy on the length scale. Thebuoyancy effect is characterised by the gradient Richardson number

Ri =−gρ∂ρ∂z(

∂u∂z

)2+(∂v∂z

)2 (2.81)

representing the ratio of gravity to inertial forces [59]. For stable stratification (Ri > 0) the lengthscale L must be decreased. Uittenbogaard et al. [74] suggest the following formulae:

L

L0

= exp(−2.3Ri) (2.82)

where L0 is the length scale distribution in the corresponding non-buoyant flow (i.e. Ri = 0). Forunstable conditions (Ri< 0), in which vertical exchanges enhance and thus implying an enlargementof the length scale, the formula

L

L0

= (1− 14Ri )−1/4 (2.83)

36

Page 37: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 2. Shallow water flow model

is commonly used (see also [54]). Buoyancy also affects the value of the Prandtl/Schmidt numberσc, so we need an empirical relation to account for this. For stable stratification, the followingMunk-Anderson formula will be used [54]:

σcσc

=(1 + 3.33Ri )1.5

(1 + 10Ri )0.5 , Ri > 0 (2.84)

with σc0 the Prandtl/Schmidt number under non-buoyant conditions. For unstable flow no dampingoccurs, i.e. σc = σc0 for Ri < 0. In (2.84) the default values 3.33, 1.5, 10 and 0.5 are used. Theseparameters may be changed by the user, e.g. by way of calibration. It should be mentioned that thealgebraic model should only be applied for weakly stratified flow (Ri ≤ 0.25). Further details canbe found in Uittenbogaard et al. [74].

2.4.1.2 The k-ε model and its variants

Starting from the Navier-Stokes equations and using the Reynolds decomposition, it is possible tofind an exact equation for k. It contains some unknown correlations which are replaced by knownterms using some specific closure approximations. Details can be found in [54]. The resultingtransport equation for k in Cartesian coordinates is

∂k

∂t+∂ uα k

∂ xα− ∂

∂ xα

(νtσk

∂k

∂ xα

)= Pk +Bk−ε (2.85)

where Pk is the production of turbulent energy, given by

Pk = νt

(∂ uα∂ xβ

+∂ uβ∂ xα

)∂ uα∂ xβ

(2.86)

and ε is the dissipation rate of turbulent energy per unit mass and Bk is the buoyancy term, whichrepresents an exchange between turbulent energy and potential energy, defined by:

Bk = δα3

νtσc

g

ρ0

∂ρ

∂ xα= −δα3

νtσcN2 (2.87)

with N2 the so-called Brunt-Väisällä or buoyancy frequency. In stable stratification (N2 > 0), thebuoyancy term is negative so that turbulence is damped while the potential energy increases. Inunstable stratification, turbulent energy is produced at the expense of potential energy. Furthermore,σk is a closure constant.

On dimensional grounds, the length scale is determined from

` ∼ k3/2

ε(2.88)

from which we deduce that

νt = cµk2

ε(2.89)

according to (2.74). Note that νt in vertical direction equals νv. For ε there is an exact equation.This equation includes a large number of very complex and unknown correlations. Hence, many

Version 3.17, November 2016 37

Page 38: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

closure approximations are needed. The resulted modelled transport equation for ε as stated in theliterature is given by

∂ε

∂t+∂ uα ε

∂ xα− ∂

∂ xα

(νtσε

∂ε

∂ xα

)=ε

k(cε1 [Pk +(1− cε3)Bk]− cε2 ε) (2.90)

where σε, cε1, cε2 and cε3 are closure constants. Together with the k-equation (2.85) and the eddyviscosity expression (2.89) it forms the standard k-εmodel. This model can account for the transportand history effects of turbulence. Furthermore, the k-ε model has better physical foundations toincorporate the influence of buoyancy. Yet, no damping function for the Prandtl/Schmidt numberσc for constituent c is used.

In case of non-stratified flows, the k-ε model contains five closure constants2 given by

cµ = 0.09, cε1 = 1.44, cε2 = 1.92, σk = 1.0, σε = 1.3 (2.91)

The values of these constants, as recommended by [35], are consistent with benchmark experimentsfor equilibrium boundary layers and isotropic turbulence - typically two simplified flow configura-tions used to calibrate turbulence models. These values may be changed by the user. For stratifiedflows, the following extra closure constants are needed [54]:

σc = 0.5, cε3 =

1, if Bk < 0

0, if Bk > 0(2.92)

The above model is only appropriate for modelling high-Reynolds-number flow regions. If flowswith solid boundaries are to be calculated, the model has to be in conjunction with empirical lawsthat connect the wall conditions (e.g. bottom shear stress) to the dependent variables outside theviscous sublayer. This will be discussed in Chapter 7.

The standard k-ε model has its shortcomings in predicting difficult flows involving strong non-equilibrium effects. The model was often found to predict short recirculation zones and flatter flowprofiles. A number of studies have been published using alternative forms of the k-ε model toaccount for non-equilibrium effects. We present two alternative forms of the k-ε model.

The RNG k − ε model

A version of the k-ε model has been derived based on a renormalization group (RNG) method [96].One major difference between RNG and standard model lies in the modification of production ofdissipation term to account for large strain rates, so as to increase the rate of dissipation and thuslower the level of turbulent viscosity. It was reported that this RNG based model yields substantiallybetter predictions than the standard one for turbulent flow over a backward facing step - a standardtest case used to benchmark the performance of turbulence models in separated flows. However, themodification is highly pragmatic in nature and does not constitute a general modelling framework.This model is essentially the same as the standard k − ε model but with different closure constants.These are given by

cµ = 0.085, cε1 = 1.42−η(1− η

η0)

1+γ η3 , cε2 = 1.68,

σk = 0.7179, σε = 0.7179

(2.93)

2 We have made an implicit assumption that "closure constants" are constants.

38

Page 39: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 2. Shallow water flow model

with

γ = 0.012, η0 = 4.38, η =

√Pkcµ ε

(2.94)

In above, η is the parameter characterizing the turbulence equilibrium state.

The extended k − ε model

Earlier, Chen and Kim [10] presented an extended model who argued that the modification, whichlooks different compared to the RNG, in their model gave rise to drastically improved results thanthe standard k-ε model. The rationale behind this modification is that in addition to the turbulencetime scale k/ε, there is a further time scale, the so-called production range time scale ρk/Pk, whichcharacterizes the response of ε to the mean strain present in the flow. It is shown in [22] that theoriginal version of the extended model produce significantly wrong solutions - a deficiency thatis traced to the Chen and Kim’s recommended values of the closure constants. Haroutunian [22]has tuned some of these closure constants to improve the predictive capability of the model. Thenewest version of the extended model, which has the same form as the standard model, contains thefollowing closure constants:

cµ = 0.09, cε1 = 1.35 + 0.05 cµ η2, cε2 = 1.9,

σk = 0.75, σε = 1.15(2.95)

The extended model gives predictions similar to standard model for turbulent flows which are inequilibrium. However, in non-equilibrium flows the model predicts higher levels of ε and conse-quently lower levels if k; the net effect is a decrease in the eddy viscosity νt. The model is thereforeless diffusive than the standard model in non-equilibrium flows.

The choice of a k-ε model in hydraulic applications

A large number of turbulent flows (industrial as well as hydraulic) have been predicted with the k-εmodel with the same set of closure constants as given (2.91), but for non-equilibrium flows someof the constants have to be replaced by functions of a equilibrium-state parameter. Moreover, forrecirculation flows the agreements with experiments was sometimes found to be only moderate.Recirculation and also separation and reattachement are features of considerable practical relevancein hydraulics, since they appear in many situations as for example in groynes, harbours, bays, inthe flow around obstacles and sluices. Recirculation can also be caused by discharges and by strat-ification. In those cases where satisfactorily predictions could not be obtained with the standardconstants (2.91), the sets of constants given in (2.93) and (2.95) as first and second choices, respec-tively, should be applied.

An example is the turbulent flow over a dune which was calculated by Zijlema [97] with the RNGvariant. The main features such as water level and velocities are considerable well predicted com-pared to the standard k-ε closure. Furthermore, the shape and the size of recirculation flow ispredicted correctly, qualitatively as well as quantitatively, as is shown by the comparison with theexperimental data.

Based on a sensitivity research for the Zeedelta model it has been concluded that the RNG andextended k-ε models are not really beneficial for large scale TRIWAQ models. The standard k-ε model has also been tested most widely. For modelling small scale flows the variants may bebeneficial, particularly where local effects such as recirculation occur. Therefore it has been decided

Version 3.17, November 2016 39

Page 40: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

to restrict use of the alternative models to small scale flows, in which the non-hydrostatic option ofTRIWAQ is used (see Section 2.5).

2.4.1.3 The adapted formulation of the k-ε model used in TRIWAQ

In [19] a more robust formulation of the k-ε model has been presented. To receive this formulationthe following assumptions are made:

1. The production and dissipation rates of turbulent energy and the buoyancy are dominatedprocesses. Hence, the mainly dictate the level of turbulent energy.

2. Since the horizontal length scales are relatively larger than the vertical ones, it is very impor-tant to evaluate the vertical transport mechanism accurately. However, in vertical direction,diffusion is more important than advection.

Because of the first assumption, the conservation of k and ε is less important. Hence, the equationswill be written in non-conservation form that also facilitates discretization of the advection terms.Moreover, due to the second assumption, the horizontal velocity gradients in the production term(2.86) and the curvature terms will be neglected. With the above considerations the turbulenceequations that will be solved in TRIWAQ are as follows:

∂k

∂t+ u

∂k

∂x+ v

∂k

∂y+ ω

∂k

∂z=

∂z(νvσk

∂k

∂z) + Pk +Bk−ε (2.96)

∂ε

∂t+ u

∂ε

∂x+ v

∂ε

∂y+ ω

∂ε

∂z=

∂z(νvσε

∂ε

∂z) +

ε

k(cε1[Pk +(1− cε3)Bk]− cε2 ε) (2.97)

with

νv = cµk2

ε(2.98)

and

Pk = νv

[(∂u

∂z

)2

+

(∂v

∂z

)2]

(2.99)

and

Bk =νvσc

g

ρ

∂ρ

∂z(2.100)

Note that the vertical velocity w has been replaced by the relative vertical velocity ω.

2.4.2 Models for horizontal turbulence

2.4.2.1 An algebraic turbulence model for breaking waves

A simple algebraic turbulence model was proposed by Stive and Wind for the calculation of breakingwaves due to shoaling [67, 45]. The assumption is made that turbulence is due to wave breaking

40

Page 41: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 2. Shallow water flow model

only. The effect is a local increase of momentum flux, which leads to energy dissipation and astabilization of the wave front. The model utilizes the product of the phase velocity and waterdepth:

νt = CvH√gd (2.101)

Here Cv is an empirical constant, typically in the range of 10−4 to 10−2.

2.4.2.2 Horizontal large eddy simulation (HLES)

The model is based on theoretical considerations presented by Uittenbogaard [72] and summarisedby Van Vossen [75].

In horizontal large eddy simulation, the eddy viscosity coefficient νh is given as the sum of fourterms:

νh = νh0 + νmol + νElder + νxx, (2.102)

where the different terms have the following names:

νh0 user-given (minimum) value for horizontal viscosity coefficient [m2/s]νmol molecular viscosity (user-given) [m2/s]νElder Elder-viscosity [m2/s]νxx sub-grid eddy viscosity [m2/s]

The Elder and sub-grid eddy viscosities are calculated from the flow. First, the Elder viscosity,which is a simplified form of the vertical viscosity coefficient found in (2.78), is given by

νElder =1

6κ|(ub∗, vb∗)|H, (2.103)

where κ, u∗∗ and H denote:

κ von Kármán constant [0.41], see (2.79)(ub∗, v

b∗) friction velocities at the bottom [m/s]

as discussed near (2.79) and in section 7.3.2H water height [m]

Next, the sub-grid eddy viscosity νxx is given by

νxx =3 g

4C22D

|(u, v)|H k2

s

√1 +

(4 γ σT C2

2DS∗H

3 g |(u, v)|

)2

− 1

(2.104)

where the following notations are used:

ks wave number magnitude of the truncating wave length [1/m]γ empirical coefficient [ ](S∗)2 sum of strain rates squared [1/s2]σT Prandtl-Schmidt number [0.7]g gravitational acceleration [9.8m/s2]C2D depth-averaged Chézy coefficient [

√m/s]

(u, v) depth-averaged flow velocity vector [m/s]

The terms S∗, ks and γ will be discussed below.

Version 3.17, November 2016 41

Page 42: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

Coefficient γ

The coefficient γ, used in (2.104), is given by

γ = I∞

√1− α−2

2nD. (2.105)

where nD is the type of turbulence being modeled (nD = 2: 2D horizontal, nD = 3: 3Dturbulence), α = 5/3 is the slope in the log-log spectrum of the energy density, and I∞ =0.844 is an empirical constant.

Truncating wave number

The effect of turbulence is that energy dissipation is under-estimated on the grid, because thesub-scale variations are ignored in the calculation of viscosity. The (eddy) viscosity coeffi-cient νh is therefore chosen larger in turbulent flows than the molecular viscosity νmol.

In most numerical schemes, however, there is an opposite effect going on at the same time:numerical viscosity. This is illustrated in Figure 2.3. Long waves (relative to the grid width)are unaffected by numerical viscosity, but the energy in short waves is dissipated.

To avoid using an eddy viscosity which is too large, the numerical viscosity of the numericalmodel should be taken into account. The wave number magnitude of the truncating wavelength ks is the wave number corresponding to the longest waves which are completely dissi-pated by the numerical scheme. It is given by

ks =π flp√∆x∆y

, (2.106)

where ∆x and ∆y are the grid sizes, and flp is a property of the numerical scheme used. Itshould be below but near the value 1.

resolved scales

numerical cut−off

theoretical cut−off

(theoretical) sub−grid scales

numericaldissipation

E(k)

k

Energy Flow

(numerical) sub−grid scales

k π∆

=x x

Figure 2.3: Numerical viscosity causes the energy of short waves to be dissipated.

Sum of strain rates squared

42

Page 43: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 2. Shallow water flow model

The sum of strain rates squared, (S∗)2, is found by adding up the following squares of strainrates:

(S∗)2 = 2

(∂u∗

∂x

)2

+ 2

(∂v∗

∂y

)2

+

(∂u∗

∂y+∂v∗

∂x

)2

, (2.107)

where (u∗, v∗) = (u − u, v − v) is the fluctuating flow velocity vector. It is the differencebetween the depth averaged velocity (u, v) and the depth and time averaged velocity (u, v),which is the solution of the equation

∂t(u, v) =

1

τ(u− u, v − v), (2.108)

where τ is the user-specified relaxation time, typically twice the period of the largest eddies(unit [s]).

When you apply the HLES-model, the following considerations are of importance:

• For steady flows (u∗, v∗) = 0 holds so that S∗ = 0 and consequently the sub-grid eddyviscosity νxx = 0.

The absence of (eddy) viscosity may cause the steady flow to become unstable. When thishappens, the flow will no longer be steady, so the eddy viscosity will develop.

• Towards drying conditions, the local water depth H decreases to nearly zero which then re-duces νxx to zero, see (2.104).

At drying, the time filtered velocity components (u, v) are set to zero.

• In principle, turbulence fluctuations with appropriate time and length scales should be super-imposed on the mean open boundaries conditions on inflow. Presently, this is not the case inWAQUA.

• The horizontal eddy viscosity and eddy diffusivity are limited based on the stability criterionsas discussed in the introduction of Chapter 5 and Section 5.2.

2.4.2.3 A depth-averaged k-ε model

In Section 2.2.3 it is assumed that the horizontal viscosity νh is constant both in space and time.As a consequence, the horizontal viscous terms in the momentum equations are represented by aLaplace operator (cf. (2.44)). To evaluate horizontal mixing process of momentum properly, thefollowing terms need to be added to the right-hand side of the layer-averaged u- and v-momentumequations (2.44), respectively:

∂τ11

∂x+∂τ12

∂y(2.109)

and∂τ21

∂x+∂τ22

∂y(2.110)

Version 3.17, November 2016 43

Page 44: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

where ταβ is the horizontal Reynold stress tensor as given by:

τ11 = 2νth∂uk∂x

τ12 = τ21 = νth

(∂uk∂y

+ ∂vk∂x

)τ22 = 2νth

∂vk∂y

(2.111)

where νth follows from (2.75). It should be noted that the effective horizontal eddy viscosity includesboth dispersion (νh) and turbulence (νth) contributions. However, the Reynolds stresses relatedto νh (i.e. Laplace operator) and νth, respectively, are implemented separately and thus, upwardcompatibility in TRIWAQ is maintained.

A number of papers have been published in which a two-length-scale k-ε model has been proposedthat facilitate separating 2D turbulence from 3D turbulence and hence, to account for non-isotropiccharacter of turbulence in shallow water ([3], [6]). This two-length-scale model consists of twosingle-length-scale k-ε models which calculate the horizontal and vertical eddy viscosities, respec-tively. In this way, two distinct characteristic length scales are computed. The vertical eddy viscosityνv is computed by the standard k-ε model in which the production of turbulent energy is assumed tobe dependent only on vertical velocity gradients. This model has been discussed in Section 2.4.1.3.In this section, a depth-averaged k−εmodel is presented that determined the 2D eddy viscosity νt2Das given in (2.75). In this model the production of depth-averaged turbulent energy solely dependsupon horizontal velocity gradients.

The 2D eddy viscosity is evaluated as follows:

νt2D = cµk2

ε(2.112)

where k and ε are the depth-averaged turbulent kinetic energy and the dissipation rate of turbulentenergy, respectively, and are determined from the following depth-averaged transport equations:

∂k

∂t+ U

∂k

∂x+ V

∂k

∂y− 1

H

∂x

(Hνt2Dσk

∂k

∂x

)− 1

H

∂y

(Hνt2Dσk

∂k

∂y

)= Pk − ε (2.113)

∂ε

∂t+ U

∂ε

∂x+ V

∂ε

∂y− 1

H

∂x

(Hνt2Dσε

∂ε

∂x

)− 1

H

∂y

(Hνt2Dσε

∂ε

∂y

)=ε

k

(cε1Pk − cε2ε

)(2.114)

where

Pk = νt2D

(2

(∂U

∂x

)2

+ 2

(∂V

∂y

)2

+

(∂U

∂y+∂V

∂x

)2)

(2.115)

is the production of k due to interaction of turbulent stresses with horizontal depth-averaged velocitygradients. The closure constants as given in (2.112)-(2.114) are assumed to be equal to the ones ofthe standard vertical k-ε model, cf. (2.91). These values, however, have been derived for flows thatdeviate from circumstances in which the 2D turbulence plays a role. So precautions must be taken.For this, the user may have the opportunity to change one or more of these closure constants for thedepth-averaged model.

The quantities k and ε are not strictly depth-averaged values since, all terms originating from verti-cal non-uniformities of turbulent quantities k and ε, due to depth-averaging of the three-dimensional

44

Page 45: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 2. Shallow water flow model

equations (2.90) and (2.95), have been neglected. Moreover, assuming turbulence to be strictly two-dimensional rather than quasi two-dimensional, the transfer of energy from the large-scale structuresto the small-scale 3D turbulence (so-called energy cascade process), due to the vortex stretchingmechanism, has also been neglected [6]. Therefore, the different associated length scales are inde-pendent, although a coupling exists via the mean-flow equations.

Finally, it should be mentioned that the presented depth-averaged model does not bridge the gapbetween the horizontal turbulent eddies and the grid resolution. Instead, a subgrid-scale modelshould be employed. The two-length-scale model requires a sufficiently fine horizontal grid toresolve the horizontal shear, which generates the 2D turbulence.

The choice of a depth-averaged k − ε model in hydraulic applications

As described in Section 2.4.1.2 above, the standard k − ε model has its shortcomings in predictingdifficult flows involving strong non-equilibrium effects. Therefore the RNG- and extended variantsas given by equations (2.93) and (2.95) have been implemented for the depth-averaged turbulencemodel too.

We may conclude that it is advised to start with the standard depth-averaged k − ε model in theTRIWAQ applications, since it has been tested most widely. However, when this model does notshow encouraging results, particularly where local effects such as recirculation occur, applicationof RNG or extended k − ε model is recommended.

2.4.2.4 Large Eddy Simulation

2.5 Simulation of non-hydrostatic flows

The previous sections consider flow and transport in shallow water. In most cases the hydrostaticpressure assumption can be used, see Section 2.2.2. In other cases non-hydrostatic effects should beincorporated in the simulation.

The main difference between the equations for non-hydrostatic flows and those for the hydrostaticcase is that in the former ones the momentum equation (2.15) for the z-direction is retained, insteadof being replaced by the hydrostatic pressure of equation (2.16). The complete set of equationsthen consists of the three momentum equations and the incompressibility condition (2.12), withunknowns u, v, w, p and ζ . Using equation (2.47) the pressure p is splitted into the hydrostatic partand the non-hydrostatic pressure q.

In TRIWAQ the non-hydrostatic effects are modelled using a pressure correction technique [99].This method consists of a predictor-corrector procedure between the velocity and pressure fields.

The approach is as follows. Firstly, the location of the free surface ζ and an estimate of the velocityfield is obtained by means of solving the depth averaged continuity equation and the momentumequations using the non-hydrostatic pressure q at the preceding time level. The resulting flow veloc-ities are called “intermediate” and will not be divergence-free. Secondly, the pressure correction dq,i.e. the difference between the new and old non-hydrostatic pressure q, is computed by means of so-ving the discretized Poisson equation. This equation is obtained by taking the divergence of the dis-cretized momentum equations and subsequently employing the incompressibility constraint. Lastly,through the pressure correction, the intermediate velocity is corrected, resulting in a divergence-free

Version 3.17, November 2016 45

Page 46: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

velocity field.

This approach is further described with the time-integration in Chapter 5.

The w-momentum equation that is used in non-hydrostatic computations reads:

w

∂t+ u

∂w

∂x+ v

∂w

∂y+ w

∂w

∂z+∂q

∂z− νt

(∂2u

∂x2+∂2v

∂y2+∂2w

∂z2

)= 0 (2.116)

2.6 Equations governing shallow water flow in curvilinear coor-dinates

In the previous sections, the shallow water and transport equations are formulated in Cartesiancoordinates. Discretization of the equations on an equidistant rectangular grid has some drawbacks:

• the poor representation of coast lines, river bends, navigation channels, and

• no grid refinement possible.

Therefore, especially for river engineering applications, a boundary-fitted curvilinear coordinatetransformation was introduced in WAQUA [94]. Curvilinear grids make it possible to follow thehorizontal geometry smoothly. The transformation introduces local grid refinement, e.g. to use afine grid in the summer bed and a more coarse grid in the winter bed. On a rectilinear grid the deepchannels are more often aligned at 45 degrees to the computational grid, which introduces artificialwall friction, see [91].

In this section, we shall deal with the computational modelling of shallow flows in irregular hor-izontal planes. Therefore, we formulate the layer-averaged continuity, momentum, transport andturbulence equations in boundary-fitted curvilinear horizontal coordinates. However, there are manyoptions with respect to the velocity components and the form of the equations. Although formallyequivalent to each other, they possess considerable differences from a numerical point of view.An overview of various options with their pros and cons is presented in [13]. In TRIWAQ thecoordinate-invariant formulation of equations employing orthogonal coordinates with transformedvelocity components, which have the same dimension as the velocity vector itself (i.e. m/s), isadopted. In this section we only present the equations in general coordinates. Theoretical back-ground of the coordinate transformation and the derivation of the transformed equations can befound in Appendix B.

The mapping from Cartesian to computational horizontal plane is given byx = x(ξ, η)

y = y(ξ, η)(2.117)

In the sequel we shall use the following notations (see also [94]): ξ = (ξ, η) is the orthogonalcoordinate system corresponding to the computational domain and the quantities

gξξ =

(∂x

∂ξ

)2

+

(∂y

∂ξ

)2

, gηη =

(∂x

∂η

)2

+

(∂y

∂η

)2

(2.118)

46

Page 47: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 2. Shallow water flow model

are the covariant metric tensors (see Appendix B). The mapping (2.117) is often unknown before-hand. Hence, the mapping has to be generated numerically. For details and discussion on thedevelopment of efficient methods for generating computational grids, we refer to [71]. The curvi-linear grid, which is the output of a grid generator, e.g. Delft3D-RGFGRID [12], must be givento the TRIWAQ system as input file. Furthermore, the mapping is assumed to be regular, i.e. theJacobian of the transformation, given by

√g∗ =

√gξξ gηη (2.119)

does not vanish.

We consider the layer-averaged and depth-averaged continuity equations (2.25) and (2.27). Using(B.32), these equations in general orthogonal coordinates are given by

∂ hk∂t

+1√g∗

∂ξ(√gηη hk uk) +

1√g∗

∂η(√gξξ hk vk) + ωk−1−ωk = 0 (2.120)

and

∂ζ

∂t+

1√g∗

∂ξ(√gηη

K∑k=1

hk uk) +1√g∗

∂η(√gξξ

K∑k=1

hk vk) = 0 (2.121)

where this time uk and vk are the velocity components in ξ- and η-directions, respectively, i.e.,

uk ←1√gξξ

(uk∂x

∂ξ+ vk

∂y

∂ξ), vk ←

1√gηη

(uk∂x

∂η+ vk

∂y

∂η) (2.122)

These components are perpendicular to the grid cell faces and have the same dimensions as theirCartesian counterparts (see Appendix B). Note we deviate from the notations as employed in Ap-pendix B.

Next, with the aid of (B.28) and (B.33) the u-momentum equation (2.44) is transformed as follows:

∂ uk∂t

+ uk√gξξ∂ uk∂ξ

+ vk√gηη

∂ uk∂η

+ uk vk√g∗

∂√gξξ∂η− v2

k√g∗

∂√gηη∂ξ

+

ωk−1

hk(u(zk−1)− uk)− ωk

hk(u(zk)− uk) = − g√gξξ

∂ζ∂ξ− 1√gξξ

∂q∂ξ− PG(ξ) +

1√gξξ∂ F 1

∂ξ+ 1√

gηη∂ F 2

∂η+ νv

∂u∂z

∣∣zk−1

zk

1hk

+ f vk

(2.123)

with

PG(ξ) =g

ρk√gξξ

1

2hk∂ ρk∂ξ

+k−1∑j=1

(hj∂ ρj∂ξ

+ (ρj − ρk)∂ hj∂ξ

)(2.124)

Version 3.17, November 2016 47

Page 48: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

andF 1 = νh√

g∗( ∂∂ξ

(uk√gηη) + ∂

∂η(vk√gξξ))

F 2 = νh√g∗

( ∂∂ξ

(vk√gηη)− ∂

∂η(uk√gξξ))

(2.125)

To obtain (2.124), equation (B.25) has been applied to (2.55). The terms with vk in F 1 and F 2

concern cross-derivatives related to the curvature of the grid. These terms are much smaller than theterms with uk. The discretization of the cross-derivatives has led to artificial effects in river models[81, 87]. Therefore they are neglected in the current version of WAQUA/TRIWAQ. The transformedv-momentum equation is obtained by interchanging the uk- and vk-velocities and the independentvariables ξ and η. Also, the Coriolis force term changes in sign. The transformed v-momentumequation is given by

∂ vk∂t

+ uk√gξξ∂ vk∂ξ

+ vk√gηη

∂ vk∂η

+ uk vk√g∗

∂√gηη∂ξ− u2

k√g∗

∂√gξξ∂η

+

ωk−1

hk(v(zk−1)− vk)− ωk

hk(v(zk)− vk) = − g√

gηη

∂ζ∂η− 1√

gηη

∂q∂η− PG(η) +

1√gηη

∂ F 1

∂η+ 1√gξξ

∂ F 2

∂ξ+ νv

∂v∂z

∣∣zk−1

zk

1hk− f uk

(2.126)

Note that PG(η) is simply obtained by replacing ξ by η in (2.124).

The invariant-coordinate formulation of the transport equation (2.73) is obtained by applying theexpressions (B.25) and (B.32):

∂ hk ck∂t

+ 1√g∗

∂√gηη hk uk ck

∂ξ+ 1√

g∗

∂√gξξ hk vk ck

∂η+ ωk−1 c(zk−1)− ωk c(zk) =

1√g∗

∂∂ξ

(Dh hk

√gηηgξξ

∂ ck∂ξ

)+ 1√

g∗∂∂η

(Dh hk

√gξξgηη

∂ ck∂η

)+ Dv

∂c∂z′

∣∣zk−1

zk+hk(Sc )k +

− 1√g∗

∂∂ξ

(Dh hk

√gηηgξξ

∂ zk∂ξ

∂c∂z′

(zk−1/2))− 1√

g∗∂∂η

(Dh hk

√gξξgηη

∂ zk∂η

∂c∂z′

(zk−1/2))

+

− 1gξξDh

∂c∂ξ

∂z∂ξ

∣∣∣zk−1

zk− 1gηη

Dh∂c∂η

∂z∂η

∣∣∣zk−1

zk+ 1gξξDh(

∂z∂ξ

)2 ∂c∂z′

∣∣zk−1

zk+ 1gηη

Dh(∂z∂η

)2 ∂c∂z′

∣∣zk−1

zk

(2.127)

Note that the primes in (2.73) have been neglected, but this is of no consequence.

A similar procedure is applied to the k-ε model (2.96)-(2.97). Using (B.26), we have the invariantformulation of the k-ε equations:

∂k

∂t+

u√gξξ

∂k

∂ξ+

v√gηη

∂k

∂η+ ω

∂k

∂z=

∂z(νvσk

∂k

∂z) + Pk +Bk−ε (2.128)

48

Page 49: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 2. Shallow water flow model

∂ε

∂t+

u√gξξ

∂ε

∂ξ+

v√gηη

∂ε

∂η+ ω

∂ε

∂z=

∂z(νvσε

∂ε

∂z) +

ε

k(cε1[Pk +(1− cε3)Bk]− cε2 ε) (2.129)

Note that u and v are the transformed velocity components.

Finally, by means of transformation formula’s (B.25), (B.32) and (B.38), the transformed Reynoldsstresses (2.98), the invariant form of the derivatives of the Reynolds stresses (2.96) and (2.97) tobe added to the momentum equations (2.112) and (2.115), respectively, the transformed horizontalproduction term (2.102) and that of the depth-averaged k − ε model (2.100)-(2.101) are given by,respectively,

τ11 =2νth√gξξ

∂uk∂ξ

τ12 = τ21 = νth

(1√gξξ

∂vk∂ξ

+ 1√gηη

∂uk∂η

)τ22 =

2νth√gηη

∂vk∂η

(2.130)

and

1√gξξ

∂τ11

∂ξ+

1√gηη

∂τ12

∂η+ 2

τ12√g∗

∂√gξξ

∂η+

(τ11 − τ22)√g∗

∂√gηη

∂ξ(2.131)

1√gξξ

∂τ21

∂ξ+

1√gηη

∂τ22

∂η+ 2

τ21√g∗

∂√gηη

∂ξ+

(τ22 − τ11)√g∗

∂√gξξ

∂η(2.132)

and

Pk = νt2D

(2

(1√gξξ

∂U

∂ξ

)2

+ 2

(1√gηη

∂V

∂η

)2

+

(1√gηη

∂U

∂η+

1√gξξ

∂V

∂ξ

)2)

(2.133)

and

∂ek∂t

+ U√gξξ

∂ek∂ξ

+ V√gηη

∂ek∂η− 1√

g∗H∂∂ξ

(H√gηη√gξξ

νt2Dσk

∂ek∂ξ

)− 1√

g∗H∂∂η

(H√gξξ√gηη

νh2Dσk

∂ek∂η

)= Pk − ε (2.134)

∂eε∂t

+ U√gξξ

∂eε∂ξ

+ V√gηη

∂eε∂η− 1√

g∗H∂∂ξ

(H√gηη√gξξ

νt2Dσε

∂eε∂ξ

)− 1√

g∗H∂∂η

(H√gξξ√gηη

νt2Dσε

∂eε∂η

)=

eεek(cε1Pk − cε2ε

) (2.135)

The space discretization of the system (2.120)-(2.135) is considered in the next chapter.

2.7 Model equations in spherical coordinates

When the area to be modelled covers a considerable part of the globe, the assumption of a flat(rectilinear or curvilinear) model is no longer valid. For such a model area WAQUA offers thepossibility to apply a spherical coordinate system, see Figure 2.4.

Version 3.17, November 2016 49

Page 50: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

Figure 2.4: Spherical coordinates grid

The grid size is no longer defined in meters but in degrees. Users are advised to choose for sphericalgrids with an n-axes pointing North and an m-axes pointing East. Spherical grids with m- andn-axes not coinciding with longitude and latitude are possible but not convenient in use.

The governing equations written in spherical coordinates for a 2D simulation are given by:

∂ζ

∂t+

1

R cosφ

∂λ(HU) +

1

R cosφ

∂φ(HV cosφ) = 0 (2.136)

∂U

∂t+

U

R cosφ

∂U

∂λ+V

R

∂U

∂φ− UV tanφ

R− 2ΩV sinφ− g

R cosφ

∂ζ

∂λ

+gU

√U2 +V 2

C22DH

=ρair CdWλ

√W 2λ +W 2

φ

ρ0H− 1ρ0R cosφ

∂ Patm∂λ

(2.137)

∂V

∂t+

U

R cosφ

∂V

∂λ+V

R

∂V

∂φ+U2 tanφ

R+ 2ΩU sinφ+

g

R

∂ζ

∂φ

+gV

√U2 +V 2

C22DH

=ρair CdWφ

√W 2λ +W 2

φ

ρ0H− 1ρ0R

∂ Patm∂φ

(2.138)

with R the radius of the earth.

The depth-averaged transport equation for dissolved constituents reads:

50

Page 51: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 2. Shallow water flow model

∂t(HC) +

1

R cosφ

∂λ(HUC) +

1

R cosφ

∂φ(HV C cosφ) =

1

R cosφ

∂λ

(H(DH +Ddispλ

)1

R cosφ

∂C

∂λ

)(2.139)

+1

R cosφ

∂φ

(H(DH +Ddispφ

)1

R

∂C

∂φcosφ

)+ S

The equations in spherical coordinates are a special case of the equations in orthogonal curvilinearcoordinates. Define a fixed Cartesian frame through the origin of the earth, then the sphericalcoordinates of a point on the earth’s surface are given by:

(x, y, z)T = (λ, φ,R)T withx = R · cosφ · cosλy = R · cosφ · sinλz = R · sinφ

(2.140)

Replacing in equation (2.117) ξ and η by:

ξ = λ, η = φ,√gξξ =

√gλλ,

√gηη =

√gφφ (2.141)

yields equations (2.136,2.137,2.138).

2.8 Barriers and sluices

In WAQUA/TRIWAQ the user may define hydraulic structures (sluices or barriers) in certain gridpoints. The flow through the structure is not resolved on the grid. Upstream of a structure, the flowis accelerated due to contraction and downstream the flow is decelerated due to expansion. Theexpansion introduces an important energy loss.

The mathematical formulation for barriers as used in WAQUA/TRIWAQ is based on the work ofLeendertse. Leendertse situated a barrier at a waterlevel point. His approach was adapted, see[34], [92] and [82]. In WAQUA/TRIWAQ barriers are situated at velocity points. The numericalimplementation of barriers in WAQUA/TRIWAQ is described by [82].

In WAQUA/TRIWAQ, the wet cross-section in a barrier point may vary in time. In the verticaldirection, the wet cross section may vary both by the vertical motion of a sill and that of a gate. Inthe horizontal direction, the effective wet width may also vary. U-barriers are located at u-velocitypoints and v-barriers at v-velocity points. Diagonal barriers consist of a combination of a u- and av-barrier. The length of a barrier is assumed to be smaller than one grid cell and is not taken intoaccount (subgrid).

The deceleration of the flow behind a hydraulic structure introduces an important energy loss. In thecase of subcritical flow, the discharge follows from the upstream energy height and the downstreamwater level. The momentum equation can only be correct if an energy loss term is added to accountfor the effects of the barrier. A detailed description of the calculations involved follows below.

In some cases, the flow may become critical at the hydraulic structure. Again, a detailed descriptionof the calculations involved follows below. In such a case of critical flow, the downstream water

Version 3.17, November 2016 51

Page 52: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

level and velocity do not influence the discharge through the structure. Knowing the upstreamenergy level (and the properties of the barrier) is sufficient for the calculation of the discharge.Hence, the critical barrier may be modeled as a E-H relation.

ζ 2

ζz =Hg H =0 ζ 0

E1 ζ 1

E2

d1

H1H2d2

z = −d

z = 0

energy loss ( E)∆Q

BARRIER

z = E

Figure 2.5: Definitions for a barrier where the flow is not restricted by the gate.

E1 ζz =

d1

E2

Hg H =0 ζ 0

d2H2

H1

ζ 1

z = −d

z = 0

energy loss ( E)∆Q

BARRIER

z = E

ζ 2

Figure 2.6: Definitions for a barrier where the flow is restricted by the gate. In the case of criticalflow, the water height H0 is below the gate height Hg, and in the case of subcritical flow it may behigher or lower.

Schematic description of a barrier

The flow through the barrier is illustrated by Figures 2.5 and 2.6. In Figure 2.5, the gate does nottouch the water. Hence, the height Hg of the gate opening has no influence on the flow. There isonly one relevant water level ζ0 inside the barrier.

In Figure 2.6, the flow is restricted by the gate. The maximum flow velocity in the barrier occurswhere the water flows through the gate. The gate-height Hg is a barrier property. In the case ofgate-restricted flow, the water level ζ0 on the downstream side of the gate may be higher than thegate.

52

Page 53: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 2. Shallow water flow model

The following notations are used to describe the flow through the barrier. Their meaning can alsobee seen from the figures. At each of the locations x1 (upstream), x0 (inside the barrier) and x2

(downstream from the barrier), there we have the following 6 variables to describe the flow:

H water height [m]ζ water level measured from the sill [m]E energy measured from the sill [m]U water flow velocity [m/s]Q mass transport (per meter of barrier width) [m2/s]A wet cross section area [m2]

The following symbols refer to known constants:

Hg gate height above the sill [m]d1, d2 bottom depth at different places near the barrier [m]Ag wet cross section area of the gate opening [m2]

Version 3.17, November 2016 53

Page 54: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

Calculations of variables in terms of U and ζ

All the variables can be calculated when the water level ζ and the flow velocity U are known. In thelocations x1 (upstream) and x2, this is done in the following steps:

• Calculation of the wet cross section area from water heights

A1 = H1∆y , A2 = H2∆y. (2.142)

where ∆y is the length of a grid cell.

• Calculation of the energy heights

E1 = ζ1 +U2

1

2g, E2 = ζ2 +

U22

2g. (2.143)

• Calculation of the water height H from the water level ζ

H1 = ζ1 + d1 , H2 = ζ2 + d2. (2.144)

• Calculation of discharge from wet area and flow velocity

Q1 = A1U1/∆y , Q2 = A2U2/∆y, (2.145)

The calculations at the location x0 at the barrier itself are very similar to those at the upstreamand downstream locations. Only the calculation of the wet cross section area from water height isdifferent and depends on the position of the gate with respect to the water level:

• Water level below the gate

When the water level is below the gate (Figure 2.5), it is assumed that the area through whichthe water flows at the barrier is approximated by

A0 = µBH0∆y, (2.146)

where µ is known as the barrier flow coefficient and B is relative width of the opening. Theseparameters are properties of the barrier itself and are specified in the input.

• Gate touching the water

When the gate touches the water (Figure 2.6), the water flows through the gate opening (whichhas the cross section area Ag). After that, the cross section may be considerably larger. It isassumed that the water coming through the gate keeps its high velocity, and that the remainingwater is in no horizontal motion. Hence, the area A0 of the part of the wet cross section wherethe water is in horzontal motion is equal to the area of the gate opening:

A0 = Ag = µBHg∆y. (2.147)

The flow velocity U0 is now equal to the flow velocity Ug in the gate opening itself, even whenthe water height H0 may be (much) larger than the gate height Hg. The flow velocity U0 isthe velocity of the moving water, which is not the depth averaged flow velocity.

54

Page 55: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 2. Shallow water flow model

Approximations and assumptions about barrier flow

The following approximations are made:

• Constant discharge throughout the barrier

It is assumed that the discharge is the same at all the locations near the barrier:

Q1 = Q0 = Q2. (2.148)

• Energy conservation up to the barrier

It is assumed that the upstream energy height E1 is the same as the energy height E0 at thebarrier:

E0 = E1. (2.149)

The downstream energy height E2 is lower than this value, due to the energy loss, which takesplace after the barrier.

Subcritical flow

In the case of subcritical flow, we make one extra assumption. The water level does not changemuch downstream from the barrier:

ζ2 = ζ0. (2.150)

This assumption allows the calculation of the discharge Q0 as a function of the upstream energyheight E1 and the downstream water level ζ2:

• Water level below the gate

When the water level is below the gate (Figure 2.5), the assumptions, approximations anddefinitions (2.143, 2.145, 2.146, 2.149, 2.150) can be combined to produce a direct expressionof the discharge Q0 in terms of the upstream energy level E1 and the downstream water levelζ2:

Q0 = µBζ2

√2g(E1 − ζ2). (2.151)

• Gate touching the water

When the gate touches the water (Figure 2.6), the discharge can be calculated in almost thesame way. Only the cross section of the wet area is calculated according to (2.147) instead of(2.146):

Q0 = µBHg

√2g(E1 − ζ2). (2.152)

The value Q0 may be used directly by WAQUA to model the barrier. The problem in doing so isthat the regular shallow water equations are ignored. The discharge will be only correct if the flowis mostly determined by the presence of the barrier. To process the situation correctly in which the

Version 3.17, November 2016 55

Page 56: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

barrier is not the only relevant aspect of the flow, it is necessary to process the effect of the barrierinto a special term which can be added to the momentum equations.

To do this, the assumptions, approximations and definitions (2.143, 2.145, 2.149, 2.150) are com-bined into the following equation:

gζ2 − ζ1

∆x=U1|U1|2∆x

(1

M2− 1

), (2.153)

where the contraction coefficient M is given by M = A0/A1. Equation (2.153) corresponds to themomentum equation where advection, bottom friction, Coriolis terms etc. are ignored. The right-hand-side is an extra friction-like term, which describes the effect of the barrier. The barrier-effectis very small when the barrier is not important. This is the term which is added to the momentumequation in case of a sub-critical barrier.

Critical flow

When the downstream water level ζ2 is below a critical value, the barrier water level ζ0 is no longerequal to the downstream water level ζ2. Instead, the water will reach a certain level which onlydepends on the upstream energy level E1. Consequently, the discharge Q0 can be calculated fromthe upstream energy height alone, by substituting this critical value of ζ0 for ζ2 in (2.151) or (2.152):

• Water level below the gate

When the water level is below the gate (Figure 2.5), critical flow is characterized by the factthat the flow velocity and the wave propagation speed are identical at the barrier:

U0 =√gH0. (2.154)

This is verified when the critical water level ζ0 is chosen to be

ζ0 =2

3E1. (2.155)

The discharge is given by

Q0 =2

3µBE1

√2g

(E1 −

2

3E1

). (2.156)

• Gate touching the water

When the gate touches the water (Figure 2.6), the critical water level ζ0 is assumed to behalfway the gate opening:

ζ0 =1

2Hg. (2.157)

The discharge is given by

Q0 = µBHg

√2g

(E1 −

1

2Hg

). (2.158)

56

Page 57: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 2. Shallow water flow model

WAQUA enters the critical barrier discharge directly into the flow. In the case of critical flow,the water flow is always dominated by the barrier effect, so a modified momentum equation is notnecessary.

Barrier properties in input

The properties of the barrier, which may be specified in WAQUA’s input, are

The z-coordinates of the sill and the gate;

The relative barrier width B;

The contraction coefficient µ.

To provide extra modelling possibilities, eight different contraction coefficients may be spec-ified, depending on whether the flow is subcritical or critical, whether the water touches thegate, and on the direction of the water flow.

2.8.1 Barrier-Barrier Structures

1

ζ

2

1

z=sill

z=−d

z=

z=sill

z=gate

Figure 2.7: Frontal view of a culvert, which canbe seen as the combination of a narrow barrierwith a low sill and a low gate, on top of a wideone with a high sill and no gate.

2 1

1

ζ

z=sill = gate

z=sill

z=−d

z=

Figure 2.8: Frontal view of a sluice, which canbe seen as a culvert, where the gate of the lowerbarrier corresponds to the sill of the upper bar-rier.

Some hydraulic constructions are more complicated than the barriers described in the previous sec-tion. Two examples are the culvert and sluice structures, shown in Figures 2.7 and 2.8. Suchstructures are modeled as the combination of two barriers, which are located at the same grid point.

When only the bottom one of the barriers in a barrier-barrier structure is submerged, the constructionis no different from a regular barrier and is treated as such by WAQUA.

When both barriers in such a barrier-barrier structure are submerged, WAQUA considers the criti-cal/subcritical status of the top barrier only to determine whether the flow is critical or subcritical. Ifthe flow is subcritical, an energy loss term is entered into the momentum equation to account for theeffects of the barrier-barrier structure. If the flow is critical, WAQUA enters the critical dischargedirectly into the model.

Version 3.17, November 2016 57

Page 58: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

2.9 Weirs

In WAQUA/TRIWAQ the user may define weirs in certain grid points. Weirs are commonly usedstructures in simulation models of rivers to model sudden changes in depths, the representation ofsummer dikes, roads in the winter bed or the border of a sand pit. Also groynes are modelled asweirs. A WAQUA schematization of a Dutch river branch can contain multiple thousands of weirs.A weir may be seen as a special case of a barrier, where there is no gate and the flow width is notrestricted by the barrier (i.e. the relative barrier width is 1.0).

Some weirs, such as groynes, are built to keep the river in its bed for the sake of navigation. Othersare built, for instance, to protect an area behind a tidal weir from salt intrusion. The flow over aweir is not resolved on the computational grid. Upstream of a weir the flow is accelerated due tocontraction and downstream the flow is decelerated due to expansion. The expansion introduces animportant energy loss due to turbulence. The energy loss is dependent on the shape of the crest ofthe weir.

Figure 2.9: Definitions for a diagonal weir

A weir is situated in a u-point or in a v-point. The length of a weir is always one grid space. It isalso possible to define diagonal weirs, see Figure 2.9. A diagonal weir is a combination of a u-weirand a v-weir. The length of a diagonal weir is the computed from the length of the u- and v-weir.Let α be the angle between the weir and the u-direction. A zero value for α corresponds to a v-weir.A diagonal weir gives a better representation of the length of a skew weir than the combination ofseparate u- and v-weirs.

The energy loss due to a weir is described by the loss of energy height ([m]). The energy loss in thedirection perpendicular to the weir is denoted as ∆E. This energy loss is added as an opposing forcein the momentum equation by adding a term −g∆E/∆x to the right hand side of the momentumequation (2.123), resulting in a jump in the waterlevels by ∆E at the location of the weir.

The calculation method for the energy loss depends on the flow condition. In 3D calculations, the

58

Page 59: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 2. Shallow water flow model

calculation method for the energy loss is based on depth averaged quantities. There is a distinctionbetween a subcritical flow condition and a supercritical flow condition. There are two distinctformulations for the energy loss in use in WAQUA:

1. Tabellenboek-model (see Section 2.9.2)

The first model is based on the work of Wijbenga (1990) [93].

After the initial implementation, a number of improvements have been made. Details on theseprojects regarding weirs may be found in [11, 26, 27, 30, 83, 84].

The weir model was designed according to the following principles:

• In critical flow conditionsTo match the theoretical critical flow condition on the crest (flow velocity and wavepropagation speed are the same on the crest).

• In subcritical flow conditions

– A general formulation (2.173) was chosen for the energy loss.– Formulation (2.173) uses the functions f1 and f2. These functions were then con-

structed so that the energy loss corresponded to the measured data in the so called“Tabellenboek [van Rijkswaterstaat]” [55, 78].These data were obtained from laboratory tests with hydraulically smooth weirs,with a fixed ramp on the up and downstream sides.

– No measurements were available for very low flow speeds. Therefore, the Carnot’sformula was combined with (2.173) for low flow speeds.

2. Villemonte model (see Section 2.9.1)

The second available formulation is the formulation proposed by Villemonte [79]. The for-mula has terms for different aspects of the weir’s geometry and for the vegetation on it, morethan the Tabellenboek-formulation. This formulation involves a number of parameters, forwhich realistic values need to be found.

The default values produce an energy loss which is very close to the energy loss found by theTabellenboek formulation. Alternative values for the tuning parameters were calculated bySieben [58]. Using these parameters, the energy loss corresponds to the measurements doneby Bloemberg [7] (and others). These measurements were obtained from laboratory tests withhydraulically rough weirs.

A working model based on this work has been made by L. de Wit [95]. An aspect of this modelis that Villemonte proposes a formulation for the discharge across the weir as a function ofthe energy height on both sides of the weir (and not for the energy loss).

Depending on the flow condition, the empirical discharge is processed into the model in oneof the following two ways:

• In critical flow, a loss of energy height is prescribed which causes the discharge to con-verge to the empirical discharge over a small period of time.

Version 3.17, November 2016 59

Page 60: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

z=0

Q

IMPERFECT WEIR

z=ζ

d2

2E

energy loss ( E)∆

z=−d

ζ1

E1

d1

H 0

1L L2

Lcrest

Figure 2.10: Imperfect weir

• In subcritical flow, a loss of energy height is prescribed which is the same as the loss ofenergy height in a one-dimensional, steady flow with the given discharge.Under the influence of (wind-)forces or two-dimensional effects, the discharge may notconverge to the empirical value, even though the energy loss will be the same as in theone-dimensional, steady case.

An example of an imperfect weir is shown in Figure 2.10.

2.9.1 Villemonte model for weirs

2.9.1.1 Empirical formula for discharge across weir

The Villemonte-model is based on the analysis of a large number of measurements, which werefitted for a formula which expresses the discharge across the weir as a function of the energy heightsE1 upstream and E2 downstream of the weir:

Q = Q(E1, E2). (2.159)

The energy heights E1 and E2 are given by:

E1 = ζ1 +U2

1

2g, E2 = ζ2 +

U22

2g, (2.160)

where the following notations are introduced (see also Figure 2.10):

ζ1 upstream water level, measured from weir crest [m]ζ2 downstream water level, measured from weir crest [m]g gravitational acceleration [m/s2]U1 upstream flow velocity component in direction towards the weir [m/s]U2 downstream flow velocity component in direction from the weir [m/s]

Apart from the energy heights, the discharge in the empirical formula (2.159) depends on the prop-erties of the weir. The formula proposed by Villemonte is

Q = Cd0 Qc(E1)

√1−max

(0,min

(1,

(E2

E1

)p)), (2.161)

60

Page 61: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 2. Shallow water flow model

where the following notations are introduced:

Q discharge per unit width across the weir [m2/s]Cd0 resistance coefficient of the weir [ ]Qc(E1) theoretical value for discharge across the weir in case of critical flow [m2/s]p ’power’ coefficient in discharge formula [ ]

The calculation of Cd0, Qth and p will be discussed below.

Theoretical critical dischargeThe theoretical value Qc for the discharge in case of critical flow is given by

Qc =2

3E1

√2g

3E1. (2.162)

Note that, even in critical flow conditions, the discharge has the form (2.161), and thereforediffers from the theoretical critical discharge Qc.

Resistence coefficient of the weirThe resistance coefficient Cd0 depends on the weir’s vegetation in the following way:

Cd0 = (1 + ξ1/3)−3/2Cd0,ref , (2.163)

where Cd0,ref is the resistance coefficient the weir would have if it had no vegetation, andwhere ξ1 is the dimensionless vegetation coefficient, given by

ξ1 = (1− Ar min(hv, h1))Cdrag (2.164)

where the following notations are introduced:

Cdrag user-specified drag coefficient [ ]Ar user-specified vegetation density per linear meter [1/m]hv user-specified vegetation height [m]h1 upstream water level measured from the crest [m]

The effects of the weir’s geometry, vegetation and flow conditions on the resistance coefficientCd0,ref is modeled in the following way:

Cd0,ref = c1

(w

(1− 1

4e−m1/2

)+ (1− w)

(4

5+

13

20e−m2/10

)), (2.165)

where the following notations were introduced:

c1 user-specified calibration coefficient [ ], default [1.0]• the Tabellenboek-measurements correspond to the default value c1 = 1.0.• the Bloemberg-measurements correspond to the value c1 = 0.8.

m1 user-specified ramp of the upwind slope toward the weir(ratio of ramp length and height, m1 = L1/d1, see Figure 2.10) [ ], default [4.0]

m2 user-specified ramp of the downwind slope from the weir [ ], default [4.0]w interpolation weight [ ]

The interpolation weight w is given by

w = e−E1/Lcrest , (2.166)

where Lcrest is the length of the weir’s crest [m] in the direction across the weir.

Version 3.17, November 2016 61

Page 62: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

Power coefficient pThe effect of the vegetation on the power-coefficient p is modeled in the following way:

p =(1 + ξ1/3)3

1 + 2 ξ1

pref , (2.167)

where pref is the power coefficient found in absence of vegetation:

pref =27

4C2d0

((1 +

d1

E1

(1− e−m2/c2

))−2

−(

1 +d1

E1

)−2)−1

. (2.168)

The user-specified calibration coefficient c2 has a default value c2 = 10. This is the correctvalue for hydraulically smooth weirs. For hydraulically rough weirs, the value should be 30.

2.9.1.2 Criterion for perfect discharge

The discharge Q in (2.161) depends on the downstream energy height E2 only through the term√1−max(0,min(1, (E2/E1)p). Hence, the discharge no longer depends (noticeably) on the down-

stream energy heightE2 and this term is (very near) one. Lowering the downstream water level fromthat point on has no influence on the discharge.

When this is the case, the flow is called critical (or ’perfect’).

2.9.1.3 Processing the empirical discharge in subcritical flow

In subcritical flow (imperfect weir condition), an energy loss is prescribed which corresponds to theenergy loss which occurs in a one-dimensional, steady flow with the same upstream and downstreamenergy height and discharge. This loss of energy height ∆E is given by

∆E = E1 − E2

= E1 − E1

(1− Q2

C2d0g(2

3E1)3

)1/p

. (2.169)

2.9.1.4 Processing the empirical discharge in critical flow

For a weir with perfect discharge, the discharge across the weir should be equal to the perfectdischarge flow rate. The extra energy loss term is used to control the perfect discharge. An exampleof the flow situation for a perfect weir is given in Figure 2.11.

The energy loss is derived from the actual flow situation using an approximate momentum equation:

U∂U

∂x+ g

∂ζ

∂x+ g

∆E

∆x+gU√U2 + V 2

HC22D

= 0 (2.170)

Inserting the flow state ζ, U yields the energy loss for the perfect weir. In this calculation, the actualdiscretization schemes used in WAQUA and TRIWAQ (sections 4.4.2, 4.4.3) are inserted in thecalculation routines for weirs.

62

Page 63: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 2. Shallow water flow model

Figure 2.11: Perfect weir

To control the flow rate at the perfect discharge flow rate, the energy loss is incremented if thedischarge flow rate is too large (delayed current), respectively reduced (accelerated current) if theflow rate is too small. This happens, based on the ratio number between the calculated flow rate andthe perfect discharge flow rate. The ratio number λ is given by

λ =(ζ1 + d1)U1

Qcrit

, (2.171)

The energy loss that is used in the time integration scheme is λ∆E.

2.9.2 Tabellenboek model

2.9.2.1 Subcritical flow

The energy loss for a subcritical flow condition is based on the so called “Tabellenboek [van Rijks-waterstaat]” [55, 78] and the formula according to Carnot. The formulation was fitted to matchlabaratory measurements with hydraulically smooth weirs and with the ramp factors m1 = m2 bothequal to 4.0: see (2.165) for the definitions of m1 and m2.

Whether Carnot’s formula or the Tabellenboek is used depends on the flow velocity above the weir:if the flow velocity at the weir is less than 0.25m/s, the energy loss is calculated according to theCarnot equation for the energy loss in a sudden expansion. If the flow velocity above the weiris more than 0.50m/s, the energy loss is determined by interpolation of measured data which arecollected in the Tabellenboek. When the flow velocity is between 0.25 and 0.50 m/s, a weightedaverage is taken between the energy loss following Carnot and the measurements.

These two formulas for energy loss in subcritical flow are given by:

Carnot’s formulaFor velocities at the weir less than 0.25m/s the energy loss is calculated according to Carnot’slaw:

∆E =1

2g

(Uweir −

Qweir

ζ2 + d2

)2

(2.172)

Version 3.17, November 2016 63

Page 64: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

The calculation of the flow velocity Uweir on the weir from the water level ζ1 and the flowvelocity U1 is described in Section 2.9.2.5.

Energy loss according to Tabellenboek

The energy loss conform the table depends on the ratio number between the discharge flowrate and the perfect discharge flow rate: λ = Q/Qcrit, the height of the crest of the weir withrespect to the bottom in the downstream direction direction d2, see Figure 2.12, and the energyheight upstream E1.

0 20 40 60 80 1000

0.05

0.1

0.15

0.2

0.25

0.3

0.35Energy loss [m] for sill height d = 1.0m according to Tabel Vermaas

discharge ratio lambda [%]

E = 0.60mE = 2.10m

Figure 2.12: Energy loss versus discharge flow rate

The “Tabellenboek” is based on measured values at model research. A regression analysishas been performed to analytical expressions for the loss of energy resulted in the followingexpression for the energy loss ∆E:

∆E = f1(λ,E1) df2(λ,E2)2 , (2.173)

The functions f1 and f2 are obtianed using linear interpolation between their values for λ =0.0, λ = 0.3, λ = 0.6, λ = 0.8, λ = 0.9 and λ = 0.95. The curve of the energy loss for almostperfect discharge is steep, see Fig. 2.12. The curve will be steeper at a larger crest height.

The first derivative of the curve is discontinuous at the border of the intervals, see the “bends”in Fig. 2.12. At smooth increments of the discharge flow rate, the bends in the energy losslead to bends in the water level curve. Sometimes the bends also cause short oscillations.

The functions f1 and f2 are discontinuous for E1 = 0.5, E1 = 1.0 and E1 = 2.0. Figures2.13 and 2.14 show the energy loss as a function of the upstream energy height for the crest

64

Page 65: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 2. Shallow water flow model

heights d2 = 1.0m and d2 = 0.1m. The functions are smooth and also steep for small crestheights (< 0.1m), although this is not beforehand clear from Eq. (2.173). For crest heightsin the range of 1 cm, an increment of flow rate does not causes an increment of the energyloss anymore, see Fig. 2.15. The formula (2.173) cannot be applied to a crest height of zerometers.

0 0.5 1 1.5 2 2.5 30

0.05

0.1

0.15

0.2

0.25Energy loss [m] for sill height d = 1.0m according to Tabel Vermaas

Energy height E [m]

lambda=0.3 lambda=0.6 lambda=0.8 lambda=0.9 lambda=0.99

Figure 2.13: Energy loss versus upstream energy height, for a crest height of 1 meter.

In the neighbourhood of perfect discharge, a small change in the discharge rate Q⊥ may havesubstantial consequences for the calculated energy loss, see Fig. 2.12. Therefore WAQUAoffers the possibility of relaxation for the energy loss term. This allows the user to adapt theenergy loss more smoothly in time, with the help of a parameter θc, to be specified in theuser-input. The parameter influences the energy loss that is applied in a new time step:

∆En+1/2 = (1− θc)∆E∗ + θc∆En (2.174)

For θc = 0, the newly calculated energy loss without relaxation ∆E∗ is used (note that thismay be contrary as expected; θc = 0 should have meant but does not mean“no relaxation”).A smooth adaptation of the energy loss based on the actual current velocities has a stabilizingeffect and avoids oscillations (“flip-flop”).

2.9.2.2 Vegetation

The effect of vegetation on the crest of the weir is added to the momentum equations by an additionalterm in the momentum equations of the form:

∆E = ∆Eref +U2

1

gξ1, (2.175)

Version 3.17, November 2016 65

Page 66: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

0 0.5 1 1.5 2 2.5 30

0.05

0.1

0.15

0.2

0.25Energy loss [m] for sill height d = 0.1m according to Tabel Vermaas

Energy height E [m]

lambda=0.3 lambda=0.6 lambda=0.8 lambda=0.9 lambda=0.99

Figure 2.14: Energy loss versus upstream energy height, for a crest height of 0.1 meter.

0 0.5 1 1.5 2 2.5 30

0.05

0.1

0.15

0.2

0.25Energy loss [m] for sill height d = 0.1m according to Tabel Vermaas

Energy height E [m]

lambda=0.3 lambda=0.6 lambda=0.8 lambda=0.9 lambda=0.99

Figure 2.15: Energy loss versus upstream energy height, for a crest height of 0.01 meter.

66

Page 67: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 2. Shallow water flow model

where ∆Eref is the energy loss which would be found in absence of vegetation.

This effect is only added in case of subcritical flow.

2.9.2.3 Supercritical flow

In case of a supercritical flow condition, i.e. a perfect weir, the energy loss is calculated in the sameway as it is in the Villemonte model (see Section 2.9.1.4).

Contrary to the Villemonte model, the critical discharge used is the theoretical discharge Qth(E1).

2.9.2.4 Criterion for perfect discharge

Due to various approximations that have been made, for instance neglecting dynamic effects, it isquite difficult to determine from the actual flow situation whether a weir is perfect or not. Thereforedifferent criteria have been designed and improvements have been made to predict correctly androbustly whether the energy loss for a perfect or imperfect weir should be applied.

At the moment two different criteria are combined into a single one. These are that the actualdischarge Q cannot exceed the perfect discharge Qcrit, as illustrated in Figure 2.16, and that theenergy loss computed by the table-book is less than that for perfect discharge:

∆Etable < E1 − E2 (2.176)

Figure 2.16: Ratio of actual flow rate Q w.r.t. perfect discharge flow rate Qcrit as a function of theenergy level difference across a weir.

The two criteria are combined by multiplication of ratios that should each be less than or equal toone: (

Q

Qcrit

)2(∆EtableE2 − E1

)≤ 1 (2.177)

Version 3.17, November 2016 67

Page 68: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

The ratio number for the flow rates has been squared. Because of this an almost straight line iscreated as a function of E1 − E2. This should lead to a robust criterion. However, also with thiscriterion some flip-flop behaviour between the different weir states is observed.

2.9.2.5 Determination of the velocity on the weir

The flow velocity Uweir on the crest of the weir is required in determining the flow condition of theweir (perfect/imperfect) and in determining the energy loss for imperfect weirs using Carnot andthe Tabellenboek.

The determination of the velocity on the weir crest uses two relations: conservation of energy andcontinuity.

In the upstream part to the crest of the weir no energy loss occurs. Based on Bernouilli, it shouldapply that:

E1 = ζ1 +U2

1

2g= ζweir +

U2weir

2g(2.178)

Secondly, continuity states that flow rate local to the weir equals the flow rate just upstream of theweir:

Qweir = (ζ1 + dsill)U1 = ζweir Uweir (2.179)

The perpendicular flow rate is determined based on the upstream perpendicular velocity and waterlevel. This flow rate may deviate from the flow rate derived from the continuity equation of thealgorithmic core part due to the chosen discretizations and averagings.

Equations (2.178) and (2.179) are two non-linear equations containing the unknown Uweir and ζweir.They can be combined into the single equation

ζweir = max

(2

3E1, E1 −

Q2weir

2gζ2weir

)(2.180)

This equation can be rewritten to

x = max

(2

3, 1− y

x2

), with x =

ζweirE1

, y =Q2weir

2gE31

(2.181)

The max-operator in this equation yields x = 2/3 only when 1− y/x2 ≤ 2/3. In this case x = 2/3,and y ≥ 4/27. When y < 4/27 the max-operator will use the second value, and (2.181) simplifiesto

x = 1− y

x2⇔ x3 − x2 = y (2.182)

This equation is solved using Newton iteration, starting from the initial estimate

x0 =50

81+

1

3y +

√4

27− y (2.183)

A test with Matlab has shown that this iteration converges in two steps for all possible values 0 ≤y ≤ 4/27 to a relative accuracy of 10−8. In the actual implementation three iterations are performed.

68

Page 69: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 2. Shallow water flow model

2.10 Waves

In relatively shallow areas (e.g. coastal seas) wave action becomes important because of severalprocesses:

• A net mass flux generated which has effect on the current profile (the so-called Stokes drift).

• Longshore currents and cross-shore set-up is generated due to variations in the wave-inducedmomentum flux.

• The bed-shear stress is enhanced, which affects the stirring-up of sediment and increases thebed friction.

The computation of waves and wave-induced effects is the domain of wave models. In WAQUA (i.e.only in two dimensions) the wave model SWAN is supported. SWAN computes the full (directionaland frequency) spectrum on a rectilinear or curvilinear grid and simulates the following physicalphenomena:

• Wave propagation in time and space, shoaling, refraction due to current and depth, frequencyshifting due to currents and nonstationary depth.

• Wave generation by wind.

• Nonlinear wave-wave interactions (both quadruplets and triads).

• Whitecapping, bottom friction, and depth-induced breaking.

• Blocking of waves by current.

More details are explained in [53].

The general procedure for deriving wave-induced forces is by first averaging the continuity andmomentum equations over a wave period. The remaining residual terms are expressed in waveproperties, such as wave energy, phase and group velocity, wave length and wave period. Theseproperties are then used in the flow model to account for wave effects.

The averaging method for splitting the mean and oscillation motion is based on the GLM method [1],see appendix J. The shallow water equations in GLM formulation closely resemble the Eulerian for-mulation of the shallow water equations. A second order term in the continuity equation is usuallyneglected whence the continuity equation is exactly the same in both formulations. Thus, equa-tion (2.27) remains unchanged. However, in the case of coupling to a wave model the velocities aredefined in GLM-coordinates. The momentum equations also are identical in both formulations; theonly difference again is that the velocities are defined in GLM-coordinates. However, the bound-ary conditions at the free surface and at the bottom boundary change because of the wave action.Since coupling to a wave model is only supported in two-dimensions, the boundary condition atthe free surface can be expressed as a depth-averaged wave-induced force F (which is an outputquantity from the wave model) in the momentum equations. In one dimension, hereby neglectingnon-interesting terms, this reads

∂uL

∂t+ uL

∂uL

∂x+ g

∂ζ

∂x− 1

ρ

∂τ

∂x=

F

ρH, (2.184)

Version 3.17, November 2016 69

Page 70: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

where uL is the velocity in GLM-coordinates, ζ is the water level, τ the stress tensor, and H thetotal water depth. The boundary condition for the bottom stress is changed in the case of couplingto a wave model. This change is explained in section 2.10.1. The flow boundary conditions also arebased on the GLM-velocity. In the transport equation, advection is based on the Eulerian velocity,which is exactly the same as the case with no wave coupling.

As mentioned in appendix J, the Eulerian velocity u and GLM-velocity uL are related by

uL = u+ uS, (2.185)

where uS is the Stokes drift. Computation of the Stokes velocity is discussed in section 2.10.2.

2.10.1 Bottom boundary stress

The bed shear stress is enhanced due to the combined effect of current and waves. In WAQUA thebed shear stress ~τm for wave-current interaction is parameterized following Soulsby [61]:

|~τm| = x (1 + bxp (1− x)q) (|~τc|+ |~τw|) , (2.186)

where ~τc and ~τw are the bed shear stress due to current only and waves only, respectively, and

x =|~τc|

|~τc|+ |~τw|(2.187)

The parameters b, p, and q in equation (2.186) are given by

b =(b1 + b2 |cos(φ)|J

)+(b3 + b4 |cos(φ)|J

)log10

(fwCD

), (2.188)

p =(p1 + p2 |cos(φ)|J

)+(p3 + p4 |cos(φ)|J

)log10

(fwCD

), (2.189)

q =(q1 + q2 |cos(φ)|J

)+(q3 + q4 |cos(φ)|J

)log10

(fwCD

), (2.190)

where fw is the wave friction factor, CD is the drag coefficient due to the current, and φ is the anglebetween the current direction and the direction of wave propagation. The angle φ can be computedfrom

|cos(φ)| = |uFx + vFy|

|~u|∣∣∣~F ∣∣∣ , (2.191)

where ~F = (Fx, Fy) is the wave-induced force and ~u = (u, v) is the velocity vector. The parametersin equations (2.188), (2.189), and (2.190) depend on the actual friction model that is used. InWAQUA the one by Fredsoe [17] is used for which the parameters are given by

b1 b2 b3 b4 p1 p2 p3 p4 q1 q2 q3 q4 J0.29 0.55 -0.10 -0.14 -0.77 0.10 0.27 0.14 0.91 0.25 0.50 0.45 3.0

70

Page 71: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 2. Shallow water flow model

Computation of the bed shear stress ~τc due to current alone is explained in section 7.3.2. Themagnitude of the bed shear stress due to waves alone is given by

|~τw| =1

2ρfwu

2orb, (2.192)

where uorb is the wave orbital velocity near the bottom, which is computed from linear wave theoryand given by

uorb =1

4

√πHrmsω

sinh(kH), (2.193)

where Hrms is the root-mean square (averaged over a wave period) of the wave height, H the totalwater depth, and ω is the wave frequency. The wave friction factor fw is taken from Swart [68]:

fw =

0.00251 exp

(5.21

(Aks

)−0.19)

when uorbωks

> π2,

0.3 when uorbωks≤ π

2,

(2.194)

where ks is the Nikuradse roughness length scale.

The drag coefficient CD in equations (2.188), (2.189), and (2.190) is related to the Chézy coefficientC2D by

CD = g/C22D. (2.195)

2.10.2 Stokes drift

In surface waves, fluid particles describe an orbital motion. In non-linear flows the net-displacementof a fluid particle after one wave perid is not zero. The wave-induced drift velocity correspondingto this net-discplacement is called the Stokes drift velocity and is always in the direction of wavepropagation. The Stokes drift vector

(uS, vS

)is computed from

ζ∫−d

ρuS =E

ωkx,

ζ∫−d

ρvS =E

ωky. (2.196)

In these equations the integral is from the bottom depth to the water level. Further, ω is the wavefrequency, ~k = (kx, ky) the wave number vector, and E the wave energy. Computation of the wavenumbers is explained in section 2.10.3. The wave frequency and wave energy are given by

ω =2π

T, (2.197)

E =1

8ρgH2

rms, (2.198)

where T is the wave peak period. The wave period and wave height are both considered output fromthe wave model.

Version 3.17, November 2016 71

Page 72: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

2.10.3 Wave numbers

The dispersion equation

The wave numbers k are solved from the dispersion relation for waves which is given by

(ω − k~v · ~n)2 = gk tanh(Hk), (2.199)

with ω the wave frequency, k the wave number, ~v the velocity, ~n the wave direction, and H the totalwater depth. The wave number has to be computed; the remaining quantities are given, either asoutput from the wave model or as (intermediate) results from the flow model.

Dimension free dispersion equation

The number of given variables in (2.199) can be reduced by introducing z = Hk > 0:

(x− yz)2 = z tanh(z), (2.200)

where the parameters x and y are given by

x = ω

√H

g> 0 , y =

~v · ~n√Hg

. (2.201)

This equation cannot be solved easily voor the unknown z. Newton iteration will be applied tocalculate z for a given x and y. Newton iteration requires an accurate initial condition. Also, it hasto be verified that a solution exists for the given x and y.

We shall investigate the properties of the wave equation (2.200) by studying the variations of y andz for a fixed value of x. The solution for the value x = 0.1 is scetched in Figure 2.17: for everyvalue of y, except zero and the minimum value ymin, there are two values of z that solve (2.200).We shall use the smallest solution, which is a contiuous function of x and y: the larger solution isdiscontinuous at y = 0.

Valid range for y

Before solving equation (2.200), it needs to be verified that there is indeed a solution for the giveny and x. In order to find the smallest value ymin for y for which there is a solution, the parameter yis expressed in terms of x and z:

y = Y (x, z) :=x

z±√

tanh(z)

z(2.202)

Only the minus sign needs to be considered, because only the smallest solution z is considered. Theminimum value ymin is found by setting the derivative to zero:

0 =dYdz

= − x

z2− 1

2

√z

tanh(z)

(−tanh(z)

z2+

1

z cosh2(z)

)(2.203)

72

Page 73: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 2. Shallow water flow model

−2 0 2 4 6 8 10 1210

−2

10−1

100

101

y

solution of the wave equation for x=0.1

Figure 2.17: The solutions z of equation (2.200) for x = 0.1.

For a given value of x, the value zymin for z for which y reaches its minimum ymin is found bysolving (2.203) using Newton iteration. An appropriate initial guess is

zymin,0 =√

2 3√x+ 4x2 − 2x2

0.8 + x.2(2.204)

and the needed derivative d2Y/dz2 is given by

d2Y

dz2=

2x

z3+√z tanh(z)

(z + sinh(2z) + 4z sinh2(z)

z2 sinh2(2z)− 3

4z3

). (2.205)

With the initial approximation (2.204), equation (2.205) is solved up to machine accuracy in 5Newton iterations, regardless of the value of x.

Filling in z = zymin in (2.202), we find the minimum value ymin for y. If the value of y is belowymin, there is no solution to (2.200). In that case, we overrule y by ymin and the solution becomesz = zymin.

Initial solution for Newton iteration

Now that we can determine whether the equation (2.200) has a solution, we need an initial approxi-mation to start up the Newton iteration. For small values of y, we get the approximation z0 from thesecond order Taylor series of (2.202) near y = ymin:

z ≈ z0 := zymin −√

2(y − ymin)

d2Y/dz2∣∣z=zymin

. (2.206)

For large values of y, the solution z is small, as is seen in Figure 2.17. In that case, an approximatedsolution z1 can be found by using tanh(z1) ≈ z1, so

(x− yz1)2 = z21 , z1 =

x

y + 1. (2.207)

Version 3.17, November 2016 73

Page 74: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

A good initial guess zini for the Newton iteration process is given by

zini := min(z0, z1). (2.208)

With the initial approximation (2.208), equation (2.200) up to machine accuracy in 5 Newton itera-tions, regardless of the values of x and y.

After this, the substitution k = z/H returns the wave number k.

74

Page 75: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 3. Considerations on numerical techniques used in TRIWAQ

Chapter 3

Considerations on numerical techniquesused in TRIWAQ

In the previous chapter we discussed the mathematical modelling of the water movement, the trans-port of dissolved substances and turbulence parameters for shallow flows. Furthermore, the resulteddifferential equations have been recast in a form which is coordinate-invariant in horizontal planes.The next chapter deals with a finite difference framework for computing solutions of the governingequations. This chapter is concerned with the main characteristics of the finite difference methodfor general horizontal domains. Moreover, Chapter 5 is concerned with time integration of thetime-dependent equations by means of an alternating direction implicit (ADI) factorization scheme.Therefore, the introduction to the ADI scheme is also given in this chapter.

Over the 1980-s various possibilities, such as finite difference or finite volume, staggered or colo-cated grids, orthogonal or non-orthogonal coordinates and Cartesian or transformed velocity com-ponents have been considered the development of numerical methods. A review of these possibil-ities with their advantages and disadvantages is given in [97]. The numerical method employed inTRIWAQ is based on a staggered orthogonal grid employing the transformed velocity components,which have the same dimension as the velocity vector itself, as dependent variables. An introduc-tion to numerical modelling of shallow water flows can be found in [89]. For a more completeintroduction , see classical texts on CFD, such as [16] and [24].

Since we assume that the orthogonal transformation in horizontal planes is not explicitly known, butonly implicitly by the mapping of the coordinates of the cell vertices, it is necessary to discretize thegeometrical quantities mentioned in Section 2.6. This discretization is treated in Section 3.1. Also,the definition of the computational grid is discussed. Information on the basic storage principleemployed in TRIWAQ can be found in Section 3.3. Section 3.4 is concerned with discussing thecharacteristics of the finite difference method. In Section 3.5 the main features of the ADI techniqueis described.

Version 3.17, November 2016 75

Page 76: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

3.1 Computational grid and associated geometrical properties

The physical domain can be discretized by subdivision of the continuum into cells of arbitraryshape and size. In TRIWAQ, a structured grid is employed, which means that each interior cell issurrounded by the same number of cells. Hence, efficient use can be made of vector and parallelcomputers. As mentioned in Section 2.1, a distinction is made between the definition of the gridin horizontal and vertical directions. This distinction is inspired by the importance of the verticalstructures in 3D shallow water flows. In the vertical direction the computational domain is dividedinto a fixed number of layers zk, as computed by Algorithm 2.1, of which the k-index has range0,1,...,K and counting downward from the free surface.

Let us consider a one-to-one boundary fitted coordinate mapping in two dimensions from a hori-zontal plane G to a physical level Ω. In G a uniform grid Gh is defined by

Gh = ξ : ξm+1/2 = (m− 1)∆ξ, ηn+1/2 = (n− 1)∆η, m = 1, ...,M, n = 1, ..., N (3.1)

These points are the vertices of cells. Figure 3.1 depicts a horizontal cell. The cell vertices areconnected by segments of straight lines. These connections are called the faces of a cell. The cellwith center at (ξm,ηn) is called Gmn and its image in Ω is called Ωmn. The mapping x(ξ), whichis thus specified by the values x(ξm+1/2,ηn+1/2), is extended to all of G by bilinear interpolation.This mapping is chosen such that ∆ξ = ∆η = 1. The mapping is stored in a file which is generatedwith a grid generator, e.g. Delft3D-RGFGRID [12]. The discretization of the shallow flow andtransport equations will be carried out in the computational space Gh, whereas the representation ofthe unknowns is given in Gmn. Section 3.3 is devoted to this representation of the unknowns. Aftera flow computation has been completed using transformed velocity components as unknowns, it isrequired for the reason of output purposes, to compute the Cartesian velocity components by meansof (2.122). Note that these components are represented in Ωmn.

T

y

ξx

η

gηη

gξξ( m,n+1/2 )

( m + 1/2, n )( m,n )

m

nξ ξm-1/2 m+1/2

∆ξ

η

n+1/2η

n-1/2η

GmnGhΩ

Figure 3.1: Two-dimensional cell in physical domain Ω; its image in G is a square.

The geometrical information about the grid is limited to the coordinates of the cell vertices only,and all relevant geometrical quantities can be calculated from this information. The following geo-metrical quantities are computed: √

gξξ,√gηη, and

√g∗ (3.2)

76

Page 77: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 3. Considerations on numerical techniques used in TRIWAQ

The first two quantities, as given in (2.118), are calculated in a staggered arrangement in the centerof the edges of a cell Gmn according to

√gξξ∣∣(m,n±1/2)

=√

(xm+1/2,n+±1/2−xm−1/2,n+±1/2 )2

+(ym+1/2,n±1/2− ym−1/2,n±1/2 )2

√gηη∣∣(m±1/2,n)

=√

(xm±1/2,n+1/2−xm±1/2,n−1/2 )2

+(ym±1/2,n+1/2− ym±1/2,n−1/2 )2

(3.3)

Thus, it is natural to define the location of√gxx and

√ghh at points (m,n ± 1/2) and (m ± 1/2,n),

respectively. Note that√gξξ and

√gηη represent the lengths of cell Ωmn in ξ- and η-directions,

respectively. We assumed that at the start of the program the quantities√gξξ and

√gηη are calculated

and stored permanently at their points of definition. Furthermore, they are interpolated at pointswhere they will be needed, using the minimum number of points needed. For example,

√gξξ∣∣(m,n)

= 12(√gξξ∣∣(m,n−1/2)

+√gξξ∣∣(m,n+1/2)

)

√gηη∣∣(m,n+1/2)

= 14(√gηη∣∣(m−1/2,n)

+√gηη∣∣(m−1/2,n+1)

+√gηη∣∣(m+1/2,n)

+√gηη∣∣(m+1/2,n+1)

)

(3.4)

From (2.119) one can approximate the values of the Jacobian√g∗ in the required points. For

example,

√g∗∣∣(m,n)

=1

4(√gξξ∣∣(m,n−1/2)

+√gξξ∣∣(m,n+1/2)

)(√gηη∣∣(m−1/2,n)

+√gηη∣∣(m+1/2,n)

) (3.5)

The Jacobian (3.5) gives the horizontal surface area of cell Ωmn. This completes our description ofhow the geometrical quantities are handled.

3.2 Analysis of inaccuracy due to averaging and orthogonalitydeviation

The averaging of the geometrical quantities introduces inaccuracy, especially if large grid size vari-ations are applied. To keep the errors introduced by the averaging procedure restricted Wijbenga(1985) derived an upper bound for the grid variations. For a steady uniform flow in a prismaticchannel with a sinus shaped curvilinear grid he obtained an acceptable accuracy if the estimated er-ror in the averaging procedure normalized by the grid size did not exceed 0.02. For√gξξthis meansthat (

(∆ξ)2

8

∂2√gξξ∂ξ2 + (∆η)2

8

∂2√gξξ∂η2

)√gξξ

≤ 0.02 (3.6)

Version 3.17, November 2016 77

Page 78: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

A similar condition can be derived for √gηη. For WAQUA we assume that the grid points aresmoothly distributed in the physical space. This requires that the ratio between the grid size of twoadjacent grid cells is bounded by a factor C :

max(√

gξξ∣∣m,n,√gξξ |m,n−1

)min

(√gξξ∣∣m,n,√gξξ |m,n−1

) ≤ C andmax

(√gηη∣∣m,n,√gηη |m−1,n

)min

(√gηη∣∣m,n,√gηη |m−1,n

) ≤ C (3.7)

Eq. (3.6) will be satisfied if the mesh size along a grid line does not deviate more than 20% of thenearest mesh size in the same direction. Therefore C must be smaller than 1.2. The smoothness ofa WAQUA grid can be inspected with the grid generator ([12]).

A second source of inaccuracy is the deviation of orthogonality. Before the introduction of orthog-onality the free surface gradient in the U -momentum equation is of the following form:

1√g∗

√(∂ x∂ η

)2

+

(∂ y

∂ η

)2∂ ζ

∂ ξ−((

∂ y

∂ η

)(∂ y

∂ ξ

)+

(∂ x

∂ ξ

)(∂ x

∂ η

))∂ ζ

∂ η

(3.8)

For an orthogonal grid the second part in the surface free gradient is zero due to the orthogonalitycondition: ((

∂ y

∂ η

)(∂ y

∂ ξ

)+

(∂ x

∂ ξ

)(∂ x

∂ η

))= 0 (3.9)

In WAQUA it is assumed that the second term is zero and therefore this term has not been imple-mented. For a grid which is not strictly orthogonal the inaccuracy is dependent on the ratio betweenthe first and second term in Eq. (3.8). Wijbenga derived for steady flow the following condition:((

∂ y∂ η

)(∂ y∂ ξ

)+(∂ x∂ ξ

)(∂ x∂ η

))((

∂ x∂ η

)2

+(∂ y∂ η

)2) < 0.05 (3.10)

Condition (3.10) may be inspected with the grid generator ([12]). In general the inaccuracies in-troduced by the numerical approximation of the grid quantities in the pressure term, the advectionterms and the curvature terms, are much larger than the inaccuracies introduced by neglecting thesecond term in the pressure term in Eq. (3.8) for almost orthogonal grids.

3.3 The representation of the continuous data into discrete data

To discretize the equations, the variables are arranged in a special way on the grid, see Figure 3.1.The pattern is called a staggered grid. This particular arrangement of the variables is called theArakawa C-grid [89].

The finite difference method will be employed to discretize the shallow water equations coupledto some equations of scalar-transport type. For this a staggered variable arrangement is used in

78

Page 79: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 3. Considerations on numerical techniques used in TRIWAQ

which all scalar variables (density, water level, salinity and other substances) are located at the cellcenter (m,n,k− 1/2) which is called the water level point, whereas the velocity component in a givendirection is stored in the centre of a cell face orthogonal to that direction. Hence, uk, vk and ωk aregiven at (m+ 1/2,n,k− 1/2), (m,n+ 1/2,k− 1/2) and (m,n,k), respectively. These points are called theu-, v- and ω-velocity points, respectively. It should be noted that the geometrical quantities

√gξξ and√

gηη are stored in v- and u-velocity points, respectively. For each unknown we define a collectionof a finite number of non-overlapping cells that covers the whole domain Ω. Each unknown is at thecenter of its cell. Thus, the resulted different grids are shifted with respect to each other by one halfmesh width. Concerning the turbulence quantities k and ε, De Goede et al. [19] proposed to definethe position of these quantities in the centre of a layer interface, that is at ω-velocity point. Thisallows a more accurate discretization of the production and buoyancy terms than in the case whenk and ε are located at the water level points. Figure 3.2 shows the arrangement of the unknowns.

same ( m,k ) index

mm-1 m+1

n+1/2

n+1

n

n-1

n-1/2

same ( m,n ) index

m-1/2 m+1/2

u - point

v - point

ζ - point

ω- point

k

k-1

k+1

ξ

η z

ξ

m-1 m m+1

Figure 3.2: Arrangement of the unknowns for staggered grid.

Using the staggered grid, the number of computational values is decreased by a factor of four,whereas the accuracy is maintained in comparison with a colocated grid1. Furthermore, the im-plementation of boundary conditions is simplified and spurious oscillations in the water levels areprevented (see e.g. [63], [89]).

Concerning the indices, the notation used in the foregoing may be somewhat confused due to thedifferent definition of the grid in horizontal and vertical directions. Moreover, we want to avoid theuse of "half-point" symbols. For this the following convention for the place in the grid is used. Thewater level point (m,n,k−1/2), u-velocity point (m+1/2,n,k−1/2), v-velocity point (m,n+1/2,k−1/2)and ω-velocity point (m,n,k) within each 3D cell, bounded by the layer interfaces zk−1 and zk, havethe same cell or group index (m,n,k). See Figure 3.2.

This notation can be very useful for the actual implementation of the finite difference approach ap-plied to the governing equations. From now on, we shall employ these group indices. Furthermore,we shall indicate by um,n,k, vm,n,k and ωm,n,k the values of the layer-averaged quantities uk andvk and the relative velocity ωk at the points (m + 1/2,n,k − 1/2), (m,n + 1/2,k − 1/2) and (m,n,k),

1 Colocated grids are grids, in which all the dependent variables are defined in the same points.

Version 3.17, November 2016 79

Page 80: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

respectively. Also, ρm,n,k and cm,n,k represent the values of ρk and ck, respectively, at (m,n,k− 1/2).Finally, the values of the layer thickness hk (2.3) are also assigned to different points. We denote thequantities hζm,n,k, hum,n,k and hvm,n,k giving the layer thicknesses at the water level, u- and v-velocitypoints, respectively.

With the exception of the Jacobian√g∗ the geometrical quantities are properly represented in the

grid, using the group indices. We shall need to calculate√g∗ in various points within a cell, thus

having the same indices (m,n), by means of formula (2.119). This will be stated explicitly since,the location of the Jacobian

√g∗ is not defined. Tables 3.2 and 3.3 summarize the representation of

respectively all the unknowns and quantities to be used in TRIWAQ in the computational grid bymeans of the basic index sets as given in Table 3.1. The situation in the computational grid is nowwell defined.

Table 3.1: Basic index sets.

Name of set Index setSet-ζ-points (m,n) ⊂ 1, ..,M × 1, .., NSet-u-points (m,n, k) ⊂ 1, ..,M − 1 × 1, .., N × 1, .., KSet-v-points (m,n, k) ⊂ 1, ..,M × 1, .., N − 1 × 1, .., KSet-ω-points (m,n, k) ⊂ 1, ..,M × 1, .., N × 0, .., KSet-d-points (m,n) ⊂ 1, ..,M × 1, .., N

Table 3.2: Representation of several unknowns in the com-putational grid by index sets.

Unknown Name Index setζ water level Set-ζ-points→ Ru ξ-velocity component Set-u-points→ Rv η-velocity component Set-v-points→ Rω z-velocity component Set-ω-points→ Rc concentration Set-ζ-points ×1, . . ., K → R+

k horizontal turbulent energy Set-d-points→ R+

ε horizontal dissipation rate Set-d-points→ R+

k turbulent energy Set-ω-points→ R+

ε dissipation rate of k Set-ω-points→ R+

q non-hydrostatic pressure Set-ζ-points ×1, . . ., K → R

Table 3.3: Representation of several quantities in the com-putational grid by index sets.

Quantity Name Index setνh horizontal viscosity Set-ζ-points ×1, . . ., K → R+

ν2D horizontal eddy viscosity Set-d-points→ R+

νv vertical eddy viscosity Set-ω-points→ R+

Cu2D Chézy coefficient at u-points Set-u-points→ R+

80

Page 81: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 3. Considerations on numerical techniques used in TRIWAQ

Table 3.3: Representation of several quantities in the com-putational grid by index sets.

Cv2D Chézy coefficient at v-points Set-v-points→ R+

Dh horizontal diffusivity Set-ζ-points ×1, . . ., K → R+

Dv vertical eddy diffusivity Set-ω-points→ R+

S global sinks or sources Set-ζ-points→ R+

ρ density Set-ζ-points ×1, . . ., K → R+

√gξξ square root of covariant

metric tensor in ξ-dir.Set-v-points→ R+

√gηη square root of covariant

metric tensor in η-dir.Set-u-points→ R+

Patm atmospheric pressure Set-ζ-points→ R+

zζ layer interface at ζ-point Set-ζ-points ×0, . . ., K → Rzu layer interface at u-point Set-u-points ×0, . . ., K → Rzv layer interface at v-point Set-v-points ×0, . . ., K → Rhζ layer thickness at ζ-point Set-ζ-points ×1, . . ., K → R+

hu layer thickness at u-point Set-u-points ×1, . . ., K → R+

hv layer thickness at v-point Set-v-points ×1, . . ., K → R+

θu parameter for hu at u-points Set-u-points→ [0:1]θv parameter for hv at v-points Set-v-points→ [0:1]

3.4 The finite difference approach

In Chapter 4 we consider the space discretization of the layer- and depth-averaged continuity equa-tions (2.120), (2.121), the layer-averaged momentum equations (2.123), (2.126), the layer-averagedtransport equation (2.127), the k-ε equations (2.128)-(2.129) and the physical vertical velocity w(2.20), respectively, by means of central and upwind differences at the points where the unknownin question is defined. For instance, the central difference operator for ∂u/∂ξ at u-velocity point isgiven by

∂u

∂ξ

∣∣∣∣m,n,k

≈um+1,n,k−um−1,n,k

2(3.11)

whereas the first order upwind scheme is written as forward difference operator:

∂u

∂ξ

∣∣∣∣m,n,k

≈ um+1,n,k−um,n,k (3.12)

or backward difference operator:

∂u

∂ξ

∣∣∣∣m,n,k

≈ um,n,k−um−1,n,k (3.13)

depending on the direction of the flow. Finite difference approximations of higher order derivativescan be obtained by repeated application of first order formulas. These finite difference techniques

Version 3.17, November 2016 81

Page 82: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

have influence on the accuracy, monotonicity and efficiency. Central differences are second orderaccurate as determined by the Taylor series for the local truncation error, but may give rise to non-physical spurious oscillations or "wiggles", typically in the vicinity of steep gradient of a quantityto be resolved. In shallow flows these wiggles may be introduced near closed boundaries and thindams. On the other hand, first order upwinding is unconditionally wiggle-free or monotone, thuspromoting the stability of the solution process, but introduces a truncation error, which has the formof a viscous term with artificial viscosity (see e.g. [24] and [90]). In advection-dominated flows,this artificial viscosity dominates the physical one and the computed solution is much more smooththan the correct one. In a effort to combine the advantages of both central and first order upwindschemes, that is retaining the stability while providing second order accuracy or leading to lessnumerical diffusion, a second order upwind scheme is proposed [62]:

∂u

∂ξ

∣∣∣∣m,n,k

12(−3um,n,k +4um+1,n,k−um+2,n,k) (forward)

12(3um,n,k−4um−1,n,k +um−2,n,k) (backward)

(3.14)

Unknowns not present at points where they are required, are computed by (bi)linear interpolationusing the fewest number of interpolation points. For this purpose, it is convenient to introduce anabbreviated notation. The quantities ϕξm,n,k and ϕηm,n,k indicate averaging of the unknown j in ξ-and η-direction, respectively, over their two points of definition that are nearest to (m,n,k), wherethey are required. In analogy, ϕξηm,n,k gives the averaged value of j at (m,n,k) resulted from thecombination of two one-dimensional interpolation formulas in each horizontal direction. So, wehave, for example,

uξm,n,k = 12

(um−1,n,k +um,n,k)

ωηm,n,k = 12

(ωm,n,k +ωm,n+1,k)

vξηm,n,k = 14

(vm,n,k + vm+1,n,k + vm,n−1,k + vm+1,n−1,k)

(3.15)

Both advective and diffusive fluxes involve quantities that do not coincide with their points of defini-tion and they are obtained by averaging, interpolation or extrapolation. In these approximate values,the variation of the grid spaces and the curvature of the grid is not taken into account. This simplifi-cation will introduce a truncation error on non-smooth grids. Statements about order of consistencyare therefore only valid for equidistant rectangular grids. The use of weighted bilinear interpolationwould require the implementation of a number of additional terms to account for the variation ofthe grid.

3.5 Introduction to the ADI method

The TRIWAQ code is applied for modelling a wide range of flow conditions. In all these casesthe code should give a solution, so robustness has highest priority. Following Stelling [63], thediscretizations have to satisfy the following demands:

• unconditionally stable,

82

Page 83: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 3. Considerations on numerical techniques used in TRIWAQ

• at least second order consistency,

• suitable for both time-dependent and steady state problemes and

• computationally efficient.

In what follows, the two-dimensional case will be considered. The three-dimensional extensionis quite straightforward and introduce no different aspects. An explicit time integration of the two-dimensional shallow water equations on a rectangular grid would lead to a time step condition basedon the Courant number for wave propagation:

Cwave = 2∆t

√gH

(1

∆x2+

1

∆y2

)≤ 1 (3.16)

with ∆x and ∆y the smallest grid spaces in the physical space. For many practical applications thisrequires a time step of a few seconds to simulate tidal propagation. Exceeding the time step wouldgenerate an instability and from the view of robustness this is not acceptable. Therefore an implicitmethod is needed. However, an implicit scheme can be expensive in computer time and storage ifthe inversion of a large matrix is required. A second order implicit time integration approximation isthe Crank-Nicholson method (see [24]). For the linearized two-dimensional shallow water equationswithout advection, the Crank-Nicholson method as defined in vector form reads:

~U l+1 − ~U l

∆ t+

1

2A~U l +

1

2A~U l+1 = ~0 (3.17)

with ~U = (U, V, ζ)T and A =

0 f −g ∂∂ x

−f 0 −g ∂∂ y

−H ∂∂ x−H ∂

∂ y0

.

The solution after one time step is given by

~U l+1 =

(I +

1

2∆t A

)−1

×(I − 1

2∆t A

)~U l (3.18)

The simultaneously taken spatial discretizations in both grid directions would after discretizationgenerate a system of equations with a matrix with a band structure. In each row there are at leastfive non zero entries, corresponding to the grid cells surrounding the water level point. The bandwidth is large and all grid points are coupled. On the present-day computers it would be no problemto store and invert such a system of equations, but in the days of the first WAQUA simulations(1970’s) the core memory was too small to tackle these systems. Leendertse applied an alternatingdirection implicit (ADI) factorization method for the shallow water equations [36].

The principle of the ADI scheme is to separate the operators into one-dimensional components andsplit the scheme for each time step into two stages, each one involving only the implicit operationsoriginating from a single coordinate. This method has been introduced by Peaceman and Rachford[47]. Various alternatives of the ADI factorization are proposed. These are discussed in [24].

We outline the principle of the ADI technique. This technique splits one time step into two stages.Each stage consists of half a time step. In both stages the terms of the model equations are solved in

Version 3.17, November 2016 83

Page 84: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

a consistent way. In the first half time step, the x-derivatives are taken implicitly and in the secondhalf time step the y-derivatives are taken implicitly. In vector form the ADI method is given by:

Step 1:~U l+1/2 − ~U l

1/2∆ t+

1

2Ax~U

l+1/2 +1

2Ay ~U

l = ~0 (3.19)

Step 2:~U l+1 − ~U l+1/2

1/2∆ t+

1

2Ax~U

l+1/2 +1

2Ay ~U

l+1 = ~0 (3.20)

with

Ax =

0 f −g ∂∂ x

0 0 0−H ∂

∂ x0 0

(3.21)

and

Ay =

0 0 0−f 0 −g ∂

∂ y

0 −H ∂∂ y

0

(3.22)

The solution after one complete time step is given by

~U l+1 =(I + 1

2∆t Ay

) −1 ×(I − 1

2∆t Ax

)×(I + 1

2∆t Ax

) −1 ×(I − 1

2∆t Ay

)~U l

(3.23)In the first stage the time level proceeds from l to l + 1/2 and the corresponding simulation timefrom t = l∆t to t = (l + 1/2)∆t. In this stage first the v-momentum equation such as (2.126) issolved, followed by the u-momentum equation (2.123) implicitly coupled with the continuity equa-tion (2.121). In the second stage the time level proceeds from l + 1/2 to l + 1. In this stage firstthe u-momentum equation is solved, followed by the v-momentum equation which is implicitlycoupled with the continuity equation.

For a complete time step, each separate term of the equations is still a second-order consistentapproximation to the differential equation. The advantage of the ADI approach is that the implicitlyintegrated water levels and velocities are coupled along grid lines. Substitution and elimination givestridiagonal systems of equations, which can be solved efficiently by means of Gaussian elimination(see Chapter 8).

The second stage in the ADI method is almost completely similar to the first stage. The grid quanti-ties, direction dependent coefficients and the uk-velocity and vk-velocity are interchanged. The onlyprincipal difference between the u- and v-momentum equation is the sign of the Coriolis term. In theTRIWAQ code the symmetry is exploited, the same subroutine is used for the momentum equationsin both stages, only the sign of the Coriolis term is dependent on the computational direction.

Stelling extended the ADI method of Leendertse with a special approach for the cross advectionterms, based on the dissipative reduced phase error scheme. The choice for the spatial discretizationis connected with the ADI time integration. In Chapter 4 we describe the spatial discretizations ofthe different terms. In Chapter 5 we give the ADI method for the complete system of the non-linearthree-dimensional shallow water equations and the transport equation.

84

Page 85: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 4. Space discretization of the differential equations

Chapter 4

Space discretization of the differentialequations

This chapter deals with the space discretizations of the separate terms of the governing equationsin the inner region. Discretizations due to the boundary conditions are treated in Chapter 7. Dis-cretizations at the subdomain interfaces of a domain decomposition are discussed in [2]. In Sections4.1, 4.3, 4.4 and 4.5 we spatially discretize the depth- and layer-averaged continuity and the layer-averaged u- and v-momentum equations, respectively. The discretization should be at least secondorder accurate. Section 4.7 deals with the discretization of the layer-averaged transport equationfor an arbitrary scalar quantity, whereas in Sections 4.8 and 4.9 the vertical and depth-averaged k-εmodels are treaded, respectively. Finally, in Sections 4.10 the physical vertical velocity w is com-puted, and in 4.11 the discretization of the w-momentum equation for non-hydrostatic calculationsis described. We use the notation introduced in the previous chapter.

4.1 Discretization of the depth-averaged continuity equation

The discretization of the continuity equation is based on the finite-volume method in the physicalspace. We integrate the continuity equation over a control volume Ωmn. To guarantee conservationof volume, the time derivative of the storage in a cell should equal the balance of the amount ofwater (volume fluxes) passing through the cell faces per unit of time. The discharge through a wetcell boundary is dependent on the normal velocity component which is defined in the centre of thecell boundary, the width of the cell boundary (grid size) and the flow through height (total waterdepth).

In WAQUA & TRIWAQ the Cartesian velocity components are replaced by components in thecurvilinear system, which are perpendicular to the grid lines. Such components are convenientfor a mass-conserving discretization of the continuity equation. In WAQUA, only the direction istransformed, the length of a vector is the same as in the physical space.

The depth-averaged continuity equation (2.121) is discretized at a water level point (m,n,k). First,

Version 3.17, November 2016 85

Page 86: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

we define

HUm,n =K∑k=1

hum,n,k um,n,k and HV m,n =

K∑k=1

hvm,n,k vm,n,k (4.1)

Discretization of (2.121) yields:

∂ζm,n∂t

+ 1(√g∗)m,n

(HUm,n(

√gηη)m,n −HUm−1,n(

√gηη)m−1,n

+HV m,n(√gξξ)m,n −HV m,n−1(

√gξξ)m,n−1

)= 0

(4.2)

with(√g∗ )m,n = (

√gξξ)

η

m,n(√gηη)

ξ

m,n(4.3)

the determinant of the Jacobian of the transformation, corresponding with the area of the grid cellΩmn in a water level point. Time discretization of the first term of (4.2) will be treated in Chapter 5.It should be mentioned that the user may force the flow by means of local discharge rates. Detailson the implementation of local discharges in the continuity equation (4.2) can be found in Chapters5 and 6.

4.2 Upwind computation of water depth

Due to the staggered grid the water level and bottom depth are not defined in the centre of the cellboundaries. In WAQUA the total water depth for the computation of the discharge through a cellboundary is normally determined by the arithmetic average of the depth in the corner points of thecell boundary plus the average of the water levels on each side of that boundary:

HUm,n = dη + 0.5 ∗ (ζm+1,n + ζm,n) (4.4)

Around low water in shallow areas in the neighbourhood of a deep channel, or at high water neara summer dike, the application of the average water level may lead to a negative total water depthand drying of the velocity point. These cases are described in detail in Chapter 8. The velocitycomponent across a dry cell boundary is set to zero. For the cases described, the drying is physicallynot correct. Therefore WAQUA was extended [27] with an option to determine the water levels atthe cell boundaries with a so-called upwind approach. This approach was already suggested in [63]for shallow regions. The upwind flow through height in a U -velocity point based on an upwindwater level is given by:

HUm,n =

dη + ζm,nif Um,n > 0dη + ζm+1,nif Um,n < 0dη + max(ζm,n, ζm+1,n)if Um,n = 0

(4.5)

The definition of the upwind total water depth HVm,n in a V -velocity point is similar. The upwind

approach is physically more realistic for weir like situations between cells with different bottomdepth at low water and falling tide. Upwinding the water level in the determination of the total waterdepth (flow through height) enhances the discharge because the upwind water level is generally

86

Page 87: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 4. Space discretization of the differential equations

higher than the average water level, resulting in a larger flow area, which allows the water levelgradient to drive a larger amount of water into the neighbouring cell during the next time step.Taking the maximum of the two surrounding water levels at a dry cell boundary prevents that a cellboundary is artificially kept dry, see Section 7.5 (Figures 7.5 and 7.6).

The total water depth at a U-velocity point may be expressed with a parameter θUm,n:

HUm,n = dη + θUm,nζm,n + (1 − θUm,n)ζm+1,n

θUm,n =

1.0 if Um,n > 00.0 if Um,n < 01.0 if ζm,n ≥ ζm+1,n ∧ Um,n = 00.0 if ζm,n < ζm+1,n ∧ Um,n = 0

(4.6)

The parameter θUm,n is dependent on the solution (Um,n, ζm,n )of the previous half time step. Theaverage water level corresponds with taking θUm,n = 1/2. In WAQUA the choice between upwindand average for the water level in a U -point is controlled by the switch UPWIND_ZETA in theuser-input.

In barrier and weir points always the upwind water level is always taken. For a detailed descriptionof the discretizations at barrier points we refer to [32].

4.3 Discretization of the layer-averaged continuity equation

Just as in the depth-averaged case we discretize the layer-averaged continuity equation (2.120) ata water level point. With this discretized equation the relative velocity ωm,n,k is computed. At thebottom ω = 0 is imposed. Discretization gives:

ωm,n,K = 0

ωm,n,k−1 = ωm,n,k −∂hζm,n,k∂t− 1

(√g∗)m,n

(hum,n,kum,n,k

(√gηη)m,n

− hum−1,n,kum−1,n,k

(√gηη)m−1,n

+ hvm,n,kvm,n,k(√

gξξ)m,n

−hvm,n−1,kvm,n−1,k

(√gξξ)m,n−1

), k = K,K − 1, · · · , 1

(4.7)

where (√g∗)m,n is given by (4.3). Note that ωm,n,0 should be zero, because of mass conservation.

If ωm,n,0 6= 0 occurs in the calculation this may be caused by inadequate boundary conditions; forinstance, the boundary conditions for velocities do not satisfy the incompressiblity condition. Itshould be mentioned that the user may force the flow by means of local discharge rates. Details onthe implementation of local discharges in the continuity equation (4.7) can be found in Chapter 6.

Version 3.17, November 2016 87

Page 88: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

4.4 Discretization of the u-momentum equation

Concerning the discretization of the u-momentum equation (2.123) we distinguish between thetime-derivative, the horizontal advection terms including curvature terms, the vertical advectiveterm, the barotropic water level gradient, the baroclinic pressure gradient due to density gradients,the horizontal and vertical viscous terms and the Coriolis term. These terms are discretized in the u-velocity points. In this chapter we only deal with the discretizations at the inner points, the treatmentof the boundaries is discussed in Chapter 7.

4.4.1 Time derivative

The time derivative is approximated by∂ um,n,k∂t

(4.8)

where (m,n,k) is a u-velocity point. As mentioned before, time discretization will be discussed inChapter 5.

4.4.2 Horizontal advective terms including curvature: WAQUA-scheme

The choice of the spatial discretization of the advective terms has great influence on the accuracy,monotonicity and efficiency of the computational method. Central differences are second orderaccurate, but may give rise to non-physical spurious oscillations, so-called “wiggles” ([21]) in thesolution. These wiggles arise in the vicinity of steep gradients of the quantity to be resolved. Inshallow water flow these wiggles may be introduced near closed boundaries and thin dams. Onthe other hand, first order upwinding is unconditionally wiggle-free or monotone, thus promotingthe stability of the solution process, but introduces a truncation error, which has the form of asecond-order artificial viscosity term (see e.g. [89]). In advection-dominated flows, this artificialviscosity dominates the physical viscosity and the computed solution is much more smooth than thecorrect one. Higher order upwinding is not free from numerical oscillations but introduces fourth-order artificial viscosity. This higher order viscosity suppresses the wiggles without smoothing thesolution too much.

The discretization of the advection terms that is applied in the WAQUA-system was introduced byStelling [63]. The spatial discretization of the advection term u∂u/∂ξ and the cross advection termv∂u/∂η differ. For u∂u/∂ξ, a central difference operator is applied:

u√gξξ

∂u

∂ξ

∣∣∣∣m,n

≈ um,n(√gξξ)ξηm,n

um+1,n − um−1,n

2∆ξ(4.9)

in both ADI stages while the discretization for the cross advection term v∂u/∂η is based on thereduced phase error scheme [63]. It is a splitting of a third order upwind finite difference schemefor the first derivative into two second order consistent discretizations, which are successively usedin both stages of the ADI-scheme. The scheme is denoted as a Cyclic Method [65, 89]. To keep thenumerical viscosity as small as possible only v∂u/∂η is approximated by the Cyclic Method.

88

Page 89: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 4. Space discretization of the differential equations

This third-order upwind discretization, given by:

v√gηη

∂u∂η

∣∣∣m,n≈

vξηm,n

(√gηη)m,n

um,n+2 + 4um,n+1 + 18um,n− 28um,n−1 + 5um,n−2

24∆ηfor vξηm,n ≥ 0

vξηm,n

(√gηη)m,n

−5um,n+2 + 28um,n+1− 18um,n− 4um,n−1−um,n−2

24∆ηfor vξηm,n < 0 (4.10)

is the sum of the following two other second-order consistent approximations:

v√gηη

∂U∂η

∣∣∣m,n≈ vξηm,n

(√gηη)m,n

Soηum,n =vξηm,n

(√gηη)m,n

um,n+2 + 4um,n+1 − 4um,n−1−um,n−2

12∆η (4.11)

and

v√gηη

∂u

∂η

∣∣∣∣m,n

≈vξηm,n(√gηη)m,n

S+ηum,n =

vξηm,n

(√gηη)m,n

3um,n− 4um,n−1 +um,n−2

2∆ηfor vξηm,n ≥ 0

vξηm,n

(√gηη)m,n

−3um,n + 4um,n+1−um,n+2

2∆ηfor vξηm,n < 0

(4.12)

where S+η and S0η are finite difference operators. Transformation of the advection terms to anorthogonal curvilinear grid introduces curvature terms:

uv√g∗

∂√gξξ

∂ηand

v2

√g∗

∂√gηη

∂ξ(4.13)

These terms are discretized straightforwardly:

uv√g∗

∂√gξξ∂η≈ uv√

g∗D0η

(√gξξ)m,n

=um,nv

ξηm,n

(√g∗)m,n

“(√gξξ)m,n+(

√gξξ)m+1,n

−(√gξξ)m,n−1

−(√gξξ)m+1,n−1

”2∆η

V 2√g∗

∂√gηη∂ξ≈ v2√g∗D0ξ

(√gηη)

=(vξηm,n)2

(√g∗)m,n

((√gηη)

m+1,n−(√gηη)

m−1,n)2∆ξ

(4.14)with

(√g∗)m,n = (

√gξξ)

ξη

m,n(√gηη)m,n (4.15)

D0ξ and D0η are finite difference operators. The Jacobian is computed using averaging of the gridlength

√gξξ. At solid walls the no-slip condition is enforced. Near the boundaries the higher order

discretization stencils for the advection terms contain grid points on or across the boundary. To avoidan artificial boundary layer or instabilities, the discretizations have to be reduced to lower orderdiscretizations with smaller stencils. Stelling [63] introduced the numerical boundary treatmentimplemented in WAQUA. For more details we refer to Chapter 7.

Version 3.17, November 2016 89

Page 90: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

4.4.3 Horizontal advective terms including curvature: TRIWAQ-scheme

The spatial discretization of the horizontal advective terms and the curvature terms differ. Moreover,in each stage of the ADI iteration the horizontal advective terms are discretized in different way inorder to maintain the second order accuracy in time. See Chapter 3.

The first horizontal advective term of the u-momentum equation (2.123), viz.

uk√gξξ

∂ uk∂ξ

(4.16)

is discretized by central differences:

S0ξ[u, u] =1

2

um,n,k

(√gξξ)

ξη

m,n

(um+1,n,k−um−1,n,k) (4.17)

For the abovementioned reason, we also approximate (4.16) by means of second order upwindscheme:

Su0ξ[u, u] =

12

um,n,k

(√gξξ)

ξη

m,n

(3um,n,k−4um−1,n,k +um−2,n,k), if um,n,k > 0

12

um,n,k

(√gξξ)

ξη

m,n

(−3um,n,k +4um+1,n,k−um+2,n,k), if um,n,k < 0(4.18)

Note that S0ξ and S+ξ represent the central difference and upwind difference operators, respectively,in ξ-direction.

Application of central differences to the second horizontal advective term of the u-momentum equa-tion (2.123), viz.

vk√gηη

∂ uk∂η

(4.19)

yields:

S0η[v, u] =1

2

vξηm,n,k(√gηη )m,n

(um,n+1,k−um,n−1,k) (4.20)

The second order upwind scheme with respect to (4.19) is obtained by

Su0η[v, u] =

12

vξηm,n,k(√gηη)m,n

(3um,n,k−4um,n−1,k +um,n−2,k), if vξηm,n,k > 0

12

vξηm,n,k(√gηη)m,n

(−3um,n,k +4um,n+1,k−um,n+2,k), if vξηm,n,k < 0

(4.21)

Note that S0h and S+h represent the central difference and upwind difference operators, respectively,in h-direction.

Next, we consider the discretization of the curvature terms given by

uk vk√g∗

∂√gξξ

∂ηand

v2k√g∗

∂√gηη∂ξ

(4.22)

90

Page 91: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 4. Space discretization of the differential equations

which yields:

S0η[uv,√gξξ] = 1

2

um,n,k vξηm,n,k

(√g∗)m,n

((√gξξ)m,n + (

√gξξ)m+1,n

− (√gξξ)m,n−1

− (√gξξ)m+1,n−1

)S0ξ[v

2,√gηη] = 1

2

(vξηm,n,k )2

(√g∗)m,n

((√gηη)m+1,n

− (√gηη)m−1,n

)(4.23)

with(√g∗ )m,n = (

√gξξ)

ξη

m,n(√gηη )m,n (4.24)

4.4.4 A conservative discretization for the horizontal advective terms

The discretizations of the horizontal advective terms of the previous section are largely accordingto those developed in [63]. An alternative momentum conserving scheme was proposed in [99] andhas been implemented in TRIWAQ too.

This scheme starts from the layer-integrated u-momentum equation in conservative form:

∂hkuk∂t

+∂hku

2k

∂x+ uω|zk−1/2

zk+1/2+ ... = 0 (4.25)

A spatial discretization of Eq. (4.25) is given by

d(hs)x

m,n,kum,n,k

dt+um+1,n,kφ

x

m+1,n,k − um,n,kφx

m,n,k

∆x+ (4.26)

uzm,n,kωxm,n,k − uzm,n,k−1ω

xm,n,k−1 + ... = 0

with φ defined byφm,n,k = hum,n,kum,n,k (4.27)

Since the velocity component u is the primitive variable and not φ, Eq. (4.27) is not appropriatefor further implementation. For the reformulation, we first consider a discretized form of the layeraveraged continuity equation (2.120) in u-point (m,n, k):

d(hs)x

m,n,k

dt+φx

m+1,n,k − φx

m,n,k

∆x+ ωxm,n,k − ωxm,n,k−1 = 0 (4.28)

Multiplying Eq. (4.28) with um,n,k and substracting the result from Eq. (4.27), after which it isdivided by (hs)

x

m,n,k, yields

dum,n,kdt

+1

(hs)x

m,n,k

(φx

m+1,n,k(um+1,n,k − um,n,k)− φx

m,n,k(um,n,k − um,n,k)∆x

)

+ωxm,n,k

(hs)x

m,n,k

(uzm,n,k − um,n,k)−ωxm,n,k−1

(hs)x

m,n,k

(uzm,n,k−1 − um,n,k) + ... = 0 (4.29)

Version 3.17, November 2016 91

Page 92: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

Note that Eq. (4.29) guarantees conservation of momentum and thus valid for simulation of breakingwaves or bores, refer to Stelling and Duinmeijer [64] for more details.

The quantity um,n,k remains to be determined. Note that this quantity is defined in waterlevel lo-cations. For this two alternative discretisations are used that yield largely similar discretisations asdescribed in Section 4.4.3. The first one is a second order central approximation:

um,n,k =um,n,k + um+1,n,k

2(4.30)

The second one is a one-sided second order upwind scheme, see for instance [24]:

um,n,k =

32um−1,n,k − 1

2um−2,n,k if φ

x

m,n,k ≥ 032um,n,k − 1

2um+1,n,k if φ

x

m,n,k < 0(4.31)

If the direction of the flow is uniform and the water depth is constant, comparable coefficients areobtained as in equation (4.18).

4.4.5 Vertical advective term

In order to discretize the vertical advective term, viz.ωk−1

hk(u(zk−1)− uk)−

ωk

hk(u(zk)− uk) (4.32)

the velocity u(zk) is approximated second order accurate by means of Taylor expansion:

u(zk) ≈um,n,k+1 h

um,n,k +um,n,k h

um,n,k+1

hum,n,k +hum,n,k+1

(4.33)

Substitution in (4.32) gives

S0z[hu, ω, u] = ωξm,n,k−1

(um,n,k−1−um,n,khum,n,k−1 +hum,n,k

)+ ωξm,n,k

(um,n,k−um,n,k+1

hum,n,k +hum,n,k+1

)(4.34)

4.4.6 Water level gradient ∼ barotropic pressure gradient

The discretization of the water level gradient, viz.

g√gξξ

∂ζ

∂ξ(4.35)

is given byG0ξ[ζ] =

g

(√gξξ)

ξη

m,n

(ζm+1,n,k− ζm,n,k

)(4.36)

In the case of space-varying wind and pressure, the gradient of the atmospheric pressure is added:

1

ρ0√gξξ

∂Pa∂ξ≈ 1

ρ0

1

(√gξξ)

ξη

m,n

(Pa)m+1,n− (Pa)m,n∆ξ

(4.37)

This term is important for the simulation of storm surges.

92

Page 93: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 4. Space discretization of the differential equations

4.4.7 Baroclinic pressure gradient due to density gradients

For accurate simulations of the tidal flow in stratified estuaries, the density must be a function ofthe salinity. The salinity is governed by the transport (advection-diffusion) equation. Density dif-ferences introduce a so-called baroclinic pressure gradient, see Section 2.2.4. The density quantityρm,n is defined as the relative density difference with the ambient density ρ0. This increases theaccuracy in the computation of the baroclinic pressure gradient.

The pressure gradient due to density gradients (2.124) is discretized as follows:

PG0ξ[hu, hζ , ρ] =

g

ρξm,n,k(√

gξξ)ξηm,n

[1

2hum,n,k (ρm+1,n,k − ρm,n,k) + (4.38)

+k−1∑j=1

hum,n,j (ρm+1,n,j − ρm,n,j) +

(ρξm,n,j − ρ

ξm,n,k

)(hζm+1,n,j − h

ζm,n,j

)](4.39)

Remarks

In the TRIWAQ code the density ρξm,n,∗ in (4.38) has been augmented with constant ambient densityρ0 of sea water surrounding the model: ρξm,n,∗ ← ρ0 + ρξm,n,∗.

If the free surface layer varies in thickness we may obtain spurious currents due to the last term of(4.38) [39].

4.4.8 Energyloss due to weirs

The energy loss due to weirs is computed using the actual (depth averaged) flow situation and givenby ∆Em,n ([m]). It is incorporated into the momentum equation per layer by adding the followingterm:

∆Em,n1

(√gξξ)

ξη

m,n

um,n,kmax (0.01, |um,n,k|)

(4.40)

Note the correspondence of this term with the waterlevel gradient.

4.4.9 Horizontal viscous terms including curvature

In this section we describe the horizontal viscous terms for the case that the simplification of equa-tion (2.37) is used. The discretisation of the full Reynolds stress tensor is described below in Section4.4.10.

The discretization of the first horizontal viscous term in (2.123) with neglect of the cross-derivatives,viz.

1√gξξ

∂ F 1

∂ξ(4.41)

with

F1 =

νh√g∗

∂ξ(uk√gηη) (4.42)

Version 3.17, November 2016 93

Page 94: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

is given by

S0ξξ[u, v] =1

(√gξξ)

ξη

m,n

(F1m+1,n,k−F 1

m,n,k) (4.43)

withF 1m,n,k =

νm,n

(√gξξ)

η

m,n(√gηη)

ξ

m,n

(um,n,k(√gηη )m,n−um−1,n,k(

√gηη )m−1,n) (4.44)

The second horizontal viscous term,1√gηη

∂ F 2

∂η(4.45)

with

F2 =− νh√g∗

∂η(uk√gξξ) (4.46)

is approximated as follows:

S0ηη[v, u] =1

(√gηη )m,n

(F2m,n,k−F 2

m,n−1,k) (4.47)

withF 2m,n,k = νm.n

(√g∗)m,n

(um,n,k(√gξξ)

ξη

m,n− um,n+1,k(

√gξξ)

ξη

m,n+1) (4.48)

4.4.10 Discretization of the full Reynolds stress tensor

It is usually sufficient approximate the horizontal viscous terms using a constant horizontal viscosityνh, see Section 2.2.3 and equation (2.41). It is also possible to not make this simplification, and useapproximate the full Reynolds stress tensor instead of the horizontal viscous terms. One importantdifference of this is that the user-supplied constant νh is replaced by the space- and time-varying νvthat is computed with the vertical k − ε turbulence model.

The derivative of the normal stress (∂τxx/∂x, see eqs. (2.11) and (2.15)), is discretised with:

2

hk

∂ξ

(νvhk

∂u

∂ξ

)≈

2

(hs)ξ

m,n,k

√gξξ

ξη·

((νv)

z

m,n,k

um+1,n,k−um,n,k(√gξξ)

η

m+1,n

− (νv)z

m−1,n,k

um,n,k−um−1,n,k

(√gξξ)

η

m,n

)(4.49)

The shear stress-term ∂τxy/∂y is discretised with:

1

hk

∂η

(νvhk

(∂u

∂η+∂v

∂ξ

))≈ 1

(hs)ξ

m,n,k

√gηη·(νv)

ξηz

m,n,k(hu)η

m,n,k

um,n+1,k−um,n,k(√gηη)

ξ

m,n

+vm+1,n,k− vm,n,k

(√gξξ)

η

m,n

− (4.50)

(νv)ξηz

m,n−1,k(hu)η

m,n−1,k

um,n,k−um,n−1,k

(√gηη)

ξ

m,n−1

+vm+1,n−1,k− vm,n−1,k

(√gξξ)

η

m,n−1

94

Page 95: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 4. Space discretization of the differential equations

Finally the shear stress-term ∂τxz/∂z is considered. This is partly discretised through the verticalviscous term, see Section 4.4.11 below, and is further discretised with:

1

hk

∂z

(νv∂w

∂ξ

)≈ (4.51)

1

(hs)ξ

m,n,k

·

(νv)ξ

m,n,k−1 (wm+1,n,k−1 − wm,n,k−1)− (νv)ξ

m,n,k (wm+1,n,k − wm,n,k)

4.4.11 Vertical viscous term

The discretization of the vertical viscous term, viz.

1

hk

(νv∂u

∂z

∣∣∣∣zk−1

− νv∂u

∂z

∣∣∣∣zk

)(4.52)

is given by

S0zz[νv, hu, u] =

2

hum,n,k

((νv)

ξ

m,n,k−1

um,n,k−1−um,n,khum,n,k−1 +hum,n,k

− (νv)ξ

m,n,k

um,n,k−um,n,k+1

hum,n,k +hum,n,k+1

)(4.53)

Since, k and ε are located at ω-velocity points, so is the vertical eddy viscosity νv. Hence, it needsto be interpolated.

4.4.12 Coriolis force term

The Coriolis parameter f is dependent on the geographical latitude, see Eq. 2.13.

For interior points the V -velocity in the Coriolis force is determined by an arithmetic average of thefour surrounding V -velocity points

f vξηm,n,k (4.54)

The V -points on closed boundaries and thin dams are not excluded in the averaging. Near the openboundaries, the arithmetic averaging is based on the wet V -velocity points in the interior domain.

4.4.13 Bottom friction term

The bottom shear stress is proportional to the velocity squared. The direction of the shear stressis opposite to the flow. The Chézy values are defined at velocity points, e.g. Cu

2D. The averagedv-velocity at a u-point determined for the Coriolis term, is also used in the bottom friction term.

The bottom friction term for the u-momentum equation is discretized as:

gu |~u|hC2

3D

≈gum,n,K

√u2m,n,K + (vξηm,n,K)2

hum,n,K(Cu3D)2

(4.55)

More details can be found in Chapter 7.

Version 3.17, November 2016 95

Page 96: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

4.5 Discretization of the v-momentum equation

The discretization of the v-momentum equation (2.126) can be obtained easily by interchanging uand v in the contributions to the discrete u-momentum equation. Furthermore, the x/ξ- and y/η-directions and the m and n-indices are also interchanged. Finally the Coriolis term changes in sign:fv ↔ −fu. The discretization is carried out at a v-velocity point. Because of the large overlap thediscretized v-momentum equation is not detailed.

4.6 Space discretization figures

We will now illustrate the space discretization of all terms described in the previous sections. Acircle corresponds to the grid point of concern. A square denotes a grid point that is involved inthe space discretization. The horizontal and vertical arrows correspond to grid distances in ξ- andη-direction, respectively.

Figure 4.1: Space discretization for advection term u√gξξ

∂u∂ξ

∣∣∣m,n

in Eq. (4.9).

Figure 4.2: Space discretization for cross-advective term V√gηη

∂u∂η

∣∣∣m,n

in Eq. (4.11).

96

Page 97: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 4. Space discretization of the differential equations

Figure 4.3: Space discretization for cross-advective term v√gηη

∂u∂η

∣∣∣m,n

with v > 0 in Eq. (4.12).

Figure 4.4: Space discretization for cross-advective term v√gηη

∂u∂η

∣∣∣m,n

with v < 0 in Eq. (4.12).

Figure 4.5: Space discretization for advection curvature term uv√g∗

∂√gξξ∂η

in Eq. (4.14).

Figure 4.6: Space discretization for advection curvature term v2√g∗

∂√gηη∂ξ

in Eq. (4.14).

Version 3.17, November 2016 97

Page 98: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

Figure 4.7: Space discretization for Coriolis term fvξηm,n in Eq. (4.54).

Figure 4.8: Space discretization for bottom friction term gu|~u|HC2

3Din Eq. (4.55).

Figure 4.9: Space discretization for advective fluxes (Eq. (4.62), (4.64)) and diffusive fluxes (Eq.(4.77), (4.78)) in transport equation.

98

Page 99: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 4. Space discretization of the differential equations

4.7 Discretization of the transport equation

4.7.1 Finite volume strategy

The discretization of the transport equation (2.127) for an arbitrary constituent is carried out at awater level point, because the constituent is located at that point. Since this transport equation iswritten in conservation form, it can be discretized in a natural manner by means of the finite volumemethod. The equation is integrated over a control volume centered at a water level point. Using theGauss divergence theorem, the volume integrals containing terms under differential operators can beconverted into surface integrals over the cell-faces. The time derivative and the source term as wellas the latter four terms of (2.127) can not be expressed as differentials of fluxes across cell-facesand must therefore approximated in a different way. Let us consider the following term

1√g∗

∂ Qα

∂ ξα(4.56)

where Qα is a flux across cell face ξα = constant (α = 1,2). Integration of (4.56) over a cell centeredat water level point (m,n) gives

∫Ωmn

1√g∗

∂ Qα

∂ ξαdΩ = ∫

Gmn

∂ Qα

∂ ξαdξdη

≈ Q1m,n−Q1

m−1,n +Q2m,n−Q2

m,n−1

(4.57)

since√g∗ equals the volume of cell Ωmn. Terms that can not be expressed as differentials of fluxes

across cell-faces will be approximated using the midpoint rule. If S is such a term, then it isdiscretized as follows:

∫Ωmn

SdΩ ≈ (√g∗)m,n Sm,n (4.58)

The transport equation (2.127) is integrated over a control volume centered at a water level pointwhich yields:

(√g∗)m,n

∂ hζm,n,k

cm,n,k

∂t+ P

ξm,n,k−P

ξm−1,n,k

+Pηm,n,k−P

ηm,n−1,k + (

√g∗)m,n[ωk−1 c(zk−1)− ωk c(zk)] =

Qξm,n,k−Q

ξm−1,n,k +Qη

m,n,k−Qηm,n−1,k

+ (√g∗)m,nDv

∂c∂z

∣∣zk−1

zk+ (√g∗)m,n h

ζm,n,k (Sc)m,n,k

+Aξm−1,n,k−A

ξm,n,k +A

ηm,n−1,k−A

ηm,n,k +

− (√g∗)m,ngξξ

Dh∂c∂ξ

∂z∂ξ

∣∣∣zk−1

zk− (√g∗)m,ngηη

Dh∂c∂η

∂z∂η

∣∣∣zk−1

zk

+(√g∗)m,ngξξ

Dh

(∂z∂ξ

)2∂c∂z

∣∣∣∣zk−1

zk

+(√g∗)m,ngηη

Dh

(∂z∂η

)2∂c∂z

∣∣∣∣zk−1

zk

(4.59)

Version 3.17, November 2016 99

Page 100: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

where(√g∗)m,n = (

√gξξ)

η

m,n(√gηη)

ξ

m,n(4.60)

and P γ , Qγ and Aγ (g = ξ,η) are cell-face fluxes containing cell-face values (advection) and deriva-tives (diffusions), respectively:

P ξ =√gηη hk uk ck, P η =

√gξξ hk vk ck

Qξ = Dh hk√

gηηgξξ

∂ ck∂ξ, Qη = Dh hk

√gξξgηη

∂ ck∂η

Aξ = Dh hk√

gηηgξξ

∂ zk∂ξ

∂c∂z

(zk−1/2), Aη = Dh hk√

gξξgηη

∂ zk∂η

∂c∂z

(zk−1/2)

(4.61)

with zk = 12(zk−1 + zk). The fluxes P ξ, Qξ and Aξ are evaluated at a u-velocity point, while P η, Qη

and Aη are given at v-velocity point. Since the constituent c is only given in the water level point,further approximation is needed with respect to these cell-face fluxes. This will be discussed below.The cell-face fluxes Aξ and Aη and the latter four terms (actually eight) of (4.59) are the so-calledanti-creepage terms.

In the next five sections we calculate the following contributions to the transport equation: thehorizontal advective fluxes, the vertical advective term, the horizontal diffusive fluxes, the verticaldiffusive term and the anti-creepage terms. The discretization of the time derivative will be treatedin Chapter 5.

4.7.2 Horizontal advective fluxes: WAQUA-scheme

In each stage of the ADI iteration the horizontal advective terms are discretized in different way inorder to maintain the second order accuracy in time. In WAQUA the first horizontal advective termP ξ is discretized using the second order upwind scheme:

P+ξ,um,n =

(√gηη)m,n h

um,n um,n

3 cm,n− cm−1,n

2, if um,n > 0

(√gηη)m,n h

um,n um,n

3 cm+1,n− cm+2,n

2, if um,n < 0

(4.62)

For the abovementioned reason, we also approximate P ξ by means of central differences:

Pξm,n,k =

1

2(√gηη)m,n h

um,n um,n(cm+1,n + cm,n) (4.63)

Note that P x and P+x represent the central difference and upwind difference operators, respectively,in x-direction.

Application of second order upwind scheme to the second horizontal advective flux yields:

P+η,vm,n =

(√gξξ)m,n h

vm,n vm,n

3 cm,n− cm,n−1

2, if vm,n > 0

(√gξξ)m,n h

vm,n vm,n

3 cm,n+1− cm,n+2

2, if vm,n < 0

(4.64)

100

Page 101: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 4. Space discretization of the differential equations

The central difference scheme is obtained by

Pηm,n =

1

2(√gξξ)m,n h

vm,n vm,n(cm,n+1 + cm,n) (4.65)

For the velocity points at the open boundary, the fluxes are determined with one-sided approxima-tions of the concentrations:

cUm,n =

cm,n ifum,n ≥ 0cm+1,n ifum,n < 0

(4.66)

and

cVm,n =

cm,n if vm,n ≥ 0cm,n+1 if vm,n < 0

(4.67)

On a completely smooth grid, the discretization is second order accurate and does not generate odd-even decoupling (wiggles) in regions with steep gradients. This is not the case for the second ordercentral difference scheme which was used before. The occurrence of wiggles is dependent on thegrid Péclet number. Wiggles are always avoided if

Pe∆x =|U |√gξξDH

≤ 2 (4.68)

For the approximation of the total water depth HU and HV at the velocity points we use the sameapproximation as in the discretized conservation equation of mass, see Section 4.1.

4.7.3 Horizontal advective fluxes: TRIWAQ-scheme

For TRIWAQ the first horizontal advective term P ξ is discretized using the fourth order upwindscheme of Stelling and Leendertse [65]:

P+ξ,um,n,k =

(√gηη)m,n h

um,n,k um,n,k

10 cm,n,k −5 cm−1,n,k + cm−2,n,k

6, if um,n,k > 0

(√gηη)m,n h

um,n,k um,n,k

10 cm+1,n,k −5 cm+2,n,k + cm+3,n,k

6, if um,n,k < 0

(4.69)

For the abovementioned reason, we also approximate P ξ by means of central differences:

Pξm,n,k =

1

2(√gηη)m,n h

um,n,k um,n,k(cm+1,n,k + cm,n,k) (4.70)

Note that P x and P+x represent the central difference and upwind difference operators, respectively,in x-direction.

Application of fourth order upwind scheme to the second horizontal advective flux yields:

P+η,vm,n,k =

(√gξξ)m,n h

vm,n,k vm,n,k

10 cm,n,k −5 cm,n−1,k + cm,n−2,k

6, if vm,n,k > 0

(√gξξ)m,n h

vm,n,k vm,n,k

10 cm,n+1,k −5 cm,n+2,k + cm,n+3,k

6, if vm,n,k < 0

(4.71)

Version 3.17, November 2016 101

Page 102: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

The central difference scheme is obtained by

Pηm,n,k =

1

2(√gξξ)m,n h

vm,n,k vm,n,k(cm,n+1,k + cm,n,k) (4.72)

4.7.4 Vertical advective term

In order to discretize the vertical advective term, viz.

(√g∗)m,n[ωk−1 c(zk−1)− ωk c(zk)] (4.73)

the concentration c(zk) is approximated second order accurate by means of Taylor expansion:

c(zk) =cm,n,k+1 h

ζm,n,k + cm,n,k h

ζm,n,k+1

hζm,n,k +h

ζm,n,k+1

(4.74)

Substitution in (4.73) givesωm,n,k−1 P

zm,n,k−1−ωm,n,k P z

m,n,k (4.75)

with

Pzm,n,k = (

√g∗)m,n

cm,n,k+1 hζm,n,k + cm,n,k h

ζm,n,k+1

hζm,n,k +h

ζm,n,k+1

(4.76)

4.7.5 Horizontal diffusive fluxes

The discretization of the first horizontal diffusion flux reads:

Qξm,n,k = (Dh)

ξ

m,n,k hum,n,k

(√gηη)m,n

(√gξξ)

ξη

m,n

(cm+1,n,k− cm,n,k) (4.77)

whereas for the second horizontal diffusion flux, we have

Qηm,n,k = (Dh)

η

m,n,k hvm,n,k

(√gξξ)m,n

(√gηη)

ξη

m,n

(cm,n+1,k− cm,n,k) (4.78)

Note that the horizontal eddy diffusivity Dh is located at water level points.

4.7.6 Vertical diffusive term

The discretization of the vertical diffusion flux, viz.

(√g∗)m,nDv

∂c

∂z

∣∣∣∣zk−1

zk

(4.79)

is obtained byQzm,n,k−1−Qz

m,n,k (4.80)

withQzm,n,k = 2 (

√g∗)m,n (Dv)m,n,k

cm,n,k− cm,n,k+1

hζm,n,k +h

ζm,n,k+1

(4.81)

Since (2.76), the vertical eddy diffusivity Dv is located at ω-velocity points.

102

Page 103: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 4. Space discretization of the differential equations

4.7.7 Anti-creepage terms

The anti-creepage expressions consist of the following three groups of terms:

1) Aξm,n,k, A

ηm,n,k

2) Bξ =(√g∗)m,ngξξ

Dh∂c∂ξ

∂z∂ξ, Bη =

(√g∗)m,ngηη

Dh∂c∂η

∂z∂ηat zk

3) Cξ =(√g∗)m,ngξξ

Dh

(∂z∂ξ

)2∂c∂z, Cη =

(√g∗)m,ngηη

Dh

(∂z∂η

)2∂c∂zat zk

(4.82)

Note that the terms of the latter two groups must also be evaluated at zk−1. Hence, there are in total10 anti-creepage terms in the equation (4.59). The first term of the first group is approximated atu-velocity point (m,n,k) as follows:

Aξm,n,k = (Dh)

ξ

m,n,k hum,n,k

(√gηη)m,n

(√gξξ)

ξη

m,n

(zζm+1,n,k−1− zζm,n,k−1

+ zζm+1,n,k− zζm,n,k)

cξm,n,k−1− cξm,n,k+1

hum,n,k−1 +2hum,n,k +hum,n,k+1

(4.83)

where zζm,n,k is evaluated at a water level point. Similarly, Aηm,n,k is approximated at v-velocity point(m,n,k):

Aηm,n,k = (Dh)

η

m,n,k hvm,n,k

(√gξξ)m,n

(√gηη)

ξη

m,n

(zζm,n+1,k−1− zζm,n,k−1

+ zζm,n+1,k− zζm,n,k)

cηm,n,k−1− cηm,n,k+1

hvm,n,k−1 +2hvm,n,k +hvm,n,k+1

(4.84)

The second and third groups of (4.82) need to be evaluated at ω-velocity points. First, the discretiza-tion of the second group of terms is given by

Bξm,n,k =

1

4

(√g∗)m,n

(gξξ)η

m,n

(Dh)z

m,n,k(czm+1,n,k− czm−1,n,k)(z

ζm+1,n,k− z

ζm−1,n,k) (4.85)

and

Bηm,n,k =

1

4

(√g∗)m,n

(gηη)ξ

m,n

(Dh)z

m,n,k(czm,n+1,k− czm,n−1,k)(z

ζm,n+1,k− z

ζm,n−1,k) (4.86)

with(Dh)

z

m,n,k = 12

((Dh)m,n,k + (Dh)m,n,k+1

)czm,n,k =

hζm,n,k

cm,n,k+1 +hζm,n,k+1

cm,n,k

hζm,n,k +h

ζm,n,k+1

(4.87)

Finally, the terms of the third group are discretized as follows:

Cξm,n,k = 1

2

(√g∗)m,n

(gξξ)η

m,n

(Dh)z

m,n,k

(zζm+1,n,k− z

ζm−1,n,k

)2cm,n,k − cm,n,k+1

hζm,n,k +h

ζm,n,k+1

Cηm,n,k = 1

2

(√g∗)m,n

(gηη)ξ

m,n

(Dh)z

m,n,k

(zζm,n+1,k− z

ζm,n−1,k

)2cm,n,k − cm,n,k+1

hζm,n,k +h

ζm,n,k+1

(4.88)

Version 3.17, November 2016 103

Page 104: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

4.8 Discretization of the vertical k-ε model

The turbulence quantities k and ε are located at the ω-velocity points. In this way, the discretizationof the production and buoyancy terms as given in (2.99) and (2.100), respectively, is more accuratethan in the case when the turbulence quantities are located at the water level points [19].

In this section we restrict ourselves to the discretization of the k-equation (2.128). The discretizationof the ε-equation (2.129) can be obtained easily by simply replacing k by ε.

4.8.1 Time derivative

The discretization of the time derivative reads:

∂ km,n,k∂t

(4.89)

where (m,n,k) is a ω-velocity point. Note that the time discretization will be treated in Chapter 5.

4.8.2 Horizontal and vertical advective terms

The first horizontal advective term in (2.128), viz.

u√gξξ

∂k

∂ξ(4.90)

is approximated using the first order upwind scheme:

Su0ξ[u, k] =

uξzm,n,k

(√gξξ)

η

m,n

(km,n,k− km−1,n,k), if uξzm,n,k > 0

uξzm,n,k

(√gξξ)

η

m,n

(km+1,n,k− km,n,k), if uξzm,n,k < 0

(4.91)

The reason for applying the first order upwind scheme is the following. Central and higher orderlinear upwind schemes are non-monotone. This means that they may give rise to unphysical oscilla-tions, typically in the vicinity of steep gradients of a quantity to be resolved. For linear and weaklycoupled equations, this feature is no more than a little optical defect. However, in strongly coupledand nonlinear situations at high Reynolds numbers, these numerical oscillations tend to grow in anunbounded manner, which prevents the solution to converge. This tendency makes them unsuitablefor turbulence model equations, like the k-ε type, which are generally highly nonlinear and havestrong coupling between equations. Therefore, the advective transport of turbulence quantities mustbe approximated with first order upwind schemes to ensure monotonicity. However, this schemeproduces numerical diffusion which dominates the physical diffusion. For this reason the horizontaldiffusion terms in the original k-equation (2.85) has been neglected [19].

Note that in TRIWAQ uξzm,n,k is calculated as the average in both ξ- and z-directions of u-velocityusing the fewest number of points. Hence,

uξzm,n,k =1

4(um−1,n,k +um,n,k +um−1,n,k+1 +um,n,k+1) (4.92)

104

Page 105: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 4. Space discretization of the differential equations

The discretization of the second horizontal advective term in (2.128), viz.

v√gηη

∂k

∂η(4.93)

is given by

Su0η[v, k] =

vηzm,n,k

(√gηη)

ξ

m,n

(km,n,k− km,n−1,k), if vηzm,n,k > 0

vηzm,n,k

(√gηη)

ξ

m,n

(km,n+1,k− km,n,k), if vηzm,n,k < 0

(4.94)

with

vηzm,n,k =1

4(vm,n−1,k + vm,n,k + vm,n−1,k+1 + vm,n,k+1) (4.95)

The vertical advective term is given by

ω∂k

∂z(4.96)

and is discretized as follows:

Su0z[ω, k] =

ωm,n,k

km,n,k − km,n,k+1

hζm,n,k+1

, if ωm,n,k > 0

ωm,n,kkm,n,k−1− km,n,k

hζm,n,k

, if ωm,n,k < 0

(4.97)

This discretization may result in a large error in the solution. The remedy for this is grid refinementuntil the numerical diffusion becomes small enough and thus negligible with respect to the physicalone.

4.8.3 Vertical diffusive term

The discretization of the vertical diffusive term, viz.

∂z

(νvσk

∂k

∂z

)(4.98)

is given by

S0zz[νv, k] = 2

σk(hζm,n,k +h

ζm,n,k+1)

(νv)

z

m,n,kkm,n,k−1− km,n,k

hζm,n,k

(νv)z

m,n,k+1km,n,k − km,n,k+1

hζm,n,k+1

(4.99)

Note that the vertical eddy viscosity is located at a ω-velocity point and hence, νv at water levelpoint is computed by averaging of the two values at the nearest layer interfaces.

Version 3.17, November 2016 105

Page 106: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

4.8.4 Production term

The discretization of the production term (2.99) is carried out at ω-velocity point (m,n,k) withcentral differences and linear interpolations in which the fewest number of neighbouring points aretaken. This yields:

(Pk )m,n,k = 4(νv )m,n,k

(uξm,n,k−uξm,n,k+1

hζm,n,k +h

ζm,n,k+1

)2

+

(vηm,n,k− v

ηm,n,k+1

hζm,n,k +h

ζm,n,k+1

)2 (4.100)

4.8.5 Buoyancy term

The discretization of the buoyancy term (2.100) is given by

(Bk )m,n,k = 2(νv )m,n,k

σρ

gρ0

ρm,n,k− ρm,n,k+1

hζm,n,k +h

ζm,n,k+1

(4.101)

where ρ0 is the ambient density of sea water surrounding the model.

Concerning the algebraic model discussed in Section 2.4.1.1, buoyancy is modelled by means ofdamping the length scale L and Prandtl/Schmidt number σc, which depend on the gradient Richard-son number

− g

ρ

∂ρ∂z(

∂u∂z

)2+(∂u∂z

)2 (4.102)

The discretization of this number at a ω-velocity point is given by

Rim,n,k = − g

2 ρzm,n,k

ρm,n,k − ρm,n,k+1

hζm,n,k +h

ζm,n,k+1(

uξm,n,k −uξm,n,k+1

hζm,n,k +h

ζm,n,k+1

)2

+

(vηm,n,k − v

ηm,n,k+1

hζm,n,k +h

ζm,n,k+1

)2 (4.103)

with

ρzm,n,k =ρm,n,k h

ζm,n,k+1 + ρm,n,k+1 h

ζm,n,k

hζm,n,k +h

ζm,n,k+1

(4.104)

which is second order accurate.

106

Page 107: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 4. Space discretization of the differential equations

4.9 Discretization of the depth-averaged k-ε model

In this section we shall describe the space discretization of the depth-averaged k− ε model (2.134)-(2.135). With respect to the grid staggering of the depth-averaged turbulence quantities k and ε,it is advantageous to locate these quantities at depth points (cell corners) since, the Reynolds shearstresses can be calculated more accurately without the need of interpolation. However, the averagingfor the computation of the normal stresses increases, because the horizontal eddy viscosity is definedat depth points. Nevertheless, these terms are considered to be less of importance.

The next subsection deals with the discretization of the Reynolds stresses (2.130)-(2.132) to beadded to the momentum equations (2.123) and (2.126), whereas the remaining subsections of thissection are concerned with the discretization of the depth-averaged transport equation for turbulentenergy k. The discretization of the ε-equation can be obtained easily by simply replacing k by ε.

4.9.1 Discretization of the Reynolds stresses in momentum equations

We restrict ourselves to the terms that are to be added to the u-momentum equation, i.e. eq. (2.131).These terms are discretized in the u-point as follows:

1

(√gξξ)ξη

m,n

((τ11)m+1,n,k − (τ11)m,n,k

)+ 1

(√gηη)m,n

((τ12)m,n,k − (τ12)m,n−1,k

)+

(τ12)ηm,n,k

(√g∗)m,n

((√gξξ)m+1,n

+(√

gξξ)m,n−(√

gξξ)m+1,n−1

−(√

gξξ)m,n−1

)+

12

((τ11)ξm,n,k−(τ22)ξm,n,k)(√g∗)

m,n

((√gηη)m+1,n

+(√

gηη)m+1,n−1

−(√

gηη)m,n−(√

gηη)m,n−1

) (4.105)

The Reynolds stresses are approximated as follows:

(τ11)m,n,k =2(νth)

ζ

m,n,k

(√gξξ)η

m,n

(um,n,k − um−1,n,k)

(τ12)m,n,k = (νth)dm,n,k

(1

(√gξξ)ξ

m,n

(vm+1,n,k − vm,n,k) + 1

(√gηη)η

m,n

(um,n+1,k − um,n,k)

)(τ22)m,n,k =

2(νth)ζ

m,n,k

(√gηη)ξ

m,n

(vm,n,k − vm,n−1,k)

(4.106)

Note that the shear stresses are calculated at depth points, whereas the normal stresses are computedat the centre of grid cell. As a consequence, the corresponding horizontal eddy viscosities areevaluated as:(νth)ζm,n,k

=1

4

(νt2D∣∣m,n

+ νt2D∣∣m−1,n

+ νt2D∣∣m,n−1

+ νt2D∣∣m−1,n−1

)+

1

2

(νv|m,n,k−1 + νv|m,n,k

)(4.107)

and

(νth)dm,n,k = νt2D|m,n + 1

8

(νv|m,n,k + νv|m+1,n,k + νv|m,n+1,k + νv|m+1,n+1,k +

νv|m,n,k−1 + νv|m+1,n,k−1 + νv|m,n+1,k−1 + νv|m+1,n+1,k−1

) (4.108)

Version 3.17, November 2016 107

Page 108: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

The discretization of (2.132) is treated in a similarly way. The Reynolds stresses are added to themomentum equations, if the depth-averaged k − ε model is selected by the user. The horizontaleddy viscosity due to dispersion and to be chosen by the user is implemented according to Section4.4.9.

4.9.2 Time derivative

The discretization of the time derivative reads:

∂km,n∂t

(4.109)

where (m,n) is a depth point. Note that the time discretization will be treated in Chapter 5.

4.9.3 Horizontal advective terms

The first horizontal advective term in (2.134), viz.

U√gξξ

∂k

∂ξ(4.110)

is approximated using the first order upwind scheme:

S+ξ

[U, k

]=

Uηm,n

(√gξξ)ξ

m,n

(km,n − km−1,n

), if U

η

m,n > 0

Uηm,n

(√gξξ)ξ

m,n

(km+1,n − km,n

), if U

η

m,n < 0

(4.111)

See Section 4.8.2 for the motivation of the choice of the first order upwind scheme. The discretiza-tion of the second horizontal advective term in (2.134), viz.

V√gηη

∂k

∂η(4.112)

is given by

S+η

[V, k

]=

Vξm,n

(√gηη)η

m,n

(km,n − km,n−1

), if V

ξ

m,n > 0

Vξm,n

(√gηη)η

m,n

(km,n+1 − km,n

), if V

ξ

m,n < 0

(4.113)

4.9.4 Horizontal diffusive terms

The first horizontal diffusive term in (2.134), viz.

1√g∗H

∂ξ

(H

√gηη√gξξ

νt2Dσk

∂k

∂ξ

)(4.114)

108

Page 109: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 4. Space discretization of the differential equations

is approximated by means of central differences, as follows:

S0ξξ[k] = 1

(√g∗)m,n

Hdm,n

(Hvm+1,n

(√gηη)ξη

m+1,n

(√gξξ)m+1,n

(νt2D)ξ

m+1,n

σk

(km+1,n − km,n

)−

Hvm,n

(√gηη)ξη

m,n

(√gξξ)m,n

(νt2D)ξ

m,n

σk

(km,n − km−1,n

)) (4.115)

In a similarly way, the second horizontal diffusion term of (2.134), viz.

1√g∗H

∂η

(H

√gξξ√gηη

νt2Dσk

∂k

∂η

)(4.116)

is discretized as

S0ηη[k] = 1

(√g∗)m,n

Hdm,n

(Hum,n+1

(√gξξ)ξη

m,n+1

(√gηη)m,n+1

(νt2D)η

m,n+1

σk

(km,n+1 − km,n

)−

Hum,n

(√gξξ)ξη

m,n

(√gηη)m,n

(νt2D)η

m,n

σk

(km,n − km,n−1

)) (4.117)

4.9.5 Production term

The discretization of the production term (2.133) is carried out with central differences and linearinterpolation. This yields:

(Pk

)m,n

= (νt2D)m,n

2

(Um+1,n+Um+1,n+1−Um−1,n−Um−1,n+1

4(√gξξ)ξ

m,n

)2

+

2

(Vm,n+1+Vm+1,n+1−Vm,n−1−Vm+1,n−1

4(√gηη)η

m,n

)2

+

(Vm+1,n−Vm,n

(√gξξ)ξ

m,n

+ Um,n+1−Um,n(√gηη)

η

m,n

)2 (4.118)

4.10 Discretization of the physical vertical velocity

For output purposes the physical vertical velocity w need to be computed at a water level point.This velocity is given in equation (2.20). For this, the time derivative of the layer intefaces has tobe calculated by means of the layer-averaged continuity equation (2.120). Since, the slow variationof the bottom in time is assumed to be neglected, the time derivative of zK at the bottom is zero.Hence, the discretization for the time derivative of each layer interface is given by

Version 3.17, November 2016 109

Page 110: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

∂zζm,n,K∂t

= 0

∂zζm,n,k−1

∂t=

∂zζm,n,k∂t− ωm,n,k−1 + ωm,n,k − 1

(√g∗)m,n

(hum,n,kum,n,k

(√gηη)m,n

−hum−1,n,kum−1n,k

(√gηη)m−1,n

+ hvm,n,kvm,n,k(√

gξξ)m,n

−hvm,n−1,kvm,n−1,k

(√gξξ)m,n−1

), k = K, K − 1, · · · , 1

(4.119)

where (√g∗)m,n is given by (4.3). Finally, using (2.20) the physical vertical velocity can be com-

puted, as follows:

wm,n,k = ωzm,n,k +∂zm,n,k∂t

z

+uξm,n,k

(√gξξ)η

m,n

(zzm,n,k − zzm−1,n,k

)+

vηm,n,k

(√gηη)ξ

m,n

(zzm,n,k − zzm,n−1,k

) (4.120)

4.11 Discretization of the w-momentum equation

In non-hydrostatic computations thew-momentum equation (2.116) is retained instead of being sim-plified to the hydrostatic pressure equation (2.16). The physical vertical velocity is then computedusing this momentum equation. Note that in hydrostatic computations the physical vertical velocityis computed from its relation to the relative velocity ωk, given in equation (2.20), and the velocityωk is determined from the continuity equation per layer once the positions of the layer interfacesand the horizontal velocities are known.

The w−momentum equation is is discretized in in ζ-points in layer interfaces. The discretized formis derived by first integrating equation (2.116) vertically over its control volume and then applyingappropriate finite difference schemes. The ω-velocity is replaced by w using the continuity equationper layer.

For simplicity we consider only the x- and z-directions and neglect advection and viscosity in y-direction.

dwm,kdt

+1

hz

m,k

φz

m,kwxm,k − φ

z

m−1,kwxm−1,k

∆x+

1

hz

m,k

∫ zk+1

zk

∂q

∂z

∣∣∣∣m

dz

+ωzm,k+1

2hz

m,k

(wm,k+1 − wm,k) +ωzm,k

2hz

m,k

(wm,k − wm,k−1)

+1

hz

m,k

(hxz

m,k(τzx)m,k − hxz

m−1,k(τzx)m−1,k

∆x

)+

(τzz)m,k+1 − (τzz)m,k

hz

m,k

= 0(4.121)

110

Page 111: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 4. Space discretization of the differential equations

Here φz

denotes the advection strength in x-direction, hkuk with appropriate vertical interpolation.The quantities τzx and τzz denote the horizontal and vertical viscosity terms.

Since, the accuracy of the frequency dispersion for relative short waves strongly depends on thediscretization of vertical motion, a second order compact scheme is applied for the approximationof the vertical gradient of non-hydrostatic pressure, allowing a very few number of vertical gridpoints with relative low numerical dispersion and dissipation [24].

Firstly, the w−momentum equation is considered at zk+1/2, Eq. (4.121), in which the pressuregradient ∂q/∂z is approximated through backward differencing. Subsequently the w−momentumequation is considered at zk−1/2 where the approximation of ∂q/∂z is obtained by means of forwarddifferencing. Thereafter, the average is taken of the discretized w−momentum equations at zk−1/2

and zk+1/2 onto the layer k. Thus, the integral of pressure gradient in Eq. (4.121) is approximatedby means of backward differencing:

1

hz

m,k+1/2

∫ zk+1

zk

∂q

∂z

∣∣∣∣m

dz =q(zm,k+1)− q(zm,k)

hz

m,k+1/2

≈qm,k+1/2 − qm,k−1/2

hm,k(4.122)

The w−momentum equation at interface zk−1/2 is obtained from Eq. (4.121) by decreasing theindex k by 1. However, the integral of pressure gradient is evaluated using forward differencing.This gives

1

hz

m,k−1/2

∫ zk

zk−1

∂q

∂z

∣∣∣∣m

dz =q(zm,k)− q(zm,k−1)

hz

m,k−1/2

≈qm,k+1/2 − qm,k−1/2

hm,k(4.123)

Finally, the average is taken of the w−momentum equations at interfaces zk−1/2 and zk+1/2, giving

d(wm,k+1/2 + wm,k−1/2)

2dt+

1

2

((Lww)m,k+1/2 + (Lww)m,k−1/2

)+qm,k+1/2 − qm,k−1/2

hm,k= 0 (4.124)

with Lw the discrete operator representing advection and stress terms as outlined before. Due to theuse of the compact scheme, equation (4.124) contains two time derivatives for w.

It must be emphasized that Eq. (4.124) is solved for layers 2 ≤ k ≤ K, i.e. including the free surfaceand excluding the bottom. Condition q|z=ζ = 0 can be readily incorporated in equation (4.124) fork = K as qm,K+1/2 = 0. At the bottom (k = 1), the kinematic condition w|z=−d = − u∂d/∂x isimposed.

Version 3.17, November 2016 111

Page 112: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

Chapter 5

Time discretization with an alternatingdirection implicit technique

The previous chapter deals with space discretization of shallow flow equations coupled with a num-ber of transport and turbulence equations that yields a system of instationary differential algebraicequations. For solving time-dependent problems, a number of strategies is available. A well-knownapproach is to apply the time-marching method in which the governing equations are solved onetime step after another. The next time step is tackled when a converged solution on the former timelevel is obtained. This chapter is concerned with time-marching integration of the time-dependentequations by means of an alternating direction implicit (ADI) factorization scheme. The ADI tech-nique provides a locally one-dimensional space splitting combined with an implicit treatment ineach (horizontal) direction, general leading to tridiagonal systems of equations.

First, in Section 5.1, the ADI scheme is applied to the continuity and momentum equations. Next,the time integration of the transport equation is described in Section 5.2, in which the vertical ad-vective and diffusive terms are discretized in time using the so-called θ-method. Then, Sections5.3 and 5.4 deal with the time discretization of the vertical and depth-averaged k-ε models, respec-tively. Moreover, concerning the turbulence source and sink terms, special measures are taken toensure that at no stage of the time stepping the turbulence quantities k and ε assume negative values.Section 5.5 discusses the time-integration of the Reynolds stresses due to 2D turbulence. FinallySection 5.6 describes the time-discretization of the non-hydrostatic effects in TRIWAQ: the pressurecorrection scheme and the time-discretization of the w-momentum equation.

This chapter deals with the finite difference framework for the time discretization of the governingequations in WAQUA and describes the iterative procedures to remove the non-linearities. BecauseWAQUA is applied to a wide range of flow conditions, basic requirements of the numerical methodwere:

• robustness (unconditionally stable)

• accuracy (at least second order)

• computational efficiency.

In WAQUA the system of ordinary differential equations, which is obtained by discretization in

112

Page 113: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 5. Time discretization with an alternating direction implicit technique

space of the governing conservation equations (see Chapter 4) is advanced in time with an Alter-nating Direction Implicit (ADI) scheme. The ADI-method was introduced for the shallow waterequations by Leendertse [36]. Stelling stabilized the method by a special higher-order dissipa-tive approximation of the cross advection term, see Section 4.4.2 [63]. The numerical method ofWAQUA is unconditionally stable and lacks second order artificial viscosity. To improve stability,the bottom stress is taken partly implicit for each half time step and is not second order in time.When the baroclinic forcing is included, the transport equation of salt is coupled to the momen-tum equations. The rate of change with respect to time of salinity is small compared to the rate ofchange of flow. Therefore the baroclinic pressure lags one half time step in time without affectingthe accuracy. As a result, the numerical method is subject to a weak stability condition based on theCourant number for internal waves.

An ADI-like method splits one time step into two stages. Each stage consists of half a time step. Inboth stages all the terms of the model equations are solved in a consistent way with at least secondorder accuracy in space. For each term the time levels are alternating. If in one stage a term istaken implicitly in time, this term will be taken explicitly in time in the other stage. The net resultwill be that each term of the equations is solved second-order accurate in time. The splitting in animplicit and explicit part is arranged in such a way that implicit coupling only occurs along gridlines without coupling in the other direction. The A.D.I. method requires the solution of a numberof uncoupled systems of equations for each row or column of grid points, see Chapter 8. In eachstage, only two time levels are needed. This requires less computer storage.

In the first stage the time level is proceeding from l to l+1/2. The corresponding simulation time isproceeding from t = l∆t to t = (l+1/2)∆t. In the second stage the time level is proceeding from l+1/2to l + 1. The time index is used as superscript in the difference equations.

For the staggered WAQUA grid the Courant number for wave propagation is defined as:

Cwave = 2∆t

√√√√gH

(1(

∆ξ√gξξ) +

1(∆η√gηη) ) (5.1)

Due to the implicit character of the ADI time integration, there is no Courant-Friederichs-Lewy(CFL) stability restriction on the time step, but Weare [91], Benqué [5], Stelling [63] show thatthe ADI-method becomes inaccurate for large time steps in combination with a complex geometryor topography. Complex means closed boundaries or channels with more than one angle of 90o.This inaccuracy is introduced by the splitting of the spatial operator in two directions. A tidal wavecannot travel more than once through two 90o bends in a “zigzagging” channel in one complete ADI-time step [63]. For large time steps the numerical characteristic cone does not contain the analyticalcharacteristic cone. This inaccuracy is called the ADI-effect. For Courant numbers defined by Eq.(5.1), the numerical solution becomes inaccurate if

Cwave ≥ 4√

2

Furthermore, the Crank Nicolson time integration of the horizontal viscosity term may generate anoscillating solution. To prevent oscillations the time step must satisfy

∆t ≤ 1

νH

(1(

∆ξ√gξξ)2 +

1(∆η√gηη)2

)−1

.

Version 3.17, November 2016 113

Page 114: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

In this chapter we present the time integration for the case of curvilinear coordinates, see Section2.6.

5.1 Time integration of the continuity and momentum equa-tions

In TRIWAQ, for the system of continuity and momentum equations we employ the ADI schemesimilar to those used by Stelling [63] and Leendertse [38]. The main features of this ADI methodhas been outlined in Chapter 3. The ADI method as implemented in TRIWAQ is as follows. Eachtime step is split up into two stages of each a half time step. Some terms of the governing equationsare treated implicitly along gridlines in ξ-direction and η-direction respectively on alternate halftime steps. The other terms are treated explicitly. The effect of this treatment is that each termof the equations is solved second order in time. In contrast to Stelling and Leendertse, the verticalviscous terms are integrated implicitly in the whole time step in order to maintain numerical stability.Details can be found in [33], where the stability analysis for the linearized version of the discretizedequations has been outlined. The ADI method is very efficient for time-dependent problems, but itcan also be applied to steady state problems.

For the time integration to be presented, the following notations are employed. The time step isdenoted as ∆t. The variables without any prime as superscript are at (previous) time t. The valuesof the variables with a single prime are taken at the time level t + ∆t/2, and the variables with adouble prime are at the new time level t+ ∆t.

We consider the first stage, i.e. the time level is proceeding from t to t + ∆t/2. The water levelgradient in the momentum equations and the derivative of the total discharge in the continuity equa-tion are taken implicitly in ξ-direction and explicitly in η-direction. Furthermore, the horizontal andvertical advective and vertical viscous terms of the v-momentum equation are treated implicitly,whereas the u-momentum equation is integrated explicitly except for the vertical viscous term andthe water level gradient. For the horizontal advection terms, two different spatial approximationsare employed. In the momentum equation where the water level gradient is treated implicitly, theadvection term is discretized explicitly using central differences. For the other momentum equation,the second order upwind scheme [62] is applied. The finite difference scheme for the complete timestep is second order accurate, neglecting the effect of the variation in gridsize. Hence, we have thefollowing system of algebraic equations. It consists of an independent system for v′:

v′m,n,k − vm,n,k∆t/2

+ Su0ξ[u, v′] + Su0η[v, v

′]

+S0ξ[uv′,√gηη]− S0η[u

2,√gξξ] + S0z[h

v, ω, v′] =

−G0η[ζ]− PG0η[hv, hζ , ρ] + S0ηη[u, v] + S0ξξ[v, u]

+S0zz[νv, hv, v′]− f uξηm,n,k

(5.2)

114

Page 115: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 5. Time discretization with an alternating direction implicit technique

and another coupled system for u′, ζ ′:u′m,n,k −um,n,k

∆t/2+ S0ξ[u

′, u] + S0η[v′, u]

+S0η[u′v′,√gξξ]− S0ξ[v

′2,√gηη] + S0z[h

u, ω, u] =

−G0ξ[ζ′]− PG0ξ[h

u, hζ , ρ] + S0ξξ[u, v′] + S0ηη[v

′, u]

+S0zz[νv, hu, u′] + f v′

ξη

m,n,k

(5.3)

ζ ′m,n + ∆t/2(√g∗)m,n

(U ′m,n (

√gηη)m,n−U

′m−1,n (

√gηη)m−1,n

)=

ζm,n + ∆t/2(√g∗)m,n

(Vm,n−1 (

√gξξ)m,n−1

−Vm,n (√gξξ)m,n

)+ ∆t/2

(√g∗)m,n

K∑k=1

Qm′,n′,k

(5.4)

Here

U ′m,n =K∑k=1

(hu)′m,n,k u

′m,n,k (5.5)

and Qm′,n′,k is the local discharge rate at discharge sources (m’,n’) described by the user.

The discharge rate need not be given at each layer. If this is the case, then the discharge is equallydistributed along the vertical. Furthermore, the meaning of the various terms S∗∗[.], G∗∗[.] andPG∗∗[.] can be found in Chapter 4.

Note that in u-momentum equation (5.3), ω and hu are evaluated at previous time step, but v is takenat first half time step. Also, in case of the v-momentum equation (5.2), u, ω, hv are taken from theprevious time step. The eddy viscosity νv is always based on information of the preceding time step.It should be noted that in [38], the vertical velocity in the u-momentum equation is taken on timelevel t + ∆t/2, whereas in our case ω is evaluated at the previous time step. For the representationof the variables and quantities given in (5.3) to (5.5) in the computational grid we refer to Tables3.2 and 3.3. In equation (5.3) three variables on time level t + ∆t/2 appear, namely, the velocityu′ and the adjacent two water levels ζ ′. In equation (5.4) together with (5.5) three variables attime t + ∆t/2 are also present, namely, ζ ′ and the two adjacent velocities u′. This yields a set ofcoupled algebraic equations for the velocity u′ and water level ζ ′. Substitution of U ′ obtained fromthe vertically integrated u-momentum equation into the depth-averaged equation (5.4) leads to anonlinear tridiagonal system in the unknown water levels ζ ′ that need to be solved. This matter willbe discussed in more detail in Chapter 6.

In the second stage the time level increases from t + ∆t/2 to t + ∆t. In this stage the equations tobe solved consist of an independent part for u′:

u′′m,n,k −u′m,n,k∆t/2

+ Su0ξ[u′, u′′] + Su0η[v

′, u′′] +

S0η[u′′v′,√gξξ]− S0ξ[v

′2,√gηη] + S0z[(h

u)′, ω′, u′′] =

−G0ξ[ζ′]− PG0ξ[(h

u)′, (hζ)′, ρ′] + S0ξξ[u′, v′] +

S0ηη[v′, u′] + S0zz[νv, (h

u)′, u′′] + f v′ξη

m,n,k

(5.6)

Version 3.17, November 2016 115

Page 116: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

and another coupled part for v′, ζ ′:

v′′m,n,k − v′m,n,k∆t/2

+ S0ξ[u′′, v′] + S0η[v

′′, v′] +

S0ξ[u′′v′′,√gηη]− S0η[(u

′′)2,√gξξ] + S0z[(h

v)′, ω′, v′] =

−G0η[ζ′′]− PG0η[(h

v)′, (hζ)′, ρ′] + S0ηη[u′′, v′] +

S0ξξ[v′, u′′] + S0zz[νv, (h

v)′, v′′]− f u′′ξηm,n,k

(5.7)

ζ ′′m,n + ∆t/2(√g∗)m,n

(V ′′m,n (

√gηη)m,n−V

′′m,n−1 (

√gηη)m,n−1

)=

ζ ′m,n + ∆t/2(√g∗)m,n

(U ′m−1,n (

√gξξ)m−1,n

−U ′m,n (√gξξ)m,n

)+ ∆t/2

(√g∗)m,n

K∑k=1

Qm′,n′,k

(5.8)

Here

V ′′m,n =K∑k=1

(hv)′′m,n,k v

′′m,n,k (5.9)

and Qm′,n′,k is the local discharge rate at discharge sources (m’,n’) described by the user. Thedischarge rate need not be given at each layer. If this is the case, then the discharge is equallydistributed along the vertical. Furthermore, the meaning of the various terms S∗∗[.], G∗∗[.] andPG∗∗[.] can be found in Chapter 4.

We conclude that the two stages are nearly identical. The only difference is the order in which theu- and v-velocities are calculated and the timelevels of the velocities in most of the terms.

5.2 Time integration of the transport equation

The transport equation is solved for each half time step. The time integration follows the integrationprocedure for the continuity equation and combines an ADI scheme for the horizontal directionswith a fully implicit scheme in the vertical direction (see [63] and [65]). Yet, in the first stage allspace derivatives with respect to ξ and η are taken implicitly and explicitly, respectively. In thesecond stage this process is reversed. Furthermore, in the vertical direction the so-called θ-method,which is a weighted average between first order explicit and implicit Euler schemes, is employedin the whole time step. Finally, in each stage, we employ the fourth order upwind scheme ofStelling and Leendertse [65] for the approximation of horizontal implicit advection terms, whereasthe explicit terms are discretized with central differences.

The implementation of the source term Sc in (4.59) is as follows. First, a distinction is made betweenglobal and local sources. Global sources (or sinks) are defined on the whole domain as described bythe user. On the other hand, constituent mass can enter the model at the location of the discharges, inwhich the user described local discharge rates. The discharge rateQm′,n′,k at a given discharge point(m′, n′) need not be given at each layer. If this is the case, then the discharge is equally distributedalong the vertical.

116

Page 117: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 5. Time discretization with an alternating direction implicit technique

Secondly, the source term Sc is treated by discriminating between positive and negative contribu-tions and arranging these in the following form

Sc = Spc + Snc c (5.10)

where Spc consists of positive contributions and Snc of negative ones. This form enhances diagonaldominance for the resulting coefficient matrix and thus improves numerical stability.

Considering the first stage, application of the ADI factorization to the horizontal terms and theθ-method to the vertical terms in (4.59) gives

(√g∗)m,n

(hζ)′m,n,kc′m,n,k−h

ζm,n,kcm,n,k

∆t/2+ (P+ξ)′m,n,k − (P+ξ)′m−1,n,k

+P ηm,n,k − P

ηm,n−1,k + θω′m,n,k−1(P z)′m,n,k−1 − θω′m,n,k(P z)′m,n,k

+(1− θ)ω′m,n,k−1Pzm,n,k−1 − (1− θ)ω′m,n,kP z

m,n,k =

(Qξ)′m,n,k − (Qξ)′m−1,n,k +Qηm,n,k −Q

ηm,n−1,k

+(√g∗)m,nh

ζm,n,k(S

nc )m,n,kc

′m,n,k + θ(Qz)′m,n,k−1 − θ(Qz)′m,n,k

+(1− θ)Qzm,n,k−1 − (1− θ)Qz

m,n,k + (√g∗)m,nh

ζm,n,k(S

pc )m,n,k

+(Aξ)′m−1,n,k − (Aξ)′m,n,k + Aηm,n−1,k − Aηm,n,k

+(Bξ)′m,n,k − (Bξ)′m,n,k−1 +Bηm,n,k −B

ηm,n,k−1

+(Cξ)′m,n,k−1 − (Cξ)′m,n,k + Cηm,n,k−1 − C

ηm,n,k

(5.11)

where θ lies between zero and unity. For the representation of the variables and quantities given in(5.11) in the computational grid we refer to Tables 3.2 and 3.3. Furthermore, the meaning of all theterms in (5.11) can be found in (4.69), (4.72), (4.76), (4.77), (4.78), (4.81), (4.83), (4.84), (4.85),(4.86) and (4.88).

For θ = 0 and θ = 1 we obtain the first order explicit and implicit Euler schemes, respectively, andfor θ = 1/2 we have the second order Crank-Nicolson scheme. The θ-method is unconditionallystable for 1/2 ≤ θ ≤ 1. In the range 0 ≤ θ < 1/2 a time step restriction is necessary. For reasons ofrobustness, only θ ∈ [1/2,1] can be chosen in TRIWAQ.

From t+ ∆t/2 to t+ ∆t, i.e. the second stage, the following discretized transport equation need to

Version 3.17, November 2016 117

Page 118: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

be solved:

(√g∗)m,n

(hζ)′′m,n,kc′′m,n,k−(hζ)′m,n,kc

′m,n,k

∆t/2+ (P ξ)′m,n,k − (P ξ)′m−1,n,k

+(P+η)′′m,n,k − (P+η)′′m,n−1,k + θω′′m,n,k−1(P z)′′m,n,k−1 − θω′′m,n,k(P z)′′m,n,k+

(1− θ)ω′′m,n,k−1(P z)′m,n,k−1 − (1− θ)ω′′m,n,k(P z)′m,n,k =

(Qξ)′m,n,k − (Qξ)′m−1,n,k + (Qη)′′m,n,k − (Qη)′′m,n−1,k

+(√g∗)m,n(hζ)′m,n,k(S

nc )′m,n,kc

′′m,n,k + θ(Qz)′′m,n,k−1 − θ(Qz)′′m,n,k

+(1− θ)(Qz)′m,n,k−1 − (1− θ)(Qz)′m,n,k + (√g∗)m,n(hζ)′m,n,k(S

pc )′m,n,k

+(Aξ)′m−1,n,k − (Aξ)′m,n,k + (Aη)′′m,n−1,k − (Aη)′′m,n,k

+(Bξ)′m,n,k − (Bξ)′m,n,k−1 + (Bη)′′m,n,k − (Bη)′′m,n,k−1

+(Cξ)′m,n,k−1 − (Cξ)′m,n,k + (Cη)′′m,n,k−1 − (Cη)′′m,n,k

(5.12)

where the meaning of all the terms in (5.12) can be found in Chapter 4.

The ADI-method is unconditionally stable. The central scheme may introduce spurious oscillations(wiggles). To prevent wiggles the Peclet number must be restricted by:

Pe∆ =max(|U |∆ξ√gξξ, |V |∆η

√gηη)

DH

≤ 2 (5.13)

This numerical method for the advective terms in the transport equation is accurate but not veryrobust for coarse grids.

If the grid is fine enough, the Crank Nicolson time integration of the horizontal diffusivity term maystill generate an oscillating solution. To prevent time step oscillations the time step must satisfy

∆t ≤ 1

DH

(1(

∆ξ√gξξ)2 +

1(∆η√gηη)2

)−1

.

5.3 Time integration of the vertical k-ε model

This section discusses the time integration of the discretized vertical k-εmodel, as treated in Section4.8, for each half time step. Normally, the equations for k and ε are coupled, in other words, kappears in the ε-equation and vice versa. Bearing in mind that each transport equation is solvedseparately, the equations for k and ε will be treated as decoupled equations, in the following way:for each stage of time step first the k-equation is solve using the updated velocities and non-updatedturbulence quantities, i.e. k, ε and νv. The same holds for the equation for ε, which is solved afterk.

118

Page 119: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 5. Time discretization with an alternating direction implicit technique

At both stages, i.e. from t to t + ∆t/2 and from t + ∆t/2 to t + ∆t, the discretized k-equation isintegrated with a fractional step method. Each stage consists of two steps. In the first step, only thehorizontal terms (4.91) and (4.94) are approximated, and all other terms (vertical transport (4.97)and (4.99), production (4.100), buoyancy (4.101) and dissipation rate) are treated in second step.The k-equation to be solved in the first step is decoupled in the vertical and is written as

k∗m,n,k− km,n,k∆t/2

+ Su0ξ[u

′, k∗] + S

u0η[v

′, k∗] = 0 (5.14)

where ∗ denotes the intermediate time level, that is between t and t + ∆t/2. The last two terms of(5.14) are given in (4.91) and (4.94), respectively. Note that the solution of (5.14) is unconditionallypositive, because of the application of first order upwinding (see Chapter 2).

In the second step of the first stage, the k-equation is decoupled in the horizontal. The verticaladvection and diffusion are treated implicitly. The sources and sinks have a considerable impact onthe time integration. The approximation of these terms should guarantee that k and ε are positiveduring the whole time step. This positivity consideration is urged because of our desire to developan efficient and robust method for turbulence transport equations. To this end, the source or sinkterm of k, denoted as Sk, is treated by discriminating between positive and negative contributionsand arranging these in the linear form:

Sk = Spk +S

nk k (5.15)

where Spk consists of positive contributions and Snk of negative ones. The terms Spk and Snk willbe treated explicitly and implicitly, respectively. Any negative term which does not contain k asa multiplier is first divided by k (obtain from the previous time level) and then added to Snk . Thispreserves positivity of k and enhances diagonal dominance for the resulting matrix (see Chapter6) and thus improves numerical stability. The production term (4.100) is always non-negative andhence, can be treated explicitly. The buoyancy term (4.19) would normally be expected to be treatedexplicitly. However, it must only do so if it is non-negative, otherwise it must be allocated to thediagonal of the discretization matrix. Algebraically, this is implemented through,

Bk ← max(0, Bk) +k′

kmin(0, Bk) (5.16)

The dissipation term in the right-hand side of the k-equation will be treated implicitly and linearizedby using the second order time-accurate Newton method:

− ε′ ≈ − cµ(k′ )2

νv≈ −2 cµ k

νvk′ + cµ

k2

νv= ε− 2

ε

kk′ (5.17)

The discretized form of the equation for k becomes

k′m,n,k − k∗m,n,k∆t/2

+ Su0z[ω′, k′] = S0zz[νv, k

′] + (Pk)m,n,k + max[0, (Bk)m,n,k] + εm,n,k

+k′m,n,kkm,n,k

(min[0, (Bk)m,n,k]− 2 εm,n,k

) (5.18)

which guarantees that turbulent energy will always be positive. The meaning of the terms Su0zandS0zz can be found in (4.97) and (4.99), respectively.

Version 3.17, November 2016 119

Page 120: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

An analogous procedure is followed with respect to the ε-equation. In the first and second steps ofthe first stage the following ε-equations are approximated, respectively:

ε∗m,n,k− εm,n,k∆t/2

+ Su0ξ[u

′, ε∗] + Su0η[v

′, ε∗] = 0 (5.19)

andε′m,n,k−ε

∗m,n,k

∆t/2+ S+z [ω′, ε′] = S0zz [νv, ε

′] + cε1εm,n,kkm,n,k

(Pk)m,n,k

+(1− cε3) max [0, (Bk)m,n,k]

+ cε2(εm,n,k)2

km,n,k

+ε′m,n,kkm,n,k

(cε1(1− cε3) min [0, (Bk)m,n,k]− 2cε2εm,n,k)

(5.20)

Note that cε3 depends on the sign of Bk (see formula (2.92)).

The discretization of the k- and ε-equations in the second stage is done in exactly the same way.

5.4 Time integration of the depth-averaged k − ε model

This section is concerned with the time integration of the discretized depth-averaged k-ε modelas treated in Section 4.9. The turbulence transport equations are solved for each half time stepaccording to the ADI-approach. In the first stage, all space derivatives with respect to ξ and η aretaken implicitly and explicitly, respectively. In the second stage this process is reversed. For eachstage of the time step first the k-equation is solved using the updated velocities and non-updatedturbulence quantities. The same holds for the equation of ε, which is solved after k. The treatmentof the source terms is similar to that of the vertical k-ε model and is discussed in Section 5.3.

Concerning the first stage, i.e. from t to t + ∆t/2, application of the ADI factorization to the k-equation gives

k′m,n − km,n∆t/2

+S+ξ[U, k′] +S+η[V , k]−S0ξξ[k

′]−S0ηη[k] =(Pk

)m,n

+ εm,n− 2εm,n

km,nk′m,n (5.21)

where the meaning of all the terms in (5.21) can be found in (4.111), (4.113), (4.115), (4.117) and(4.118).

From t+ ∆t/2 to t+ ∆t the following discretized k-equation need to be solved:

k′′m,n − k′m,n∆t/2

+S+ξ[U, k′]+S+η[V , k

′′]−S0ξξ[k′]−S0ηη[k

′′] =(Pk

)′m,n

+ ε′m,n−2ε′m,n

k′m,nk′′m,n (5.22)

The time discretization of the ε-equation is done in exactly the same way and is given by

ε′m,n − εm,n∆t/2

+ S+ξ[U, ε′] + S+η[V , ε]− S0ξξ[ε

′]− S0ηη[ε] =

cε1εm,n

km,n

(Pk

)m,n

+ cε2(εm,n)2

km,n− 2cε2

εm,n

km,nε′m,n (5.23)

120

Page 121: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 5. Time discretization with an alternating direction implicit technique

for the first stage and

ε′′m,n − ε′m,n∆t/2

+ S+ξ[U, ε′] + S+η[V , ε

′′]− S0ξξ[ε′]− S0ηη[ε

′′] =

cε1ε′m,n

k′m,n

(Pk

)′m,n

+ cε2

(ε′m,n

)2

k′m,n− 2cε2

ε′m,n

k′m,nε′′m,n (5.24)

for the second stage.

5.5 Time integration of the Reynolds stresses due to 2D turbu-lence

The time integration of the viscous terms including the Reynolds stresses in the momentum equa-tions is explicit in time. This introduces a stability condition which is of the form

ε∗m,n,k− εm,n,k∆t/2

+ Su0ξ[u

′, ε∗] + Su0η[v

′, ε∗] = 0 (5.25)

In experiments it has been observed that occasionally this restriction may be violated. To enhancethe robustness of the implementation, an upper bound for the horizontal eddy viscosity is imple-mented, defined by

ε∗m,n,k− εm,n,k∆t/2

+ Su0ξ[u

′, ε∗] + Su0η[v

′, ε∗] = 0 (5.26)

We remark that the time step restriction (5.26) is only applied to the quasi 2D (large-scale) part ofthe horizontal eddy viscosity. In the diagnostic (or message) file of a TRIWAQ simulation a warningis given if in one or more points the horizontal viscosity restriction (5.26) is applied. If this warningappears frequently, then the user is advised to reduce the time step.

5.6 Time integration aspects of the non-hydrostatic pressure

The additional variables that are computed in non-hydrostatic computations are the non-hydrostaticpressure q, see equation (2.47), and the physical vertical velocity w.

The time-discretization of the non-hydrostatic equations consists of a pressure correction scheme:

1. First the continuity and u- and v-momentum equations are solved using the ADI-schemedescribed in Section 5.1, and using the non-hydrostatic pressure q in an explicit way. I.e.,given q at time-level n, the waterlevels ζ at time-level n + 1 are obtained, plus intermediatevalues u∗, v∗ for the flow velocities.

2. Then the w-momentum equation is solved using qn, ζn+1, u∗, v∗, yielding intermediate valuesfor the physical vertical velocity: w∗.

3. Finally the new non-hydrostatic pressure qn+1 is obtained. It is especially this step that willbe worked out below.

Version 3.17, November 2016 121

Page 122: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

The non-hydrostatic pressure qn+1 is computed using the continuity equation per layer (2.120).

In deriving an equation for the solution of pressure correction, ∆q ≡ qn+1 − qn, the discretizedmomentum equations for the intermediate and final values of the flow velocities are subtracted fromeach other, resulting in

un+1m,n,k − u∗m,n,k

∆t+ θ(G2

x∆q)m,n,k = 0 (5.27)

vn+1m,n,k − v∗m,n,k

∆t+ θ(G2

y∆q)m,n,k = 0 (5.28)

wn+1m,n,k+1/2 − w∗m,n,k+1/2

∆t+ 2θ(Gz∆q)m,n,k = 0 (5.29)

Substitution of these equations into the continuity equation per layer gives a Poisson equation for∆q.

The solution of this Poisson equation can be found by means of a Krylov-subspace technique;see [99]. Once ∆q is obtained, we can calculate un+1

m,n,k, vn+1m,n,k and wn+1

m,n,k, respectively, throughequations (5.27), (5.28) and (5.29). Local mass is conserved. Details on the implementation of theboundary conditions can be found in [99].

122

Page 123: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 6. Sequence of the computation

Chapter 6

Sequence of the computation

The spatial and temporal discretizations, as discussed in the previous chapters, yield a set of coupledalgebraic equations for the velocity, water level, a number of constituents and turbulence quantities(k and ε). In this chapter a detailed description of the steps in the TRIWAQ solution algorithm ispresented for the first half of each time step. The second half step is largely the same, except thatthe role of ξ- and η-directions and u- and v-velocities is interchanged.

For each time step, the process start by guessing the unknowns, either initially or from the previoustime level. Note that the guessed velocity must satisfy the incompressibility constraint. Also, thevertical eddy viscosity νv is computed based on k and L or ε from the previous time level. Note thatthe definition of the locations of several unknowns and quantities discussed in this chapter is givenin Tables 3.2 and 3.3.

STEP 1

The first step in the first half time step of the solution algorithm is to determine v′ from the dis-cretized equation (5.2). The velocity v′ is computed uncoupled from ζ , u, hv and ω. Equation (5.2)can be written in the following form:

am,n,k v′m,n,k−1 + bm,n,k v

′m,n,k + cm,n,k v

′m,n,k+1 +

e2ξm,n,k v

′m+2,n,k + e1ξ

m,n,k v′m+1,n,k + e−1ξ

m,n,k v′m−1,n,k + e−2ξ

m,n,k v′m−2,n,k +

e2ηm,n,k v

′m,n+2,k + e1η

m,n,k v′m,n+1,k + e−1η

m,n,k v′m,n−1,k + e−2η

m,n,k v′m,n−2,k = dm,n,k

(6.1)

The coefficients am,n,k, bm,n,k, cm,n,k, dm,n,k, e−2ξm,n,k, e−1ξ

m,n,k, e1ξm,n,k, e2ξ

m,n,k, e−2ηm,n,k, e−1η

m,n,k, e1ηm,n,k and

e2ηm,n,k can be easily constructed from the discretized equation (5.2). These are given in Appendix

C. For the 2D case the coefficients a∗, c∗ are not present.

The coefficients of (6.1) need to be stored in a matrix and right-hand side vector. Equation (6.1) iswritten in the following matrix-vector form:

Av′ = d (6.2)

withA =

(• • • • • • • • • • •

e−2ξ e−1ξ e−2η e−1η a b c e1η e2η e1ξ e2ξ

• • • • • • • • • • •

)(6.3)

Version 3.17, November 2016 123

Page 124: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

v′ = (v′1,1,1, ..., v′1,1,K , v

′1,2,1, ..., v

′1,2,K , ....., v

′1,N,K , v

′2,1,1, ....., v

′2,N,K , ....., v

′M,N,K)

T (6.4)

and

d = (d1,1,1, ..., d1,1,K , d1,2,1, ..., d1,2,K , ....., d1,N,K , d2,1,1, ....., d2,N,K , ....., dM,N,K)T (6.5)

Since second order upwinding is employed, the sign of the velocity component is taken into ac-count. This means that a coefficient is nonzero in the point at the side where the velocity componentoriginates from. Thus, each row of A consists of 7 nonzero elements. Due to chosen ordering ofthe unknowns (see (6.4)), for each mn ∈ 1,...,MN the matrix A has MN matrices of size K ×K(2D: scalars) in a row with at location (mn,mn) a tridiagonal matrix C = diag(a,b,c) of length K,accounting for the coupling between layers. Furthermore, at locations ((m-2)n,mn), ((m-1)n,mn),(m(n-2),mn), (m(n-1),mn), (m(n+1),mn), (m(n+2),mn), ((m+1)n,mn) and ((m+2)n,mn) A has thediagonal matrices diag(e−2ξ), diag(e−1ξ), diag(e−2η), diag(e−1η), diag(e1η), diag(e2η), diag(e1ξ) anddiag(e2ξ), respectively. The structure of one such a row of MN matrices is represented by (6.3).In WAQUA the linear system of equations (6.2) is solved by a line-Gauss-Seidel method. In TRI-WAQ an iterative red-black Jacobi method in horizontal direction and Gaussian elimination (“doublesweep”) in the vertical direction are used. Details with respect to these linear solvers can be foundin Chapter 8, sections 8.3 and 8.4.

STEP 2

The second step in the first half time step of the solution algorithm is to calculate u′ and ζ ′ bysolving the coupled equations (5.3) and (5.4). The u-momentum equation (5.3) can be written inthe following form:

am,k ζ′m + bm,k ζ

′m+1 + cm,k u

′m,k−1 + em,k u

′m,k + fm,k u

′m,k+1 = dm,k (6.6)

The evaluation of coefficients in (6.6) is given in Appendix D. Note that the n-index has beendropped from the velocities and water levels due to the application of the ADI scheme. Equation(6.6) results for each horizontal grid point in a tridiagonal system of equations in the vertical, whichcouples the velocities in a cross section with the water levels in the neighbouring water columns.By a double sweep in the vertical direction, the vertical coupling is removed and, u′m,k is expressedin ζ ′m and ζ ′m+1, as follows:

u′m,k + pm,k ζ′m + qm,k ζ

′m+1 = rm,k (6.7)

The relation between the coefficients of equations (6.6) and (6.7) is given in Appendix E. Equation(6.7) is used to symbolically eliminate U ′ from (5.4). To this end, equation (6.7) is multiplied with(hu)′m,k and summing from the free surface to the bottom, which yields:

U ′m + ζ ′m

K∑k=1

pm,k (hu)′m,k + ζ ′m+1

K∑k=1

qm,k (hu)′m,k =

K∑k=1

rm,k (hu)′m,k (6.8)

Substitution of U ′m and U ′m−1 from (6.8) into the depth-averaged continuity equation (5.4) (neglect-ing the index n) leads to a system in the unknown water levels ζ ′. However, this system is nonlinear,since the layer thickness (hu)′m,k depends on the water level. Hence, linearization is required andthe loop (ζ ′ → u′) must be repeated until a converged nonlinear result is obtained, in which mass is

124

Page 125: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 6. Sequence of the computation

conserved. The iteration process is going from q = 1 to q = Q and the system of equations for ζ ′ islinearized by freezing the layer thickness hum,k in (6.8) at iteration level q − 1. Thus, we can write

U ′m + ζqm

K∑k=1

pm,k (hu)q−1m,k + ζqm+1

K∑k=1

qm,k (hu)q−1m,k =

K∑k=1

rm,k (hu)q−1m,k (6.9)

If we now remove U ′m−1 and U ′m from (5.4), we obtain:

Am ζqm−1 +Bm ζ

qm +Cm ζ

qm+1 = Dm (6.10)

with

Am = (√gηη)m−1

∆t/2

(√g∗)m

K∑k=1

pm−1,k (hu)q−1m−1,k (6.11)

Bm = 1 +∆t/2(√g∗)m

(√gηη)m−1

K∑k=1

qm−1,k (hu)q−1m−1,k −

(√gηη)m

K∑k=1

pm,k (hu)q−1m,k

(6.12)

Cm = − (√gηη)m

∆t/2

(√g∗)m

K∑k=1

qm,k (hu)q−1m,k (6.13)

Dm = ζm + ∆t/2

(√g∗)m

Vm,n−1

(√gξξ)m,n−1

− Vm,n(√

gξξ)m,n

+K∑k=1

Qm′,n′,k

+(√

gηη)m−1

K∑k=1

rm−1,k (hu)q−1m−1,k −

(√gηη)m

K∑k=1

rm,k (hu)q−1m,k

(6.14)

Note that since Vm,n is evaluated at time level t and thus known,Dm does not depend on the index n.Furthermore, at the start of a row where the cell with index m−1 lies outside the domain, boundaryconditions are inserted and the term A1ζ

q0 is dropped, and similarly at the end of a row, i.e. the term

CM+1ζqM+2 is removed (see Chapter 7). The tridiagonal system of equations (6.10) can be solved

easily using a double sweep algorithm. Once the new water level ζq has been computed, the layerthickness (hu)qk can be calculated with Algorithm 2.1. For a reason that becomes clear below, thelayer thickness at a water level point (hζ)qk need to be evaluated too. With these results, we are nowable to find the layer-averaged u-velocities by means of equation (6.7) multiplied with the ratio oftwo layer-thicknesses in the u-velocity points at two adjacent iteration levels:

uqm,k =(hu)

q−1m,k

(hu)qm,k

(rm,k− pm,k ζqm− qm,k ζ

qm+1

)(6.15)

The reason for multiplying the factor (hu)q−1/(hu)q in (6.15) is to guarantee mass-conservation aftereach step. This completes one iteration and the whole procedure is repeated again, starting by settingup the system of equations (6.10) by means of calculation of the coefficients Am, Bm, Cm and Dm

(formulas (6.11) to (6.14)). The iteration process stops if either the number of iterations exceeds Qor ∣∣uqm,k−uq−1

m,k

∣∣ < ε (6.16)

where ε is usually of the order 10−4.

STEP 3

Version 3.17, November 2016 125

Page 126: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

In the third step of first half time step, ω′ is computed with the discretized continuity equationfor each layer (4.7), in which the discharge in ξ-direction is taken implicitly and the discharge inη-direction is taken explicitly:

ω′m,n,K = 0

ω′m,n,k−1 = ω′m,n,k −(hζ)

′m,n,k

−hζm,n,k∆t/2

−K∑k=1

Qm′,n′,k

+ 1

(√g∗)m,n

((hu)′m,n,k um,n,k

(√gηη)m,n

− (hu)′m−1,n,k um−1,n,k

(√gηη)m−1,n

+ hvm,n,kvm,n,k(√

gξξ)m,n

−hvm,n−1,kvm,n−1,k

(√gξξ)m,n−1

), k = K,K − 1, · · · , 1

(6.17)

Here, the local discharge rates have been added. Note that in order to compute the vertical velocities,the layer thickness defined at a water level must be available. It has been computed in the secondstep.

STEP 4

After the computation of the water level and velocities, each transport equation is solved separatelyin the sequence given by their index number. The transport equation (5.11) can be written as:

am,k c′m,k−1 + bm,k c

′m,k + cm,k c

′m,k+1 +

e1ξm,k c

′m+1,k + e2ξ

m,k c′m+2,k + e3ξ

m,k c′m+3,k +

e−1ξm,k c

′m−1,k + e−2ξ

m,k c′m−2,k + e−3ξ

m,k c′m−3,k +

e1ξ,−1zm,k c′m+1,k−1 + e1ξ,1z

m,k c′m+1,k+1 + e−1ξ,−1zm,k c′m−1,k−1 + e−1ξ,1z

m,k c′m−1,k+1 = dm,k

(6.18)

In WAQUA a, c, e3ξ, e−3ξ, and e∗,∗ vanish. The n-index has been dropped from the unknown andcoefficients since, the concentrations are coupled in the planes n = constant. The coefficients in(6.18) are written down in Appendix F. The system of equations is given by

Ac′ = d (6.19)

with

A =

(• • • • • • • • • • • • •

e−3ξ e−2ξ e−1ξ,−1z e−1ξ e−1ξ,1z a b c e1ξ,−1z e1ξ e1ξ,1z e2ξ e3ξ

• • • • • • • • • • • • •

)(6.20)

c′ = (c1,1,1, ..., c1,1,K , c1,2,1, ..., c1,2,K , ....., c1,N,K , c2,1,1, ....., c2,N,K , ....., cM,N,K)T (6.21)

and

d′ = (d1,1,1, ..., d1,1,K , d1,2,1, ..., d1,2,K , ....., d1,N,K , d2,1,1, ....., d2,N,K , ....., dM,N,K)T (6.22)

126

Page 127: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 6. Sequence of the computation

In TRIWAQ each row of matrix A consists of 11 nonzero entries due to the application of the fourthorder upwind scheme. Moreover, due to the numbering of the unknowns in the computational grid,A consists ofM tridiagonal matrices of sizeK×K on the main diagonal ofA. The vertical couplingis eliminated by a double sweep. The equations are solved in the horizontal direction by an iterativered-black Jacobi technique. In WAQUA one gets pentadiagonal systems which are solved by adouble sweep

STEP 5 (if appropriate)

In this step of the solution algorithm the vertical k- and ε-equations are solved separately, if appro-priate. The ε-equation is solved after k. We restrict ourselves to the k-equation since, the treatmentof the ε-equation is similar. In the first step of the first stage, equation (5.14) yields a pentadiagonalsystem of equations, as follows:

am,n k∗m,n + e1ξ

m,n k∗m+1,n + e−1ξ

m,n k∗m−1,n + e1η

m,n k∗m,n+1 + e−1η

m,n k∗m,n−1 = dm,n (6.23)

orAk∗ = d (6.24)

with

A =

• • • • •e−1ξ e−1η a e1η e1ξ

• • • • •

(6.25)

k∗ = (k∗1,1, k∗

1,2, ..., k∗

1,N , k∗

2,1, ....., k∗

2,N , ....., k∗M,N)T (6.26)

andd = (d1,1, d1,2, ..., d1,N , d2,1, ....., d2,N , ....., dM,N)T (6.27)

The coefficients of (6.23) are written down in Section G.1. The k-index has been dropped fromthe unknown and coefficients since, the turbulence equation is decoupled in the vertical. The linearsystem of equations (6.24) is solved by a Gauss-Seidel iterative technique. Details on this methodcan be found in section 8.8.

In the second step of the first half time step, equation (5.18) leads to a tridiagonal system of equa-tions:

ak k′k−1 + bk k

′k + ck k

′k+1 = dk (6.28)

of which the coefficients can be found in Section G.2. Since, equation (5.18) is decoupled in thehorizontal, the indices m and n have been dropped from the unknown and coefficients. This systemis solved by a double sweep algorithm.

STEP 6 (if appropriate)

In this step of the solution algorithm the depth-averaged k- and ε-equations are solved separately,if appropriate. The ε-equation is solved after k. We restrict ourselves to the k-equation since, thetreatment of the ε-equation is similar. This equation, as given by (5.21), can be written as:

am k′m−1 + bm k′m + cm k′m+1 = dm (6.29)

The n-index has been dropped from the unknown and coefficients since, the unknowns are coupledin planes n = constant. The coefficients in (6.29) are written down in Section G.3. This equation issolved by a double sweep algorithm.

Version 3.17, November 2016 127

Page 128: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

Chapter 7

Implementation of the boundary conditions

For incompressible flows, the governing equations described in Chapter 2 are parabolic, or ellipticwhen the flow is time-independent. Therefore, boundary conditions must be specified at all bound-aries of the domain. Boundary conditions can be specified as time dependent or stationary. InSection 7.3 different types of boundary conditions for the water movement, transport of constituentand turbulence and the implementation of these conditions are considered. However, an importantaspect to be mentioned is the treatment of grid cells near the boundary of the domain where centraldifferences and higher order upwind schemes cannot be generally applied, since extra cells outsidethe computational domain are required. This is discussed first in Section 7.2. Apart from the bound-ary the model may also consists of sluices or barriers, which are constructions with time-varyingrestriction on the flow. A three-dimensional barrier formulation and its implementation is treatedin Section 7.4. Finally, the boundary also changes over time due to drying and flooding, whichis achieved by marking grid points as dry if the total water depth in these points drops below atolerance. This is treated in Section 7.5.

7.1 Introduction

In Chapter 2 we described the vertical integration over the water depth of the Reynolds-averaged3D Navier Stokes equations. At the bottom and free surface two stress terms were introduced.The bottom stress takes into account the friction between the turbulent flow and bottom, and thewind stress the velocity difference between the water surface and the air. In Section 7.2 we givemathematical formulations for both stresses, which close the system of governing equations.

The set of depth-averaged two-dimensional shallow water or long-wave equations solved in theWAQUA system is a hyperbolic set of partial differential equations. The number of specified bound-ary conditions at any particular point of the boundary should equal the number of characteristicsentering the region at that point, see [88] for a theoretical explanation. WAQUA assumes that theflow at the open boundaries is subcritical, which means that the magnitude of the flow is smallerthan the velocity of wave propagation.

In this Chapter we assume that the boundary is parallel with a ξ grid line, and that u is the velocitycomponent normal to the open boundary and that v is the component parallel to the open boundary.

128

Page 129: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 7. Implementation of the boundary conditions

Subcritical flow means that the Froude number is smaller than 1:

Fr =|u|√gH

< 1 (7.1)

For subcritical flow, we discern two situations: inflow and outflow. At inflow we have to specifytwo boundary conditions and at outflow we have to specify one boundary condition. For tidal flow,the number of required boundary conditions varies between ebb and flood.

The first boundary condition in WAQUA is an external forcing by the water level, the normal veloc-ity, the discharge rate or the Riemann invariant specified by the user, see Section 7.3. The secondboundary condition is a built-in numerical boundary condition. In WAQUA at inflow the advectionof momentum in the tangential direction is neglected:

u√gξξ

∂ v

∂ ξ= 0. (7.2)

On a curvilinear grid also the corresponding curvature term should be neglected:

u v√g∗

∂√gξξ

∂η(7.3)

The influence of these artificial boundary conditions is in most models restricted to only the gridcells near the boundary. For steady state simulations, the boundary condition (7.2),(7.3) sometimesleads to an ill-posed problem. It would be better to specify the tangential velocity component. Thetangential velocity may be determined from measurements, a coarser grid model or explicitly setto zero. At this moment the data structure of the open boundaries in WAQUA is not suitable toprescribe the tangential velocity component. Due to this limitation, it is a good modelling practiceto put the model boundaries at locations where the grid lines of the boundary are perpendicular tothe flow.

Open boundaries are necessary to restrict the computational area. They are boundaries in the mathe-matical model with no physical meaning. If we do not prescribe exactly the incoming characteristicat an open boundary, the outcoming characteristic will reflect at the boundary and propagate as adisturbance into the area. Usually we do not have information on both water level and velocity sowe do not know the incoming characteristic. To reduce the reflections at the open boundary we usea so-called weakly reflecting boundary condition. This boundary condition is obtained using thecharacteristics of the linearised equations. Verboom et al [77] derived a boundary condition whichis non-reflective for waves, which pass normal to the boundary. The weakly reflected boundaryconditions of the WAQUA system are discussed in Section 7.3.

For WAQUA applications the horizontal viscosity terms are in general less important. For the sim-ulation of the flows in rivers, estuaries and seas the influence of the shear stresses along lateralboundaries can be neglected. In WAQUA a so-called free slip boundary condition is applied for alllateral boundaries, but on a curvilinear grid the implementation is more complicated. For flow alonga closed boundary, in Eq. (4.42) and (4.46), the following boundary conditions are implemented:

Version 3.17, November 2016 129

Page 130: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

∂(v√gξξ)

∂ η= 0 (7.4)

∂(v√gηη)

∂ ξ= 0 (7.5)

After discretization it may no longer hold that:

∂ η

(∂ v

∂ ξ

)=

∂ ξ

(∂ v

∂ η

)(7.6)

This generates a difference between the implementation of the difference equations in curvilinearcoordinates on a rectangular grid and the implementation of the difference equations in Cartesiancoordinates.

For the simulation of laboratory flumes, the effect of wall friction should be added to the system ofequations.

Setting up a WAQUA model starts with covering the region of interest with a rectangular or curvilin-ear grid. The unknowns: water level, u-velocity and v-velocity, are staggered in space, see Section3.1. The grid staggering leads to different locations of the boundary itself: a water level boundaryin a water level point and a velocity or discharge boundary in a velocity point. The grid staggering,the higher order approximations of the advection terms and the horizontal viscosity terms give riseto numerical boundary conditions, which are not restricted to the boundary itself. These numericalboundary conditions are described in Section 7.3.

The transport of dissolved substances in rivers, estuaries and coastal seas is dominated by advection.The horizontal diffusion in flow direction is of secondary importance. The consequence is that thetransport equation is advection dominated, has a wave character and from mathematical point ofview is of hyperbolic type. The equation has only one characteristic, which is parallel to the flow.Without diffusion, an observer moving with the flow, observes a constant concentration. As meantbefore, open boundaries have to limit the computational area. At an open boundary during inflow aboundary condition is needed. During outflow the concentration must be free. At inflow we have tospecify the concentration which may be determined by the concentration at outflow of the formerebb period. Because usually only the background concentration is known from measurements orfrom a coarse grid model, a special boundary condition based on the concentration in the interiorarea in combination with a return time is used, which does not completely fix the concentration.This so-called Thatcher-Harleman boundary condition is described in Section 7.3.

7.2 Adaptation of the discretizations near the boundary

Near boundaries of the computational domain the discretzations of advection and viscous terms ofthe momentum equations introduce some "virtual" unknowns outside the domain that need to beeliminated in an easy manner.

130

Page 131: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 7. Implementation of the boundary conditions

With respect to the advection terms, other approximations need to be used such that there are no vir-tual variables. Considering the first horizontal advective term of the u-momentum equation (4.16),the first order upwind scheme is used only for those grid cells that are two cells away from bound-aries, in which approximation (4.18) introduces a virtual unknown:

Su0ξ[u, u] =

um,n,k

(√gξξ)

ξη

m,n

(um,n,k−um−1,n,k),

if um,n,k > 0 and (m− 2, n, k) is a boundary point

um,n,k

(√gξξ)

ξη

m,n

(um+1,n,k−um,n,k),

if um,n,k < 0 and (m+ 2, n, k) is a boundary point

(7.7)

For the grid cells adjacent to boundaries the advection term is set to zero if discretization (4.18)requires information from two cells outside the domain. Thus, if um,n,k > 0 and (m-1,n,k) is aboundary point or if um,n,k < 0 and (m+1,n,k) is a boundary point then

Su0ξ[u, u] = 0 (7.8)

Central differences (4.17) are replaced by first order upwind differences in cells adjacent to bound-aries, if appropriate:

S0ξ[u, u] =

um,n,k

(√gξξ)

ξη

m,n

(um,n,k−um−1,n,k),

if um,n,k > 0 and (m+ 1, n, k) is a boundary point

um,n,k

(√gξξ)

ξη

m,n

(um+1,n,k−um,n,k),

if um,n,k < 0 and (m− 1, n, k) is a boundary point

(7.9)

otherwise, the advection term is set to zero. The second horizontal advection term of the u-momentum equation (4.19) as well as the horizontal advection terms of the v-momentum equation(2.126) are approximated in a similar manner. The curvature terms (4.22) are set to zero, if andonly if their corresponding advection terms are zero. The adjustments of the approximation of theadvection terms as described above are also applied near dry points, barriers and other constructionssuch as dams and dykes.

The approximation of the vertical advection term in the u-momentum equation (4.34) introducesvirtual unknowns both near bottom and free surface and hence, it must be modified. At the freesurface and bottom, the kinematic conditions (2.22) are imposed. Thus, in the upper layer (k = 1)we used the following adapted discretization:

S0z[hu, ω, u] = ωξm,n,1

(um,n,1−um,n,2hum,n,1 +hum,n,2

)(7.10)

whereas in the bottom layer (k = K) we employed

S0z[hu, ω, u] = ωξm,n,K−1

(um,n,K−1−um,n,Khum,n,K−1 +hum,n,K

)(7.11)

Version 3.17, November 2016 131

Page 132: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

Note that near a boundary the linear interpolation of ωm,n,k is incorrect since, the vertical velocityin virtual points are set to zero. The approximation of the vertical advection term in v-momentumequation in both surface and bottom layers is done in a similar way.

Regarding the viscous terms, the contributions to the horizontal parts along boundaries are set tozero (free slip), whereas boundary conditions are incorporate in the vertical terms near bottom andfree surface, so no virtual unknowns occur (see Section 7.3).

For the horizontal advection terms of a transport equation, the fourth order upwind schemes (4.69)and (4.71) need to be replaced near bounderies, dry points, barriers, dams and dykes if they requireinformation from outside the domain. The following adapted discretizations are applied instead of(4.69):

Pξ,um,n,k =

(√gηη)m,n h

um,n,k um,n,k

3 cm,n,k − cm−1,n,k

2,

if um,n,k > 0 and (m− 2, n, k) is a boundary point

(√gηη)m,n h

um,n,k um,n,k

3 cm+1,n,k − cm+2,n,k

2,

if um,n,k < 0 and (m+ 2, n, k) is a boundary point

(7.12)

or

Pξ,um,n,k =

(√gηη)m,n h

um,n,k um,n,k cm,n,k,

if um,n,k > 0 and (m− 1, n, k) is a boundary point

(√gηη)m,n h

um,n,k um,n,k cm+1,n,k,

if um,n,k < 0 and (m+ 1, n, k) is a boundary point

(7.13)

The vertical discretized advection terms (4.75) at the free surface (k = 0) and bottom (k = K) areset to zero, because of the kinematic conditions (2.22).

No adaptation is needed with regard to the diffusion terms.

Outside the domain the velocity components are set to zero. Hence, the velocity component in theCoriolis force terms (4.54) and (4.60) should be extrapolated near the boundary. However, in thepresent TRIWAQ code this has not been realized, i.e. the velocity component is interpolated in astraightforward way.

7.3 Types of boundary conditions and their implementation

In order to solve the shallow flow and transport equations uniquely it is necessary to prescribeboundary conditions at the complete outer boundary of the domain. A distinction is made betweenvertical boundary conditions that are imposed at the free surface and bottom and horizontal bound-ary conditions which are given at closed and open boundaries. The free surface and bottom arelocated at k = 0 and k = K, respectively. Closed and open boundaries are placed at the edge ofthe computational domain in horizontal directions, that is at m = 1 or m = M − 1 or n = 1 orn = N − 1. A boundary where the velocity will be prescribed, also called velocity boundary, goesperpendicularly through either a u-velocity point or a v-velocity point. So, this boundary is thephysical boundary. A boundary with prescribed water level, called the water level boundary, goesthrough the water level points, and falling just outside the computational domain. In fact, the wa-ter level boundary is the grid enclosure of the computational domain. Note that the grid boundary

132

Page 133: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 7. Implementation of the boundary conditions

goes through the depth points and lies a half gridsize within the enclosure. See Figure 7.1. For theimplementation of horizontal boundary conditions for water levels and constituents, virtual ζ-pointsare created around the computational domain. Thus, the set (m,n) ∈ N × N | (1,n), (M ,n), (m,1),(m,N) contains virtual water level points. See also Table 3.2. Regarding the implementation ofthe horizontal boundary conditions, a detailed description is presented for the first half of each timestep.

same (m,n) index

m=1

n=1

v-point

ζ-point

u-point

n=N

n=N-1

m=M

m=M-1

enclosure

boundary

depth point

Figure 7.1: Computational domain with given boundary and enclosure.

7.3.1 Boundary conditions for the momentum equations at free surface

At the free surface, wind introduces movements of the water. The boundary conditions for themomentum equations are given by:

νv∂u

∂z

∣∣∣∣z=ζ

=|τw|ρ

sinϕ, νv∂v

∂z

∣∣∣∣z=ζ

=|τw|ρ

cosϕ (7.14)

where τw is the wind stress and ϕ is the angle between the wind direction and the positive y-direction. The magnitude of the wind stress is usually related to the wind speed W10 measured 10m above the free surface:

|τw| = ρaCdW210 (7.15)

where ρa is the density of air at sea level and Cd is the wind drag coefficient. This coefficient isa bulk parameter depending upon atmospheric conditions and surface wave parameters. A largeamount of literature is devoted to formulations of Cd. References and reviews can be found in[46]. In storm surge models, drag relations in which Cd depends on wind speed W10 only, are oftenemployed. Below, we present three different drag relations that can be used in TRIWAQ.

Drag relation I: wind speed-independent Cd

We may assumed that Cd does not depend on the wind speed W10, which is a very crude approxi-mation in some cases. Note that the coefficient Cd may be space dependent.

Version 3.17, November 2016 133

Page 134: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

Drag relation II: piecewise linear Cd

The drag coefficient assumed to be constant for both very high and very low wind speeds, and linearin between:

Cd =

C lowd , W10 < W low

10

C lowd + W10−W low

10

Whigh10 −W low

10

(Chighd −C low

d

), W low

10 ≤ W10 ≤ Whigh10

Chighd , W10 > W

high10

(7.16)

where C lowd , Chigh

d , W low10 and W high

10 are (space dependent) parameters to be determined by the user.

Drag relation III: Charnock drag formulation

The velocity of the wind in the turbulent layer above the free surface is assumed to follow a loga-rithmic velocity distribution:

W (z) =u∗κ

ln

(z

z0

)(7.17)

where u∗ =√|τw|/ρa is the wind friction velocity and z0 is the roughness height. Thus, from (7.15),

the drag coefficient in terms of wind friction velocity equals

Cd =u2∗

W 210

(7.18)

On dimensional grounds, Charnock [9] assumed z0 to be a function of u∗ only, as follows:

z0 =βu2∗

g(7.19)

where the dimensionless Charnock coefficient β is taken to be constant. Usually, β = 0.032, but thisvalue can be changed by the user. Substitution of (7.18) and (7.19) in (7.17) for z = 10 m gives theimplicit function for Cd with W10:

1√Cd

=1

κln

(10g

βW 210Cd

)(7.20)

In the TRIWAQ code, it is approximately solved by a few Newton-Raphson iterations; usually 3iterations are needed to obtain Cd within 1% accuracy.

Further details on the presented drag relations can be found in [46].

The boundary conditions (7.14) are implemented by adjusting the discretization (4.53) of the verticalviscous term (4.52) in the upper layer (k = 1):

S0zz[vν , hu, u] =

2

hum,n,1

(1

2

ρaρCdW

210 sinφ− (vν)

ξ

m,n,1

um,n,1 − um,n,2hum,n,1 + hum,n,2

)(7.21)

and

S0zz[vν , hν , ν] =

2

hνm,n,1

(1

2

ρaρCdW

210 cosφ− (vν)

η

m,n,1

νm,n,1 − νm,n,2hνm,n,1 + hνm,n,2

)(7.22)

The first term in the right-hand sides of (7.21) and (7.22) are given and contribute to the right-handside of the corresponding discretized momentum equations.

134

Page 135: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 7. Implementation of the boundary conditions

7.3.2 Boundary conditions for the momentum equations at bottom

At the bottom, the boundary conditions for the momentum equations are:

vν∂u

∂z

∣∣∣∣z=−d

=τb,ξρ, vν

∂ν

∂z

∣∣∣∣z=−d

=τb,ηρ

(7.23)

where τb,ξ and τb,η are the components of the bottom stress in ξ- and η-direction, respectively. Themagnitude of the bottom stress is defined as

|τ b| = ρ(ub∗)2 (7.24)

with ub∗ the bottom friction velocity.

For the determination of the bottom friction velocity we use the so-called law of the wall. With thiswall-law it is possible to express the mean velocity parallel to the bottom and turbulence quantities,e.g. k and ε, outside the viscous sublayer in terms of the distance to the bed and bottom stress. Thewall-law allows inclusion of empirical information for special cases, such as roughness, pressuregradients and mass and heat transfer. Here, we shall discuss wall-laws applicable to both smoothand rough bottoms. We consider a turbulent flow along a straight smooth bed. The followingvelocity profile holds [69]:

ures(z) =ub∗κ

ln(Ez+) (7.25)

where the wall-coordinate z+ is given by

z+ =(z + d)ub∗

ν(7.26)

with ν = µ/ρ the kinematic viscosity. Here, ures is the resultant velocity component parallel tothe bottom and E is a roughness parameter, approximately equal to 8.4 for a smooth bed. Thez-coordinate must be such that

z+ > 30 for the wall-law (7.25) to be valid. The region 30 < z+ < 200 is called the logarithmiclayer. Near the bottom we have the viscous sublayer (0 < z+ < 5), for which the following wall-lawholds:

ures(z) =(z + d)(ub∗)

2

ν(7.27)

In many engineering calculations, the transition layer between the viscous sublayer and the loga-rithmic layer is ignored. Hence, the location of the edge of viscous sublayer and logarithmic layeris taken equal to z+ = 11.05, which value is obtained by simply linking the linear velocity profilein the viscous sublayer to the logarithmic velocity profile in the logarithmic layer.

The practical implementation of the wall-law for a smooth bottom is as follows. The goal is tocalculate the following quantity:

S =uresub∗

(7.28)

We define the local Reynolds number as

Reloc =(z + d)ures

ν(7.29)

Version 3.17, November 2016 135

Page 136: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

From (7.27) and (7.28), we haveS =√

Reloc (7.30)

This equation is only valid if z+ = S ≤ 11.05 or Reloc ≤ 122.1. Since z+ = Reloc/S, the logarithmicwall-law (7.25) can be written as

S =1

κln

(ERelocS

)(7.31)

This implicit equation is valid for Reloc > 122.1 and has to be solved using the Newton-Raphsoniteration. The initial value of S is set to

√Reloc.

Smooth beds are frequently used in laboratory experiments which, apart from measurements in na-ture, also provide valuable information for the validation of TRIWAQ. In civil engineering practice,however, the bottom is mostly rough. We consider a turbulent flow over rough surfaces. Let hr de-note the average height of roughness elements. We assume that the roughness has no influence onthe flow except near the bed. Following Tennekes and Lumley [69], the law of the wall for a roughbottom is given by

ures(z) =ub∗κ

ln

(z + d

hr

)+ f(h+

r ) (7.32)

where h+r is the roughness Reynolds number defined as

h+r =

hrub∗

ν(7.33)

We assume that the roughness elements are submerged in the logarithmic layer, which means thatthe surface is very rough. Nikuradse (see [56]) found by means of experiments that for large valuesof h+

r , the function f(h+r ) becomes independent of h+

r , viz.

f(h+r )→ 8.5, if h+

r > 30 (7.34)

Hence, the logarithmic wall-law for a very rough bed can be expressed as

ures(z) =ub∗κ

ln

(z + d

z0

)(7.35)

where z0 = hr/33 is the roughness coefficient1.

For the calculation of the bottom friction velocity ub∗, we applied the wall-laws (7.25), (7.27) and(7.35) in the water level, u-velocity and v-velocity points adjacent to the bottom, if appropriate.Thus, the distances between those points and bottom equal 1/2h

ζK , 1/2huK and 1/2hvK , respectively.

Summarizing, the following formula’s are implemented in TRIWAQ:

(ub∗)m,n =

√u2m,n,K+v2

m,n,K

S, Reloc =

hm,n,K√u2m,n,K+v2

m,n,K

S = 1κ

ln(

1 +hm,n,K

2z0

)(rough beds)

S =

Reloc, Reloc ≤ 122.1

ln(ERelocS

), Reloc > 122.1

(smooth beds)

(7.36)

1 The notation of the quantity z0 should not be confused with the interface as given in Figure 2.2.

136

Page 137: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 7. Implementation of the boundary conditions

Note that the formulation of the log wall-law for rough bottoms has been slightly changed. Fromcoding point of view, it is preferable to assume the bottom is positioned at z0, so that the distance ofa cell center from the boundary surface is increased by z0.

At slack water the velocity is zero at the bottom. This necessitates special measures in evaluating thebottom friction velocity in the equation for turbulent kinetic energy (2.80) since, in absence of windforce, there is no turbulent energy and consequently, there is no eddy viscosity across the vertical.The bottom friction velocity is taken as the average of the friction velocities (u∗)k over the vertical(k = 1,...,K), whereas the friction velocity (u∗)k is computed from the resultant velocity at the waterlevel point in each layer. We implicitly assume that all the layers are located within the logarithmiclayer. Thus, we have

(ub∗)m,n =1

K

K∑k=1

(u∗)m,n,k (7.37)

and

(u∗)m,n,k =κ

√(uξm,n,k

)2

+(vηm,n,k

)2

ln

(1 +

(zζ)z

m,n,k − zζm,n,K

z0

) (7.38)

Note that if the velocity profile is logarithmic across the total water depth, then (ub∗)m,n = (u∗)m,n,kfor each 1 ≤ k ≤ K.

The stress at the bottom is specified by a quadratic friction law:

τ b =ρg

C23D

|uK |uK (7.39)

where uK is the velocity vector in transformed coordinates in the bottom layer and C3D is the Chézycoefficient. We discuss the determination ofC3D. This 3D coefficient is related to the layer-averagedhorizontal velocity located at the bottom layer, which is necessary for reasons of consistency andaccuracy. Furthermore, it differs from the 2D Chézy coefficient used in depth-averaged calculations.In that case, the magnitude of the bottom stress induced by the flow at the bottom is determined by

|τ b| =ρg

C22D

u√u2 + v2 (7.40)

where C2D is the 2D Chézy coefficient. Hence, the coefficient C2D is now based on the depth-averaged velocity.

7.3.2.1 User-options for C2D

For C2D one may choose one of the following three formulations:

Chézy formulationC2D = given Chézy coefficient

(√m/s

)(7.41)

Manning’s formulation

C2D =(ζ + d )

16

n(7.42)

Version 3.17, November 2016 137

Page 138: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

where n is the Manning’s parameter.

White-Colebrook’s formulation

C2D = 18 log10

(max

[12(ζ + d)

w, 1.0129

])(7.43)

where w is the White-Colebrook friction coefficient which equals the Nikuradse roughness length.The upper boundary 1.0129 is used in the implementation to be sure that the argument of the loga-rithmic remains positive.

To obtain a different Chézy coefficient for ebb and flood in a stratified tidal area WAQUA offers thepossibility to introduce a correction factor. If C2D stands for the not corrected Chézy coefficient andC∗2Dfor the corrected one, then

C∗2D =

C2D√β

(7.44)

with β equal to

β = 1 − αH

ρ0

u√gξξ∂ρ∂ξ

+ v√gηη

∂ρ∂η√

u2 + v2(7.45)

and α a dimensionless coefficient given by the user. β must have a value between 1/3 and 3.

For Manning and White Colebrook the Chézy coefficients are dependent on the total water depth.In WAQUA the user has the possibility to specify the time interval to update these coefficients.

The bottom stress is integrated implicitly. For the discretization in space and time we refer to Section4.4.13 and Chapter 5.

7.3.2.2 Determination of C3D

For the determination of C3D three options are available. The first option is proposed in [98], whereis shown that C3D can be found using

C3D =ukU2D

C2D (7.46)

with uk the velocity in the bottom layer, and U2D the depth averaged velocity. In the case of verylow depth averaged velocity, we use Equation (7.52), see below.

The second option is based on the conversion of C2D into C3D proposed by Uittenbogaard et al.[74]. Combining with one of the above C2D formula’s gives us a C3D value. We restrict ourselvesto rough bottoms. From (7.24) and (7.40), it follows

C2D =u2D

ub∗

√g (7.47)

138

Page 139: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 7. Implementation of the boundary conditions

We assume that the velocity profile is logarithmic. From (7.35) we can compute the depth-averagedvelocity u2D:

u2D = 1H

ζ

∫z=z0−d

ures(z)dz = ub∗κ

ln(Hz0

)− ub∗

κ+ ub∗

κz0H

≈ ub∗κ

ln(

Hz0 e

), if z0

H 1

(7.48)

Substitution of (7.48) in (7.47) gives

C2D =

√g

κln

(H

z0 e

)(7.49)

On the other hand, the layer-averaged horizontal velocity uK is approximated as follows (hK =zK−1 + d):

u2D = 1H

ζ

∫z=z0−d

ures(z)dz = ub∗κ

ln(Hz0

)− ub∗

κ+ ub∗

κz0H

≈ ub∗κ

ln(

Hz0 e

), if z0

H 1

(7.50)

From (7.24), (7.39) and |uK | = uK , we obtain

C3D =

√g

κln

(hKz0 e

)(7.51)

We now eliminate the roughness coefficient z0 from (7.51) by means of (7.49), resulting in:

C3D = C2D +

√g

κln

(hKH

)(7.52)

It should be noted that the conversion formula (7.52) is slightly different from the formula derivedin [74]. The origin of this difference lies in the fact that the derivation of Uittenbogaard et al. isbased on the velocity in the centre of the bottom layer.

The formula (7.52) is related to a parabolic eddy viscosity profile. In some models, however, onemay assume a constant eddy viscosity distribution. For an open channel flow, this implies a parabolicvelocity profile:

ures(z) = C (z + d)

(1− z + d

2H

)(7.53)

with C a constant. The depth-averaged velocity is given by

u2D =1

H

ζ

∫z=−d

ures(z)dz =1

3CH (7.54)

and the layer-averaged horizontal velocity uK reads:

uK =1

hK

zK−1

∫z=−d

ures(z)dz = C(1

2hK −

1

6Hh2K) (7.55)

Version 3.17, November 2016 139

Page 140: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

From (7.24), (7.39), (7.47), (7.55), (7.54) and |uK | = uK , we deduce the following

C3D =3

2C2D

hKH

(1− hK

3H

)(7.56)

Assuming hK H , a first order approximation of (7.56) gives

C3D =3

2C2D

hKH

(7.57)

for the case of constant eddy viscosity distribution. Note that the difference between the 2D Chézyand 3D Chézy coefficients given in (7.52) and (7.57) is independent of space and time.

Using the Chézy (7.41) or Manning’s formulation (7.42) and the conversion formula (7.52) or (7.57),depending on the eddy viscosity distribution, the user is able to determine the 3D Chézy coefficientC3D. Note that the White-Colebrook formula (7.43) can be used directly to compute C3D.

The third option to calculate C3D is based on the roughness coefficient z0, prescribed by the user.Combination of (7.24) and (7.39) gives

C3D =√g|uK |ub∗

= S√g (7.58)

where S is given by (7.36), which can be calculated if z0 is known.

Remark In the TRIWAQ program, the coefficientC3D is defined in u-velocity and v-velocity pointsonly, and are denoted as Cu

3D and Cv3D, respectively. Furthermore, these coefficients are stored in

the arrays czu and czv, as follows:

czu =1

2

g

(Cu3D )2 ∆t, czv =

1

2

g

(Cv3D )2 ∆t (7.59)

The boundary conditions (7.23) with (7.39) are implemented by adjusting the discretization (4.53)of the vertical viscous term (4.52) in the bottom layer (k = K):

S0zz[νv, hu, u] =

2

hum,n,K

(νvξm,n,K−1

um,n,K−1 − um,n,Khum,n,K−1 + hum,n,K

− g

2(Cu3D)2

um,n,K

√u2m,n,K + (vξηm,n,K)2

) (7.60)

and

S0zz[νv, hv, v] =

2

hvm,n,K

((νv)

η

m,n,K−1

vm,n,K−1 − vm,n,Khvm,n,K−1 + hvm,n,K

− g

2(Cv3D)2

vm,n,K

√(uξηm,n,K)2 + v2

m,n,K

) (7.61)

The second term in the right-hand sides of (7.60) and (7.61) are calculated implicitly at both ADIstages, on the understanding that the square-root factor is evaluated at the previous ADI stage.

140

Page 141: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 7. Implementation of the boundary conditions

7.3.3 Boundary conditions for the transport equation at bottom and free sur-face

There is no diffusive transport of an arbitrary constituent through the bottom as well as through thefree surface. This leads to the following Neumann boundary conditions:

Dv∂c

∂z

∣∣∣∣z=ζ

= Dv∂c

∂z

∣∣∣∣z=_d

= 0 (7.62)

These conditions are simply implemented in (4.80) as follows:

Qzm,n,0 = Qz

m,n,K = 0 (7.63)

Regarding the anti-creepage terms (4.82), near the bottom and free surface these terms are set tozero. Hence, we have

Aξm,n,1 = A

ξm,n,K = A

ηm,n,1 = A

ηm,n,K = 0

Bξm,n,0 = B

ξm,n,K = B

ηm,n,0 = B

ηm,n,K = 0

Cξm,n,0 = C

ξm,n,K = C

ηm,n,0 = C

ηm,n,K = 0

(7.64)

As a consequence, if a model consists of one layer, no anti-creepage terms will be evaluated.

At this moment, the internal boundary at a source is not described. Hence, no upstream differencingwill be done, thus we may induce negative concentrations.

7.3.4 Boundary conditions for the vertical k-ε model at bottom and free sur-face

To solve the 3D k-ε equations, boundary conditions must be specified at the bottom and free surface.Near the bed, advection and diffusion of k are negligible so that local equilibrium prevails. Whenbuoyancy effects are absent, this implies Pk = ε which, together with the fact that the shear stressis approximately equal to the bottom stress, leads to

k =(ub∗ )2

√cµ

(7.65)

This relation can be used as the Dirichlet boundary condition for k at the bottom. With ε = Pk=(ub∗)

2∂ures/∂z and (7.35) at the roughness height z0, there results the following boundary conditionfor ε:

ε|z=_d =(ub∗ )3

κ z0

(7.66)

The bottom friction velocity ub∗ is computed using (7.36). When we are dealing with rough surfaces,we need the value of z0. This parameter is related to the Chézy coefficient since, turbulence isgenerated by the presence of bed. The inverse expression of (7.49) equals:

z0 =H

e1+κC2D/√g

(7.67)

Version 3.17, November 2016 141

Page 142: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

that need to be evaluated at a water level point. If the coefficient C2D is not given, the user shouldprescribe the roughness height z0.

In case of wind forcing, the following Dirichlet boundary conditions are prescribed for both k andε at the free surface:

k|z=ζ =(uw∗ )2

√cµ

, ε|z=ζ =2(uw∗ )3

κhζ1

(7.68)

with hζ1 is the layer thickness near the free surface and uw∗ =√|τw|/ρ is the free surface friction

velocity computed with (7.15). In case of no wind, k and ε are set to zero.

For reasons of accuracy, the approximation of the eddy viscosity at the bottom and free surface,(νv)m,n,K and (νv)m,n,0, are modified and consequently, the discretizations of the diffusion termsin the k-ε model (4.99) in both the bottom layer and free surface layer are changed [19]. In thelogarithmic layer near the bottom, the eddy viscosity follows a linear distribution and is obtained bymeans of substitution of (7.65) and (7.66) in (2.98):

(νv)m,n,K = κub∗ z0 (7.69)

Similarly, in the logarithmic layer near the free surface, we have

(νv)m,n,0 =1

2κuw∗ h

ζm,n,1 (7.70)

7.3.5 Boundary conditions for the continuity and momentum equations atclosed boundary

We restrict ourselves to the virtual boundary cells Ω1n where the closed boundary surface is repre-sented by ξ = ξ3/2, i.e. the left boundary of the computational domain. In Figure 7.2 the situationhas been sketched for this boundary. The other boundaries can be treated in exactly the same way.At the closed boundary, the normal velocity unknown, i.e. u1,n,k, is prescribed. In the program thisis implemented by setting the corresponding main diagonal matrix element equal to 1 and the off-diagonal elements in the corresponding row to zero. The right-hand side component correspondingto this unknown is made equal the unknown itself. The velocity at the closed boundary is taken tobe the velocity of the boundary, which is in our case zero. Hence, the coefficients of the equation(6.7) for m = 1 are given by

p1,k = q1,k = r1,k = 0 (7.71)

The tangential velocity component, i.e. v1,n,k, is also set to zero. Hence, all coefficients of equation(6.1) for m = 1 are set to zero, except b1,n,k = 1.

The water level in the virtual point is unchanged. Thus, at the start of a row, the coefficients ofequation (6.10) are given by

A1 = C1 = 0, B1 = 1, D1 = ζ1 (7.72)

Note that the water level in the virtual point has been initialised.

142

Page 143: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 7. Implementation of the boundary conditions

- point

m = 2 m = 3m = 1

n

n - 1

n + 1

u - point

v - point

ζ

Figure 7.2: Grid at left boundary with virtual points.

7.3.6 Boundary conditions for the transport equation at closed boundary

We consider the left closed boundary that goes through the water level points just outside the com-putational domain, as described in the previous section. At this boundary, a Dirichlet condition isimposed: c1,n,k = 0. Hence, the coefficients of equation (6.18) for m = 1 are set to zero, except b1,k

= 1.0.

7.3.7 Boundary conditions for the vertical k-ε model at closed boundary

The prescription of k and ε on a closed boundary is performed for a ω-velocity point just outsidethe computational domain. This point is a non-active point, which means that it is taken out of thecomputation (indicated by way of mask arrays). Therefore, the values of these turbulence quantitiesare unchanged during the calculation. Hence, they are determined through initialisation.

7.3.8 Boundary conditions for the horizontal k-ε model at closed boundary

The prescription of depth-averaged k and ε on a closed boundary is performed for a depth point.The value of these quantities are actually zero, although they are set to 10−7. Considering the leftboundary (m = 1) it is implemented as follows. The coefficients bm and dm in (6.29) are set to 1and 10−7, respectively, whereas am = cm = 0.

Version 3.17, November 2016 143

Page 144: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

7.3.9 Boundary conditions for the continuity and momentum equations atopen boundary

Along an open boundary one of the following type of boundary conditions must be specified:

water level: ζ = Fζ(t)

velocities: u = Fu(t), v = Fv(t)

discharge: Q = FQ(t)

(7.73)

These conditions are externally described by the user. Details can be found in Section 7.3.10. Theopen boundaries are introduced to obtain a limited computational area. In nature, waves cross theseboundaries unhampered and without reflections. In numerical models this can be realized by the useof weakly reflective boundary conditions in the form of Riemann-invariants, which are given by

U ± 2√gH, V ± 2

√gH (7.74)

with U and V the depth-averaged horizontal velocities as defined by (2.26). The Riemann-invariantis the characteristic solution of the linearised shallow flow equations. The sign depends on thelocation of the boundary. The plus sign refers to an inflowing Riemann-invariant at the left andlower boundaries, and the minus sign refers to inflowing Riemann-invariant at the right and upperboundary. For a description is referred to [77]. However, the Riemann-invariants are in general notknown. Stelling [63] proposed a weakly reflective form for the boundary conditions with respectto the water level and velocity. At the water level boundary, we employ the following boundarycondition:

ζ + α ∂∂t

(2√gH ± U

)= Fζ(t)

or

ζ + α ∂∂t

(2√gH ± V

)= Fζ(t)

(7.75)

whereas at the velocity boundary, we used the following boundary conditions:

u+ α ∂∂t

(2√gH ± U

)= Fu(t)

v + α ∂∂t

(2√gH ± V

)= Fv(t)

(7.76)

The reflection coefficient α should be chosen sufficiently large to damp the short waves introducedduring a cold start. Moreover, the reflection coefficients corresponding to water level and velocityboundary conditions are not necessarily equivalent. The following values are advised:

Water level boundary: α = Td

√H

g(7.77)

Velocity boundary: α = Td (7.78)

Td is the time it takes for a free surface wave to travel from the left boundary to the right boundaryof the model area. In ocean and sea models the period Td is of the same order as the period of the

144

Page 145: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 7. Implementation of the boundary conditions

tidal forcing. In that case α must be set to zero, otherwise effectively the amplitude of one of thecomponents in the boundary condition is reduced. These values can be derived with Fourier analysisfor the 1D linear long wave equation without advection by substituting a wave with period Td.

In some cases, the user may prescribe the flow rate Q on a discharge boundary. The velocities arederived from this flow rate according to the formula:

u =Q

H√gηη

, v =Q

H√gξξ

(7.79)

The discharge boundary goes perpendicularly through either a u-velocity or a v-velocity point.

Just as in the preceding cases, we restrict ourselves to the left boundary. For each type of boundary(water level, velocity, discharge and Riemann-invariant), we reformulate the equations (6.7), (6.1)and (6.10) at the start of a row, using the corresponding boundary conditions. The weakly reflectivewater level and velocity boundary conditions contain the time derivative of the square root of thetotal water depth, which is expressed in the water level, as follows:

∂√H

∂t=

1

2√H

∂ (d+ ζ)

∂t=

1

2√H

∂ζ

∂t(7.80)

Water level boundary

At the start of a row (“m = 1”), the coefficients of the equation (6.7) are unchanged since, theboundary condition for water level (7.75) does not influence these coefficients. It should be notedthat near the boundary different approximations for advection and viscous terms are employed;see Section 7.2. The same holds for equation (6.1). Furthermore, at the boundary the wind andatmospheric pressure are neglected and no special measures are needed for the approximation of thepressure gradient due to density gradient.

The boundary condition is given by

ζ + α∂

∂t

(2√gH + U

)= Fζ(t) (7.81)

where Fζ is described by the user for boundary pointm = 1. Special care is needed for the Riemanninvariant part of (7.81) in 2D models. It appears to be crucial to capture only information travellingin ξ-direction, normal to the boundary, instead of capturing waves traveling parallel to boundariestoo. This is achieved by discretizing the term 2

√gH in interior waterlevel point m = 2, whereas U

is discretized in the u-velocity point m = 1.

ζ ′1 + α

√g

H1

ζ ′2 − ζ∗2∆t/2

+ αU ′1 − U1

∆t/2= Fζ(t) (7.82)

with

ζ∗2 = ζ2 −∆t/2

(√g∗)2,n

(Qy

2,n −Qy2,n−1

)(7.83)

according to (5.4) and with

H1 =K∑k=1

hu1,k, U1 =1

H1

K∑k=1

hu1,ku1,k (7.84)

Version 3.17, November 2016 145

Page 146: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

Note that the n-index has been dropped where the unknowns are coupled in the planes n = constant.

Equation (7.82) will be solved during step 2 mentioned in Chapter 6. In order to do so (7.82) ismultiplied by H ′1, frozen at iteration level q − 1

Hq−11 ζq1 +

Hq−11 α

∆t/2

√g

H1

ζq2 +Hq−1

1 α

∆t/2U q

1 = Hq−11 Fζ(t) +

Hq−11 α

∆t/2

√g

H1

ζ∗2 +Hq−1

1 α

∆t/2U1 (7.85)

Substitution of (6.9) for m = 1 in (7.85) gives (6.10) with the following coefficients:

A1 = 0

B1 = Hq−11 − α

∆t/2

∑Kk=1 p1,k(h

u1,k)

q−1

C1 =Hq−1

1 α

∆t/2

√gH1− α

∆t/2

∑Kk=1 q1,k(h

u1,k)

q−1

D1 = Hq−11 Fζ(t) +

Hq−11 α

∆t/2

(U1 +

√gH1ζ∗2

)− α

∆t/2

∑Kk=1 r1,k(h

u1,k)

q−1

(7.86)

with p1,k, q1,k and r1,k given in Appendix E.

QH-boundary

Another type of open boundary for river simulations with the WAQUA system is the Q-H relation,specified by means of a table relating total (downstream) discharge and water level. With the com-puted total discharge through the open boundary the corresponding water level is computed fromthis table (using linear interpolation) and used as a water level boundary condition. For values ofthe computed total discharge outside the range specified in the Q-H table, the first or last value inthe table is used. For smoothing in time, the computed water levels and user specified initial waterlevels are used.

Velocity boundary

The velocity boundary condition is given by

u+ α∂

∂t

(2√gH + U

)= Fu(t) (7.87)

where Fu is described by the user. However, if we define this function as

Fu(t) =1

H1

K∑k=1

hu1,k f

uk (t) (7.88)

then we can impose the boundary condition for each layer k by way of describing fuk . In someapplications, the function fuk has a logarithmic profile along the vertical. The roughness height z0

should be given. The logarithmic profile fuk is derived such that the integral from z0 to ζ equals Fu.Thus,

fuk (t) =

z′k−1

∫z=z′k

ln(zz0

)dz

ζ′

∫z=z0

ln(zz0

)dz

Fu(t)H′ (7.89)

146

Page 147: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 7. Implementation of the boundary conditions

In this case, the user must described Fu.

Discretization of (7.87) yields(1 + α

∆t

)u′1H′1

+ 12

α√g

∆t√H1ζ ′1 + 1

2

α√g

∆t√H1ζ ′2 =

1H′1

K∑k=1

(hu)′1,kfuk (t) + 1

2

α√g

∆t√H1

(ζ1 + ζ2) + α∆t

u1

H1

(7.90)

where u’1 and H’1 are given by (7.84). Next, equation (7.90) is multiplied with H’1, of which theresult is rewritten as(

1 + α∆t

) K∑k=1

(hu)′1,ku′1,k +

12

α√g

∆t√H1ζ ′1 + 1

2

α√g

∆t√H1ζ ′2

K∑k=1

(hu)′1,k =

K∑k=1

(hu)′1,kfuk (t) + 1

2

α√g

∆t√H1

(ζ1 + ζ2)K∑k=1

(hu)′1,k + α∆t

K∑k=1

(hu)′1,ku1,k

(7.91)

Note that the last term of (7.91) is an appropriate approximation of the last term of (7.90). Hence,for each layer k, we have the following equation:(

1 + α∆t

)u′1,k +1

2

α√g

∆t√H1ζ ′1 +1

2

α√g

∆t√H1ζ ′2 =

fuk (t) + 12

α√g

∆t√H1

(ζ1 + ζ2) + α∆tu1,k

(7.92)

so that, at the start of a row, the coefficients of equation (6.7) are given by

p1,k =

α√g

2∆t√H1

1+ α∆t

q1,k =

α√g

2∆t√H1

1+ α∆t

r1,k =fuk (t)+ α

∆tu1,k + 1

2

α√g

∆t√H1

(ζ1 + ζ2)

1+ α∆t

(7.93)

The coefficients of equation (6.1) for m = 1 are set to zero, except

b1,n,k = 1, d1,n,k = v1,n,k (7.94)

At the boundary, no physical information with respect to the water level is available. Therefore, weassume the water level behaves symmetrical at the boundary, thus ζ1 = ζ2. Hence, the coefficientsof equation (6.10) for m = 1 are given by

A1 = D1 = 0, B1 = 1, C1 = −1 (7.95)

Discharge boundary

The flow rate is described at the boundary: Q = FQ. Alternatively, one can describe the flow ratefor each layer fQk , which is defined as

FQ(t) =1

H1

K∑k=1

hu1,k f

Qk (t) (7.96)

Version 3.17, November 2016 147

Page 148: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

From (7.79), (7.84) and (7.96), we obtain the following equation:

u′1,k =fQk (t)

H ′1 (√gηη)1,n

(7.97)

Hence, the coefficients of equation (6.7) for m = 1 are given by

p1,k = q1,k = 0, r1,k =fQk (t)

Hq−11 (√gηη)1,n

(7.98)

The coefficients of equation (6.1) for m = 1 are set to zero, except

b1,n,k = 1, d1,n,k = v1,n,k (7.99)

The zero normal gradient condition for the water level is imposed at the boundary. Hence, thecoefficients of equation (6.10) for m = 1 are given by

A1 = D1 = 0, B1 = 1, C1 = −1 (7.100)

Automatic distribution of discharges

A special type of open boundary for the simulations of flood waves in rivers with the WAQUA-system, is a discharge boundary with a spatial distribution of the total discharge through the opening,depending on the local water depth and the bottom friction. The local discharge Q in a point at anopening is computed as:

Q = Hu.√gηη.u (7.101)

where:

u = velocity at the open boundary

Hu = total water depth at u-point√gηη = width of the open boundary cell

The local velocity u in a boundary point is approximated by:

u ≈ C2D

√RI (7.102)

where:

C2D = Chézy coefficient

R = hydraulic radius

I = hydraulic gradient

The hydraulic radius R in a point of the open boundary is approximated by the local depth H . Withthe assumption of a constant hydraulic gradient I along the open boundary the ratio between thelocal discharge Qi in a point i and the total discharge Qtot through a opening can be expressed asfollows:

148

Page 149: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 7. Implementation of the boundary conditions

Qui

Qutot

=(Qu

i )3/2.(√gηη)i. (C2D)i∑

n

[(Hu

n)3/2.(√gηη)n. (C2D)n

] (7.103)

This expression is used for the computation of the spatial distribution of Qi along an open boundarysection from a user specified total discharge Qtot through an open boundary section. The total waterdepth in (7.103) is taken from the previous time level.

Riemann-invariant

The combination of both water levels and velocities is known at the boundary, located at u-velocitypoints, as follows:

u+ 2√gH (7.104)

Linearisation of (7.104) gives

u+ 2√g (ζ + d) ≈ u+ ζ

√g

d+ 2√gd (7.105)

The boundary condition given by the user is

FR(t) = u+ ζ

√g

d(7.106)

The term 2√

gd is computed via the known depth field and added to the given function FR. Thediscretization of (7.105) at a u-velocity point is given by

u′1H ′1

+ 2√g H1 +

√g

H1

(H ′1−H1) = FR(t) + 2√gd (7.107)

oru′1H′1

+ 12

√g

H1(ζ ′1 + ζ ′2) = FR(t) + 2

√gd

−2√g H1 + 1

2

√g

H1(ζ1 + ζ2)

(7.108)

The equation for each layer k is found by means of multiplying equation (7.108) with H’1:

u′1,k +12

√g

H1ζ ′1 +1

2

√g

H1ζ ′2 = FR(t) + 2

(√gd−

√g H1

)+1

2

√g

H1(ζ1 + ζ2)

(7.109)

Thus, the coefficients of equation (6.7) for m = 1 are given by

p1,k = 12

√g

H1

q1,k = 12

√g

H1

r1,k = FR(t) + 2(√

gd−√g H1

)+ 1

2

√g

H1(ζ1 + ζ2)

(7.110)

Version 3.17, November 2016 149

Page 150: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

The coefficients of equation (6.1) for m = 1 are set to zero, except

b1,n,k = 1, d1,n,k = v1,n,k (7.111)

The normal gradient is zero at the boundary for the water level. Hence, the coefficients of equation(6.10) for m = 1 are given by

A1 = D1 = 0, B1 = 1, C1 = −1 (7.112)

7.3.10 Implementation of the forcing functions

The functions Fζ , Fu, Fv andFQ (see (7.73)) are obtained directly from the user input. These func-tions together with wind and discharges provide external forces that drive the system.

Openings with time-varying water levels, velocities or discharges are driven by the forcing functionsFζ , Fu, Fv andFQ, respectively, that are given explicitly for each end of the opening at (regular orirregular) intervals. The values at each point on the opening are obained by interpolating spatiallyacross the opening and over time to obtain values at each half time step. The spatial interpolationtakes place before the time interpolation.

The forcing functions are defined by Fourier series, as follows:

Fx(t) = A0 +N∑n=1

An cos(ωnt− ϕn) (7.113)

where x is ζ , u, v or Q, N is the number of Fourier components, A0 is the mean water level orvelocity, An is the amplitude, ωn is angular velocity and ϕn is the local phase lag. The quantitiesA0, An and ϕn are spatially interpolated across the opening. Suppose that these quantities need tobe interpolated at point p in between points Pb and Pe. Let define f as the ratio of distance p − Pband distance Pe − Pb. Then the interpolated forcing value is given by

F x(t) = A0 +N∑n=1

An cos(ωnt− ϕn) (7.114)

whereA0 = A0(Pb) + f · (A0(Pe) − A0(Pb))An = An(Pb) + f · (An(Pe) − An(Pb))ϕn = ϕn(Pb) + f · (ϕn(Pe) − ϕn(Pb))

(7.115)

The difference of phases as given in (7.115) should satisfy the following condition:

|ϕn(Pe)− ϕn(Pb)| < π (7.116)

If the condition (7.116) is not fulfilled, then the phase at point Pe should be substracted by a certainmultiple of 2π until condition (7.116) is satisfied.

150

Page 151: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 7. Implementation of the boundary conditions

7.3.11 Boundary conditions for the transport equation at open boundary

Boundary conditions for concentrations are necessary at open boundaries and their type dependson the flow direction. At outflow, the concentration is determined by the concentration in upstreampoints. At inflow, the concentration is prescribed by means of a so-called Thatcher-Harleman bound-ary condition ([40], [70]). In this way, a smooth (sinusoidal) transition from the outflow concentra-tion to the inflow boundary condition can be described. Below, the implementation of the outflowand inflow boundary conditions is described.

We restrict ourselves to the virtual boundary cells Ω1n with an open boundary ξ = ξ3/2. The otherboundaries can be treated in exactly the same manner. At the outward flow boundary (u < 0), theconcentration is determined by pure advection of inner concentration:

∂c

∂t+

1√g∗

∂√gηηuc

∂ξ= 0 (7.117)

The first order upwind discretization of (7.117) is given by

(√g∗)2,n

c′1,k− c1,k

∆t+ (√gηη)1,n

u′1,k (c′2,k− c′1,k) = 0 (7.118)

Note that we have assumed that the volume of virtual cell with index m = 1 equals the volume ofcomputational cell with index m = 2. Moreover, the flux through the left cell face of virtual cellis assumed to be approximately equal to the flux through the right cell face. Considering equation(6.18), all coefficients are set to zero, except

b1,k = (√g∗)2,n−∆t (

√gηη)1,n

u′1,k

d1,k = (√g∗)2,n c1,k

e1ξ1,k = ∆t (

√gηη)1,n

u′1,k

(7.119)

Note that the equation has been multiplied with time step ∆t.

At the inward flow boundary (u > 0), the Thatcher-Harleman Dirichlet condition is imposed:

c′1,k = coutk +1

2

(cbndk − coutk

) [cos

Tret − tout

Tret

+ 1

], 0 ≤ tout ≤ Tret (7.120)

where coutk is the computed concentration at open boundary in layer k of the last time of outwardflow, cbndk is the background concentration in layer k described by the user, tout is the elapsed timesince last outflow and Tret is the constituent return time, which is for each layer the same, as de-scribed by the user. When the flow turns inward (tout = 0), the concentration is set equal to coutk .During the interval 0 ≤ tout ≤ Tret the concentration will return to the background concentrationcbndk . After that period, the concentration will remain cbndk . The mechanism is illustrated in Figure7.3. The implementation of the Thatcher-Harleman boundary condition is by means of setting thecoefficients of equation (6.18) to zero, except b1,k = 1 and d1,k equals c’1,k as given in (7.120).

An application of the Thatcher-Harleman boundary condition is the prescription of boundary con-dition for the salinity at the sea-side boundary. At the transition between river and sea, alternating

Version 3.17, November 2016 151

Page 152: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

outflow

time (s)

conc

entr

atio

n at

ope

ning

inflowoutflow

background concentration

return time

Figure 7.3: Illustration of memory effect for open boundary.

conditions hold regarding inflow of salt sea water and outflow of fresh river water. Immediatelyafter low water, the salinity of the inflowing water will not be equal to the salinity cbnd of the seawater. It will take some time before this happens at the boundary. This memory effect is modelledwith equation (7.120) and the duration of this effect, that is the salinity return time, depends on theflow conditions outside the estuary. If there is a strong circulation the return time is short. Theconcentration will remain cbnd until high water.

7.3.12 Boundary conditions for the vertical k-ε model at open boundary

At an open boundary that goes through the water level points just outside the domain, both k andε are determined by mirroring the values of the corresponding turbulence quantities, located justinside the domain, at the boundary. For example, at the left boundary, the following conditions areimposed:

k1,n,k = k2,n,k, ε1,n,k = ε2,n,k (7.121)

In mathematical terms, these conditions can be considered as homogeneous Neumann boundaryconditions:

∂k

∂n=∂ε

∂n= 0 (7.122)

where n denotes the outward normal to coordinate surface with ξn = constant.

7.3.13 Boundary conditions for the horizontal k-ε model at open boundary

The type of the boundary conditions for the depth-averaged turbulence quantities at open boundariesdepends on the flow direction.

In case of outflow the homogeneous Neumann conditions (7.122) are applied. The implementationfor these conditions is as follows. Consider the left boundary of the computational domain, i.e.m=1. The coefficients cm and dm in (6.29) are set to zero, whereas the other coefficients are asfollows: am = −1 and bm = 1.

152

Page 153: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 7. Implementation of the boundary conditions

At inflow, the depth-averaged turbulence quantities are prescribed as follows:

kin =3

2I2t u

2in , εin =

c3/4µ k

3/2in

0.1H(7.123)

where It is the turbulence intensity, taken to be 1% and uin is the depth-averaged inlet velocity.Considering left boundary and equation (6.29) at point m = 1, the coefficients bm and dm are setto 1 and ϕin, respectively, with ϕ one of the turbulence quantities as given in (7.123), whereasam = cm = 0.

7.4 Three-dimensional barrier formulation and its implementa-tion

TRIWAQ offers the possibility to define certain grid points to be sluices or barriers, which areconstructions with time-varying restriction on the flow. A barrier is located at a velocity point andits length is assumed to be zero. At a barrier point, the vertical wet cross-section may vary in time.In the horizontal directions the effective wet width may also be in- or decreased. Upstream of abarrier the flow is accelerated due to contraction and downstream the flow is decelerated due toexpansion. The expansion introduces an energy loss that need to be modelled. The energy lossvaries both by the raising and lowering of a sill and by the lowering and raising of a gate. Thisloss is taken into account by adding an extra term, which has te same quadratic form as the bottomfriction term, to the momentum equations.

The friction is described as a relation between the flow rate and the water level difference at thebarrier: the Q-h relation. The friction effects, such as the form friction and the friction alongside thepylons will be modelled with the so-called discharge coefficient µ. The discharge coefficient has tobe calibrated with measurements.

Several Q-h relations are being applied within WAQUA, which are related to the conditions of theflow around the complex of sluices. So there are Q-h relations for the sub- and super-critical flows.Apart from these there are distinct flow conditions which are related to a combination of a sill and agate, which are above water level or partly submerged.

Within TRIWAQ we limit ourselves to the sub-critical gate flow; see Figure 7.4. For this situationthe Q-h relation is given by:

Q = µB∗h0

√2g (h1 − h2) (7.124)

where Q is the flow rate through the barrier, B the opening width, h0 the vertical distance from thegate bottom until the sill (= lifting height), and h1 and h2 respectively the up- and downstream waterlevel with respect to the sill.

Given the velocity ub at the barrier location (not shown in Figure 7.4 ), and the fictive area hbBb

related to the actual water level, the bottom situation, as well as the width without the presence ofthe barrier then equation 7.124 with Q = hbBbubh1 = ζ1 + hs and h2 = ζ2 + hs leads to:

gζ2 − ζ2

∆x+

1

2M2

ub |ub|∆x

= 0 (7.125)

Version 3.17, November 2016 153

Page 154: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

2

z = -d

hs

hg

h0

x xx1 * 2

ζ1

ζ2h1

z = ζ

z = 0

U*

h

Figure 7.4: Schematisation of the sub-critical gate flow.

withM =

µB∗h0

hbBb

(7.126)

and ∆x = x2 − x1 being the grid unit in x-direction. Equation (7.125) can be regarded as the depthmean U-momentum equation in the point x, while neglecting the dynamics around the barrier,and adding an extra loss due to the barrier. This equation, with the addition of the dynamics, isimplemented within WAQUA [Techdoc WAQUA].

Let’s now regard the situation with K layers. An extra quadratic loss term with a loss coefficientλ∗,k, analogue to (7.125) is added per layer to the model at the location of the barrier. The layermean momentum equation for layer mean velocity u∗,k in the point x∗ then becomes

u′m,n,k−um,n,k∆t/2

+ ...+ S0z[hu, ω, u] + λm,n,k

u′m,n,k |um,n,k|

(√gξξ)

ξη

m,n

= −G0ξ[ζ′] + ... (7.127)

Depending on the model scale, the loss coefficient λ∗,k, is determined as such that it satisfies theQ-h relation (7.124), and hence the characteristic hydraulic behaviour is of the barrier is reflectedadequately. We distinguish two model scales: large-scale and small-scale modelling.

3D barrier formulation based upon the large-scale model approach (overview model)

With the overview model approach the presence of the gate and sill is neglected in the model. As aconsequence the velocity at the barrier location will not adapt itself. However, to create the waterlevel fall at the barrier, the flow rate has to be corrected. This can be accomplished by the additionof an extra loss term to the momentum equations at the barrier location according to 7.127 with

λ∗,k =1

2M2

ub |ub|u∗,k |u∗,k|

(7.128)

(see (7.125))

154

Page 155: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 7. Implementation of the boundary conditions

The depth mean velocity ub at the barrier location is given by:

ub =1

hb

K∑k=1

h∗,ku∗,k, hb =K∑k=1

h∗,k (7.129)

For K = 1 the formulation is identical to (7.65).

3D barrier formulation based upon the small-scale model approach (detailed model)

Because of the addition of the extra loss term based upon the large-scale model approach, as dealtwith in the previous paragraph, the flow rate through the barrier stays correct. However the localvelocity distribution at the barrier is not correct. Because of the rapid mixing of momentum invertical direction, this local fault will only have a minor effect upon the rest of the flow. Withmany layers in the vertical direction the advective salt fluxes will be calculated incorrectly. In suchsituations the 3D barrier formulation has to take the effect of the barrier into account, such that thevertical velocity and salinity profiles are described well at some distance from the barrier. Such aformulation can be realised based upon the small-scale model approach.

With this approach the gates and sills are ‘physically’ present in the model. The wet area thenresembles reality. Then there are minor differences between the real depth mean velocity and themodel velocity. Moreover the vertical velocity profile will be represented here as correct as possible.The orifice of the barrier will be determined by the position of the gate and the sill.

The vertical movement of the gate is simulated by means of a given time series. The sill of thebarrier can be modelled similarly. However the sill may also be modelled by adaptation of thebottom schematisation at the barrier location. Based upon water level, gate height, sill depth, anddepth one can determine which layers must be closed, which means setting the related layer meanvelocities to zero. This number of layers may vary per time step. Layers may only be closed fullyor not at all. The closure of a layer can be done by raising the loss coefficient λ∗,k in equation(7.127) to 108.. This is why the loss coefficient is dependent on the layer index k. However oneshould emphasize the fact that λ∗,k is independent of the vertical layer distribution. For the layerswhich are not closed, the calculation of the extra loss term in equation (7.127) is based upon the Q-hrelation.

At the location of the barrier the depth mean velocity is higher than the surrounding velocity. Thislocal velocity comes from the Q-h relation (7.124):

u∗ =Q

µB∗h0

=√

2g (h1 − h2) (7.130)

Accounting for the flow direction and h1 = ξ1 + hs and h2 = ξ2 + hs follows from this:

gζ2 − ζ1

∆x+u∗ |u∗|2∆x

= 0 (7.131)

The loss term in (7.131) should, so to speak, be distributed over the ‘open’ layers. This happens byregarding the equations (7.127) and (7.131) as equivalent, such that

λ∗,k =1

2

u∗ |u∗|u∗,k |u∗,k|

(7.132)

Version 3.17, November 2016 155

Page 156: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

To determine the depth mean velocity u∗ the flow rate through the barrier has to be calculated. Thisflow rate is related to the calculated wet area, which may deviate from the real wet area for tworeasons. Firstly, the barrier width needs not to be equal to the width of the grid cell. Secondly,partly open layers aren’t possible within the model. A partly open layer is regarded as fully open, ifthis layer is open for more than 50%, and as closed otherwise. Eventually this results in a differentflow area. This will be calculated in the barrier point as

Bb

∑k

h∗,k ≡ Bbhb (7.133)

where Bb is the local grid cell width. Notice that hb has a somewhat different meaning as in para-graph 2.2; it relates to the actual opening per width unit when barrier and sill are present. The depthmean velocity at the barrier location is than given by:

u∗ =Q

µB∗h0

=Bb

µB∗h0

K∑k=1

h∗,ku∗,k (7.134)

Notice that within closed layers λ∗,k = 108 hence u∗,k ≈ 0. The loss coefficient for the open layersis equal to:

λ∗,k =B2b

2 (µB∗h0)2

K∑j=1

h∗,ju∗,j

∣∣∣∣∣ K∑j=1

h∗,ju∗,j

∣∣∣∣∣u∗,k |u∗,k|

(7.135)

Expression (7.135) can be simplified by assuming that the velocity profile at the throat of the barrierhas the form of a block. In other words u∗,k is constant for all open layers j. So we get:

λ∗,k =B2b

2 (µB∗h0)2

(∑j

h∗,j

)2

=1

2µ2

(BbhbB∗h0

)2

=1

2M2(7.136)

In the small-scale approach the extra loss term in the motion equation (7.127) for open layers iscalculated based upon (7.136).

Necessary adaptations to the small-scale approach with respect to reproduction of flow rate andfall.

In the previous paragraph the barrier formulation for a small-scale 3D model is derived with a Q-hrelation. As described in the introduction, the 3D model must represent the Q-h relation with theassociated discharge coefficient, whereby the value of this coefficient must be about equal to thegiven (calibrated) value. In this way the energy loss will be calculated correctly. However, partof the energy loss is already accounted for by bottom friction and advective terms, so the givendischarge coefficient must be raised in order to decrease the loss term, thus realizing the right fall.

At the barrier location at the topside of the sill a free-slip condition is being imposed, so no extrafriction is being generated. This condition is:

νvδu

δz

∣∣∣∣z=−hs

= 0 (7.137)

where νv is the vertical eddy-viscosity. The condition (7.137) thus replaces the bottom friction inthe barrier point. Also at the bottom side of the gate the free-slip condition is imposed. Notice that

156

Page 157: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 7. Implementation of the boundary conditions

imposing the free-slip condition at the sill is consistent with how the sill is modeled. Furthermorethe free-slip condition has no influence upon the vertical velocity profile.

In case of a partly raised gate, the layer mean velocity has to be brought down to zero for a numberof layers in the 3D small-scale model. Based upon the water level, depth, gate height, sill depth andthe layer distribution, can be determined which layer must be ‘closed’, or in other words how muchvertical screens have to be placed. This number may vary per time step.

In TRIWAQ the arrays to set the screens can only be addressed two-dimensionally. Extensionof the existing property arrays to three dimensions requires radical modifications to the completesoftware. Instead of that is proposed to introduce two 3D property arrays for the adaptation of thediscretizations in and around the u- and v-barrier points. This however means that the supervisionstructure in the calculation routines has to be adapted.

The internal data structure of TRIWAQ has been extended with two 3D property arrays for respec-tively u- and v-velocity points, being kfbu and kfbv. With these arrays it is possible to discriminatebetween velocity points in barrier points and non-barrier points, and also to determine the status ofevery layer (open or closed) in the barrier points. If the value of kfbu in the u-velocity point is notequal to –1, than it relates to a u-barrier point. An open or closed layer in a u-barrier point is denotedby a kfbu value of 1 or 0 respectively. The meaning of the array kfbv with respect to the v-velocitypoint is fully analogue to that of kfbu.

When applying the large-scale model approach, all layers in the barrier points are open by definition.In case of the small-scale approach layers can either be fully closed or fully open. A partly openedlayer is regarded as fully open if this layer is open for more than 50%, and otherwise fully closed.

Discretizations in and around the barrier

The calculation routines in TRIWAQ (trscue, trsumo, trsdif) have been extended with the 3D prop-erty arrays kfbu and kfbv. With these arrays it’s possible to adapt the discretizations of the layermean momentum- and transport equations in and around the barrier. In this paragraph the layermean u-momentum equation is taken. The adaptation of the layer mean v-momentum equation issimilar.

The adaptation primarily concerns the discretizations of the advection terms uδu/δx and vδu/δy attwo levels:

1. The advection at open barrier points (kfbu = 1) is treated equally as at closed boundaries. Thismeans that these advective terms and the associated curve terms are fully eliminated in thefirst grid point before and after the barrier.

2. The advection scheme has been altered at the barrier location. In the ADI framework uδu/δxand vδu/δy in the non-barrier points (kfbu = -1), in one half time step, are estimated by the 2e

order upwind scheme, while in the other half time step the 2e order central scheme is used. Inan open barrier point however the term uδu/δx is discretisized with the central scheme. Thisis also valid in the direct vicinity of the barrier. If (m,n, k) = (m∗, n, k) is the open barrier

Version 3.17, November 2016 157

Page 158: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

Algorithm 7.1 - Calculation of the orifice at a barrier.

Given:- numbers of layers K > 1- energy loss coefficient λ∗,k- gate height hg and sill depth hs- layer interfaces at u-velocity points zsillk = −hs- zg = zu∗,0 and zs = zu∗,K

compute sill level relative to bottom: zsillk = −hsfor k = 1 to K do

if ( zu∗,k < hg and zu∗,k > zsillk ) thenif ( z∗,k−1 ≥ hg ) then

fac =hg−zu∗,k

zu∗,k−1−zu∗,k

if ( fac > 1/2 ) thenzg = zu∗,k−1

elsekfbu = 0zg = zu∗,k

end ifend if

elseif ( zu∗,k ≤ zsillk and z∗,k−1 > zsillk ) then

fac =zu∗,k−z

sill∗,k

zu∗,k−1−zu∗,k

if ( fac > 1/2 ) thenzs = zu∗,k

elsekfbu = 0zs = zu∗,k−1

end ifelse

kfbu∗,kend if

end ifend for

point, then uδu/δx is estimated in the whole field as follows (um,n,k > 0):

∀m 6=m∗,m∗+1,m∗+2: u δuδx≈um,n,k

2∆x (3um,n,k−4um−1,n,k+um−2,n,k)m=m∗: u δu

δx≈um,n,k

2∆x (um+1,n,k−u−1,n,k)m=m∗+1: u δu

δx=0

m=m∗+2: u δuδx≈um,n,k

2∆x (u+1,n,k−um−1,n,k)

(7.138)

where ∆x= cell-width in x-direction. Notice that the advective term in the first grid point after thebarrier is fully eliminated. Also the curvature term, which goes with uδu/δx, at the barrier location

158

Page 159: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 7. Implementation of the boundary conditions

is neglected at both half time steps. By this approach, the term uδu/δx at the barrier is discretisizedidentically in both half time steps, namely with central differences. In this way the energy loss iscalculated relatively accurate. For stability reasons the application of the 2e order upwind schemeupon the term vδu/δy at the open barrier point is being maintained.

The following terms are disregarded with the discretization of the momentum equation in a verticalscreen (kfbu=0):

• horizontal advection and viscosity

• barothrope and barocline pressure gradients

• Coriolis force

• wind, just like atmospheric pressure gradient

• bottom friction

The discrete form of the resulting momentum equation in a vertical screen (m,n, k) is given by:

am,n,kum,n,k−1 + bm,n,kum,n,k + cm,n,kum,n,k+1 = dm,n,k (7.139)

where am,n,k, bm,n,k, cm,n,k and dm,n,k are the coefficients which contain the contributions of thevertical terms. The coefficient b

m,n,kin (7.139) is overwritten by 108 (see routine TRSBAR), in order

to reduce the layer mean velocity um,n,k in the vertical screens to zero.

The vertical screens also lead to adaptations of the discretization of the transport equation. Insuch screens the advective and diffusive flux is set to zero. So thus this means that there is notransport through these screens. Also the anti-creepage terms at the barrier points are left out.Finally, analogue to the treatment of advection at open boundaries, around the barrier the 4e orderupwind scheme is replaced by lower order upwind schemes.

The final modification to the calculation routines concerns the implementation of the free-slip con-dition (7.137) at the upper end of the sill and at the lower end of the gate. We look at the followingvertical viscosity terms of the u-momentum equation:

1

hk

(νvδu

δz

∣∣∣∣zk−1

− νvδu

δz

∣∣∣∣zk

)(7.140)

where hk = thickness of layer k and zk = the interface between two layers k and k+1. The dis-cretization of (7.140) is given by:

S0zz = 2hum,n,k

((νv)

xm,n,k−1

um,n,k−1−um,n,khum,n,k−1+hum,n,k

−(νv)xm,n,k

um,n,k−um,n,k+1

hum,n,k+hum,n,k+1

) (7.141)

whereby the super lining denotes the averaging in x-direction. At the barrier point location thediscretization of (7.140) is modified as follows:

Version 3.17, November 2016 159

Page 160: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

1. if (kfbum,n,k−1 = 0 and kfbum,n,k = 1) or (kfbum,n,k−1 = 1 and kfbum,n,k = 0) then

S0zz = −2(νv)xm,n,khum,n,k

um,n,k−um,n,k+1

hum,n,k+hum,n,k+1

(7.142)

2. if (kfbum,n,k = 0 and kfbum,n,k+1 = 1) or (kfbum,n,k = 1 and kfbum,n,k+1 = 0) then

S0zz =2(νv)xm,n,k−1

hum,n,k

um,n,k−1−um,n,khum,n,k−1+hum,n,k

(7.143)

In relation to this it should be observed that there is no vertical advective transport at both the lowerend of the gate as well as at the upper end of the sill.

Finally, discretizations (7.7) and (7.8) are applied near barrier points (m±2,n,k) and (m±1,n,k),respectively, in order to prevent very high velocities near barriers. With respect to the approximationof the vertical advection term at a barrier point (m,n), the following discretizations are employed:

S0z[hu, ω, u] = ωξm,n,k

(um,n,k −um,n,k+1

hum,n,k +hum,n,k+1

),

if kfbum,n,k−1 = 0 and kfbum,n,k = 1or kfbum,n,k−1 = 1 and kfbum,n,k = 0

(7.144)

S0z[hu, ω, u] = ωξm,n,k−1

(um,n,k−1−um,n,khum,n,k−1 +hum,n,k

),

if kfbum,n,k = 0 and kfbum.n.k+1 = 1or kfbum,n,k = 1 and kfbum.n.k+1 = 0

(7.145)

Regarding the transport equation, the approximations (7.12) and (7.13) are applied near barrierpoints (m±2,n,k) and (m±1,n,k), respectively. Lastly, at a closed barrier point, i.e. kfbu(m,n, k)= 1, the horizontal advective and horizontal diffusive terms and the anti-creepage terms are set tozero. Also, there is no diffusive transport through closed barrier layers.

7.5 Drying and flooding procedure

7.5.1 Description of the general method

Estuaries and coastal embayments contain large, shallow and relatively flat areas separated andinterleaved by deeper channels and creeks. When water levels are high the entire area is watercovered but as tide falls, the shallow areas are exposed and ultimately the flow is confined onlyto the deeper channels. The dry tidal flats may occupy a substantial fraction of the total surfacearea. The accurate reproduction of covering or uncovering of the tidal flats is an important featurenumerical tidal flow models based on the shallow water equations.

Many rivers have compound channels, consisting of a main channel which always carries flow (thesummer-bed) and one or two flood plains which only carry flow during extreme river discharges(the winter-bed). The summer bed is surrounded by low dikes, which will overtop when the river

160

Page 161: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 7. Implementation of the boundary conditions

discharge increases. The winter-bed is surrounded by much higher dikes which are designed toprotect the polders against extreme river discharges. The flooding of the flood plains increases thedrainage capacity of the river and reduces the local water level gradients.

In the numerical model WAQUA/TRIWAQ flooding and drying is represented by removing gridcells that become “dry” when tide falls and adding grid cells that become “wet” when tide rises. Inthis section we specify the rules which are used to determine the moment when a grid cell or cellboundary becomes wet or dry. In WAQUA/TRIWAQ drying and flooding is constrained to followthe sides of grid cells, so only velocity points are subject to drying and flooding. It is a discontinuousmovement of the boundary and may generate small oscillations in water levels and velocities. Theoscillations introduced by the drying and flooding algorithm are small if the grid sizes are small andthe bottom has smooth gradients.

The number of grid cells that are set dry at low water, determines the storage capacity of an estuaryduring ebb tide and so the propagation of the tidal wave. The number of grid cells that are set wet athigh water, determines the storage capacity of an estuary during flood tide or the capacity of a riverduring extreme river discharges.

The crucial items in a wetting and drying algorithm are:

1. the way in which the water level and bottom depth are defined at velocity points,

2. the criterion for setting a velocity point wet or dry,

3. the way in which the bottom depth is defined in a water level point (determines retentionvolume).

Since the treatment of the ξ- and η-direction are analogous in the ADI-method of WAQUA, only theflooding and drying procedure in the ξ-direction is explained.

WAQUA is based on a staggered grid with the depth defined at the corner points of a control volume(C-grid). A convex or concave bottom profile can be represented within two grid cells. The totalwater depth at the velocity points is usually computed by averaging the water levels and depths:

Hum,n =

1

2(dm,n + dm,n+1) +

1

2

(ζ lm,n + ζ lm+1,n

)(7.146)

The total water depth should at least be positive to guarantee a realistic discharge across a cell face.

In WAQUA a u−velocity point (m,n) is taken out of the computation if the total water depth dropsbelow half of a given threshold δ:

Hum,n < δ/2 (7.147)

and is re-admitted to the computation if the total water depth arises above the threshold:

Hum,n > δ. (7.148)

The drying threshold is given half the value of the wetting threshold to inhibit changes of state intwo consecutive time steps (“flip-flop”), due to oscillations introduced by the algorithm itself.

The control volume is closed for transport at the cell face where a dry velocity point is located. InWAQUA the status (dry or wet) of a velocity point is stored in mask arrays. The mask arrays for the

Version 3.17, November 2016 161

Page 162: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

u-velocity and v-velocity points are KHU and KHV respectively. If the status of a velocity pointchanges e.g. from wet to dry, then the mask array is updated. The mask array KHU is defined asfollows:

KHU(m,n) = 0 permanently dry u-point

KHU(m,n) = −1 temporarily dry u-point

KHU(m,n) = 1 temporarily wet u-point

A control volume is excluded when all the four sides are inactive. The retention volume is the cellarea times the difference between water level and the bottom depth at the cell centre. Since thebottom is defined in the vertices of a grid cell, a set of methods is available to compute the bottomdepth at a water level point. The user may select a method at input. The most straight forwardapproach is averaging:

dζm,n =1

4(dm,n + dm−1,n + dm,n−1 + dm−1,n−1) (7.149)

For the combination of flow computations with transport of dissolved substances, the control vol-ume/retention volume should be positive. In Figure 7.5 an example is shown in which the bottomdepth in a water level point (dp), determined on the basis of the average depth, is below the bottom,while some of the adjacent velocity points still have a positive flow through height.

Figure 7.5: Negative control volume (with two positive flow through heights)

Therefore in the iterative procedure for the coupled system of continuity equation and momentumequation, see Chapter 5, there is a drying check applied to both the velocity points and the waterlevel points after each iteration. If the total water depth in a water level point is below half the

162

Page 163: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 7. Implementation of the boundary conditions

threshold value,

Hζm,n = dζm,n + ζm,n <

1

2δ (7.150)

both adjacent velocity points (m,n) and (m + 1, n) in the direction of the ADI-step, are taken outof the computation and the iteration is restarted. The velocity points in the η-direction are still open,because the discharges (fluxes) are at the previous time level. The discharges in the η-direction maystill suck the water level below the bottom. Hence negative volumes may still occur in WAQUA.Such negative volumes are not allowed in case of on-line coupling with transport (e.g. salt) oroff-line coupling with water quality models. In order to guarantee positive control volumes it isnecessary to redesign the computational part of WAQUA/TRIWAQ.

The drying and flooding control in the velocity points (7.147), (7.148) and in the water level points(7.150) are incorporated in the ADI-computational procedure of WAQUA as follows:

Stage 1:

First the momentum equation in the v−direction is solved. Before the system of equations is builtalong the η-grid lines there is a flooding check (7.148) for the open boundary points and a dryingcheck for the interior points (7.147) in the ADI-direction.

Next the coupled system of water levels and u-velocities is solved. Before the system of equations isbuilt along grid lines, there is a drying check (7.147) and a flooding check (7.148) in the ξ-directionat the u-velocity points. The system of equations is solved iteratively. During the iteration processthere is a drying check at the velocity points (8.1.2a) and a drying check at the water level points(7.150). When drying occurs, the coefficients in the system of equations are updated and the iterativeprocess is restarted.

In the transport equation, for a dry computational cell, the values of the constituent are frozen at theprevious time level.

In Stage 2 of the ADI-method the directions are interchanged.

7.5.2 Description of alternative methods available in WAQUA

Water level at cell sides

In the neighbourhood of steep bottom gradients, use of the average water level to compute the totalwater depth at a velocity point, may lead to an inaccurate determination of the flow-through height,see Fig. 7.6. The velocity point is set dry too early. A large volume of water is left on the tidalflat, increasing artificially the storage capacity of the wet area. The local surface elevations are notpredicted very well.

Figure 7.7 shows the situation of a river which overtops its bank. If we take the average water levelto determine the total water depth at the crest, the velocity point remains dry. The water level willrise too much in the main channel of the river, leading to unrealistic water levels downstream. Whenthe river run off increases, suddenly the flood plains are filled with water, generating a shock wave.

Stelling and Van der Molen used an upwind approach to determine the flow-through height [63,44]. The upwind water level is used at velocity points which are wet. At dry cell boundaries, themaximum of the two surrounding water levels is taken. Recently Van Kester et al. implemented

Version 3.17, November 2016 163

Page 164: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

a similar method in WAQUA [27]. The flow-through height is determined using the followingalgorithm , see also Section 4.1:

Figure 7.6: Drying of a tidal flat. Flow-through height based on the average water level, see Eq.(7.146). Depth in cell centre based on maximum depth, see Eq. (7.153).

Hum,n =

dη + ζm,nif um,n > 0dη + ζm+1,nif um,n < 0dη + max(ζm,n, ζm−1,n)if um,n = 0

(7.151)

Figure 7.8 shows that in the case of ebb tide, the upwind approach to determine the flow-throughheight will keep the velocity point wet until the tidal flat becomes empty. Similarly, Figure 7.9shows that by the new approach the river will overtop the dike at the correct moment.

Bottom depth at water level points

The initial water level at a dry cell is determined by the depth at the water level point:

ζm,n = −dζm,n + δ (7.152)

In cases of steep bottom slopes, the average approach for the determination of the bottom depth ina water level point may lead to flooding of one of the velocity points (7.148) and afterwards dryingin the first iteration by (7.150). This “flip-flop”-effect may deteriorate the speed of the computation.WAQUA offers two other ways to determine the depth in a water level point:

dζm,n = max(dξ

m,n, dξ

m,n−1, dη

m,n, dη

m−1,n) (7.153)

dζm,n = min(dξ

m,n, dξ

m,n−1, dη

m,n, dη

m−1,n) (7.154)

164

Page 165: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 7. Implementation of the boundary conditions

Figure 7.7: Overtopping of a river bank. Flow-through height based on the average water level, seeEq. (7.146). Depth in cell centre based on maximum depth, see Eq. (7.153).

Figure 7.8: Drying of a tidal flat. Flow-through height determined by flow direction, see Eq. (7.151).Depth in cell centre based on maximum depth, see Eq. (7.153).

Version 3.17, November 2016 165

Page 166: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

Figure 7.9: Overtopping of a river bank. Flow-through height based on maximum water level, seeEq. (7.151). Depth in cell centre based on maximum depth, see Eq. (7.153).

For method (7.153) the check in the water level points is less restrictive. Method (7.154) gives amore accurate tidal propagation.

Without coupling of transport, it is possible to leave out the extra check in the water level points,because negative retention volumes are allowed then. For the initialisation of the water levels, theaverage depth is used.

7.5.3 Flooding and drying at weir point

In WAQUA/TRIWAQ the user may define in velocity points so-called weirs. Weirs are hydraulicstructures causing energy losses. The height of the edge (HKRU) of the weir is taken into accountin the drying and flooding algorithm. Drying:

Hum,n <

1

2δ ∧max(ζm−1,n, ζm,n) +HKRUm,n <

1

2δ (7.155)

and flooding:Hum,n > δ ∧max(ζm−1,n, ζm,n) +HKRUm,n > δ (7.156)

166

Page 167: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 8. Linear solvers

Chapter 8

Linear solvers

The spatial and temporal discretizations, as discussed in the previous chapters, applied to the shallowflow equations coupled with a number of transport equations including turbulence lead to linearsystems of equations. In this chapter we consider the efficient solution of such systems. Adaptationsto these methods in case of domain decomposition are presented in [2].

We start in Section 8.1 by a general description of Gaussian elimination methods for the solution oftridiagonal systems of equations, which are very efficient and which are used as a building block indifferent solvers in WAQUA/TRIWAQ. We then give a general introduction into stationary iterativemethods, particularly the Jacobi and Gauss-Seidel methods.

In subsequent paragraphs we describe the different solvers that are used in WAQUA/TRIWAQ:

• Jacobi- and Gauss-Seidel type solvers for the momentum equations (paragraphs 8.3, 8.4),

• a linearization procedure for the continuity equation (section 8.5),

• the two-way Gaussian Elimination (TWGE) approach for solving tridiagonal systems in aparallel run (section 8.6),

• the TWGE-based solver and red-black Jacobi solvers for the transport equations in WAQUAand TRIWAQ (section 8.7),

• the flow-dependent Gauss-Seidel procedure that is used for the horizontal terms of the turbu-lence model (section 8.8).

Finally in Section 8.9 we give an overview of stopping criteria employed in WAQUA/TRIWAQ.

8.1 Introduction of Gaussian elimination for tridiagonal sys-tems

In many cases one has to solve a tridiagonal system of equations. Algorithms may be found inmany textbooks, for instance [24], where the Thomas’ algorithm is treated. We present two suitable

Version 3.17, November 2016 167

Page 168: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

algorithms that have been implemented in WAQUA/TRIWAQ. Let the matrix A be given by

A =

b1 c1

a2 b2 c2

• • •• • •

ak−1 bk−1 ck−1

bk ck

(8.1)

Let an LU factorization be given by

A = LU =

1α2 1• •• •

αk 1

β1 c1

• •• •

βk−1 ck−1

βk

(8.2)

withβ1 = b1

αi = aiβi−1

, i = 2, 3, ..., k

βi = bi−αi ci−1, i = 2, 3, ..., k

(8.3)

The solution of Ax = d is obtained by forward elimination and backward substitution:

δ1 = d1, δi = di−αi δi−1, i = 2, 3, ..., k

xk = δkβk, xi = δi− ci xi+1

βi, i = k − 1, k − 2, ..., 1

(8.4)

This algorithm is sometimes called the double sweep, because of the forward and backward sweepsneeded to obtain the solution. This technique is very efficient since the computational work requiredfor (8.3) and (8.4) is 8k - 7 floating point operations, whereas the storage required for αi and βi is2k - 1 reals. A disadvantage of the double sweep algorithm is that it does not lend itself well forimplementation on vector and parallel computers since it is a recursive approach.

The double sweep algorithm (8.3) and (8.4) has been implemented in TRIWAQ for decoupling theu-momentum and v-momentum equations at second and first stages, respectively, in the verticaldirection. Also, the equation for the water level (6.10) is solved with that algorithm. In case of thetransport equation as well as the k-ε equations, another double sweep algorithm to be presented isemployed. We apply the following LU decomposition:

A = LU =

β1

a2 β2

• •• •

ak βk

1 γ1

• •• •

1 γk−1

1

(8.5)

168

Page 169: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 8. Linear solvers

withβ1 = b1, γ1 = c1

β1

βi = bi− ai γi−1, i = 2, 3, ..., k

γi = ciβi, i = 2, 3, ..., k − 1

(8.6)

The solution is obtained by the following forward and backward sweeps:

δ1 = d1

β1, δi = di− ai δi−1

βi, i = 2, 3, ..., k

xk = δk, xi = δi− γi xi+1, i = k − 1, k − 2, ..., 1

(8.7)

8.2 Introduction to iterative methods: Jacobi and Gauss Seidel

We consider a system of linear equations Ax = d. Alternatives to the direct methods, of which theGauss elimination is an example, are the iterative methods. These methods generate a sequence ofapproximate solutions x(m) and essentially involve the matrix A only in the context of matrix-vector multiplication. The evaluation of an iterative method invariably focusses on how quickly theiteratives x(m) converge. The use of iterative solution methods is very attractive in time dependentand nonlinear problems. For these problems the solution of the linear system is part of an outerloop: time stepping for a time dependent problem and linearization for a nonlinear problem. Hence,good start vectors are in general available, namely the solution of the preceding outer iteration. Therequired accuracy is in general low for these problems. Both properties lead to the fact that onlya small number of iterations is sufficient to obtain the approximate solution of the linear system.In TRIWAQ the Jacobi method has been implemented for the solution of momentum and trans-port equations, whereas the turbulence equations in horizontal direction is solved with Gauss-Seideltechnique. These methods can be characterised as basic iterative methods. We present the algo-rithms of the methods used in TRIWAQ. Theoretical background of the basic iterative methods canbe found in [20, 76].

Although basic iterative methods are very cheap with respect to memory requirements, their con-vergence can be very slow, so the computing time may be much larger than for direct methods likeGaussian elimination. In [14] modern iterative methods of Krylov subspace type are considered.Generally, the rate of convergence of these methods is much better than for basic iterative meth-ods. However, Driessen ([14]) concluded that the advantages of the implemented Krylov methodsin TRIWAQ, like GMRES and GCR, are not clear-cut. He suggested that Krylov methods couldbe a good alternative for the red-black Jacobi process when the TRIWAQ models become morecomplicated. Details on the Krylov subspace methods may be found in [20].

Let the matrix A be split asA = B + C (8.8)

with C nonsingular. Then the following iteration method for the solution of Ax = d is called a basiciterative method:

Cx(m+1) = d−Bx(m) (8.9)

Version 3.17, November 2016 169

Page 170: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

Let define the diagonal matrix D = diag(A) and L and U which are the strictly lower respectivelythe strictly upper part of A. Hence, A = L + D + U . The choice C = D and B = L + U leads tothe (point) Jacobi method. This algorithm can be described by the following formula:

x(m+1)i =

di −∑j 6=i

aijx(m)j

aii(8.10)

where aij denotes the matrix element and xi and di are the elements of vectors x and d.

The Jacobi iteration does not use the most recently available information when computing x(m+1).For instance, x(m)

1 is used in the computation of x(m+1)2 even though component x(m+1)

1 is known. Ifwe revise the Jacobi iteration so that we always use the most current estimate of the exact x then weobtain the Gauss-Seidel method. This method is given by C = D + L and B = U . This algorithmcan be described by the following formula:

x(m+1)i =

di −∑j<i

aijx(m+1)j −

∑j>i

aijx(m)j

aii. (8.11)

The Jacobi method uses simultaneous computation of the elements of the new iterand x(m+1),whereas the Gauss-Seidel method uses successive displacements. This improves the convergencerate but decreases the possibilities for parallelization.

In general the convergence of basic iterative methods is higher when matrix C is “as large as pos-sible”: incorporating as many of the elements of A as possible and selecting the largest elements ofA to be incorporated in C. Two ideas along these lines that are used in WAQUA/TRIWAQ are asfollows:

1. It is not necessary for the Gauss-Seidel method to follow the natural ordering of unknowns.Instead it may be favourable to adjust the numbering that is used to the interactions of thecorresponding unknowns or grid points that are concerned. This is used in the solver for theturbulence model (section 8.8), where the direction of the flow vector is taken into account.

2. A part of the upper diagonal section U of A may be incorporated into C such that evaluatingequation (8.9) can still be done quite easily. Due to the particular structure of the matrix A ofsome of the systems of equations that must be solved, C can be chosen such that this requirestridiagonal systems to be solved. From a greater perspective this may be explained as that theequations (8.10) and (8.11) can be applied using small matrix blocks instead of scalars aij andvectors xj , di. This leads to the so-called block Jacobi and block Gauss-Seidel algorithms.

The convergence of the Jacobi method can be improved by treating groups of unknowns together asa single unknown. This leads to a block-wise splitting of the matrix. Each iteration then requiresinversion of the main diagonal blocks. For example, in TRIWAQ we deal with systems of equationsof which each of the matrices consists of a number of tridiagonal matrices on the main diagonal (seesteps 2 and 4 of the solution algorithm in Chapter 6) so, the inversion is accomplished by a solutionof tridiagonal systems of equations. Generally, the system Ax = d can be partitioned in the form

A1,1 ... A1,q

• •• •Aq,1 ... Aq,q

X1

••

Xq

=

D1

••

Dq

(8.12)

170

Page 171: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 8. Linear solvers

where Ai,j is an ni × nj submatrix and n1 + ... + nq equals the size of A. Furthermore, Xi and Di

represent subvectors of order ni. Let define

D =

A1,1 ∅

••

∅ Aq,q

, L =

0

A2,1 • ∅• • •• • •Aq,1 Aq,q−1 0

and U =

0 A1,2 A1,q

• • •• • •

∅ • Aq−1,q

0

(8.13)

For the given matrices D, L and U the block Jacobi process is given by C = D and B = L + U .The iterates can be obtained by the following algorithm:

X(m+1)i = A−1

i,i

(Di −

q∑j=1

AijX(m)j

), j 6= i, i = 1, ..., q (8.14)

8.3 System of equations for u-momentum equation: line Gauss-Seidel

In the first half time step of the ADI-splitting the v-velocities are implicitly coupled by the advectionterms. In the second half time step the u-velocities are coupled in the same way. We describe thesolution method that is used for the u-velocities in 2D WAQUA computations.

The advection term in x/ξ-direction couples u-points along lines n=constant (rows), while the v-advection term couples along lines m=constant (columns). The higher order upwind discretizationof the cross advection term (see Eq. (4.10), (4.11)) leads to a matrix with a special form. The matrixhas five non-zero entries. In each matrix-row the non-zero entries due to the cross advection areat one side of the main diagonal. If we assume that the v-velocity in grid point (m,n) is in thedirection of increasing n, the pentadiagonal system has the following form:

am−1,num−1,n + bm,num,n + cm+1,num+1,n + em,n−1um,n−1 + fm,n−2um,n−2 = dm,n (8.15)

The non-zero entries em,n−1 and fm,n−2 correspond to u-points on grid lines in the upstream y/η-direction.

If we add the implicit discretization of the horizontal viscosity term, a non-zero entry gm,n+1 in thedownstream direction is introduced:

am−1,num−1,n + bm,num,n + cm+1,num+1,n + em,n−1um,n−1 + fm,n−2um,n−2 + gm,n+1vm,n+1 = dm,n(8.16)

We remark that the coefficients in (8.16) are different from the ones in (8.15) by the addition of thehorizontal viscosity term. For the sake of simplicity we used the same symbols.

Version 3.17, November 2016 171

Page 172: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

To solve the system of equations we introduce an iterative procedure. This is a variant of the Gauss-Seidel method in which complete grid lines (rows) are updated in one step (see section 8.2), bysolving tridiagonal systems using a double sweep method (section 8.1). Further the ordering of thelines in the Gauss-Seidel approach is reversed from time to time take the direction of the flow intoaccount.

The dominant flow direction, increasing or decreasing n, is determined by summation of all v-velocities:

sign = sign

(∑∀m,n

vm,n

)The first sweep is in the dominant flow direction. If the sweep direction and the upwind directionare both in the direction of increasing n, the difference equation is given by:

am−1,nu[p]m−1,n + bm,nu

[p]m,n + cm+1,nu

[p]m+1,n = (8.17)

dm,n − em,n−1u[p]m,n−1 − fm,n−2u

[p]m,n−2 − gm,n+1u

[p−1]m,n+1 − hm,n+2u

[p−1]m,n+2

The u-velocities in grid points upstream (m − 1, m − 2) are known and taken at the new iterationlevel p, those in the downstream direction at the previous iteration level. If v has the same directionall over the grid and without horizontal viscosity, Eq. (8.17) is solved in one p-iteration. In generalmore iterations are necessary. The next sweep always proceeds in the opposite direction of thepreceding sweep. If the sweep direction is opposite to the dominant flow direction, then the upwindadvection term is evaluated at the previous iteration level p− 1.

In WAQUA the maximum number of iterations is specified by the user. The default maximumnumber of iterations is eight. A stopping criterion is used that determines the largest differencebetween u[p]

m,n and u[p−1]m,n throughout the field. The iteration process is stopped as soon as this largest

update falls below the user-defined tolerance or when the maximum number of iterations is reached.

The system of equations for the v-velocities at the first stage is solved in a similar way. The only dif-ference is that the system is solved column by column with the first sweep in the dominant directionof u.

8.4 System of equations for 3D u-momentum equation: red-black Jacobi method

The block Jacobi iterative method for linear systems was introduced in Section 8.2. In TRIWAQit is applied for solving the u-momentum and v-momentum equations in the second and first ADIstages, respectively. The spatial and temporal discretizations of these equations lead to systems ofequationsAx = d, of which block-structured matrixA contains MN tridiagonal matrices on the maindiagonal. Each of these tridiagonal matrices has size K × K. Note that the vector x is one of theunknowns u or v. Let C consist of the MN tridiagonal matrices. These matrices are all uncoupled.Furthermore, B = A − C. Substitution in (8.9) results in the block Jacobi iteration (8.14). Forthe start vector x(1) we take the solution obtained from the previous ADI stage. Note that C can beinverted by means of a double sweep.

172

Page 173: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 8. Linear solvers

In the block Jacobi process all grid points of the horizontal plane are updated simultaneously anddo not take into account each others updates. It turns out that the rate of convergence can be con-siderable enhanced by the chess-board or red-black ordering. We first number the odd points andthen the even points, or vice versa (see e.g. [24]). In this way a block Jacobi iteration is split intotwo steps. In the first step the unknown x(m+1/2) is computed dealing only with odd points in thehorizontal layers. In the second step this information is used to update the next iterate x(m+1) withrespect to the even points. Hence, we have the two-step algorithm (a form of predictor-correctorapproach):

x(m+1/2)i = C−1(di −Bx(m)

i ), i is odd point

x(m+1/2)i = x

(m)i , i is even point

(8.18)

followed by the second step:

x(m+1)i = C−1(di−B x(m+1/2)

i ), i is even point

x(m+1)i = x(m+1/2)

i , i is odd point(8.19)

Thus, the computational work for one iteration of the red-black Jacobi is the same as for the commonJacobi method. The red-black Jacobi strategy has been implemented in TRIWAQ as follows. Letdefine the following matrices:

Io = diag (I1, 0, I3, 0, . . . , Iq)

Ie = diag (0, I2, 0, I4, . . . , 0)

Bo = (B1,−I2, B3,−I4, . . . , Bq)T

Be = (−I1, B2,−I3, B4, . . . ,−Iq)T

Co = (C1, I2, C3, I4, . . . , Cq)T

Ce = (I1, C2, I3, C4, . . . , Iq)T

(8.20)

where Io and Ie are the identity (K × K) matrices for respectively the odd and even points, Bo

and Be are the row of submatrices of B for respectively the odd and even points, and Co and Cerepresent the tridiagonal matrices for respectively the odd and even points. Furthermore, q gives thenumber of block matrices (MN ); in 8.20 an odd value for q is assumed. From (8.20), it follows that

B = Bo + Io +Be + Ie

C = Co− Io +Ce− Ie(8.21)

Version 3.17, November 2016 173

Page 174: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

Then the red-black block Jacobi iterative technique is described as

First step: update unknowns in odd pointse(m+1/2) = Iod−Box(m)

solve Cox(m+1/2) = e(m+1/2)

Second step: update unknowns in even pointse(m+1) = Ied−Bex(m+1/2)

solve Cex(m+1) = e(m+1)

(8.22)

This algorithm is implemented in subroutine trsjam.

8.5 Coupled systems for the continuity and u-momentum equa-tions

The coupled system for the u-velocities u′ and waterlevels ζ ′ after the first half timestep, equations(5.4) and (5.3), are of the form

aakm,n,kζ′m,n + bbkm,n,ku

′m,n,k + cckm,n,kζ

′m+1,n = ddkm,n,k (8.23)

ζ ′m,n + fac1

∑k

h′m−1,n,ku′m−1,n,k + fac2

∑k

h′m,n,ku′m,n,k = d0km,n,k (8.24)

This shows that the equations for different grid rows (different n) are uncoupled. Further there arenon-linear terms through the dependence of h(u) at the new time-level on ζ ′.

The solution method for these equations consists of writing u′m,n,k as a function of ζ ′m,n and ζ ′m+1,n,using (8.23), and substituting this into (8.24). This yields a non-linear, tri-diagonal system of equa-tions for ζ ′m,n.

A complication with this scheme is that the continuity equation should be solved up to machineaccuracy in order to ensure mass-conservation. However, how do we solve a non-linear system upto machine accuracy? When we linearize (8.24), for instance by taking the factors h′ at old iterationlevel h[q−1] (frozen coefficient approach, Picard iteration), we get a linear tri-diagonal system thatmay be solved by a double sweep. The non-linear system is then solved in an approximate way, andwe need to iterate with a strict tolerance in order to obtain the required accuracy.

A trick is applied that allows us to achieve mass-conservation after each step. This trick consists ofmultiplying the free surface gradient (the terms with aak and cck) in (8.23) by the factor

r[q] =h

[q−1]m,n,k

h[q]m,n,k

(8.25)

174

Page 175: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 8. Linear solvers

The momentum equation (8.23) is thus replaced by (8.26):

h[q−1]m,n,k

h[q]m,n,k

aakm,n,kζ[q]m,n + bbkm,n,ku

[q]m,n,k +

h[q−1]m,n,k

h[q]m,n,k

cckm,n,kζ[q]m+1,n = ddkm,n,k (8.26)

Note that the two equations are equivalent when convergence has been obtained, i.e. r[q] = 1.

In the actual program the coefficients aak, bbk, cck and ddk are scaled such that bbk = 1. Thenvertical integration of (8.26) and rearranging terms yields:∑

k

h[q]m,n,ku

[q]m,n,k =

∑k

ddkm,n,k − ζ [q]m,n

∑k

h[q−1]m,n,kaakm,n,k − ζ

[q]m+1,n

∑k

h[q−1]m,n,kcckm,n,k (8.27)

Inserting this equation into (8.24) yields a linear tri-diagonal system for ζ [q].

am−1,nζ[q]m−1,n + bm,nζ

[q]m,n + cm+1,nζ

[q]m+1,n = dm,n (8.28)

This tridiagonal system (8.28) is solved by a double sweep, see Section 8.1. After that, the veloci-ties u[q]

m,n,k may be computed by substitution of the waterlevels ζ [q] into the discretized momentumequation per layer (8.26). Note that these velocities are not needed for the iteration procedure;the vertical integration (8.26) does not require u[q−1]. The velocities may be used in the stoppingcriterion though. This yields a solution that satisfies continuity equation exactly and hence massconservation is guaranteed.

8.6 Parallel runs: the two-way Gaussian Elimination algorithm

The double sweep (Gaussian elimination) method that is used in the previous section is inherentlysequential through its recursive nature. This is no problem for the tri-diagonal systems over all layersthat occur in solution of the momentum equations, in the transport part and in the k-ε turbulencemodel of TRIWAQ, because the parallellization works by partitioning of the horizontal grid only.However, the method cannot be maintained for the solution of waterlevels, because here tri-diagonalsystems must be solved for each row or column of the computational grid. Here a parallellizablealternative is needed.

In general, three classes of parallel solution methods for tri-diagonal systems can be distinguished(see [25, 60] for an overview):

1. Gather all information for each system on the same processor and use the sequential solutionmethod [60]. This requires a redistribution of data in each half timestep, and therefore appearsto be poorly scalable to large numbers of processors.

2. Parallel direct solution methods for (collections of) tri-diagonal systems of equations. Anexample is modified Wangs partition method [43]. A disadvantage of this method is thatit requires 2.5 times more operations per system. Other direct solution methods exist thatexplicitly use that several systems must be solved simultaneously, which avoid this numericaloverhead. For instance GE can be performed in a pipelined fashion [25], with as disadvantagethat it has a larger communication overhead (requires many communication phases).

Version 3.17, November 2016 175

Page 176: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

3. Use an iterative solution technique. Disadvantages are that the amount of work is not knownbeforehand and is in general higher than for the GE method. Furthermore the numericalefficiency can be decreased if the number of processors is increased. One advantage is thatiteration is required anyhow in case of non-linearities.

One iterative method that can be implemented easily is the Block Jacobi method (BJ). In the imple-mentation this means that pseudo-boundary conditions are introduced of the form:

X(m+1)i = X

(m)i

where the tilde indicates that the corresponding value is obtained from a neighbouring processor.These equations are used for the grid points i at the start and end of rows of the subgrid. Althoughsimple, this method appears to converge only slowly if larger time steps are used or if a small tol-erance ε is used. Therefore we present an alternative in which the block Jacobi method is used incombination with the so-called two-way Gaussian Elimination method in order to improve conver-gence.

8.6.1 Two-way Gaussian Elimination

The TWGE method is a direct solution method for tri-diagonal systems that can be parallellizedusing two processors.

Consider a tri-diagonal system that is splitted between two processors. The two processors startsolving the system at the same time. The first processor starts with the first equation and eliminatesthe lower-diagonal entries ai (that is, it calculates βi, δi of equations (8.4) and (8.3). The otherprocessor starts with the last equation and eliminates upper-diagonal entries ci (i.e. calculating βi,δiof equations (8.6) and (8.7)). They both continue for all the equations that belong to their subgrids.Then we have the following situation (see also Figure 8.1):

proc 1: βml Xml + cml Xml+1 = δml (8.29)proc 2: amfu Xmfu−1 + βmfu Xmfu = δmfu (8.30)

Here the subscript ml denotes the m-coordinate of the last interior point of processor 1, and mfuindicates the first interior point of processor 2.

We now proceed as follows. The two processors exchange coefficients such that both processorsknow both equations. Then the elimination can continue with one step in the forward direction andthen a backward sweep. Thus processor 1 first eliminates aml+1, calculates Xml+1 and then solvesXm for m = ml downto 1. Processor 2 eliminates cmfu−1, calculates Xmfu−1 and then Xm for m =mfu to M . The exchange of equations can be achieved directly through the update communicationfunction of the COCLIB communication library.

8.6.2 Combination of BJ and TWGE

If there are more than two processors that share a row, then we cannot use the TWGE methoddirectly. Instead we propose a combination of the block Jacobi method and the TWGE method,

176

Page 177: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 8. Linear solvers

Figure 8.1: Tridiagonal system after the first stage of TWGE. Small asterikses indicate zeros pro-duced by elimination

denoted by BJ-TWGE. If a system is shared by four processors, then the first two can performTWGE and also the latter two. In the middle, we use a block Jacobi coupling: processor 2 uses thevalue X(m)

mfu of processor three from the previous iteration and vice versa. This doubles the block-size in the BJ method, and thus improves the convergence. An even larger improvement is achievedif we let processors 2 and 3 perform TWGE in the next iteration. This is because then in effect wehave a domain decomposition algorithm with highly overlapping subdomains.

The main difficulty in implementation of this algorithm is to coordinate all processors such that theyeliminate the proper (upper- or lower) diagonals. This problem is solved by introducing a (kind ofchess-board) coloring of subrows. Subrows that are designated as red in a particular iteration willbe treated as the start of a pair of subrows for which TWGE is performed (processor 1 in Figure8.1), and subrows that are designated as black will be the second part of the tri-diagonal system tobe solved by TWGE (processor 2 in Figure 8.1). So for red subrows we can have a BJ equation atthe start of the row, we start by performing a forward sweep, exchange coefficients for the end ofthe row and proceed by a backward sweep. For black subrows there can be a BJ equation at theend of the row, and we must first perform a backward and then a forward sweep. To use differentcombinations in consecutive iterations is achieved by adjusting the color of all subrows betweeniterations.

Version 3.17, November 2016 177

Page 178: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

8.6.3 A scheme for coloring of sub-rows

One refinement of the scheme presented above is that we do not want to adjust the color of subrowsin cases where only two subrows together form a row of the global domain. In that case the TWGEmethod can be used to obtain an exact solution of the (linearized) tri-diagonal system without anyneed for iteration. This case is especially important because an ORB partitioning of a grid into 4subgrids results in each row and column of the global domain being splitted in at most two subrowsor subcolumns (see the users guide of the partitioner).

Therefore we introduce the following codes for the coloring of subrows:

always_red this subrow is designated as red in all iterations;

alternating_red_black this subrow is designated as red in odd iterations and black in even itera-tions;

alternating_black_red this subrow is designated as black in odd iterations and red in even itera-tions;

always_black this subrow is designated as black in all iterations.

The code for each row is determined as follows.First all processors set code always_red for all subrows that are at the start of a global row (indicatedby boundary condition codes for physical boundaries at the start of the row). Subrows at the end ofa global row are marked (temporarily) as always_black, and all other subrows are marked as white(not colored yet).

Next an iterative procedure is started. All processors exchange the colors of their subrows with theneighbouring processors. Rows that are marked always_black keep this code only if the neigh-bouring subrow at the start has code always_red, else it is marked white. Similarly, all rows thatare marked as always_red get code alternating_red_black unless the neighbouring subrow at theend has code always_black. Finally the code of subrows with code white is changed into eitheralternating_red_black or alternating_black_red as soon as the neighbouring subrow at the startof this subrow is assigned a code other than white.

The BJ-TWGE algorithm is implemented in subroutine trstrd. trstrd inserts BJ equationswhere they are needed, and updates the resulting solution for stencil stenc1ξ. The algorithm uses acoloring of subrows as described above. This coloring is provided by subroutine wasrwc.

8.7 System of equations for transport: double sweep or red-black Jacobi method

The ADI-splitting applied to the advection and diffusion terms of the transport equation couples theconcentrations along grid lines (columns or rows), see equation (5.12).

When using the WAQUA scheme for the advection term (section 4.7.2), a five-point wide stencil isemployed. The equation for point m,n may contain contributions of neighbouring points m− 2, n

178

Page 179: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 8. Linear solvers

up to m + 2, n. The system of equations for the first stage of the ADI-method (that corresponds toan implicit discretization in x/ξ-direction), can be written in the form

em,nc′m−2,n + am,nc

′m−1,n + bm,nc

′m,n + cm,nc

′m+1,n + fm,nc

′m+2,n = dm,n (8.31)

This system of equations is pentadiagonal and is solved (in one step) using a straight-forward ex-tension of the double sweep method of section 8.1. In parallel runs it is solved using the BJ-TWGEmethod as described in the previous paragraph. In this case iteration is required.

When the TRIWAQ advection scheme is used (section 4.7.3) the stencil is at most seven points wide(m− 3, n to m+ 3, n). In this case the equation for grid point (m,n, k) also contains contributionsfrom grid points (m,n, k − 1) and (m,n, k + 1), and when the anti-creep terms are computed alsofrom points (m ± 1, n, k ± 1). Hence this system of equations cannot be solved efficiently using adirect solver. The iterative red-black Jacobi method is used, see section 8.4. One difference withrespect to the solution of the momentum equations is that there are now (“N”) separate systems of(“M”) equations for different grid rows.

8.8 Turbulence equations: flow-dependent Gauss-Seidel method

The Gauss-Seidel method is an alternative iterative method for linear systems that also has beenintroduced in Section 8.2. We apply the point Gauss-Seidel technique for the solution of pentadi-agonal systems as occur in turbulence equations in horizontal direction (see equation (6.23)). Anadapted version of this method is employed, namely the flow-following Gauss-Seidel method. Inthis approach the ordering of updates of the unknowns depends on the direction of the flow, i.e.sweeping through grid rows in positive and negative directions depending on the sign of u-velocityand doing the same for sweeps over rows when considering the sign of v-velocity.

Let us consider the following pentadiagonal system of equations:

am,n km,n + e1ξm,n km+1,n + e−1ξ

m,n km−1,n

+ e1ηm,n km,n+1 + e−1η

m,n km,n−1 = dm,n

(8.32)

Depending on the direction of the horizontal velocities and thereby the upwind differences used, weobtained the algorithm for the solution of (8.32) as displayed in Algorithm 8.1.

Note that there are some virtual unknowns such as k0,n and kM+1,n that need to be filled by meansof boundary conditions (see chapter 7).

8.9 Convergence criteria for sequential and parallel runs

Different criteria are used in WAQUA/TRIWAQ to stop the iterative solution methods. For themomentum equations we have the following termination criterion:

maxi|u(m+1)i − u(m)

i | < εvel (8.33)

Version 3.17, November 2016 179

Page 180: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

Algorithm 8.1 - Flow-following Gauss-Seidel iteration process.

for j = 1 to J do

for n = 1 to N dofor m = 1 to M do

if ( uξzm,n > 0 and vηzm,n > 0 ) then

k(j+1)m,n =

dm,n−e−1ξm,nk

(j+1)m−1,n−e

−1ηm,nk

(j+1)m,n−1

am,n

end ifend for

end for

for n = 1 to N dofor m = M to 1 do

if ( uξzm,n < 0 and vηzm,n > 0 ) then

k(j+1)m,n =

dm,n−e1ξm,nk(j+1)m+1,n−e

−1ηm,nk

(j+1)m,n−1

am,n

end ifend for

end for

for n = N to 1 dofor m = 1 to M do

if ( uξzm,n > 0 and vηzm,n < 0 ) then

k(j+1)m,n =

dm,n−e−1ξm,nk

(j+1)m−1,n−e

1ηm,nk

(j+1)m,n+1

am,n

end ifend for

end for

... (see algorithm 8.2) ...

180

Page 181: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 8. Linear solvers

Algorithm 8.2 - Flow-following Gauss-Seidel iteration process (continued).

... (see algorithm 8.1) ...

for n = N to 1 dofor m = M to 1 do

if ( uξzm,n < 0 and vηzm,n < 0 ) then

k(j+1)m,n =

dm,n−e1ξm,nk(j+1)m+1,n−e

1ηm,nk

(j+1)m,n+1

am,n

end ifend for

end for

end for

The continuity equation may also use criterion (8.33), or may use the following criterion:

maxi|ζ(m+1)i − ζ(m)

i | < εwl (8.34)

Finally the transport and turbulence equations employ

maxi

|c(m+1)i − c(m)

i |max(1, |c(m+1)

i |)< εconc (8.35)

The value of εconc is usually of the order of 10−6 for the transport equations and 10−4 in other cases.

Evaluation of the stopping criteria above in parallel runs requires an exchange of information be-tween the different subdomains. All processors must perform the same number of iterations, firstlybecause the communication operations for exchanging values at subdomain boundaries assume tobe called by all processors simultaneously, but also because updates in one subdomain may requirechanges in all other domains. Therefore the processors must know from each other whether theyneed to perform another iteration or not.

The evaluation of the convergence test is achieved as follows. First each processor determines themaximum update in his own domain. Then the largest of all per subdomain residuals is determinedby communications subroutine cocrgl (see the programmers guide for COCLIB). Global (collec-tive) communication operations such as cocrgl are costly, especially if the number of processorsis large or if the time needed to initiate a communication is high. One way to reduce this cost is byperforming at least as much iterations as in the previous timestep, say 3, and calculate all residualsfor these iterations at once. This costs about as much time as is required for one residual becausethe message start up cost is dominating. The residuals of all iterations are needed in order to beable to detect that more iterations have been performed than required, in order to reduce the initialnumber of iterations to be performed in the next time-step. This scheme is used in parallel runs andis called the MINIT-scheme. It saves a number of global communications, at the cost of possiblyone or more iterations. It is especially effective if the number of iterations varies slowly betweendifferent timesteps.

Version 3.17, November 2016 181

Page 182: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

Chapter 9

The overall solution algorithm

The time integration procedure in TRIWAQ consists of 33 consecutive steps per time step as shownin Algorithm 9.1. These steps consist of setting up and solving systems of equations. In TRIWAQthe subroutines with respect to the ADI work are only written for the first stage. Through a changeof the pointers they are also suitable for the second stage. This means that data is accessed per gridcolumn in one stage and per grid row in the other stage. Algorithm 9.1 has been implemented insubroutine WASSIM. The structure of this subroutine and its main under subroutines is given inAppendix H.

182

Page 183: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Chapter 9. The overall solution algorithm

Algorithm 9.1 - Outline of the simulation of TRIWAQ.

initialize ζ(t0), u(t0), v(t0), ω(t0), c(t0), k(t0) and ε(t0)for t = t0 to tend −∆t step ∆t do

first stage:compute water density; eq. (2.49) (call WAGDEN)compute νv(t); eq. (2.78) or (2.98) (call TRSVIZ)compute ν2D(t); eq. (2.112) (call TRSV2D)calculate v(t+ ∆t/2) with given u(t), ω(t) and ζ(t); (call TRSCUE)

eqs. (5.2) and (6.1)remove or add u-points based on criterion (7.147), (7.148) (call TRSDFV)for q = 1 to Q do (call TRSSUW)

- calculate ζq(t+∆t/2) with given v(t+∆t/2); eq. (6.10)- perform a check of dry status of u at u- and ζ-points

and restart, if necessary (q = 1)- calculate hu(t+∆t/2) and hζ(t+∆t/2) according to

Algorithm 2.1- calculate uq(t+∆t/2); eq. (6.15)

end forperform a check of dry status of v at v- and ζ-points

and restart TRSSUW, if necessarycalculate ω(t+∆t/2) with given u(t+∆t/2), hu(t+∆t/2), v(t),hv(t); eq. (6.17)

calculate Chezy value at u-point; eq. (7.59) (call TRSCHZ)calculate Dv(t); eq. (2.76) (call TRSDIZ)calculate D2D(t); eq. (2.77) (call TRSD2D)calculate c(t+∆t/2), ξ-derivatives implicit; eqs. (5.11) (call TRSDIF)

and (6.18)calculate k*, only horizontal terms; eqs. (5.14) and (6.23) (call TRSTUR)calculate k(t+∆t/2), vertical terms + sources and sinks; (call TRSTUR)

eqs. (5.18) and (6.28)calculate ε*, only horizontal terms; eqs. (5.19) and (6.23) (call TRSTUR)calculate ε(t+∆t/2), vertical terms + sources and sinks;

eqs. (5.20) and (6.28)calculate k(t+ ∆t/2); eqs. (5.21) and (6.29) (call TRSHKE)calculate ε(t+ ∆t/2); eqs. (5.23) and (6.29) (call TRSHKE)

Version 3.17, November 2016 183

Page 184: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

Algorithm 9.2 - Outline of the simulation of TRIWAQ (continued).

second stage:compute water density; eq. (2.49) (call WAGDEN)compute νv(t); eq. (2.78) or (2.98) (call TRSVIZ)compute ν2D(t); eq. (2.112) (call TRSV2D)calculate u(t+∆t) with given v(t+∆t/2), ω(t+∆t/2) and (call TRSCUE)ζ(t+∆t/2); eqs. (5.6) and (6.1)

remove or add v-points based on criterion (7.147), (7.148) (call TRSDFV)for q = 1 to Q do (call TRSSUW)

- calculate ζq(t+∆t) with given u(t+∆t); eq. (6.10)- perform a check of dry status of v at v- and ζ-points

and restart, if necessary (q = 1)- calculate hv(t+∆t) and h.ζ(t+∆t) according to

Algorithm 2.1- calculate vq(t+∆t); eq. (6.15)

end forperform a check of dry status of u at u- and ζ-points

and restart TRSSUW, if necessarycalculate ω(t+∆t) with given u(t+∆t/2), hu(t+∆t/2),v(t+∆t), hv(t+∆t); eq. (6.17)

calculate Chezy value at v-point; eq. (7.59) (call TRSCHZ)calculate Dv(t); eq. (2.76) (call TRSDIZ)calculate D2D(t); eq. (2.77) (call TRSD2D)calculate c(t+∆t), η-derivatives implicit; eqs. (5.12) and (6.18) (call TRSDIF)calculate k*, only horizontal terms; eqs. (5.14) and (6.23) (call TRSTUR)calculate k(t+∆t), vertical terms + sources and sinks; (call TRSTUR)

eqs. (5.18) and (6.28)calculate ε*, only horizontal terms; eqs. (5.19) and (6.23) (call TRSTUR)calculate ε(t+∆t), vertical terms + sources and sinks;

eqs. (5.20) and (6.28)calculate k(t+ ∆t/2); eqs. (5.21) and (6.29) (call TRSHKE)calculate ε(t+ ∆t/2); eqs. (5.23) and (6.29) (call TRSHKE)calculate physical velocity w(t+∆t); eq. (4.120) (call TRSCPW)

end for

184

Page 185: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Appendix A. Leibniz’ rule

Appendix A

Leibniz’ rule

In this appendix we shall derive Leibniz’ rule. We consider an integral of a continuous function f :R2 → R:

b(x)∫a(x)

f(x, y)dy (A.1)

with y = y(x) and a and b are differentiable for all x. A situation is sketched in Figure A.1.

f(x,y)

ya(x)

b(x)

x

Figure A.1: A continuous function f with under- and upperbounds a and b.

First, let us assume that a and b in (A.1) are constants. If the integral (A.1) exists, ∂f /∂x is contin-uous on [a,b] and |∂f(x, y)/∂x| ≤ g(y) where ∫ ba g(y)dy exists, then

d

dx

b∫a

f(x, y)dy =

b∫a

∂f(x, y)

∂xdy (A.2)

Next, we may prove the following theorem:

d

dx

b(x)∫a(x)

f(y)dy = f(b)db

dx− f(a)

da

dx(A.3)

Version 3.17, November 2016 185

Page 186: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

Since ddx

x∫p

f(y)dy = f(x) with p = constant ( the fundamental theorem of calculus), we have

ddx

b(x)∫a(x)

f(x, y)dy = ddx

[b(x)∫0

f(y)dy −a(x)∫0

f(y)dy

]

= ddb

(b∫

0

f(y)fy

)dbdx− d

da

(a∫0

f(y)dy

)dadx

= f dydx

∣∣ba

(A.4)

Finally, since (A.2) means that y is constant and in (A.3) f does not depend on x, we can collect(A.2) and (A.3) into one formula known as Leibniz’ rule:

d

dx

b(x)∫a(x)

f(x, y)dy =

b(x)∫a(x)

∂f(x, y)

∂x+ f(x, b)

db

dx− f(x, a)

da

dx(A.5)

186

Page 187: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Appendix B. Tensor analysis

Appendix B

Tensor analysis

This appendix gives an overview of the concepts and definitions from tensor analysis necessaryfor the formulation of the shallow flow equations in boundary-fitted horizontal coordinates. Thematerial presented here is given without proofs, which can be found e.g. in [2].

B.1 Tensor notation

For readers not familiar with tensor notation, a short introduction to this subject is provided here.Tensor notation is used extensively in this document because it allows most equations to be writtenin a more compact form than is possible with the conventional notation.

In tensor notation we make extensive use of subscripts or indices. For example, in three-dimensionalspace, we rewrite the coordinate vector x = (x,y,z) as x = (x1,x2,x3). Now consider the continuityequation, viz.,

∂u

∂x+∂v

∂y+∂w

∂z= 0 (B.1)

This equation can be written as3∑

α=1

∂ uα∂ xα

= 0 (B.2)

where uα represents the component of the velocity vector. In tensor notation, we make use of theso-called Einstein summation convention, which is particularly effective in making formulae morecompact. This convention is as follows:

repetition of an index in a term denotes summation with respect to that index over its range.

The range of an index is the set of n integer values 1 to n. Hence, equation (B.2) reads:

∂ uα∂ xα

= 0 (B.3)

where α is the index that is summed over. The summation convention is assumed throughout thedocument, unless otherwise stated.

Version 3.17, November 2016 187

Page 188: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

B.2 Coordinate transformation

Let x = (x1, x2) and ξ = (ξ1, ξ2) be a Cartesian and a general curvlinear coordinate system. Fromnow on we write the coordinate components with an index as superscript. Note that in Section 2.6the indices 1 and 2 are replaced by ξ and η, and also ξ1 = ξ and ξ2 = η. Let us consider two regionsΩ ⊂ R2 and G ⊂ R2. These are related to each other by a transformation G→ Ω:

T : x = x(ξ), x ∈ Ω, ξ ∈ G (B.4)

We assume that the Jacobian

J =

∣∣∣∣∂ xα∂ ξβ

∣∣∣∣ , α, β = 1, 2 (B.5)

is strictly positive. Tensor calculus is concerned with the behaviour of certain quantities undertransformation from one coordinate system to another. Hence, it is necessary to consider the trans-formation properties of such quantities. A quantity T β is called a contravariant component of atensor of rank 1 if, under the transformation (B.4), this quantity transforms according to

Tβ =

∂ ξβ

∂ xαtα (B.6)

Here, Cartesian components of a tensor are denoted by lower case Roman letters, components ingeneral coordinates by upper case Roman letters. A quantity Tβ is called a covariant component ofa tensor of rank 1 if, under the transformation (B.4), this quantity transforms according to

Tβ =∂ xα

∂ ξβtα (B.7)

Note that the contravariant and covariant tensors are distinguished by super- and subscripts, respec-tively. This notation is essential in the tensor calculus. Tensors are, in fact, mathematical entitiesthat are independent of the coordinate system in which they are described. An example of a tensorof rank 1 is a vector u. Its Cartesian components are denoted by uα or uα with uα = uα, andits components in a general coordinate system are denoted by Uα or Uα (Uα 6= Uα). A quantitywith two indices is called a tensor of rank 2. For example, the stresses ταβ form the components ofcovariant tensor of rank 2. Scalars are tensors of rank zero.

B.3 Geometric quantities

The most fundamental quantities related to the transformation from Cartesian to general coordi-nate system are the base vectors. We have covariant base vectors a(α) which are tangential to thecoordinate lines ξα, and are defined as

a(α) =∂x∂ξα

(B.8)

The vectorsa(α) = ∇ξα (B.9)

188

Page 189: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Appendix B. Tensor analysis

are normal to the coordinate surface of constant ξα and are called contravariant base vectors. Fur-thermore, they are reciprocal to the covariant base vectors (see Figure B.1):

a(α) · a(β) = δβα (B.10)

a

a

a

a

(1)

x

x

ξ

ξ

1

1

2

2

(2) (1)

(2)

Figure B.1: Cartesian and general coordinate system with co- and contravariant base vectors.

where δβα is Kronecker delta (which is unity if α = β, and zero otherwise). The Kronecker deltais a very useful quantity. Another useful quantity is the so-called permutation symbol εαβγ and isdefined as:

εαβγ =

1, if (α, β, γ) is an even permutation of (1, 2, 3)

−1, if (α, β, γ) is an odd permutation of (1, 2, 3)

0, if any two of (α, β, γ) are equal

(B.11)

For example, ε122 = 0, ε231 = 1, ε213 = −1. An example of the use of the permutation symbol isthe short formulation of the Coriolis force (see (2.13)).

The relation between the contravariant and covariant base vectors in two dimensions is given by

a(1) =1

J

(a2

(2),−a1(2)

)T, a(2) =

1

J

(−a2

(1), a1(1)

)T (B.12)

Each vector u can be written as a linear combination of the base vectors. For example, we have

u = a(α)Uα or uβ = a(α)β Uα (B.13)

See Figure B.2.

Using (B.10) it follows thatUβ = a(β) · u = aα(β)uα (B.14)

Version 3.17, November 2016 189

Page 190: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

u

x

x

δ

ξ

ξ

2

1

2

1

α

β

γ

Figure B.2: A vector represented in two different coordinate systems: u = αe(1) + βe(2) = γa(1) +δa(2), with e(α) and a(α) unit vectors along the coordinate axes.

and hence, from (B.12) we find a useful expression of the contravariant vector component in termsof Cartesian components:

U1 =1

J

(u1∂x2

∂ξ2− u2

∂x1

∂ξ2

), U2 =

1

J

(−u1

∂x2

∂ξ1+ u2

∂x1

∂ξ1

)(B.15)

The inner product of the covariant base vectors is called the covariant metric tensor:

gαβ = a(α) · a(β) (B.16)

Similarly, contravariant metric tensor is defined as gαβ = a(α)·a(β), which possesses an inverse of(B.16). Metric tensors relate distance to infinitesimal coordinate increments. Metric tensors aresymmetric, i.e. gαβ = gβα, and the square root of the determinant of gαβ , denoted by

√g∗, equals

the Jacobian of the transformation J .

For our purposes we consider orthogonal coordinate systems. This means that the inner product ofa(1) and a(2)and of a(1) and a(2) is zero, i.e. g12 = g12 = 0. Hence,

g11 =1g11

, g22 =1g22

(B.17)

Furthermore,J =√g∗ =

√g11 g22 (B.18)

Generally, the base vectors are not unit vectors. The length of covariant and contravariant basevectors can be calculated, as follows∣∣a(α)

∣∣ =√gαα,

∣∣a(α)∣∣ =√gαα, (no summation) (B.19)

Since, generally neither covariant nor contravariant tensor components have the same dimension astensors themselves, instead of base vectors, we employ the physical base vectors:

e(α) =a(α)√gαα

, e(α) =√gααa(α), (no summation) (B.20)

190

Page 191: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Appendix B. Tensor analysis

It is important to note that the vectors e(α) are non-dimensional unit vectors, while their reciprocalvectors e(α) are also non-dimensional but not unit vectors. Vectors can now be expressed in termsof their components relative to the physical base vectors:

u = Uαe(α) = Uαe(α) (B.21)

whereUα =

Uα√gαα

, Uα

=√gααU

α, (no summation) (B.22)

which are the contravariant and covariant physical vector components, respectively. These compo-nents are component along and projection on the coordinate lines ξα, respectively. Moreover, theyall have the same dimension as vector u itself.

In non-orthogonal coordinate system, the contravariant physical vector components are superior tothe covariant physical ones. The reason is twofold. Firstly, the physical intepretation of vectorcomponents related to a basis of non-dimensional unit vectors is easier than in the case of basevectors whose length varies from point to point, so that the contravariant physical components bearthe physical significance of vector itself. Secondly, the choice between contravariant and covariantform of the equations involves a trade-off between more pressure terms in the contravariant caseand much more convection terms in the covariant one. The former may cause some difficulties withthe convergence of the solution procedure and latter requires significantly more computation. Itshould be noted, however, that both sets of quantities in (B.22) reduce to a single set in the case ofan orthogonal coordinate system.

B.4 Tensor calculus

We now discuss properties of operations such as gradient and divergence which can be applied totensors and that will be used in Section 2.6. Our aim in that section is to present a coordinate-invariant formulation of shallow flow equations using two-dimensional orthogonal coordinates withtransformed velocity components, which have the same dimension as the velocity vector itself. Thecontravariant physical vector components have been chosen as dependent variables, leading to thecontravariant form of the equations. This is merely a choice, since in an orthogonal coordinate sys-tem both contravariant and covariant components lead to similar formulation. Here, the superiorityof physical vector components when compared with non-physical ones is emphasised (as a matter offact, in [13] the non-physical calculation proves less accurate than the physical one). According to(B.15) and (B.18), in terms of Cartesian components, the contravariant physical vector componentsread:

U1

=1√g22

(u1∂x2

∂ξ2− u2

∂x1

∂ξ2

), U

2=

1√g11

(u2∂x1

∂ξ1− u1

∂x2

∂ξ1

)(B.23)

We start with an expression for the partial derivative of any scalar Φ with respect to x in terms ofgeneral coordinates, namely

∂Φ

∂ xβ=∂ ξα

∂ xβ∂Φ

∂ ξα= a(α)

β

∂Φ

∂ ξα(B.24)

The partial derivative along the coordinate line ξα is given by

(e(α) · ∇)Φ =a(α)√gαα· a(β) ∂Φ

∂ξβ=

1√gαα

∂Φ

∂ξα, (no summation) (B.25)

Version 3.17, November 2016 191

Page 192: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

Since u = Uαe(α) we have the following important expression:

(u · ∇)Φ =U

1

√g11

∂Φ

∂ ξ1 +U

2

√g22

∂Φ

∂ ξ2 (B.26)

To find the components of (u·∇)u, where u = Uαe(α), we must allow for the dependence of the

physical base vectors e(α) on position. For an orthogonal coordinate system, the following usefulexpressions for the derivatives of the physical base vectors are provided [2]:

∂e(1)

∂ξ1 = − 1√g22

∂√g11

∂ξ2 e(2),∂e(1)

∂ξ2 = 1√g11

∂√g22

∂ξ1 e(2)

∂e(2)

∂ξ1 = 1√g22

∂√g11

∂ξ2 e(1),∂e(2)

∂ξ2 = − 1√g11

∂√g22

∂ξ1 e(1)

(B.27)

It follows from the above relations that

(u · ∇)u = e(1)

(u · ∇)U

1+ U

2

√g∗

(U1 ∂√g11

∂ξ2 − U2 ∂√g22

∂ξ1 )

+

e(2)

(u · ∇)U

2+ U

1

√g∗

(U2 ∂√g22

∂ξ1 − U1 ∂√g11

∂ξ2 ) (B.28)

To find a suitable expression for the divergence operator, the following useful identity will be em-ployed:

∂√g∗a(α)

∂ξα= 0 (B.29)

Using the chain rule and (B.29), the expression (B.24) can be rewritten as

∂Φ

∂xβ=

1√g∗

∂ξα(√g∗a

(α)β Φ) (B.30)

So the divergence of a vector u is given by

∇ · u =1√g∗

∂ξα(√g∗a(α) · u) =

1√g∗

∂ξα(√g∗U

α) (B.31)

With the aid of (B.18), (B.22) and expressing in contravariant physical components Uα, (B.31)

results in:∇ · u =

1√g∗

∂ξ1(U

1√g22) +

1√g∗

∂ξ2(U

2√g11) (B.32)

The divergence of the gradient gives the Laplacian operator, which may act on either a scalar or avector. The components of∇2u can be calculated by replacing Φ in (B.25) by u = U

αe(α), and usingthe expressions for derivatives of the physical base vectors (B.27), which gives

∇2u = e(1)

1√g11

∂∂ξ1

[1√g∗

∂∂ξ1 (U

1√g22) + 1√

g∗∂∂ξ2 (U

2√g11)

]+

1√g22

∂∂ξ2

[1√g∗

∂∂ξ1 (U

2√g22)− 1√

g∗∂∂ξ2 (U

1√g11)

]+

e(2)

1√g11

∂∂ξ1

[1√g∗

∂∂ξ1 (U

2√g22)− 1√

g∗∂∂ξ2 (U

1√g11)

]+

1√g22

∂∂ξ2

[1√g∗

∂∂ξ1 (U

1√g22) + 1√

g∗∂∂ξ2 (U

2√g11)

](B.33)

192

Page 193: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Appendix B. Tensor analysis

In the same manner, the divergence of a stress tensor τ can be derived. This stress acting at thesurface ξα=constant is given by [2]:

∂√g∗ a

(α)

∂ ξα= 0 (B.34)

By definition, we have∂√g∗ a

(α)

∂ ξα= 0 (B.35)

so that∂√g∗ a

(α)

∂ ξα= 0 (B.36)

By virtue of (B.31), we have

∇ · u =1√g∗

∂ ξα(√g∗ a

(α) ·u) =1√g∗

∂ ξα(√g∗ g

αβUβ) (B.37)

For example, writing out the above formulae for β = 1 and employing (B.27) gives

1√gξξ

∂τ 11

∂ξ1+

1√gηη

∂τ 12

∂ξ2+ 2

τ 21

√g∗

∂√g11

∂ξ2+

(τ 11 − τ 22)√g∗

∂√g22

∂ξ1(B.38)

Version 3.17, November 2016 193

Page 194: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

Appendix C

Coefficients of v-momentum equation at firststage

The coefficients of the v-momentum equation at first stage, i.e. equation (6.1), are given by

am,n,k =

(ωηm,n,k−1

hvm,n,k−1 +hvm,n,k−

2 (νv)η

m,n,k−1

(hvm,n,k−1 +hvm,n,k)hvm,n,k

)∆t

2(C.1)

bm,n,k = 1 + ∆t2

(32

|uξηm,n,k|(√gξξ)m,n

+ 32

|vm,n,k|(√gηη)

ξη

m,n

+

+12

uξηm,n,k(√g∗)m,n

((√gηη)m,n+1

− (√gηη)m−1,n+1

+ (√gηη)m,n− (

√gηη)m−1,n

)+

− ωηm,n,k−1

hvm,n,k−1 +hvm,n,k+

ωηm,n,khvm,n,k +hvm,n,k+1

+

2hvm,n,k

(νv)

η

m,n,k−1

hvm,n,k−1 +hvm,n,k+

(νv)η

m,n,k

hvm,n,k +hvm,n,k+1

)(C.2)

where (√g∗)m,n is given in Sections 4.4 and 4.5.

cm,n,k = −

(ωηm,n,k

hvm,n,k +hvm,n,k+1

+2 (νv)

η

m,n,k

(hvm,n,k +hvm,n,k+1)hvm,n,k

)∆t

2(C.3)

dm,n,k = vm,n,k +∆t2

(12

(uξηm,n,k )2

(√g∗)m,n

((√gξξ)m,n+1

− (√gξξ)m,n−1

)+

− g

(√gηη)

ξη

m,n

(ζm,n+1,k− ζm,n,k

)− f uξηm,n,k

−PG0η[hv, hζ , ρ] + S0ηη[u, v] + S0ξξ[v, u]

)(C.4)

194

Page 195: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Appendix C. Coefficients of v-momentum equation at first stage

where (√g∗)m,n and the latter three terms of (C.4) are given in Sections 4.4 and 4.5.

e1ξm,n,k =

∆t

2

uξηm,n,k−∣∣∣uξηm,n,k∣∣∣

(√gξξ)m,n

(C.5)

e2ξm,n,k = −∆t

8

uξηm,n,k−∣∣∣uξηm,n,k∣∣∣

(√gξξ)m,n

(C.6)

e−1ξm,n,k = −∆t

2

uξηm,n,k +∣∣∣uξηm,n,k∣∣∣

(√gξξ)m,n

(C.7)

e−2ξm,n,k =

∆t

8

uξηm,n,k +∣∣∣uξηm,n,k∣∣∣

(√gξξ)m,n

(C.8)

e1ηm,n,k =

∆t

2

vm,n,k− |vm,n,k|

(√gηη)

ξη

m,n

(C.9)

e2ηm,n,k = −∆t

8

vm,n,k− |vm,n,k|

(√gηη)

ξη

m,n

(C.10)

e−1ηm,n,k = −∆t

2

vm,n,k + |vm,n,k|

(√gηη)

ξη

m,n

(C.11)

e−2ηm,n,k =

∆t

8

vm,n,k + |vm,n,k|

(√gηη)

ξη

m,n

(C.12)

Version 3.17, November 2016 195

Page 196: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

Appendix D

Coefficients of u-momentum equation at firststage

The coefficients of the u-momentum equation at first stage, i.e. equation (6.6), are given by

am,k = − g∆t

2 (√gξξ)

ξη

m,n

(D.1)

bm,k =g∆t

2 (√gξξ)

ξη

m,n

(D.2)

cm,k = −(νv)

ξ

m,n,k−1 ∆t

(hum,n,k−1 +hum,n,k)hum,n,k

(D.3)

dm,k = um,n,k + ∆t2

(12

(v′)ξη

m,n,k

(√gηη)m,n

(um,n−1,k − um,n+1,k)

+12

((v′)ξη

m,n,k)2

(√g∗)m,n

((√gηη)m+1,n − (

√gηη)m−1,n

)+

f (v′)ξη

m,n,k−S0z[hu, ω, u]− PG0ξ[h

u, hζ , ρ] + S0ξξ[u, v′] + S0ηη[v

′, u]

)(D.4)

where (√g∗)m,n and the latter four terms of (D.4) are given by (4.24), (4.34), (4.38), (4.38) and

(4.47), respectively.

em,k = 1 + ∆t2

(um+1,n,k −um−1,n,k

2 (√gξξ)

ξη

m,n

+

v′ξηm,n,k

2 (√g∗)m,n

((√gξξ)m,n + (

√gξξ)m+1,n

− (√gξξ)m,n−1

− (√gξξ)m+1,n−1

)+

2hum,n,k

(νv)

ξ

m,n,k−1

hum,n,k−1 +hum,n,k+

(νv)ξ

m,n,k

hum,n,k +hum,n,k+1

)(D.5)

196

Page 197: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Appendix D. Coefficients of u-momentum equation at first stage

where (√g∗)m,n is given by (4.24).

fm,k = −(νv)

ξ

m,n,k ∆t

(hum,n,k +hum,n,k+1)hum,n,k(D.6)

Version 3.17, November 2016 197

Page 198: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

Appendix E

Coefficients of u-momentum equation at firststage after double sweep

We consider the u-momentum equation (6.6) at first stage. By a double sweep in the vertical direc-tion, the vertical coupling is removed and the layer-averaged velocities are expressed in the waterlevels of the neighbouring points by means of equation (6.7). The relation between the coefficientsof these equations is given below.

Forward (k = 2, . . . , K)

αm,k = am,k−am,k−1 cm,kem,k−1

βm,k = bm,k− bm,k−1 cm,kem,k−1

δm,k = dm,k−dm,k−1 cm,kem,k−1

εm,k = em,k−fm,k−1 cm,kem,k−1

(E.1)

Backward (k = K − 1, . . . , 1)

pm,k = αm,k−fm,k αm,k+1

εm,k+1

qm,k = βm,k−fm,k βm,k+1

εm,k+1

rm,k = δm,k−fm,k δm,k+1

εm,k+1

(E.2)

For reasons of efficiency, the coefficients are divided by the main diagonal coefficient εm,k:

pm,k ←pm,kεm,k

, qm,k ←qm,kεm,k

, rm,k ←rm,kεm,k

(E.3)

198

Page 199: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Appendix F. Coefficients of transport equation at first stage

Appendix F

Coefficients of transport equation at firststage

The coefficients of the transport equation at first stage, i.e. equation (6.18), are given by

am,k =θ ω′m,k−1 (

√g∗)m,n (hζ)′m,k

(hζ)′m,k−1 + (hζ)′m,k− 2θ (

√g∗)m,n (Dv)m,k−1

(hζ)′m,k−1 + (hζ)′m,k+

−12

(Dh)ξ

m−1,k (hu)′m−1,k

(√gηη)m−1,n

(√gξξ)

ξη

m−1,n

(zζ)′m,k−1− (zζ)′m−1,k−1 + (zζ)′m,k − (zζ)′m−1,k

(hu)′m−1,k−1 +2 (hu)′m−1,k + (hu)′m−1,k+1+

+12

(Dh)ξ

m,k (hu)′m,k(√gηη)m,n

(√gξξ)

ξη

m,n

(zζ)′m+1,k−1− (zζ)′m,k−1 + (zζ)′m+1,k − (zζ)′m,k(hu)′m,k−1 +2 (hu)′m,k + (hu)′m,k+1

+

−12

(Dh)z

m,k−1

(√g∗)m,n

(√gξξ)

η

m,n

((zζ)′m+1,k−1− (zζ)′m−1,k−1)2

(hζ)′m,k−1 + (hζ)′m,k

(F.1)

bm,k =2 (√g∗)m,n (hζ)′m,k

∆t+ 10

12(√gηη)m,n (hu)′m,k (u′m,k + |u′m,k|) +

−1012

(√gηη)m−1,n

(hu)′m−1,k (u′m−1,k− |u′m−1,k|) +

+θ ω′m,k−1 (

√g∗)m,n (hζ)′m,k−1

(hζ)′m,k−1 + (hζ)′m,k− θ ω′m,k (

√g∗)m,n (hζ)′m,k+1

(hζ)′m,k + (hζ)′m,k+1+

+ (Dh)ξ

m,k (hu)′m,k(√gηη)m,n

(√gξξ)

ξη

m,n

+ (Dh)ξ

m−1,k (hu)′m−1,k

(√gηη)m−1,n

(√gξξ)

ξη

m−1,n

+

+2θ (√g∗)m,n (Dv)m,k−1

(hζ)′m,k−1 + (hζ)′m,k+

2θ (√g∗)m,n (Dv)m,k

(hζ)′m,k + (hζ)′m,k+1+ (√g∗)m,nh

ζm,n,k(S

nc )m,n,k+

+12

(Dh)z

m,k−1

(√g∗)m,n

(√gξξ)

η

m,n

((zζ)′m+1,k−1− (zζ)′m−1,k−1)2

(hζ)′m,k−1 + (hζ)′m,k+

+12

(Dh)z

m,k

(√g∗)m,n

(√gξξ)

η

m,n

((zζ)′m+1,k − (zζ)′m−1,k)2

(hζ)′m,k + (hζ)′m,k+1

(F.2)

Version 3.17, November 2016 199

Page 200: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

cm,k = − θ ω′m,k (√g∗)m,n (hζ)′m,k

(hζ)′m,k + (hζ)′m,k+1− 2θ (

√g∗)m,n (Dv)m,k

(hζ)′m,k + (hζ)′m,k+1+

12

(Dh)ξ

m−1,k (hu)′m−1,k

(√gηη)m−1,n

(√gξξ)

ξη

m−1,n

(zζ)′m,k−1− (zζ)′m−1,k−1 + (zζ)′m,k − (zζ)′m−1,k

(hu)′m−1,k−1 +2 (hu)′m−1,k + (hu)′m−1,k+1+

−12

(Dh)ξ

m,k (hu)′m,k(√gηη)m,n

(√gξξ)

ξη

m,n

(zζ)′m+1,k−1− (zζ)′m,k−1 + (zζ)′m+1,k − (zζ)′m,k(hu)′m,k−1 +2 (hu)′m,k + (hu)′m,k+1

+

−12

(Dh)z

m,k

(√g∗)m,n

(√gξξ)

η

m,n

((zζ)′m+1,k − (zζ)′m−1,k)2

(hζ)′m,k + (hζ)′m,k+1

(F.3)

dm,k =2 (√g∗)m,n h

ζm,n,k

cm,n,k

∆t+ P

ηm,n−1,k−P

ηm,n,k +(1− θ)ω′m,n,k P z

m,n,k +

−(1− θ)ω′m,n,k−1 Pzm,n,k−1 +Qη

m,n,k−Qηm,n−1,k +

+(1− θ)Qzm,n,k−1−(1− θ)Qz

m,n,k + (√g∗)m,n h

ζm,n,k (Sc)m,n,k +

+Aηm,n−1,k−A

ηm,n,k +B

ηm,n,k−B

ηm,n,k−1 +C

ηm,n,k−1−C

ηm,n,k

(F.4)

e1ξm,k = 10

12(√gηη)m,k (hu)′m,k (u′m,k− |u′m,k|) +

+ 512

(√gηη)m−1,n

(hu)′m−1,k (u′m−1,k− |u′m−1,k|) +

− (Dh)ξ

m,k (hu)′m,k(√gηη)m,n

(√gξξ)

ξη

m,n

− 14

(Dh)z

m,k

(√g∗)m,n√gξξ

η

m,n

(hζ)′m+1,k+1

(hζ)′m+1,k+1 + (hζ)′m+1,k+

+14

(Dh)z

m,k−1

(√g∗)m,n

(√gξξ)

η

m,n

(hζ)′m+1,k−1

(hζ)′m+1,k−1 + (hζ)′m+1,k

(F.5)

e2ξm,k = − 5

12(√gηη)m,n (hu)′m,k (u′m,k− |u′m,k|) +

− 112

(√gηη)m−1,n

(hu)′m−1,n (u′m−1,k− |u′m−1,k|)(F.6)

e3ξm,k =

1

12(√gηη)m,n (h

u)′m,k (u′m,k− |u′m,k|) (F.7)

200

Page 201: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Appendix F. Coefficients of transport equation at first stage

e−1ξm,k = −10

12(√gηη)m−1,k

(hu)′m−1,k (u′m−1,k + |u′m−1,k|) +

− 512

(√gηη)m,n (hu)′m,k (u′m,k + |u′m,k|) +

− (Dh)ξ

m−1,k (hu)′m−1,k

(√gηη)m−1,n

(√gξξ)

ξη

m−1,n

+

+14

(Dh)z

m,k

(√g∗)m,n√gξξ

η

m,n

(hζ)′m−1,k+1

(hζ)′m−1,k+1 + (hζ)′m−1,k+

−14

(Dh)z

m,k−1

(√g∗)m,n

(√gξξ)

η

m,n

(hζ)′m−1,k−1

(hζ)′m−1,k−1 + (hζ)′m−1,k

(F.8)

e−2ξm,k = 5

12(√gηη)m−1,n

(hu)′m−1,k (u′m−1,k + |u′m−1,k|) +

+ 112

(√gηη)m,n (hu)′m,n (u′m,k + |u′m,k|)

(F.9)

e−3ξm,k = − 1

12(√gηη)m−1,n

(hu)′m−1,k (u′m−1,k + |u′m−1,k|) (F.10)

e1ξ,−1zm,k = 1

2(Dh)

ξ

m,k (hu)′m,k(√gηη)m,n

(√gξξ)

ξη

m,n

(zζ)′m+1,k−1− (zζ)′m,k−1 + (zζ)′m+1,k − (zζ)′m,k(hu)′m,k−1 +2 (hu)′m,k + (hu)′m,k+1

+

+14

(Dh)z

m,k−1

(√g∗)m,n

(√gξξ)

η

m,n

(hζ)′m+1,k

(hζ)′m+1,k−1 + (hζ)′m+1,k

(F.11)

e1ξ,1zm,k = −1

2(Dh)

ξ

m,k (hu)′m,k(√gηη)m,n

(√gξξ)

ξη

m,n

(zζ)′m+1,k−1− (zζ)′m,k−1 + (zζ)′m+1,k − (zζ)′m,k(hu)′m,k−1 +2 (hu)′m,k + (hu)′m,k+1

+

−14

(Dh)z

m,k

(√g∗)m,n

(√gξξ)

η

m,n

(hζ)′m+1,k

(hζ)′m+1,k+1 + (hζ)′m+1,k

(F.12)

e−1ξ,−1zm,k = −1

2(Dh)

ξ

m−1,k (hu)′m−1,k

(√gηη)m−1,n

(√gξξ)

ξη

m−1,n

(zζ)′m,k−1− (zζ)′m−1,k−1 + (zζ)′m,k − (zζ)′m−1,k

(hu)′m−1,k−1 +2 (hu)′m−1,k + (hu)′m−1,k+1+

−14

(Dh)z

m,k−1

(√g∗)m,n

(√gξξ)

η

m,n

(hζ)′m−1,k

(hζ)′m−1,k−1 + (hζ)′m−1,k

(F.13)

e−1ξ,1zm,k = 1

2(Dh)

ξ

m−1,k (hu)′m−1,k

(√gηη)m−1,n

(√gξξ)

ξη

m−1,n

(zζ)′m,k−1− (zζ)′m−1,k−1 + (zζ)′m,k − (zζ)′m−1,k

(hu)′m−1,k−1 +2 (hu)′m−1,k + (hu)′m−1,k+1+

+14

(Dh)z

m,k

(√g∗)m,n

(√gξξ)

η

m,n

(hζ)′m−1,k

(hζ)′m−1,k + (hζ)′m−1,k+1

(F.14)

Version 3.17, November 2016 201

Page 202: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

Appendix G

Coefficients of discretized k − ε models

G.1 Coefficients of vertical k-equation at first stage of first halftimestep

The coefficients of the discretized equation for turbulent kinetic energy in the first stage of the firststep, i.e. equation (6.23), are given by

am,n =2

∆t+

∣∣∣(u′)ξzm,n∣∣∣(√gξξ)

η

m,n

+

∣∣∣(v′)ηzm,n∣∣∣(√gηη)

ξ

m,n

(G.1)

dm,n =2 km,n

∆t(G.2)

e−1ξm,n = − 1

2 (√gξξ)

η

m,n

(u′)

ξz

m,n +∣∣∣(u′)ξzm,n∣∣∣ (G.3)

e1ξm,n =

1

2 (√gξξ)

η

m,n

(u′)

ξz

m,n−∣∣∣(u′)ξzm,n∣∣∣ (G.4)

e−1ηm,n = − 1

2 (√gηη)

ξ

m,n

(v′)

ηz

m,n +∣∣∣(v′)ηzm,n∣∣∣ (G.5)

e1ηm,n =

1

2 (√gηη)

ξ

m,n

(v′)

ηz

m,n−∣∣∣(v′)ηzm,n∣∣∣ (G.6)

G.2 Coefficients of vertical k-equation at second stage of firsthalf timestep

The coefficients of the discretized equation for turbulent kinetic energy in the second stage of thefirst half time-step, i.e. equation (6.28), are given by

ak =ω′m,n,k− |ω′m,n,k|

2hζm,n,k

−2 (νv)

z

m,n,k

σk(hζm,n,k +h

ζm,n,k+1)h

ζm,n,k

(G.7)

202

Page 203: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Appendix G. Coefficients of discretized k − ε models

bk = 2∆t

+ω′m,n,k +|ω′m,n,k|

2hζm,n,k+1

− ω′m,n,k −|ω′m,n,k|2h

ζm,n,k

+

+2 (νv)

z

m,n,k

σk(hζm,n,k +h

ζm,n,k+1)h

ζm,n,k

+2 (νv)

z

m,n,k+1

σk(hζm,n,k +h

ζm,n,k+1)h

ζm,n,k+1

+

+2 εm,n,k −min[0,(Bk)m,n,k]

km,n,k

(G.8)

ck = −ω′m,n,k + |ω′m,n,k|

2hζm,n,k+1

−2 (νv)

z

m,n,k+1

σk(hζm,n,k +h

ζm,n,k+1)h

ζm,n,k+1

(G.9)

dk =2 k∗m,n,k

∆t+ (Pk)m,n,k + max[0, (Bk)m,n,k] + εm,n,k (G.10)

G.3 Coefficients of horizontal k-equation at First Stage

The coefficients of the discretized equation for depth-averaged kinetic energy at first stage, i.e.equation (6.29), are given by

am = − 1

2(√

gξξ)ξm

(Uη

m +∣∣Uη

m

∣∣)− 1(√g∗)mHdm

Hvm

(√gηη)ξηm(√

gξξ)m

(νt2D)ξ

m

σk(G.11)

bm = 2∆t

+ 2 eεmekm + 1

2(√gξξ)ξ

m

(Uη

m +∣∣Uη

m

∣∣)− 1

2(√gξξ)ξ

m+1

(Uη

m −∣∣Uη

m

∣∣)+ 1

(√g∗)mHdm

(Hvm

(√gηη)ξη

m

(√gξξ)m

(νt2D)ξ

m

σk+Hv

m+1

(√gηη)ξη

m+1

(√gξξ)m+1

(νt2D)ξ

m+1

σk

) (G.12)

cm =1

2(√

gξξ)ξm+1

(Uη

m −∣∣Uη

m

∣∣)− 1(√g∗)mHdm

Hvm+1

(√gηη)ξηm+1(√

gξξ)m+1

(νt2D)ξ

m+1

σk(G.13)

dm =2km∆t

+ (P k)m + εm−S+η[V, k] + S0ηη[k] (G.14)

Version 3.17, November 2016 203

Page 204: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

Appendix H

Reference and data structures

The simulation within one time step is carried out by the subroutine wassim. This subroutinetakes care of all the necessary actions for water movement and transport, including Kalman filteringand file output. The subroutine is called for each time step. It calls the subroutine wasstp thatpropagates the solution by one time step. At the end of each computational step it calls waswrtthat writes the data to the SDS-file. The structure of the subroutine wasstp and its main undersubroutines is given in the following subsections. Furthermore, a description is given of the essentialarrays that are used in WAQUA/TRIWAQ.

H.1 Reference structure of WASSTP

wasstp Execution of one WAQUA/TRIWAQ time step

wassff Set forcings for FLOW (first stage)

wasstf Set forcings for TRANSPORT (first stage)

waskre Carry out the operations coded in aKalman table (first stage)

waskhi Add noise to the Waqua history arrays (first stage)

waskxp Expand Kalman state to Waqua state and resetgeometry, chezy values, and fill fullbox arrays

wasthf Compute FLOW , 1st half integration step andoptionally compute new Chezy coefficient

wasspu Compute flow for 1st half of an integration step

204

Page 205: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Appendix H. Reference and data structures

wasknu Compute new K-Nikuradse (first stage)

washdy Calculate nonhydrostatic pressure (first stage)

wascvu Compute 3D Chezy coefficient in u-point

wasthm Miscellaneous FLOW computations (first stage)

wastht Do TRANSPORT computations for ahalf integration step (first stage)

wastur Prepare for and do the call to the user transport routine

wastru Compute transport for the 1st half of anintegration step

wasxru Compute 3D turbulence, if appropriate (first stage)

wasyru Compute 2DH turbulence, if appropriate (first stage)

wassff Set forcings for FLOW (second stage)

wasstf Set forcings for TRANSPORT (second stage)

waskre Carry out the operations coded in aKalman table (second stage)

waskhi Add noise to the Waqua history arrays (second stage)

waskxp Expand Kalman state to Waqua state and resetgeometry, chezy values, and fill fullbox arrays

wasthf Compute FLOW , 2nd half integration step andoptionally compute new Chezy coefficient

wasspu Compute flow for 2nd half of an integration step

wasknv Compute new K-Nikuradse (second stage)

washdy Calculate nonhydrostatic pressure (second stage)

wascvu Compute 3D Chezy coefficient in v-point

wasthm Miscellaneous FLOW computations (second stage)

Version 3.17, November 2016 205

Page 206: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

wastht Do TRANSPORT computations for ahalf integration step (second stage)

wastur Prepare for and do the call to the user transport routine

wastru Compute transport for the 2nd half of anintegration step

wasxrv Compute 3D turbulence, if appropriate (second stage)

wasyrv Compute 2DH turbulence, if appropriate (second stage)

H.2 Reference and data structures of WASSPU

In each half time step the matrices and right-hand side vectors of the corresponding water movementequations are built. Subsequently, the resulting systems of equations are solved. For the buildingand solving of each half time step the subroutine WASSPU is used. The structure of subroutineWASSPU is as follows:

wagden Compute water density

wascsc Correct chezy values depending on salinity gradient

trsviz Compute vertical eddy viscosity

trsvic Multiply the viscosity with a space varying factor

trsv2d Compute 2D eddy-viscosity

trscue Build and solve v-momentum equation

trsbar Compute energy loss due to barrier and add to v momen-tum equation

trsjam Solve the system of equations by means of red-black Jacobi

trssuw Build and solve coupled u-momentum equation and conti-nuity equation

trsumo Build the u-momentum equation and decouple u in the ver-tical

trsbar Compute energy loss due to barrier and add to u momen-tum equation

206

Page 207: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Appendix H. Reference and data structures

trscnt Solve the coupled momentum and continuity equations

trsrv1 Set up the u momentum equation for boundary points

trsrv2 Set up the continuity equation for boundary points

trslav Compute layer interface at v-velocity point

waslin Compute chezy parameters for linear friction model

Note that the assembly process of the matrix and the right-hand side vector, is carried out only insubroutines TRSCUE and TRSUMO.

Concerning the data structure the following general remark is made. The primary arrays used inthe subroutines called by WASSPU may be considered as one-dimensional arrays of size mn-maxj-jstart+1 or two-dimensional arrays of size (mnmaxj-jstart+1) × kmax or (mnmaxj-jstart+1)× (kmax+1). Here, jstart, equals 1-3nmax, is the first lower index of the considering array, whereasmnmaxj, equals nmax(3+mmax), is the last upper index of the same array. The integers mmax andnmax give the number of non-virtual cells in ξ- and η-directions, respectively, whereas kmax givesthe maximum number of layers. The introduction of virtual cells is necessary for the implementa-tion of boundary conditions. The arrays to be considered are all stored temporarily. Thus, in eachtime step these arrays are filled again.

The following important computational arrays are used only in the first half time step:

sep(jstart:mnmaxj) water level at full time stepup(jstart:mnmaxj,1:kmax) u-velocity at full time stepvp(jstart:mnmaxj,1:kmax) v-velocity at full time stepzksp(jstart:mnmaxj,0:kmax) position of layer interface at water level point at full

time stepzkup(jstart:mnmaxj,0:kmax) position of layer interface at u-velocity point at full

time stepzkvp(jstart:mnmaxj,0:kmax) position of layer interface at v-velocity point at full

time stepkfvp(jstart:mnmaxj) mask array at v-velocity point at full time step.

Meaning:0 : (temporarily) dry point1 : wet point

kfvh(jstart:mnmaxj) mask array at v-velocity point at half time step.Meaning:0 : (temporarily) dry point1 : wet point

czu(jstart:mnmaxj) Chezy value at u-velocity pointczv(jstart:mnmaxj) Chezy value at v-velocity pointqyk(jstart:mnmaxj,1:kmax) discharge in η/y directionrp(jstart:mnmaxj,1:kmax,1:lmax) constituent and lmax is the number of constituents

Version 3.17, November 2016 207

Page 208: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

turb(jstart:mnmaxj,0:kmax) turbulent kinetic energy (k) and its dissipation rate(ε) at full time step

turbh(jstart:mnmaxj,0:kmax) turbulent kinetic energy (k) and its dissipation rate(ε) at half time step

tur2d(jstart:mnmaxj,0:kmax) turbulent kinetic energy (k) and its dissipation rate(ε) with respect to the horizontal turbulence model

The following important computational arrays are both used and updated in the first half time step:

seh(jstart:mnmaxj) water level at half time stepuh(jstart:mnmaxj,1:kmax) u-velocity at half time stepvh(jstart:mnmaxj,1:kmax) v-velocity at half time stepw(jstart:mnmaxj,0:kmax) ω−velocityzksh(jstart:mnmaxj,0:kmax) position of layer interface at water level point at

half time stepzkuh(jstart:mnmaxj,0:kmax) position of layer interface at u-velocity point at half

time stepzkvh(jstart:mnmaxj,0:kmax) position of layer interface at v-velocity point at half

time steprho(jstart:mnmaxj,1:kmax) water densityvicow(jstart:mnmaxj,0:kmax) vertical eddy viscosity at ω-velocity point

The following important computational arrays are updated only in the first half time step:

qxk(jstart:mnmaxj,1:kmax) discharge in ξ/x directionqzk(jstart:mnmaxj,0:kmax) discharge in z directionz0wl(jstart:mnmaxj) roughness parameter z0 at water level pointcfrowl(jstart:mnmaxj) ratio u/u∗ at water level pointrich(jstart:mnmaxj,1:kmax) gradient Richardson number at water level point

The following important computational arrays are used only in the second half time step:

seh(jstart:mnmaxj) water level at half time stepuh(jstart:mnmaxj,1:kmax) u-velocity at half time stepvh(jstart:mnmaxj,1:kmax) v-velocity at half time stepzksh(jstart:mnmaxj,0:kmax) position of layer interface at water level point at

half time stepzkuh(jstart:mnmaxj,0:kmax) position of layer interface at u-velocity point at half

time stepzkvh(jstart:mnmaxj,0:kmax) position of layer interface at v-velocity point at half

time stepkfup(jstart:mnmaxj) mask array at u-velocity point at full time step.

Meaning:0 : (temporarily) dry point1 : wet point

208

Page 209: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Appendix H. Reference and data structures

kfvp(jstart:mnmaxj) mask array at v-velocity point at full time step.Meaning:0 : (temporarily) dry point1 : wet point

czu(jstart:mnmaxj) Chezy value at u-velocity pointczv(jstart:mnmaxj) Chezy value at v-velocity pointqxk(jstart:mnmaxj,1:kmax) discharge in ξ/x directionrp(jstart:mnmaxj,1:kmax,1:lmax) constituent and lmax is the number of constituentsturb(jstart:mnmaxj,0:kmax) turbulent kinetic energy (k) and its dissipation rate

(ε) at full time stepturbh(jstart:mnmaxj,0:kmax) turbulent kinetic energy (k) and its dissipation rate

(ε) at half time steptur2d(jstart:mnmaxj,0:kmax) turbulent kinetic energy (k) and its dissipation rate

(ε) with respect to the horizontal turbulence model

The following important computational arrays are both used and updated in the second half timestep:

sep(jstart:mnmaxj) water level at full time stepup(jstart:mnmaxj,1:kmax) u-velocity at full time stepvp(jstart:mnmaxj,1:kmax) v-velocity at full time stepw(jstart:mnmaxj,0:kmax) ω−velocityzksp(jstart:mnmaxj,0:kmax) position of layer interface at water level point at full

time stepzkup(jstart:mnmaxj,0:kmax) position of layer interface at u-velocity point at full

time stepzkvp(jstart:mnmaxj,0:kmax) position of layer interface at v-velocity point at full

time stepkfuh(jstart:mnmaxj) mask array at u-velocity point at half time step.

Meaning:0 : (temporarily) dry point1 : wet point

kfvh(jstart:mnmaxj) mask array at v-velocity point at half time step.Meaning:0 : (temporarily) dry point1 : wet point

khv(jstart:mnmaxj) gives number of layers at v-velocity point and maskarray for drying and flooding with the followingmeaning:> 0: wet point= 0: dry point< 0: temporarily dry point

rho(jstart:mnmaxj,1:kmax) water densityvicow(jstart:mnmaxj,0:kmax) vertical eddy viscosity at ω-velocity point

Version 3.17, November 2016 209

Page 210: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

The following important computational arrays are updated only in the second half time step:

qyk(jstart:mnmaxj,1:kmax) discharge in η/y directionqzk(jstart:mnmaxj,0:kmax) discharge in z directionz0wl(jstart:mnmaxj) roughness parameter z0 at water level pointcfrowl(jstart:mnmaxj) ratio u/u∗ at water level pointrich(jstart:mnmaxj,1:kmax) gradient Richardson number at water level point

The following work arrays are used to store the matrix entries and right-hand side vector elementsin subroutine TRSCUE:

aak(jstart:mnmaxj,1:kmax) coefficient am,n,k in equation (6.1)bbk(jstart:mnmaxj,1:kmax) coefficient bm,n,k in equation (6.1)cck(jstart:mnmaxj,1:kmax) coefficient cm,n,k in equation (6.1)ddk(jstart:mnmaxj,1:kmax) coefficient dm,n,k in equation (6.1)bux(jstart:mnmaxj,1:kmax) coefficient e1ξ

m,n,k in equation (6.1)buux(jstart:mnmaxj,1:kmax) coefficient e2ξ

m,n,k in equation (6.1)bdx(jstart:mnmaxj,1:kmax) coefficient e−1ξ

m,n,k in equation (6.1)bddx(jstart:mnmaxj,1:kmax) coefficient e−2ξ

m,n,k in equation (6.1)buy(jstart:mnmaxj,1:kmax) coefficient e1η

m,n,k in equation (6.1)buuy(jstart:mnmaxj,1:kmax) coefficient e2η

m,n,k in equation (6.1)bdy(jstart:mnmaxj,1:kmax) coefficient e−1η

m,n,k in equation (6.1)bddy(jstart:mnmaxj,1:kmax) coefficient e−2η

m,n,k in equation (6.1)

The following work arrays are used to store the matrix entries and right-hand side vector elementsin subroutine TRSSUW:

aak(jstart:mnmaxj,1:kmax) coefficient am,k in equation (6.6) or pm,k in equa-tion (6.7)

bbk(jstart:mnmaxj,1:kmax) coefficient em,k in equation (6.6)cck(jstart:mnmaxj,1:kmax) coefficient bm,k in equation (6.6) or qm,k in equation

(6.7)ddk(jstart:mnmaxj,1:kmax) coefficient dm,k in equation (6.6) or rm,k in equa-

tion (6.7)work(1+(mnmaxj-jstart+1)*(2+kmax)) coefficient cm,k in equation (6.6)work(1+2*(mnmaxj-jstart+1)*(1+kmax)) coefficient fm,k in equation (6.6)a(jstart:mnmaxj) coefficient Am in equation (6.10)b(jstart:mnmaxj) coefficient Bm in equation (6.10)c(jstart:mnmaxj) coefficient Cm in equation (6.10)d(jstart:mnmaxj) coefficient Dm in equation (6.10)e(jstart:mnmaxj) water level at previous time step

Note that arrays aak, cck and ddk will be overwritten by means of double sweep as explained inAppendix E.

210

Page 211: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Appendix H. Reference and data structures

H.3 Reference and data structures of WASCVU

In each half time step the 3D Chezy coefficient in velocity points are computed. This is done inTRSCHZ, which is called by WASCVU.

With respect to the data structure we refer to the remark made in Section H.2.

The following important computational arrays are used only at both stages:

czu(jstart:mnmaxj) Chezy value at u-velocity pointu(jstart:mnmaxj,1:kmax) u-velocityustbu(jstart:mnmaxj) u∗ value at u-velocity pointv(jstart:mnmaxj,1:kmax) v-velocityzku(jstart:mnmaxj,0:kmax) position of layer interface at u-velocity point

H.4 Reference and data structures of WASTRU

In each half time step the matrix and right-hand side vector of the transport equation of an arbitraryconstituent is built. Subsequently, the resulting system of equations is solved. For the buildingand solving of each half time step the subroutine WASTRU is used. The structure of subroutineWASTRU with respect to the TRIWAQ part is as follows:

trsdiz Compute vertical eddy diffusivity

trsdif Build and solve the transport equation

trscri Evaluate anti-creepage terms (implicit part)

trscre Evaluate anti-creepage terms (explicit part)

trsjac Solve the system of equations by means of red-black Jacobi

With respect to the data structure we refer to the remark made in Section H.2.

The following important computational arrays are used only at both stages:

qxk(jstart:mnmaxj,1:kmax) discharge in ξ/x directionqyk(jstart:mnmaxj,1:kmax) discharge in η/y directionqzk(jstart:mnmaxj,1:kmax) discharge in z directionzksh(jstart:mnmaxj,0:kmax) position of layer interface at water level point at

half time stepzksp(jstart:mnmaxj,0:kmax) position of layer interface at water level point at full

time stepzkuh(jstart:mnmaxj,0:kmax) position of layer interface at u-velocity point at half

time stepzkvp(jstart:mnmaxj,0:kmax) position of layer interface at v-velocity point at full

time step

Version 3.17, November 2016 211

Page 212: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

kfs(jstart:mnmaxj) mask array at water level point. Meaning:0 : permanently dry point1 : wet or temporarily point

kfuh(jstart:mnmaxj) mask array at u-velocity point at half time step.Meaning:0 : (temporarily) dry point1 : wet point

kfup(jstart:mnmaxj) mask array at u-velocity point at full time step.Meaning:0 : (temporarily) dry point1 : wet point

kfvh(jstart:mnmaxj) mask array at v-velocity point at half time step.Meaning:0 : (temporarily) dry point1 : wet point

kfvp(jstart:mnmaxj) mask array at v-velocity point at full time step.Meaning:0 : (temporarily) dry point1 : wet point

rich(jstart:mnmaxj,1:kmax) gradient Richardson number at water level point

The following important computational arrays are both used and updated at both stages:

rp(jstart:mnmaxj,1:kmax,1:lmax) constituent and lmax is the number of constituentsvicow(jstart:mnmaxj,0:kmax) vertical eddy viscosity at ω-velocity pointdifcw(jstart:mnmaxj,0:kmax) vertical eddy diffusivity at ω-velocity pointnfli(1:ntopd,1:kmax) counter for constituent return time expressed in

half/full time step for diagonal/non-diagonal open-ing points, respectively

The following work arrays in are used to store the matrix entries and right-hand side vector elementsin subroutine TRSDIF:

a(jstart:mnmaxj,1:kmax) coefficient am,k in equation (6.18)b(jstart:mnmaxj,1:kmax) coefficient bm,k in equation (6.18)c(jstart:mnmaxj,1:kmax) coefficient cm,k in equation (6.18)d(jstart:mnmaxj,1:kmax) coefficient dm,k in equation (6.18)adx(jstart:mnmaxj,1:kmax) coefficient e−1ξ,−1z

m,k in equation (6.18)aux(jstart:mnmaxj,1:kmax) coefficient e1ξ,−1z

m,k in equation (6.18)bux(jstart:mnmaxj,1:kmax) coefficient e1ξ

m,k in equation (6.18)buux(jstart:mnmaxj,1:kmax) coefficient e2ξ

m,k in equation (6.18)buuux(jstart:mnmaxj,1:kmax) coefficient e3ξ

m,k in equation (6.18)bdx(jstart:mnmaxj,1:kmax) coefficient e−1ξ

m,k in equation (6.18)bddx(jstart:mnmaxj,1:kmax) coefficient e−2ξ

m,k in equation (6.18)bdddx(jstart:mnmaxj,1:kmax) coefficient e−3ξ

m,k in equation (6.18)

212

Page 213: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Appendix H. Reference and data structures

cdx(jstart:mnmaxj,1:kmax) coefficient e−1ξ,1zm,k in equation (6.18)

cux(jstart:mnmaxj,1:kmax) coefficient e1ξ,1zm,k in equation (6.18)

H.5 Reference and data structures of WASXRU and WASXRV

In each half time step the matrices and right-hand side vectors of the k- and ε-equations are built.Subsequently, the resulting systems of equations are solved. For the building and solving of eachhalf time step two subroutines WASXRU and WASXRV are used, which are similar. The structureof subroutine WASXRU is as follows:

wagden Compute water density

trstur Build and solve turbulence transport equations

trstu0 Evaluate Brunt Väisällä frequency, u- and v-velocities and their par-tial derivatives with respect to z at ω-velocity points

trsdgs Solve the system of equations by means of Gauss-Seidel iteration

The Brunt Väisällä frequency is defined as

− gρ0

∂ρ

∂z(H.1)

With respect to the data structure we refer to the remark made in Section H.2.

The following important computational arrays are used only at both stages:

bruvai(jstart:mnmaxj,0:kmax) Brunt Väisällä frequencycfrowl(jstart:mnmaxj) ratio u/u∗ at water level pointdudz(jstart:mnmaxj,0:kmax) partial derivative of u with respect to zdvdz(jstart:mnmaxj,0:kmax) partial derivative of v with respect to zkfs(jstart:mnmaxj) mask array at water level point. Meaning:

0 : dry point1 : wet point, if and only if total depth > 0 and foursurrounding velocity points are wet

kfuh(jstart:mnmaxj) mask array at u-velocity point at half time step usedby wasxru. Meaning:0 : (temporarily) dry point1 : wet point

kfup(jstart:mnmaxj) mask array at u-velocity point at full time step usedby wasxrv. Meaning:0 : (temporarily) dry point1 : wet point

kfvh(jstart:mnmaxj) mask array at v-velocity point at half time step usedby wasxru. Meaning:

Version 3.17, November 2016 213

Page 214: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

0 : (temporarily) dry point1 : wet point

kfvp(jstart:mnmaxj) mask array at v-velocity point at full time step usedby wasxrv. Meaning:0 : (temporarily) dry point1 : wet point

kcs(jstart:mnmaxj) mask array for grid points. Meaning:0 : non-computational point1 : computational point2 : open boundary point

u(jstart:mnmaxj,1:kmax) updated u-velocityv(jstart:mnmaxj,1:kmax) updated v-velocityw(jstart:mnmaxj,0:kmax) updated w-velocityumea(jstart:mnmaxj,1:kmax) updated u-velocity at ω-velocity pointvmea(jstart:mnmaxj,1:kmax) updated v-velocity at ω-velocity pointvicow(jstart:mnmaxj,0:kmax) vertical eddy viscosity at ω-velocity pointz0wl(jstart:mnmaxj) roughness parameter z0 at water level pointzks(jstart:mnmaxj,0:kmax) updated position of layer interface at water level

point

The following important computational arrays are both used and updated at both stages:

rtur0(jstart:mnmaxj,0:kmax,ltur) turbulent quantity (k or ε) at previous time level.The integer ltur gives number of turbulence quan-tities (usually 2)

rtur1(jstart:mnmaxj,0:kmax,ltur) turbulent quantity (k or ε) at new time level

The following work arrays are used to store the matrix entries and right-hand side vector elementsin subroutine TRSTUR:

aak(jstart:mnmaxj,0:kmax) coefficient ak in equation (6.28)bbk(jstart:mnmaxj,0:kmax) coefficient am,n in equation (6.23) or bk in equation

(6.28)cck(jstart:mnmaxj,0:kmax) coefficient ck in equation (6.28)ddk(jstart:mnmaxj,0:kmax) coefficient dm,n in equation (6.23) or dk in equation

(6.28)bux(jstart:mnmaxj,1:kmax) coefficient e1ξ

m,n in equation (6.23)bdx(jstart:mnmaxj,1:kmax) coefficient e−1ξ

m,n in equation (6.23)buy(jstart:mnmaxj,1:kmax) coefficient e1η

m,n in equation (6.23)bdy(jstart:mnmaxj,1:kmax) coefficient e−1η

m,n in equation (6.23)

Note that arrays bbk and ddk will be overwritten.

214

Page 215: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Appendix H. Reference and data structures

H.6 Reference and data structures of WASYRU and WASYRV

In each half time step the matrices and right-hand side vectors of the depth-averaged k- and ε-equations are built. Subsequently, the resulting systems of equations are solved. For the buildingand solving of each half time step two subroutines WASYRU and WASYRV are used, which aresimilar. The structure of subroutine WASYRU is as follows:

trshke Builds and solves depth-averaged k-ε model

With respect to the data structure we refer to the remark made in Section H.2.

The following important computational arrays are used only at both stages:

hf(jstart:mnmax) permanent depth valuesseh(jstart:mnmaxj) water level at half time stepumean(jstart:mnmax) depth-averaged u-velocityvmean(jstart:mnmax) depth-averaged v-velocitykfd(jstart:mnmaxj) mask array at depth point. Meaning:

0 : (temporarily) dry point1 : wet point

kfuh(jstart:mnmaxj) mask array at u-velocity point at half time step usedby wasyru. Meaning:0 : (temporarily) dry point1 : wet point

kfup(jstart:mnmaxj) mask array at u-velocity point at full time step usedby wasyrv. Meaning:0 : (temporarily) dry point1 : wet point

kfvh(jstart:mnmaxj) mask array at v-velocity point at half time step usedby wasyru. Meaning:0 : (temporarily) dry point1 : wet point

kfvp(jstart:mnmaxj) mask array at v-velocity point at full time step usedby wasyrv. Meaning:0 : (temporarily) dry point1 : wet point

vnu2d(jstart:mnmaxj) horizontal eddy viscosity at depth pointh(jstart:mnmaxj) water depthxprod(jstart:mnmaxj) shear frequency

The following important computational arrays are both used and updated at both stages:

Version 3.17, November 2016 215

Page 216: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

tur2d(jstart:mnmaxj,1:2) depth-averaged turbulent quantity (k or ε)

The following work arrays are used to store the matrix entries and right-hand side vector elementsin subroutine TRSHKE:

amat(jstart:mnmaxj,1) coefficient bm in equation (6.29)amat(jstart:mnmaxj,2) coefficient am in equation (6.29)amat(jstart:mnmaxj,3) coefficient cm in equation (6.29)rhs(jstart:mnmaxj) coefficient dm in equation (6.29)

H.7 Reference and data structures of WASMAF

In each whole time step several flow-related data are computed and stored in SDS-file for outputpurposes. In particular, the physical vertical velocity is calculated. This calculation is done in thesubroutine TRSCPW, which is called by WASMAF.

With respect to the data structure we refer to the remark made in Section H.2.

The following important computational arrays are used only at one time step:

kcs(jstart:mnmaxj) mask array for grid points. Meaning:0 : non-computational point1 : computational point2 : open boundary point

u(jstart:mnmaxj,1:kmax) updated u-velocityv(jstart:mnmaxj,1:kmax) updated v-velocityw(jstart:mnmaxj,0:kmax) updated ω-velocityzksp(jstart:mnmaxj,0:kmax) position of layer interface at water level point at full

time stepzkup(jstart:mnmaxj,0:kmax) position of layer interface at u-velocity point at full

time stepzkvp(jstart:mnmaxj,0:kmax) position of layer interface at v-velocity point at full

time step

The following important array is both used and updated at one time step:

dzksdt(jstart:mnmaxj,0:kmax) time derivative of layer interface at water levelpoint

The following important array is updated only at one time step:

wphysi(jstart:mnmaxj,1:kmax) physical vertical velocity w

216

Page 217: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Appendix I. Cross-reference tables of formulas and subroutines

Appendix I

Cross-reference tables of formulas andsubroutines

This appendix gives an overview of cross-reference tables containing all relevant equations andformula’s of Chapter 2 to 8 that are cross-reference to the subroutines in which they are evaluated.Each table corresponds to each of the given chapter.

Table I.1: Cross-reference table containing equations andformula’s of Chapter 2.

EQUATION NUMBER SUBROUTINESeq. 2.9 TRGSIHeq. 2.49 WAGDENeq. 2.50 WAGDENeq. 2.76 TRSDIZeq. 2.79 TRSVIZeq. 2.80 TRSVIZeq. 2.81 TRSVIZeq. 2.82 TRSVIZeq. 2.83 TRSVIZeq. 2.84 TRSDIZalgorithm 2.1 TRSLAV

Table I.2: Cross-reference table containing equations andformula’s of Chapter 4.

EQUATION SUBROUTINES EQUATION SUBROUTINESNUMBER NUMBEReq. 4.2 TRSSUWeq. 4.7 TRSSUWeq. 4.17 TRSUMO eq. 4.69 TRSDIFeq. 4.18 TRSCUE eq. 4.70 TRSDIF

Version 3.17, November 2016 217

Page 218: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

Table I.2: Cross-reference table containing equations andformula’s of Chapter 4.

eq. 4.20 TRSUMO eq. 4.71 TRSDIFeq. 4.21 TRSCUE eq. 4.72 TRSDIFeq. 4.23 TRSCUE, TRSUMO eq. 4.75 TRSDIFeq. 4.34 TRSCUE, TRSUMO eq. 4.76 TRSDIFeq. 4.36 TRSCUE eq. 4.75 TRSDIFeq. 4.38 TRSCUE, TRSUMO eq. 4.78 TRSDIFeq. 4.43 TRSCUE, TRSUMO eq. 4.80 TRSDIFeq. 4.44 TRSCUE, TRSUMO eq. 4.81 TRSDIFeq. 4.47 TRSCUE, TRSUMO eq. 4.83 TRSCRI, TRSCREeq. 4.48 TRSCUE, TRSUMO eq. 4.84 TRSCRI, TRSCREeq. 4.53 TRSCUE, TRSUMO eq. 4.85 TRSCRI, TRSCREeq. 4.54 TRSCUE, TRSUMO eq. 4.86 TRSCRI, TRSCRE

eq. 4.88 TRSCRI, TRSCREeq. 4.91 TRSTUReq. 4.92 TRSTU0eq. 4.94 TRSTUReq. 4.95 TRSTU0eq. 4.97 TRSTUReq. 4.99 TRSTUReq. 4.100 TRSTUReq. 4.101 TRSTU0, TRSTUR

eq. 4.48 TRSCUE, TRSUMO eq. 4.103 TRSVIZeq. 4.119 TRSCPWeq. 4.120 TRSCPW

Table I.3: Cross-reference table containing equations andformula’s of Chapter 5.

EQUATION NUMBER SUBROUTINESeq. 5.3 TRSUMOeq. 5.2 TRSCUEeq. 5.4 TRSSUWeq. 5.6 TRSCUEeq. 5.7 TRSUMOeq. 5.8 TRSSUWeq. 5.11 TRSDIF, TRSCRE, TRSCRIeq. 5.12 TRSDIF, TRSCRE, TRSCRIeq. 5.14 TRSTUReq. 5.16 TRSTUReq. 5.18 TRSTUReq. 5.19 TRSTUReq. 5.20 TRSTUR

218

Page 219: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Appendix I. Cross-reference tables of formulas and subroutines

Table I.4: Cross-reference table containing equations andformula’s of Chapter 6.

EQUATION NUMBER SUBROUTINESeq. 6.1 TRSCUEeq. 6.10 TRSSUWeq. 6.11 TRSSUWeq. 6.12 TRSSUWeq. 6.13 TRSSUWeq. 6.14 TRSSUWeq. 6.15 TRSSUWeq. 6.17 TRSSUWeq. 6.18 TRSDIFeq. 6.23 TRSTUReq. 6.28 TRSTUR

Table I.5: Cross-reference table containing equations andformula’s of Chapter 7.

EQUATION SUBROUTINES EQUATION SUBROUTINESNUMBER NUMBEReq. 7.7 TRSCUE eq. 7.86 TRSRV1, TRSRV2eq. 7.8 TRSCUE eq. 7.93 TRSRV1, TRSRV2eq. 7.9 TRSUMO eq. 7.94 TRSRV1, TRSRV2eq. 7.10 TRSCUE, TRSUMO eq. 7.95 TRSRV1, TRSRV2eq. 7.11 TRSCUE, TRSUMO eq. 7.98 TRSRV1, TRSRV2eq. 7.12 TRSDIF eq. 7.99 TRSRV1, TRSRV2eq. 7.13 TRSDIF eq. 7.100 TRSRV1, TRSRV2eq. 7.15 WASGWS eq. 7.110 TRSRV1, TRSRV2eq. 7.16 WASGWS eq. 7.111 TRSRV1, TRSRV2eq. 7.20 WASGWS eq. 7.112 TRSRV1, TRSRV2eq. 7.21 TRSCUE, TRSUMO eq. 7.120 TRSDIFeq. 7.22 TRSCUE, TRSUMO eq. 7.121 TRSTUReq. 7.36 WAGUST eq. 7.127 TRSCUE, TRSUMOeq. 7.38 TRSVIZ eq. 7.138 TRSCUEeq. 7.42 TRSCHZeq. 7.43 TRSCHZ eq. 7.142 TRSCUE, TRSUMOeq. 7.52 TRSCHZ eq. 7.143 TRSCUE, TRSUMOeq. 7.57 TRSCHZ eq. 7.144 TRSCUE, TRSUMOeq. 7.59 TRSCHZ eq. 7.145 TRSCUE, TRSUMOeq. 7.60 TRSCUE, TRSUMOeq. 7.61 TRSCUE, TRSUMO eq. 7.147 TRSDFVeq. 7.63 TRSDIF eq. 7.148 TRSDFVeq. 7.64 TRSCRI, TRSCRE

Version 3.17, November 2016 219

Page 220: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

Table I.5: Cross-reference table containing equations andformula’s of Chapter 7.

eq. 7.65 TRSTUReq. 7.66 TRSTUReq. 7.67 TRSVIZeq. 7.68 TRSTUReq. 7.69 TRSTUReq. 7.70 TRSTUReq. 7.71 TRSRV1, TRSRV2eq. 7.72 TRSRV1, TRSRV2 algorithm 7.1 TRSBAR

Table I.6: Cross-reference table containing equations andformula’s of Chapter 8.

EQUATION NUMBER SUBROUTINESeq. 8.20 TRSJAM, TRSJACeq. 8.21 TRSJAM, TRSJACeq. 8.22 TRSJAM, TRSJACalgorithm 8.1 TRSDGS

220

Page 221: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Appendix J. Generalized Lagrangian Mean method

Appendix J

Generalized Lagrangian Mean method

This appendix gives a description of the Generalized Lagrangian Mean method for averaging theshallow water equations over a wave period [1].

Consider the velocity u(x, t) wich denotes the velocity at location x at time t. This is the velocityin a Eulerian framework. The wave-averaged velocity u(x, t), which is the velocity averaged over awave period T , is given by

u(x, t) =1

T

T/2∫−T/2

u(x, t+ τ)dτ. (J.1)

In figure J.1 an example of such a velocity field and the corresponding wave-averaged velocity fieldis plotted.

0 5 10 15 201

2

3

4

5

6

7

8

9

space

time

velocity

0 5 10 15 201

2

3

4

5

6

7

8

9

space

time

wave−averaged velocity

Figure J.1: Left: space-time plot of velocity field u. Right: corresponding wave-averaged velocityfield u.

The Lagrangian velocity uL(x0, t) denotes the velocity of a particle at time t which had location x0

at time t0 and is given byuL(x0, t) = u(ξ0(x0, t), t), (J.2)

Version 3.17, November 2016 221

Page 222: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

where ξ0(x0, t) = x0 +∫ tt0uL(x0, τ)dτ is the location of this particle at time t.

Next the trajectory ξ0 corresponding to the wave-averaged velocity field is computed by applyingthe Lagrangian operator, as defined in equation (J.2), to the wave-averaged velocity field u(x, t).This results in a vector field uL(x, t), i.e.

uL(x0, t) = u(ξ0(x0, t), t). (J.3)

Note that the location ξ0 does not correspond to the location of an actual particle; it is the positionof the particle where it would have been if it were transported by the wave-averaged flow. Thetrajectories ξ0 and ξ0 corresponding to the velocity fields in figure J.1 are shown in figure J.2.Define ξ(x0, t) = ξ0(x0, t) − ξ0(x0, t), which is the vector between the actual particle position and

1 2 3 4 5 6 7 8 99.5

10

10.5

11

11.5

12

time

spac

e

Trajectory Mean trajectory

Figure J.2: Trajectory ξ0 and mean trajectory ξ0 corresponding to the velocity fields u and u, re-spectively.

the position of the particle if it had been transported by the wave-averaged flow.

So far, the focus has been on particle trajectories. The wave theory, however, approaches the flowfrom a Eulerian point of view. The change from the Lagrangian to the Eulerian reference frame ismade by the introduction of the generalized Lagrangian coordinate ξGL(x, t) := x + ξ(x, t). Notethat the underscore 0 is dropped here, because it refers to trajectory start points, i.e. a Lagrangianreference frame.

The generalized Langrangian (GL) velocity uGL(x, t) is defined as the actual velocity u at the GLposition ξGL, i.e.

uGL(x, t) = u(ξGL(x, t), t). (J.4)

The generalized Lagrangian mean (GLM) velocity uGL is retrieved from a wave-average of the GLvelocity:

uGL(x, t) =1

T

T/2∫T/2

uGL(x, t+ τ)dτ. (J.5)

The GL coordinate ξGL remains near its center point x. Typically, it moves around this point in acircular or elliptical orbit. The time averages of the GL velocity uGL and of the Eulerian velocity u

222

Page 223: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Appendix J. Generalized Lagrangian Mean method

will typically be very similar. The (small) difference between these two time averages is known asthe Stokes drift velocity uS , i.e.

uS = uGL − u. (J.6)

In a pure wave motion, it is the wave-period-averaged velocity of a fluid particle.

For reference, in figure J.3 the velocities corresponding to the example above are plotted.

1 2 3 4 5 6 7 8 9−1.5

−1

−0.5

0

0.5

1

1.5

2

time

velo

city

Velocity Wave−averaged velocityGL velocity GLM velocity

Figure J.3: Velocities u, u, uGL and uGL corresponding to the example in figures J.1 and J.2.

Version 3.17, November 2016 223

Page 224: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Index

2D turbulence, 393D turbulence, 39

advection flux, 93, 95advection term, 83, 85, 86, 95, 113algebraic equation, 107, 109, 110, 118algebraic turbulence model, 31alternating direction implicit (ADI), 70, 78, 107,

109, 111, 119anti-creepage term, 28, 98artificial creep, 27, 28atmospheric pressure, 24, 76, 87, 140

baroclinic pressure, 88, 108baroclinic pressure gradient, 25barotropic gradient, 25barrier formulation, 123(bi)linear interpolation, 77block Jacobi process, 166bottom stress, 108, 123, 130, 132, 133, 136boundary-fitted coordinates, 41Boussinesq hypothesis, 18, 25breaking waves, 35, 87buoyancy, 32, 33, 101, 114, 136

Cartesian coordinates, 13central differences, 85, 95, 96, 101, 109, 111,

123Chézy coefficient, 75, 76, 132, 133, 135, 136,

143Charnock drag formula, 129continuityequation, 109convervative

advection term, 86coordinate mapping, 7, 41, 42, 70, 71Coriolis force, 17–20, 43, 90, 127, 184corvariant physical velocity, 41, 42, 70, 71, 132,

186Courant number, 108

covariant physical velocity, 44Crank-Nicolson scheme, 112Crank-Nicolsonscheme, 78, 112curvature term, 22, 27, 35, 73, 83–85, 126curvilinear coordinates, 8, 11, 13, 41, 125

density, 13, 17, 18, 21, 23–25, 29, 76, 83, 88,101

density gradient, 29, 83, 88depth-averaged continuity equation, 20, 42, 80depth-averaged horizontal velocity, 20depth-averaged k-ε model, 38, 115depth-averaged k-ε model, 102diffusivity flux, 77, 93, 95Dirichlet boundary condition, 136discharge boundary, 125, 139, 143dispersion term, 21, 26double sweep, 10, 119, 120, 122, 163, 168, 193,

205drying and flooding, 10, 123, 155, 158, 161, 204

eddy diffusivity, 25, 26, 28, 30, 76, 97, 207eddy viscosity, 18, 21, 22, 28–31, 33, 34, 75

finite difference approach, 10, 11, 18, 70, 73, 74,76, 83, 84, 107, 109

finite volume approach, 70, 94first order upwind scheme, 10, 76, 77, 83, 99,

114, 126, 146friction velocity, 31, 130–132, 136

Gauss-Seidel method, 165Gaussian elimination, 10, 79, 119, 164geometrical quantities, 70–72, 74, 75gravity, 17, 18, 31grid enclosure, 127

horizontal eddy viscosity, 22, 75, 108, 124, 125,167

horizontal Reynolds stress tensor, 39, 102, 116

224

Page 225: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

INDEX

hydrostatic pressure, 18, 23

incompressibility, 17, 118index set, 75, 76

Jacobian, 42, 72, 75, 81, 84, 183, 185

k-model, 32–34, 99, 113, 122Kolmogorov-Prandtl relation, 31

law of the wall, 130–132layer interface, 13, 15, 19, 27, 74, 100, 104layer thickness, 8, 11, 15, 75, 76, 119–121, 137layer-averaged continuity equation, 20, 23, 28,

41, 80, 82, 104layer-averaged horizontal velocity, 19layer-averaged momentum equation, 23layer-averaged velocity, 19Leibniz’rule, 180

mass conservation, 82momentum equation, 19, 83, 85, 91, 109, 110monotonicity, 77, 83, 99

Navier-Stokes equations, 17, 18, 32Neumann boundary condition, 135, 147non-hydrostatic pressure, 24, 40, 75, 105, 116

orthogonal coordinates, 9, 41, 185–187overall solution algorithm, 11

pentadiagonal matrix, 174plane of reference, 14Prandtl/Schmidt number, 30, 32, 33pressure correction technique, 40, 116pressure gradient, 18, 20, 22–25, 83, 88, 130,

140production of turbulent energy, 35, 101, 114

red-black Jacobi method, 119, 122, 164, 168return time, 125Reynolds stress tensor, 17, 22, 89Reynolds stresses, 18Richardson number, 31, 101, 203, 205, 207Riemann-invariant, 139, 140Riemann-invariant boundary, 144

second order upwind scheme, 10, 77, 85, 109,119

shadow sigma coordinates, 15shallow water assumption, 19shallow water equations, 13, 16, 18, 19, 23, 73,

78, 79, 108, 155sigma coordinates, 15source and sink term, 26source term, 11, 26, 94, 111, 112source/sink term, 25staggered grid, 8, 10, 27, 73, 74, 81, 156stratification, 21, 27, 29, 31, 32, 34subcritical flow, 58, 124supercritical flow, 62

tensor analysis, 182Thatcher-Harleman boundary condition, 145, 146θ-method, 112tidal force, 17time derivative, 20, 26, 80, 83, 94, 95, 99, 104,

140, 211time discretization, 70, 78, 79, 107–109, 111,

113, 114, 177total water depth, 9, 14, 15, 31, 80–82, 96, 123,

132, 133, 140, 143, 144, 156–158transformed velocity, 41, 44, 70, 71transport equation, 25, 32, 33, 43, 45, 94, 108,

111–114, 121, 125, 158, 173, 194tridiagonal matrix, 79, 107, 110, 119, 122, 162,

165, 169, 170turbulence model, 11, 13, 29, 31, 33turbulent kinetic energy, 29, 31, 32, 35, 75, 114,

132, 203, 204

u-momentum equation, 83, 119

v-momentum equation, 91, 118vertical advection, 83, 87, 95, 97, 100vertical eddy viscosity, 22vertical velocity, 18–20, 28, 35, 76, 80, 104, 105,

110, 116, 211vertical viscous term, 22, 83, 90, 109, 129, 135virtual unknown, 126, 127, 174viscous term, 20–22, 83, 109, 125, 127, 129,

135, 140Von Kármán constant, 31

w-momentum equation, 105water level gradient, 82, 83, 87, 109, 155

Version 3.17, November 2016 225

Page 226: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

weakly reflective boundary condition, 139, 140weirs, 53, 58, 81, 161White-Colebrook formulation, 133wind drag coefficient, 128wind stress, 10, 23, 31, 123, 128

226

Page 227: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

BIBLIOGRAPHY

Bibliography

[1] D.G. Andrews and M.E. McIntyre. An exact theory of nonlinear waves on a lagrangian-meanflow. Journal of Fluid Mechanics, 89(4):609–646, 1978.

[2] R. Aris. Vectors, tensors and the basic equations of fluid mechanics. Prentice-Hall Inc.,Englewood Cliffs, N.J., 1962.

[3] S. Babarutsi and V.H. Chu. A two-length-scale model for quasi-two-dimensional turbulentshear flows. In Refined flows. Modelling, pages 53–60. IAHR, 1991.

[4] B.A. Bakhmetev. Hydraulics of open channels. Eng. Soc. Monograph. McGraw-Hill, 1932.

[5] J.P. Benqué, J.A. Cunge, J. Feuillet, A. Hauguel, and F.M. Holly. New method for tidal currentcomputation. J. of the Waterways, Port, Coastal and Ocean Division, ASCE, 108:396–417,1982.

[6] M.D.J.P. Bijvelds. Recirculating steady flow in harbours: comparison of numerical computa-tions to laboratory measurements. Technical Report 1-97, Faculty of Civil Engineering, DelftUniversity of Technology, 1997.

[7] G. Bloemberg. Experimentele bepaling energieverliezen bij overlaten. Master’s thesis, DelftUniversity of Technology, 2001.

[8] P.A. Blokland. The development of an integrated system for hydraulic modelling. In W.R.Blain and K.L. Katsifarakis, editors, Free surface flow and hydraulic software, Hydraulic en-gineering software V, pages 235–242, Southampton, 1994. Computational Mechanics Publi-cations.

[9] H. Charnock. Wind stress on a water surface. Quart. J. Roy. Meteorol. Soc., 81:639–640,1955.

[10] Y.-S. Chen and S.-W. Kim. Computations of turbulent flows using an extended k−ε turbulenceclosure model. Technical Report NASA CR-179204, NASA-Marshall Space Flight Center,Alabama, USA, 1987.

[11] E.D. de Goede, J.A.Th.M. van Kester, R.E. Uittenbogaard, G.E. Loots, B. van ’t Hof, andE.A.H. Vollebregt. Verbetering van overlaten in WAQUA/TRIWAQ. Technical Report M3928,Delft Hydraulics en VORtech, Postbus 177, 2600 MH Delft, december 2006.

[12] Deltares. Delft3D-RGFGRID. generation and manipulation of curvilinear grids for Delft3D-FLOW and Delft3D-WAVE. User’s manual, Version 4.00, 2011.

Version 3.17, November 2016 227

Page 228: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

[13] I.A. Demirdzic. A finite volume method for computation of fluid flow in complex geometries.PhD thesis, University of London, 1982.

[14] C. Driessen. Iterative solvers in TRIWAQ. Technical Report RIKZ/95-029, National Institutefor Coastal and Marine Management, The Hague, The Netherlands, 1995.

[15] C. Eckart. Properties of water, Part II. the equation of state of water and sea water at lowtemperatures and pressure. Amer. J. of Sci., 256:225–240, 1958.

[16] C.A.J. Fletcher. Computational techniques for fluid dynamics, Vols. 1 and 2. Springer-Verlag,Berlin, 1988.

[17] J. Fredsoe. Turbulent boundary layer in wave-current motion. Journal of Hydraulic Engineer-ing, 110(8):1103–1120, 1984.

[18] H. Gerritsen. Accurate boundary treatment in shallow water flow computations. PhD thesis,Twente University, 1982.

[19] E.D. de Goede and J.A.Th.M. van Kester. Het inbouwen van een operationeel k − ε turbulen-tiemodel in TRIWAQ. Technical Report Z844.50, Delft Hydraulics, Delft, The Netherlands,1995.

[20] G.H. Golub and C.F. van Loan. Matrix computations. Johns Hopkins University Press, Balti-more - London, 1989.

[21] P.M. Gresho and R.L. Lee. Don’t suppress the wiggles, they’re telling you something. InT.J.R. Hughes, editor, Finite Elements in Convection Dominated Flows. ASME Winter AnnualMeeting, 1979.

[22] V. Haroutunian. Simulation of vortex shedding past a square prism using three two-equationturbulence models. In Sixth Int. Symp. on CFD, Lake Tahoe, Nevada, USA, pages 408–414,1995. A collection of technical papers.

[23] J.O. Hinze. Turbulence. Mac Graw-Hill, New York, 1975.

[24] C. Hirsch. Numerical computation of internal and external flows, Vols. 1 and 2. John Wiley,Chichester, 1990.

[25] C.-T. Ho and S.L. Johnsson. Optimizing tridiagonal solvers for alternating direction meth-ods on boolean cube multiprocessors. SIAM Journal on Scientific and Statistical Computing,11(3):563–592, 1990.

[26] J.A.Th.M. van Kester. Beoordeling nieuwe overlaatroutines waqua. Technical Report Z3063,Delft Hydraulics, The Netherlands, 2001.

[27] J.A.Th.M. van Kester and E.D. de Goede. Verbeteren van algoritme voor droogvallen en onder-lopen in WAQUA en TRIWAQ. Technical Report Z2292, Delft Hydraulics, The Netherlands,1997.

228

Page 229: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

BIBLIOGRAPHY

[28] J.A.Th.M. van Kester and G.S. Stelling. 3D-numerieke modellering gedeeltelijk geopendeharingvlietsluizen. sluisformuleringen en testberekeningen voor implementatie in TRIWAQ(KEPS02, fase 1). Technical Report Z948, Delft Hydraulics, Delft, The Netherlands, 1996. InDutch.

[29] J.A.Th.M. van Kester and R.E. Uittenbogaard. The sigma-coordinate transformation and thebasic equations of TRISULA. Technical Report Draft Z81-21, Delft Hydraulics, Delft, TheNetherlands, 1989.

[30] J.A.Th.M. van Kester and R.E. Uittenbogaard. Nader onderzoek overlaatroutines WAQUA.Technical Report Z3407.00, Delft Hydraulics, The Netherlands, 2003.

[31] J.M. de Kok. A three-dimensional finite difference model for computation of near- and far-fieldtransport of suspended matter near a river mouth. Continental Shelf Research, 12:625–642,1992.

[32] J. Lander. Formuleringen barriers in WAQUA. Technical Report GWAO-91.10108, NationalInstitute for Coastal and Marine Management, the Hague, the Netherlands, 1991.

[33] J.W.M. Lander, P.A. Blokland, and J.M. de Kok. The three-dimensional shallow water modelTRIWAQ with a flexible vertical grid definition. Technical Report RIKZ/OS-96.104x, NationalInstitute for Coastal and Marine Management, The Hague, The Netherlands, 1994.

[34] A. Langerak. Aspekten barriers WAQUA-modellen. Technical Report GWAO-88.808, Rijks-waterstaat/DGW, the Hague, the Netherlands, 1988.

[35] B.E. Launder and D.B. Spalding. The numerical computation of turbulent flows. Comput.Meth. Appl. Mech. Engng., 3:269–289, 1974.

[36] J.J. Leendertse. Aspects of a computational model for long period water wave propagation.Technical Report RM-5294-PR, Rand Corporation, Santa Monica, Cal., 1967.

[37] J.J. Leendertse. Aspects of SIMSYS2D, a system for two-dimensional flow computation.Technical Report R-3572-USGS, Rand Corporation, Santa Monica, Cal., 1987.

[38] J.J. Leendertse. A new approach to three-dimensional free-surface flow modeling. TechnicalReport R-3712-Neth/RC, Rand Corporation, Santa Monica, Cal., 1989.

[39] J.J. Leendertse. A proposal for improving TRIWAQ. Technical report, Tri-Flow Comp., Mesa,USA, 1995. Note: prepared for RIKZ.

[40] J.J. Leendertse and E.C. Gritton. A water-quality simulation model for well mixed estuar-ies and coastal seas: Vol. II, Computation procedures. Technical Report R-708-NYC, RandInstitute, New York City, USA, 1971.

[41] H.A. Lorentz. Verslag van de staatscommissie met als opdracht te onderzoeken in hoeverre,als gevolg van de afsluiting van de Zuiderzee (...) te verwachten is dat tijdens storm hoogerewaterstanden en een grootere golf op loop (...) zullen voorkomen (...). Algemeene Lands-drukkerij, The Hague, The Netherlands, 1926. In Dutch.

Version 3.17, November 2016 229

Page 230: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

[42] L.E. Malvern. Introduction to the mechanics of a continuous medium. Prentice-Hall,Inc., New Jersey, 1969.

[43] P. Michielsen and H.A. van der Vorst. Data transport in Wang’s partition method. ParallelComputing, 7:87–95, 1988.

[44] J. van der Molen. Tides in a Salt-Marsh. PhD thesis, Vrije Universiteit Amsterdam, 1997.

[45] R.E. Musumeci, I.A. Svendsen, and J. Veeramony. The flow in the surf zone: a fully nonlinearboussinesq-type of approach. Coastal Engineering, 52:565–598, 2005.

[46] J.R.N. Onvlee. The performance of drag relations in the WAQUA storm surge model. Techni-cal Report TR-149, KNMI, De Bilt, The Netherlands, 1993.

[47] D.W. Peaceman and H.H. Rachford. The numerical solution of parabolic and elliptic differen-tial equations. SIAM Journal, 3:28–41, 1955.

[48] N.A. Phillips. A coordinate system having some special advantages for numerical forecasting.J. Meteorol., 14:185–187, 1957.

[49] N. Praagman. Numerical solution of the shallow water equations by a finite element method.PhD thesis, Delft University of Technology, 1979.

[50] Rijkswaterstaat. Programmer’s guide SIMONA. Technical Report SIMONA 90-09, Ministryof Transport, Public Works and Water Management, the Hague, the Netherlands, 2012.

[51] Rijkswaterstaat. Local data structure WAQUA: Problem field FLOW. Technical report, Min-istry of Transport, Public Works and Water Management, The Hague, The Netherlands, 2013.

[52] Rijkswaterstaat/RIKZ. Users guide WAQUA. Technical Report SIMONA 92-10, Ministry ofTransport, Public Works and Water Management, the Hague, the Netherlands, 2012.

[53] R.C. Ris. Spectral modelling of wind waves in coastal areas. PhD thesis, Delft University ofTechnology, 1997.

[54] W. Rodi. Turbulence models and their application in hydraulics - A state of the art review.IAHR, Delft, The Netherlands, 1984.

[55] RWS. Afvoerkarakteristieken van kaden. Technical report, Rijkswaterstaat, Dir. Bovenriv-ieren, Afd. Studiedienst, 1968. Nota nr. 68.9.

[56] H. Schlichting. Boundary layer theory. McGraw Hill, New York, 1969.

[57] E.J.O. Schrama. Tides. Lecture Notes AE4-876. Delft University of Technology, Faculty ofAerospace Engineering, Delft, The Netherlands, 2007.

[58] J. Sieben. Overzicht en synthese beschikbare data overlaatproeven, update 2011. Technicalreport, Rijkswaterstaat, 2011.

230

Page 231: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

BIBLIOGRAPHY

[59] O. Simonin, R.E. Uittenbogaard, F. Baron, and P.L. Viollet. Possibilities and limitations tosimulate turbulence fluxes of mass and momentum, measured in a steady stratified mixinglayer. In Proc. XXIII IAHR Congress, National Research Council Canada, Ottawa, Canada,pages A55–A62, 1989.

[60] Z.W. Song. Parallelization of Hydrodynamic Models for Distributed Memory Computers. PhDthesis, K.U. Leuven, 1995.

[61] R.L. Soulsby, L. Hamm, G. Klopman, D. Myrhaug, R.R. Simons, and G.P. Thomas. Wave-current interaction within and outside the bottom boundary layer. Coastal Engineering, 21:41–69, 1993.

[62] J.L. Steger and R.F. Warming. Flux vector splitting of the inviscid gasdynamic equations withapplication to finite-difference methods. Journal of Computational Physics, 40(2):263–293,1981.

[63] G.S. Stelling. On the Construction of Computational Methods for Shallow Water Flow Prob-lems. PhD thesis, Delft University of Technology, 1983.

[64] G.S. Stelling and S.P.A. Duynmeyer. A staggered conservative scheme for every Froude num-ber in rapidly varied shallow water flows. International Journal for Numerical Methods inFluids, 43(12):1329–1354, 2003.

[65] G.S. Stelling and J.J. Leendertse. Approximation of convective processes by cyclic AOI meth-ods. In M.L. Spaulding, K. Bedford, and A. Blumberg, editors, Estuarine and coastal mod-eling; proceedings of the 2nd international conference, pages 771–782. American Society ofCivil Engineers, November 1992.

[66] G.S. Stelling and J.A.Th.M. van Kester. On the approximation of horizontal gradients in sigmacoordinates for bathymetry with steep bottom slopes. International Journal for NumericalMethods in Fluids, 18(10):915–935, 1994.

[67] M.J.F. Stive and H.G. Wind. Cross-shore mean flow in the surf zone. Coastal Engineering,10:325–340, 1986.

[68] D.H. Swart. Offshore sediment transport and equilibrium beach profiles. Technical ReportDelft Hydraulics Lab. Publ., Delft Hydraulics, 1974.

[69] H. Tennekes and J.L. Lumley. A first course in turbulence. MIT Press, Cambridge, Massachus-sets, 1983.

[70] M.L. Thatcher and R.F. Harleman. A mathematical model for the prediction of unsteadysalinity intrusion in estuaries. Technical Report 144, MIT, Massachusetts, USA, 1972.

[71] J.F. Thompson, Z.U.A. Warsi, and C.W. Mastin. Boundary fitted coordinate systems for nu-merical solution partial differential equations - a review. Journal of Computational Physics,47(1):1–108, 1982.

[72] R.E. Uittenbogaard. Model for eddy diffusivity and viscosity related to sub-grid velocity andbed topography. Technical Report 526, Delft University of Technology, 1998.

Version 3.17, November 2016 231

Page 232: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

Technical documentation WAQUA/TRIWAQ

[73] R.E. Uittenbogaard, J.A.Th.M. van Kester, K.B. Robaczewska, and G.S. Stelling. Sigma-transformatie in TRISULA vergeleken met horizontale lagen in TRIWAQ. Technical ReportZ413, Delft Hydraulics, The Netherlands, 1993. partly in English.

[74] R.E. Uittenbogaard, J.A.Th.M. van Kester, and G.S. Stelling. Implementation of three tur-bulence models in TRISULA for rectangular horizontal grids. Technical Report Z162, DelftHydraulics, The Netherlands, 1992.

[75] B. van Vossen. Horizontal large eddy simulations; evaluation of flow computations withdelft3d-flow. Technical Report MEAH-197, Delft Hydraulics, The Netherlands, 2000.

[76] Richard S. Varga. Matrix Iterative Analysis. Prentice-Hall, Englewood Cliffs, New Jersey,1962. Second Edition, Springer, Berlin, 2000.

[77] G.K. Verboom and A. Slob. Weakly reflective boundary conditions for two-dimensional shal-low water flow problems. Technical Report no. 322, Delft Hydraulics, Delft, The Netherlands,1984. Paper presented at 5th Int. Conf. on Finite Elements in Water Resources, Burlington,USA.

[78] H. Vermaas. Energieverliezen door overlaten: een gewijzigde berekeningsprocedure voorWAQUA-rivieren versie. Technical Report Q92, Delft Hydraulics, The Netherlands, 1987.

[79] J.R. Villemonte. Submerged weir discharge studies. Engineering News Record, pages 866–869, December 1947.

[80] E.A.H. Vollebregt. Parallel software development techniques for shallow water models. PhDthesis, Delft University of Technology, 1997.

[81] E.A.H. Vollebregt. Analyse van viscositeitstermen voor het Zeedelta model. MemoEV/M01.006, VORtech, Juni 2001.

[82] E.A.H. Vollebregt. Niet-aansluitende overgangen tussen verschillende toestanden van barriersin WAQUA. Technical Report TR05-03, VORtech, Postbus 260, 2600 AG Delft, March 2005.

[83] E.A.H. Vollebregt. Apart zetten van de energieverliesterm voor overlaten. Memo EV/M07.048,VORtech, 2007.

[84] E.A.H. Vollebregt. Ontwerp en prototyping van 3D overlaten in TRIWAQ. Memo EV/M07.-077, VORtech, January 2008.

[85] E.A.H. Vollebregt and M.R.T. Roest. User’s guide for parallel WAQUA/TRIWAQ and fordomain decomposition, 2000.

[86] E.A.H. Vollebregt, M.R.T. Roest, and B. van ’t Hof. Detailontwerp domein decompositie methorizontale verfijning. Technical Report TR01-06, versie 1.3.1, VORtech Computing, 2002.

[87] E.A.H. Vollebregt and C. van Velzen. Verdere experimenten met de viscositeitskruistermen.Memo EV/M01.009, VORtech, Augustus 2001.

[88] C.B. Vreugdenhil. Computational Hydraulics, an introduction. Springer-Verlag, Berlin, Hei-delberg, 1989.

232

Page 233: WAQUA/TRIWAQ - two- and three-dimensional shallow water ...simona.deltares.nl/release/doc/techdoc/waquapublic/sim1999-01.pdfThe system “WAQUA in SIMONA” (shorthand: “WAQUA”

BIBLIOGRAPHY

[89] C.B. Vreugdenhil. Vol. 13: Numerical methods for shallow-water flow. Water Science andTechnology Library. Kluwer Academic Publishers, Dordrecht, The Netherlands, 1994.

[90] C.B. Vreugdenhil and B. Koren (eds), editors. Numerical methods for advection-diffusionproblems, volume 45 of Notes on Numerical Fluid Mechanics. Vieweg-Verlag, Braunschweig,Wiesbaden, 1993.

[91] T.J. Weare. Errors arising from irregular boundaries in ADI solutions of the shallow waterequations. International Journal for Numerical Methods in Engineering, 14:921–931, 1979.

[92] J.H.A. Wijbenga. Schematisatie van barriers in WAQUA. Technical Report Q779, Delft Hy-draulics, The Netherlands, 1989.

[93] J.H.A. Wijbenga. Weergave van extra energieverlies in RIVCUR. Technical Report Q910,Delft Hydraulics, The Netherlands, 1990.

[94] J.B.T.M. Willemse, G.S. Stelling, and G.K. Verboom. Solving the shallow water equationswith an orthogonal coordinate transformation. Technical Report 356, Delft Hydraulics, TheNetherlands, 1986.

[95] L. de Wit. Voorlopige testresultaten fase 1 en 3 empirische overlaatformulering in WAQUA.memo, ref. LdW/1459/07483/C, Svasek Hydraulics BV, November 2007.

[96] V. Yakhot, S.A. Orszag, S. Thangam, T.B. Gatski, and C.G. Speziale. Development of turbu-lence models for shear flows by a double expansion technique. Physics of Fluids A, 4:1510–1520, 1992.

[97] M. Zijlema. Computational modelling of turbulent flow in general domains. PhD thesis, DelftUniversity of Technology, 1996.

[98] M. Zijlema, J.J. Leendertse, and J.A.Th.M. van Kester. Omrekeningsformules ter bepaling van3D Chézy uit 2D Chézy tbv OMS. Technical report, Rijkswaterstaat/WL|Delft Hydraulics, theHague, the Netherlands, 2002. In Dutch.

[99] M. Zijlema and G.S. Stelling. Further experiences with computing non-hydrostatic free-surface flows involving water waves. International Journal for Numerical Methods in Fluids,48:169–197, 2005.

Version 3.17, November 2016 233