# Multilayer shallow water models with

locally variable number of layers

and semi-implicit time discretization

###### Abstract

We propose an extension of the discretization approaches for multilayer shallow water models, aimed at making them more flexible and efficient for realistic applications to coastal flows. A novel discretization approach is proposed, in which the number of vertical layers and their distribution are allowed to change in different regions of the computational domain. Furthermore, semi-implicit schemes are employed for the time discretization, leading to a significant efficiency improvement for subcritical regimes. We show that, in the typical regimes in which the application of multilayer shallow water models is justified, the resulting discretization does not introduce any major spurious feature and allows again to reduce substantially the computational cost in areas with complex bathymetry. As an example of the potential of the proposed technique, an application to a sediment transport problem is presented, showing a remarkable improvement with respect to standard discretization approaches.

MOX – Modelling and Scientific Computing,

Dipartimento di Matematica, Politecnico di Milano

Via Bonardi 9, 20133 Milano, Italy

luca.bonaventura@polimi.it

IMUS & Departamento de Matemática Aplicada I.

ETS Arquitectura, Universidad de Sevilla

Avda. Reina Mercedes 2, 41012, Sevilla, Spain

edofer@us.es, jgarres@us.es, gnarbona@us.es

Keywords: Semi-implicit method, multilayer approach, depth-averaged model, mass exchange, sediment transport.

AMS Subject Classification: 35F31, 35L04, 65M06, 65N08, 76D33

## 1 Introduction

Multilayer shallow water models have been first proposed in [2] to account for the vertical structure in the simulation of large scale geophysical flows. They have been later extended and applied in [5], [4], [6]. This multilayer model was applied in [3] to study movable beds by adding an Exner equation. A different formulation, to which we will refer in this paper, was proposed in [32], which has several peculiarities with respect to previous multilayer models. The model proposed in [32] is derived from the weak form of the full Navier-Stokes system, by assuming a discontinuous profile of velocity, and the solution is obtained as a particular weak solution of the full Navier-Stokes system. The vertical velocity is computed in a postprocessing step based on the incompressibility condition, but accounting also for the mass transfer terms between the internal layers. In [22], this multilayer approach is applied to dry granular flows, for which an accurate approximation of the vertical flow structure is essential to approximate the velocity-pressure dependent viscosity.

Multilayer shallow water models can be seen as an alternative to more standard approaches for vertical discretizations, such as natural height coordinates, (also known as coordinates in the literature on numerical modelling of atmospheric and oceanic flows), employed e.g. in [10], [13], [15], terrain following coordinates (also known as coordinates in the literature), see e.g. [27], and isopycnal coordinates, see e.g. [8], [14]. Each technique has its own advantages and shortcomings, as highlighted in the discussions and reviews in [1], [10], [11], [28]. Multilayer approaches are appealing, because they share some of the advantages of coordinates, such as the absence of metric terms in the model equations, while not requiring special treatment of the lower boundary. On the other hand, multilayer approaches share one of the main disadvantages of coordinates, since they require, at least in the formulations employed so far, to use the same number of layers independently of the fluid depth. Furthermore, an implicit regularity assumption on the lower boundary is required, in order to avoid that too steeply inclined layers arise, which would contradict the fundamental hydrostatic assumption underlying the model.

In this work, we propose two concurrent strategies to make multilayer models more efficient and fully competitive with their and coordinates counterparts. On one hand, we propose a novel discretization approach, in which the number of vertical layers can vary over the computational domain. We show that, in the typical regimes in which the application of multilayer shallow water models is justified, the resulting discretization does not introduce significant errors and allows to reduce substantially the computational cost in areas with complex bathymetry. Thus making multilayer approach fully competitive with coordinate discretizations for large scale, hydrostatic flows. Furthermore, efficient semi-implicit discretizations are applied for the first time to this kind of models, allowing to achieve the same kind of computational gains that have been obtained for other vertical discretization approaches. In this paper, for simplicity, we have restricted our attention to constant density flows. An extension to variable density problems in the Boussinesq regime will be presented in a forthcoming paper.

In section 2, the equations defining the multilayer shallow water models of interest will be reviewed. In section 3, the spatial discretization is introduced in a simplified framework, showing how the number of layers can be allowed to vary over the computational domain. In section 4, some semi-implicit time discretizations are introduced for the model with a variable number of layers. Results of a number of numerical experiments are reported in section 5, showing the significant efficiency gains that can be achieved by combination of these two techniques. Some conclusions and perspectives for future work are presented in section 6.

## 2 Multilayer shallow water models

We consider the multilayer shallow water model described pictorially in Figure 1. In this approach, subdivisions of the domain are introduced in the vertical direction. We denote by the height of the layer and by the total height. Note that and that each subdomain is delimited by time dependent interfaces that are assumed to be represented by the one valued functions . For a function and for , we also define, as in [32],

Obviously, if the function is continuous,

Following [22], [32], the equations describing this multilayer approach can be written for as

(1) |

Here, we consider a fluid with constant density is the velocity in the layer is a function describing the bathymetry (which is assumed to be constant in time, so that ) and the terms model the shear stresses between the layers. Notice that the atmospheric pressure has assumed to be zero. The vertical velocity profile is recovered from the integrated incompressibility condition, obtaining for and ,

(2) |

where

and

Since we are focusing in this work mostly on subcritical flows, there is no special reason to choose discharge rather than velocity as a model variable. Therefore, we rewrite the previous system as

(3) |

where
From the derivation in [32], it follows that

(4) |

where denotes the dynamic viscosity and is an approximation of at . We then define the vertical partition of the domain, setting where, for are positive constants such that

Note that model (1) consists of equations in the unknowns

However, the mass transfer terms can be rewritten as

As a consequence, the system has unknowns, now corresponding to the total height , the velocity in each layer and the averaged vertical velocity at each internal interface . By combining the continuity equations, the system can be rewritten with equations and unknowns. The unknowns of the reduced system are the total height and the velocity in each layer, for Note that can be written, by summing the mass equations from 1 to , as

(5) |

Moreover, for the special case and , the above equation leads to

By introducing this in the mass equation we obtain

(6) |

Assuming also system (3)-(2) is finally re-written as

for Here, we have set as customary in the literature . The transport equation for a passive scalar can be coupled to the previous continuity and momentum equation, in such a way as to guarantee compatibility with the continuity equation in the sense of [26]. If denotes the average density of the passive scalar in , it verifies the following tracer equation:

where

In principle, any appropriate turbulence and friction model can be considered to define the turbulent fluxes , . Here, we have employed a parabolic turbulent viscosity profile and friction coefficients derived from a logarithmic wall law:

where is the von Karman constant, is the friction velocity and denotes the shear stress. In order to approximate this turbulence model we set for :

Trivially, . For and , standard quadratic models for bottom and wind stress are considered. We then set

where denotes the wind velocity and the friction coefficient between at the free surface. The friction coefficient is defined, according to the derivation in [19], as:

(8) |

where is the roughness length and is the length scale for the bottom layer. Under the assumption that it can be seen that

where is the tangential velocity. In practice, we identify with , the horizontal velocity of the layer closest to the bottom, in the multilayer model. The definition of given by equation (8) is deduced by using previous relation of the ratio between and (see [19]). Then, we set

in the definition of .

## 3 Spatial discretization with variable number of layers

The multilayer shallow water model (2) can be discretized in principle with any spatial discretization approach. For simplicity, we present the proposed discretization approach in the framework of simple finite volume/finite difference discretization on a staggered Cartesian mesh with C-grid staggering. A discussion of the advantages of this approach for large scale geophysical models can be found in [21]. The C-grid staggering also has the side benefit of providing a more compact structure for the system of equations that is obtained when a semi-implicit method is applied for time discretization. In order to further simplify the presentation, we only introduce the discretization for an vertical slice, even though any of the methods presented in the following can be easily generalized to the full three dimensional case. Generalization to structured and unstructured meshes can be obtained e.g. by the approaches proposed in [15] and [12], [17], [18], respectively, but higher order methods such as those of [34], [35] could also be applied. It is to be remarked that the choice of a staggered mesh is by no means necessary and that the approach proposed below to handle a variable number of layers can be easily extended to colocated meshes as well.

The solution domain will then coincide with an interval that is assumed to be subdivided into control volumes The step in the mesh is defined by and , where as usual. The discrete free surface variables are defined at integer locations corresponding to the centers of the control volumes, while the discrete velocities are defined at the half-integer locations As suggested in [26], the value of is taken to be that of the control volume located upwind of the volume edge.

The vertical number of layers employed, in the approach proposed in [32], is a discretization parameter whose choice depends on the desired accuracy in the approximation of the vertical structure of the flow. In order to make this type of model more flexible and more efficient, we propose to allow for a number of vertical layers that is not constant throughout the domain. The transition between regions with different numbers of layers is assumed to take place at the center of a control volume so that one may have different for and as a consequence, the discrete layer thickness coefficients are also defined at the half-integer locations The number of layers considered at the cell center for the purpose of the discretization of the tracer equation are defined as and the discrete layer thickness coefficients at integer locations are taken to be equal to those at the neighbouring half-integer location with larger number of layers. We will also assume that, whenever for some one has, without loss of generality, then for any there exist

(9) |

This allows a more straightforward implementation of the numerical approximation of horizontal advection in the velocity and in the tracer equation, which are the only ones involving a horizontal stencil. Finally, again for simplicity of the implementation and without great loss of generality, it is assumed that if one has as well as

A sample configuration of this kind is depicted in figure 2. Notice that a dependence of the number of layers on time could also be introduced, in order to adapt the global maximum number of layers to the flow conditions, but this has not been done in the present implementation.

## 4 Semi-implicit time discretizations

The previous definitions yield a space discretization that can be easily coupled to any time discretization that yields a stable fully discrete space time scheme. For example, a time discretization by a third order Runge Kutta scheme has been employed as a reference in the numerical tests presented in section 5. However, we will focus here on semi-implicit time discretization approaches aimed at reducing the computational cost in subcritical regime simulations.

With this goal, it is immediate to notice that the formal structure of system (2) is entirely analogous to that of the three dimensional hydrostatic system considered in [15], [16], so that we can build semi-implicit time discretizations along the same lines, i.e. by treating implicitly the velocity in the continuity equation and the free surface gradient in the momentum equation. In the following, we present first a more conventional time discretization based on the off-centered trapezoidal rule (or -method, see e.g. [31]) and then a more advanced Implicit-Explicit Additive Runge Kutta second order method (IMEX-ARK2).

### 4.1 A -method time discretization

Following [15], we first consider a semi-implicit discretization based on the -method, which can be defined for a generic ODE system as

where denotes the time step and is a implicitness parameter. If the method is unconditionally stable and the numerical diffusion introduced by the method increases when increasing . For the second order Crank-Nicolson method is obtained. In practical applications, is usually chosen just slightly larger than in order to allow for some damping of the fastest linear modes and nonlinear effects. We then proceed to describe the time discretization of system (2) based on the -method.

For control volume the continuity equation in (2) is then discretized as

(10) | |||

It can be noticed that the dependency on has been frozen at time level in order to avoid solving a nonlinear system at each timestep. As shown in [15], [34], this does not degrade the accuracy of the method, even in the case of a full second order discretization is employed. For nodes the momentum equations for in (2) are then discretized as

(11) | |||

where denotes a discretization of the mass transfer term and denotes some spatial discretization of the velocity advection term. In the present implementation, an upstream based second order scheme is employed for this term. Notice that, to define this advection term, velocity values from different layers may have to be employed, if some of the neighbouring volumes has a number of layers different from that at For example, assuming again without loss of generality and and using the notation in (9), values

will be used to compute the approximation of the velocity gradient at . Clearly, this may result in a local loss of accuracy, but the numerical results reported show that this has limited impact on the overall accuracy of the proposed method.

The discretization of the mass transfer term is defined as

where is the upwind value depending on the averaged velocity . For the tracer equation, this term appears at the center of the control volume, so that we set instead

(12) | |||||

The above formulas are to be modified appropriately for cells in which by summing all the contributions on the cell boundary with more layers that correspond to a given term on the cell boundary with less layers, according to the definitions in the previous section.

###### Remark 4.1

The time discretization of the mass transfer terms could be easily turned into an implicit one, by taking instead

(13) | |||

where now

At the bottom () and at the free surface () layers, the viscous terms are modified by the friction and drag terms at and respectively. We have then

(14) | |||

(15) | |||