1 Introduction

The safety of The Netherlands against storm surge floods depends on a system of dikes and barriers. The barriers were constructed mainly in the twentieth century after severe floodings. The operation of these barriers depends heavily on accurate and timely predictions of the water levels. Both surge levels at sea and flood levels in rivers play a role in these predictions. This is only one example of the increasing demand for hydrodynamic modelling systems in which various spatial scales and modelling approaches are integrated.

To accurately resolve flow and transport processes in topographically complex areas, a locally variable grid resolution is desirable. Curvilinear grids, either in Cartesian or spherical coordinates (Kernkamp et al. 2005), have greatly increased the possibilities of numerical flow modelling in shallow water applications. The modelling capabilities have been further increased by local grid refinement, often referred to as domain decomposition, and an online coupling of 1D networks and 3D finite difference grids. See, e.g. Twigt et al. (2009) for application to the Pearl Estuary River Delta.

In The Netherlands, we have a tradition of many decades with finite differences for hydrodynamic modelling; see, e.g. Leendertse (1967) and Stelling (1984). Currently, two large integrated modelling systems for water flows are operational in The Netherlands, WAQUA/TRIWAQ (Dutch Ministry of Public Works and Transport 2010) and Delft3D (Gerritsen et al. 2007), which are both based on curvilinear and/or spherical grids.

Despite all their possibilities, some of the drawbacks of curvilinear grids cannot be easily circumvented. Staircase representation of coastlines is sometimes unavoidable. Special “cut-cell” treatment is required to avoid its adverse effects. Also, in the inner bends of meandering rivers, gridlines are focussed, leading to unnecessarily small grid cells.

These shortcomings were recognised by many researchers who contributed to the development of systems using unstructured grids; see, e.g. ADCIRC (Dietrich et al 2010), TELEMAC (Hervouet 2007; Postma and Hervouet 2007), UnTRIM (Casulli and Zanolli 2002), ELCIRC (Zhang et al. 2004; Baptista et al. 2005), MIKE Flexible Mesh (Sørensen 2004), SLIM (De Brye et al. 2010), FVCOM (Chen and Liu 2003) and Delfin (Ham et al. 2005).

Currently, Deltares is developing the unstructured-grid-based software system D-Flow Flexible mesh (hereafter to be called “D–Flow FM”), which is part of the Delft3D suite. D-Flow FM is based upon the successful numerical concepts of Delft3D and SOBEK1D2D and is developed in cooperation with the Delft University of Technology. The applied numerical scheme presented in this paper is based on the work of Casulli and Zanolli (2002), Stelling and Duinmeijer (2003), Ham et al. (2005), Kramer and Stelling (2008) and Kleptsova et al. (2009). The novelty of this approach lies in the following: (1) the grid allows polygon-shaped cells of arbitrary degree. (2) 1D, 2D or 3D modelling concepts are combined. For instance, river tributaries can now easily be modelled as 1D branches. (3) It is based on an efficient matrix solver that consists of a combination of conjugate gradient (CG) and minimum degree. Currently, the 2D module is operational; the 1D and 3D modules are available as a prototype.

In Section 2, we present a description of the method, the numerical implementation and the iterative solver. Test cases are presented in Section 3. Results of the Continental Shelf model, both on a uniform structured grid and on an unstructured grid with variable cell size, and the computational efficiency are presented in Section 4. Finally, Section 5 contains the conclusions.

2 Numerical approach

Our unstructured grid approach is based on the combination of 2D/3D finite-volume cells with 1D flow networks into a single grid, as illustrated in Fig. 1. This integrated approach allows for applications that range from sewer flow models, 1D river flow models, and 2D overland flow models to 3D stratified flow models.

Fig. 1
figure 1

A conceptual example of an unstructured grid in which 1D river segments have been combined with 2D grids

The staggered model grid is elaborated in Section 2.1. Time integration is done with the implicit θ-method. The resulting scheme follows the approach of (Kramer and Stelling 2008) except that we treat the advection terms explicitly. This is further discussed in Section 2.3. We employ a solver that combines Gaussian elimination and conjugate gradients that was developed earlier as part of the SOBEK1D2D system (Stelling and Verwey 2005). The solver is discussed in detail in Section 2.4.

2.1 Staggered grid

We apply a staggered Arakawa-C grid. For computational efficiency, we use an orthogonal grid, so that the pressure gradient only depends on two pressure points that are specified in cell circumcentres. The circumcentre is the midpoint of a circumscribed circle that goes through the vertices of a grid cell (see, e.g. the green circle in Fig. 2). For triangles, this point is unique; for quadrangles and other cells, there is some freedom in choosing the circumcentre. This will be used to achieve orthogonality. For 1D points, the pressure point is the network point itself. The velocity points are on the cell faces in 2D and in between two pressure/water level points in 1D, see Fig. 2.

Fig. 2
figure 2

Example of unstructured grid with triangles and quadrangles

The orthogonality concept on unstructured staggered grids imposes two requirements:

  1. 1.

    The circumcentre of each cell lies within that cell (i.e. triangles should have acute angles).

  2. 2.

    The line segment (flow link) that connects the circumcentres of two neighbouring cells should intersect orthogonally with the interface between them.

We use structured curvilinear grids that are aligned with the main flow direction as much as possible. This is important for efficiency, as will be explained below. Next, curvilinear grids are coupled by generating triangular grids between them. Finally, the resulting coupled grid is orthogonalised; see Fig. 3. Notice how, in the left panel, many blue flow links cross the black cell faces in a non-orthogonal way, whereas, in the right panel, this has been considerably improved via orthogonalisation. The orthogonalisation algorithm starts with an unstructured grid and iteratively moves each grid node in small steps in order to locally improve the orthogonality, following (Thompson et al 1985).

Fig. 3
figure 3

Grid orthogonalisation. Left panel: original grid. Right panel: Orthogonalized grid. In the right diagram, the blue flow links cross the black cell faces orthogonally

Figures 4 and 5 illustrate how unstructured grids can be applied in a complicated area. Figure 4 demonstrates the large flexibility of triangular grids. Figure 5 shows what can be achieved if structured-grid parts are introduced. For example, in the fully unstructured grid of Fig. 4, the channels on the right side of this figure are resolved in general by just three cell faces in the channel cross direction. In the mixed structured–unstructured of Fig. 5, there are five computational cells. Flow gradients in the channel length direction are often smaller than those in the channel cross direction, which suggests application of grid cells that are elongated and aligned in the flow direction. This can only be achieved by a curvilinear grid, which clearly has less grid cells than the triangular grid, while having a higher resolution in the cross-flow direction. This explains our preference for the application of curvilinear grids that are aligned with the flow in the main flow areas as much as possible.

Fig. 4
figure 4

Illustration of an unstructured fully triangular grid. Both the discretisation of channels with different directions and the local refinement are easily achieved

Fig. 5
figure 5

Illustration of an unstructured mixed grid. Compared with Fig. 4, all channels are now discretised by curvilinear orthogonal grids, coupled by triangles. Also, local refinement is easily achieved

2.2 Time integration

The depth-averaged, homogeneous shallow water equations are given by:

$$ \frac{{\partial H}}{{\partial t}} + \nabla \cdot \left( {H\vec{u}} \right) = q, $$
(1)
$$ \frac{{\partial \vec{u}}}{{\partial t}} + adv(\vec{u}) + g\nabla \zeta + {c_{\text{f}}}\vec{u}\left\| {\vec{u}} \right\| + 2\Omega \times \vec{u} = d, $$
(2)

in which H is the total water depth, ζ is the water level relative to a reference plane, \( \vec{u} \) is the depth-averaged horizontal velocity vector, \( \nabla \equiv {[{\partial_x},{\partial_y}]^T} \) is the horizontal gradient operator, Ω is the earth rotation vector and \( adv(\vec{u}) \) is the advection term. The right-hand side q contains source terms and d contains external forcing. The constants g and c f denote the gravity constant and bottom-friction coefficient, respectively.

Integrating the continuity Eq. 1 over a control volume with the θ-method yields a standard finite-volume discretisation for the water level ζ:

$$ {A_{\zeta }}\frac{{{\zeta^{{n + 1}}} - {\zeta^n}}}{{\Delta {t^n}}} + \theta \left( {{A_{{{u_2}}}}u_2^{{n + 1}} - {A_{{{u_1}}}}u_1^{{n + 1}}} \right) + (1 - \theta )\left( {{A_{{{u_2}}}}u_2^n - {A_{{{u_1}}}}u_1^n} \right) = {q_{\zeta }}, $$
(3)

in which subscripts ζ denote cell centre values and u cell face values. \( {A_{\zeta }} \) is the horizontal cell storage area, A u the face cross-sectional area and QuA u denotes the discharge through a cell face. This formulation guarantees volume conservation. Note that for ease of understanding, Eq. 3 shows a simplified 1D form with ‘faces’ 1 and 2 at the left and right. In 2D, this is replaced by a summation over all faces of normal velocity components.

The momentum Eq. 2 is discretised as follows:

$$ \frac{{{u^{{n + 1}}} - {u^n}}}{{\Delta t}} + Adv({u^n}) + \frac{g}{{\Delta {x_u}}}\left( {\theta \left( {\zeta_2^{{n + 1}} - \zeta_1^{{n + 1}}} \right) + (1 - \theta )\left( {\zeta_2^n - \zeta_1^n} \right)} \right) + b{u^{{n + 1}}} = d, $$
(4)

in which b represents the friction coefficient and \( {\left\| {\vec{u}} \right\|^n} \) and the right-hand side d collects other explicit terms and external forcings.

In Eq. 4, u n+1 can be expressed in terms of the water levels and substituted into the discretised continuity Eq. 3. This yields a system of equations in which the water level ζ is the only unknown. After solving the water levels, which is discussed in the next section, the velocities and fluxes are computed by back substitution.

For the Coriolis term, we follow (Kleptsova et al. 2009). The advection term is elaborated in the next section.

2.3 Advection term

The advection term Adv(u n) in Eq. 4 is integrated explicitly in time and is formulated in a momentum-conservative way, basically following (Kramer and Stelling 2008). Since the other terms in the momentum Eq. 4 are already in finite-volume formulation, this guarantees conservation of momentum. The key point in the conservative formulation of the advection term on unstructured grids lies in the choice of a closed pair of advective fluxes and advected quantities. The advected quantity is defined in a cell circumcentre, and the advective fluxes that transport this quantity are defined on the cell faces that surround this cell. This is valid for all supported types of cells (triangles, quadrilaterals, pentagons, hexagons or 1D cells).

The formulation of the advective term starts with the conservation of volume V

$$ \frac{{\partial V}}{{\partial t}} = \sum\limits_{\text{in}} Q - \sum\limits_{\text{out}} Q, $$
(5)

where V denotes the volume and Q the volume fluxes at cell faces. Mass (volume V × concentration c) conservation in a transport model is then straightforward:

$$ \frac{{\partial Vc}}{{\partial t}} = \sum\limits_{\text{in}} {Q{c_{\text{in}}}} - \sum\limits_{\text{out}} {Q{c_{\text{out}}}} $$
(6)

Since we assume homogeneous flows (i.e. constant density), the conservation of momentum reads

$$ \begin{array}{*{20}{c}} {\frac{{\partial {V_u}u}}{{\partial t}} = \sum\limits_{\text{in}} {Q{u_{\text{in}}}} - \sum\limits_{\text{out}} {Q{u_{\text{out}}}} + ..} & {\left( {{u_{\text{in}}} = {{\vec{u}}_{\text{in}}} \cdot {{\vec{n}}_u}} \right),} \\ \end{array} $$
(7)

in which V u is the volume of the momentum control volume (see also Fig. 2 and Eq. 13). Note that this differs from the control volume for water levels as in Eq. 3, due to the staggered grid approach. The cell face normal vector is defined by \( {\vec{n}_u} \) at each u-point, and the cell circumcentre-based velocity vector \( \vec{u} \) is reconstructed from the cell face normal velocities, which are defined in Eq. 12. The out-side of the control volume around a u-point is the one that the normal vector \( {\vec{n}_u} \) points to, and the in-side is the opposite side. Now, the quantities u in and u out are the components of the cell circumcentre-based velocity vectors that lie in the direction of the face normal velocity that is addressed. Equation 7 can be rewritten to

$$ {V_u}\frac{{\partial u}}{{\partial t}} + u\frac{{\partial {V_u}}}{{\partial t}} = \sum\limits_{\text{in}} {Q{u_{\text{in}}}} - \sum\limits_{\text{out}} {Q{u_{\text{out}}} + } .. $$
(8)

Substituting Eq. (5) yields

$$ \begin{gathered} {V_u}\frac{{\partial u}}{{\partial t}} + u\left( {\sum\limits_{\text{in}} Q - \sum\limits_{\text{out}} Q } \right) = \sum\limits_{\text{in}} {Q{u_{\text{in}}}} - \sum\limits_{\text{out}} {Q{u_{\text{out}}} + } .. \hfill \\ \frac{{\partial u}}{{\partial t}} = \frac{1}{{{V_u}}}\left\{ {\sum\limits_{\text{in}} {Q{u_{\text{in}}}} - \sum\limits_{\text{out}} {Q{u_{\text{out}}} - u\left( {\sum\limits_{\text{in}} Q - \sum\limits_{\text{out}} Q } \right)} } \right\} + .. \hfill \\ \end{gathered} $$
(9)

which results in

$$ \frac{{\partial u}}{{\partial t}} = \frac{1}{{{V_u}}}\left\{ {\sum\limits_{\text{in}} {Q({u_{\text{in}}} - u)} - \sum\limits_{\text{out}} {Q({u_{\text{out}}} - u)} } \right\} + .., $$
(10)

The cell based velocity vector \( {\vec{u}_{\zeta }} \)(either \( {\vec{u}_{\text{in}}} \) or \( {\vec{u}_{\text{out}}} \)) must now be constructed from face normal components, for which we apply (Perot 2000):

$$ {\vec{u}_{\zeta }} = \frac{1}{{{A_{\zeta }}}}\sum\limits^{\text{faces}} {\Delta x_u^{\zeta }{W_u}{{\vec{n}}_u}u} $$
(11)

in which the definitions are illustrated in Fig. 6.

Fig. 6
figure 6

Left panel: Weighting factors for cell based velocity vector. Right panel: Sum of weighting factors is twice the cell area

The right plot in Fig. 6 shows that the sum of the weighting functions \( \Delta x_u^{\zeta }{W_u} \) is exactly equal to twice the cell surface, which is expected because the cell circumcentre-based velocity vector consists of two components, whereas it is reconstructed from normal velocities, which have just one component (in 3D, the weights would sum up to three times the cell volume).

The face control volume V u is taken as the weighted average of the left and right cell volumes:

$$ {V_u} = {\alpha_L}{V_L} + {\alpha_R}{V_R} $$
(12)

with

$$ {\alpha_L} = \frac{{\Delta x_{{_{{uL}}}}^{\zeta }}}{{\Delta x_{{_{{uL}}}}^{\zeta } + \Delta x_{{uR}}^{{_{\zeta }}}}};{\alpha_R} = 1 - {\alpha_L} $$
(13)

Finally, the advection contributions of the left and right cells are added such that the finite-volume formulation Eq. 10 of the momentum equation becomes:

$$ \frac{{\partial u}}{{\partial t}} = \frac{1}{{{V_u}}}\left\{ {{\alpha_L}\left( {\sum\limits_{\text{inL}} {Q({u_{\text{inL}}} - u)} - \sum\limits_{\text{outL}} {Q({u_{\text{outL}}} - u)} } \right) + {\alpha_R}\left( {\sum\limits_{\text{inR}} {Q({u_{\text{inR}}} - u)} - \sum\limits_{\text{outR}} {Q({u_{\text{outR}}} - u)} } \right)} \right\} + .. $$
(14)

This formulation is applied to all 2D cells. By assuming that concentrations that flow out of a cell are equal to the cell concentrations themselves (u out=u), which can be seen as an upwind approach, the second and fourth summation terms in Eq. 14 cancel out. This is what we apply at 1D cells, at which have either one or two 1D cells on each side.

The implementation of the advection term has been tested on different types of grids and compared with the analytical solutions. In this paper, we will present the results for a 1D dambreak tests on a wet bed and on a dry bed (see Section 3.1) and to free and forced linear waves (see Section 3.2).

2.4 Iterative solver

The implicit time integration Eq. 3 results in a matrix vector equation \( {\mathbf{Ax}} = {\mathbf{b}} \) with vector of unknowns x equal to the cell-centred water levels at the new time level. The matrix A is a sparse symmetric diagonally dominant matrix. We employ a combined solver in which part of the water level unknowns is solved directly by Gaussian elimination by expressing them in terms of neighbouring water levels. The remaining unknowns are subsequently solved by the iterative CG solver, followed by a final substitution step.

The advantage of this approach is that the most time-consuming part of the solving, which is the CG part, needs to be performed only on about half the number of unknowns in 2D and in 1D only on the junction points that have three or more points connected.

The off-diagonal entries in the matrix A denote the flow links to neighbouring water-level points. The number of off-diagonal non-zero values is the degree of a computational point. Each point that is eliminated leads to fill-in, which occurs in the matrix rows of its neighbouring points. Therefore, points with minimum degree are eliminated first; see e.g. George and Liu (1989). This improves the diagonal dominance of the matrix for the remaining unknowns. This has a direct beneficial effect on the convergence rate of the CG solver because point Jacobi is already effective as a preconditioner; see e.g. Bruaset (1995). For each eliminated unknown, the degree of its neighbouring unknowns usually increases due to fill-in. A maximal degree (usually 6) is imposed, above which an unknown is not to be solved by Gaussian elimination anymore, but is solved by CG instead. The preparation phase of this combined solver algorithm is as follows:

  1. 1.

    Determine the degree of the unknowns and order them accordingly.

  2. 2.

    Mark the unknown with the smallest degree for Gaussian elimination and increase the degree of its neighbouring unknowns to reflect the fill-in.

  3. 3.

    If still unknowns exist with degree lower than the imposed maximal degree, go back to step 2, otherwise exit.

The solve phase proceeds as follows:

  1. 1.

    Perform Gaussian elimination on all marked unknowns marked in the preparation phase.

  2. 2.

    Perform CG to solve the remaining unknowns.

  3. 3.

    Perform Gaussian back substitution to determine the marked unknowns.

Figure 7 shows a colouring of the unknowns marked for Gaussian elimination in the Continental Shelf model from Section 4, in which the maximal degree is set to 6. A pattern evolves that resembles red-black Jacobi ordering.

Fig. 7
figure 7

Colouring of unknowns that are either solved by CG or by Gaussian elimination in the mixed solver with maximal degree set to 6. There is a tendency for checkerboard patterns

3 Test cases

3.1 1D Dambreak problem wet bed and dry bed

We computed this basic test case in seven parallel channels discretised by different types of grids.

Figure 8 shows computed velocity magnitudes and velocity vectors and the different network types. From top to bottom these are: (1) a regular curvilinear grid, (2) an irregular network including hexagons, pentagons and quadrilaterals but mostly consisting of triangles, (3) a grid with refinement in two directions using a combination of squares and triangles, (4) a grid consisting of rectangular cells with elongation varying in flow direction, (5) an elongated rectangular grid, (6) a uniform triangular grid and (7) a uniform rectangular grid.

Fig. 8
figure 8

Velocity magnitudes and velocity vectors at tip of bore, computed on different types of grids

The most accurate numerical solutions are obtained with the two bottom grids, which have the highest resolution. Flow velocities near the bore front are not always completely parallel to the flow direction on the triangular grid, but this does not seem to deteriorate the solution too much.

Figures 9 and 10 show a sideview of the water levels computed in all channels in white and the analytic solution in black for the wet bed and the dry bed, respectively. The bottom part shows a top view of computed water levels in the seven channels.

Fig. 9
figure 9

Analytic (black) and computed water levels wet bed dam break test case

Fig. 10
figure 10

Analytic (black) and computed water levels dry bed dam break test case

This test case shows that D–Flow FM is able to accurately predict the flow resulting from dam breaks on the considered grids.

3.2 Free and forced linear waves

This test case has been considered to check the implementation of tide-generating forces and check the phase/amplitude behaviour of the time integration. We compare model results to the analytical solution of a linear wave in an imaginary cyclic channel of 5-km deep around the equator. We schematised this channel on a uniform grid of 360 by 1 grid cell, in x- and y-direction, respectively. The length of this cyclic channel equals

$$ {L_a} = 2\pi {r_a} = 40075016\;(m),\;{r_a} = 6378137\;(m)\; $$
(16)

The analytical solution of the linearised shallow water equations

$$ \frac{{\partial \zeta }}{{\partial t}} + h\frac{{\partial u}}{{\partial x}} = 0,\quad \frac{{\partial u}}{{\partial t}} + {U_0}\frac{{\partial u}}{{\partial x}} + g\frac{{\partial \zeta }}{{\partial t}} + \lambda u = F $$
(17)

with U 0 the constant background velocity and \( \lambda = {{{g\left| {{U_{\text{typ}}}} \right|}} \left/ {{(h{C^2})}} \right.} \), (U typ=1) the constant bottom-friction coefficient of dimension [1/s], reads

$$ \begin{array}{*{20}{c}} {u(x,t) = {{{ - i{e^{{ikx}}}\left( {{a_{\text{L}}}{c_{\text{L}}} + {a_{\text{R}}}{c_{\text{R}}} - {a_f}{\omega_f}{e^{{i{\omega_f}t}}}} \right)}} \left/ {{kh}} \right.}} \hfill \\ {\zeta (x,t) = {e^{{ikx}}}\left( {{a_{\text{L}}} + {a_{\text{R}}} + i{a_f}{e^{{i{\omega_f}t}}}} \right)} \hfill \\ \end{array} $$
(18)

with

$$ \begin{array}{*{20}{c}} {{a_{\text{L}}} = \frac{1}{2}i\left( {\lambda i + {U_0}k - s} \right)\;,\;\;{c_{\text{L}}} = {b_{\text{L}}}{e^{{{a_{\text{L}}}t}}}} \hfill \\ {{a_{\text{R}}} = \frac{1}{2}i\left( {\lambda i + {U_0}k + s} \right)\;,\;\;{c_{\text{R}}} = {b_{\text{R}}}{e^{{{a_{\text{R}}}t}}}} \hfill \\ \end{array} $$
(19)

where \( s = \sqrt {{ - {\lambda^2} + 2i\lambda {U_0}k + U_0^2{k^2} + 4gh{k^2}}} \), where b L and b R denote respectively the initial amplitude of the left-going and right-going free wave, and where wave number k is a multiple of 1/r a . The amplitude of the forced wave with frequency ω f is denoted by a f . It is forced by the source term in the right-hand side of Eq. 17

$$ F = f{e^{{i{\omega_f}t - kx}}} $$
(20)

where \( f = {a_f}\frac{{gh{k^2} + i{\omega_f}\lambda + {U_0}{\omega_f}k - {\omega^2}}}{{kh}} \).

The solution that has been considered is specified by the choice

$$ \begin{array}{*{20}{c}} {{U_0} = 0\,{{\text{m}} \left/ {\text{s}} \right.}\;,\;\;\lambda = 8.75e - 6\,{{\text{s}}^{{ - {1}}}}\;,} \hfill \\ {{b_{\text{L}}} = 0.15\,{\text{m}}\;,\;\;{b_{\text{R}}} = 0\,{\text{m}}\;{,}\;\;k = {{{10}} \left/ {{{r_a}}} \right.}\;{a_f} = 0\,{\text{m}}} \hfill \\ \end{array} $$
(21)

For these parameters, the required time for a reduction of the amplitude by a factor of e -1 (relaxation period) amounts to \( {T_{\text{REL}}} = 1/{\rm Re} ({a_{\text{L}}}) = 228400 \) [s], which is about 12.6 free wave periods (18,100 s).

In this validation case, we have neglected the linearised advection term and verify the propagation of a free wave only, damped by linear bottom friction. We now check the ratio A of the computed versus the analytic amplitude of the propagated waves after two free wave periods for the two time steps Δt=300 s and Δt=600 s. In this test case, we have varied both the computational time step Δt and the parameter θ of the numerical time integration scheme. The results are shown in Table 1.

Table 1 Ratio of computed and analytic amplitude (for 36 points in space per wavelength)

Table 1 shows that the tidal amplitude is reproduced very accurately with a time step of five minutes if θ is sufficiently close to 0.5. We also performed a computation using a grid with twice as many gridcells, resolving a wave with 72 points per wavelength. This yields amplitude ratios that are very close to the values in Table 1.

We conclude that an accurate tidal amplitude is obtained if we have at least 30–60 time steps per wave period and at least 36 grid cells per wave length, provided that θ is sufficiently close to 0.5. These conditions can be easily met in most real-life computations, where for stability reasons a θ slightly larger than 0.5 is generally preferred.

We did not analyse the phase errors. The purple line in Fig. 11 shows that for ndt = 30 and teta = 0.55, amplitude errors are larger than phase errors. So, if the restrictions with respect to amplitude propagation are met, phase propagation errors will be relatively small.

Fig. 11
figure 11

Computed and analytical solution of the water level after two periods

We also checked the reproduction of a forced wave at a period of 12 h. We found an accurate reproduction, even at a large time step of 600 s and for a θ value of 0.55.

Fig. 12
figure 12

Bathymetry of the DCSM model

4 Application to the Continental Shelf

The Dutch Continental Shelf Model (DCSM) area is shown in Fig. 12 below. The curvature of the earth within this large model area is such that the use of spherical coordinates is required. The depth varies from over 5,000 m beyond the shelf break to above mean sea level in the shallow areas.

We will compare results of our unstructured-grid scheme to results of a recently developed WAQUA model schematisation of this area that uses a uniform grid in spherical coordinates. This so-called DCSMv6 (version 6) model has 890,000 computational points and a resolution of about 1.8 km. Although this uniform grid features quite a large number of grid cells, the coastlines are still resolved rather poorly. In the deeper ocean parts, on the other hand, one wavelength of the diurnal tidal wave is resolved by more than 5,000 points. One would wish for a more balanced grid with variable grid size.

4.1 Setup of unstructured grid

We created an unstructured model network where the size of the grid cells is chosen such that the local wave Courant number (cΔtx) with c the wave speed has about the same value everywhere. In this way, the number of grid cells per wavelength is more or less constant. Furthermore, areas near the coast automatically obtain a high resolution because of their relative shallowness. Outer areas are represented more coarsely because of their larger depths. Triangles are applied in between coarser and finer parts.

The uniform grid used in DCSMv6 consists of 890000 cells, while the Courant-based grid has only 340,000 cells, with cell sizes varying in between 800 m and 28 km. See Figs. 13 (overall view) and 14 (Southern Channel).

Fig. 13
figure 13

Unstructured grid for the DCSM model (overall view). (The high resolution in the open boundaries is not essential for our approach)

Fig. 14
figure 14

Unstructured grid for the DCSM model; detailed view of Channel

4.2 Model accuracy

We compare model results with tidal predictions obtained from water-level observations at 228 locations. The following computational results are considered: Waqua DCSMv6 using a uniform grid, the model presented in this paper using a uniform grid (D-Flow FM uniform) as well as the Courant-based grid (D-Flow FM Courant). Figure 15 below shows RMS (root mean square) differences (between computed and observed tidal signals) presented as arrow lengths for the three models in the Southern North Sea at each location: D-Flow FM Courant (top arrow), D-Flow FM uniform (mid arrow) and WAQUA (bottom arrow). It can be seen that, for the Dutch coastal stations, the performance of the three models is almost identical.

Fig. 15
figure 15

RMS for D–Flow FM Courant, D–Flow FM uniform and WAQUA

Fig. 16
figure 16

Water levels; computed versus observed (predicted) in the English Channel

The average of the RMS differences at the 228 locations is 5.95 cm for D-Flow FM Courant, 5.84 cm for D-Flow FM uniform and 5.72 cm for WAQUA. The numbers in Fig. 15 pertain to all 228 locations.

The bathymetry information used in both D-Flow FM computations was directly obtained from the calibrated WAQUA model. As a result, the resolution of the bathymetry data was only 1.8 km. The high resolution near the coast of the Courant-based grid could therefore not be fully exploited. The D-Flow FM Courant schematisation consistently performs better in the Southern Channel, although not many observations are available in that area to show this. The differences in RMS values are too small to qualify one model better than the other. Computed and observed (predicted) time series in the English Channel are shown in Fig 16.

4.3 Computational efficiency

We compared the performance of our new system to that of other existing systems: WAQUA (2D), TRIWAQ (3D) and Delft3D-FLOW (3D). Both TRIWAQ and Delft3D have been applied here in 2D (depth-averaged) mode. It is known that WAQUA is faster than TRIWAQ for depth-averaged applications because its solver is tuned for two-dimensions and the code does not contain 3D overhead (e.g. FORTRAN DO-loops for the vertical dimension.)

For this comparison, we could not easily use the DCSMv6 model (1.8-km grid) reported in the previous section because it was run in parallel on 20 computational nodes against D-Flow FM that can presently only run on one node. Instead, we ran the smaller DCSMv5 (~9,3-km grid) model on one node for all codes for 1 week with a 10-min time step on 19,049 grid cells. Timings are given in Table 2.

Table 2 Computation times (s) for 1 week of simulation on an Intel I7 2,66GHz quadcore

These timings were realised using one single thread. When using all eight threads of the quadcore, the timing of 84 s of D-Flow FM was reduced to 35 s. This was realised by applying OpenMP for some loops in the solver and in the matrix assembly.

For the DCSM-v6 model, the simulation times per time step are: 2.2 s for D-Flow FM on the Courant grid, 5 s for D-Flow FM on the uniform grid and 0.59 s for WAQUA on the uniform grid, respectively. The 0.59 s applies to a computation on 20 nodes of a cluster whose machines are 2.4 times slower than the Intel I7 on which the D-Flow FM runs were performed. Assuming linear speedup and correcting for this factor 2.4 amounts to 4.9 s per time step for WAQUA. So, for this large model, the performances are well comparable.

In summary, although it is always difficult to compare the computational efficiency of different software systems, it is clear from Table 2 and the DCSM-v6 model performances that the required computation times for D–Flow FM are in the same order of magnitude compared with WAQUA, TRIWAQ and Delft3D-FLOW.

5 Conclusions

The ability of unstructured grids to accurately represent complex boundaries is very useful in geometrically complicated areas. In this paper, an accurate and efficient method for unstructured grids with application to the shallow water equations has been described. This D-Flow FM method builds upon the work of Kramer and Stelling (2008). The method guarantees mass and momentum conservation, and allows drying and flooding. The accuracy is shown by comparing the computed solution to the analytical solution for the wet bed and dry bed dambreak and for linear waves.

The results of the Northwest European Continental Shelf model demonstrate the applicability of the method for tidal simulations. For 2D computations, the performance of D-Flow FM is comparable to the performance of WAQUA, TRIWAQ and Delft3D-FLOW, which are known as efficient shallow-water codes.

Grid generation is an important issue when dealing with unstructured grids. For their computational efficiency, we favour curvilinear grids aligned with main flow directions, tied together by triangles. We developed automatic generation of an unstructured network with high resolution in the shallower areas near coasts and low resolution in the deeper areas. This optimises the computational efficiency while maintaining high accuracy.

The promising results for this method show that there is enough potential to proceed with further developments, for example, extending its 1D and 3D functionality and coupling to water quality and morphology.