2.1. Governing Equations
Shallow water models based on unstructured meshes and finite volume method [
27,
28] have been well developed and widely used to simulate coastal processes, including tides, storm surges, and sediment transport in estuaries and nearshore regions [
26,
29,
30,
31,
32]. The 2D shallow water governing equations are written in matrix form as follows:
U represents the conserved physical vector;
F,
G denote the convective fluxes in the
x and
y directions, respectively;
S stands for the source term;
h is the water depth as depicted in
Figure 1a; The variables
u,
v correspond to the depth-averaged velocities in the
x and
y directions, respectively;
g is the gravitational acceleration;
,
indicate the bottom slope terms in the
x and
y directions, respectively;
,
are the bottom friction terms in the
x and
y directions, respectively, with
n representing the Manning coefficient
();
,
denote the Coriolis force terms, for the northern hemisphere
,
(
,
is the latitude).
Equation (1) can be written in compact form:
where
is the numerical flux.
2.2. Finite Volume Discretization and Flux Solving
To improve the adaptability to complex areas, this paper utilizes unstructured triangular meshes to partition the computational domain. A non-boundary triangular mesh has three nodes, three edges, and three adjacent cells (
Figure 1b). An edge has two nodes and two adjacent cells. The elevation of the bottom bed is defined at the nodes and the other physical variables (
h,
u,
v) are defined at the center of the cells.
Using the finite volume method, Equation (3) is integrated over the control volume:
Utilizing the rotational invariance of the Euler equations, the governing equations are locally rotated within each computational cell to coordinate systems that are orthogonal to the cell boundaries for solving. According to the rotational invariance of Euler equations, the discretization of cell
i can be derived as follows:
where
,
represent two consecutive time steps;
i is the cell number,
,
N is the total number of cells;
j is the cell edge number,
, and
M is the total number of cell edges;
is the area of the
i-th control volume;
T is the rotation matrix;
is the numerical flux at the
j-th edge of the
i-th cell;
is the edge length at the
j-th edge of the
i-th cell.
The solution of the numerical flux
is the core of solving Equation (5). This paper uses Roe’s approximate Riemann solver [
24] to compute the numerical fluxes at the cell interfaces:
where
,
are the fluxes at the left and right sides of the edge interface, and
,
are the eigenvalues and eigenvectors of the modified Jacobian matrix [
24], respectively. When encountering extreme situations such as the dry bed dam-break problem, entropy correction is necessary to ensure that the Roe scheme satisfies the entropy condition and produces accurate results. In addition, this paper adopts the bottom slope and wet/dry boundary treatments proposed by Yu et al. [
26], ensuring the accuracy of the spatial scheme and conserving the interface flux.
2.3. Local Time-Stepping (LTS) Scheme
The explicit time discretization scheme is usually used for nonlinear discrete systems because of its simplicity and natural parallelism. However, the explicit method is inefficient for cross-scale models due to the global time step. Therefore, we propose an improved LTS scheme that enables the cells to advance based on their local time steps.
The first-order explicit time discretization format is given by Equation (5), which can be simplified to
for
and
, where
.
For simplicity, we display the “coarse” and “fine” time increments of part of the computational domain as follows (
Figure 2a).
where
, and
, for all
.
To define the LTS scheme for the discrete system obtained from the shallow water model, we refer to Hoang et al. [
14] and further partition the cells in the local computational domain, which contain different time increments, into three classes (
Figure 2b).
The cells in this set belong to the following: —“fine” cells, —interface cells, —“coarse” cells. The cell edges in this set belong to the following: —“fine” cell edges; —interface cell edges; —“coarse” cell edges. Notably, for the cells sharing a boundary with the interface cells, the shared edges belong to the finer cells, i.e., the shared edges of and belong to , and the shared edges of and belong to . In this paper, we initially apply the algorithm to the first-order forward Euler method. Only one interface is introduced to couple the “fine” and “coarse” regions. Since the time-stepping method consists of only one prediction and one correction process, we expect the predicted value of the interface cells to affect only the “fine” cells.
The algorithm begins by hierarchizing all cells and identifying the interface layers, aiming to maximize the computational efficiency of each cell while ensuring compliance with the local CFL conditions. Then evaluate numerical flux and advance for different time increments until a complete increment ends. To obtain the advancement of intermediate time levels in the interface layers, we use the predictor proposed by Hoang et al. [
14]. Once the predicted values are obtained, we can advance the values at the intermediate time levels for the coarse grids in the interface. Finally, a correction ensures the conservation of the flux. The following section presents the specific LTS algorithm based on this method.
Based on the local CFL conditions, calculate the maximum local time step
that each cell can be satisfied [
20].
for
and
is the Courant number, typically set to 0.9;
is the distance from the center of the
i-th cell to its
j-th edge;
are the flow velocities in the normal local coordinate system to the
j-th edge of the
i-th cell;
is the water depth of the
i-th cell;
is the critical water depth, which is determined according to the actual situation. It is worth noting that when the h of a cell is less than the
, the cell is considered a dry cell, and its maximum local time step can be infinitely large. However, considering the actual situation, it is set to the maximum value of the local time step in wet cells.
The minimum global time step can be obtained from
Next, calculate the LTS level
:
is the upper limit of the manually set LTS level, intended to restrict the maximum LTS level of the model. When , the model is equivalent to the GTS model.
Then, we need to modify the LTS level of each cell and calculate the LTS level at the cell edges. Sanders [
18] proposed that when the LTS levels change significantly in the interface region, the LTS level of adjacent cells in the coarse region should be modified to a smaller value. Based on numerical experiments, it is optimal to modify the interface LTS level according to the maximum LTS level of
. At the same time, when the interface is a dry/wet front or a dynamic/static front, i.e., when the flow velocity of one side of the interface is 0 or the water depth
, the interface LTS level must also be modified. For conservatism, this paper adopts the method of Hu et al. [
20] to correct the particular fronts. After the modification is completed, the
are identified, and the LTS level
of the cell edges is calculated.
Depending on the obtained LTS level of each cell, the local time step
of the cells and the time interval of a complete cycle are calculated.
Once all the LTS parameters are calculated, the numerical fluxes and physical variables can be updated through the intermediate time steps
,
. When
is an integer, i.e.,
update edges numerical fluxes. After the physical variables of
are updated to the next time cycle with a “coarse” time step, physical variables of
have been synchronized to the first cycle. We use Taylor series expansion to predict the values of intermediate time levels in
.
Assuming that the solution at the moment
t is known, we aim to find the second-order approximation of
at the intermediate time step
, for
. Performing Taylor series expansion of
at
yields
thus, we can approximate
at by truncating Equation (17) to the second term (the first-order Taylor expansion):
which gives a truncation error of second order in time. By
we obtain a second-order approximation of
where
,
.
After obtaining the values of the intermediate time levels, the numerical fluxes and physical variables of the “fine” cells on the subcycle can be further calculated. We note, however, that when using first-order Taylor expansion, the result is the same as the linear interpolation of the forward Eulerian solution. The need for Taylor expansion becomes apparent when extended to higher orders. When
is an integer, i.e.,
update cells’ physical variables. And when
correct the physical variables of
using the interface fluxes, where
is the threshold used for updating. Referring to the treatment described by Osher and Sanders [
5] and Hoang et al. [
14], the specific correction algorithm is:
In order to minimize computation time,
does not need to be recalculated but is stored as shared information that is called upon when corrections are made. Consequently, the correction process incurs additional overhead compared to the original LTS method. We will delve into this in
Section 3.2 for a detailed analysis.
Figure 3 provides a flow chart of the numerical structure. Taking a complete cycle containing two LTS levels (
) as an example, the LTS algorithm can be summarized as the following steps (
Table 1).