The implication of the physical meaning of the primary unknown
on the discretization of Equation (
4) is the key to understanding the numerical behavior of the developed methods and is investigated in the subsequent sections. Furthermore, vector
is the nonzero divergence velocity field with components
u and
v along the
x and
y coordinates, respectively. Without the ambient current, it equals the wave group velocity. The importance of the effect of irregularity of this nondivergent field is highlighted in [
36].
3.1. The Primal-Dual Mesh and Discrete Forms
The mimetic framework for transport Equation (
4) presented here uses the language of algebraic topology [
23]. To keep things simple and concise, we will leave the formal definitions and notations aside and instead provide relevant notions and examples. In this study, simplicial meshes in 2D are employed for the discretization of the domain of interest. A computational mesh is represented as the disjoint union of cells (triangles) and is called the primal mesh. With every primal mesh one can associate a dual mesh consisting of dual cells (polygons). An archetypal example is the Delaunay triangulation (primal grid) and the corresponding Voronoi diagram (dual grid).
One of the key concepts we consider is the association of the physical quantities with various mesh objects. More precisely, within a 2D mesh, different objects can be distinguished by geometry over which quantities are integrated. These are the vertices, faces, and cells and the associated integral quantities are the discrete 0-forms, 1-forms, and 2-forms, respectively.
Using the discrete forms, distinctive discrete representations of scalars and vectors can be readily described. For instance, the discretization of a vector can be defined either on primal faces or on dual faces and its result is a discrete 1-form. It can be physically interpreted as the line integral of the vector tangential to the primal face or as the normal component of the vector integrated over the dual face. Scalar quantities evaluated within the mesh cells are represented either by discrete 0-forms or by discrete 2-forms. A discrete 0-form is a point value located at the primal or dual vertices while a discrete 2-form represents a cell average (integrated over a cell area) associated with the primal or dual cells. It is, however, stored at the vertices of the dual grid or at the vertices of the primal mesh, respectively. Note that all the discrete forms are a scalar function.
For a proper discretization of transport Equation (
4), the intrinsic meaning of the discrete unknowns is crucial. In view of
Section 2, the action density spectrum
is represented discretely as point values, viz. discrete 0-forms. Hence, the resulting discrete unknowns are stored at the vertices of the primal mesh while the discretization of Equation (
4) is accomplished using a vertex-centred method. This approach will be presented in
Section 3.5.
In the perspective of a different physical implication, Equation (
3) is invoked in order to relate the energy density spectrum
to the primary unknown. Since quantity
E is associated with an area, its discrete representation is a dual cell averaged quantity, that is, a discrete 2-form. This standpoint is particularly well suited to the vertex-centred finite volume approach. However, it requires the construction of a dual mesh, in which each cell of the dual is associated with a vertex of the primal mesh. This will be discussed in
Section 3.3.
3.2. Discrete Calculus
The first step in deriving a mimetic discretization of the transport equation is to identify the various operators and subsequently express these operators in a proper way by means of discrete calculus. The differential operators, viz. divergence, gradient, and curl, are expressed by the discrete exterior derivative operator to obtain the corresponding discrete analogs. One of the main features of the exterior derivative is that it allows for differential operators to be expressed in coordinate-independent form. Another characteristic is that it is the basis for the generalized Stokes theorem and thus provides an exact discretization of conservation properties in the resulting numerical schemes, which does not lead to the loss of information (a topological property).
Apart from attributing conservation, the governing equations also involve (material) constitutive relations. Such relations are required to link various (physical) quantities that can not be physically exact because of either inhomogeneous media (e.g., non-uniform depth and current in the context of spectral waves) or material properties, or both. In terms of discrete calculus, they are represented by, among other things, the discrete interior product and the discrete Hodge star operator and are typically subject to errors. The approximation of constitutive equations is commonly associated with some interpolation schemes requiring the use of metric (e.g., distance, area, angle).
Discrete calculus (or mimetic) methods thus provide a clear separation between the processes of exact discretization of conservation laws and approximation that takes place solely in the constitutive relations. Below we recall some relevant building blocks of discrete calculus for the discretization of Equation (
4). We notice that this overview and the detailed explanation of the application of discrete calculus hereafter should be comprehensible to wave modelers without prior knowledge. Nevertheless, the reader may consult [
23,
26] for further details on (formal) definitions, notations, theorems, and relations of discrete calculus.
The discrete calculus operators are applied to the discrete k-forms, with dimension k = 0, 1, or 2, and transform them into different discrete forms. For instance, the action of the exterior derivative, denoted by d, on a discrete k-form results in another discrete form with dimension k+1, that is,
Since the gradient of a scalar field is a vector field, this can be expressed discretely as d, whereas the discrete calculus representation of the divergence of a vector field, resulting in a scalar, is specified as d. Note that . The exterior derivative operator is commonly used in the discretization of conservation laws.
The wedge product, ∧, of two discrete forms is given by:
such that k + m ≤ n, with n as the space dimension. Depending on the dimension of the forms the wedge product is either a scalar multiplication, a scalar product ·, or a vector product ×.
The exterior derivative operator and the wedge product are topological operators (or metric-free) and does not require any approximation. In contrast, metric dependent operators include the interior product and the Hodge star operator. Such discrete operators call for an interpolation and thus involve the introduction of numerical errors. They should therefore be used in the approximation of constitutive relations [
2,
27].
The interior product contracts a discrete form by the action of a discrete vector field. Given a discrete k-form and a discrete vector field
, this discrete operator, denoted by
, gives:
Note that . The interior product can be interpreted as a multiplication with vector and is usually related to advection.
It should be noted that a 2D vector with its two components can not be associated with any mesh object. Hence, a vector itself can not be expressed in terms of discrete k-forms.
The Hodge star operator, denoted by ⋆, acts on a discrete k-form of a primal mesh and results in a discrete form of dimension n−k for a dual mesh, as follows:
For example, in 2D (n = 2), the discrete Hodge star on a point value located at the vertex of a primal mesh produces a cell averaged value for the dual cell that surround that vertex. The Hodge star is usually metric-dependent.
3.3. Discretization Based on Discrete 2-Form
In this section, the vertex-centred finite volume discretization of transport Equation (
4) is treated. This method commonly relies upon the integral form of conservation laws. From this perspective, Equation (
4) is rewritten as:
or, alternatively,
where
is the flux of energy density
E. Equation (6a) typifies a topological equation (metric-free) and Equation (6b,c) are the additional relations (metric or local dependent) to obtain a closed set of equations. Since
E is a scalar associated with an area in geographical space, Equation (6a) serves as the basis for an integral formulation.
With the aim of discretization, a 2D computational grid is defined first. In this paper, we restrict ourselves to unstructured triangular meshes, see
Figure 1a.
Both the action density field
N and the transport velocity field
are discretized at the vertices of the mesh. They are denoted by
and
, respectively, with
c an index enumerating primal vertices. Once the primal mesh has been defined, a dual mesh must be chosen. Herein, we employ the Delaunay mesh and its dual, the Voronoi tessellation. This is shown in
Figure 1b where index
c enumerates dual cells. Note that such primal and dual meshes are mutually orthogonal.
We are now in a position to derive a topology-preserving discretization of Equation (6a) using discrete forms. Since action densities are essentially point values, they are referred to as discrete 0-forms, denoted by
. Furthermore, we introduce the discrete 2-form representing the cell integrated energy density as follows:
where the integral is over dual cell
c (cf.
Figure 1b). Lastly, the integral of flux
over dual face
is given by:
with
the outward pointing normal vector to the dual face. This integral quantity is designated as the discrete 1-form and is naturally thought of as the vector component that is normal to the faces of the dual cell.
The exact discretization of Equation (6a) is then given by:
with the discrete exterior derivative, d, acting on the discrete 1-form and yielding a discrete 2-form, which is effectively a divergence of the flux. This operator behaves in all respects like its continuous counterpart implying no loss of physical information during the discretization process.
For each dual cell there is exactly one discrete equation while currently the discrete unknowns are the cell integrated energy density and the face integrated flux . The system of discrete equations becomes closed once these discrete unknowns are related to the primary unknowns at each vertex with the help of the constitutive equations.
First, a discrete relationship between the area integral of energy density in the dual cells and the action density at the primal vertices must be established. Using Equation (6c) and assuming the density of water
(discrete 2-form) is constant, a first order approximation yields:
with
the size of dual cell
c. This numerical approximation is not critical as
is usually constant. (If
varies in space then it is located at the circumcentre of primal cells and is piecewise uniform within each cell.) In terms of discrete forms, such an approximation is performed by the discrete Hodge star operator that transfers a primal value to a dual value, as follows:
Within the framework of discrete calculus [
23], the transformation of flux constitutive Equation (6b) into discrete forms is the following:
implying that the discrete interior product of the discrete 2-form and vector field
generates a discrete 1-form. Yet, we will show that most of the numerical errors enter the finite volume method due to this particular reconstruction.
To link
the dual mesh to
the primal mesh we first consider the discrete 1-form of the velocity vector
on the primal mesh. Referring to
Figure 1b, this vector is integrated along the edge (or face when viewed in 2D) connecting two vertices
c and
d, as follows:
Subsequently, this tangential velocity 1-form is used to achieve the primal discrete 1-form
with the wedge product specifying the multiplication of a vector with a scalar. Since this result is tangential to the primal edge it can be used to approximate the dual wave action flux 1-form
as:
We now elaborate on the obtained discrete formulations to construct the vertex-centered upwind finite volume scheme. In this regard, the discrete forms are considered as piecewise constant over their own mesh objects. Furthermore, for all elaborations below refer to
Figure 1b.
First, the line integral of velocity along edge
is calculated by means of the standard trapezoidal rule, as follows:
with
as the unit tangent vector in the direction of edge
and
is the edge length. The tangential velocity 1-form
is then used to determine the upwind value of wave action with respect to the intersection of the primal edge and the dual face. Accordingly, the discrete form
is evaluated as
if
, otherwise its value is
.
Next, to obtain an approximation for the discrete 1-form
on dual face
, a discrete Hodge star operator is applied. Since the primal edge is perpendicular to the dual face it is calculated as the ratio between the length of the dual face, denoted by
, and the length of the primal edge
, multiplied by
. (Recall that if space varying densities are located in dual vertices then an average of two endpoints of the dual face is taken.) Let
denote the discrete counterpart of the face integrated wave action flux
on dual face
f. Then on dual face
it becomes:
This is the simplest first order upwind approximation, which is adequate for the purpose of this study. This type of flux approximation is one of the most commonly used practices in the finite volume framework by which the distinct variables on dual faces are interpolated between nodal values [
29]. The associated structured grid variant for the action balance equation has been proposed in, e.g., [
34,
35]. It should be noted that the treated approximation becomes less accurate when the mesh orthogonality is violated. Extension to non-orthogonal meshes requires a more involved interpolation.
Substitution of approximate constitutive Equations (
8) and (
10) into topological Equation (
7) provides a semidiscrete equation for the wave action density at each vertex
c:
with the sum taken over all the faces
f of the dual cell. The resulting discrete equation is consistent with transport Equation (
5). This scheme for unstructured meshes is the same as the first order vertex-centered upwind finite volume scheme described in [
36].
Finally, the first order implicit Euler method is adopted for time discretization, since the action balance equation is known to be rather stiff [
39]. Moreover, this method is suitable for steady-state simulations.
In this work we will show that the obtained flux scheme (
10) is suboptimal in the sense that the shoaling of the waves near shore is only modeled approximately. This is the key contribution of the current paper. The next section will further elaborate on this.
3.4. Mimetic Flux Approximation
Like many of the material constitutive laws the flux constitutive relation (6b) is local in the sense that the medium is not uniform throughout the space. The bathymetry and, in turn, the wave group velocity can change rapidly, especially in the shallow water regime. Along with the coarse meshes, variations in quantities
and
N tend to be far stronger than changes in the wave action flux
across the dual cells. The application of flux approximation (
10) then becomes problematic due to separate treatment of these variables.
In the present study, the approximate Riemann solver of Roe [
40] is selected for its ability to preserve flux across discontinuities due to the abrupt transitions in bed topography. Referring to
Figure 1b, let discrete 1-form
be the integration of the wave action flux along edge
:
The approximation of tangential flux 1-form involves the computation of the Roe flux
, as follows:
with
the characteristic speed and is computed from evaluating the flux Jacobian, such that:
Finally, the discrete Hodge star turns the discrete 1-form
on primal edge
into the discrete 1-form
on dual face
, as follows:
This flux approximation can capture exactly a steady discontinuity at the dual cell faces, and can thus be regarded as mimetic. We will show in
Section 4 that this leads to a physically consistent wave action transport in case of shoaling, which is another major contribution of this paper.
3.5. Discretization Based on Discrete 0-Form
Since the wave action density
is naturally referred to as the points in geographical space, it is principally not a conserved quantity. Instead, transport Equation (
4) is rewritten in a conservation form such that a physically suitable conserved quantity can be identified. To this end, we consider a three-dimensional space-time domain
and designate
as a space-time divergence operator, that is,
. Equation (
4) is then recast as:
where
is the three-dimensional flux and is thus the primary unknown. So Equation (
13) describes the local conservation of this flux in space-time; vector field
is solenoidal. Its immediate physical implication is wave shoaling: The net flux of action along its wave ray is conserved [
41].
We proceed with the discretization. We first consider a space-time slab mesh consisting of three-dimensional triangular prisms, see
Figure 2a.
The bottom and top of each prism are the triangular cells at time levels
and
, respectively. Furthermore, the prism has three rectangular lateral faces. The discretization of Equation (
13) is associated with each of these prisms acting as control volumes. In terms of discrete forms it is then given by:
where discrete 2-form
is the integrated wave action flux on the prism surface, that is,
with
the outward-pointing normal to surface (note that dimension n = 3). This is a topological equation that produces an exact discrete 3-form from the prism surface discrete 2-form values; the summation of all the face values on the prism is zero.
Equation (
14) is discrete but not closed. Approximations must be invoked to relate the surface integrals to the nodal values of wave action. This is largely an interpolation issue which actually dictates the numerical accuracy. Although many low and high order schemes can be constructed we briefly discuss an approach similar to the one proposed in [
33]. In this approach all the necessary interpolations occur within a triangular prism, resulting in a low order method with a compact stencil. In addition, no dual meshes are involved and the method does not require grids to be of a Delaunay type. It should be noted that similar schemes for structured grids are presented in [
30,
31,
32].
Let us consider a triangular cell Δ123 as depicted in
Figure 2b for the purpose of actual implementation. Depending on the time integration, this 2D cell corresponds to either the bottom face or the top face of the prism, or in between those faces. The discrete solution at vertices 1, 2, and 3 are denoted by
,
, and
, respectively. The aim is to find an update of wave action in vertex 1. Let an incident wave ray pass through this vertex. If an action flux moves along this ray within the cell from an upstream location to the considered vertex positioned downstream, then the state in vertex 1 is determined solely by the state in the upwind vertices 2 and 3 on the opposite edge.
First, a coordinate mapping
from the computational domain to the physical domain is applied. Here
are local coordinates and
are space-time coordinates. The covariant base vectors
in three dimensions are calculated in vertex 1 as follows:
with
the position vector of vertex
i (the third coordinate is irrelevant and is thus set at zero) and
as the time step. Note that the local mapping is chosen such that
for
, and 3. Since the contravariant base vectors
are orthogonal to the covariant base vectors, they are found to be:
where
is the Jacobian of the mapping and is expressed by:
representing the volume of the prism under consideration.
Next, exact discretization of Equation (
13) is obtained by integration over the triangular prism, in the following way:
where summation convention is applied to Greek indices and,
is the wave action flux component normal to the surface of constant
. It should be noted that geometrical quantity
is continuous at cell face
constant. See [
10,
11,
12] for details.
To complete the discretization, we choose the implicit Euler scheme for the temporal discretization, as time accuracy is not critical to arriving at the steady-state solution. Furthermore, referring to
Figure 2b, the two-dimensional covariant and contravariant base vectors,
and
, respectively, are computed according to:
with
the position vector of vertex
i, and,
Lastly, the intersection point of the wave ray with velocity
through vertex 1 and the opposite edge 23 of triangle Δ123 is located if
and
. Under these conditions and using one-sided differences, discretization (
15) is approximated as follows:
where
and
are the wave action at time levels
and
, respectively. This equation is rewritten as:
and is similar to the first order upwind finite difference scheme as presented in, e.g., [
32,
33,
36].