Abstract
In this study, a well-balanced and positivity-preserving scheme for the nonconservative two-layer shallow water equations is developed in the framework of the path-conservative finite volume method. Special attention is paid to guaranteeing the well-balanced properties even in the presence of the wet–dry fronts for each layer. To this end, in this study, new numerical discretization and special local reconstruction are proposed. Moreover, the developed scheme also allows to stably compute flows in under-resolved meshes. The results of the numerical experiments illustrate the robustness and good performance of the constructed numerical scheme.
Similar content being viewed by others
Avoid common mistakes on your manuscript.
1 Introduction
The two-layer shallow water equations (SWEs) studied in this paper describe the behavior of two superposed layers of inviscid fluid with different, constant densities flowing over a bottom topography. They have been widely applied to model the stratified flows that arise typically in large-scale hydrodynamic system, for example, in lake and ocean, upper layer heated by solar radiation is less dense than deep ocean water. Moreover, such applications constantly involve the wet–dry interfaces which require that the developed numerical models are capable to properly solve the governing equations at the wet–dry fronts.
The one-dimensional (1D) two-layer shallow water system of partial differential equations may be first introduced in Ovsyannikov (1979). It describes the flows of two superposed shallow layers of immiscible, incompressible and irrotational fluids. In this study, the system is written as
where the subscripts \(k=1\) and 2 represent the upper and lower layers, respectively, \(h_k\) is the fluid depth, \(q_k=h_k\cdot u_k\) is the flow discharge, \(u_k\) is the depth-averaged flow velocity in horizontal direction, \(\rho _k\) is the fluid density, \(r:=\rho _1/\rho _2\) is the density ratio which is considered as constant in this study and the regime \(r\approx 1\) is of particular interest for modeling stratified flows, g is the gravitational constant, t is the time, x is the horizontal position, and B is the bed level. The notation for the two-layer shallow water system is illustrated in Fig. 1, where \(\eta _1=\eta _2+h_1\) is the free surface level of the upper layer fluid which also represents the free surface level of the entire fluid column above B, and \(\eta _2=h_2+B\) represents the layer interface.
A special class of the solutions of (1.1) are stationary steady-state solutions at which
due to that the flux gradients in (1.1) are exactly balanced by the right-hand-sided (RHS) source terms. If such balance is realized by the fully discrete form and the steady-state solutions are maintained during the computation, the numerical method is called “well balanced”. Steady states are of great practical importance since many physically relevant solutions of (1.1) are, in fact, small perturbations of steady states.
The system (1.1) contains nonconservative products describing momentum exchange between the layers. The presence of these nonconservative products introduce major difficulties when theoretically and numerically solving nonlinear hyperbolic system with discontinuities because these nonconservative products are not well defined in the distributional framework and the usual concept of weak solution cannot be used. To overcome this difficulty, following the mathematical theory in Dal Maso et al. (1995), the path-conservative finite volume schemes have been presented in Castro et al. (2008); Dumbser et al. (2014); Muñoz-Ruiz and Parés (2011); Parés (2006); Diaz et al. (2019) for various nonconservative hyperbolic systems.
In Diaz et al. (2019), the nonconservative hyperbolic system is first rewritten into a quasilinear form in which the coefficient matrix include both conservative and nonconservative terms. By introducing a sufficiently smooth path connecting the left and right states at discontinuities, the coefficient matrix can be integrated on such a smooth path. Finally, a path-conservative central-upwind (PCCU) method accounting for the contribution of the jumps of the nonconservative products at the cell interfaces, is developed.
A well-balanced PCCU scheme is applied to a two-layer SWEs system (1.1) in Diaz et al. (2019). However, the developed scheme in Diaz et al. (2019) 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. It, thus, limits the application of the PCCU scheme in Diaz et al. (2019). This motivates this study in which a novel scheme in the framework of PCCU is designed to obtain the well-balanced property at the wet–dry fronts for the two-layer SWEs system.
To this end, in this study, 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. Two auxiliary surface variables in non-dry cells are introduced to help to reconstruct the layer surfaces in under-resolved cells. Next, a new discretization of the source term is proposed to exactly preserve the stationary steady states. To guarantee the non-negativity of the fluid depth for each layer, the local drainage time step technique in Bollermann et al. (2011) is extended to the current two-layer system by applying local drainage constraints of fluxes at each cell interfaces for each layer. Accordingly, the discretization of source terms is correspondingly modified and the resulting fully discrete scheme is presented.
This paper is organized as follows. In Sect. 2, a well-balanced, positivity-preserving path-conservative finite volume method for two-layer shallow water system is developed and the well-balanced property of the discrete scheme is theoretically proved. In Sect. 3, several numerical experiments are conducted to verify the performance of the proposed numerical schemes. Some concluding remarks complete the study in Sect. 4.
2 Numerical schemes
In this section, a well-balanced path-conservative central-upwind method is designed for two-layer shallow water system with wet–dry fronts. To this end, we rewrite the governing system (1.1) in an equivalent form:
In the following, the system (2.1) is numerically solved over a computational domain discretized by finite volume cells \(I_j:=\big [ x_{j-\frac{1}{2}}, x_{j+\frac{1}{2}}\big ],\, j=1,\ldots ,N\) of uniform grid size \(\Delta x\) (an extension to a nonuniform grid is straightforward). It is denoted by \(x_j\) the cell center and \(x_j=(x_{j-\frac{1}{2}}+x_{j+\frac{1}{2}})/2\).
2.1 Bottom discretization
In this study, the original definition of bottom topography \({{\widehat{B}}}(x)\) is replaced with its continuous, piecewise linear approximation B(x) in which the linear pieces in cells j are connected at the cell-interface points \(x_{j-\frac{1}{2}}\) and \(x_{j+\frac{1}{2}}\). Therefore, one can define that
in which the reconstructed bed level at cell interface is
Using the piecewise linear bed reconstruction (2.2) and (2.3), one can obtain the point value of B at the cell center \(x=x_j\):
and the bed slope of cell \(I_j\):
Notice that replacing original bottom function \({{\widehat{B}}}(x)\) with B(x) will not affect the accuracy order of the proposed numerical scheme (Kurganov and Petrova 2009) since the piecewise linear interpolant (2.2) is a second-order approximation of \({{\widehat{B}}}\).
If a rapidly variable bed is considered, local grid refinement may be required to accurately resolve such an irregular bed. The proposed scheme in this paper can be directly applied to the nonuniform grids by replacing the uniform grid size \(\Delta x\) with a cell-dependent size \(\Delta x_j\).
2.2 Semi-discrete path-conservative central-upwind scheme
The system (2.1) can be written in the following vector form:
where the unknown variables \(\varvec{U} \in {\mathbb {R}}^N\), the flux \(\varvec{F}:{\mathbb {R}}^N \rightarrow {\mathbb {R}}^N\), the coefficient matrix \(C \in {\mathbb {R}}^{N\times N}\) of the nonconservative products, and the geometric source term \(\varvec{S}\in {\mathbb {R}}^N\) are:
The system (2.6) can be rewritten in the following quasilinear form:
with the coefficient matrix
which contains the flux gradients and the nonconservative products.
Assuming that, at certain time level t, the approximations of the cell averages of the solution:
are available. Notice that, in the following descriptions of the proposed scheme, the time dependence of all indexed quantities are dropped for brevity.
Then, applying the semi-discrete path-conservative central upwind scheme (Diaz et al. 2019) to the nonconservative system (2.8), one can obtain that
where the numerical flux \({\varvec{{\mathcal {F}}}}_{j+\frac{1}{2}}\) is given by the original central-upwind scheme (Kurganov and Tadmor 2000; Kurganov et al. 2001):
in which \(a^{\pm }_{j+\frac{1}{2}}\) are the one-sided local speeds; \({\varvec{U}}^{\pm }_{j+\frac{1}{2}}\) are the right/left-sided values at \(x=x_{j+\frac{1}{2}}\) of the piecewise polynomial reconstruction \(\widetilde{\varvec{U}}\):
where is a characteristic function and \(P_j^{(i)}\) are polynomials of a certain degree satisfying the conservation:
and (formal) accuracy requirements. Therefore, one has that
In (2.11), term \({\varvec{K}}_j\) consists of the nonconservative products and geometric source
The last two RHS terms of (2.11) account for the contribution of the jumps of the nonconservative products at the cell interfaces. To estimate these terms, one can consider a sufficiently smooth path \({\varvec{\Psi }_{j+\frac{1}{2}}(s)}:={\varvec{\Psi }}(s;{\varvec{U}}^-_{j+\frac{1}{2}},{\varvec{U}}^+_{j+\frac{1}{2}})\) connecting the states \({\varvec{U}}^-_{j+\frac{1}{2}}\) and \({\varvec{U}}^+_{{j+\frac{1}{2}}}\), it is,
Accordingly, \({\varvec{C}}_{\varvec{\Psi }}\) at cell interfaces can be estimated by
For the importance of \({\varvec{C}}_{{\varvec{\Psi }},{j+\frac{1}{2}}}\) to the two-layer shallow water system with nonconservative products, the readers are referred to (Diaz et al. 2019) for more details and justifications.
One can find that no simple analytical expression for the eigenstructure of the matrix (2.9) can be provided. One can obtain approximate expressions for the eigenvalues of \({\mathcal {A}}(\varvec{U})\) using the first-order expansions in \(u_2-u_1\) (Long 1956; Schijf and Schönfled 1953),
where
Accordingly, using only the external eigenvalues \(\lambda ^\pm _{ext}\) in (2.19)–(2.20) in the central-upwind methods, the one-sided local speeds can be obtained as:
where, to avoid division by very small total fluid depth \(h_1+h_2\). In the current study, we extend the desingularization formula in Kurganov and Petrova (2007) to estimate \((u_m\big )^+_{j+\frac{1}{2}}\) at cell interface as
in which \(\xi >0\) is a prescribed small and positive fluid depth triggering the desingularization procedure (2.22). In the current study, we use that \(\xi =1\times 10^{-3}\). Notice that \((u_m\big )^-_{j+\frac{1}{2}}\) in (2.21) can be estimated similarly.
The expressions (2.19)–(2.20) indicate that the system (2.1) is only hyperbolic provided
Violation of this condition (2.23) leads to Kelvin–Helmholtz interfacial instability associated with shear flows (Abgrall and Karni 2009), for which the vertical averaged two-layer shallow water model (1.1) and (2.1) is not suitable any more. However, as explained in Berthon et al. (2015), it is agreed that the elliptic region has a repulsive role and the solution approaching this region is rapidly evacuated to the its boundary. Therefore, the system is expected to be well posed with strong enough nonlinearity even if condition (2.23) is violated.
Notice that the numerical experiments in this study basically lie in the flow regime with (2.23).
2.3 New well-balanced semi-discrete scheme for the two-layer SWEs with wet–dry fronts
In this section, to preserve the stationary steady states in the presence of wet–dry fronts for two-layer SWEs (2.1), the following novel special treatments are designed for completing the semi-discrete scheme (2.11)–(2.21).
2.3.1 Piecewise linear reconstruction of the secondary variables
To obtain the well-balanced property and stably deal with the wetting and drying process, it is proposed in the currently developed model to reconstruct the secondary variables \({\varvec{V}}=[\eta _1, u_1, \eta _2, u_2]^\top \) instead of the primary variables \({\varvec{U}}=[h_1, q_1, \eta _2, q_2]^\top \) of (2.1).
Reconstructing \(\eta _1\) and \(\eta _2\) using (2.24)–(2.29) help to obtain the well-balanced property since they are equilibrium variables of the stationary steady states. Reconstructing \(u_1\) and \(u_2\) instead of \(q_1\) and \(q_2\) avoid singularities when computing \((q_1)_{j+\frac{1}{2}}/(h_1)_{j+\frac{1}{2}}\) with \((h_1)_{j+\frac{1}{2}}\rightarrow 0\) and \((q_2)_{j+\frac{1}{2}}/\big [(\eta _2)_{j+\frac{1}{2}}-B_{j+\frac{1}{2}}\big ]\) with \((\eta _2)_{j+\frac{1}{2}}\rightarrow B_{j+\frac{1}{2}}\) with very small layer depths.
Considering only the second-order schemes, the point values of \({\varvec{V}}\) are given using a linear function:
where
and the following desingularization formula (Kurganov and Petrova 2007) is used to avoid the division by very small layer depth,
in which
The piecewise constant slopes \(({\varvec{V}}_x)_j\) in (2.24) are computed in a non-oscillatory manner using a nonlinear limiter. In the current study, the generalized minmod limiter (see, e.g., Lie and Noelle 2003; Nessyahu and Tadmor 1990; Sweby 1984; van Leer 1979) is adopted:
with the minmod function
The parameter \(\theta \in [1,2]\) controls the amount of numerical dissipation: the larger the \(\theta \), the smaller the numerical dissipation. In this study, it is set \(\theta =1.2\).
In a dry cell, one can simply set that \(({\varvec{V}}_x)_j=0\).
2.3.2 Correction of surface reconstruction for two-layer fluids
It is proposed in §2.3.1 to reconstruct the surface levels \(\eta _1\) and \(\eta _2\) for both upper and lower layer fluids, respectively; however, such reconstructions may fail to ensure either well-balanced property or positive point value of depths in the presence of wet–dry fronts. Typical examples of such fails at the stationary steady states can be illustrated in Fig. 2. One can observe that, in Fig. 2, the piecewise linear reconstructions for fluid surfaces in §2.3.1 lead to the following issues:
-
(1)
At \(x=x_{j-\frac{1}{2}}\), the discontinuity \((\eta _2)^-_{j-\frac{1}{2}}\ne (\eta _2)^+_{j-\frac{1}{2}}\) introduces spurious waves that disturb the stationary equilibrium.
-
(2)
At \(x=x_{j+\frac{1}{2}}\), \((\eta _2)^-_{j+\frac{1}{2}}<B_{j+\frac{1}{2}}\) introduces negative fluid depth of lower layer fluid at cell interfaces,
-
(3)
Same problems as (1) and (2) also happen at \(x=x_{j+\frac{1}{2}}\) and \(x=x_{j+\frac{3}{2}}\) for upper layer fluid in cell \(I_{j+1}\),
-
(4)
Non-physical surface reconstruction in the dry cell \(I_{j+2}\) which introduce artificial waves and negative fluid depths.
To overcome the above issues without refining the local mesh, it is proposed in the current study to further correct the piecewise linear reconstruction (2.24)–(2.46). To this end, it is first defined the following six types of computational cells at a certain time level t, which are
where \({{\overline{h}}}_2 \, \Delta x\) is the volume of the lower layer fluid stored in a cell, \(\left( \,{{\overline{h}}}_1+{\overline{h}}_2\,\right) \Delta x\) is the total volume of both lower and upper layer fluids stored in a cell, and \(\frac{1}{2}\big |B_{j+\frac{1}{2}}-B_{j-\frac{1}{2}}\big |\,\Delta x\) represents the critical volume distinguishing between fully and partially flooded cells.
Remark 2.1
It is considered in (2.30) different types of cells for the entire fluid column rather than the upper layer fluid. Such cell classification avoids more complicated upper+lower layer fluid combination, and it is one of the key ideas of the currently proposed numerical scheme.
Remark 2.2
Notice that each computational cell is of two types, i.e., one of the first three types (Types 1–3) as well as one of the last three types (Types 4–6) due to the presence of two-layer fluids. For example, the cell j in Fig. 2 is both Type 2 and Type 4.
In the following, it is then corrected the piecewise surface reconstruction (2.24)–(2.46) in the presence of wet–dry fronts. Such corrections need to satisfy both mass conservation and positivity of depth in each cell. In this study, the auxiliary variables \(({\widehat{\eta }}_1)_j\) and \((\widehat{\eta }_2)_j\) representing the actual water surface levels at each cell center are introduced. One can see that such auxiliary variables only make sense in non-dry cells. In a dry cell (Types 3 or 6), the value of \(({\widehat{\eta }}_1)_j\) or \(({\widehat{\eta }}_2)_j\) are introduced only for the purpose of generalization and convenience in programming, they are not used in any computation. Therefore, in dry cells, they can be defined arbitrarily only if their values are non-greater than the lowest bed level in cell \(I_j\). Accordingly, the cell classification (2.30) can be equivalently rewritten as follows with respect to \(({\widehat{\eta }}_1)_j\) or \(({\widehat{\eta }}_2)_j\):
Notice that the auxiliary water level \(({\widehat{\eta }}_1)_j\) or \(({\widehat{\eta }}_2)_j\) may be lower than \(B_j\) in a partially flooded cell.
Remark 2.3
The cell classification (2.31) is equivalent to (2.30). The readers are suggested to define the initial/boundary conditions through \(({\widehat{\eta }}_1)_j\) and \(({\widehat{\eta }}_2)_j\) since they are more relevant to the“real-world” physics than the cell-averaged surface levels \((\overline{\eta }_1)_j\) and \((\overline{\eta }_2)_j\) in a non-well-resolved finite volume discretization, e.g., partially flooded cells. And they are easier to be defined/measured in field and laboratory applications.
In the following, the surface reconstruction for the lower layer fluid is first corrected.
\(\bigstar \) For the Type 1 cells, in the case of negative reconstructed fluid depth at cell interface, say \((\eta _2)_{j+\frac{1}{2}}<B_{j+\frac{1}{2}}\), as in (Kurganov and Petrova 2007), the surface is then corrected by setting that
Thus, the \((V_x)^{(3)}_j\) in (2.24) should be then replaced by
One also has \(({\widehat{\eta }}_2)_j=({\overline{\eta }}_2)_j\) in this type of cells.
\(\bigstar \) For each Type 2 cell, based on the mass conservation, similar to that in (Bollermann et al. 2013), the surface reconstruction \((\eta _2 )_j(x)\) is divided into two connecting segments, i.e., one horizontal segment and one linear “dry bed” segment (see Fig. 3). For the sake of simplicity, it is assumed that \(B_{j-\frac{1}{2}}<B_{j+\frac{1}{2}}\) in the following description. The case \(B_{j-\frac{1}{2}}>B_{j+\frac{1}{2}}\) is analogous.
As shown in Fig. 3, for the lower layer fluid, the connecting point at \(x^{*}_j\) splits the partially flooded cell into a wet part under a horizontal surface and a dry part with fluid surface overlaps the bed.
The level of the horizontal segment is set to be \((\widehat{\eta }_2)_j\) which can be deemed as the flat surface of stationary water body in a reservoir bounded below by \(B_j(x)\). The volume of the lower layer fluid, i.e., the area of the red triangle in Fig. 3 should be equal to \(({{\overline{h}}_2})_j\Delta x\) based on the requirement of mass conservation. Thus, the auxiliary surface level \(({\widehat{\eta }}_2)_j\) is related to \((\overline{\eta }_2)_j\) through
Accordingly, the surface reconstruction (2.24) for \(V^{(3)}_j(x)\) in the Type 2 cells should be replaced by
and
Remark 2.4
Unlike the surface reconstruction proposed in Bollermann et al. (2013), \((\eta _2)^+_{j-\frac{1}{2}}=(\eta _2)^-_{j-\frac{1}{2}}\) is not forced when the neighboring cell is fully flooded in the currently proposed method. Using the spatial constant surface level \((\widehat{\eta }_2)_j\) in the wet part as shown in Fig. 3 avoids suppressing the small physical gravity waves between the Type 2 cells and their neighboring flooded cells, and is crucial to guarantee the well-balanced property of the semi-discrete (2.11) in the currently proposed numerical scheme.
Remark 2.5
It is noticed that the exact location of \(x^{*}_j\) is not needed to be computed in the proposed scheme since only the reconstructed values at cell interfaces are needed in the discrete scheme.
\(\bigstar \) For the Type 3 cells, it is set
and
Next, the water surface reconstruction for the upper layer fluid is corrected.
\(\bigstar \) For the Type 4 cell, it can be combined with any one of the first three types (Types 1–3) cells. In the case of negative reconstructed fluid depth at cell interface, say \((\eta _1)_{j+\frac{1}{2}}<(\eta _2)_{j+\frac{1}{2}}\), the surface is then corrected by setting that
Thus, the \((V_x)^{(1)}_j\) in (2.24) should be replaced by
One has that \(({\widehat{\eta }}_1)_j=({\overline{\eta }}_1)_j\) in this type of cells.
\(\bigstar \) For the Type 5 cell, it can be combined with either Types 2 or Types 3 cell. Similar to the surface correction for the Types 2 cells, the surface reconstruction of \((\eta _1)_j(x)\) is proposed to be divided into two connecting pieces, i.e., one horizontal piece and one linear “dry bed” piece (see Fig. 4). For the sake of simplicity, we assume that \(B_{j-\frac{1}{2}}<B_{j+\frac{1}{2}}\) in the following description. The case \(B_{j-\frac{1}{2}}>B_{j+\frac{1}{2}}\) is analogous.
The level of the horizontal piece is set to be \(({\widehat{\eta }}_1)_j\) which is related to \(({\overline{h}}_1)_j\) and \((\overline{\eta }_2)_j\) through
based on the mass conservation, i.e., the blue area in Fig. 4 is equal to \(\big [({{\overline{h}}_1})_j+({\overline{h}_2})_j\big ]\Delta x\).
Therefore, the surface reconstruction (2.24) for \(V^{(1)}_j(x)\) in the Type 5 cells should be replaced by
where \(x^{**}_j\) is the location of the connecting point in cell \(I_j\).
And the slopes of reconstructed surface \((\eta _1)_j\) in \([x_{j-\frac{1}{2}}, x_{j+\frac{1}{2}}]\) is estimated by
\(\bigstar \) For the Type 6 cells, they can be only combined with Type 3 cells. Therefore, it is set in this type of cell that
and
Finally, applying above corrections of surface reconstruction to Types 1–6 cells, the original piecewise linear reconstructions (2.24)–(2.46) for fluid surfaces demonstrated in Fig. 2 are corrected as in Fig. 5 in the stationary equilibrium. One can see that the above surface corrections guarantee that the lower and upper layer fluid depths at cell interfaces are equal under the stationary equilibrium and nonnegative. These features avoid the spurious waves generated by the second term of (2.12) at stationary steady states.
Consequently, the polynomial pieces in (2.13) are given as:
2.3.3 Numerical discretization of \({{K}}_j\) in (2.16)
To guarantee the RHS of formula (2.11) vanish in stationary equilibrium, the cell integral \({\varvec{K}}_j\) must exactly balance the numerical fluxes \({\varvec{H}}_{j+\frac{1}{2}}\) and \({\varvec{H}}_{j-\frac{1}{2}}\). To this end, it is proposed in the current study to estimate the terms \({\varvec{K}}_j\) in a special form. It is first written that
Next, applying divergence theorem and trapezoidal rule to the first and second integrals in (2.47) in each component of \({\varvec{K}}_j\), respectively, one obtains that
and
To further compute \({\varvec{K}}^{(2)}_j\) (2.48) and \({\varvec{K}}^{(4)}_j\) (2.49), it is crucial to estimate in (2.48) and (2.49) the derivatives which represent the slopes of fluid surfaces at both ends of cell \(I_j\). To guarantee the well-balanced property, according to the surface corrections in Sect. 2.3.2, we propose in the current study to estimate them by
where \(\big [(\eta _1)_x\big ]^-_{j+\frac{1}{2}}\) and \(\big [(\eta _1)_x\big ]^+_{j-\frac{1}{2}}\) are computed using that (2.40), (2.43) and (2.45). Moreover, the surface slopes of the lower layer fluid \(\big [(\eta _2)_x\big ]^-_{j+\frac{1}{2}}\) and \(\big [(\eta _2)_x\big ]^+_{j-\frac{1}{2}}\) are estimated by (2.33), (2.36) and (2.38).
2.3.4 Numerical discretization of \({{C}}_{{{\Psi }},{j+\frac{1}{2}}}\) in (2.18)
As demonstrated in §2.2, \({\varvec{C}}_{{\varvec{\Psi }},{j+\frac{1}{2}}}\) and \({\varvec{C}}_{{\varvec{\Psi }},{j-\frac{1}{2}}}\) in (2.11) account for the contribution of the jump of the nonconservative products at cell interfaces. Therefore, they should vanish in the stationary equilibrium. In this study, a simplest linear segment path is chosen
which leads to the following discretization of the integral in (2.18), that is
and \({\varvec{C}}_{{\varvec{\Psi }},{j-\frac{1}{2}}}\) can be computed analogously.
It is noticed that \({\varvec{C}}_{{\varvec{\Psi }},{j+\frac{1}{2}}}\) and \({\varvec{C}}_{{\varvec{\Psi }},{j-\frac{1}{2}}}\) should vanish at the stationary steady states since no jump of nonconservative products exist in this case. Thanks to the reformulation (2.1) of the governing system, reconstructing \(\eta _2\) can guarantee these two terms vanish when bottom topography is fully submerged in the lower layer fluid. However, in the presence of the wet–dry interfaces, one needs to use the proposed surface corrections in §2.3.2 to ensure that these two terms vanish at the stationary steady states.
2.4 Fully discrete numerical scheme for (2.11)
In this section, the numerical approximation of the time dependent derivatives is presented to obtain the fully discrete numerical scheme for (2.11). To avoid the numerical instabilities, the global time step size \(\Delta t\) can be estimated by a CFL like condition:
where a relatively small CFL number \(\mu =0.3\) is used in the current study to help to mitigate the potential layer-interfacial instability.
To obtain the second order accuracy, the strong-stability-preserving two-staged Runge–Kutta method (SSP-RK2) from (Gottlieb et al. 2001) is used in this study for time evolution. The SSP-RK2 is briefly described in (2.54), it reads
where \(\varvec{{\mathcal {L}}}({\varvec{U}})\) is the spatial discretization of the forcing terms, i.e., all the right-hand-sided (RHS) terms of the semi-discrete scheme (2.11), the superscript n and \(n+1\) represent time level \(t=t^n\) and \(t=t^{n+1}=t^n+\Delta t\), respectively, \({\varvec{U}}^*\) represents the intermediate values of variables obtained from the first stage of SSP-RK2.
It is noticed that for the adopted two-staged Runge–Kutta methods, the global time step \(\Delta t\) is only estimated in the first stage.
2.4.1 Positivity-preserving time evolution
One desired feature of a robust numerical model is preserving the positivity of fluid depth for each layer, that is
providing that \(({{\overline{h}}}_1)^{\,n}_j \ge 0\) and \(({\overline{h}}_2)^{\,n}_j \ge 0\) at \(t=t^n\).
However, the global time step \(\Delta t\) estimated by stability constraint (2.53) can not guarantee (2.55) are satisfied. Therefore, in the presence of wet–dry fronts, one has to use very small global time step \(\Delta t\) to enforce the positivity of fluid depth for each layer. This could in turn lead to very expensive computational cost. To overcome such numerical difficulty and guarantee the positivity of layer depth, the “draining” time-step strategy proposed in (Bollermann et al. 2011) is extended to the currently study. Instead of using a global time step \(\Delta t\) for all cell interfaces, such strategy defines time step size \(\Delta t_{j+\frac{1}{2}}\) for each cell interface based on \(\Delta t\) and the local draining time step size \(\Delta t^{\,drain}_j,\, \forall {j}\).
The basic idea of such a method is to cut off the outgoing fluxes as soon as the fluid originally contained in the cell has completely left the cell via the outgoing fluxes during a certain global time step \(\Delta t\). To apply this idea, one can first introduce the local draining time step for each layer in a cell, i.e.,
which represent the time for completely draining the water originally stored in a cell \(I_j\) via out-going flow though cell interfaces at \(t=t^n\) for the upper and lower layers, respectively.
Next, based on \((\Delta t_1)_j^{\mathrm{drain}}\) and \((\Delta t_2)_j^{\mathrm{drain}}\), and the upwind direction of the fluxes \({{\mathcal {F}}}^{\,(1),n}_{j+\frac{1}{2}}\) and \({{\mathcal {F}}}^{\,(3),n}_{j+\frac{1}{2}}\), the interfacial draining time step \((\Delta t_k)_{j+\frac{1}{2}},\, k=1,2\) for each cell interface can be estimated by
respectively.
Notice that (2.58) should be updated in each Runge–Kutta stage (2.54).
Finally, one can accordingly modify the discretization \(\varvec{{\mathcal {L}}}({\varvec{U}})\) in (2.54) to guarantee the positivity-preserving and well-balanced properties. The modified \(\varvec{{\mathcal {L}}}({\varvec{U}})\) is given by
where \(C^{(i=1,4)}_{{\varvec{\Psi }},{j-\frac{1}{2}}}\) and \(C^{(i=1,4)}_{{\varvec{\Psi }},{j+\frac{1}{2}}}\) are computed by (2.52).
Thus, a fully discrete numerical scheme can be obtained using (2.54) and (2.59)–(2.62) with (2.12) and (2.52).
2.5 Well-balanced property of the proposed scheme
In this section, the well-balanced property of the proposed numerical scheme is proved.
In the presence of wet–dry fronts, the stationary steady-state solutions for two-layer system can be defined by
The proposed fully discrete scheme ((2.54) and (2.59)–(2.62)) is well balanced if the forcing terms \({\varvec{{\mathcal {L}}}}({\varvec{U}}^n)\) vanish provided (2.63) at \(t=t^n\), and one obtains \({\varvec{U}}^{n+1}\equiv {\varvec{U}}^{n}\).
For the sake of brevity, we only prove the well-balanced property for the first stage in an SSP-RK2 evolution in the following. However, the proof for the second stage is analogous.
The stationary steady-state solutions (2.63) is first substituted into (2.21), one obtains that
Thanks to the piecewise linear reconstruction of the secondary variables \(\varvec{V}\) in §2.3.1 and the surface corrections in §2.3.2, one, thus, obtains that
through (2.46).
Substituting (2.65) into (2.64) and (2.52), it leads to
Then, (2.63) and (2.66) are substituted into the forcing terms \({\varvec{{\mathcal {L}}}}({\varvec{U}})\) (2.59)–(2.62) with (2.12) and (2.52) at the first stage of the proposed fully discrete numerical scheme (2.54), one obtains that
Using (2.65), one can easily prove that \({\mathcal L}^{(1)}({\varvec{U}}_j)={{\mathcal {L}}}^{(3)}({\varvec{U}}_j)=0\), and the first two RHS rows of \({{\mathcal {L}}}^{(2)}({\varvec{U}}_j)\), as well as the first three RHS rows of \({{\mathcal {L}}}^{(4)}({\varvec{U}}_j)\) are canceled in (2.67).
With (2.66), \({{\mathcal {L}}}^{(2)}({\varvec{U}}_j)\) and \({\mathcal L}^{(4)}({\varvec{U}}_j)\) in (2.67) can be further simplified to
Remark 2.6
Above cancellations and simplifications are valid for any type of cells (see Sect. 2.3.2), provided the stationary steady-state solutions (2.63).
We then prove that the RHS terms of (2.69) vanish for any one of the Types 1–3 cells (see Sect. 2.3.2) provided the stationary steady-state solutions (2.63).
For a Types 1 cell, it can only be combined with a Types 4 cell. Therefore, providing stationary steady-state solutions (2.63), one obtains that
which lead to \({{\mathcal {L}}}^{(4)}({\varvec{U}}_j)=0\).
For a Types 2 cell, assuming \(B_{j-\frac{1}{2}}<B_{j+\frac{1}{2}}\), using that (2.36), one has that
Moreover, for either a Types 4 or Types 5 cell combined with a Types 2 cell, one always has that
Thus, (2.71) and (2.72) lead to \({\mathcal L}^{(4)}({\varvec{U}}_j)=0\).
For a Types 3 cell, it obviously yields that
which lead to \({{\mathcal {L}}}^{(4)}({\varvec{U}}_j)=0\).
Next, one can prove that the RHS terms of (2.68) vanish for any one of Types 4–6 cells (see Sect. 2.3.2) providing the stationary steady state solutions (2.63).
For a Types 4 cell, no matter which type of cell (Types 1–3) it is combined with, providing stationary steady state solutions (2.63), one has that
which lead to \({{\mathcal {L}}}^{(2)}({\varvec{U}}_j)=0\).
For a Types 5 cell, assuming \(B_{j-\frac{1}{2}}<B_{j+\frac{1}{2}}\), no matter which one of Types 2–3 cells it is combined with, one has that
which lead to \({{\mathcal {L}}}^{(2)}({\varvec{U}}_j)=0\).
For a Types 6 cell, obviously, it yields that
which lead to \({{\mathcal {L}}}^{(2)}({\varvec{U}}_j)=0\).
Thus, for any type of cell classified in a two-layer shallow water system, the proposed numerical schemes guarantee the forcing terms \({\varvec{{\mathcal {L}}}}({\varvec{U}})\) vanish at the stationary steady states (2.63).
Accordingly, one can conclude that the proposed numerical schemes guarantee the well-balanced property in the presence of wet–dry fronts.
3 Numerical experiments
In this section, the currently proposed numerical scheme is tested on a number of numerical examples. In the following experiments, \(r=0.9\) is set unless otherwise specified, and \(g=9.81\) is used for all the tests. The \(L^1\)- and \(L^\infty \)-norm of errors in this section are computed by
where \(U^{\mathrm{ref}}\) represents the reference or exact solution.
3.1 Experiment 1—Numerical accuracy order
In this test, the accuracy of the proposed numerical scheme is first investigated by computing the \(L^1\)-error and experimental order of convergence (EOC) of the variables. As given in Kurganov and Petrova (2009), the initial conditions are
The periodic boundary conditions are applied on both boundaries. It is computed up to \(t=0.1\) over the computational domain \([\,0,1\,]\). The reference solution is obtained with \(N=32000\) grids. The \(L^1\)-errors and the experimental order of convergence of variables \(\varvec{U}\) are shown in Table 1. One can find that the proposed numerical model is second order accurate as expected.
3.2 Experiment 2—Stationary steady-state solutions
In this numerical experiment, we test the well-balanced property by computing the stationary steady states over the computational domain \([\,0,10\,]\). The bottom topography with a 0.8 high hump is defined by
Due to the presence of two layers, the proposed numerical schemes are tested based on the following three steady-state cases:
- (a):
-
Upper layer: Wholly flooded; Lower layer: Wholly flooded,
$$\begin{aligned} \widehat{\eta }_1(x,0)=1.2,\quad \widehat{\eta }_2(x,0)=1, \quad q_1(x,0)\equiv q_2(x,0)\equiv 0, \end{aligned}$$(3.3) - (b):
-
Upper layer: Wholly flooded; Lower layer: Partly flooded,
$$\begin{aligned} \widehat{\eta }_1(x,0)=1.0,\quad \widehat{\eta }_2(x,0)=\max \big [\,0.6, B(x)\,\big ], \quad q_1(x,0)\equiv q_2(x,0)\equiv 0, \end{aligned}$$(3.4) - (c):
-
Upper layer: Partly flooded; Lower layer: Partly flooded,
$$\begin{aligned} \widehat{\eta }_1(x,0)=0.6,\quad \widehat{\eta }_2(x,0)=0.3, \quad q_1(x,0)\equiv q_2(x,0)\equiv 0, \end{aligned}$$(3.5)The steady-state solutions are computed up to \(t=10\) over a relatively coarse mesh with \(\Delta x=\) 0.5, 0.1 and 0.01, respectively, for above three different cases. The simulated water surfaces and discharges with \(\Delta x=0.1\) at \(t=10\) are shown in Fig. 6. In the left column of Fig. 6, one can observe that the computed surface of each layer remains constant during the simulation even in the presence of wet–dry fronts. In the right column of Fig. 6, it can be seen that the computed two-layer fluids remain stationary in different above-described cases, the observed small disturbations are only of the same magnitude as machine error. The errors of different cases with different grid sizes are further shown in Table 2 which confirms that the proposed numerical schemes guarantee the well-balanced property in the presence of wet–dry fronts as expected.
3.3 Experiment 3—Small perturbation of a stationary steady-state solutions
In this test, the ability of accurately capturing small perturbations of the stationary steady-state solutions is verified using the proposed numerical schemes. To this end, the numerical test in (Kurganov and Petrova 2009) is modified in this study.
The bottom topography is defined by
over the computational domain \([\,0,1\,]\)
It is considered in this experiment two sets of initial conditions, i.e., case (a) (see Fig. 7, left):
and case (b) (see Fig. 7, right):
The transport of the small perturbation is then simulated (3.7) and (3.8), respectively, up to \(t=0.15\) on different grid sizes, i.e., \(\Delta x=1/100\), \(\Delta x=1/200\), and \(\Delta x=1/1600\). Notice that the solution with \(\Delta x=1/1600\) can serve as a reference solution. The results are presented in Figs. 8 and 9, respectively. One can see that the proposed numerical model is capable to accurately capture small physical perturbations and no numerical oscillations are produced thanks to the well-balanced property.
3.4 Experiment 4—Dam break flows with wetting–drying
This experiment is designed to verify the ability of the currently proposed scheme to preserve the positivity of the fluid depth during the wetting and drying process. The bottom topography is defined by
over the computational domain \([\,0,5\,]\) discretized by 500 uniform grids.
The following three different cases are considered. Case (a) considers the wetting–drying process only for the upper layer fluid, it demonstrates a dam-break flow of the upper layer fluid over an initially flat fluid interface. Thus, the initial conditions (Fig. 10, first row) are defined by
The computed results at different times of case (a) are shown in Fig. 10. One can observe that no negative fluid depth or non-physically high flow rate is generated for the upper layer fluid during the simulation.
In case (b), the wetting–drying process is considered only for the bottom layer fluid over irregular bottom, its initial conditions (Fig. 11, first row) are given by
The computed results at different times of case (b) are presented in Fig. 11. One can see that no negative fluid depth or non-physically high flow rate is produced for the lower layer fluid near the wet–dry fronts. A quasi steady state is obtained at the end of simulation.
In the case (c), the wetting–drying process is considered for the entire two-layer fluid body over an irregular bed. It demonstrates a dam-break flow over an initially dry bed. The initial conditions (Fig. 12, first row) are defined by
Figure 12 shows the computed results of case (c) at different times. One can see that the fluid depth of each layer remains non-negative during the computation, and no oscillation is generated near the wet–dry fronts. A quasi steady state is obtained at the end of the simulation.
3.5 Experiment 5—Barotropic tidal flow
In this experiment, the test in (Diaz et al. 2019) is repeated. It mimics a tidal wave by imposing a barotropic periodic perturbation as the inflow boundary condition.
The initial conditions with a internal shock are defined by
and
to construct the Hugoniot curve.
Following (Diaz et al. 2019), a flat bed is considered in this test by defining
The simulation is conducted over the computational domain \([\,-10,10\,]\) discretized by 1000 uniform cells. The density ratio is set to be \(r=0.98\) in this test. The open boundary condition is applied to the boundary at \(x=10\), and the periodic boundary condition is imposed on the left boundary at \(x=-10\) for components \(h_1\) and \(h_2\) by
The components \(q_1\) and \(q_2\) on the left boundary at \(x=-10\) are obtained using a zero-order extrapolation.
This test is computed until \(t=64\). In Fig. 13, the results simulated by the currently proposed schemes are compared with the PCCU scheme developed by Castro Díaz et al. (Diaz et al. 2019) and the original central-upwind method for two-layer system developed by Kurganov and Petrova (Kurganov and Petrova 2009). One can observe that, as expected, the proposed new scheme with the novel well-balanced design Sect. 2.3 yields almost the same results as the PCCU scheme developed in (Diaz et al. 2019) as expected. Moreover, as stated in Diaz et al. (2019), the original central-upwind method in Kurganov and Petrova (2009) begins to develop some spurious oscillations and eventually becomes unstable at larger times. This verifies the importance of the path-conservative method.
3.6 Experiment 6—Subgrid-scale fluctuation
In this test, we design a challenging numerical experiment modeling the fluctuation that is not well resolved by the discretized grids.
The test is conducted over the computational domain \([\,-1,1\,]\), which is divided into only two cells. Both cells are partially flooded cells given the initial condition that
and the bottom topography that
as illustrated in Fig. 14.
As the computation starts, a dam-break wave is generated at the cell interfaces and then fluctuate between two partially flooded cells. Figure 15 shows the computed surface levels of two layers in both cells at different times.
One can observe that the proposed numerical scheme allows for subgrid-scale modeling of small fluctuation in a stable manner.
4 Conclusion
In this paper, a well-balanced and positivity-preserving path-conservative finite volume method has been successfully developed for the two-layer shallow water equations. The well-balanced property has been achieved in the presence of the wet–dry fronts thanks to (i) the special surface reconstruction for each layer (see Sect. 2.3.2), (ii) the new numerical discretization of the cell integral of source terms (2.47). The positivity of each layer has been guaranteed by applying the local draining constraints of outgoing fluxes. Finally, a special fully discrete scheme has been developed. The numerical experiments have proved that the proposed numerical scheme is capable to guarantee the non-negative water depths for each fluid layer, and well-balanced property even in the presence of wet–dry fronts.
References
Abgrall R, Karni S (2009) Two-layer shallow water system: a relaxation approach. SIAM J Sci Comput 31:1603–1627
Berthon C, Foucher F, Morales T (2015) An efficient splitting technique for two-layer shallow-water model. Numer Methods Partial Differ Equ 31:1396–1423
Bollermann A, Chen G, Kurganov A, Noelle S (2013) A well-balanced reconstruction of wet/dry fronts for the shallow water equations. J Sci Comput 56:267–290
Bollermann A, Noelle S, Lukáčová-Medviďová M (2011) Finite volume evolution Galerkin methods for the shallow water equations with dry beds, Commun. Comput Phys 10:371–404
Castro MJ, LeFloch PG, Muñoz-Ruiz ML, Parés C (2008) Why many theories of shock waves are necessary: convergence error in formally path-consistent schemes. J Comput Phys 227:8107–8129
Dal Maso G, Lefloch PG, Murat F (1995) Definition and weak stability of nonconservative products. Journal de mathématiques pures et appliquées 74:483–548
Diaz MJC, Kurganov A, de Luna TM (2019) Path-conservative central-upwind schemes for nonconservative hyperbolic systems, ESAIM. Math Model Numer Anal 53
Dumbser M, Hidalgo A, Zanotti O (2014) High order space-time adaptive ader-weno finite volume schemes for non-conservative hyperbolic systems. Comput Methods Appl Mech Eng 268:359–387
Gottlieb S, Shu C-W, Tadmor E (2001) Strong stability-preserving high-order time discretization methods. SIAM Rev 43:89–112
Kurganov A, Noelle S, Petrova G (2001) Semi-discrete central-upwind scheme for hyperbolic conservation laws and Hamilton-Jacobi equations. SIAM J Sci Comput 23:707–740
Kurganov A, Petrova G (2007) A second-order well-balanced positivity preserving central-upwind scheme for the Saint-Venant system. Commun Math Sci 5:133–160
Kurganov A, Petrova G (2009) Central-upwind schemes for two-layer shallow water equations. SIAM J Sci Comput 31:1742–1773
Kurganov A, Tadmor E (2000) New high-resolution central schemes for nonlinear conservation laws and convection–diffusion equations. J Comput Phys 160:241–282
Lie K-A, Noelle S (2003) On the artificial compression method for second-order nonoscillatory central difference schemes for systems of conservation laws. SIAM J Sci Comput 24:1157–1174
Long RR (1956) Long waves in a two-fluid system. J Meteorol 13:70–74
Muñoz-Ruiz ML, Parés C (2011) On the convergence and well-balanced property of path-conservative numerical schemes for systems of balance laws. J Sci Comput 48:274–295
Nessyahu H, Tadmor E (1990) Nonoscillatory central differencing for hyperbolic conservation laws. J Comput Phys 87:408–463
Ovsyannikov L (1979) Two-layer “shallow water’’ model. J Appl Mech Tech Phys 20:127–135
Parés C (2006) Numerical methods for nonconservative hyperbolic systems: a theoretical framework. SIAM J Numer Anal 44:300–321
Schijf J, Schönfled J (1953) Theoretical considerations on the motion of salt and fresh water, IAHR
Sweby PK (1984) High resolution schemes using flux limiters for hyperbolic conservation laws. SIAM J Numer Anal 21:995–1011
van Leer B (1979) Towards the ultimate conservative difference scheme. V. A second-order sequel to Godunov’s method. J Comput Phys 32:101–136
Author information
Authors and Affiliations
Corresponding author
Additional information
Communicated by Cassio Oishi.
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
About this article
Cite this article
Liu, X., He, J. A well-balanced numerical model for depth-averaged two-layer shallow water flows. Comp. Appl. Math. 40, 311 (2021). https://doi.org/10.1007/s40314-021-01698-x
Received:
Revised:
Accepted:
Published:
DOI: https://doi.org/10.1007/s40314-021-01698-x
Keywords
- Two-layer shallow water equations
- Finite volume method
- Well-balanced
- Wetting–drying
- Path-conservative approach