Next Article in Journal
Robust JND-Guided Video Watermarking via Adaptive Block Selection and Temporal Redundancy
Previous Article in Journal
Optimal Linear Codes and Their Hulls
Previous Article in Special Issue
A Randomized Q-OR Krylov Subspace Method for Solving Nonsymmetric Linear Systems
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Finite Integration Method with Chebyshev Expansion for Shallow Water Equations over Variable Topography

by
Ampol Duangpan
1,
Ratinan Boonklurb
1,*,†,
Lalita Apisornpanich
1 and
Phiraphat Sutthimat
2,*,†
1
Department of Mathematics and Computer Science, Faculty of Science, Chulalongkorn University, Bangkok 10330, Thailand
2
Department of Mathematics, Faculty of Science, Kasetsart University, Bangkok 10900, Thailand
*
Authors to whom correspondence should be addressed.
These authors contributed equally to this work.
Mathematics 2025, 13(15), 2492; https://doi.org/10.3390/math13152492
Submission received: 6 July 2025 / Revised: 27 July 2025 / Accepted: 31 July 2025 / Published: 2 August 2025
(This article belongs to the Special Issue Numerical Analysis and Scientific Computing for Applied Mathematics)

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 10 12 for water height and velocity, while conserving mass with volume deviations under 10 5 . 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.

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
h t + x ( h u ) = 0 , t ( h u ) + x h u 2 + g h 2 2 = g h z x ,
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:
h t + x ( h u ) + y ( h v ) = 0 , t ( h u ) + x h u 2 + g h 2 2 + y ( h u v ) = g h z x , t ( h v ) + x ( h u v ) + y h v 2 + g h 2 2 = g h z y ,
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.
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 n 0 is defined by
R n ( x ) = cos n arccos 2 x a b b a f o r x [ a , b ] .
Lemma 1
([15]). The following are properties of the Chebyshev polynomials:
(i)
The zeros of the Chebyshev polynomial R n ( x ) for x [ a , b ] are given by
x k = 1 2 ( b a ) cos 2 k 1 2 n π + a + b , k { 1 , 2 , 3 , , n } .
(ii)
The single-layer integrals of the Chebyshev polynomial R n ( x ) are given for n 2 by
R ¯ 0 ( x ) = a x R 0 ( ξ ) d ξ = x a , R ¯ 1 ( x ) = a x R 1 ( ξ ) d ξ = ( x a ) ( x b ) b a , R ¯ n ( x ) = a x R n ( ξ ) d ξ = b a 4 R n + 1 ( x ) n + 1 R n 1 ( x ) n 1 2 ( 1 ) n n 2 1 .
(iii)
The Chebyshev matrix R at each zero x k defined in (4) is given by
R = R 0 ( x 1 ) R 1 ( x 1 ) R n 1 ( x 1 ) R 0 ( x 2 ) R 1 ( x 2 ) R n 1 ( x 2 ) R 0 ( x n ) R 1 ( x n ) R n 1 ( x n ) .
Its multiplicative inverse is R 1 = 1 n diag { 1 , 2 , 2 , , 2 } R .
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 A = [ a i j ] R m × n and B = [ b i j ] R p × q . Then, the Kronecker product A B R m p × n q is defined by the block matrix as follows:
A B = a 11 B a 1 n B a m 1 B a m n B .
Theorem 1
([18]). The Kronecker product possesses the following characteristics:
(i)
Let A R m × n , B R p × q and I k denote an k × k identity matrix. Then,
A B = ( A I p ) ( I m B ) = ( I m B ) ( A I q ) .
(ii)
Let A R m × n , B R p × q , C R n × r , and D R q × s . Then,
( A B ) ( C D ) = ( AC ) ( BD ) .
(iii)
Let A R m × m and B R n × n . Let e i be an m × 1 standard unit vector with a 1 in the i-th position and 0s elsewhere, i.e., e i = [ 0 , , 0 , 1 , 0 , , 0 ] . If an m n × m n permutation matrix is defined as P = [ I n e 1 ,   I n e 2 , ,   I n e m ] , then P ( A B ) P = B A .

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 M N and a < b R . Consider a function f that can be approximated by the Chebyshev polynomial expansion
f ( x ) = n = 0 M 1 c f , n R n ( x ) for x [ a , b ] ,
where c f , n are the unknown coefficients of the function f to be determined and R n ( x ) are the Chebyshev polynomials of degree n as defined in (3). Let x 1 < x 2 < < x M [ a , b ] be nodal points discretized by the zeros of the Chebyshev polynomial R M ( x ) , as defined in (4). Substituting each x k into (5), the expression can be written in matrix form as
f ( x 1 ) f ( x 2 ) f ( x M ) = R 0 ( x 1 ) R 1 ( x 1 ) R M 1 ( x 1 ) R 0 ( x 2 ) R 1 ( x 2 ) R M 1 ( x 2 ) R 0 ( x M ) R 1 ( x M ) R M 1 ( x M ) c f , 0 c f , 1 c f , M 1 .
This is compactly denoted by f = Rc f . Consequently, the coefficient vector c f can be expressed as c f = R 1 f , where R 1 is defined in Lemma 1(iii). Next, we consider the single-layer integral of f from a to x k , denoted by F ( x k ) :
F ( x k ) = a x k f ( ξ ) d ξ = n = 0 M 1 c f , n a x k R n ( ξ ) d ξ = n = 0 M 1 c f , n R ¯ n ( x k ) ,
for k { 1 , 2 , 3 , , M } , where each R ¯ n ( x k ) is defined in Lemma 1(ii). In matrix form, this becomes
F ( x 1 ) F ( x 2 ) F ( x M ) = R ¯ 0 ( x 1 ) R ¯ 1 ( x 1 ) R ¯ M 1 ( x 1 ) R ¯ 0 ( x 2 ) R ¯ 1 ( x 2 ) R ¯ M 1 ( x 2 ) R ¯ 0 ( x M ) R ¯ 1 ( x M ) R ¯ M 1 ( x M ) c f , 0 c f , 1 c f , M 1 .
This is compactly denoted by F = R ¯ c f . Substituting c f = R 1 f , we obtain F = R ¯ R 1 f . We then define A : = R ¯ R 1 = [ a k i ] M × M as the `one-dimensional Chebyshev integration matrix’. Thus, F = Af and (6) can be written in terms of discrete values as
F ( x k ) = a x k f ( ξ ) d ξ = i = 1 M a k i f ( x i ) .

2.2. Two-Dimensional Chebyshev Integration Matrix

Let M , N N and a , b , c , d R . The computational nodes x k and y k are defined over the domain [ a , b ] × [ c , d ] , corresponding to the zeros of Chebyshev polynomials R M ( x ) and R N ( y ) 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).
Let us consider the single-layer integrals with respect to the variables x and y, denoted by F x ( x , y ) and F y ( x , y ) , respectively. Using (7) with a fixed constant y, we can express F x ( x k , y ) in the global numbering system as
F x ( x k , y ) = a x k f ( ξ , y ) d ξ = i = 1 M a k i f ( x i , y ) .
For k { 1 , 2 , 3 , , M } , (8) can be expressed by F x ( · , y ) = A M f ( · , y ) , where A M = R ¯ R 1 is an M × M matrix. Thus, for each varying y { y 1 , y 2 , y 3 , , y N } , we form a block matrix:
F x ( · , y 1 ) F x ( · , y 2 ) F x ( · , y N ) = A M 0 0 0 A M 0 0 0 A M N blocks f ( · , y 1 ) f ( · , y 2 ) f ( · , y N ) .
This is denoted by F x = A x f , where A x = I N A M is the ‘two-dimensional Chebyshev integration matrix along the x-axis’. Similarly, using (7) with a fixed constant x, we have
F y ( x , y h ) = c y h f ( x , η ) d η = j = 1 N a h j f ( x , y j ) .
For h { 1 , 2 , 3 , , N } , (9) can be expressed by F y ( x , · ) = A N f ( x , · ) , where A N = R ¯ R 1 is an N × N matrix. Thus, for each varying x { x 1 , x 2 , x 3 , , x M } , we obtain a block matrix:
F y ( x 1 , · ) F y ( x 2 , · ) F y ( x M , · ) = A N 0 0 0 A N 0 0 0 A N M blocks f ( x 1 , · ) f ( x 2 , · ) f ( x M , · ) .
This is denoted by F ˜ y = A ˜ y f ˜ , where A ˜ y = I M A N and f ˜ is in the local numbering system. Note that the elements of f and f ˜ are the same values, but their positions differ in the numbering systems. Thus, we can transform F ˜ y and f ˜ from local to global numbering systems using a permutation matrix P = [ p i j ] M N × M N , where each p i j is defined by
p i j = 1 ; i = ( h 1 ) M + k and j = ( k 1 ) N + h , 0 ; otherwise ,
for all k { 1 , 2 , 3 , , M } and h { 1 , 2 , 3 , , N } . We obtain that F y = P F ˜ y and f = P f ˜ . Therefore, F y = A y u , where A y = P A ˜ y P 1 = P ( I M A N ) P 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 F x y ( x k , y h ) . By using (8) and (9), we have
F x y ( x k , y h ) = c y h a x k f ( ξ , η ) d ξ d η = j = 1 N i = 1 M a h j a k i f ( x i , y j ) .
For k { 1 , 2 , 3 , , M } and h { 1 , 2 , 3 , , N } , this can be analyzed as two types:
  • Type I: If y h is fixed but x k is varied, (11) becomes F x y ( · , y h ) = j = 1 N a h j A M f ( · , y j ) , where a h j is an element of the Chebyshev integration matrix A N at position ( h , j ) . By varying all y h { y 1 , y 2 , y 3 , , y N } , we obtain the block matrix:
    F x y ( · , y 1 ) F x y ( · , y 2 ) F x y ( · , y N ) = a 11 I M a 12 I M a 1 N I M a 21 I M a 22 I M a 2 N I M a N 1 I M a N 2 I M a N N I M A M 0 0 0 A M 0 0 0 A M N blocks f ( · , y 1 ) f ( · , y 2 ) f ( · , y N ) .
    This is denoted by F x y = ( A N I M ) ( I N A M ) f = A y A x f .
  • Type II: If x k is fixed but y h is varied, (11) becomes F x y ( x k , · ) = i = 1 M a k i A N f ( x i , · ) , where a k i is an element of the Chebyshev integration matrix A M at position ( k , i ) . By varying all x k { x 1 , x 2 , x 3 , , x M } , we obtain the block matrix:
    F x y ( x 1 , · ) F x y ( x 2 , · ) F x y ( x M , · ) = a 11 I N a 12 I N a 1 M I N a 21 I N a 22 I N a 2 M I N a M 1 I N a M 2 I N a M M I N A N 0 0 0 A N 0 0 0 A N M blocks f ( x 1 , · ) f ( x 2 , · ) f ( x M , · ) .
    This is denoted by F ˜ x y = ( A M I N ) ( I M A N ) f ˜ = A ˜ x A ˜ y f ˜ for the local numbering system. We can transform it globally by employing the aforementioned permutation matrix P , defined in (10). Then, we obtain
    F x y = P F ˜ x y = P A ˜ x A ˜ y f ˜ = P P 1 A x P P 1 A y P P 1 f = A x A y f .
    Hence, we conclude from both types I and II that F x y = A y A x f = A x A y f .
Remark 1.
From Theorem 1, the Chebyshev integration matrices A x and A y are commutative, namely, A y A x = ( A N I M ) ( I N A M ) = A N A M = ( I N A M ) ( A N I M ) = A x A y .

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 h u be expressed by the discharge q. The one-dimensional system (1) can then be rewritten as
h t + q x = 0 q t + x q 2 h + g h 2 2 + g h d z d x = 0
for all ( x , t ) ( a , b ) × ( 0 , T ] such that a < b and T > 0 . Here, h is the water depth, u is the flow velocity in the x-direction, q = h u 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:
h ( x , 0 ) = ϕ 1 ( x ) and u ( x , 0 ) = ϕ 2 ( x ) for x [ a , b ]
and the reflecting boundary conditions:
u ( a , t ) = ψ 1 ( t ) and u ( b , t ) = ψ 2 ( t ) for t ( 0 , T ] .
The FIM-CPE for one-dimensional SWEs begins by discretizing the computational spatial domain ( a , b ) into M nodes generated by the zeros of Chebyshev polynomial R M ( x ) as defined in (4) in ascending order, i.e., x k for k { 1 , 2 , 3 , , M } . Then, we divide the temporal domain ( 0 , T ] by the step-size of time τ , which will be defined later such that t m + 1 = t m + τ for all m N with t 0 = 0 .
Next, we handle the temporal variable t in (12) by specifying the time step t m , denoted by a superscript m . Since h and u are assumed to be smooth functions of time t, then q = h u is also smooth. Consequently, the functions h and q at any two consecutive times are very close. Specifically, for any two consecutive times 0 t m < t m + 1 with | t m t m + 1 | 0 , we have | h m + 1 h m | 0 and | q m + 1 q m | 0 . 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
h m + 1 h m τ + d q m + 1 d x = 0 ,
q m + 1 q m τ + d d x q m q m + 1 h m + g h m h m + 1 2 + g h m + 1 d z d x = 0 ,
where h m = h ( x , t m ) and q m = q ( x , t m ) represent the numerical values at the m-th time step. Thus, we obtain u m = q m / h m . 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 x k . This yields
a x k h m + 1 ( ξ ) h m ( ξ ) d ξ + τ q m + 1 ( x k ) + s 1 = 0 ,
a x k q m + 1 ( ξ ) q m ( ξ ) d ξ + τ u m ( x k ) q m + 1 ( x k ) + τ g 2 h m ( x k ) h m + 1 ( x k ) + τ g a x k d z ( ξ ) d ξ h m + 1 ( ξ ) d ξ + s 2 = 0 ,
where s 1 and s 2 are integration constants. These constants arise from the integration process for the functions h m and q m . 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 x k for k { 1 ,   2 ,   3 , , M } , we obtain the following simplified matrix equations:
A h m + 1 h m + τ q m + 1 + s 1 e = 0 ,
A q m + 1 q m + τ U m q m + 1 + τ g 2 H m h m + 1 + τ g A Z h m + 1 + s 2 e = 0 ,
where A = R ¯ R 1 is the one-dimensional Chebyshev integration matrix described in Section 2.1, e = 1 ,   1 ,   1 , ,   1 is an M-entry column vector of ones and 0 = 0 ,   0 ,   0 , ,   0 is an M-entry column vector of zeros. Other parameters in (19) and (20) are defined as
h m = h m ( x 1 ) , h m ( x 2 ) , h m ( x 3 ) , , h m ( x M ) , q m = q m ( x 1 ) , q m ( x 2 ) , q m ( x 3 ) , , q m ( x M ) , H m = diag h m ( x 1 ) , h m ( x 2 ) , h m ( x 3 ) , , h m ( x M ) , U m = diag u m ( x 1 ) , u m ( x 2 ) , u m ( x 3 ) , , u m ( x M ) and Z = diag d z d x | x = x 1 , d z d x | x = x 2 , d z d x | x = x 3 , , d z d x | x = x M .
Now, (19) and (20) have 2 M + 2 unknown variables, namely h m + 1 , q m + 1 , s 1 and s 2 , but only 2 M equations. Therefore, two additional equations are required. From the given reflecting boundary conditions (14) and q m = h m u m , these can be written in vector form by employing the Chebyshev polynomial expansion (5) at the m-th time step:
h m ( a ) = n = 0 M 1 c h , n R n ( a ) : = ρ a c h = ρ a R 1 h m , h m ( b ) = n = 0 M 1 c h , n R n ( b ) : = ρ b c h = ρ b R 1 h m , q m ( a ) = n = 0 M 1 c q , n R n ( a ) : = ρ a c q = ρ a R 1 q m = ψ 1 ( t m ) ρ a R 1 h m and q m ( b ) = n = 0 M 1 c q , n R n ( b ) : = ρ b c q = ρ b R 1 q m = ψ 2 ( t m ) ρ b R 1 h m .
Thus, we obtain two additional equations at time t m + 1 , as follows:
ψ 1 ( t m + 1 ) ρ a R 1 h m + 1 ρ a R 1 q m + 1 = 0 ,
ψ 2 ( t m + 1 ) ρ b R 1 h m + 1 ρ b R 1 q m + 1 = 0 ,
where ρ a = R 0 ( a ) , R 1 ( a ) , , R M 1 ( a ) and ρ b = R 0 ( b ) , R 1 ( b ) , , R M 1 ( b ) . Notably, the Chebyshev polynomials at the endpoints are R n ( a ) = ( 1 ) n and R n ( b ) = 1 for all non-negative integers n. Finally, we construct a system of linear equations from (19)–(22), which has a total of 2 M + 2 unknowns, including h m + 1 , q m + 1 , s 1 and s 2 as follows:
A τ I e 0 τ g 2 H m + τ g A Z A + τ U m 0 e ψ 1 ( t m + 1 ) ρ a R 1 ρ a R 1 0 0 ψ 2 ( t m + 1 ) ρ b R 1 ρ b R 1 0 0 h m + 1 q m + 1 s 1 s 2 = A h m A q m 0 0 .
Here, I is the M × M identity matrix, e and 0 are, respectively, the M-dimensional one and zero column vectors. Therefore, we can solve (23) to obtain the numerical solutions h m + 1 and q m + 1 . This process begins with the initial conditions (13) written in vector form as
h 0 = [ ϕ 1 ( x 1 ) , ϕ 1 ( x 2 ) , ϕ 1 ( x 3 ) , , ϕ 1 ( x M ) ] , u 0 = [ ϕ 2 ( x 1 ) , ϕ 2 ( x 2 ) , ϕ 2 ( x 3 ) , , ϕ 2 ( x M ) ] and q 0 = h 0 u 0 .
Consequently, the solution u m + 1 is directly obtained by u m + 1 = q m + 1 h m + 1 . 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
τ = CFL min i Δ x i max k u m ( x k ) + g h m ( x k ) ,
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 h m + 1 and u m + 1 can be approximately expressed corresponding to the functions h ( x , T ) and u ( x , T ) , respectively, at the terminal time T over x [ a , b ] , by using (5), i.e.,
h ( x , T ) = n = 0 M 1 c h , n R n ( x ) : = ρ x c h = ρ x R 1 h m + 1 and u ( x , T ) = n = 0 M 1 c u , n R n ( x ) : = ρ x c u = ρ x R 1 u m + 1 ,
where ρ x = [ R 0 ( x ) , R 1 ( x ) , R 2 ( x ) , , R M 1 ( x ) ] and R 1 is defined in Lemma 1(iii).
For computational convenience, we summarize all the procedures mentioned above into the pseudocode for finding numerical solutions h m + 1 and u m + 1 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, z ( x ) , ϕ 1 ( x ) , ϕ 2 ( x ) , ψ 1 ( x ) , ψ 2 ( x ) and CFL.
Output: The numerical solutions h m and u m at time T.
  1:
for  k 1 to M do
  2:
     Generate nodes x k 1 2 ( b a ) cos 2 k 1 2 M π + a + b in ascending order.
  3:
end for
  4:
Compute parameters e , ρ a , ρ b , A , Z , R , R ¯ and R 1 .
  5:
Initialize water height vector: h 0 [ ϕ 1 ( x 1 ) , ϕ 1 ( x 2 ) , , ϕ 1 ( x M ) ] .
  6:
Initialize velocity vector: u 0 [ ϕ 2 ( x 1 ) , ϕ 2 ( x 2 ) , , ϕ 2 ( x M ) ] .
  7:
Initialize discharge vector: q 0 h 0 u 0 .
  8:
Set current simulation time t 0 .
  9:
Set iteration index m 0 .
10:
while  t T do
11:
     Calculate time step τ CFL min i Δ x i max k | u m ( x k ) | + g h m ( x k ) .
12:
     if  t + τ > T  then
13:
          Adjust τ T t for the final step to reach T exactly.
14:
     end if
15:
     Compute diagonal matrices H m from h m and U m from u m .
16:
     Find solutions h m + 1 and q m + 1 by solving the linear system (23).
17:
     Compute the new velocity u m + 1 q m + 1 h m + 1 .
18:
     Update current simulation time t t + τ .
19:
     Update iteration index m m + 1 .
20:
end while
21:
return The final solutions h m and u m 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
MAE = 1 M k = 1 M | f ( x k , T ) f ( x k , T ) | ,
where f 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 [ 0 , 10 ] . The initial velocity is zero. The bottom topography is defined by
z ( x ) = 5 exp x 5 0.8 2
and the initial water height is h ( x , 0 ) = 10 z ( x ) .
In this computation, we simulated M = 100 grid points over a long period of T = 10 s. Through implementation with CFL values ranging from 0.1 to 0.9 , we found that CFL = 0.5 provided the best accuracy for our algorithm. For this example and consistently for the other examples, we employed our proposed Algorithm 1 with CFL = 0.5 . The result, shown in Figure 3, demonstrated stability over time with a run time of 30.0897 s. At the final time, the MAEs for water height h and velocity u were 6.45 × 10 12 and 8.49 × 10 13 , respectively. To evaluate mass conservation, we computed the total volume using
1 2 ( x 2 a ) h 1 m + ( b x M 1 ) h M m + i = 1 M 2 ( x i + 2 x i ) h i + 1 m
where x 1 , x 2 , x 3 , , x M are nodal points, h 1 m , h 2 m , h 3 m , , h M m are the water heights at each time t m from the simulation, and M is the number of nodal points. Experimental results show that the total water volume varied minimally, not exceeding 10 5 throughout the simulation period. Similar results are observed for Examples 2–4.
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
h ( x , 0 ) = 1 + 0.1 exp x 0.5 0.1 .
We simulated this experiment with M = 60 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 T = 9.5 , the experiment reached a steady state within a tolerance of 10 5 and with a run time of 8.6104 min.
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 z ( x ) = 0 . The computational domain is [ 0 ,   1 ] . The initial velocity is zero and the initial water height is
h ( x , 0 ) = 1 f o r 0 x < 1 2 , 1 2 f o f o r 1 2 x 1 .
This setup represents a discontinuity at x = 1 2 , acting as a barrier separating two different initial water heights. The exact solution to this problem was provided by Stoker [20], specifically,
h ( x , t ) = 1 f o r x < 1 2 t g , 1 9 g 2 g 2 x 1 2 t 2 f o r 1 2 t g x 1 2 + ( v w ) t , w 2 g f o r 1 2 + ( v w ) t < x 1 2 + S t , 1 2 f o r x > 1 2 + S t
and
u ( x , t ) = 0 f o r x < 1 2 t g , 1 3 t 2 x 1 + 2 t g 2 f o r 1 2 t g x 1 2 + ( v w ) t , v f o r 1 2 + ( v w ) t < x 1 2 + S t , 0 f o r x > 1 2 + S t ,
where v = S g 8 S 1 + 1 + 16 S 2 g , w = g 4 1 + 16 S 2 g 1 and S = 2.9579181201875 . 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 x = 1 2 . 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.
Furthermore, we visualized the solutions for both water height h and velocity u obtained using our algorithm with M = 200 at T = 0.1 , as depicted in Figure 5. From Figure 5, the initial water height broke at x = 1 2 as time progressed. Our scheme effectively captured the shock propagation and showed good agreement with the exact solution.
Example 4
(Dam break over a bump [11]). This problem, discussed by LeVeque [11], involves a non-flat, smooth bottom topography, implying that z ( x ) 0 for certain values of x. This test case features a smooth bump defined by
z ( x ) = 1 4 cos ( 10 x 5 ) π + 1 for 0.4 x 0.6 , 0 otherwise .
The computational domain for this problem is [ 0 , 1 ] . The initial velocity is zero and the initial water height is defined in relation to the bump z ( x ) as
h ( x , 0 ) = 1 z ( x ) for x < 0.1 , 6 5 z ( x ) for 0.1 x 0.2 , 1 z ( x ) for x > 0.2 .
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 h ( x , t ) and u ( x , t ) . Using M = 100 grid points, we simulated the behavior of wave propagation at different times t { 0.01 , 0.03 , 0.05 , 0.1 , 0.15 , 0.2 } , as depicted in Figure 6 for water height and velocity. The run time for this simulation was 11.9876 s. We observed that at the initial time, the wave pulse moved to the right, with h + z around 1.1 . After the wave pulse encountered the bump, it was partially reflected, leading to a decrease in h + z as it continued to move forward. Behind the bump, the wave pulse continued to decrease. The wave pulse also moved towards the left, with h + z around 1.1 . After reaching the left wall, its height increased at T = 0.05 and then returned to its previous level T = 0.1 . 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.

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 T = 0.1 s with an increasing number of Chebyshev nodes ( M i ) . The MAE for the water height ( E i ), 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.
The numerical order of convergence ( p i ) was calculated using the formula
p i = log ( E i 1 / E i ) log ( M i / M i 1 ) ,
where E i 1 and E i are the errors corresponding to node counts M i 1 and M i , respectively. The order is approximately 0.7 0.9 . 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.
The data in Table 2 and the trend in Figure 7 confirm that the error consistently decreased as the number of nodes increased, providing strong numerical evidence for the convergence of the FIM-CPE algorithm.

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 q 1 = h u and q 2 = h v be the discharges. Then, (2) can be rewritten as
h t + q 1 x + q 2 y = 0 , q 1 t + x q 1 2 h + g h 2 2 + y q 1 q 2 h + g h z x = 0 , q 2 t + x q 1 q 2 h + y q 2 2 h + g h 2 2 + g h z y = 0 ,
for all ( x , y , t ) ( a , b ) × ( c , d ) × ( 0 , T ] , where a , b , c , d R and T R + . We assume that h, u and v are smooth real-valued functions of the temporal coordinate. This system is subject to the initial conditions
h ( x , y , 0 ) = ϕ 0 ( x , y ) , q 1 ( x , y , 0 ) = ϕ 1 ( x , y ) and q 2 ( x , y , 0 ) = ϕ 2 ( x , y )
for ( x , y ) Ω , where Ω : = [ a , b ] × [ c , d ] is the spatial domain. Let Ω be the boundary of the domain Ω . The reflecting boundary conditions [13] at any time t ( 0 , T ] are given by
q 1 ( x , y , t ) = ψ 1 ( x , y ) and q 2 ( x , y , t ) = ψ 2 ( x , y ) for ( x , y ) Ω .
The FIM-CPE for two-dimensional SWEs employs procedures similar to those used for one-dimensional SWEs. Initially, the computational domain ( a , b ) × ( c , d ) is discretized into H : = M × N nodes. This is achieved by utilizing the zeros of the Chebyshev polynomials R M ( x ) and R N ( x ) , as defined in (4), which denote them by X : = { x 1 , x 2 , x 3 , , x M } and Y : = { y 1 , y 2 , y 3 , , y N } , respectively. The nodes are globally numbered and obtained from elements in the set of Cartesian product X × Y , i.e., ( x k , y k ) X × Y for k { 1 , 2 , 3 , , H } . Concurrently, the temporal domain ( 0 , T ] is divided into discrete time steps t m + 1 = t m + τ for all m N , with t 0 = 0 . 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
h m + 1 h m τ + q 1 m + 1 x + q 2 m + 1 y = 0 , q 1 m + 1 q 1 m τ + x q 1 m q 1 m + 1 h m + g h m h m + 1 2 + y q 1 m q 2 m + 1 h m + g h m + 1 z x = 0 , q 2 m + 1 q 2 m τ + y q 2 m q 2 m + 1 h m + g h m h m + 1 2 + x q 2 m q 1 m + 1 h m + g h m + 1 z y = 0 ,
where h m = h ( x , y , t m ) , q 1 m = q 1 ( x , y , t m ) and q 2 m = q 2 ( x , y , t m ) represent the numerical values at the m-th time step. Then, the water velocities are obtained by u m = q 1 m / h m and v m = q 2 m / h m , 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 t m . The integration is performed from a to x k and from c to y k , respectively, yielding
c y k a x k h m + 1 ( ξ , η ) h m ( ξ , η ) d ξ d η + τ c y k q 1 m + 1 ( x k , η ) d η + τ a x k q 2 m + 1 ( ξ , y k ) d ξ + r 0 ( x k ) + s 0 ( y k ) = 0 ,
c y k a x k q 1 m + 1 ( ξ , η ) q 1 m ( ξ , η ) d ξ d η + τ c y k u m ( x k , η ) q 1 m + 1 ( x k , η ) d η + τ g 2 c y k h m ( x k , η ) h m + 1 ( x k , η ) d η + τ a x k u m ( ξ , y k ) q 2 m + 1 ( ξ , y k ) d ξ + τ g c y k a x k z ( ξ , η ) ξ h m + 1 ( ξ , η ) d ξ d η + r 1 ( x k ) + s 1 ( y k ) = 0 ,
c y k a x k q 2 m + 1 ( ξ , η ) q 2 m ( ξ , η ) d ξ d η + τ a x k v m ( ξ , y k ) q 2 m + 1 ( ξ , y k ) d ξ + τ g 2 a x k h m ( ξ , y k ) h m + 1 ( ξ , y k ) d ξ + τ c y k v m ( x k , η ) q 1 m + 1 ( x k , η ) d η + τ g c y k a x k z ( ξ , η ) η h m + 1 ( ξ , η ) d ξ d η + r 2 ( x k ) + s 2 ( y k ) = 0 ,
where r i ( x k ) and s i ( y k ) for i { 0 , 1 , 2 } are arbitrary functions introduced during the integration process. To handle these unknown functions, Chebyshev interpolation is used to approximate them by
r i ( x ) = n = 0 M 1 r i , n R n ( x ) for i { 0 , 1 , 2 } and
s i ( y ) = n = 0 N 1 s i , n R n ( y ) for i { 0 , 1 , 2 } ,
where { r i , n } n = 0 M 1 and { s i , n } n = 0 N 1 are unknown coefficients that will be determined according to the specified boundary conditions (28). Note that the total number of these unknown coefficients is i = 0 2 ( M + N ) = 3 M + 3 N .
Subsequently, each of the Equations (29)–(31) is rearranged into matrix form using the Chebyshev integration matrix. By substituting all zeros ( x k , y k ) , k { 1 , 2 , 3 , , H } into these equations, the following matrix equations are obtained:
A x A y h m + 1 + τ A y q 1 m + 1 + τ A x q 2 m + 1 + Φ x r 0 + Φ y s 0 = A x A y h m ,
A x A y q 1 m + 1 + τ A y U m q 1 m + 1 + τ g 2 A y H m h m + 1 + τ A x U m q 2 m + 1 + τ g A x A y Z x h m + 1 + Φ x r 1 + Φ y s 1 = A x A y q 1 m ,
A x A y q 2 m + 1 + τ A x V m q 2 m + 1 + τ g 2 A x H m h m + 1 + τ A y V m q 1 m + 1 + τ g A x A y Z y h m + 1 + Φ x r 2 + Φ y s 2 = A x A y q 2 m ,
where A x and A y 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
h m = h m ( x 1 , y 1 ) , h m ( x 2 , y 2 ) , h m ( x 3 , y 3 ) , , h m ( x H , y H ) , q 1 m = q 1 m ( x 1 , y 1 ) , q 1 m ( x 2 , y 2 ) , q 1 m ( x 3 , y 3 ) , , q 1 m ( x H , y H ) , q 2 m = q 2 m ( x 1 , y 1 ) , q 2 m ( x 2 , y 2 ) , q 2 m ( x 3 , y 3 ) , , q 2 m ( x H , y H ) , H m = diag h m ( x 1 , y 1 ) , h m ( x 2 , y 2 ) , h m ( x 3 , y 3 ) , , h m ( x H , y H ) , U m = diag u m ( x 1 , y 1 ) , u m ( x 2 , y 2 ) , u m ( x 3 , y 3 ) , , u m ( x H , y H ) , V m = diag v m ( x 1 , y 1 ) , v m ( x 2 , y 2 ) , v m ( x 3 , y 3 ) , , v m ( x H , y H ) , Z x = diag z x ( x 1 , y 1 ) , z x ( x 2 , y 2 ) , z x ( x 3 , y 3 ) , , z x ( x H , y H ) , Z y = diag z y ( x 1 , y 1 ) , z y ( x 2 , y 2 ) , z y ( x 3 , y 3 ) , , z y ( x H , y H ) , r i = r i , 0 , r i , 1 , r i , 2 , , r i , M 1 for i { 0 , 1 , 2 } and s i = s i , 0 , s i , 1 , s i , 2 , , s i , N 1 for i { 0 , 1 , 2 } .
From (32) and (33), we have their coefficient matrices as
Φ x = R 0 ( x 1 ) R 1 ( x 1 ) R M 1 ( x 1 ) R 0 ( x 2 ) R 1 ( x 2 ) R M 1 ( x 2 ) R 0 ( x H ) R 1 ( x H ) R M 1 ( x H )
and
Φ y = R 0 ( y 1 ) R 1 ( y 1 ) R N 1 ( y 1 ) R 0 ( y 2 ) R 1 ( y 2 ) R N 1 ( y 2 ) R 0 ( y H ) R 1 ( y H ) R N 1 ( y H ) .
Since the integral system (29)–(31) incorporates the additional 3 M + 3 N unknown coefficients denoted as r i , n and s i , n , it is necessary to generate an extra 3 M + 3 N equations, derived from the rectangular boundary conditions given by (28). For the boundary condition on q 1 , this approach involves formulating M equations from its left boundary, N equations from its lower boundary, M 2 equations from its right boundary, and N 2 equations from its upper boundary. Specifically, over the right and upper boundaries of q 1 , these additional equations are constructed at the zero points of Chebyshev polynomials that are indexed in odd positions, as depicted in Figure 8a.
Conversely, the boundary condition on q 2 requires constructing M equations from its right boundary, N equations from its upper boundary, M 2 equations from its left boundary, and N 2 equations from its lower boundary. In particular, over the left and lower boundaries of q 2 , 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 X : = { x 1 , x 2 , x 3 , , x M } ( a , b ) and Y : = { y 1 , y 2 , y 3 , , y N } ( c , d ) be sets of zeros of the Chebyshev polynomials R M ( x ) and R N ( y ) , respectively. If f is a function of x and y on [ a , b ] × [ c , d ] R 2 , it can be approximated at any x [ a ,   b ] or y [ c ,   d ] by the Chebyshev polynomial expansion in the matrix form as
f ( x , · ) = I N ρ x R M 1 f a n d
f ( · , y ) = I M ρ y R N 1 P 1 f
where ρ x = [ R 0 ( x ) , R 1 ( x ) , R 2 ( x ) , , R M 1 ( x ) ] , ρ y = [ R 0 ( y ) , R 1 ( y ) , R 2 ( y ) , , R N 1 ( y ) ] , R M and R N are the M × M and N × N Chebyshev matrices, respectively, defined in Lemma 1(iii) and f = [ f ( x 1 , y 1 ) , f ( x 2 , y 2 ) , f ( x 3 , y 3 ) , , f ( x M N , y M N ) ] with elements ordered according to a global numbering system for the grid points ( x k , y k ) belong to the set of Cartesian product X × Y . Other parameters are as defined in Section 2.2.
Proof of Theorem 2.
We consider a function f ( x , y ) 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 have
    f ( x , y ) = n = 0 M 1 c f , n R n ( x ) : = ρ x c f = ρ x R M 1 f ( · , y ) ,
    where ρ x = [ R 0 ( x ) , R 1 ( x ) , R 2 ( x ) , , R M 1 ( x ) ] , R M is an M × M Chebyshev matrix as defined in Lemma 1(iii) and f ( · , y ) = [ f ( x 1 , y ) , f ( x 2 , y ) , f ( x 3 , y ) , , f ( x M , y ) ] . Substituting the zeros of the Chebyshev polynomial R N ( y ) , i.e., y { y 1 , y 2 , y 3 , , y N } , into (39) yields
    f ( x , y 1 ) f ( x , y 2 ) f ( x , y N ) = ρ x R M 1 0 0 0 ρ x R M 1 0 0 0 ρ x R M 1 N blocks f ( · , y 1 ) f ( · , y 2 ) f ( · , y N ) .
    This simplifies to f ( x , · ) = I N ρ x R M 1 f , where I N is an N × N identity matrix.
  • Scenario II: When x is held constant and y is the free variable, we have
    f ( x , y ) = n = 0 N 1 c f , n R n ( y ) : = ρ y c f = ρ y R N 1 f ( x , · ) ,
    where ρ y = [ R 0 ( y ) , R 1 ( y ) , R 2 ( y ) , ,   R N 1 ( y ) ] , R M is an N × N Chebyshev matrix as defined in Lemma 1(iii) and f ( x ,   · ) = [ f ( x ,   y 1 ) , f ( x ,   y 2 ) , f ( x ,   y 3 ) , ,   f ( x ,   y N ) ] . Substituting the zeros of the Chebyshev polynomial R M ( x ) , i.e., x { x 1 ,   x 2 ,   x 3 , ,   x M } , into (40) yields
    f ( x 1 , y ) f ( x 2 , y ) f ( x M , y ) = ρ y R N 1 0 0 0 ρ y R N 1 0 0 0 ρ y R N 1 M blocks f ( x 1 , · ) f ( x 2 , · ) f ( x M , · ) .
    This simplifies to f ( · ,   y ) = I M ρ y R N 1 f ˜ = I M ρ y R N 1 P 1 f , where I M is an M × M identity matrix and P is a permutation matrix defined by (10).
Hence, the proof is complete.    □
Utilizing Theorem 2 and the boundary conditions (28) at time t m + 1 , we directly derive four boundary conditions (41)–(44) in matrix form by substituting q i m + 1 for f in Theorem 2 and evaluating at the respective boundary points, as follows:
  • The left and lower boundary conditions for q 1 = ψ 1 ( x ,   y ) at time t m + 1 are obtained by replacing x = a and y = c into (37) and (38), respectively:
    q 1 m + 1 ( a , · ) = I N ρ a R M 1 q 1 m + 1 : = Ψ 1 a and
    q 1 m + 1 ( · , c ) = I M ρ c R N 1 P 1 q 1 m + 1 : = Ψ 1 c ,
    where ρ a = [ 1 , 1 , 1 , 1 , , ( 1 ) M 1 ] , Ψ 1 a = [ ψ 1 ( a , y 1 ) , ψ 1 ( a , y 2 ) , , ψ 1 ( a , y N ) ] , ρ c = [ 1 , 1 , 1 , 1 , , ( 1 ) N 1 ] and Ψ 1 c = [ ψ 1 ( x 1 , c ) , ψ 1 ( x 2 , c ) , , ψ 1 ( x M , c ) ] .
  • The right and upper boundary conditions for q 2 = ψ 2 ( x , y ) at time t m + 1 are obtained by replacing x = b and y = d into (37) and (38), respectively:
    q 2 m + 1 ( b , · ) = I N ρ b R M 1 q 2 m + 1 : = Ψ 2 b and
    q 2 m + 1 ( · , d ) = I M ρ d R N 1 P 1 q 2 m + 1 : = Ψ 2 d ,
    where ρ b = [ 1 , 1 , 1 , , 1 ] with M entries, Ψ 2 b = [ ψ 2 ( b , y 1 ) , ψ 2 ( b , y 2 ) , , ψ 2 ( b , y N ) ] , ρ d = [ 1 , 1 , 1 , , 1 ] with N entries and Ψ 2 d = [ ψ 2 ( x 1 , d ) , ψ 2 ( x 2 , d ) , , ψ 2 ( x M , d ) ] .
Next, we address the boundary conditions for the remaining sides involving q 1 and q 2 . 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 T odd = [ a i j ] m × n , is defined as
a i j = 1 ; j = 2 i 1 and i { 1 , 2 , 3 , , m } , 0 ; otherwise .
Moreover, the even extraction matrix, denoted by T even = [ b i j ] m × n , is defined as
b i j = 1 ; j = 2 i and i { 1 , 2 , 3 , , m } , 0 ; otherwise .
Building upon Definition 3, Theorem 2 and the boundary conditions (28) at time t m + 1 , the remaining boundary conditions for q 1 and q 2 are formulated as follows:
  • The right and upper boundary conditions for q 1 = ψ 1 ( x , y ) at time t m + 1 over the odd position corresponding to M 2 and N 2 zeros in X and Y, respectively, are obtained by substituting x = b and y = d into (37) and (38), respectively, and left-multiplying by T odd from (45):
    T odd x q 1 m + 1 ( b , · ) = T odd x I N ρ b R M 1 q 1 m + 1 : = T odd x Ψ 1 b and
    T odd y q 1 m + 1 ( · , d ) = T odd y I M ρ d R N 1 P 1 q 1 m + 1 : = T odd y Ψ 1 d ,
    where T odd x is an M 2 × M odd extraction, Ψ 1 b = [ ψ 1 ( b , y 1 ) , ψ 1 ( b , y 2 ) , , ψ 1 ( b , y N ) ] , T odd y is an N 2 × N odd extraction, and Ψ 1 d = [ ψ 1 ( x 1 , d ) , ψ 1 ( x 2 , d ) , , ψ 1 ( x M , d ) ] .
  • The left and lower boundary conditions for q 2 = ψ 2 ( x , y ) at time t m + 1 over the even positions corresponding to M 2 and N 2 zeros in X and Y, respectively, are obtained by replacing x = a and y = c into (37) and (38), respectively, and left-multiplying by T even from (46):
    T even x q 2 m + 1 ( a , · ) = T even x I N ρ a R M 1 q 2 m + 1 : = T even x Ψ 2 a and
    T even y q 2 m + 1 ( · , c ) = T even y I M ρ c R N 1 P 1 q 2 m + 1 : = T even y Ψ 2 c ,
    where T even x is an M 2 × M even extraction, Ψ 2 a = [ ψ 2 ( a , y 1 ) , ψ 2 ( a , y 2 ) , , ψ 2 ( a , y N ) ] , T even y is an N 2 × N even extraction, and Ψ 2 c = [ ψ 2 ( x 1 , c ) , ψ 2 ( x 2 , c ) , , ψ 2 ( x M , c ) ] .
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 3 H + 3 M + 3 N unknowns, namely h m + 1 , q 1 m + 1 , q 2 m + 1 , r 0 , s 0 , r 1 , s 1 , r 2 , and s 2 . The resulting system is
A x A y τ A y τ A x [ Φ x , Φ y ] 0 H × L 0 H × L τ g A y ( 1 2 H m + A x Z x ) A y ( A x + τ U m ) τ A x U m 0 H × L [ Φ x , Φ y ] 0 H × L τ g A x ( 1 2 H m + A y Z y ) τ A y V m A x ( A y + τ V m ) 0 H × L 0 H × L [ Φ x , Φ y ] 0 N × H W x ( a ) 0 N × H 0 M × H W y ( c ) 0 M × H 0 N × H 0 N × H W x ( b ) 0 M × H 0 M × H W y ( d ) 0 N 2 × H T odd x W x ( b ) 0 N 2 × H 0 3 L × 3 L 0 M 2 × H T odd y W y ( d ) 0 M 2 × H 0 N 2 × H 0 N 2 × H T even x W x ( a ) 0 M 2 × H 0 M 2 × H T even y W x ( c ) h m + 1 q 1 m + 1 q 2 m + 1 r 0 s 0 r 1 s 1 r 2 s 2 = A h m A q 1 m A q 2 m Ψ 1 a Ψ 1 c Ψ 2 b Ψ 2 d T odd x Ψ 1 b T odd y Ψ 1 d T even x Ψ 2 a T even y Ψ 2 c ,
where L = M + N , W x ( λ ) = I N ρ λ R M 1 and W y ( λ ) = ( I M ρ λ R N 1 ) P 1 for λ { a , b , c , d } . This system (51) is subsequently solved to obtain the approximate solutions h m + 1 , q 1 m + 1 and q 2 m + 1 . The solution process commences with the initial conditions (27) expressed in vector form:
h 0 = [ ϕ 0 ( x 1 , y 1 ) , ϕ 0 ( x 2 , y 2 ) , ϕ 0 ( x 3 , y 3 ) , , ϕ 0 ( x H , , y H ) ] , q 1 0 = [ ϕ 1 ( x 1 , y 1 ) , ϕ 1 ( x 2 , y 2 ) , ϕ 1 ( x 3 , y 3 ) , , ϕ 1 ( x H , , y H ) ] , q 2 0 = [ ϕ 2 ( x 1 , y 1 ) , ϕ 2 ( x 2 , y 2 ) , ϕ 2 ( x 3 , y 3 ) , , ϕ 2 ( x H , , y H ) ] , u 0 = q 1 0 h 0 and v 0 = q 2 0 h 0 .
Therefore, the solutions for velocity components u m + 1 and v m + 1 are directly obtained by u m + 1 = q 1 m + 1 h m + 1 and v m + 1 = q 2 m + 1 h m + 1 , 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],
τ = CFL · min i , j Δ x i , Δ y j max k u m ( x k , y k ) + g h m ( x k , y k ) , v m ( x k , y k ) + g h m ( x k , y k ) ,
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, z ( x , y ) , ϕ 0 ( x , y ) , ϕ 1 ( x , y ) , ϕ 2 ( x , y ) , ψ 1 ( x , y ) , ψ 2 ( x , y ) and CFL.
Output: The numerical solutions h m , u m and v m at time T.
  1:
Define the nodal set X = { x k } k = 1 M , where x k 1 2 ( b a ) cos 2 k 1 2 M π + a + b .
  2:
Define the nodal set X = { y k } k = 1 N , where y k 1 2 ( d c ) cos 2 k 1 2 N π + c + d .
  3:
for  j 1 to N do
  4:
     for  i 1 to M do
  5:
          Assemble the 2D grid points ( x i , y j ) X × Y using a global numbering system.
  6:
     end for
  7:
end for
  8:
Calculate the total number of grid points H = M × N .
  9:
Define and compute constant matrices: P , A x , A y , Z x , Z y , Φ x , Φ y , I M , I N , R M 1 and R N 1 .
10:
Define extraction matrices: T odd x , T odd y , T even x and T even x .
11:
for each boundary λ { a , b , c , d }  do
12:
    Set boundary vectors ρ λ , Ψ 1 λ and Ψ 2 λ .
13:
    Compute W x ( λ ) I N ρ λ R M 1 .
14:
    Compute W y ( λ ) ( I M ρ λ R N 1 ) P 1 .
15:
end for
16:
Initialize water height h 0 and discharges q 1 0 and q 2 0 .
17:
Initialize initial horizontal velocity u 0 q 1 0 h 0 .
18:
Initialize initial vertical velocity v 0 q 2 0 h 0 .
19:
Set current simulation time t 0 .
20:
Set iteration index m 0 .
21:
while  t T do
22:
      Determine time step τ = CFL · min i , j ( Δ x i , Δ y j ) max k u m ( x k , y k ) + g h m ( x k , y k ) , v m ( x k , y k ) + g h m ( x k , y k ) .
23:
      if  t + τ > T  then
24:
         Adjust τ T t to reach T exactly at the final step.
25:
      end if
26:
      Compute diagonal matrices H m and U m , V m (from h m , u m and v m ).
27:
      Solve the linear system (51) to find solutions for h m + 1 , q 1 m + 1 and q 2 m + 1 .
28:
      Compute updated horizontal velocity u m + 1 q 1 m + 1 h m + 1 .
29:
      Compute updated vertical velocity v m + 1 q 2 m + 1 h m + 1 .
30:
      Advance current simulation time t t + τ .
31:
      Increment iteration index m m + 1 .
32:
end while
33:
return The final solutions h m , u m and v m 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 A x and A y .
  • 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 [ 0 , 1 ] × [ 0 , 1 ] . The bottom topography is defined by
z ( x , y ) = 0.8 exp 50 ( x 0.5 ) 2 + ( y 0.5 ) 2
and the initial water height is h ( x , y , 0 ) = 1 z ( x , y ) with an initial zero velocity.
The simulation was conducted on 30 × 30 grid points with an end time of T = 5 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 2.4977 × 10 6 , 7.7669 × 10 4 and 7.7669 × 10 4 , respectively. To evaluate mass conservation, the total volume was computed using
1 4 [ ( y 2 c ) ( x 2 a ) h 1 m + i = 1 M 2 ( x i + 2 x i ) h i + 1 m + ( d y N 1 ) ( b x M 1 ) h M N m + i = 1 M 2 ( x i + 2 x i ) h M N M + i + 1 m + ( b x M 1 ) ( y 2 c ) h M m + j = 1 N 2 ( y j + 2 y j ) h j M + M m + ( x 2 a ) ( d y N 1 ) h M N M + 1 m + j = 1 N 2 ( y j + 2 y j ) h j M + 1 m + j = 1 N 2 i = 1 M 2 ( x i + 2 x i ) ( y j + 2 y j ) h j M + i + 1 m ] ,
where x 1 , x 2 , x 3 , , x M and y 1 , y 2 , y 3 , , y N are nodal points and M , N are the number of nodal points along the x-axis and y-axis, respectively. h 1 m , h 2 m , h 3 m , , h M N m are the water heights at each time step t m from the simulation. The experimental results indicate that the total water volume exhibited minimal variation, remaining within 10 5 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., z ( x , y ) = 0 . It is defined by
h ( x , y ) = 1 + 0.1 exp 100 ( x 0.5 ) 2 + ( y 0.5 ) 2 .
The computational domain was [ 0 , 1 ] × [ 0 , 1 ] . Simulations for the time interval [ 0 , 0.25 ] 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, h ( x , y , t ) , demonstrated consistency with observations from existing numerical schemes [13].
To provide a consolidated overview of the algorithm’s performance across all test cases, the key findings are summarized in Table 3.

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 10 12 . 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 10 5 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:
CFLCourant–Friedrichs–Lewy
FDMfinite difference method
FIM-CPEfinite integration method with Chebyshev polynomial expansion
FVMfinite volume method
MAEmean average error
PDEpartial differential equation
SBP-SATsummation-by-parts operators with simultaneous approximation terms
SDMspectral difference method
SWEshallow water equation

References

  1. 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]
  2. 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]
  3. George, D.L. Finite Volume Methods and Adaptive Refinement for Tsunami Propagation and Inundation; University of Washington: Seattle, WA, USA, 2006. [Google Scholar]
  4. 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]
  5. 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]
  6. 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]
  7. 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]
  8. Hudson, J. Numerical Techniques for the Shallow Water Equations; University of Reading, Department of Mathematics: Reading, UK, 1999. [Google Scholar]
  9. 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]
  10. 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]
  11. 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]
  12. 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]
  13. Lundgren, L. Efficient Numerical Methods for the Shallow Water Equations. Master’s Thesis, Uppsala University, Uppsala, Sweden, 2018. [Google Scholar]
  14. 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]
  15. 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]
  16. 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]
  17. 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]
  18. Zhang, H.; Ding, F. On the Kronecker Products and Their Applications. J. Appl. Math. 2013, 2013, 296185. [Google Scholar] [CrossRef]
  19. Cyganek, B. Object Detection and Recognition in Digital Images: Theory and Practice; John Wiley & Sons: Hoboken, NJ, USA, 2013. [Google Scholar]
  20. Stoker, J.J. Water Waves: The Mathematical Theory with Applications; Courier Dover Publications: New York, NY, USA, 2019. [Google Scholar]
Figure 1. Physical variables for one- and two-dimensional shallow water models.
Figure 1. Physical variables for one- and two-dimensional shallow water models.
Mathematics 13 02492 g001
Figure 2. The indices of the grid points globally and locally.
Figure 2. The indices of the grid points globally and locally.
Mathematics 13 02492 g002
Figure 3. Water height at time T = 10 s in Example 1.
Figure 3. Water height at time T = 10 s in Example 1.
Mathematics 13 02492 g003
Figure 4. Water height h ( x , t ) at various times T in Example 2.
Figure 4. Water height h ( x , t ) at various times T in Example 2.
Mathematics 13 02492 g004
Figure 5. Graphical solutions with M = 200 at time T = 0.1 in Example 3.
Figure 5. Graphical solutions with M = 200 at time T = 0.1 in Example 3.
Mathematics 13 02492 g005
Figure 6. Graphical solutions for Example 4 (Dam break over a bump) with M = 100 at different times T. (a) Water height h ( x , T ) + z ( x ) . 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 z ( x ) . (b) Water velocity u ( x , T ) . The solid red line is the water velocity and the dashed blue line indicates the zero-velocity axis.
Figure 6. Graphical solutions for Example 4 (Dam break over a bump) with M = 100 at different times T. (a) Water height h ( x , T ) + z ( x ) . 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 z ( x ) . (b) Water velocity u ( x , T ) . The solid red line is the water velocity and the dashed blue line indicates the zero-velocity axis.
Mathematics 13 02492 g006
Figure 7. Log–log plot of the mean absolute error for water height ( MAE h ) 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.
Figure 7. Log–log plot of the mean absolute error for water height ( MAE h ) 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.
Mathematics 13 02492 g007
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 q 1 . (b) The complementary set of boundary points used for the discharge q 2 .
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 q 1 . (b) The complementary set of boundary points used for the discharge q 2 .
Mathematics 13 02492 g008
Figure 9. Analytical solutions for Example 6.
Figure 9. Analytical solutions for Example 6.
Mathematics 13 02492 g009
Figure 10. Water height h ( x , y , T ) at various times T for Example 6.
Figure 10. Water height h ( x , y , T ) at various times T for Example 6.
Mathematics 13 02492 g010
Table 1. Comparisons of exact and numerical solutions at T = 0.1 for Example 3.
Table 1. Comparisons of exact and numerical solutions at T = 0.1 for Example 3.
MFDM [8]Algorithm 1Run Time (s)
MAE h MAE u MAE h MAE u
100 2.02 × 10 2 7.53 × 10 2 4.73 × 10 3 1.65 × 10 2 0.4147
200 1.31 × 10 2 4.82 × 10 2 2.88 × 10 3 1.07 × 10 2 2.6712
300 9.96 × 10 3 3.64 × 10 2 2.05 × 10 3 7.72 × 10 3 8.4295
400 8.15 × 10 3 2.98 × 10 2 1.63 × 10 3 6.19 × 10 3 20.0024
Table 2. Convergence study for the dam break problem at T = 0.1 s.
Table 2. Convergence study for the dam break problem at T = 0.1 s.
Index iNumber of Nodes     ( M i ) MAE for Water Height ( E i ) Order of Convergence ( p i )
150 7.6815 × 10 3 -
2100 4.7312 × 10 3 0.6992
3200 2.8839 × 10 3 0.7142
4400 1.6271 × 10 3 0.8257
5800 8.6563 × 10 4 0.9105
Table 3. Summary of key findings from numerical simulations.
Table 3. Summary of key findings from numerical simulations.
ExampleProblem DescriptionDim.NodesMAE (Height)MAE (Velocity)
1Lake at Rest1D100 6.45 × 10 12 8.49 × 10 13
2Gaussian Pulse1D60Reaches steady state *
3Dam Break (Flat)1D200 2.88 × 10 3 1.07 × 10 2
4Dam Break (Bump)1D100Qualitative match
5Lake at Rest2D 30 × 30 2.50 × 10 6 7.77 × 10 4
6Gaussian Pulse2D 40 × 40 Qualitative match
* Reached steady state within a tolerance of 10 5 . MAE is not applicable. Gives the same behavior as methods in [8]. MAE is not applicable. Behaves consistently with schemes in [13]. MAE is not applicable.
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.

Share and Cite

MDPI and ACS Style

Duangpan, A.; Boonklurb, R.; Apisornpanich, L.; Sutthimat, P. Finite Integration Method with Chebyshev Expansion for Shallow Water Equations over Variable Topography. Mathematics 2025, 13, 2492. https://doi.org/10.3390/math13152492

AMA Style

Duangpan A, Boonklurb R, Apisornpanich L, Sutthimat P. Finite Integration Method with Chebyshev Expansion for Shallow Water Equations over Variable Topography. Mathematics. 2025; 13(15):2492. https://doi.org/10.3390/math13152492

Chicago/Turabian Style

Duangpan, Ampol, Ratinan Boonklurb, Lalita Apisornpanich, and Phiraphat Sutthimat. 2025. "Finite Integration Method with Chebyshev Expansion for Shallow Water Equations over Variable Topography" Mathematics 13, no. 15: 2492. https://doi.org/10.3390/math13152492

APA Style

Duangpan, A., Boonklurb, R., Apisornpanich, L., & Sutthimat, P. (2025). Finite Integration Method with Chebyshev Expansion for Shallow Water Equations over Variable Topography. Mathematics, 13(15), 2492. https://doi.org/10.3390/math13152492

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop