Abstract
The shallow water equations (SWEs) model fluid flow in rivers, coasts, and tsunamis. Their nonlinearity challenges analytical solutions. We present a numerical algorithm combining the finite integration method with Chebyshev polynomial expansion (FIM-CPE) to solve one- and two-dimensional SWEs. The method transforms partial differential equations into integral equations, approximates spatial terms via Chebyshev polynomials, and uses forward differences for time discretization. Validated on stationary lakes, dam breaks, and Gaussian pulses, the scheme achieved errors below for water height and velocity, while conserving mass with volume deviations under . Comparisons showed superior shock-capturing versus finite difference methods. For two-dimensional cases, it accurately resolved wave interactions over complex topographies. Though limited to wet beds and small-scale two-dimensional problems, the method provides a robust simulation tool.
Keywords:
shallow water equations; Chebyshev polynomials; finite integration method; numerical simulation; dam break; fluid dynamics MSC:
35L05; 65M22; 65N35
1. Introduction
The shallow water equations (SWEs), first introduced by Saint-Venant [1] in 1871 to model open-channel flow, are also referred to as Saint-Venant’s equations. These equations form a mathematical model for understanding water movement in shallow regions such as rivers and beaches. They find applications in simulating various phenomena, including dam breaks, tsunamis, and floods, see [2,3,4,5] for more details. The behavior of these flows is also influenced by the bottom topography, and significant research has been dedicated to wave interactions over various topographies [6]. Study of the SWEs facilitates the analysis of how topography affects water flow.
The shallow water model is predicated on the assumption that the horizontal length scale of the flow is significantly larger than the water’s depth. This assumption permits a simplification of the governing equations by averaging the mass and momentum conservation equations over the depth, thereby eliminating the vertical dimension. The SWEs manifest as a system of partial differential equations (PDEs) that characterize shallow water behavior through its height and velocity. They are derived from the principles of mass and momentum conservation. The model comprises two main components. The first is the continuity equation, which arises from the conservation of mass and describes the temporal variation in water height, accounting for water flux into and out of a given area. The second component is the momentum equation, derived from momentum conservation principles, which governs the horizontal movement of water. This equation considers the forces acting on the water, notably gravity and pressure gradients, that influence its velocity. Assuming frictionless flow over a wet bottom topography, the one- and two-dimensional SWEs can be expressed without a friction term, similarly to the formulation in [7]. The one-dimensional SWEs are then given by
where x is the spatial variable, t is the temporal variable, h represents the water height, u is the horizontal velocity, g is the gravitational constant, and z denotes the bottom topography, as visualized in Figure 1a. The two-dimensional SWEs extend the one-dimensional model by incorporating the spatial variable y and its associated velocity component:
where x and y are the spatial variables, and u and v are the horizontal velocity components in their respective directions, as depicted in Figure 1b.
Figure 1.
Physical variables for one- and two-dimensional shallow water models.
The SWEs are a nonlinear hyperbolic system of conservation equations that include a source term for topography, making their analytical solution challenging. Consequently, numerical methods are essential for simulating water flow. A diverse set of numerical schemes has been developed to solve the SWEs. These include Finite Difference Methods (FDMs), such as those by Hudson [8] and Crowhurst and Li [9], which are often straightforward to implement but can face challenges with complex topographies and shock capturing. In contrast, Finite Volume Methods (FVMs), such as the adaptive FVM by Peng [10] and Godunov-type methods by LeVeque [11], are well-regarded for their conservation properties and robust shock-capturing capabilities. For scenarios requiring a higher precision with smooth solutions, high-order approaches like the Spectral Difference Method (SDM) by San and Kara [12] and the Summation-By-Parts Operators with Simultaneous Approximation Terms (SBP-SAT) by Lundgren [13] offer excellent accuracy, though often at the cost of increased complexity. While methods based on a fundamental solution, or Green’s function, can be powerful, a simple Green’s function is not available for the full nonlinear SWEs, necessitating the development of direct numerical methods.
A common feature of many of these methods is their reliance on differential approximation, which can be sensitive to round-off errors, especially with small spatial step sizes. To address this limitation, this paper presents a Finite Integration Method with Chebyshev Polynomial Expansion (FIM-CPE) [14], a technique that transforms the governing PDEs into integral equations, before discretization to mitigate round-off errors. Because our method operates on an integral form, it is relevant to situate it with respect to other established techniques for solving integral equations. Unlike weighted residual methods such as the Galerkin method, which require complex inner product integrations, our FIM-CPE is a collocation-based approach. It ensures that the integral equation is satisfied exactly at a discrete set of points (the zeros of Chebyshev), often leading to a more straightforward formulation. This approach, combined with the spectral accuracy of Chebyshev polynomial expansions, enables a high-order accurate algorithm, see [15,16,17] for more details. The primary objective of this work is to develop a robust numerical algorithm using FIM-CPE for the accurate simulation of one- and two-dimensional SWEs and to validate its effectiveness in resolving both smooth and discontinuous solutions across various topographies.
2. Developed FIM-CPE
This section details the construction of one- and two-dimensional Chebyshev integration matrices, which form the cornerstone of the FIM-CPE. We begin by defining Chebyshev polynomials and outlining their key properties, as established in [15].
Chebyshev polynomials are specifically chosen for this work due to their optimal properties in function approximation. They possess the minimax property, which minimizes the maximum approximation error over the interval. Furthermore, the use of Chebyshev nodes for collocation, which are the roots of the polynomials, clusters points near the boundaries. This non-uniform distribution is highly effective at mitigating Runge’s phenomenon, preventing the large oscillations that can occur at the edges of an interval when using equally spaced points with high-degree polynomials.
Definition 1
([15]). The Chebyshev polynomial of degree is defined by
Lemma 1
([15]). The following are properties of the Chebyshev polynomials:
- (i)
- The zeros of the Chebyshev polynomial for are given by
- (ii)
- The single-layer integrals of the Chebyshev polynomial are given for by
- (iii)
- The Chebyshev matrix at each zero defined in (4) is given byIts multiplicative inverse is .
For the construction of a two-dimensional Chebyshev integration matrix, it is essential to introduce the Kronecker product [18] and its properties.
Definition 2
([18]). Let and Then, the Kronecker product is defined by the block matrix as follows:
Theorem 1
([18]). The Kronecker product possesses the following characteristics:
- (i)
- Let , and denote an identity matrix. Then,
- (ii)
- Let , , , and . Then,
- (iii)
- Let and . Let be an standard unit vector with a 1 in the i-th position and 0s elsewhere, i.e., . If an permutation matrix is defined as , then .
2.1. One-Dimensional Chebyshev Integration Matrix
Next, we construct the one-dimensional Chebyshev integration matrix, which is instrumental for handling integral terms. First, let and . Consider a function f that can be approximated by the Chebyshev polynomial expansion
where are the unknown coefficients of the function f to be determined and are the Chebyshev polynomials of degree n as defined in (3). Let be nodal points discretized by the zeros of the Chebyshev polynomial , as defined in (4). Substituting each into (5), the expression can be written in matrix form as
This is compactly denoted by . Consequently, the coefficient vector can be expressed as , where is defined in Lemma 1(iii). Next, we consider the single-layer integral of f from a to , denoted by :
for , where each is defined in Lemma 1(ii). In matrix form, this becomes
This is compactly denoted by . Substituting , we obtain . We then define as the `one-dimensional Chebyshev integration matrix’. Thus, and (6) can be written in terms of discrete values as
2.2. Two-Dimensional Chebyshev Integration Matrix
Let and . The computational nodes and are defined over the domain , corresponding to the zeros of Chebyshev polynomials and along the horizontal and vertical directions, respectively. For convenience, we use a global numbering system for grid points along the x-direction (Figure 2a) and a local numbering system for the y-direction (Figure 2b).
Figure 2.
The indices of the grid points globally and locally.
Let us consider the single-layer integrals with respect to the variables x and y, denoted by and , respectively. Using (7) with a fixed constant y, we can express in the global numbering system as
For , (8) can be expressed by where is an matrix. Thus, for each varying , we form a block matrix:
This is denoted by where is the ‘two-dimensional Chebyshev integration matrix along the x-axis’. Similarly, using (7) with a fixed constant x, we have
For , (9) can be expressed by where is an matrix. Thus, for each varying , we obtain a block matrix:
This is denoted by where and is in the local numbering system. Note that the elements of and are the same values, but their positions differ in the numbering systems. Thus, we can transform and from local to global numbering systems using a permutation matrix where each is defined by
for all and . We obtain that and Therefore, , where is the `two-dimensional Chebyshev integration matrix along the y-axis’ in the global numbering system.
Next, we consider the double-layer integral with respect to both variables x and y, denoted by . By using (8) and (9), we have
For and , this can be analyzed as two types:
- Type I: If is fixed but is varied, (11) becomes , where is an element of the Chebyshev integration matrix at position . By varying all , we obtain the block matrix:This is denoted by .
- Type II: If is fixed but is varied, (11) becomes , where is an element of the Chebyshev integration matrix at position . By varying all , we obtain the block matrix:This is denoted by for the local numbering system. We can transform it globally by employing the aforementioned permutation matrix , defined in (10). Then, we obtainHence, we conclude from both types I and II that .
Remark 1.
From Theorem 1, the Chebyshev integration matrices and are commutative, namely, .
3. One-Dimensional SWEs
In this section, we propose a numerical algorithm for approximating the solutions to the one-dimensional SWEs (1) for various types of initial heights and bottom topographies, incorporating reflecting boundaries [13], using the suggested FIM-CPE from Section 2.
3.1. Numerical Algorithm for One-Dimensional SWEs
Before deriving the algorithm, let the quantity be expressed by the discharge q. The one-dimensional system (1) can then be rewritten as
for all such that and . Here, h is the water depth, u is the flow velocity in the x-direction, is the discharge, g is the acceleration due to gravity, and z is the bottom elevation. We assume that h and u are smooth real-valued functions of the temporal coordinate. This system is subject to the initial conditions:
and the reflecting boundary conditions:
The FIM-CPE for one-dimensional SWEs begins by discretizing the computational spatial domain into M nodes generated by the zeros of Chebyshev polynomial as defined in (4) in ascending order, i.e., for . Then, we divide the temporal domain by the step-size of time , which will be defined later such that for all with .
Next, we handle the temporal variable t in (12) by specifying the time step , denoted by a superscript . Since h and u are assumed to be smooth functions of time t, then is also smooth. Consequently, the functions h and q at any two consecutive times are very close. Specifically, for any two consecutive times with , we have and . This assumption is sufficient to employ linearization for nonlinear terms under the time variable t and to approximate derivatives with respect to time t.
Afterward, we apply the first-order forward difference quotient to the time derivatives in (12) and utilize a linearization method to manipulate the nonlinear terms in the second equation of (12). Hence, the system of SWEs (12) become
where and represent the numerical values at the m-th time step. Thus, we obtain . Next, we multiply (15) and (16) by to mitigate the round-off errors caused by division by a small step size. To apply the proposed FIM-CPE, we first eliminate all derivatives from (15) and (16) by taking the single-layer integral on both sides of them from a to the zero . This yields
where and are integration constants. These constants arise from the integration process for the functions and . Note that the resulting system at each time step consists of linear Volterra integral equations of the second kind. After discretization, these are transformed into a linear algebraic system, which yields a unique solution, provided the system’s matrix is non-singular, a condition consistently met in our numerical experiments.
Next, we transform (17) and (18) into matrix forms by employing the Chebyshev integration matrix. By evaluating at each zero for , we obtain the following simplified matrix equations:
where is the one-dimensional Chebyshev integration matrix described in Section 2.1, is an M-entry column vector of ones and is an M-entry column vector of zeros. Other parameters in (19) and (20) are defined as
Now, (19) and (20) have unknown variables, namely , , and , but only equations. Therefore, two additional equations are required. From the given reflecting boundary conditions (14) and , these can be written in vector form by employing the Chebyshev polynomial expansion (5) at the m-th time step:
Thus, we obtain two additional equations at time , as follows:
where and . Notably, the Chebyshev polynomials at the endpoints are and for all non-negative integers n. Finally, we construct a system of linear equations from (19)–(22), which has a total of unknowns, including , , and as follows:
Here, is the identity matrix, and are, respectively, the M-dimensional one and zero column vectors. Therefore, we can solve (23) to obtain the numerical solutions and . This process begins with the initial conditions (13) written in vector form as
Consequently, the solution is directly obtained by . The notations ⊙ and ⊘ denote the Hadamard product and division [19], respectively, signifying the element-wise product and division of two vectors.
However, the stability of this scheme requires careful consideration. For the obtained approximations to converge to their analytical solution on a refined grid, the Courant–Friedrichs–Lewy (CFL) condition must be satisfied [10]. This condition mandates setting the time step as
where CFL represents the Courant number. To ensure stability, the CFL number must be less than one, which implies that the distance traveled by the wave within a single time step must not exceed the distance between adjacent nodes or cells in the mesh. This prevents uncontrolled water movement and ensures that the numerical solution accurately captures the wave propagation without aliasing across cells. Since dynamically varies throughout the approximation process, directly determining the precise number of steps required to reach a desired final time T is not straightforward. Therefore, the simulation proceeds by selecting the time step at each iteration such that the accumulated time t does not exceed T, potentially stopping exactly at T in the final step.
Corollary 1.
At the final iteration, the obtained solutions and can be approximately expressed corresponding to the functions and , respectively, at the terminal time T over , by using (5), i.e.,
where and is defined in Lemma 1(iii).
For computational convenience, we summarize all the procedures mentioned above into the pseudocode for finding numerical solutions and at the terminal time T of the one-dimensional SWEs (1) by using FIM-CPE, as provided in Algorithm 1.
| Algorithm 1 Numerical algorithm for solving the one-dimensional SWEs via FIM-CPE |
| Input: a, b, M, T, , , , , and CFL.
Output: The numerical solutions and at time T.
|
3.2. Discussion on Theoretical Foundations for One-Dimensional SWEs
A complete theoretical proof of stability, convergence, and accuracy for the proposed FIM-CPE scheme is a substantial undertaking and beyond the scope of this application-focused paper. However, the scheme’s design is founded on well-established numerical principles that ensure its robustness, which is confirmed by the numerical experiments presented.
- Stability: The stability of the numerical algorithm is primarily governed by the time-stepping component. For the explicit forward difference scheme used for temporal discretization, stability is ensured by adhering to the CFL condition. This condition, standard for hyperbolic systems like the SWEs, requires the time step to be dynamically adjusted to prevent numerical instabilities, ensuring that waves do not travel more than one spatial grid cell per time step. Our algorithm strictly implements this condition in every iteration to maintain a stable simulation.
- Accuracy and Convergence: The high accuracy of the FIM-CPE method stems from its two core components. First, the use of Chebyshev polynomial expansion for spatial approximation provides spectral accuracy for smooth functions, leading to very low approximation errors. Second, by transforming the partial differential equations into integral equations, the method avoids direct numerical differentiation and is thus less sensitive to the round-off errors that can affect traditional finite difference methods. For a well-posed problem, a stable and consistent scheme will converge. The method’s demonstrated stability and high accuracy provide strong evidence for its convergence, while a formal proof remains a direction for future research.
3.3. Numerical Simulations for One-Dimensional SWEs
In this section, we investigate the efficiency, accuracy, and stability of our proposed numerical Algorithm 1 through four one-dimensional SWE examples. To quantify accuracy, the mean absolute error (MAE) is defined by
where and f are exact and numerical solutions, respectively. These examples, covering different types of wet-bed bottom topography, include a lake at rest, dam break flows (an important type of disaster), and Gaussian pulse propagation. Extensive research has been dedicated to understanding and mitigating dam break disasters using various approaches, from small- and large-scale experiments to numerical modeling. Therefore, the experimental examples chosen for verification of the scheme’s accuracy include dam break problems with both flat and non-flat bottoms, as well as a lake at rest. For all data processing and analysis in this study, we utilized an AMD Ryzen 7 4800HS CPU with 16.0 GB of RAM and MATLAB software (R2025a).
Example 1
(Lake at rest [13]). The lake at rest problem is a simple and well-defined scenario, where the water surface height and horizontal velocity are both constant over time and space. Consequently, it serves as a good benchmark for testing the accuracy of numerical schemes for solving SWEs. The computational domain is . The initial velocity is zero. The bottom topography is defined by
and the initial water height is .
In this computation, we simulated grid points over a long period of s. Through implementation with values ranging from to , we found that provided the best accuracy for our algorithm. For this example and consistently for the other examples, we employed our proposed Algorithm 1 with . The result, shown in Figure 3, demonstrated stability over time with a run time of s. At the final time, the MAEs for water height h and velocity u were and , respectively. To evaluate mass conservation, we computed the total volume using
where are nodal points, are the water heights at each time from the simulation, and M is the number of nodal points. Experimental results show that the total water volume varied minimally, not exceeding throughout the simulation period. Similar results are observed for Examples 2–4.
Figure 3.
Water height at time s in Example 1.
Example 2
(Gaussian Pulse [13]). This example aims to demonstrate our method’s advantage in handling smooth solutions with reflecting boundary conditions over a flat bottom [13]. The initial Gaussian pulse for water height is defined by
We simulated this experiment with grid points. The results from our numerical Algorithm 1 are shown in Figure 4. The wave consistently remained smooth. Initially, it separated into left and right propagating components, which then reflected off the walls and coalesced into a hump. This cycle continued over time, with the height gradually decreasing until the velocity approached zero, ultimately leading to a constant wave. This final state can be referred to as a steady state. Therefore, we observed that at time , the experiment reached a steady state within a tolerance of and with a run time of min.
Figure 4.
Water height at various times T in Example 2.
Example 3
(Dam break over flat bottom [20]). This dam break problem is a fundamental study based on the SWEs, characterized by a flat topography where . The computational domain is . The initial velocity is zero and the initial water height is
This setup represents a discontinuity at , acting as a barrier separating two different initial water heights. The exact solution to this problem was provided by Stoker [20], specifically,
and
where , and . For a more in-depth analysis of how the value S was obtained, readers are referred to Stoker [20].
The numerical results obtained from our Algorithm 1 demonstrated good accuracy when compared with this exact solution. Comparisons, measured by the MAE from (25) at the final time T, are presented in Table 1 for different grid point values M. The error in Table 1 does not show a significant reduction as the grid is refined because the initial water height was discontinuous at . This discontinuity hindered the accurate capturing of the solution around the shock. Despite this, we further compared our algorithm’s approximate solutions with those obtained by the FDM [8] for various nodal points M, as shown in Table 1. It is evident that for the same number of nodes M, our scheme yielded solutions closer to the analytical solutions than the FDM. Additionally, increasing the number of nodes M generally led to increasingly accurate solutions. The computational times are also indicated in Table 1.
Table 1.
Comparisons of exact and numerical solutions at for Example 3.
Furthermore, we visualized the solutions for both water height h and velocity u obtained using our algorithm with at , as depicted in Figure 5. From Figure 5, the initial water height broke at as time progressed. Our scheme effectively captured the shock propagation and showed good agreement with the exact solution.
Figure 5.
Graphical solutions with at time in Example 3.
Example 4
(Dam break over a bump [11]). This problem, discussed by LeVeque [11], involves a non-flat, smooth bottom topography, implying that for certain values of x. This test case features a smooth bump defined by
The computational domain for this problem is . The initial velocity is zero and the initial water height is defined in relation to the bump as
This problem describes an initial water height shaped like a pulse that subsequently breaks into two waves propagating in opposite directions. The square-wave pulse moving towards the right passes through the bump in the riverbed, undergoing partial reflection and causing a disturbance behind the bump. The other wave reflects off the left wall.
In the experiment, our presented numerical Algorithm 1 was applied to find the approximate solutions for and . Using grid points, we simulated the behavior of wave propagation at different times , as depicted in Figure 6 for water height and velocity. The run time for this simulation was s. We observed that at the initial time, the wave pulse moved to the right, with around . After the wave pulse encountered the bump, it was partially reflected, leading to a decrease in as it continued to move forward. Behind the bump, the wave pulse continued to decrease. The wave pulse also moved towards the left, with around . After reaching the left wall, its height increased at and then returned to its previous level . The behavior of the left wave was analogous to the right wave when passing the bump. This problem has also been studied using several methods by Hudson [8]. Our algorithm produced the same right wave behavior as those methods, given the reflection from the left wall.
Figure 6.
Graphical solutions for Example 4 (Dam break over a bump) with at different times T. (a) Water height . The solid red line is the water surface, the dashed black line is the initial water surface and the gray area represents the bottom topography . (b) Water velocity . The solid red line is the water velocity and the dashed blue line indicates the zero-velocity axis.
3.4. Convergence Analysis
To numerically demonstrate the convergence of the proposed FIM-CPE scheme, a study was conducted to analyze the error decay as the spatial resolution increased. The dam break over a flat bottom (Example 3) was selected as the benchmark case for this analysis, due to the availability of an exact analytical solution.
The simulation was performed at a final time of s with an increasing number of Chebyshev nodes (. The MAE for the water height (), as defined in (25), was calculated for each case. The results, presented in Table 2 and Figure 7, clearly illustrate the convergence of the solution.
Table 2.
Convergence study for the dam break problem at s.
Figure 7.
Log–log plot of the mean absolute error for water height () versus the number of nodes (M) for the dam break problem. The plot clearly shows the linear trend on a logarithmic scale, which demonstrates the convergence of the numerical scheme as the spatial resolution increases.
The numerical order of convergence () was calculated using the formula
where and are the errors corresponding to node counts and , respectively. The order is approximately –. While spectral methods achieve higher orders for smooth problems, this result is consistent with expectations for problems involving a shock, where the overall accuracy is limited by the discontinuity.
4. Two-Dimensional SWEs
This section presents a numerical method based on the FIM-CPE to solve the two-dimensional SWEs (2) with reflecting boundary conditions, as described in [13].
4.1. Numerical Algorithm for Two-Dimensional SWEs
Before deriving the algorithm, let and be the discharges. Then, (2) can be rewritten as
for all , where and . We assume that h, u and v are smooth real-valued functions of the temporal coordinate. This system is subject to the initial conditions
for , where is the spatial domain. Let be the boundary of the domain . The reflecting boundary conditions [13] at any time are given by
The FIM-CPE for two-dimensional SWEs employs procedures similar to those used for one-dimensional SWEs. Initially, the computational domain is discretized into nodes. This is achieved by utilizing the zeros of the Chebyshev polynomials and , as defined in (4), which denote them by and , respectively. The nodes are globally numbered and obtained from elements in the set of Cartesian product , i.e., for . Concurrently, the temporal domain is divided into discrete time steps for all , with . The time step will be defined later.
Next, the time derivatives in the two-dimensional SWEs (26) are approximated using the first-order forward difference quotient. To manage the nonlinear terms effectively, a linearization method is applied. Consequently, the equations in (26) are transformed into
where , and represent the numerical values at the m-th time step. Then, the water velocities are obtained by and , respectively. To eliminate all derivatives, a double-layer integral with respect to the variables x and y is applied to both sides of the above system at time . The integration is performed from a to and from c to , respectively, yielding
where and for are arbitrary functions introduced during the integration process. To handle these unknown functions, Chebyshev interpolation is used to approximate them by
where and are unknown coefficients that will be determined according to the specified boundary conditions (28). Note that the total number of these unknown coefficients is .
Subsequently, each of the Equations (29)–(31) is rearranged into matrix form using the Chebyshev integration matrix. By substituting all zeros into these equations, the following matrix equations are obtained:
where and are the two-dimensional Chebyshev integration matrices along the x-axis and y-axis, respectively, described in Section 2.2. Other parameters in the system (34)–(36) are defined by
From (32) and (33), we have their coefficient matrices as
and
Since the integral system (29)–(31) incorporates the additional unknown coefficients denoted as and , it is necessary to generate an extra equations, derived from the rectangular boundary conditions given by (28). For the boundary condition on , this approach involves formulating M equations from its left boundary, N equations from its lower boundary, equations from its right boundary, and equations from its upper boundary. Specifically, over the right and upper boundaries of , these additional equations are constructed at the zero points of Chebyshev polynomials that are indexed in odd positions, as depicted in Figure 8a.
Figure 8.
The selected computational nodes for the 2D problem. The blue asterisks (*) represent the interior nodes within the domain . The colored dots represent the nodes on the boundary where boundary conditions are applied: orange for the bottom, green for the left, red for the top, and cyan for the right. (a) The specific set of boundary points used to enforce conditions for the discharge . (b) The complementary set of boundary points used for the discharge .
Conversely, the boundary condition on requires constructing M equations from its right boundary, N equations from its upper boundary, equations from its left boundary, and equations from its lower boundary. In particular, over the left and lower boundaries of , these equations are constructed at the zero points of Chebyshev polynomials that are indexed in even positions, as depicted in Figure 8b.
Afterward, these specified boundary conditions (28) are converted into matrix form using Theorem 2, which extends the one-dimensional Chebyshev polynomial expansion (5) to two dimensions, as described below.
Theorem 2.
Let and be sets of zeros of the Chebyshev polynomials and , respectively. If f is a function of x and y on , it can be approximated at any or by the Chebyshev polynomial expansion in the matrix form as
where , , and are the and Chebyshev matrices, respectively, defined in Lemma 1(iii) and with elements ordered according to a global numbering system for the grid points belong to the set of Cartesian product . Other parameters are as defined in Section 2.2.
Proof of Theorem 2.
We consider a function expressed as a Chebyshev polynomial expansion (5). By holding one variable constant while varying the other, the proof is structured into two scenarios:
- Scenario I: When y is held constant and x is the free variable, we havewhere , is an Chebyshev matrix as defined in Lemma 1(iii) and . Substituting the zeros of the Chebyshev polynomial , i.e., , into (39) yieldsThis simplifies to , where is an identity matrix.
- Scenario II: When x is held constant and y is the free variable, we havewhere , is an Chebyshev matrix as defined in Lemma 1(iii) and . Substituting the zeros of the Chebyshev polynomial , i.e., , into (40) yieldsThis simplifies to , where is an identity matrix and is a permutation matrix defined by (10).
Hence, the proof is complete. □
Utilizing Theorem 2 and the boundary conditions (28) at time , we directly derive four boundary conditions (41)–(44) in matrix form by substituting for f in Theorem 2 and evaluating at the respective boundary points, as follows:
- The left and lower boundary conditions for at time are obtained by replacing and into (37) and (38), respectively:where , , and .
- The right and upper boundary conditions for at time are obtained by replacing and into (37) and (38), respectively:where with M entries, , with N entries and .
Next, we address the boundary conditions for the remaining sides involving and . To handle boundary conditions that depend on the parity of index positions (odd or even), we introduce an extraction matrix. An extraction matrix multiplies a column vector to yield a new column vector composed of selected entries from the original. In this work, we define two types of extraction matrices—odd and even—in Definition 3, which select entries from corresponding positions in a column vector.
Definition 3.
The odd extraction matrix, denoted by , is defined as
Moreover, the even extraction matrix, denoted by , is defined as
Building upon Definition 3, Theorem 2 and the boundary conditions (28) at time , the remaining boundary conditions for and are formulated as follows:
- The right and upper boundary conditions for at time over the odd position corresponding to and zeros in X and Y, respectively, are obtained by substituting and into (37) and (38), respectively, and left-multiplying by from (45):where is an odd extraction, , is an odd extraction, and .
- The left and lower boundary conditions for at time over the even positions corresponding to and zeros in X and Y, respectively, are obtained by replacing and into (37) and (38), respectively, and left-multiplying by from (46):where is an even extraction, , is an even extraction, and .
Finally, the systems (34–36) and boundary conditions (41)–(44) and (47)–(50) are combined to form a system of linear equations. It comprises a total of unknowns, namely , , , , , , , and . The resulting system is
where , and for . This system (51) is subsequently solved to obtain the approximate solutions , and . The solution process commences with the initial conditions (27) expressed in vector form:
Therefore, the solutions for velocity components and are directly obtained by and , respectively, where ⊘ is the Hadamard division. Furthermore, the stability of this scheme, similarly to that discussed in Section 3, is crucial. For the approximations obtained through this scheme to converge to their analytical solution on a refined grid, the Courant–Friedrichs–Lewy (CFL) condition, as presented in [10],
must be satisfied. Here, CFL denotes the Courant number. For stability, the CFL number must be less than unity, consistent with the one-dimensional case detailed in Section 3. For computational clarity, the algorithm’s workflow is summarized in Algorithm 2.
| Algorithm 2 Numerical algorithm for solving the two-dimensional SWEs via FIM-CPE |
| Input: a, b, c, d, M, N, T, , , , , , and CFL. Output: The numerical solutions , and at time T.
|
4.2. Discussion on Theoretical Foundations for Two-Dimensional SWEs
The theoretical principles supporting the one-dimensional algorithm also apply to the two-dimensional case, though the analysis becomes significantly more complex.
- Stability: Stability in the two-dimensional scheme is also maintained by enforcing the CFL condition, which is adapted to account for velocities and grid spacing in both spatial dimensions, as defined in Algorithm 2. A formal stability proof would require analyzing the spectral properties of the much larger amplification matrix, which involves the Kronecker products of the integration matrices and .
- Accuracy and Convergence: The high accuracy of the two-dimensional scheme is derived from the use of two-dimensional Chebyshev polynomial expansions. The finite integration approach continues to minimize round-off errors. As with the one-dimensional case, the combination of a stable and consistent scheme supports convergence. A rigorous mathematical proof for the two-dimensional nonlinear system is a complex topic and reserved for future theoretical investigation.
4.3. Numerical Simulations for Two-Dimensional SWEs
In this section, we assess the efficacy and accuracy of the proposed numerical algorithm using two distinct examples of two-dimensional SWEs, conducted under wet-bed conditions and varying bottom topographies. Specifically, these examples include the ’lake at rest’ problem with a non-flat bottom and the ’Gaussian-shaped peak’ problem with a flat bottom. All simulations and data analysis were conducted using MATLAB software on a system equipped with an AMD Ryzen 7 4800HS CPU and 16.0 GB of RAM.
Example 5
(Lake at rest [7]). The lake at rest problem serves as a standard benchmark for validating numerical schemes for two-dimensional shallow water equations, see Figure 9 for the analytical solution. The computational domain is . The bottom topography is defined by
and the initial water height is with an initial zero velocity.
Figure 9.
Analytical solutions for Example 6.
The simulation was conducted on grid points with an end time of s as the end time. The simulation results exhibited temporal stability. At the final time, the mean absolute errors (MAEs) for h, u and v were , and , respectively. To evaluate mass conservation, the total volume was computed using
where and are nodal points and are the number of nodal points along the x-axis and y-axis, respectively. are the water heights at each time step from the simulation. The experimental results indicate that the total water volume exhibited minimal variation, remaining within throughout the simulation period. Similar results regarding mass conservation were observed for Example 6.
Example 6
(Gaussian pulse 2D [12]). A two-dimensional Gaussian-shaped peak was applied as the initial condition for the water depth, with zero initial velocity and flat topography, i.e., . It is defined by
The computational domain was . Simulations for the time interval are presented in Figure 10. The wave propagated outward from the center and all boundaries induced reflections, followed by further reflections at the corners. Consequently, the top-view morphology evolved from an initial circular shape to a symmetrical configuration exhibiting four corners. Furthermore, a gradual decrease in average water height was observed over time. The temporal evolution of the water depth, , demonstrated consistency with observations from existing numerical schemes [13].
Figure 10.
Water height at various times T for Example 6.
To provide a consolidated overview of the algorithm’s performance across all test cases, the key findings are summarized in Table 3.
Table 3.
Summary of key findings from numerical simulations.
5. Conclusions
This study presents a robust numerical algorithm for solving one- and two-dimensional SWEs by applying the FIM-CPE. The method transforms the governing PDEs into integral equations, approximates spatial variables using Chebyshev polynomials, and utilizes forward differences for temporal discretization, with stability ensured by the Courant–Friedrichs–Lewy condition. The algorithm’s efficacy was rigorously validated through several benchmark cases.
For one-dimensional SWEs, the scheme demonstrated high precision in the lake at rest problem, with MAEs for water height and velocity below . In the dam-break scenario over a flat bottom, the FIM-CPE produced more accurate results compared to the traditional FDM and effectively captured shock propagation. Furthermore, the algorithm accurately simulated wave interactions over non-flat topographies and handled smooth solutions, as shown in the dam break over a bump and Gaussian pulse examples, respectively.
The method was extended to two-dimensional SWEs, where it successfully resolved wave interactions over complex topographies and accurately simulated phenomena such as a Gaussian-shaped peak. A key strength of the proposed scheme is its excellent mass conservation, with total volume deviations remaining under across all simulations. While the proposed FIM-CPE scheme has proven to be a highly accurate and reliable simulation tool, we acknowledge its current limitations. The algorithm is presently formulated for wet-bed conditions and has been validated on small-scale problems, without considering frictional effects. Future work will focus on extending the algorithm’s capabilities. Key directions for development include incorporating wet–dry front tracking algorithms, including bed friction and Coriolis terms, and scaling the method for application to larger, real-world hydraulic and coastal engineering problems.
Author Contributions
Conceptualization, A.D., R.B., L.A. and P.S.; methodology, A.D. and L.A.; software, A.D., L.A. and P.S.; validation, A.D. and R.B. formal analysis, A.D., R.B. and L.A.; investigation, A.D., R.B. and L.A.; writing—original draft preparation, A.D., L.A. and P.S.; writing—review and editing, R.B.; visualization, A.D., L.A. and P.S.; supervision, R.B.; project administration, L.A.; funding acquisition, A.D. and R.B. All authors have read and agreed to the published version of the manuscript.
Funding
This research received no external funding.
Data Availability Statement
The original contributions presented in this study are included in the article. Further inquiries can be directed to the corresponding authors.
Acknowledgments
This research project was supported by the Second Century Fund (C2F), Chulalongkorn University.
Conflicts of Interest
The authors declare no conflicts of interest.
Abbreviations
The following abbreviations are used in this manuscript:
| CFL | Courant–Friedrichs–Lewy |
| FDM | finite difference method |
| FIM-CPE | finite integration method with Chebyshev polynomial expansion |
| FVM | finite volume method |
| MAE | mean average error |
| PDE | partial differential equation |
| SBP-SAT | summation-by-parts operators with simultaneous approximation terms |
| SDM | spectral difference method |
| SWE | shallow water equation |
References
- De St Venant, B. Theorie du mouvement non-permanent des eaux avec application aux crues des rivers et a l’introduntion des Marees dans leur lit. Comptes Rendus Acad. Sci. 1871, 73, 148–154. [Google Scholar]
- Valiani, A.; Caleffi, V.; Zanni, A. Case study: Malpasset dam-break simulation using a two-dimensional finite volume method. J. Hydraul. Eng. 2002, 128, 460–472. [Google Scholar] [CrossRef]
- George, D.L. Finite Volume Methods and Adaptive Refinement for Tsunami Propagation and Inundation; University of Washington: Seattle, WA, USA, 2006. [Google Scholar]
- Mignot, E.; Paquier, A.; Haider, S. Modeling floods in a dense urban area using 2D shallow water equations. J. Hydrol. 2006, 327, 186–199. [Google Scholar] [CrossRef]
- Gunawan, H.P. Numerical Simulation of Shallow Water Equations and Related Models. Ph.D. Thesis, Université Paris-Est, Champs-sur-Marne, France, 2015. [Google Scholar]
- Sarkar, B.; De, S. Oblique wave diffraction by a bottom-standing thick barrier and a pair of partially immersed barriers. J. Offshore Mech. Arct. Eng. 2023, 145, 010905. [Google Scholar] [CrossRef]
- Mekchay, K.; Pongsanguansin, T.; Maleewong, M. Numerical Methods Based on Discontinuous Galerkin and Finite Volume Methods for Shallow Water Model and Applications. Ph.D. Thesis, Chulalongkorn University, Bangkok, Thailand, 2016. [Google Scholar]
- Hudson, J. Numerical Techniques for the Shallow Water Equations; University of Reading, Department of Mathematics: Reading, UK, 1999. [Google Scholar]
- Crowhurst, P.; Li, Z. Numerical solutions of one-dimensional shallow water equations. In Proceedings of the 2013 UKSim 15th International Conference on Computer Modelling and Simulation, Cambridge, UK, 10–12 April 2013; IEEE: Piscataway, NJ, USA, 2013; pp. 55–60. [Google Scholar]
- Peng, S.H. 1D and 2D Numerical Modeling for Solving Dam-Break Flow Problems Using Finite Volume Method. J. Appl. Math. 2012, 2012, 489269. [Google Scholar] [CrossRef]
- LeVeque, R.J. Balancing source terms and flux gradients in high-resolution Godunov methods: The quasi-steady wave-propagation algorithm. J. Comput. Phys. 1998, 146, 346–365. [Google Scholar] [CrossRef]
- San, O.; Kara, K. High-order accurate spectral difference method for shallow water equations. Int. J. Res. Rev. Appl. Sci. 2011, 6, 41–54. [Google Scholar]
- Lundgren, L. Efficient Numerical Methods for the Shallow Water Equations. Master’s Thesis, Uppsala University, Uppsala, Sweden, 2018. [Google Scholar]
- Boonklurb, R.; Duangpan, A.; Treeyaprasert, T. Modified finite integration method using Chebyshev polynomial for solving linear differential equations. J. Numer. Anal. Ind. Appl. Math. 2018, 12, 1–19. [Google Scholar]
- Boonklurb, R.; Duangpan, A. Finite Integration Method Using Chebyshev Expansion for Solving Nonlinear Poisson Equations on Irregular Domains. J. Numer. Anal. Ind. Appl. Math. 2020, 14, 7–24. [Google Scholar]
- Boonklurb, R.; Duangpan, A.; Saengsiritongchai, A. Finite integration method via Chebyshev polynomial expansion for solving 2-D linear time-dependent and linear space-fractional differential equations. Thai J. Math. 2020, 103–131. [Google Scholar]
- Duangpan, A.; Boonklurb, R. Numerical solution of time-fractional Benjamin-Bona-Mahony-Burgers equation via finite integration method by using Chebyshev expansion. Songklanakarin J. Sci. Technol. 2021, 43. [Google Scholar]
- Zhang, H.; Ding, F. On the Kronecker Products and Their Applications. J. Appl. Math. 2013, 2013, 296185. [Google Scholar] [CrossRef]
- Cyganek, B. Object Detection and Recognition in Digital Images: Theory and Practice; John Wiley & Sons: Hoboken, NJ, USA, 2013. [Google Scholar]
- Stoker, J.J. Water Waves: The Mathematical Theory with Applications; Courier Dover Publications: New York, NY, USA, 2019. [Google Scholar]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).