Next Article in Journal
CCO–XGBoost Hybrid Model for Prediction of Blasting-Induced Peak Particle Velocity in Open-Pit Mines: A SHAP-Driven Sensitivity Analysis
Previous Article in Journal
Algorithms for Solving Systems of Boolean Equations Based on the Transformation of Logical Expressions
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Well-Balanced Wet–Dry Front Reconstruction for Two-Layer Shallow Water Flows

1
School of Applied Sciences, Taiyuan University of Science and Technology, Taiyuan 030024, China
2
School of Mathematics and Statistics, Wuhan University, Wuhan 430072, China
Mathematics 2026, 14(4), 595; https://doi.org/10.3390/math14040595
Submission received: 26 November 2025 / Revised: 25 January 2026 / Accepted: 3 February 2026 / Published: 8 February 2026
(This article belongs to the Section E: Applied Mathematics)

Abstract

In this paper, a well-balanced and positivity-preserving scheme for the nonconservative two-layer shallow water equations is developed in the framework of the finite volume method. To address the challenges posed by wet–dry fronts, the focus of our study is on reconstructing them for each layer to ensure a well-balanced property. To this end, a new numerical discretization and a special wet–dry front reconstruction are proposed. In addition, the draining time method is employed to ensure the positivity of the water depth. We prove that the proposed scheme is both well-balanced in steady-state solutions and positivity-preserving. Finally, numerical experiments demonstrate the robustness of the scheme.

1. Introduction

This paper presents a Godunov-type finite volume scheme for the system of two-layer shallow water equations. This system is derived by applying a process of vertical averaging of the physical quantities over each layer’s depth, originating from the compressible isentropic Euler equations. The two layers are assumed to possess distinct, constant densities ( ρ 1 < ρ 2 ) and are treated as immiscible. This density difference is primarily attributed to variations in water salinity. The studied one-dimensional two-layer shallow water system constitutes an extension of the Saint-Venant system [1,2].
The one-dimensional (1D) two-layer shallow water model describes a flow composed of two layers with heights h 1 (upper layer) and h 2 (lower layer) at position x and time t, with corresponding velocities u i and discharges h i u i , where i = 1 , 2 . The two-layer system investigated in this paper is based on the model proposed by Castro et al. [3], which describes a flow in a straight channel with a bottom topography B. It is given by
( h 1 ) t + ( h 1 u 1 ) x = 0 , ( h 1 u 1 ) t + ( h 1 u 1 2 + g 2 h 1 2 ) x = g h 1 B x g h 1 ( h 2 ) x , ( h 2 ) t + ( h 2 u 2 ) x = 0 , ( h 2 u 2 ) t + ( h 2 u 2 2 + g 2 h 2 2 ) x = g h 2 B x g h 2 ( h ^ 1 ) x ,
where g is the gravitational constant; the layers are assumed to have different constant densities ρ 1 < ρ 2 and to be immiscible; r : = ρ 1 ρ 2 is the constant density ration; and h ^ 1 : = r h 1 .
Some of the above methods [3,4,5,6,7,8,9] are well-balanced in the sense that they exactly preserve the stationary steady-state solutions given by
u 1 u 2 0 , h 1 Const , η 2 : = h 2 + B Const .
The system (1) contains nonconservative products that describe momentum exchange between the layers. The presence of these nonconservative products introduces significant challenges in both the theoretical analysis and numerical approximation of nonlinear hyperbolic systems with discontinuities. This is because these nonconservative products lack a rigorous definition within the standard distributional framework, and the usual concept of weak solutions cannot be applied. To overcome this difficulty, following the mathematical theory in [10], the modified Rusanov method [11,12], the compact high-order gas-kinetic scheme [13], the discontinuous Galerkin (DG) method [14], the path-conservative finite volume schemes [15,16,17,18,19,20] and the Godunov-type finite volume scheme [21] have been proposed.
Central-upwind schemes, also known as the finite volume method, were first introduced in [22] and further developed in [23,24,25]. They belong to the class of Riemann-problem-solver free Godunov-type central schemes. In [21], the two-layer shallow water system is reformulated into an equivalent form, which is valid for smooth solutions, that is particularly advantageous for treating the nonconservative products. This approach is predicated on the fact that, in the relevant applications, the fluctuation of the total water level, defined as η 1 : = h 1 + h 2 + B , is relatively small. Consequently, with an appropriate choice of coordinate system, one can assume that η 1 0 (see Figure 1). However, the developed scheme in [21] did not consider the well-balanced property and positivity of fluid depth in the presence of wet–dry fronts, which commonly appears in the natural water system. This motivates the present study, which proposes a novel finite volume scheme designed to achieve a well-balanced property at wet–dry fronts for the two-layer shallow water equations. In the numerical simulation of the two-layer shallow water equations, the flow characteristics near the wet–dry front are highly dependent on the accuracy with which the numerical method reconstructs the front position and morphology. Therefore, despite the different application contexts, the study [26] highlights the importance of interface-capturing methods in enhancing the predictive capability of flow simulations, providing a cross-disciplinary reference for the development of wet–dry front reconstruction schemes in two-layer shallow water equations.
To this end, in this paper, the bottom topography is first replaced with its continuous, piecewise linear approximation. Then, the surface levels and velocities are linearly reconstructed instead of depths and discharges. Cells are classified based on the fluid mass they contain. The reconstruction of wet–dry fronts utilizes the idea of [27]. To guarantee the non-negativity of the fluid depth for each layer, the local draining time step technique in [28,29,30] is extended to the current two-layer system. Accordingly, the discretization of the right-hand side term is correspondingly modified, and the resulting fully discrete scheme is presented.
This paper is organized as follows. In Section 2, a finite volume method for a two-layer shallow water system is developed. In Section 3, a new reconstruction for the two-layer SWEs with wet–dry fronts is proposed. A fully discrete numerical scheme is described in Section 4. Section 5 presents the discretization of the right-hand side term and provides a proof of the well-balanced property for the final discrete scheme. In Section 6, several numerical experiments are conducted to verify the performance of the proposed numerical scheme.

2. A Finite Volume Scheme for the Two-Layer Shallow Water Equations

We begin by rewriting system (1) in terms of the new variable vector U : = ( h 1 , h 1 u 1 , η 2 , h 2 u 2 ) T , where η 2 : = h 2 + B . Consequently, the free surface level of the upper layer fluid is given by η 1 = h 1 + η 2 :
( h 1 ) t + ( h 1 u 1 ) x = 0 , ( h 1 u 1 ) t + ( h 1 u 1 2 + g η 1 h 1 ) x = g η 1 ( h 1 ) x , ( η 2 ) t + ( h 2 u 2 ) x = 0 , ( h 2 u 2 ) t + ( h 2 u 2 ) 2 η 2 B + g 2 η 2 2 g 2 r h 1 2 g B η ^ 1 x = g η ^ 1 B x g η 1 ( h ^ 1 ) x ,
where η ^ 1 = h ^ 1 + η 2 . For smooth solutions, this system is equivalent to the original 1-D system (1).
The system (3) is solved numerically using a new well-balanced and positivity-preserving finite-volume scheme, which was developed for single-layer shallow water equations. We begin by introducing a uniform grid defined by x α : = α Δ x , where Δ x is a small spatial step, and I i denotes the finite volume cells I i : = [ x i 1 2 , x i + 1 2 ] .
The bottom function B is substituted with a continuous, piecewise linear approximation, denoted B ˜ . To this end, we first define
B i + 1 2 : = B ( x i + 1 2 + 0 ) + B ( x i + 1 2 0 ) 2 ,
which in the case of a continuous function B reduces to B i + 1 2 = B ( x i + 1 2 ) , and then we interpolate between these points to obtain
B ˜ ( x ) = B ˜ i ( x ) : = B i 1 2 + ( B i + 1 2 B i 1 2 ) x x i 1 2 Δ x , x i 1 2 x x i + 1 2 .
From (5), we obviously have
B i : = B ˜ ( x i ) = 1 Δ x I i B ˜ ( x ) d x = B i + 1 2 + B i 1 2 2 .
We now introduce the semi-discrete finite-volume scheme. To this end, we first define the corresponding notation for the flux F , the geometric source term S , and the nonconservative products N in system (3):
F ( U , B ) : = h 1 u 1 , h 1 u 1 2 + g η 1 h 1 , h 2 u 2 , ( h 2 u 2 ) 2 η 2 B + g 2 η 2 2 g 2 r h 1 2 g B η ^ 1 T , S ( U , B ) : = ( 0 , 0 , 0 , g η ^ 1 B x ) T , N ( U , B ) : = 0 , g η 1 ( h 1 ) x , 0 , g η 1 ( h ^ 1 ) x T .
Using these notations, Equation (3) can be semi-discretized into the following system of ODEs:
d d t U ¯ i ( t ) = F i + 1 2 ( t ) F i 1 2 ( t ) Δ x + S ¯ i ( t ) + N ¯ i ( t ) : = R i ( t ) ,
where U ¯ i ( t ) is the numerical approximation of the solution average over the corresponding cell I i ,
U ¯ i ( t ) 1 Δ x I i U ( x , t ) d x , U : = ( h 1 , h 1 u 1 , η 2 , h 2 u 2 ) T .
Here, F i + 1 2 denotes the numerical flux, while S ¯ i and N ¯ i represent the discrete approximations of the cell-averages of the source and nonconservative product terms, respectively:
S ¯ i ( t ) 1 Δ x I i S ( U ( x , t ) , B ( x ) ) d x , N ¯ i ( t ) 1 Δ x I i N ( U ( x , t ) , B ( x ) ) d x .
The numerical flux F i + 1 2 is
F i + 1 2 ( t ) = a i + 1 2 + F ( U i + 1 2 , B i + 1 2 ) a i + 1 2 F ( U i + 1 2 + , B i + 1 2 ) a i + 1 2 + a i + 1 2 + a i + 1 2 + a i + 1 2 a i + 1 2 + a i + 1 2 [ U i + 1 2 + U i + 1 2 ] ,
where B i + 1 2 is defined in (4). The value U i + 1 2 ± denotes the left and right limit values of the solution U ( x ) at x = x i + 1 2 , which are obtained through piecewise polynomial reconstruction. The specific expression of U ( x ) is provided in (48). Since this paper focuses on the wet–dry front problem, the detailed reconstruction procedures will be discussed in the subsequent sections.
The local velocity at point x i + 1 2 is
a i + 1 2 + = max ( λ 1 ± ) i + 1 2 , ( λ 2 ± ) i + 1 2 , ( λ 3 ± ) i + 1 2 , ( λ 4 ± ) i + 1 2 , ( u 1 ± ) i + 1 2 , ( u 2 ± ) i + 1 2 , 0 , a i + 1 2 = min ( λ 1 ± ) i + 1 2 , ( λ 2 ± ) i + 1 2 , ( λ 3 ± ) i + 1 2 , ( λ 4 ± ) i + 1 2 , ( u 1 ± ) i + 1 2 , ( u 2 ± ) i + 1 2 , 0 ,
where
λ 1 , 2 ( h 1 , u 1 , h 2 , u 2 ) h 1 u 1 + h 2 u 2 h 1 + h 2 ± g ( h 1 + h 2 ) , λ 3 , 4 ( h 1 , u 1 , h 2 , u 2 ) h 1 u 2 + h 2 u 1 h 1 + h 2 ± ( 1 r ) g h 1 h 2 h 1 + h 2 1 ( u 2 u 1 ) 2 ( 1 r ) g ( h 1 + h 2 ) .
Remark 1.
From (13), it follows that the system (3) is hyperbolic under the condition that
( u 2 u 1 ) 2 < ( 1 r ) g ( h 1 + h 2 ) ,
and this implies that system (3) is only conditionally hyperbolic.
When condition (14) is not satisfied, the local speeds cannot be directly computed using formula (12). However, the system (3) may still remain hyperbolic, although Equation (13) is only valid under the approximations u 1 u 2 and r 1 . Deviating from these approximations can lead the system into a “weakly” elliptic regime, where numerical stability can be restored by overestimating the local speeds a i + 1 2 ± to introduce numerical viscosity. To this end, we rewrite the characteristic equation into the standard form of a quartic polynomial:
λ 4 + c 1 λ 3 + c 2 λ 2 + c 3 λ + c 4 = 0 ,
where coefficients
c 1 = 2 ( u 1 + u 2 ) , c 2 = ( u 1 + u 2 ) 2 + 2 u 1 u 2 g ( h 1 + h 2 ) , c 3 = 2 u 1 u 2 ( u 1 + u 2 ) + 2 g ( u 1 h 2 + u 2 h 1 ) , c 4 = u 1 2 u 2 2 g u 1 2 h 2 + u 2 2 h 1 + g 2 ( 1 r ) h 1 h 2 .
By applying the Lagrange theorem, we estimate the upper bound λ max of the largest non-negative root, and a similar approach gives the lower bound λ min of the smallest non-positive root. The one-sided bounds of the local speeds are then given by
a i + 1 2 + = max ± { λ max ( ( h 1 ) i + 1 2 ± , ( h 2 ) i + 1 2 ± , ( u 1 ) i + 1 2 ± , ( u 2 ) i + 1 2 ± ) } , a i + 1 2 = min ± { λ min ( ( h 1 ) i + 1 2 ± , ( h 2 ) i + 1 2 ± , ( u 1 ) i + 1 2 ± , ( u 2 ) i + 1 2 ± ) } .
This approach ensures numerical stability in the “weakly” elliptic regime by overestimating the wave speeds.

3. A New Reconstruction for Two-Layer SWEs with Wet–Dry Fronts

A novel specialized treatment is designed in this section to maintain the well-balanced property of the two-layer shallow water equations in the presence of wet–dry fronts, thereby completing the semi-discrete scheme given in (8).

3.1. Piecewise Linear Reconstruction for Flux Variables

To achieve a well-balanced property and effectively handle both wet and dry processes, this section first performs a piecewise linear reconstruction for any scalar q { η 1 , u 1 , η 2 , u 2 } . The reconstruction of η 1 and η 2 using (18)–(23) contributes to obtaining a well-balanced property. The piecewise linear reconstruction function is given as follows:
q i # ( x ) : = q ¯ i + Δ mm q i Δ x ( x x i ) , x i 1 2 < x < x i + 1 2 ,
where q represents any variable in { η 1 , u 1 , η 2 , u 2 } , and its cell increment is
Δ mm q i = minmod θ q ¯ i q ¯ i 1 , q ¯ i + 1 q ¯ i 1 2 , θ q ¯ i + 1 q ¯ i , θ [ 1 , 2 ] .
Here, θ = 1.2 , and the minmod function is defined as
minmod ( z 1 , z 2 , ) : = min i { z i } , z i > 0 i , max i { z i } , z i < 0 i ,   0 , otherwise ,
where
( η ¯ 1 ) i = ( h ¯ 1 ) i + ( η ¯ 2 ) i .
We use the following velocity formula [31] to avoid division by very small water depths:
( u ¯ k ) i : = 2 · ( h ¯ k ) i · ( h k u k ¯ ) i ( h ¯ k ) i 4 + max ( ( h ¯ k ) i 4 , ξ ) , k = 1 , 2 ,
where ξ is a small positive constant. In our numerical experiments, ξ = ( Δ x ) 4 ,
( h ¯ 2 ) i = ( η ¯ 2 ) i B i .

3.2. Correction of Surface Reconstruction for Two-Layer Fluid Systems

Section 3.1 reconstructs the free surfaces η 1 and η 2 of the upper and lower fluids, respectively. As shown in Figure 2, the finite volume scheme described in the previous section may lead to the following issues in the presence of dry areas.
Discontinuities at x = x i 1 2 , x = x i + 1 2 , and x = x i + 3 2 induce spurious waves that destabilize the equilibrium, while negative lower-layer depths arise at x = x i + 1 2 when ( η 2 ) i + 1 2 < B i + 1 2 , with analogous situations occurring at x = x i + 3 2 and x = x i + 5 2 . The upper layer exhibits similar discontinuities and negative depths in cell I i + 1 , and non-physical reconstructions in cell I i + 2 further generate artificial waves and negative depths.
To address the issues mentioned above, we propose an alternative correction procedure, which will be both positivity preserving and well-balanced even in the presence of dry areas. To this end, we first define the following six types of computational cells at a certain time level t, which are as follows.
For the lower layer:
  • Type 1: Fully flooded cell: ( h ¯ 2 ) i 1 2 | B i + 1 2 B i 1 2 | ,
  • Type 2: Partially flooded cell: 1 2 | B i + 1 2 B i 1 2 | > ( h ¯ 2 ) i > 0 ,
  • Type 3: Dry cell: ( h ¯ 2 ) i = 0 ,
For the entire fluid column:
  • Type 4: Fully flooded cell: ( h ¯ 1 ) i + ( h ¯ 2 ) i 1 2 | B i + 1 2 B i 1 2 | ,
  • Type 5: Partially flooded cell: 1 2 | B i + 1 2 B i 1 2 | > ( h ¯ 1 ) i + ( h ¯ 2 ) i > 0 ,
  • Type 6: Dry cell: ( h ¯ 1 ) i + ( h ¯ 2 ) i = 0 ,
where ( h ¯ 2 ) i is the cell average value of the lower layer fluid in the cell I i , ( h ¯ 2 ) i + ( h ¯ 1 ) i is the cell average value of the entire fluid in the cell I i , and 1 2 | B i + 1 2 B i 1 2 | represents the critical value distinguishing between fully and partially flooded cells.
Remark 2.
The aforementioned cell classification considers the entire fluid rather than the upper layer alone. This approach avoids the more complex combination of upper and lower fluid layers, representing one of the key concepts in the currently proposed numerical schemes.
Remark 3.
It should be noted that, due to the presence of two fluid layers, each computational cell possesses two classifications: one from the first three types (Type 1–Type 3) and another from the latter three types (Type 4–Type 6).
  • Step 1: Reconstruct the lower layer fluid using the method from [27]:
  • In the lower fluid layer, the cell I i is a fully flooded cell ( ( h ¯ 2 ) i > 1 2 | Δ B i | ) , i.e., it belongs to Type 1. The corrected water depth expression is as follows:
    ( h ˜ 2 ) i ( x ) = ( h ¯ 2 ) i + Δ ( h 2 ) i Δ x ( x x i ) ,
    where
    Δ ( h 2 ) i : = max ( min ( Δ mm ( η 2 ) i Δ B i , 2 ( h ¯ 2 ) i ) , 2 ( h ¯ 2 ) i ) ,
    so the layer interface is
    ( η ˜ 2 ) i ( x ) = ( h ˜ 2 ) i ( x ) + B ˜ i ( x ) .
  • In the Type 2 cell ( 0 < ( h ¯ 2 ) i 1 2 | Δ B i | ) , assuming that water is distributed in the lower region of the bottom while the higher region remains dry, without loss of generality, we consider an increasing bottom: B i 1 2 < B i + 1 2 . The expression for the layer interface is then given by
    ( η ˜ 2 ) i ( x ) = ( h 2 ) i 1 2 + x i x Δ x i wet + B ˜ i ( x ) , x < x i , B ˜ i ( x ) , x x i ,
    where ( h 2 ) i 1 2 + : = ( η 2 ) i 1 2 + B i 1 2 denotes the water depth at the wet vertex x i 1 2 of the cell I i , x i represents the position of the wet–dry front, and Δ x i wet : = x i x i 1 2 is the length of the wet subregion [ x i 1 2 , x i ) within the cell. In the following, we will define ( η 2 ) i 1 2 + and x i sequentially.
    (1)
    First, we define the value ( η 2 ) i 1 2 + at the left edge x i 1 2 of the cell I i , with the specific form given by
    ( η 2 ) i 1 2 + : = max min w ˜ , ( η 2 ) i Flat , 2 ( h ¯ 2 ) i + B i 1 2 ,
    where ( η 2 ) i Flat denotes the steady free surface of the lower layer fluid, i.e., the water is at rest, expressed as
    ( η 2 ) i Flat : = B i 1 2 + 2 ( h ¯ 2 ) i | Δ B i | .
    The extrapolated value w ˜ is computed starting from the left neighboring cell I i 1 under the condition that it is fully filled with water. Specifically, the expression for calculating w ˜ is given by
    w ˜ : = ( η ˜ 2 ) i 1 ( x i 1 2 ) , ( h ¯ 2 ) i 1 > 1 2 | Δ B i 1 | , ( η 2 ) i Flat , otherwise .
    (2)
    Next, the wet–dry front x i is reconstructed. Using the conservation of water mass within this cell, we obtain
    Δ x · ( h ¯ 2 ) i = 1 2 Δ x i wet · ( h 2 ) i 1 2 + ,
    then the length of the wet sub-interval within the cell can be determined, thereby locating the position of the wet–dry front:
    Δ x i wet = Δ x 2 ( h ¯ 2 ) i ( h 2 ) i 1 2 + , x i = x i 1 2 + Δ x i wet .
    The inequality Δ x i wet Δ x indicates the presence of the wet–dry front within the cell.
    Thus the wet–dry front reconstruction is completed, and a similar procedure is applied for the case where B i 1 2 > B i + 1 2 .
  • When the cell I i belongs to Type 3, i.e., ( h ¯ 2 ) i = 0 in cell I i , we directly set
    ( η ˜ 2 ) i ( x ) = B ˜ i ( x ) .
  • Step 2: Correction of the surface reconstruction for the upper layer fluid.
  • In the fully flooded cell ( ( h ¯ 1 ) i + ( h ¯ 2 ) i > 1 2 | Δ B i | ) , i.e., the cell I i belongs to Type 4, the water surface reconstruction for the lower layer ( η ˜ 2 ) i ( x ) has been completed. Denote ( η 2 ) i + 1 2 and ( η 2 ) i 1 2 + as the reconstructed water surface values of the lower layer at the two endpoints of the cell I i . Assuming the current water surface values of the upper layer at the two endpoints are ( η 1 ) i + 1 2 # and ( η 1 ) i 1 2 + # , two cases need to be discussed:
    (1)
    If ( η 1 ) i + 1 2 # > ( η 2 ) i + 1 2 and ( η 1 ) i 1 2 + # > ( η 2 ) i 1 2 + , the water surface requires no correction, we let
    ( η 1 ) i + 1 2 : = ( η 1 ) i + 1 2 # , ( η 1 ) i 1 2 + : = ( η 1 ) i 1 2 + # .
    (2)
    Otherwise, the reconstructed upper-layer water depth at the cell interface is negative; a case-by-case analysis is required.
    If ( η 1 ) i + 1 2 # < ( η 2 ) i + 1 2 , ⟹
    ( η 1 ) i + 1 2 : = ( η 2 ) i + 1 2 , ( η 1 ) i 1 2 + : = 2 ( h ¯ 1 ) i + ( η 2 ) i 1 2 + ;
    If ( η 1 ) i 1 2 + # < ( η 2 ) i 1 2 + , ⟹
    ( η 1 ) i 1 2 + : = ( η 2 ) i 1 2 + , ( η 1 ) i + 1 2 : = 2 ( h ¯ 1 ) i + ( η 2 ) i + 1 2 .
    The expression for the free surface is
    ( η ˜ 1 ) i ( x ) = ( η ¯ 1 ) i + Δ ( η 1 ) i Δ x ( x x i ) , with Δ ( η 1 ) i : = ( η 1 ) i + 1 2 ( η 1 ) i 1 2 + .
  • In the partially flooded cell ( 0 < ( h ¯ 1 ) i + ( h ¯ 2 ) i 1 2 | Δ B i | ) , i.e., the cell I i of Type 5, the water is assumed to occupy the lower part of the bottom, while the higher part remains dry. Without loss of generality, we consider the case where B i 1 2 < B i + 1 2 . The expression for the free surface is then given as follows:
    ( η ˜ 1 ) i ( x ) = ( h 1 ) i 1 2 + x i x x i x i 1 2 + ( η ˜ 2 ) i ( x ) , x < x i , ( η ˜ 2 ) i ( x ) , x x i ,
    where ( h 1 ) i 1 2 + : = ( η 1 ) i 1 2 + ( η 2 ) i 1 2 + , ( η 2 ) i 1 2 + is the values defined in (28), x i denotes the position of the wet–dry front at the free surface, we will proceed to define ( η 1 ) i 1 2 + and x i sequentially.
    (1)
    We first define ( η 1 ) i 1 2 + as the free surface value at the cell edge x i 1 2 ,
    ( η 1 ) i 1 2 + : = min η a , max w ˜ 1 , η b ,
    where the extrapolated value w ˜ 1 is obtained using the endpoint value from the left neighbor cell I i 1 under the fully flooded state; Specifically, the expression for w ˜ 1 is given by
    w ˜ 1 : = ( η ˜ 1 ) i 1 ( x i 1 2 ) , ( h ¯ 1 ) i 1 + ( h ¯ 2 ) i 1 > 1 2 | Δ B i 1 | , ( η 1 ) i Flat , otherwise .
    Here, ( η 1 ) i Flat represents the free surface level when the entire fluid is in the static steady state, given by
    ( η 1 ) i Flat : = B i 1 2 + 2 ( ( h ¯ 1 ) i + ( h ¯ 2 ) i ) | Δ B i | .
    Next, we determine the upper bound η a and lower bound η b for ( η 1 ) i 1 2 + . According to the mass conservation of water, their expressions are given as follows:
    η a = B i 1 2 + 2 Δ x ( ( h ¯ 1 ) i + ( h ¯ 2 ) i ) Δ x a , η b = B i 1 2 + 2 Δ x ( ( h ¯ 1 ) i + ( h ¯ 2 ) i ) Δ x b ,
    where Δ x a = a x i 1 2 and Δ x b = b x i 1 2 . We next proceed to determine the values of a and b. First, b is set as min ( x i + 1 2 , b ) , where the value of b is calculated as follows:
    b = x i 1 2 + 2 Δ x ( ( h ¯ 1 ) i + ( h ¯ 2 ) i ) ( η 2 ) i 1 2 + B i 1 2 ,
    where ( η 2 ) i 1 2 + is the surface value of the lower layer fluid at the endpoint x i 1 2 , defined by (28), the mass conservation law then gives Δ x ( ( h ¯ 1 ) i + ( h ¯ 2 ) i ) = 1 2 Δ x ( ( η 2 ) i 1 2 + B i 1 2 ) .
    Next, we define a = max ( x i , x ¯ i ) , where x i denotes the wet–dry front position of the lower layer after the first reconstruction step as given in (32), and x ¯ i represents the wet–dry front position of the entire fluid at the static steady state.
    The position of the wet–dry front under static state steady condition is
    x ¯ i = x i 1 2 + 2 ( ( h ¯ 1 ) i + ( h ¯ 2 ) i ) | Δ B i | Δ x .
    Therefore, the values of a and b are
    b = min x i + 1 2 , x i 1 2 + 2 Δ x ( ( h ¯ 1 ) i + ( h ¯ 2 ) i ) ( η 2 ) i 1 2 + B i 1 2 , a = max x i , x i 1 2 + 2 ( ( h ¯ 1 ) i + ( h ¯ 2 ) i ) | Δ B i | Δ x ,
    and the corresponding η a and η b are determined, thereby yielding ( η 1 ) i 1 2 + .
    (2)
    The wet–dry front position for linear surface reconstruction over the entire fluid is
    x i = x i 1 2 + Δ x 2 ( ( h ¯ 1 ) i + ( h ¯ 2 ) i ) ( η 1 ) i 1 2 + ( η 2 ) i 1 2 + .
    From (39), it can be deduced that x i [ a , b ] , and since [ a , b ] I i , the wet–dry front must exist within the cell.
    The reconstruction is thus completed. A similar procedure applies to the case when B i 1 2 > B i + 1 2 .
  • For the Type 6, where ( h ¯ 1 ) i + ( h ¯ 2 ) i = 0 in cell I i , we directly set
    ( η ˜ 1 ) i ( x ) = B ˜ i ( x ) .
In summary, using (26)–(47), the reconstructed solution takes the form
U ( x ) = ( η ˜ 1 ) i ( x ) ( η ˜ 2 ) i ( x ) ( u 1 ) i # ( x ) ( η ˜ 1 ) i ( x ) ( η ˜ 2 ) i ( x ) ( η ˜ 2 ) i ( x ) ( u 2 ) i # ( x ) ( η ˜ 2 ) i ( x ) B ˜ i ( x ) , x i 1 2 < x < x i + 1 2 ,
where ( h ˜ 1 ) i ( x ) = ( η ˜ 1 ) i ( x ) ( η ˜ 2 ) i ( x ) , ( h ˜ 2 ) i ( x ) = ( η ˜ 2 ) i ( x ) B ˜ i ( x ) , the reconstructed solution U ( x ) will be used for the fully discrete scheme in Section 4 and the discretization of the right-hand side in Section 5.

4. Fully Discrete Numerical Scheme

This section presents the numerical approximation of the temporal derivatives to obtain a fully discrete scheme for (8). To prevent numerical instabilities, a CFL-like condition can be used to estimate the global time step size Δ x :
Δ t = μ Δ x max i ( | a i + 1 2 + | , | a i + 1 2 | ) ,
where a CFL number μ = 0.5 is used in the current study.
The strong-stability-preserving, two-stage Runge–Kutta (SSP-RK2) method [32] is used for time discretization to attain second-order accuracy while preserving strong stability. The method constructs the solution through a convex combination of forward Euler steps, it reads
U ¯ i FE = U ¯ i + Δ t · R i .
A desirable property of a robust numerical model is the preservation of positive fluid depth for each layer, that is
( h ¯ 1 ) i n + 1 = ( h ¯ 1 ) i n Δ t Δ x [ F i + 1 2 ( 1 ) F i 1 2 ( 1 ) ] 0 , ( h ¯ 2 ) i n + 1 = ( h ¯ 2 ) i n Δ t Δ x [ F i + 1 2 ( 3 ) F i 1 2 ( 3 ) ] 0 ,
providing that ( h ¯ 1 ) i n 0 and ( h ¯ 2 ) i n 0 at t = t n .
The global time step Δ t , determined by the stability constraint (49), fails to ensure positive layer depths (51) at wet–dry fronts. While using a sufficiently small Δ t can enforce positivity, it often results in a prohibitive computational cost. To overcome this and efficiently guarantee positivity, we extend the draining time-step strategy of Bollermann et al. [28]. This approach defines a local time step Δ t i + 1 2 for each cell interface, derived from Δ t and the local draining time step Δ t i drain for all i.
We can first introduce the local draining time step for each layer in a cell, i.e.,
( Δ t 1 ) i drain = ( h ¯ 1 ) i n Δ x max ( 0 , F i + 1 2 ( 1 ) ) + max ( 0 , F i 1 2 ( 1 ) ) , ( Δ t 2 ) i drain = ( h ¯ 2 ) i n Δ x max ( 0 , F i + 1 2 ( 3 ) ) + max ( 0 , F i 1 2 ( 3 ) ) ,
which represent the time required for the complete draining of the water initially stored in the cell I i through outflow across the cell interfaces at t = t n , for the upper and lower layers, respectively.
Next, based on ( Δ t 1 ) i drain and ( Δ t 2 ) i drain , and the upwind direction of the fluxes F i + 1 2 ( 1 ) and F i + 1 2 ( 3 ) , the interfacial draining time step ( Δ t k ) i + 1 2 ,   k = 1 , 2 for each cell interface can be estimated by
( Δ t 1 ) i + 1 2 : = min [ Δ t , ( Δ t 1 ) i drain ] , if F i + 1 2 ( 1 ) 0 , min [ Δ t , ( Δ t 1 ) i + 1 drain ] , if F i + 1 2 ( 1 ) < 0 , ( Δ t 2 ) i + 1 2 : = min [ Δ t , ( Δ t 2 ) i drain ] , if F i + 1 2 ( 3 ) 0 , min [ Δ t , ( Δ t 2 ) i + 1 drain ] , if F i + 1 2 ( 3 ) < 0 ,
respectively.
Note that (53) should be updated in each Runge–Kutta stage (50) to preserve non-negativity and well-balanced properties. Correspondingly, R i in (8) is given by
R i ( m ) = ( Δ t 1 ) i + 1 2 F i + 1 2 ( m ) ( Δ t 1 ) i 1 2 F i 1 2 ( m ) Δ t · Δ x + S ¯ i ( m ) + N ¯ i ( m ) , m = 1 , 2 , R i ( m ) = ( Δ t 2 ) i + 1 2 F i + 1 2 ( m ) ( Δ t 2 ) i 1 2 F i 1 2 ( m ) Δ t · Δ x + S ¯ i ( m ) + N ¯ i ( m ) , m = 3 , 4 .

5. Discretization of the Right-Hand Side

To obtain a well-balanced numerical scheme, it is necessary to discretize the right-hand side of system (3) after reconstructing the solution (48). The right-hand side includes the source term S ¯ i and the nonconservative term N ¯ i in (10), both of which will be discussed separately in this section.
For q { h 1 , η 1 , η ^ 1 , η 2 } , the value of q at a point within the cell I i is expressed in this section as
q ˜ i ( x i 1 2 + 0 ) = q i 1 2 + , q ˜ i ( x i + 1 2 0 ) = q i + 1 2 , q ˜ i ( x i ) = q i , q ˜ i ( x i ) = q i .
Here, x i denotes the position of the wet–dry front in the lower layer fluid, while x i represents the position of the wet–dry front in the upper layer fluid.
We now discretize the nonconservative product term N ¯ i (omitting the dependence on time t). As shown in Figure 3, we first introduce some notations: Δ ( h 1 ) i + 1 2 : = ( h 1 ) i + 1 2 ( h 1 ) i , Δ ( h 1 ) i 1 2 : = ( h 1 ) i ( h 1 ) i 1 2 + , Δ ( h 1 ) i + 1 2 : = ( h 1 ) i + 1 2 ( h 1 ) i , Δ ( h 1 ) : = ( h 1 ) i ( h 1 ) i , Δ ( h 1 ) : = ( h 1 ) i ( h 1 ) i , Δ ( h 1 ) i 1 2 : = ( h 1 ) i ( h 1 ) i 1 2 + , the discrete form of N ¯ i ( 2 ) is given as follows:
N ¯ i ( 2 ) = g Δ x ( η 1 ) i + 1 2 + ( η 1 ) i 2 Δ ( h 1 ) i + 1 2 + ( η 1 ) i 1 2 + + ( η 1 ) i 2 Δ ( h 1 ) i 1 2 , Figure   3 c , d , g Δ x ( η 1 ) i + ( η 1 ) i 2 Δ ( h 1 ) + ( η 1 ) i + ( η 1 ) i 1 2 + 2 Δ ( h 1 ) i 1 2 , Figure   3 e , g Δ x ( η 1 ) i + 1 2 + ( η 1 ) i 2 Δ ( h 1 ) i + 1 2 + ( η 1 ) i + ( η 1 ) i 2 Δ ( h 1 ) , Figure   3 f , g Δ x ( η 1 ) i + ( η 1 ) i 1 2 + 2 Δ ( h 1 ) i 1 2 , Figure   3 g , g Δ x ( η 1 ) i + 1 2 + ( η 1 ) i 2 Δ ( h 1 ) i + 1 2 , Figure   3 h , g · ( η 1 ) i + 1 2 + ( η 1 ) i 1 2 + 2 · ( h 1 ) i + 1 2 ( h 1 ) i 1 2 + Δ x , otherwise .
After the discretization of N ¯ i ( 2 ) is completed, the discrete form of N ¯ i ( 4 ) is correspondingly given by
N ¯ i ( 4 ) = r · N ¯ i ( 2 ) .
The discretization of the nonconservative product term in this two-layer model implicitly selects a symmetric straight-line integration path that is restricted to the subspace of wet-cell states. This path connects the average states of locally wet cells (and the wet-side states at wet–dry fronts as defined in (55)), excluding dry cell states entirely from both the averaging of η 1 and the differencing of h 1 . This choice constitutes a hydrostatically consistent wet-cell closure, physically interpreting the nonconservative term as the momentum exchange between layers that respects hydrostatic pressure balance only where fluid is present. This regularization avoids spurious coupling between wet and dry regions, a common source of numerical instability in wet–dry shallow water models.
Next, we discuss the discretization of the source term. As shown in Figure 3, B i and B i represent the values of the bottom function B ˜ ( x ) at points x i and x i , respectively. We introduce the following notation: Δ B i + 1 2 : = B i + 1 2 B i , Δ B i 1 2 : = B i B i 1 2 , Δ B i + 1 2 : = B i + 1 2 B i , Δ B : = B i B i , Δ B : = B i B i , Δ B i 1 2 : = B i B i 1 2 . The source term is discretized as follows:
S ¯ i ( 4 ) = g Δ x ( η ^ 1 ) i + 1 2 + ( η ^ 1 ) i 2 Δ B i + 1 2 + ( η ^ 1 ) i 1 2 + + ( η ^ 1 ) i 2 Δ B i 1 2 , Figure   3 c , d , g Δ x S i + 1 2 + ( η ^ 1 ) i + ( η ^ 1 ) i 2 Δ B + ( η ^ 1 ) i + ( η ^ 1 ) i 1 2 + 2 Δ B i 1 2 , Figure   3 e , g Δ x ( η ^ 1 ) i + 1 2 + ( η ^ 1 ) i 2 Δ B i + 1 2 + ( η ^ 1 ) i + ( η ^ 1 ) i 2 Δ B + S i 1 2 , Figure   3 f , g Δ x S i + 1 2 + ( η ^ 1 ) i + ( η ^ 1 ) i 1 2 + 2 Δ B i 1 2 , Figure   3 g , g Δ x ( η ^ 1 ) i + 1 2 + ( η ^ 1 ) i 2 Δ B i + 1 2 + S i 1 2 , Figure   3 h , g · ( η ^ 1 ) i + 1 2 + ( η ^ 1 ) i 1 2 + 2 · B i + 1 2 B i 1 2 Δ x , otherwise .
Specifically, S i + 1 2 and S i 1 2 are defined as follows:
S i + 1 2 : = B i + 1 2 + B i 2 Δ B i + 1 2 , S i 1 2 : = B i + B i 1 2 2 Δ B i 1 2 .
The discretization of the right-hand side is presented above. In this section, the definition of the stationary steady-state solution is provided.
Definition 1.
In the presence of wet–dry fronts, the static steady-state solution for a two-layer shallow water system can be defined by the following expressions:
u 1 = u 2 0 , η 1 : = h 1 + η 2 max ( Const 1 , η 2 ) , η 2 max ( Const 2 , B ) .
Theorem 1.
The proposed fully discrete scheme (8)–(11), (56)–(58), and (4), (12)–(13) is well-balanced for the two-layer shallow water system (3), provided that the residual term (54) vanishes at time t = t n , i.e., R i = 0 , i , which corresponds to the steady-state solution (60).
Proof of Theorem 1.
We need to analyze each case to ensure that the numerical flux in all cells precisely balances the discretization of the right-hand side (nonconservative product term plus source term). Under steady-state conditions, we have ( h 1 u 1 ) i ± 1 2 = ( h 2 u 2 ) i ± 1 2 = 0 , which results in the draining time step being equal to the global time step ( Δ t 1 ) i drain = ( Δ t 2 ) i drain = Δ t .
Under steady-state conditions, due to the piecewise linear reconstruction of the variables in Equations (18)–(21) and the water surface correction (wet–dry front reconstruction) in Section 3.2, the following expression can be obtained from (48):
( η 2 ) i + 1 2 + = ( η 2 ) i + 1 2 : = ( η 2 ) i + 1 2 , ( h 1 ) i + 1 2 + = ( h 1 ) i + 1 2 : = ( h 1 ) i + 1 2 , ( η 1 ) i + 1 2 + = ( η 1 ) i + 1 2 : = ( η 1 ) i + 1 2 , ( η ^ 1 ) i + 1 2 + = ( η ^ 1 ) i + 1 2 : = ( η ^ 1 ) i + 1 2 .
Under steady-state conditions, we have ( h 1 u 1 ) i + 1 2 ± = ( h 2 u 2 ) i + 1 2 ± = 0 . Moreover, since U i + 1 2 = U i + 1 2 + : = U i + 1 2 and the flux F i + 1 2 ( t ) is consistent, it follows that F i + 1 2 ( t ) = ( 0 , ( g η 1 h 1 ) i + 1 2 , 0 , ( g 2 η 2 2 g 2 r h 1 2 g B η ^ 1 ) i + 1 2 ) . Thus, F i + 1 2 ( 1 ) = 0 and F i + 1 2 ( 3 ) = 0 , and we only need to consider the second and fourth components of the system.
(1) If the cell I i is fully flooded in both the lower and upper layers, as shown in Figure 3a,b, we first analyze the second component of the system as follows:
F i + 1 2 ( 2 ) ( t ) F i 1 2 ( 2 ) ( t ) Δ x = ( g η 1 h 1 ) i + 1 2 ( g η 1 h 1 ) i 1 2 Δ x = 0 ,
and since it is a fully flooded cell, we have ( η 1 ) i 1 2 = ( η 1 ) i + 1 2 , ( h 1 ) i + 1 2 = ( h 1 ) i 1 2 ,
N ¯ i ( 2 ) ( t ) = g · ( η 1 ) i + 1 2 + ( η 1 ) i 1 2 + 2 · ( h 1 ) i + 1 2 ( h 1 ) i 1 2 + Δ x = 0 .
Hence, from (62) and (63), we have
F i + 1 2 ( 2 ) ( t ) F i 1 2 ( 2 ) ( t ) Δ x = N ¯ i ( 2 ) ( t ) .
Next, we discuss the fourth component of the system:
F i + 1 2 ( 4 ) ( t ) F i 1 2 ( 4 ) ( t ) Δ x = ( g 2 η 2 2 g 2 r h 1 2 g B η ^ 1 ) i + 1 2 ( g 2 η 2 2 g 2 r h 1 2 g B η ^ 1 ) i 1 2 Δ x   = g C 3 B i + 1 2 B i 1 2 Δ x ,
where ( η 2 ) i + 1 2 = ( η 2 ) i 1 2 , ( h 1 ) i + 1 2 = ( h 1 ) i 1 2 , ( η ^ 1 ) i + 1 2 = ( η ^ 1 ) i 1 2 : = C 3 . For the right-hand side term,
S ¯ i ( 4 ) ( t ) + N ¯ i ( 4 ) ( t ) = g ( η ^ 1 ) i + 1 2 + ( η ^ 1 ) i 1 2 + 2 · B i + 1 2 B i 1 2 Δ x   r g ( η 1 ) i + 1 2 + ( η 1 ) i 1 2 + 2 · ( h 1 ) i + 1 2 ( h 1 ) i 1 2 + Δ x   = g C 3 B i + 1 2 B i 1 2 Δ x .
Combining (65) and (66) yields
F i + 1 2 ( 4 ) ( t ) F i 1 2 ( 4 ) ( t ) Δ x = S ¯ i ( 4 ) ( t ) + N ¯ i ( 4 ) ( t ) .
(2) If the cell I i is partially flooded in the lower layer and fully flooded in the entire fluid, as shown in Figure 3c, i.e., ( η 1 ) i 1 2 = ( η 1 ) i + 1 2 = ( η 1 ) i = C 1 , where ( η 1 ) i and ( h 1 ) i represent the corresponding values at the wet–dry front x i , respectively, then
F i + 1 2 ( 2 ) ( t ) F i 1 2 ( 2 ) ( t ) Δ x = ( g η 1 h 1 ) i + 1 2 ( g η 1 h 1 ) i 1 2 Δ x = g C 1 ( h 1 ) i + 1 2 ( h 1 ) i 1 2 Δ x ,
For the nonconservative product term,
N ¯ i ( 2 ) ( t ) = g Δ x ( η 1 ) i + 1 2 + ( η 1 ) i 2 ( h 1 ) i + 1 2 ( h 1 ) i   + g Δ x ( η 1 ) i 1 2 + + ( η 1 ) i 2 ( h 1 ) i ( h 1 ) i 1 2 +   = g C 1 ( h 1 ) i + 1 2 ( h 1 ) i 1 2 Δ x ,
then we obtain (64), which completes the proof for the second component. Next, we analyze the fourth component of the system:
F i + 1 2 ( 4 ) ( t ) F i 1 2 ( 4 ) ( t ) Δ x = ( g 2 η 2 2 g 2 r h 1 2 g B η ^ 1 ) i + 1 2 ( g 2 η 2 2 g 2 r h 1 2 g B η ^ 1 ) i Δ x   + ( g 2 η 2 2 g 2 r h 1 2 g B η ^ 1 ) i ( g 2 η 2 2 g 2 r h 1 2 g B η ^ 1 ) i 1 2 Δ x   = I + II .
Next, discussions will be conducted on Part I and Part II separately. For Part II , a detailed analysis will be presented subsequently. We first focus on Part I , with the analysis presented as follows:
I = 1 Δ x ( g 2 B 2 g 2 r h 1 2 g r B h 1 ) i + 1 2 ( g 2 B 2 g 2 r h 1 2 g r B h 1 ) i   = 1 Δ x g 2 ( B i + B i + 1 2 ) ( B i + 1 2 B i ) g r ( B h 1 ) i + 1 2 + g r ( B h 1 ) i   + 1 Δ x g r 2 ( ( h 1 ) i + ( h 1 ) i + 1 2 ) ( ( h 1 ) i + 1 2 ( h 1 ) i ) .
For the right-hand side term:
S ¯ i ( 4 ) ( t ) + N ¯ i ( 4 ) ( t ) = g Δ x ( η ^ 1 ) i + 1 2 + ( η ^ 1 ) i 2 B i + 1 2 B i + r ( η 1 ) i + 1 2 + ( η 1 ) i 2 ( h 1 ) i + 1 2 ( h 1 ) i g Δ x ( η ^ 1 ) i 1 2 + + ( η ^ 1 ) i 2 B i B i 1 2 + r ( η 1 ) i 1 2 + + ( η 1 ) i 2 ( h 1 ) i ( h 1 ) i 1 2 + = III + IV .
For II and IV , since both the upper and lower layers are fully filled with water in the interval [ x i 1 2 , x i ] , the analysis is analogous to that of case ( 1 ) . Moreover, since ( η ^ 1 ) i = ( η ^ 1 ) i 1 2 = C 3 , it follows that
II = IV = g C 3 Δ x ( B i B i 1 2 ) .
For III ,
III = g Δ x B i + 1 2 + B i 2 · B i + 1 2 B i r g Δ x ( B h 1 ) i + 1 2 ( B h 1 ) i   g r Δ x ( h 1 ) i + 1 2 + ( h 1 ) i 2 ( h 1 ) i + 1 2 ( h 1 ) i ,
where the following equation is utilized:
( B h 1 ) i + 1 2 ( B h 1 ) i = ( h 1 ) i + 1 2 + ( h 1 ) i 2 B i + 1 2 B i   + B i + 1 2 + B i 2 ( h 1 ) i + 1 2 ( h 1 ) i ,
Therefore, we have I = III . Using Equations (70)–(74), we finally obtain (67).
(3) If the cell I i is partially flooded in the entire fluid, meaning that both the upper and lower fluids involve wet–dry front, this represents the most complex scenario. As illustrated in Figure 3e, we have
F i + 1 2 ( 2 ) ( t ) F i 1 2 ( 2 ) ( t ) Δ x = g C 1 ( h 1 ) i 1 2 Δ x ,
where x i denotes the position of the wet–dry front at the free surface of the upper fluid, and x i that of the lower fluid. p i and p i denote the values at x i and x i , respectively, for any p { h 1 , η 1 , η ^ 1 , h 2 , η 2 , B } . We have ( η 1 ) i = ( η 1 ) i = ( η 1 ) i 1 2 = C 1 , ( h 1 ) i + 1 2 = ( h 1 ) i = 0 ,
N ¯ i ( 2 ) ( t ) = g Δ x ( η 1 ) i + ( η 1 ) i 2 ( h 1 ) i ( h 1 ) i   + g Δ x ( η 1 ) i 1 2 + + ( η 1 ) i 2 ( h 1 ) i ( h 1 ) i 1 2 +   = g C 1 ( h 1 ) i 1 2 Δ x .
Thus, (64) is obtained, and the second component has been verified. Next, we examine the fourth component of the system as follows:
F i + 1 2 ( 4 ) ( t ) F i 1 2 ( 4 ) ( t ) Δ x = ( g 2 η 2 2 g 2 r h 1 2 g B η ^ 1 ) i + 1 2 ( g 2 η 2 2 g 2 r h 1 2 g B η ^ 1 ) i Δ x   + ( g 2 η 2 2 g 2 r h 1 2 g B η ^ 1 ) i ( g 2 η 2 2 g 2 r h 1 2 g B η ^ 1 ) i Δ x   + ( g 2 η 2 2 g 2 r h 1 2 g B η ^ 1 ) i ( g 2 η 2 2 g 2 r h 1 2 g B η ^ 1 ) i 1 2 Δ x   = V + VI + VII .
Due to the presence of two wet–dry fronts, denoted as x i and x i , the expression is divided into these three terms: V , VI , and VII . For the right-hand side term,
S ¯ i ( 4 ) ( t ) + N ¯ i ( 4 ) ( t ) = g Δ x ( η ^ 1 ) i + 1 2 + ( η ^ 1 ) i 2 · B i + 1 2 B i g Δ x ( η ^ 1 ) i + ( η ^ 1 ) i 2 B i B i r g Δ x ( η 1 ) i + ( η 1 ) i 2 ( h 1 ) i ( h 1 ) i g Δ x ( η ^ 1 ) i + ( η ^ 1 ) i 1 2 + 2 B i B i 1 2 r g Δ x ( η 1 ) i + ( η 1 ) i 1 2 + 2 ( h 1 ) i ( h 1 ) i 1 2 + = VIII + IX + X .
In the interval [ x i , x i + 1 2 ] , the flow is in a dry state, i.e., ( η ^ 1 ) i + 1 2 = B i + 1 2 and ( η ^ 1 ) i = B i . Therefore, we have
V = VIII = g 2 Δ x ( B i + B i + 1 2 ) ( B i + 1 2 B i ) .
In the interval [ x i , x i ] , only the bottom is submerged by the upper fluid, which is entirely analogous to case ( 2 ) where I = III . Therefore, we have
VI = IX = 1 Δ x g 2 ( B i + B i ) ( B i B i ) g r ( B h 1 ) i + g r ( B h 1 ) i   g r 2 Δ x ( ( h 1 ) i + ( h 1 ) i ) ( ( h 1 ) i ( h 1 ) i ) .
In the interval [ x i 1 2 , x i ] , for both the upper and lower layers being fully filled with water, the situation is entirely analogous to case ( 1 ) , and since ( η ^ 1 ) i 1 2 = ( η ^ 1 ) i = C 3 , it follows that
VII = X = g C 3 Δ x ( B i B i 1 2 ) .
Thus, (67) is obtained.
(4) If the cell I i is partially flooded with only the upper fluid present and no lower fluid, as shown in Figure 3g, we have
F i + 1 2 ( 2 ) ( t ) F i 1 2 ( 2 ) ( t ) Δ x = g C 1 ( h 1 ) i 1 2 Δ x ,
N ¯ i ( 2 ) ( t ) = g Δ x ( η 1 ) i 1 2 + + ( η 1 ) i 2 ( h 1 ) i ( h 1 ) i 1 2 + = g C 1 ( h 1 ) i 1 2 Δ x ,
Hence, (64) is obtained. Next, we examine the fourth component of the system as follows:
F i + 1 2 ( 4 ) ( t ) F i 1 2 ( 4 ) ( t ) Δ x = ( g 2 η 2 2 g 2 r h 1 2 g B η ^ 1 ) i + 1 2 ( g 2 η 2 2 g 2 r h 1 2 g B η ^ 1 ) i Δ x   + ( g 2 η 2 2 g 2 r h 1 2 g B η ^ 1 ) i ( g 2 η 2 2 g 2 r h 1 2 g B η ^ 1 ) i 1 2 Δ x   = XI + XII .
For the right-hand term,
S ¯ i ( 4 ) ( t ) + N ¯ i ( 4 ) ( t ) = g Δ x B i + 1 2 + B i 2 · B i + 1 2 B i g Δ x ( η ^ 1 ) i + ( η ^ 1 ) i 1 2 + 2 B i B i 1 2 r g Δ x ( η 1 ) i + ( η 1 ) i 1 2 + 2 ( h 1 ) i ( h 1 ) i 1 2 + = XIII + XIV .
In the interval [ x i , x i + 1 2 ] , the flow is in a dry state, i.e., ( η ^ 1 ) i + 1 2 = B i + 1 2 and ( η ^ 1 ) i = B i . Therefore, we have
XI = XIII = g 2 Δ x ( B i + B i + 1 2 ) ( B i + 1 2 B i ) .
In the interval [ x i 1 2 , x i ] , only the bottom is submerged by the upper fluid, which is entirely analogous to case ( 2 ) where I = III . Thus, we have
XII = XIV = 1 Δ x g 2 ( B i + B i 1 2 ) ( B i B i 1 2 ) g r ( B h 1 ) i + g r ( B h 1 ) i 1 2   g r 2 Δ x ( ( h 1 ) i + ( h 1 ) i 1 2 ) ( ( h 1 ) i ( h 1 ) i 1 2 ) .
This completes the derivation of (67). Therefore, considering these four cases, we ultimately have U ¯ n + 1 U ¯ n . □
Theorem 2.
Consider the forward Euler update with the help of the draining time method. Assume that the initial water height ( h ¯ 1 ) i and ( h ¯ 2 ) i are non-negative for all i. Then the updated height remains non-negative,
( h ¯ 1 ) i FE 0 and ( h ¯ 2 ) i FE 0 , i ,
provided that the standard CFL condition is satisfied.
Proof of Theorem 2.
Because S ¯ i ( 1 ) ( t ) + N ¯ i ( 1 ) ( t ) = S ¯ i ( 3 ) ( t ) + N ¯ i ( 3 ) ( t ) = 0 , the updated water height takes the form
( h ¯ 1 ) i FE = ( h ¯ 1 ) i ( Δ t 1 ) i + 1 2 F i + 1 2 ( 1 ) ( Δ t 1 ) i 1 2 F i 1 2 ( 1 ) Δ x   ( h ¯ 1 ) i ( Δ t 1 ) i + 1 2 max ( 0 , F i + 1 2 ( 1 ) ) + ( Δ t 1 ) i 1 2 max ( 0 , F i 1 2 ( 1 ) ) Δ x   ( h ¯ 1 ) i ( Δ t 1 ) i drain max ( 0 , F i + 1 2 ( 1 ) ) + ( Δ t 1 ) i drain max ( 0 , F i 1 2 ( 1 ) ) Δ x   0 ,
( h ¯ 2 ) i FE = ( h ¯ 2 ) i ( Δ t 2 ) i + 1 2 F i + 1 2 ( 3 ) ( Δ t 2 ) i 1 2 F i 1 2 ( 3 ) Δ x   ( h ¯ 2 ) i ( Δ t 2 ) i + 1 2 max ( 0 , F i + 1 2 ( 3 ) ) + ( Δ t 2 ) i 1 2 max ( 0 , F i 1 2 ( 3 ) ) Δ x   ( h ¯ 2 ) i ( Δ t 2 ) i drain max ( 0 , F i + 1 2 ( 3 ) ) + ( Δ t 2 ) i drain max ( 0 , F i 1 2 ( 3 ) ) Δ x   0 ,
where (52) and (53) are used. This concludes the proof. □
Remark 4.
The numerical algorithm for solving the governing equations is implemented through the following sequential steps:
1. 
One needs to first construct the topography to a piecewise linear and continuous bed.
2. 
Given the conservative variables U ¯ i = U ¯ i n at time level t n , the variables q { η 1 , u 1 , η 2 , u 2 } are computed and reconstructed via (18). Subsequently, the reconstructed solution U ( x ) (48) is obtained by applying the correction procedure detailed in Table 1.
3. 
Based on the reconstructed solution U ( x ) from (48), the numerical flux F i + 1 2 ( t ) , nonconservative product term N ¯ i ( t ) , and source term S ¯ i ( t ) are estimated by (11), (56), (57) and (58), respectively.
4. 
The global time step Δ t and local effective time steps ( Δ t 1 ) i + 1 2 and ( Δ t 2 ) i + 1 2 are calculated using (49) and (53), respectively, to satisfy the CFL condition.
5. 
The forward Euler step (50) is executed first, and the final numerical solution U ¯ i n + 1 at the new time level t n + 1 = t n + Δ t is obtained via the strong stability-preserving Runge–Kutta method (SSP-RK2).

6. Numerical Experiments

In this section, we verify the effectiveness of the proposed numerical scheme through several numerical experiments, including accuracy tests, stationary steady-state solutions, small perturbation of steady-state solutions, interface propagation, the lock-exchange problem, and the internal dam-break problem. The scheme proposed in this paper is referred to as a “new scheme”. In Section 6.2 and Section 6.3, we compare the results obtained with the “new scheme” against those from the standard second-order central-upwind scheme [21], which is denoted as an “old scheme”.
The solutions to the problems addressed in Section 6.1, Section 6.2, Section 6.3 and Section 6.4 lie in the hyperbolic regime, and the local speeds are therefore computed using (12); the parameter θ , which is used to calculate the numerical derivatives in (19), is set to θ = 1.2 . In Section 6.5 and Section 6.6, the velocity difference u 1 u 2 may become relatively large so that the first-order eigenvalue approximation (13) is no longer valid. For this reason, we overestimate the local speeds using (17). In these latter examples, we choose θ = 2 in order to reduce the additional numerical diffusion introduced into the scheme as a consequence of this overestimation of the local speeds.

6.1. Experimental Order of Accuracy

The objective of the first numerical example is to numerically verify the order of accuracy of the proposed finite volume scheme. The scheme is applied to system (3) with a gravitational constant g = 9.81 , using the following initial conditions and bottom topography:
h 1 ( x , 0 ) = 5 + e cos ( 2 π x ) , η 2 ( x , 0 ) = 5 e cos ( 2 π x ) , B ( x ) = sin 2 ( π x ) 10 , h 1 u 1 ( x , 0 ) h 2 u 2 ( x , 0 ) 0 ,
and periodic boundary conditions. This study introduces a modified initial-boundary value problem, based on the accuracy test proposed by [21].
We compute the solution up to time t = 0.1 , using the result obtained with 32,000 cells over a period as the reference solution. The L 1 -errors for η 1 = h 1 + h 2 + B and h 1 are presented in Table 2 and Table 3, where a second order of accuracy is clearly observed in the experiments.

6.2. Stationary Steady-State Solutions

We adopt the numerical experiment outlined in [33] to verify the well-balanced property of the model. The test assesses the scheme’s ability to preserve the stationary steady state across the computational domain [ 0 , 10 ] . The bottom topography with a 0.8 high hump is defined by
B ( x ) : = 0.8 0.2 ( x 5 ) 2 , if 3 x 7 , 0 , otherwise .
Owing to the two-layer configuration, the proposed numerical scheme is evaluated using the following three steady-state cases:
(a)
Upper layer: fully flooded; Lower layer: fully flooded,
η 1 ( x , 0 ) = 1.2 , η 2 ( x , 0 ) = 1.0 , h 1 u 1 ( x , 0 ) h 2 u 2 ( x , 0 ) 0 ,
(b)
Upper layer: fully flooded; Lower layer: partially flooded,
η 1 ( x , 0 ) = 1.0 , η 2 ( x , 0 ) = max ( 0.6 , B ( x ) ) , h 1 u 1 ( x , 0 ) h 2 u 2 ( x , 0 ) 0 ,
(c)
Upper layer: partially flooded; Lower layer: partially flooded,
η 1 ( x , 0 ) = max ( 0.6 , B ( x ) ) , η 2 ( x , 0 ) = max ( 0.3 , B ( x ) ) , h 1 u 1 ( x , 0 ) h 2 u 2 ( x , 0 ) 0 .
The steady-state solutions are computed until t = 10 on a relatively coarse mesh with Δ x = 0.1 . The simulated water surfaces and discharges are presented in Figure 4. The left column shows that the computed surface of each layer remains constant throughout the simulation, even in regions with wet–dry fronts. The right column demonstrates that the two-layer fluids remain stationary across the different cases described above. The small disturbances observed are only at the magnitude of machine precision, which confirms that the proposed numerical schemes successfully maintain the well-balanced property in the presence of wet–dry fronts as expected.
The steady-state solutions are computed up to t = 10 on relatively coarse meshes with Δ x = 0.5 , 0.1 and 0.01 for the three cases considered above. The errors for different cases and grid sizes are further presented in Table 4, confirming that the proposed numerical schemes maintain the well-balanced property in the presence of wet–dry fronts as expected.
Next, we test the mass conservation of the “new scheme”. As shown in Figure 5, the plot represents the time evolution of the mass conservation ratios for three numerical cases (Case (a), Case (b), Case (c)). The left panel displays the ratio of the instantaneous total mass m ( t ) to its initial value m 0 , while the right panel shows the ratio of the instantaneous upper-layer mass m 1 ( t ) to its initial value m 10 . It can be seen from Figure 5 that both the total mass and the upper-layer fluid mass exhibit excellent numerical conservation throughout the simulation.
For the well-balanced test, we compare the two schemes as shown in Table 5. For the two-layer shallow water equations, in the fully flooded Case (a), both the “old scheme” and the “new scheme” are able to reduce the steady-state error to the machine precision, showing identical performance. However, significant differences arise when wet–dry fronts are present. In Cases (b) and (c), the “old scheme” fails to properly handle the degeneracy of the water depth and generates spurious oscillations, which are far above the machine precision. In contrast, the “new scheme” effectively suppresses nonphysical fluctuations near the interfaces and is capable of reducing the steady-state error to the machine precision in all cases, achieving ideal numerical stability.
For computational efficiency analysis under a grid resolution of Δ x = 0.1 , the computational efficiency of the “new scheme” is compared with that of the “old scheme” as shown in Table 6 below.
The results demonstrate that the CPU times of the two schemes are very close, with only minor differences observed. This indicates that although the present scheme incorporates additional wet–dry front reconstruction and identification logic, the associated computational overhead is negligible. Thus, the proposed method maintains numerical accuracy without significantly compromising computational efficiency.

6.3. Small Perturbation of Steady-State Solutions

The capability of the proposed numerical schemes to accurately capture small perturbations to steady-state solutions is verified in this test. Following the numerical experiments in [21,33], we introduce small perturbations to the stationary steady state to assess the schemes’ performance.
The bottom topography is defined by
B ( x ) : = 0.25 [ cos ( 10 π ( x 0.5 ) ) + 1 ] 2 , if 0.4 x 0.6 , 2 , otherwise ,
over the computational domain [ 0 , 1 ] .
This experiment considers two sets of initial conditions, i.e., case a (see Figure 6, left):
η 1 ( x , 0 ) , η 2 ( x , 0 ) , h 1 u 1 ( x , 0 ) , h 2 u 2 ( x , 0 ) = ( 0.00001 , 1 , 0 , 0 ) , if 0.1 x 0.2 , ( 0 , 1 , 0 , 0 ) , otherwise .
case b (see Figure 6, right):
η 1 ( x , 0 ) , η 2 ( x , 0 ) , h 1 u 1 ( x , 0 ) , h 2 u 2 ( x , 0 ) = ( 0.00001 , 1.6 , 0 , 0 ) , if 0.1 x 0.2 , ( 0 , 1.6 , 0 , 0 ) , otherwise .
The transport of small perturbations is subsequently simulated using (98) and (99), respectively, up to t = 0.15 on different grid sizes, namely Δ x = 1 / 100 , Δ x = 1 / 200 , and Δ x = 1 / 1600 . Note that the solution with Δ x = 1 / 1600 can serve as a reference solution. The results are presented in Figure 7 and Figure 8. It can be observed that the proposed numerical model accurately captures small physical perturbations and introduces no numerical oscillations, which can be attributed to its well-balanced property.
As can be seen from Figure 9, the “old scheme” fails to accurately capture small perturbations and produces significant numerical oscillations, thereby highlighting the superiority of the “new scheme”.
Inspired by the convergence analysis in [34], we next perform convergence test on the proposed new scheme. As shown in Figure 10, simulations are conducted using grid sizes of Δ x = 1 / 100 , 1 / 200 and 1 / 1600 , respectively. The reference solution is obtained from a simulation with a grid size of Δ x = 1 / 1600 . It can be observed from Figure 10 that as the grid is refined, the numerical solution gradually converges to the reference solution, demonstrating the superiority of the “new scheme”.

6.4. Interface Propagation

This section presents a numerical study on the propagation of the interface, conducted via two representative examples using the “new scheme”.
The first example, adapted from [4,21], is designed to capture the propagation of an interface initially located at x = 0.3 :
h 1 ( x , 0 ) , h 2 ( x , 0 ) , h 1 u 1 ( x , 0 ) , h 2 u 2 ( x , 0 ) = ( 0.50 , 0.50 , 1.250 , 1.250 ) , if x < 0.3 , ( 0.45 , 0.55 , 1.125 , 1.375 ) , otherwise .
This example considers a flat bottom boundary ( B 1 ), with the parameter values g = 10 for gravity and r = 0.98 for the density ratio.
The numerical solution at t = 0.1 is computed on a sequence of uniform grids with Δ x = 1 / 100 , 1 / 200 , 1 / 400 , 1 / 800 , and 1 / 10,000 . The result on the finest grid ( Δ x = 1 / 10,000 ) is used as a reference solution in this experiment. The obtained result is shown in Figure 11. As expected, the initial sharp interface generates four waves propagating at four distinct characteristic speeds. This behavior is clearly illustrated in Figure 11, which depicts the water surface elevation η 1 and the velocity in the upper layer u 1 . It can be observed that the low-resolution computation of η 1 (Figure 11, (left)) exhibits some “ENO-type” oscillations, which vanish upon grid refinement (Figure 11, (right)).
Next, we examine a more complex example [5,21], characterized by a significantly larger initial jump at the interface:
h 1 ( x , 0 ) , h 2 ( x , 0 ) , h 1 u 1 ( x , 0 ) , h 2 u 2 ( x , 0 ) = ( 1.8 , 0.2 , 0.0 , 0.0 ) , if x < 0.0 , ( 0.2 , 1.8 , 0.0 , 0.0 ) , otherwise .
The bottom topography is set to a constant value ( B 2 ) . The gravitational acceleration is g = 9.81 , and the density ratio is specified as r = 0.98 .
The solutions computed by our proposed scheme on three different grids with Δ x = 1 / 50 , 1 / 100 , and 1 / 500 do not exhibit such a shock. This is clearly illustrated in Figure 12, which displays the profiles of h 2 and η 1 at time t = 1 .

6.5. Lock Exchange Problem

This example from [6,21] presents two initially separated fluid layers, with the less dense layer on the left and the more dense one on the right:
h 1 ( x , 0 ) , h 2 ( x , 0 ) , h 1 u 1 ( x , 0 ) , h 2 u 2 ( x , 0 ) = ( B ( x ) , 0.0 , 0.0 , 0.0 ) , if x < 0.0 , ( 0.0 , B ( x ) , 0.0 , 0.0 ) , otherwise ,
where the bottom topography is described by a Gaussian-shape function
B ( x ) = e x 2 2 ,
the initial setting is shown in Figure 13(left). The gravitational constant is set to g = 9.81 , and the density ratio is r = 0.98 . The computational domain spans the interval [ 3 , 3 ] , with boundary conditions given by h 1 u 1 = h 2 u 2 at both ends.
This initial-boundary value problem describes the leftward propagation of the heavier water and the rightward motion of the lighter one. It is expected that the solution will converge to a smooth, nonstationary steady state.
We compute a numerical steady-state solution on a uniform grid with Δ x = 0.02 using the “new scheme”. The results, shown in Figure 13(right), are very similar to those obtained in [6]. A key stability feature of our scheme is its ability to preserve the positivity of the water depth in each layer.

6.6. Internal Dam Break

This example, adapted from [21], models an internal dam break over a non-flat bottom with the following initial data:
h 1 ( x , 0 ) , h 2 ( x , 0 ) , h 1 u 1 ( x , 0 ) , h 2 u 2 ( x , 0 ) = ( 1.95 , 1.95 B ( x ) , 0.0 , 0.0 ) , if x < 0.0 , ( 0.05 , 0.05 B ( x ) , 0.0 , 0.0 ) , otherwise .
and bottom topography function
B ( x ) = 0.5 e x 2 2.5 ,
and the initial configuration is established as shown in Figure 14(left). The gravitational constant is taken as g = 9.81 , and the density ratio is set to r = 0.998 . A sufficiently large computational domain [ 5 , 5 ] is adopted, with free boundary conditions imposed at both ends.
Unlike the previous example, the steady-state solution for this problem includes a hydraulic jump, rendering it even more challenging.
We compute a numerical steady-state solution on a uniform grid with Δ x = 0.02 using the “new scheme”. The obtained results are shown in Figure 14(right). We can observe a high overall resolution of the discontinuous interface, achieved by the proposed scheme.
Next, we perform a convergence test for the “new scheme”. A grid-refinement study with Δ x = 0.02 , 0.01 , and 0.005 shows that the hydraulic-jump position and height stabilize as the mesh is refined, indicating convergence of the numerical solution, and the corresponding results are presented in Figure 15.

7. Conclusions

This paper presents a second-order accurate, well-balanced and positivity-preserving wet–dry front reconstruction scheme for the one-dimensional two-layer shallow water equations, which is validated through several typical numerical examples, demonstrating its effectiveness in handling wet–dry transitions and interface evolution while preserving key physical constraints and suppressing spurious oscillations, thus providing a reliable numerical tool for simulating stratified shallow water flows; however, the method still has some limitations, such as the potential degeneracy of the conditional hyperbolicity of the two-layer system under extreme flow conditions and the sensitivity of certain key parameters to flow configurations, which require careful tuning for specific applications.
While the current work is restricted to one dimension, the proposed framework admits extensions to two dimensions. The numerical fluxes and the draining-time concept generalize directly, as they remain local cell properties. However, the wet–dry front reconstruction and internal front localization become more complex in 2D due to the curved or multi-edge nature of the interfaces. Key challenges include maintaining mass conservation near irregular wet–dry boundaries and handling cases where one layer is dry while the other remains wet. These issues, though nontrivial, can be addressed with appropriate geometric tools, and the 1D method provides a solid foundation for future 2D developments.

Funding

This research was funded by the Doctoral Research Startup Fund of Taiyuan University of Science and Technology (Grant No. 20252098).

Data Availability Statement

The numerical data used to support the findings of this study are included within the article.

Acknowledgments

The author acknowledges the support from the Doctoral Research Startup Fund of Taiyuan University of Science and Technology (Grant No. 20252098).

Conflicts of Interest

The author declares no conflicts of interest.

References

  1. De St Venant, B. Theorie du mouvement non-permanent des eaux avec application aux crues des rivers et a l’introduction des marees dans leur lit. Acad. Sci. Comptes Redus 1871, 73, 148–154. [Google Scholar]
  2. Mahdi, T.F. One-Dimensional Shallow Water Equations Ill-Posedness. Mathematics 2025, 13, 2476. [Google Scholar] [CrossRef]
  3. Castro, M.; Macías, J.; Parés, C. A q-scheme for a class of systems of coupled conservation laws with source term. application to a two-layer 1-d shallow water system. ESAIM Math. Model. Numer. Anal. 2001, 35, 107–127. [Google Scholar] [CrossRef]
  4. Abgrall, R.; Karni, S. Two-layer shallow water system: A relaxation approach. SIAM J. Sci. Comput. 2009, 31, 1603–1627. [Google Scholar] [CrossRef]
  5. Bouchut, F.; de Luna, T.M. An entropy satisfying scheme for two-layer shallow water equations with uncoupled treatment. ESAIM Math. Model. Numer. Anal. 2008, 42, 683–698. [Google Scholar] [CrossRef]
  6. Castro, M.J.; Macıas, J.; Parés, C.; Garcıa-Rodrıguez, J.A.; Vázquez-Cendón, E. A two-layer finite volume model for flows through channels with irregular geometry: Computation of maximal exchange solutions: Application to the strait of gibraltar. Commun. Nonlinear Sci. Numer. Simul. 2004, 9, 241–249. [Google Scholar] [CrossRef]
  7. Castro Díaz, M.; Chacón Rebollo, T.; Fernández-Nieto, E.D.; Parés, C. On well-balanced finite volume methods for nonconservative nonhomogeneous hyperbolic systems. SIAM J. Sci. Comput. 2007, 29, 1093–1126. [Google Scholar] [CrossRef]
  8. Dong, J.; Qian, X.; Wei, Z. A robust structure-preserving surface reconstruction scheme for two-layer shallow water equations based on a relaxation model and an extension on adaptive moving triangles. J. Comput. Phys. 2025, 541, 114328. [Google Scholar] [CrossRef]
  9. Del Grosso, A.; Díaz, M.C.; Chalons, C.; de Luna, T.M. On well-balanced implicit-explicit Lagrange-projection schemes for two-layer shallow water equations. Appl. Math. Comput. 2023, 442, 127702. [Google Scholar] [CrossRef]
  10. Maso, G.D.; Lefloch, P.G.; Murat, F. Definition and weak stability of nonconservative products. J. De Math. Pures Appl. 1995, 74, 483–548. [Google Scholar]
  11. Mohamed, K. A modified rusanov method for simulating two-layer shallow water flows with irregular topography. Comput. Appl. Math. 2024, 43, 136. [Google Scholar] [CrossRef]
  12. Mohamed, K.; Sahmim, S.; Benkhaldoun, F.; Abdelrahman, M.A. Some recent finite volume schemes for one and two layers shallow water equations with variable density. Math. Methods Appl. Sci. 2023, 46, 12979–12995. [Google Scholar] [CrossRef]
  13. Zhao, F.; Gan, J.; Xu, K. High-order compact gas-kinetic scheme for two-layer shallow water equations on unstructured mesh. J. Comput. Phys. 2024, 498, 112651. [Google Scholar] [CrossRef]
  14. Du, C.; Li, M. A high-order domain preserving DG method for the two-layer shallow water equations. Comput. Fluids 2024, 269, 106140. [Google Scholar] [CrossRef]
  15. Guerrero Fernandez, E.; Castro-Diaz, M.J.; Morales de Luna, T. A second-order well-balanced finite volume scheme for the multilayer shallow water model with variable density. Mathematics 2020, 8, 848. [Google Scholar] [CrossRef]
  16. Castro, M.J.; LeFloch, P.G.; Muñoz-Ruiz, M.L.; Parés, C. Why many theories of shock waves are necessary: Convergence error in formally path-consistent schemes. J. Comput. Phys. 2008, 227, 8107–8129. [Google Scholar] [CrossRef]
  17. Diaz, M.J.C.; Kurganov, A.; de Luna, T.M. Path-conservative central-upwind schemes for nonconservative hyperbolic systems. ESAIM Math. Model. Numer. Anal. 2019, 53, 959–985. [Google Scholar] [CrossRef]
  18. Dumbser, M.; Hidalgo, A.; Zanotti, O. High order space–time adaptive ader-weno finite volume schemes for non-conservative hyperbolic systems. Comput. Methods Appl. Mech. Eng. 2014, 268, 359–387. [Google Scholar] [CrossRef]
  19. Muñoz-Ruiz, M.L.; Parés, C. On the convergence and well-balanced property of path-conservative numerical schemes for systems of balance laws. J. Sci. Comput. 2011, 48, 274–295. [Google Scholar] [CrossRef]
  20. Parés, C. Numerical methods for nonconservative hyperbolic systems: A theoretical framework. SIAM J. Numer. Anal. 2006, 44, 300–321. [Google Scholar] [CrossRef]
  21. Kurganov, A.; Petrova, G. Central-upwind schemes for two-layer shallow water equations. SIAM J. Sci. Comput. 2009, 31, 1742–1773. [Google Scholar] [CrossRef]
  22. Kurganov, A.; Tadmor, E. New high-resolution central schemes for nonlinear conservation laws and convection–diffusion equations. J. Comput. Phys. 2000, 160, 241–282. [Google Scholar] [CrossRef]
  23. Kurganov, A.; Lin, C.T. On the reduction of numerical dissipation in central-upwind schemes. Commun. Comput. Phys. 2007, 2, 141–163. [Google Scholar]
  24. Kurganov, A.; Noelle, S.; Petrova, G. Semidiscrete central-upwind schemes for hyperbolic conservation laws and hamilton–jacobi equations. SIAM J. Sci. Comput. 2001, 23, 707–740. [Google Scholar] [CrossRef]
  25. Kurganov, A.; Tadmor, E. Solution of two-dimensional Riemann problems for gas dynamics without Riemann problem solvers. Numer. Methods Partial. Differ. Equ. Int. J. 2002, 18, 584–608. [Google Scholar] [CrossRef]
  26. Ahmadi, N. Revolutionizing heat exchanger design: Helical groove turbulators for superior thermal-hydraulic and exergy performance. Results Eng. 2025, 28, 107207. [Google Scholar] [CrossRef]
  27. Bollermann, A.; Chen, G.; Kurganov, A.; Noelle, S. A well-balanced reconstruction of wet/dry fronts for the shallow water equations. J. Sci. Comput. 2013, 56, 267–290. [Google Scholar] [CrossRef]
  28. Bollermann, A.; Noelle, S.; Lukáčová-Medvidová, M. Finite volume evolution galerkin methods for the shallow water equations with dry beds. Commun. Comput. Phys. 2011, 10, 371–404. [Google Scholar] [CrossRef]
  29. Wang, X.; Chen, G. A positivity-preserving well-balanced wet-dry front reconstruction for shallow water equations on rectangular grids. Appl. Numer. Math. 2024, 198, 295–317. [Google Scholar] [CrossRef]
  30. Wang, X.; Chen, G. Well-balanced and positivity-preserving wet-dry front reconstruction scheme for Ripa models. Appl. Numer. Math. 2025, 213, 38–60. [Google Scholar] [CrossRef]
  31. Kurganov, A.; Petrova, G. A second-order well-balanced positivity preserving central-upwind scheme for the saint-venant system. Commun. Math. Sci. 2007, 5, 133–160. [Google Scholar] [CrossRef]
  32. Gottlieb, S.; Shu, C.W.; Tadmor, E. Strong stability-preserving high-order time discretization methods. SIAM Rev. 2001, 43, 89–112. [Google Scholar] [CrossRef]
  33. Liu, X.; He, J. A well-balanced numerical model for depth-averaged two-layer shallow water flows. Comput. Appl. Math. 2021, 40, 311. [Google Scholar] [CrossRef]
  34. Hao, J.W.; Caraballo, T. Solvability and convergence results for the temperature and concentration field in incompressible Navier-Stokes equations with boundary conditions. J. Differ. Equ. 2026, 450, 113735. [Google Scholar] [CrossRef]
Figure 1. Two-layer shallow water setup.
Figure 1. Two-layer shallow water setup.
Mathematics 14 00595 g001
Figure 2. Reconstructed surface levels of the upper ( η 1 , blue dashed) and lower ( η 2 , red solid) fluid layers over the bottom (B, green solid) at stationary steady states.
Figure 2. Reconstructed surface levels of the upper ( η 1 , blue dashed) and lower ( η 2 , red solid) fluid layers over the bottom (B, green solid) at stationary steady states.
Mathematics 14 00595 g002
Figure 3. Conservative reconstruction. (a,c,e,g): B i 1 2 < B i + 1 2 . (b,d,f,h): B i 1 2 > B i + 1 2 . The blue dashed line represents the water surface of the lower fluid layer, and the blue solid line represents the water surface of the upper fluid layer, where x i denotes the wet–dry front in the upper fluid layer, and x i denotes that in the lower fluid layer.
Figure 3. Conservative reconstruction. (a,c,e,g): B i 1 2 < B i + 1 2 . (b,d,f,h): B i 1 2 > B i + 1 2 . The blue dashed line represents the water surface of the lower fluid layer, and the blue solid line represents the water surface of the upper fluid layer, where x i denotes the wet–dry front in the upper fluid layer, and x i denotes that in the lower fluid layer.
Mathematics 14 00595 g003
Figure 4. Stationary steady-state solutions using the “new scheme”. Left: Computed surfaces for η 1 and η 2 . Right: Computed values for h 1 u 1 and h 2 u 2 .
Figure 4. Stationary steady-state solutions using the “new scheme”. Left: Computed surfaces for η 1 and η 2 . Right: Computed values for h 1 u 1 and h 2 u 2 .
Mathematics 14 00595 g004
Figure 5. Conservation of total mass (left) and upper-layer mass (right) over time using the “new scheme”.
Figure 5. Conservation of total mass (left) and upper-layer mass (right) over time using the “new scheme”.
Mathematics 14 00595 g005
Figure 6. Initial conditions of case a (left) and case b (right).
Figure 6. Initial conditions of case a (left) and case b (right).
Mathematics 14 00595 g006
Figure 7. Small perturbation of steady-state solution (case a) using the “new scheme”. Left: Computed values for η 1 ( η 1 ) 0 . Right: Computed values for η 2 ( η 2 ) 0 .
Figure 7. Small perturbation of steady-state solution (case a) using the “new scheme”. Left: Computed values for η 1 ( η 1 ) 0 . Right: Computed values for η 2 ( η 2 ) 0 .
Mathematics 14 00595 g007
Figure 8. Small perturbation of steady-state solution (case b) using the “new scheme”. Left: Computed values for η 1 ( η 1 ) 0 . Right: Computed values for η 2 ( η 2 ) 0 .
Figure 8. Small perturbation of steady-state solution (case b) using the “new scheme”. Left: Computed values for η 1 ( η 1 ) 0 . Right: Computed values for η 2 ( η 2 ) 0 .
Mathematics 14 00595 g008
Figure 9. Small perturbation of steady-state solution (case b, Δ x = 1 / 200 ). Left: Computed values for η 1 ( η 1 ) 0 . Right: Computed values for η 2 ( η 2 ) 0 .
Figure 9. Small perturbation of steady-state solution (case b, Δ x = 1 / 200 ). Left: Computed values for η 1 ( η 1 ) 0 . Right: Computed values for η 2 ( η 2 ) 0 .
Mathematics 14 00595 g009
Figure 10. Convergence test: small perturbation of steady-state solution (case b) using the “new scheme”. Left: Computed values for η 1 . Right: Computed values for η 2 .
Figure 10. Convergence test: small perturbation of steady-state solution (case b) using the “new scheme”. Left: Computed values for η 1 . Right: Computed values for η 2 .
Mathematics 14 00595 g010
Figure 11. Interface propagation, first example: the first line represents water depth h 1 of the upper layer, the second line represents surface η 1 , and the third line represents velocity u 1 of the upper layer.
Figure 11. Interface propagation, first example: the first line represents water depth h 1 of the upper layer, the second line represents surface η 1 , and the third line represents velocity u 1 of the upper layer.
Mathematics 14 00595 g011aMathematics 14 00595 g011b
Figure 12. Interface propagation, second example: h 2 -component of the solution zoomed at the interface area (left) and water surface η 1 (right).
Figure 12. Interface propagation, second example: h 2 -component of the solution zoomed at the interface area (left) and water surface η 1 (right).
Mathematics 14 00595 g012
Figure 13. Lock exchange problem: water surface η 1 , interface η 2 , and bottom topography B.
Figure 13. Lock exchange problem: water surface η 1 , interface η 2 , and bottom topography B.
Mathematics 14 00595 g013
Figure 14. Internal dam break: water surface η 1 , interface η 2 , and bottom topography B.
Figure 14. Internal dam break: water surface η 1 , interface η 2 , and bottom topography B.
Mathematics 14 00595 g014
Figure 15. Internal dam break: Convergence of interface η 2 with grid refinement ( Δ x = 0.02, 0.01, 0.005).
Figure 15. Internal dam break: Convergence of interface η 2 with grid refinement ( Δ x = 0.02, 0.01, 0.005).
Mathematics 14 00595 g015
Table 1. Correction procedure.
Table 1. Correction procedure.
Correction StepTypeCorresponding Equations
Step 1Type 1(24)–(26)
Type 2(27)–(30), (32)
Type 3(33)
Step 2Type 4(34)–(37)
Type 5(38)–(42), (45)–(46)
Type 6(47)
Table 2. Numerical results of L 1 -error for h 1 and η 2 .
Table 2. Numerical results of L 1 -error for h 1 and η 2 .
N    L 1 - Error ( h 1 ) Rate L 1 - Error ( η 2 ) Rate
1001.4223 × 10−3 1.3806 × 10−3
2002.7070 × 10−42.392.5451 × 10−42.44
4005.9511 × 10−52.195.4740 × 10−52.22
8001.2358 × 10−52.271.1186 × 10−52.29
16002.7100 × 10−62.192.4134 × 10−62.21
32006.1624 × 10−72.145.4235 × 10−72.15
Table 3. Numerical results of L 1 -error for h 1 u 1 and h 2 u 2 .
Table 3. Numerical results of L 1 -error for h 1 u 1 and h 2 u 2 .
N    L 1 - Error ( h 1 u 1 ) Rate L 1 - Error ( h 2 u 2 ) Rate
1002.0231 × 10−3 1.7642 × 10−3
2003.9979 × 10−42.343.4277 × 10−42.36
4007.3842 × 10−52.446.5734 × 10−52.38
8001.3989 × 10−52.401.3347 × 10−52.30
16002.9863 × 10−62.232.9129 × 10−62.20
32006.6795 × 10−72.166.6179 × 10−72.14
Table 4. L 1 and L errors of different variables for the “new scheme”.
Table 4. L 1 and L errors of different variables for the “new scheme”.
h 1 η 2 h 1 u 1 h 2 u 2
L 1 -Error L -Error L 1 -Error L -Error L 1 -Error L -Error L 1 -Error L -Error
Case (a)
Δ x = 0.5 00005.84 × 10−171.16 × 10−162.13 × 10−167.14 × 10−16
Δ x = 0.1 9.72 × 10−171.56 × 10−162.65 × 10−172.21 × 10−161.41 × 10−165.09 × 10−163.40 × 10−161.27 × 10−15
Δ x = 0.01 2.34 × 10−161.46 × 10−151.21 × 10−161.53 × 10−152.76 × 10−161.17 × 10−151.04 × 10−153.73 × 10−15
Case (b)
Δ x = 0.5 1.13 × 10−171.13 × 10−16003.38 × 10−171.58 × 10−164.64 × 10−171.79 × 10−16
Δ x = 0.1 7.08 × 10−174.44 × 10−167.88 × 10−173.33 × 10−162.04 × 10−166.19 × 10−162.13 × 10−167.98 × 10−16
Δ x = 0.01 4.86 × 10−161.45 × 10−151.79 × 10−169.98 × 10−168.78 × 10−162.86 × 10−158.61 × 10−163.93 × 10−15
Case (c)
Δ x = 0.5 4.14 × 10−184.14 × 10−17002.57 × 10−176.07 × 10−178.43 × 10−172.82 × 10−16
Δ x = 0.1 5.35 × 10−171.64 × 10−164.77 × 10−171.64 × 10−161.55 × 10−163.19 × 10−161.41 × 10−165.82 × 10−16
Δ x = 0.01 1.73 × 10−167.20 × 10−161.08 × 10−166.12 × 10−164.08 × 10−161.81 × 10−153.69 × 10−161.87 × 10−15
Table 5. L −error for the steady state solutions ( Δ x = 0.1 ).
Table 5. L −error for the steady state solutions ( Δ x = 0.1 ).
Scheme L - Error ( h 1 u 1 ) L - Error ( h 2 u 2 )
Case (a)
old scheme5.04 × 10−162.24 × 10−15
new scheme5.09 × 10−161.27 × 10−15
Case (b)
old scheme5.18 × 10−54.83 × 10−5
new scheme6.19 × 10−167.98 × 10−16
Case (c)
old scheme6.01 × 10−46.98 × 10−4
new scheme3.19 × 10−165.82 × 10−16
Table 6. Comparison of CPU time (in seconds) between the two schemes under different test cases ( Δ x = 0.1 ).
Table 6. Comparison of CPU time (in seconds) between the two schemes under different test cases ( Δ x = 0.1 ).
Test CaseOld Scheme (CPU Time, s)New Scheme (CPU Time, s)
Case (a)0.031020.03125
Case (b)0.046050.04688
Case (c)0.06120.0625
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

Wang, X. A Well-Balanced Wet–Dry Front Reconstruction for Two-Layer Shallow Water Flows. Mathematics 2026, 14, 595. https://doi.org/10.3390/math14040595

AMA Style

Wang X. A Well-Balanced Wet–Dry Front Reconstruction for Two-Layer Shallow Water Flows. Mathematics. 2026; 14(4):595. https://doi.org/10.3390/math14040595

Chicago/Turabian Style

Wang, Xue. 2026. "A Well-Balanced Wet–Dry Front Reconstruction for Two-Layer Shallow Water Flows" Mathematics 14, no. 4: 595. https://doi.org/10.3390/math14040595

APA Style

Wang, X. (2026). A Well-Balanced Wet–Dry Front Reconstruction for Two-Layer Shallow Water Flows. Mathematics, 14(4), 595. https://doi.org/10.3390/math14040595

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