This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

Adaptive Central-Upwind Scheme on Triangular Grids for the Shallow Water Model with variable density

Thuong Nguyen111Department of Mathematics, The University of Utah, Salt Lake City, UT 84112, USA; [email protected]
Abstract

In this paper, we construct a robust adaptive central-upwind scheme on unstructured triangular grids for two-dimensional shallow water equations with variable density. The method is well-balanced, positivity-preserving, and oscillation free at the curve where two types of fluid merge. The proposed approach is an extension of the adaptive well-balanced, positivity-preserving scheme developed in Epshteyn and Nguyen (arXiv preprint arXiv:2011.06143, 2020). In particular, to preserve “lake-at-rest” steady states, we utilize the Riemann Solver with appropriately rotated coordinates to obtain the point values in neighborhood of the fluid interface. In addition, to improve the efficiency of an adaptive method in the multifluid flow, the curve of density discontinuity is reconstructed by using the level set method and volume fraction method. To demonstrate the accuracy, high-resolution, and efficiency of the new adaptive central-upwind scheme, several challenging tests for Shallow water models with variable density are performed.

keywords:
Shallow water equations with variable density, central-upwind scheme, well-balanced and positivity-preserving scheme, adaptive algorithm, interface tracking, Riemann solver, weak local residual error estimator, unstructured triangular grid

AMS subject classification: 76M12, 65M08, 35L65, 86-08, 86A05

1 Introduction

The main goal of this paper is to develop an adaptive well-balanced positivity-preserving central-upwind scheme on triangular grids for shallow water equations with variable density (SWEDs). The two-dimensional (2-D) system of SWEDs can be written as,

wt+(hu)x+(hv)y=0,\displaystyle w_{t}+(hu)_{x}+(hv)_{y}=0, (1.1a)
(hu)t+(hu2+g2ρ0h2ρ)x+(huv)y=gρ0hρBx,\displaystyle(hu)_{t}+\Big{(}hu^{2}+\frac{g}{2\rho_{0}}h^{2}\rho\Big{)}_{x}+(huv)_{y}=-\frac{g}{\rho_{0}}h\rho B_{x}, (1.1b)
(hv)t+(huv)x+(hv2+g2ρ0h2ρ)y=gρ0hρBy,\displaystyle(hv)_{t}+(huv)_{x}+\Big{(}hv^{2}+\frac{g}{2\rho_{0}}h^{2}\rho\Big{)}_{y}=-\frac{g}{\rho_{0}}h\rho B_{y}, (1.1c)
(hρ)t+(huρ)x+(hvρ)y=0,\displaystyle(h\rho)_{t}+(hu\rho)_{x}+(hv\rho)_{y}=0, (1.1d)

where tt is the time, xx and yy are spatial coordinates ((x,y)Ω(x,y)\in\Omega), h(x,y,t)h(x,y,t) is the water height, ρ(x,y,t)\rho(x,y,t) is the density, u(x,y,t)u(x,y,t) and v(x,y,t)v(x,y,t) are the xx- and yy-components of the flow velocity, B(x,y)B(x,y) is the bottom topography, gg is the constant gravitational acceleration, and ρ0\rho_{0} is the reference density. The system (1.1a)–(1.1d) was proposed in [10, 35, 36, 15] as a variation of the Saint-Venant equations to model multi-phase flows in estuaries or deep ocean currents. The derivation of the system is based on hydrostatic approximation which eliminates the variability in the z-direction. The design of robust and accurate numerical algorithms for computing the solutions of SWEDs system is an important and challenging problem that has been extensively studied in the recent years.

A number of numerical schemes for balance laws have been introduced in recent years, [28, 24, 20, 5, 27, 7, 6, 8, 23, 22, 2, 26, 3, 4, 39, 29]. Most of them utilize a Riemann problem solver for the upwind evolution of the calculated solution. However, as discussed in [9], the eigensystem of the system (1.1a)–(1.1d) may be incomplete due to the resonance phenomenon. Hence, it may be very difficult to design a reliable upwind scheme for the SWEDs. In our paper, we therefore use central-upwind schemes which are Riemann-problem-solver free methods, [21, 25, 29]. Central-upwind schemes have been referred to “black-box” solvers for general multidimensional systems of hyperbolic systems of conservation laws. In our prior work [13], we have derived a successful adaptive central-upwind method for Saint-Venant system on triangular grids.

Similar to the Saint-Venant system, a good method for SWEDs system should preserve the non-negativity of hh and ρ\rho, which is called the positivity-preserving property. In addition, the scheme must ensure a well-balanced property obtained when the numerical method preserve “lake-at-rest” steady-state solutions. Otherwise, the numerical method may lead to significant oscillations. Note that, the system (1.1a)–(1.1d) admits the following two “lake-at-rest” steady-state solutions, [9]:

w=max{C,B(x,y)},C=Const,ρ=PConst,uv0,w=\max\big{\{}C,B(x,y)\big{\}},\quad C=\rm{Const},\quad\rho=P\equiv Const,\quad u\equiv v\equiv 0, (1.2)

and

BConst,h2ρConst,uv0.B\equiv\rm{Const},\quad h^{2}\rho\equiv Const,\quad u\equiv v\equiv 0. (1.3)

Preserving the solution (1.3) is a big challenge for numerically solving the system (1.1a)–(1.1d) since using the conventional central-upwind methods may not ensure the variable h2ρh^{2}\rho, so-called variable pressure, to be constant at the contact waves. Therefore, for our adaptive scheme of SWEDs, we will utilize the central-upwind scheme which is derived from [9] for shallow water model with horizontal temperature variable (the system in [9] has similar properties with the SWEDs). In [9], the proposed second-order semi-discrete central-upwind scheme is capable of preserving the “lake at rest” steady state (1.2) and (1.3) as well as the positivity of the water depth and the temperature (the temperature variable is equivalent to the variable density in our work). In particular, to preserve the second type of “lake at rest” steady state (1.3) and suppress the pressure oscillations across the interface, an efficient interface tracking method is performed. The main idea of the interface approach in [9] is to completely avoid to use the information from the cells where two types of fluids are numerically mixed, so-called “mixed” cells when evolving the solution in the neighborhood of the interface. The data in the “mixed” cells is replaced by the interpolated values that are calculated using the reliable information from the nearby “single fluid” cells. Namely, the point values in “mixed” cells are obtained by using the approximated solution of the 1-D Riemann problems between the reliable “single fluid” cell averages. However, the central-upwind method and the interface tracking in [9] are designed on structured rectangular grids. In practice, one needs to deal with complicated geometries, where the use of triangular grids could be advantageous or even unavoidable. Hence, in this study, we extend the interface tracking method from [9] to unstructured triangular grids by utilizing the idea of the rotated coordinates proposed in [1]. The 1-D Riemann solver [9] is then performed in the direction of normal vectors on each edge of “mixed” cells. This extended central-upwind scheme maintains the well-balanced and positivity-preserving properties.

In addition to achieving the accuracy of the solution, minimizing computational cost is also one of the major challenge in the modeling and numerical analysis of hydrodynamics. The traditional numerical schemes for the system (1.1a)–(1.1d) are based on the use of very fine fixed meshes to reconstruct delicate features of the solution. However, this can lead to high computational cost, as well as poor resolution of all small scale features of the problem. In many engineering and scientific applications, it is beneficial to use adaptive meshes for improving the accuracy of the approximation at a much lower cost. Therefore, another goal of this work is to design an adaptive numerical algorithm for shallow water equations with variable density. There is some very recent effort on the design of adaptive well-balanced and positivity-preserving central-upwind schemes on quad-tree grids for shallow water models [37, 15, 14], but no research has been done for the development of such adaptive schemes for the shallow water with variable density on unstructured triangular grids.

As a part of the mesh reconstruction, we will need to project the data from the old mesh onto a new adaptive mesh. Since we avoid using the cell averages of mixed cells, the data of a new cell which is reconstructed from an old mixed cell is calculated based on the location of the density jumps and the data from the nearby “reliable” cells. Therefore, the interface separating different fluid phases must be accurately tracked or captured. In each “mixed” cell, we will reconstruct an approximate interface, which is called “interface reconstruction”. Many methods have been developed for this purpose in the last two decades, [31, 38, 17, 34, 42, 41]. In our work, we consider the interface reconstruction method derived in [45] due to the great advantages of this approach such as high-resolution, efficiency and simplicity.

This paper is organized as follows. In Section 2, we present a well-balanced positivity-preserving central-upwind scheme on unstructured triangular grids for SWEDs which serves as the underlying discretization for the developed adaptive algorithm. Next, in Section 3.1, we present the procedure to detect mixed cells. The interface approximation will be briefly reviewed in Section 3.2. In Section 3.3, we discuss the cell averages correction, which is used to prevent the density diffusion around the density jumps. We summarize the adaptive central-upwind method in Section 4.1. We discuss a strategy of adaptive mesh refinement in Section 4.2. In Section 4.3, we present an adaptive second-order strong stability preserving Runge-Kutta method, employed as a part of time evolution for the adaptive central-upwind scheme. We develop a local posteriori error estimator in Section 4.4 which is used as a robust indicator for the adaptive mesh refinement in our work. Finally, in Section 5, we illustrate the high accuracy and efficiency of the developed adaptive central-upwind scheme on a number of challenging tests for multi-fluid shallow water models.

2 The Central Upwind Scheme for SWEDs in Triangular Mesh

In this section, we focus on developing the central-upwind method for the SWEDs system (1.1a)-(1.1d), [15]. In particular, we will extend the adaptive scheme from the Saint-Venant system in [13] to the SWEDs system. The developed scheme will eliminate the oscillation appearing at the interface and ensure the well-balanced and positivity-preserving properties.

We first rewrite the SWEDs system (1.1a)-(1.1d) into the vector form as,

𝐔t+𝐅(𝐔,B)x+𝐆(𝐔,B)y=𝐒(𝐪,B),\mathbf{U}_{t}+\mathbf{F}(\mathbf{U},B)_{x}+\mathbf{G}(\mathbf{U},B)_{y}=\mathbf{S}(\mathbf{q},B), (2.1)

where

U=(w,hu,hv,hρ),U=(w,hu,hv,h\rho),

and the fluxes and source term are:

𝐅(𝐔,B)\displaystyle\mathbf{F}(\mathbf{U},B) =(hu,(hu)2wB+g2ρ0ρ(wB)2,(hu)(hv)wB,huρ)T,\displaystyle=(hu,\dfrac{(hu)^{2}}{w-B}+\dfrac{g}{2\rho_{0}}\rho(w-B)^{2},\dfrac{(hu)(hv)}{w-B},hu\rho)^{T}, (2.2)
𝐆(𝐪,B)\displaystyle\mathbf{G}(\mathbf{q},B) =(hv,(hu)(hv)wB,(hv)2wB+g2ρ0ρ(wB)2,hvρ)T,\displaystyle=(hv,\dfrac{(hu)(hv)}{w-B},\dfrac{(hv)^{2}}{w-B}+\dfrac{g}{2\rho_{0}}\rho(w-B)^{2},hv\rho)^{T},
𝐒(𝐔,B)\displaystyle\mathbf{S}(\mathbf{U},B) =(0,gρρ0(wB)Bx,gρρ0(wB)By,0)T.\displaystyle=(0,-g\frac{\rho}{\rho_{0}}(w-B)B_{x},-g\frac{\rho}{\rho_{0}}(w-B)B_{y},0)^{T}.

In our research, we consider the triangular mesh illustrated in Fig. 2.1 with the following notations.

Refer to caption
Figure 2.1: A typical triangular cell with three neighbors.

𝒯:=jTj{\mathcal{T}}:=\bigcup_{j}T_{j} is an unstructured triangulation of the computational domain Ω\Omega;

Tj𝒯T_{j}\in\mathcal{T} is a triangular cell of size |Tj||T_{j}| with the barycenter (xj,yj)(x_{j},y_{j});

Vjκ=(x~jκ,y~jκ),κ=12,23,31V_{j\kappa}=(\widetilde{x}_{j\kappa},\widetilde{y}_{j\kappa}),~{}\kappa=12,23,31 are the three vertices of TjT_{j};

Tjk,k=1,2,3T_{jk},~{}k=1,2,3 are the neighboring triangles that share a common side with TjT_{j};

jk\ell_{jk} is the length of the common side of TjT_{j} and TjkT_{jk}, and MjkM_{jk} is its midpoint;

𝒏jk:=(cos(θjk),sin(θjk))\bm{n}_{jk}:=(\cos(\theta_{jk}),\sin(\theta_{jk}))^{\top} is the outer unit normal to the kkth side of TjT_{j}.

Next, the bottom topography BB is replaced with its continuous piecewise linear approximation B~\widetilde{B} given by

|xx~j12yy~j12B~(x,y)B^j12x~j23x~j12y~j23y~j12B^j23B^j12x~j13x~j12y~j13y~j12B^j13B^j12|=0,(x,y)Tj,\left|\begin{array}[]{ccc}x-\widetilde{x}_{j12}&y-\widetilde{y}_{j12}&{\widetilde{B}}(x,y)-\widehat{B}_{j12}\\[2.15277pt] \widetilde{x}_{j23}-\widetilde{x}_{j12}&\widetilde{y}_{j23}-\widetilde{y}_{j12}&\widehat{B}_{j23}-\widehat{B}_{j12}\\[2.15277pt] \widetilde{x}_{j13}-\widetilde{x}_{j12}&\widetilde{y}_{j13}-\widetilde{y}_{j12}&\widehat{B}_{j13}-\widehat{B}_{j12}\end{array}\right|=0,\quad(x,y)\in T_{j},

where, in the case of continuous bottom topography, B^jκ:=B(Vjκ)κ=12,23,31\widehat{B}_{j\kappa}:=B(V_{j\kappa})~{}\kappa=12,23,31. Then, denote:

Bjk:=B~(Mjk),Bj:=B~(xj,yj)=13(B^j12+B^j23+B^j13).B_{jk}:=\widetilde{B}(M_{jk}),\quad B_{j}:=\widetilde{B}(x_{j},y_{j})=\frac{1}{3}(\widehat{B}_{j12}+\widehat{B}_{j23}+\widehat{B}_{j13}).

At time tt, define by  𝑼j(t)\hbox{\vbox{\hrule height=0.5pt\kern 1.72218pt\hbox{\kern-0.50003pt$\bm{U}$\kern-0.50003pt}}}_{j}(t) the approximation of the cell averages of the solution,

 U j(t)1|Tj|Tj𝑼(x,y,t)𝑑x𝑑y.\hbox{\vbox{\hrule height=0.5pt\kern 1.72218pt\hbox{\kern-0.50003pt$\bm{U}$\kern-0.50003pt}}}_{j}(t)\approx\frac{1}{|T_{j}|}\iint\limits_{T_{j}}\bm{U}(x,y,t)\,dxdy.

From now on, in order to shorten the formula, we suppress the time-dependence in the algorithm. All indexed quantities used in the following formula will be computed at time tt. Then, as shown in [29, 4], the semi-discrete second-order central-upwind scheme for the Saint-Venant system (1.1a)-(1.1d) on triangular grids is written as the following system of ODEs,

d 𝑼jdt=\displaystyle\frac{d\,\hbox{\vbox{\hrule height=0.5pt\kern 1.72218pt\hbox{\kern-0.50003pt$\bm{U}$\kern-0.50003pt}}}_{j}}{dt}= 1|Tj|[𝑯j1+𝑯j2+𝑯j3]+ 𝑺j,\displaystyle-\frac{1}{|T_{j}|}\big{[}\bm{H}_{j1}+\bm{H}_{j2}+\bm{H}_{j3}\big{]}+\hbox{\vbox{\hrule height=0.5pt\kern 1.72218pt\hbox{\kern-0.50003pt$\bm{S}$\kern-0.50003pt}}}_{j}, (2.3)

where the numerical fluxes through the edges of the triangular cell TjT_{j} are

𝑯jk=\displaystyle\bm{H}_{jk}= jkcos(θjk)ajkin+ajkout[ajkin𝑭(𝑼jk(Mjk),Bjk)+ajkout𝑭(𝑼j(Mjk),Bjk)]\displaystyle\frac{\ell_{jk}\cos(\theta_{jk})}{a_{jk}^{\rm in}+a_{jk}^{\rm out}}\Big{[}{a_{jk}^{\rm in}\bm{F}(\bm{U}_{jk}(M_{jk}),B_{jk})+a_{jk}^{\rm out}\bm{F}(\bm{U}_{j}(M_{jk}),B_{jk})}\Big{]} (2.4)
+\displaystyle+ jksin(θjk)ajkin+ajkout[ajkin𝑮(𝑼jk(Mjk),Bjk)+ajkout𝑮(𝑼j(Mjk),Bjk)]\displaystyle\frac{\ell_{jk}\sin(\theta_{jk})}{a_{jk}^{\rm in}+a_{jk}^{\rm out}}\Big{[}{a_{jk}^{\rm in}\bm{G}(\bm{U}_{jk}(M_{jk}),B_{jk})+a_{jk}^{\rm out}\bm{G}(\bm{U}_{j}(M_{jk}),B_{jk})}\Big{]} (2.5)
\displaystyle- jkajkinajkoutajkin+ajkout[𝑼jk(Mjk)𝑼j(Mjk)],k=1,2,3.\displaystyle\ell_{jk}\frac{a_{jk}^{\rm in}a_{jk}^{\rm out}}{a_{jk}^{\rm in}+a_{jk}^{\rm out}}\big{[}\bm{U}_{jk}(M_{jk})-\bm{U}_{j}(M_{jk})\big{]},\quad k=1,2,3. (2.6)

Here, 𝑼j(Mjk)\bm{U}_{j}(M_{jk}) and 𝑼jk(Mjk)\bm{U}_{jk}(M_{jk}) are the reconstructed point values of 𝑼\bm{U} at the middle points of the edges MjkM_{jk}. To obtain these values, first, a piecewise linear reconstruction of the variables 𝚼:=(w,u,v,ρ)\bm{\Upsilon}:=(w,u,v,\rho)^{\top} is computed as,

𝚼~(x,y)=j𝚼j(x,y)χTj,𝚼j(x,y):=𝚼j+(𝚼^x)j(xxj)+(𝚼^y)j(yyj),\widetilde{\bm{\Upsilon}}(x,y)=\sum\limits_{j}\bm{\Upsilon}_{j}(x,y){\Large{\mbox{$\chi$}}}_{T_{j}},\quad\bm{\Upsilon}_{j}(x,y):=\bm{\Upsilon}_{j}+(\widehat{\bm{\Upsilon}}_{x})_{j}(x-x_{j})+(\widehat{\bm{\Upsilon}}_{y})_{j}(y-y_{j}), (2.7)

where χTj{\Large{\mbox{$\chi$}}}_{T_{j}} is the characteristic function of the cell TjT_{j}, 𝚼j\bm{\Upsilon}_{j} are the point values of 𝚼\bm{\Upsilon} at the cell centers, and (𝚼^x)j(\widehat{\bm{\Upsilon}}_{x})_{j} and (𝚼^y)j(\widehat{\bm{\Upsilon}}_{y})_{j} are the limited partial derivatives (see Section 3 in [29] for more details of the computation). In order to compute the cell center point values of the density, ρjρ(xj,yj,t)\rho_{j}\approx\rho(x_{j},y_{j},t) in cell TjT_{j} and velocities uju(xj,yj,t)u_{j}\approx u(x_{j},y_{j},t) and vjv(xj,yj,t)v_{j}\approx v(x_{j},y_{j},t), we use the desingularization procedure presented in [29]. After that, the second and third components of the point values 𝑼j(Mjk)\bm{U}_{j}(M_{jk}) and 𝑼jk(Mjk)\bm{U}_{jk}(M_{jk}) are obtained from, 𝚼j(Mjk)\bm{\Upsilon}_{j}(M_{jk}) and 𝚼jk(Mjk)\bm{\Upsilon}_{jk}(M_{jk}),

(hu)j(Mjk)=(wj(Mjk)Bjk)uj(Mjk),\displaystyle(hu)_{j}(M_{jk})=(w_{j}(M_{jk})-B_{jk})\,u_{j}(M_{jk}), (hu)jk(Mjk)=(wjk(Mjk)Bjk)ujk(Mjk),\displaystyle(hu)_{jk}(M_{jk})=(w_{jk}(M_{jk})-B_{jk})\,u_{jk}(M_{jk}),
(hv)j(Mjk)=(wj(Mjk)Bjk)vj(Mjk),\displaystyle(hv)_{j}(M_{jk})=(w_{j}(M_{jk})-B_{jk})\,v_{j}(M_{jk}), (hv)jk(Mjk)=(wjk(Mjk)Bjk)vjk(Mjk).\displaystyle(hv)_{jk}(M_{jk})=(w_{jk}(M_{jk})-B_{jk})\,v_{jk}(M_{jk}).
(hρ)j(Mjk)=(wj(Mjk)Bjk)ρj(Mjk),\displaystyle(h\rho)_{j}(M_{jk})=(w_{j}(M_{jk})-B_{jk})\,\rho_{j}(M_{jk}), (hρ)jk(Mjk)=(wjk(Mjk)Bjk)ρjk(Mjk).\displaystyle(h\rho)_{jk}(M_{jk})=(w_{jk}(M_{jk})-B_{jk})\,\rho_{jk}(M_{jk}).

However, in some numerical examples, the oscillation may appear when we use the piecewise linear approximation (2.7) to obtain the point values in some cells. It may occur due to the appearance of local extrema values at middle points or as a consequence of the density discontinuity. To prevent this oscillation, we will use some techniques that will be discussed later in Sections 2.1 and 2.2.

In (2.6), ajkina_{jk}^{\rm in} and ajkouta_{jk}^{\rm out} are the one-sided local speeds of propagation in the directions ±𝒏jk\pm\bm{n}_{jk}. These speeds are related to the largest and smallest eigenvalues of the Jacobian matrix Jjk=cos(θjk)𝑭𝑼+sin(θjk)𝑮𝑼J_{jk}=\cos(\theta_{jk})\,\frac{\partial{\bm{F}}}{\partial{\bm{U}}}+\sin(\theta_{jk})\,\frac{\partial{\bm{G}}}{\partial{\bm{U}}}, denoted by λ+[Jjk]\lambda_{+}[J_{jk}] and λ[Jjk]\lambda_{-}[J_{jk}], respectively, and are defined by

ajkin=min{λ[Jjk(𝑼j(Mjk))],λ[Jjk(𝑼jk(Mjk)], 0},\displaystyle a^{\rm in}_{jk}=-\min\{\lambda_{-}[J_{jk}(\bm{U}_{j}(M_{jk}))],\,\lambda_{-}[J_{jk}(\bm{U}_{jk}(M_{jk})],\,0\}, (2.8)
ajkout=max{λ+[Jjk(𝑼j(Mjk))],λ+[Jjk(𝑼jk(Mjk)], 0},\displaystyle a^{\rm out}_{jk}=\max\{\lambda_{+}[J_{jk}(\bm{U}_{j}(M_{jk}))],\,\lambda_{+}[J_{jk}(\bm{U}_{jk}(M_{jk})],\,0\},

where

λ±[Jjk(𝑼j(Mjk))]=cos(θjk)uj(Mjk)+sin(θjk)vj(Mjk)±gρ0hj(Mjk)ρj(Mjk),\displaystyle\lambda_{\pm}[J_{jk}(\bm{U}_{j}(M_{jk}))]=\cos(\theta_{jk})u_{j}(M_{jk})+\sin(\theta_{jk})v_{j}(M_{jk})\pm\sqrt{\frac{g}{\rho_{0}}h_{j}(M_{jk})\rho_{j}(M_{jk})},
λ±[Jjk(𝑼jk(Mjk))]=cos(θjk)ujk(Mjk)+sin(θjk)vjk(Mjk)±gρ0hjk(Mjk)ρjk(Mjk).\displaystyle\lambda_{\pm}[J_{jk}(\bm{U}_{jk}(M_{jk}))]=\cos(\theta_{jk})u_{jk}(M_{jk})+\sin(\theta_{jk})v_{jk}(M_{jk})\pm\sqrt{\frac{g}{\rho_{0}}h_{jk}(M_{jk})\rho_{jk}(M_{jk})}.
Remark 2.1

In order to avoid division by 0 (or by a very small positive number), the numerical flux (2.6) is replaced with

𝑯jk=\displaystyle\bm{H}_{jk}= jkcos(θjk)2[𝑭(𝑼jk(Mjk),Bjk)+𝑭(𝑼j(Mjk),Bjk)]\displaystyle\frac{\ell_{jk}\cos(\theta_{jk})}{2}\left[\bm{F}(\bm{U}_{jk}(M_{jk}),B_{jk})+\bm{F}(\bm{U}_{j}(M_{jk}),B_{jk})\right]
+\displaystyle+ jksin(θjk)2[𝑮(𝑼jk(Mjk),Bjk)+𝑮(𝑼j(Mjk),Bjk)]\displaystyle\frac{\ell_{jk}\sin(\theta_{jk})}{2}\left[\bm{G}(\bm{U}_{jk}(M_{jk}),B_{jk})+\bm{G}(\bm{U}_{j}(M_{jk}),B_{jk})\right]

wherever ajkin+ajkout<σa_{jk}^{\rm in}+a_{jk}^{\rm out}<\sigma. In all of the reported numerical examples in Section 5, we have taken σ=106\sigma=10^{-6}.

Finally, the cell average of the source term 𝑺j\bm{S}_{j} in (2.3),

 𝑺j(t)1|Tj|Tj𝑺(𝑼(x,y,t),B(x,y))𝑑x𝑑y,\hbox{\vbox{\hrule height=0.5pt\kern 1.72218pt\hbox{\kern-0.50003pt$\bm{S}$\kern-0.50003pt}}}_{j}(t)\approx\frac{1}{|T_{j}|}\iint\limits_{T_{j}}\bm{S}\big{(}\bm{U}(x,y,t),B(x,y)\big{)}\,dxdy,

has to be discretized in a well-balanced manner presented later in Section 2.4

2.1 The Limiter for Piecewise Linear Approximation

As discussed above, we may observe the oscillation when using piecewise linear approximation (2.7) due to the appearance of local extrema at midpoints MjkM_{jk}, see [29]. Hence, in order to maintain the numerical stability of the scheme, the following monotonicity condition must be satisfied.

min(𝚼j(i),𝚼jk(i))𝚼j(i)(Mjk)max(𝚼j(i),𝚼jk(i)),k=1,2,3,\min\big{(}\bm{\Upsilon}^{(i)}_{j},\bm{\Upsilon}^{(i)}_{jk}\big{)}\leq\bm{\Upsilon}^{(i)}_{j}(M_{jk})\leq\max\big{(}\bm{\Upsilon}^{(i)}_{j},\bm{\Upsilon}^{(i)}_{jk}\big{)},\quad k=1,2,3, (2.9)

where 𝚼j(i)(Mjk)\bm{\Upsilon}^{(i)}_{j}(M_{jk}) is the ii-th component of the point values at midpoint MjkM_{jk} which is obtained by the linear reconstruction (2.7). Here, 𝚼j(i)\bm{\Upsilon}^{(i)}_{j} and 𝚼jk(i)\bm{\Upsilon}^{(i)}_{jk} are the center point value in cell TjT_{j} and the neighboring cell TjkT_{jk}, see [19]. To ensure that the reconstructed point value 𝚼j(i)(Mjk)\bm{\Upsilon}^{(i)}_{j}(M_{jk}) is between two cell averages 𝚼j(i)\bm{\Upsilon}^{(i)}_{j} and 𝚼jk(i)\bm{\Upsilon}^{(i)}_{jk}, in [29, 3], the gradients 𝚼^x\widehat{\bm{\Upsilon}}_{x} and 𝚼^y\widehat{\bm{\Upsilon}}_{y} are set to zero for cells violating at least one of the inequalities (2.9). However, using zero gradients may reduce the convergence rate in numerical simulation. Hence, in our research, instead of zero gradients, we consider the idea of the positivity-preserving limiter developed in [32, 43] to correct the piecewise linear reconstruction. The details for this correction are presented as follows.

Consider an arbitrary cell TjT_{j} with the polynomial 𝚼j(i)(x,y)\bm{\Upsilon}^{(i)}_{j}(x,y) that does not satisfy at least one of local extrema conditions (2.9). In that case, we will replace 𝚼j(i)(x,y)\bm{\Upsilon}^{(i)}_{j}(x,y) by

(𝚼j(i))(x,y)=θ(𝚼j(i)(x,y)𝚼j(i))+𝚼j(i),(\bm{\Upsilon}^{(i)}_{j})^{*}(x,y)=\theta(\bm{\Upsilon}^{(i)}_{j}(x,y)-\bm{\Upsilon}^{(i)}_{j})+\bm{\Upsilon}^{(i)}_{j}, (2.10)

where θ[0,1]\theta\in[0,1] such that (𝚼j(i))(x,y)(\bm{\Upsilon}^{(i)}_{j})^{*}(x,y) satisfies the inequalities (2.9) for all k=1,2,3k=1,2,3. We then need to solve for the constant θ\theta. Plugging (2.10) into the inequalities (2.9), we have

θ[min(αjk,βjk),max(αjk,βjk)],k=1,2,3\theta\in\left[\min(\alpha_{jk},\beta_{jk}),\max(\alpha_{jk},\beta_{jk})\right],\quad k=1,2,3 (2.11)

or

θ[maxk(min(αjk,βjk)),mink(max(αjk,βjk))]\theta\in[\max_{k}(\min(\alpha_{jk},\beta_{jk})),\min_{k}(\max(\alpha_{jk},\beta_{jk}))] (2.12)

where αjk=min(𝚼j(i),𝚼jk(i))𝚼j(i)𝚼j(i)(Mjk)𝚼j(i),βjk=max(𝚼j(i),𝚼jk(i))𝚼j(i)𝚼j(i)(Mjk)𝚼j(i).\alpha_{jk}=\dfrac{\min\big{(}\bm{\Upsilon}^{(i)}_{j},\bm{\Upsilon}^{(i)}_{jk}\big{)}-\bm{\Upsilon}^{(i)}_{j}}{\bm{\Upsilon}^{(i)}_{j}(M_{jk})-\bm{\Upsilon}^{(i)}_{j}},\quad\beta_{jk}=\dfrac{\max\big{(}\bm{\Upsilon}^{(i)}_{j},\bm{\Upsilon}^{(i)}_{jk}\big{)}-\bm{\Upsilon}^{(i)}_{j}}{\bm{\Upsilon}^{(i)}_{j}(M_{jk})-\bm{\Upsilon}^{(i)}_{j}}.

Hence we can take

θ=min(mink(max(αjk,βjk)),1),\theta=\min(\min_{k}(\max(\alpha_{jk},\beta_{jk})),1), (2.13)

Note that θ0\theta\geq 0 since θ=0\theta=0, which corresponds to the constant approximation for (𝚼j(i))(x,y)(\bm{\Upsilon}^{(i)}_{j})^{*}(x,y), is one solution of the inequalities (2.9). Hence, with this optimized limiter, the point values stay within the given range. In addition, the approximated values of water depth and density at middle points are also positive as 𝚼j(i)(Mjk)min(𝚼j(i),𝚼jk(i))>0\bm{\Upsilon}^{(i)}_{j}(M_{jk})\geq\min\big{(}\bm{\Upsilon}^{(i)}_{j},\bm{\Upsilon}^{(i)}_{jk}\big{)}>0. Therefore, the stability is ensured without using zero-gradients.

2.2 Riemann Solver for Mixed Cells

As mentioned in Section 1 and [9], a good scheme should not develop spurious pressure oscillations in the neighborhood of density jumps. The oscillations appear when we numerically solve the compressible multifluid systems by using conventional Godunov-type finite-volume methods. We define the cells which contains the curves of density discontinuity as “mixed” cells. Note that the quantities in mixed cells are calculated as an artificial numerical mixture of two different fluids. Hence, the cell averages of mixed cells may have no or very little physical sense and become ’unreliable’ [9]. Consequently, using the cell averages in mixed cells to obtain the linear approximation (2.7) in the neighborhood of the interface will lead to unexpected pressure oscillations. In [9], to eliminate the oscillation, instead of the linear approximation (2.7), the point values in the “mixed” cells are calculated by using the approximated solution of 1-D Riemann problems. Namely, according to this approach, the 1-D Riemann Solver is applied in the xx-direction to approximate the point values on the vertical boundaries of each rectangular mixed cell. Similarly, for the point values on horizontal sides of the rectangular, 1-D Riemann problem is considered in yy-direction. This leads to the idea of applying Riemann Solver approach in the direction of the normal vector, so called “normal direction”, to get the middle point values on each side of the mixed cells in triangular meshes. We can understand this idea as rotating the reference coordinate. Recently, a method using rotated coordinate frame to solve multi-dimensional Riemann problems has been proposed in [1]. In such approach, the 2-D Riemann Problem is converted to 1-D problem in a particular direction in order to easily obtain the corresponding solution in 2-D. Therefore, in our research, we will calculate the point values in triangles based on the intermediate states of 1-D Riemann problem in the normal direction as follows.

Assume that triangle TjT_{j} is a mixed cell which has the outward unit normal vector 𝐧jk=(cos(θjk),sin(θjk))\mathbf{n}_{jk}=(\cos(\theta_{jk}),\sin(\theta_{jk})) on side kk. We will consider a new reference frame (x,y)(x^{\prime},y^{\prime}) such that the new horizontal axis is in the direction of the outward normal vector 𝐧jk\mathbf{n}_{jk} and the origin (0,0)(0,0) is at the middle point MjkM_{jk} of side kk as shown in Fig. 2.2.

Refer to caption
Figure 2.2: An example of the rotated coordinates (x,y)(x^{\prime},y^{\prime}) where xx^{\prime}-axis is in the direction of normal vector 𝐧jk\mathbf{n}_{jk} and the new origin is at midpoint MjkM_{jk} of side kk.

Suppose TLT_{L} and TRT_{R} to be the two closest single-fluid cells to TjT_{j} such that TLT_{L} and TRT_{R} stay on different sides of the kk-th edge of cell TjT_{j}. We assume that TRT_{R} stays on the side where the outward normal vector 𝐧jk\mathbf{n}_{jk} is pointing. Let 𝚼L=(wL,uL,vL,ρL)\bm{\Upsilon}_{L}=(w_{L},u_{L},v_{L},\rho_{L}) and 𝚼R=(wR,uR,vR,ρR)\bm{\Upsilon}_{R}=(w_{R},u_{R},v_{R},\rho_{R}) be the center point values of single-fluid cells TLT_{L} and TRT_{R}. Note that (uL,vL)(u_{L},v_{L}) and (uR,vR)(u_{R},v_{R}) are the values of velocities in the Cartesian coordinate system (x,y)(x,y). The projections of velocities (uL,vL)(u_{L},v_{L}) and (uR,vR)(u_{R},v_{R}) onto the rotated frame (x,y)(x^{\prime},y^{\prime}) are

uL=uLcos(θjk)+vLsin(θjk),vL=uLsin(θjk)+vLcos(θjk),u^{\prime}_{L}=u_{L}\cos(\theta_{jk})+v_{L}\sin(\theta_{jk}),\quad v^{\prime}_{L}=-u_{L}\sin(\theta_{jk})+v_{L}\cos(\theta_{jk}),
uR=uRcos(θjk)+vRsin(θjk),vR=uRsin(θjk)+vRcos(θjk).u^{\prime}_{R}=u_{R}\cos(\theta_{jk})+v_{R}\sin(\theta_{jk}),\quad v^{\prime}_{R}=-u_{R}\sin(\theta_{jk})+v_{R}\cos(\theta_{jk}).

Similar to [1, 9], to compute the point value at midpoint MjkM_{jk} on side kk of triangle TjT_{j}, we have to solve the following 1-D Riemann problems between states 𝚼L\bm{\Upsilon}_{L} an 𝚼R\bm{\Upsilon}_{R} in direction 𝐧jk\mathbf{n}_{jk}.

{wt+(hu)x=0(hu)t+((hu)2wB+g2ρρ0(wB))x=gρρ0(wB)Bx,(hv)t+((hu)(hv)wB)x=0,(hρρ0)t+(uhρρ0)x=0,\begin{cases}w_{t}+(hu)_{x^{\prime}}=0\\ (hu)_{t}+\Big{(}\dfrac{(hu)^{2}}{w-B}+\frac{g}{2}\frac{\rho}{\rho_{0}}(w-B)\Big{)}_{x^{\prime}}=-g\dfrac{\rho}{\rho_{0}}(w-B)B_{x^{\prime}},\\ (hv)_{t}+\left(\dfrac{(hu)(hv)}{w-B}\right)_{x^{\prime}}=0,\\ (h\frac{\rho}{\rho_{0}})_{t}+\left(uh\dfrac{\rho}{\rho_{0}}\right)_{x^{\prime}}=0,\end{cases} (2.14)

subject to the following initial condition

(w,u,v,ρ,B)(x,0)={(𝚼L):=(wL,uL,vL,ρL,BL)ifx<0,(𝚼R):=(wR,uR,vR,ρR,BR)ifx>0.(w,u,v,\rho,B)(x^{\prime},0)=\begin{cases}(\bm{\Upsilon}_{L})^{\prime}:=(w_{L},u^{\prime}_{L},v^{\prime}_{L},\rho_{L},B_{L})\quad\mbox{if}\quad x^{\prime}<0,\\ (\bm{\Upsilon}_{R})^{\prime}:=(w_{R},u^{\prime}_{R},v^{\prime}_{R},\rho_{R},B_{R})\quad\mbox{if}\quad x^{\prime}>0.\end{cases} (2.15)

The details of the approximate Riemann solver for the above Riemann problem can be seen in [9]. Suppose (𝚼L):=(wL,(uL),(vL),ρL)(\bm{\Upsilon}^{*}_{L})^{\prime}:=(w^{*}_{L},(u^{*}_{L})^{\prime},(v^{*}_{L})^{\prime},\rho^{*}_{L}) and (𝚼R):=(wR,(uR),(vR),ρR)(\bm{\Upsilon}^{*}_{R})^{\prime}:=(w^{*}_{R},(u^{*}_{R})^{\prime},(v^{*}_{R})^{\prime},\rho^{*}_{R}) are the intermediate states calculated by Riemann solver for (2.14)-(2.15) in (x,y)(x^{\prime},y^{\prime}) coordinates. We recall that in [9], the point values at midpoints on left and right boundaries of a rectangular mixed cell are obtained respectively based on the left and right Riemann intermediate states,(𝚼L)(\bm{\Upsilon}^{*}_{L})^{\prime} and (𝚼R)(\bm{\Upsilon}^{*}_{R})^{\prime}. Here, in triangular grids, we can choose either (𝚼L)(\bm{\Upsilon}^{*}_{L})^{\prime} or (𝚼R)(\bm{\Upsilon}^{*}_{R})^{\prime} to calculate the point values at the middle point MjkM_{jk} of cell TjT_{j}. Note that TLT_{L} and TRT_{R} are both single-fluid cells nearby mixed cell TjT_{j}. However, if the neighboring cell TjkT_{jk} shown in Fig. 2.2 is a single-fluid cell, then TRTjkT_{R}\equiv T_{jk} and MjkTRM_{jk}\in T_{R}, which means TRT_{R} is closer to MjkM_{jk} compared to TLT_{L}. Hence, in our work, we select the right intermediate values (𝚼R)(\bm{\Upsilon}^{*}_{R})^{\prime} and the information from TRT_{R} to compute the point values 𝚼j(Mjk)\bm{\Upsilon}_{j}(M_{jk}). From [9], we first calculate the sound of speed cR=h2gρ2ρ0c^{*}_{R}=h^{2}\dfrac{g\rho}{2\rho_{0}}. If hR>0,ρR>0h^{*}_{R}>0,\rho^{*}_{R}>0 and (u)RcR<0(u^{*})^{\prime}_{R}-c^{*}_{R}<0, then we replace the piecwise linear approximation in (2.7) by 𝚼j(Mjk)=(𝚼R)\bm{\Upsilon}_{j}(M_{jk})=(\bm{\Upsilon}^{*}_{R})^{\prime}, otherwise 𝚼j(Mjk)=(𝚼R)\bm{\Upsilon}_{j}(M_{jk})=(\bm{\Upsilon}_{R})^{\prime} (more details of the point values correction can be seen in [9]). Finally, we convert the computed solution back to original Cartesian coordinate (x,y)(x,y) as

𝚼j(Mjk)={𝚼R,ifhR>0,ρR>0,(u)RcR<0,𝚼R,otherwise,\bm{\Upsilon}_{j}(M_{jk})=\begin{cases}\bm{\Upsilon}^{*}_{R},\quad&\mbox{if}\quad h^{*}_{R}>0,\rho^{*}_{R}>0,(u^{*})^{\prime}_{R}-c^{*}_{R}<0,\\ \bm{\Upsilon}_{R},\quad&\mbox{otherwise},\end{cases} (2.16)

where 𝚼R:=(wR,(uR)cos(θjk)(vR)sin(θjk),(uR)sin(θjk)+(vR)cos(θjk),ρR)\bm{\Upsilon}^{*}_{R}:=(w^{*}_{R},(u^{*}_{R})^{\prime}\cos(\theta_{jk})-(v^{*}_{R})^{\prime}\sin(\theta_{jk}),(u^{*}_{R})^{\prime}\sin(\theta_{jk})+(v^{*}_{R})^{\prime}\cos(\theta_{jk}),\rho^{*}_{R}).

From [9], in “lake at rest” solutions (1.2) and (1.3), we have 𝚼R=𝚼R\bm{\Upsilon}^{*}_{R}=\bm{\Upsilon}_{R} and the steady state solutions are then preserved by using the discretization of the source term presented in Section 2.4.

2.3 Positivity-preserving condition

Next, we will discuss the restriction of time step to preserve the positivity of water depth hh and the variable hρh\rho. Consider the Forward Euler (FE) equation

 Ujn+1= Ujn1|Tj|k=13ΔtjkHjk+ΔtS¯j.\hbox{\vbox{\hrule height=0.5pt\kern 1.72218pt\hbox{\kern-0.50003pt${U}$\kern-0.50003pt}}}_{j}^{n+1}=\hbox{\vbox{\hrule height=0.5pt\kern 1.72218pt\hbox{\kern-0.50003pt${U}$\kern-0.50003pt}}}_{j}^{n}-\frac{1}{|T_{j}|}\sum_{k=1}^{3}\Delta t_{jk}{H}_{jk}+\Delta t\,\bar{{S}}_{j}.

From [3], the time step condition to guarantee the positivity of water height hh is

Δt<16aminjk(rjk).\Delta t<\dfrac{1}{6a}\min_{jk}(r_{jk}). (2.17)

One can clearly see that the time step size (2.17) will also achieve nonnegative water height hh in the density shallow water model (1.1a)-(1.1d), see [3, 29]. We now use the idea from [3] to find the CFL-type condition for the positivity-preserving property of the last variable hρh\rho. To this end, we apply the forward Euler discretization to the last component of the scheme.

( hρ)jn+1=( hρ)jn\displaystyle(\hbox{\vbox{\hrule height=0.5pt\kern 1.72218pt\hbox{\kern-0.50003pt$h\rho$\kern-0.50003pt}}})^{n+1}_{j}=(\hbox{\vbox{\hrule height=0.5pt\kern 1.72218pt\hbox{\kern-0.50003pt$h\rho$\kern-0.50003pt}}})^{n}_{j}- Δt|Tj|k=13jkcos(ρjk)ajkin+ajkout[ajkin(hρu)jk(Mjk)+ajkout(hρu)j(Mjk)]\displaystyle\dfrac{\Delta t}{|T_{j}|}\sum_{k=1}^{3}\frac{\ell_{jk}\cos(\rho_{jk})}{a_{jk}^{\rm in}+a_{jk}^{\rm out}}\Big{[}a_{jk}^{\rm in}(h\rho u)_{jk}(M_{jk})+a_{jk}^{\rm out}(h\rho u)_{j}(M_{jk})\Big{]} (2.18)
\displaystyle- Δt|Tj|k=13jksin(ρjk)ajkin+ajkout[ajkin(hρv)jk(Mjk)+ajkout(hρv)j(Mjk)]\displaystyle\dfrac{\Delta t}{|T_{j}|}\sum_{k=1}^{3}\frac{\ell_{jk}\sin(\rho_{jk})}{a_{jk}^{\rm in}+a_{jk}^{\rm out}}\Big{[}a_{jk}^{\rm in}(h\rho v)_{jk}(M_{jk})+a_{jk}^{\rm out}(h\rho v)_{j}(M_{jk})\Big{]}
+\displaystyle+ Δt|Tj|k=13jkajkinajkoutajkin+ajkout[(hρ)jk(Mjk)(hρ)j(Mjk)].\displaystyle\dfrac{\Delta t}{|T_{j}|}\sum_{k=1}^{3}\ell_{jk}\frac{a_{jk}^{\rm in}a_{jk}^{\rm out}}{a_{jk}^{\rm in}+a_{jk}^{\rm out}}\big{[}(h\rho)_{jk}(M_{jk})-(h\rho)_{j}(M_{jk})\big{]}.

Note that

( hρ)jn=hjρj=(13m=13hj(Mjm))(13s=13ρj(Mjs))=19m,shj(Mjm)ρj(Mjs).(\hbox{\vbox{\hrule height=0.5pt\kern 1.72218pt\hbox{\kern-0.50003pt$h\rho$\kern-0.50003pt}}})^{n}_{j}=h_{j}\rho_{j}=\left(\dfrac{1}{3}\sum_{m=1}^{3}h_{j}(M_{jm})\right)\left(\dfrac{1}{3}\sum_{s=1}^{3}\rho_{j}(M_{js})\right)=\dfrac{1}{9}\sum_{m,s}h_{j}(M_{jm})\rho_{j}(M_{js}). (2.19)

Plug (2.19) to (2.18), we have

( hρ)jn+1=\displaystyle(\hbox{\vbox{\hrule height=0.5pt\kern 1.72218pt\hbox{\kern-0.50003pt$h\rho$\kern-0.50003pt}}})^{n+1}_{j}= 19m,shj(Mjm)ρj(Mjs)\displaystyle\dfrac{1}{9}\sum_{m,s}h_{j}(M_{jm})\rho_{j}(M_{js})
Δt|Tj|k=13jkcos(ρjk)ajkin+ajkout[ajkinhjk(Mjk)ρjk(Mjk)ujk(Mjk)+ajkouthj(Mjk)ρj(Mjk)uj(Mjk)]\displaystyle-\dfrac{\Delta t}{|T_{j}|}\sum_{k=1}^{3}\frac{\ell_{jk}\cos(\rho_{jk})}{a_{jk}^{\rm in}+a_{jk}^{\rm out}}\Big{[}a_{jk}^{\rm in}h_{jk}(M_{jk})\rho_{jk}(M_{jk})u_{jk}(M_{jk})+a_{jk}^{\rm out}h_{j}(M_{jk})\rho_{j}(M_{jk})u_{j}(M_{jk})\Big{]}
Δt|Tj|k=13jksin(ρjk)ajkin+ajkout[ajkinhjk(Mjk)ρjk(Mjk)vjk(Mjk)+ajkouthj(Mjk)ρj(Mjk)vj(Mjk)]\displaystyle-\dfrac{\Delta t}{|T_{j}|}\sum_{k=1}^{3}\frac{\ell_{jk}\sin(\rho_{jk})}{a_{jk}^{\rm in}+a_{jk}^{\rm out}}\Big{[}a_{jk}^{\rm in}h_{jk}(M_{jk})\rho_{jk}(M_{jk})v_{jk}(M_{jk})+a_{jk}^{\rm out}h_{j}(M_{jk})\rho_{j}(M_{jk})v_{j}(M_{jk})\Big{]}
+Δt|Tj|k=13jkajkinajkoutajkin+ajkout[hjk(Mjk)ρjk(Mjk)hj(Mjk)ρj(Mjk)]\displaystyle+\dfrac{\Delta t}{|T_{j}|}\sum_{k=1}^{3}\ell_{jk}\frac{a_{jk}^{\rm in}a_{jk}^{\rm out}}{a_{jk}^{\rm in}+a_{jk}^{\rm out}}\big{[}h_{jk}(M_{jk})\rho_{jk}(M_{jk})-h_{j}(M_{jk})\rho_{j}(M_{jk})\big{]}
=\displaystyle= 19mshj(Mjm)ρj(Mjs)\displaystyle\dfrac{1}{9}\sum_{m\neq s}h_{j}(M_{jm})\rho_{j}(M_{js})
+k=13hj(Mjk)ρj(Mjk)[19Δt|Tj|jkajkoutajkin+ajkout(ajkin+uj(Mjk))]\displaystyle+\sum_{k=1}^{3}h_{j}(M_{jk})\rho_{j}(M_{jk})\Big{[}\dfrac{1}{9}-\dfrac{\Delta t}{|T_{j}|}\frac{\ell_{jk}a_{jk}^{\rm out}}{a_{jk}^{\rm in}+a_{jk}^{\rm out}}\left(a_{jk}^{\rm in}+u^{\perp}_{j}(M_{jk})\right)\Big{]}
+k=13hjk(Mjk)ρjk(Mjk)Δt|Tj|jkajkinajkin+ajkout(ajkoutujk(Mjk)).\displaystyle+\sum_{k=1}^{3}h_{jk}(M_{jk})\rho_{jk}(M_{jk})\dfrac{\Delta t}{|T_{j}|}\frac{\ell_{jk}a_{jk}^{\rm in}}{a_{jk}^{\rm in}+a_{jk}^{\rm out}}\left(a_{jk}^{\rm out}-u^{\perp}_{jk}(M_{jk})\right).

From the definitions of the local speeds (2.8) we obtain that uj(Mjk)=cos(θjk)uj(Mjk)+sin(θjk)vj(Mjk)ajkoutu^{\perp}_{j}(M_{jk})=\cos(\theta_{jk})u_{j}(M_{jk})+\sin(\theta_{jk})v_{j}(M_{jk})\leq a_{jk}^{\rm out}, 0ajkin0\leq a_{jk}^{\rm in}, and 0ajkout0\leq a_{jk}^{\rm out}. Besides, the corrected reconstruction in Section 2.1 guarantees that hjk(Mjk)0h_{jk}(M_{jk})\geq 0 and ρjk(Mjk)0\rho_{jk}(M_{jk})\geq 0 for all jj and k=1,2,3k=1,2,3. Therefore, all terms in the first and third sum on the RHS of (2.3) are nonnegative. To enforce the second sum on the RHS of (2.3) to be nonegative, we then need:

Δt|Tj|jkajkoutajkin+ajkout(ajkin+uj(Mjk))Δt|Tj|jkajkoutajkin+ajkout(ajkin+ajkout)=Δt|Tj|ljkajkout<19,j and k=1,2,3.\dfrac{\Delta t}{|T_{j}|}\frac{\ell_{jk}a_{jk}^{\rm out}}{a_{jk}^{\rm in}+a_{jk}^{\rm out}}\left(a_{jk}^{\rm in}+u^{\perp}_{j}(M_{jk})\right)\leq\dfrac{\Delta t}{|T_{j}|}\frac{\ell_{jk}a_{jk}^{\rm out}}{a_{jk}^{\rm in}+a_{jk}^{\rm out}}\left(a_{jk}^{\rm in}+a_{jk}^{\rm out}\right)=\dfrac{\Delta t}{|T_{j}|}l_{jk}a_{jk}^{\rm out}<\dfrac{1}{9},\quad\forall j\mbox{ and }k=1,2,3.

Hence we conclude that all terms in the second sum on the RHS of (2.3) are also nonnegative under the following CFL-type condition.

Δt<118aminjk(rjk)=minjk(2|Tj|ljk)18maxjk(ajkin,ajkout)<19minjk(|Tj|ljkajkout),\Delta t<\dfrac{1}{18a}\min_{jk}(r_{jk})=\dfrac{\min_{jk}\left(\dfrac{2|T_{j}|}{l_{jk}}\right)}{18\max_{jk}(a_{jk}^{\rm in},a_{jk}^{\rm out})}<\dfrac{1}{9}\min_{jk}\left(\dfrac{|T_{j}|}{l_{jk}a^{\rm out}_{jk}}\right), (2.20)

where a=maxjk(ajkin,ajkout)a=\max_{jk}(a_{jk}^{\rm in},a_{jk}^{\rm out}) and rjk=2|Tj|ljkr_{jk}=\dfrac{2|T_{j}|}{l_{jk}} is the kk-th altitude of triangle TjT_{j}. This completes the proof. This proof is still valid if one uses a higher-order SSP ODE solver (either the Runge-Kutta or the multistep one), because such solvers can be written as a convex combination of several forward Euler steps.

2.4 Well-balanced discretization of source term.

In this section, we first develop a well-balanced discretization of the source terms, which guarantees the first type of “lake at rest” steady-state solutions,

w=max{C,B(x,y)},C=Const,ρ=PConst,uv0,w=\max\big{\{}C,B(x,y)\big{\}},\quad C=\rm{Const},\quad\rho=P\equiv Const,\quad u\equiv v\equiv 0, (2.21)

are exactly preserved by the resulting central-upwind scheme. This means that the source discretization  𝐒j\hbox{\vbox{\hrule height=0.5pt\kern 1.72218pt\hbox{\kern-0.50003pt$\mathbf{S}$\kern-0.50003pt}}}_{j} should exactly balance the numerical fluxes so that the right-hand side (RHS) of (1.1a)-(1.1d) vanishes at “lake at rest” steady states.

To this end, we substitute the “lake at rest” state (2.21) into FE scheme of the system (it is still correct with the adaptive Runge-Kutta scheme) and conclude that a well-balanced quadrature for  𝐒j\hbox{\vbox{\hrule height=0.5pt\kern 1.72218pt\hbox{\kern-0.50003pt$\mathbf{S}$\kern-0.50003pt}}}_{j} should satisfy the following two conditions:

g2|Tj|k=13jkcos(θjk)Δtjk(ρ)ΔtPρ0[CB(Mjk)]2+S¯j(2)=0,-\frac{g}{2|T_{j}|}\sum_{k=1}^{3}\ell_{jk}\cos(\theta_{jk})\cdot\frac{\Delta t^{(\rho)}_{jk}}{\Delta t}\cdot\dfrac{P}{\rho_{0}}\big{[}C-B(M_{jk})\big{]}^{2}+\bar{S}_{j}^{\,(2)}=0, (2.22)
g2|Tj|k=13jksin(θjk)Δtjk(ρ)ΔtPρ0[CB(Mjk)]2+S¯j(3)=0,-\frac{g}{2|T_{j}|}\sum_{k=1}^{3}\ell_{jk}\sin(\theta_{jk})\cdot\frac{\Delta t^{(\rho)}_{jk}}{\Delta t}\cdot\dfrac{P}{\rho_{0}}\big{[}C-B(M_{jk})\big{]}^{2}+\bar{S}_{j}^{\,(3)}=0, (2.23)

where

S¯j(2)g|Tj|ρ0TjP(CB(x,y))Bx(x,y)𝑑x𝑑y,S¯j(3)g|Tj|ρ0TjP(CB(x,y))By(x,y)𝑑x𝑑y.\bar{S}_{j}^{\,(2)}\approx-\frac{g}{|T_{j}|\rho_{0}}\iint\limits_{T_{j}}P(C-B(x,y))B_{x}(x,y)\,dxdy,\quad\bar{S}_{j}^{\,(3)}\approx-\frac{g}{|T_{j}|\rho_{0}}\iint\limits_{T_{j}}P(C-B(x,y))B_{y}(x,y)\,dxdy.

In order to derive a well-balanced quadrature, similar to [3, 29], we first apply Green’s formula, Tjdiv𝒢𝑑x𝑑y=Tj𝒢𝐧𝑑s\iint_{T_{j}}{\rm div}\,\mathbf{{\cal G}}\,dxdy=\int_{\partial T_{j}}\mathbf{{\cal G}}\cdot\mathbf{n}\,ds, to the vector field 𝒢=(12ρ(x,y)(w(x,y)B(x,y))2,0)\mathbf{{\cal G}}=(\dfrac{1}{2}\rho(x,y)(w(x,y)-B(x,y))^{2},0) and obtain

Tjρ(x,y)(w(x,y)B(x,y))Bx(x,y)𝑑x𝑑y=\displaystyle-\iint\limits_{T_{j}}\rho(x,y)(w(x,y)-B(x,y))B_{x}(x,y)\,dxdy= k=13(Tj)kρ(x,y)(w(x,y)B(x,y))22cos(θjk)𝑑s\displaystyle\sum_{k=1}^{3}\int\limits_{(\partial{T_{j}})_{k}}\rho(x,y)\frac{(w(x,y)-B(x,y))^{2}}{2}\cos(\theta_{jk})\,ds (2.24)
Tjρ(x,y)(w(x,y)B(x,y))wx(x,y)𝑑x𝑑y\displaystyle-\iint\limits_{T_{j}}\rho(x,y)(w(x,y)-B(x,y))w_{x}(x,y)\,dxdy
Tjρx(x,y)(w(x,y)B(x,y))22𝑑x𝑑y,\displaystyle-\iint\limits_{T_{j}}\rho_{x}(x,y)\frac{(w(x,y)-B(x,y))^{2}}{2}\,dxdy,

where (Tj)k(\partial{T_{j}})_{k} is the kk-th side of the triangle TjT_{j}, k=1,2,3k=1,2,3. The double integrals are approximated using the trapezoidal rule. This results in the following quadrature for S¯j(2)\bar{S}^{\,(2)}_{j}:

S¯j(2)\displaystyle\bar{S}^{\,(2)}_{j} =g2|Tj|k=13jkcos(θjk)Δtjk(ρ)Δtρ(Mjk)ρ0[w(Mjk)B(Mjk)]2\displaystyle=\frac{g}{2|T_{j}|}\sum_{k=1}^{3}\ell_{jk}\cos(\theta_{jk})\cdot\frac{\Delta t^{(\rho)}_{jk}}{\Delta t}\cdot\dfrac{\rho(M_{jk})}{\rho_{0}}\big{[}w(M_{jk})-B(M_{jk})\big{]}^{2} (2.25)
g3ρ0[ρj12(wj12B^j12)wx(Vj12)+ρj23(wj23B^j23)wx(Vj23)+ρj13(wj13B^j13)wx(Vj13)].\displaystyle-\frac{g}{3\rho_{0}}\Big{[}\rho_{j12}(w_{j12}-\widehat{B}_{j12})\,w_{x}(V_{j12})+\rho_{j23}(w_{j23}-\widehat{B}_{j23})\,w_{x}(V_{j23})+\rho_{j13}(w_{j13}-\widehat{B}_{j13})\,w_{x}(V_{j13})\Big{]}.
g6ρ0[ρx(Vj12)(wj12B^j12)2+ρx(Vj23)(wj23B^j23)2+ρx(Vj13)(wj13B^j13)2].\displaystyle-\frac{g}{6\rho_{0}}\Big{[}\rho_{x}(V_{j12})(w_{j12}-\widehat{B}_{j12})^{2}\,+\rho_{x}(V_{j23})(w_{j23}-\widehat{B}_{j23})^{2}\,+\rho_{x}(V_{j13})(w_{j13}-\widehat{B}_{j13})^{2}\,\Big{]}.

A similar quadrature for S¯j(3)\bar{S}^{\,(3)}_{j} is

S¯j(3)\displaystyle\bar{S}^{\,(3)}_{j} =g2|Tj|k=13jksin(θjk)Δtjk(ρ)Δtρ(Mjk)ρ0[w(Mjk)B(Mjk)]2\displaystyle=\frac{g}{2|T_{j}|}\sum_{k=1}^{3}\ell_{jk}\sin(\theta_{jk})\cdot\frac{\Delta t^{(\rho)}_{jk}}{\Delta t}\cdot\dfrac{\rho(M_{jk})}{\rho_{0}}\big{[}w(M_{jk})-B(M_{jk})\big{]}^{2} (2.26)
g3ρ0[ρj12(wj12B^j12)wy(Vj12)+ρj23(wj23B^j23)wy(Vj23)+ρj13(wj13B^j13)wy(Vj13)].\displaystyle-\frac{g}{3\rho_{0}}\Big{[}\rho_{j12}(w_{j12}-\widehat{B}_{j12})\,w_{y}(V_{j12})+\rho_{j23}(w_{j23}-\widehat{B}_{j23})\,w_{y}(V_{j23})+\rho_{j13}(w_{j13}-\widehat{B}_{j13})\,w_{y}(V_{j13})\Big{]}.
g6ρ0[ρy(Vj12)(wj12B^j12)2+ρy(Vj23)(wj23B^j23)2+ρy(Vj13)(wj13B^j13)2].\displaystyle-\frac{g}{6\rho_{0}}\Big{[}\rho_{y}(V_{j12})(w_{j12}-\widehat{B}_{j12})^{2}\,+\rho_{y}(V_{j23})(w_{j23}-\widehat{B}_{j23})^{2}\,+\rho_{y}(V_{j13})(w_{j13}-\widehat{B}_{j13})^{2}\,\Big{]}.

Notice that the piecewise linear reconstruction procedure ensures that at the steady state (2.21), ρ(Vjκ)=0,ux=vy=0\nabla\rho(V_{j\kappa})=0,u_{x}=v_{y}=0 and w(Vjκ)=0\nabla w(V_{j\kappa})=0 throughout the entire computational domain. This implies that (wjκB^jκ)wx(Vjκ)(wjκB^jκ)wy(Vjκ)0(w_{j\kappa}-\widehat{B}_{j\kappa})\,w_{x}(V_{j\kappa})\equiv(w_{j\kappa}-\widehat{B}_{j\kappa})\,w_{y}(V_{j\kappa})\equiv 0 and ρx(Vjκ)(wjκB^jκ)2ρy(Vjκ)(wjκB^jκ)20\rho_{x}(V_{j\kappa})(w_{j\kappa}-\widehat{B}_{j\kappa})^{2}\equiv\rho_{y}(V_{j\kappa})(w_{j\kappa}-\widehat{B}_{j\kappa})^{2}\equiv 0. Therefore, the quadratures (2.25) and (2.26) satisfy the desired well-balanced requirements (2.22) and (2.23).

Next, we consider the “lake at rest” situation

BConst,h2ρ=QConst,uv0.B\equiv\rm{Const},\quad h^{2}\rho=Q\equiv Const,\quad u\equiv v\equiv 0. (2.27)

Note that in the region occupied by only one fluid, the density ρ\rho is a constant and water surface ww is then also a constant based on (2.27). Hence, in single-fluid cells, the steady state (2.27) is equivalent to the solution (2.21) which is maintained by the discretization of source term (2.25)-(2.26). In addition, in mixed cells, the point values are obtained by the data from nearby single-fluid cells thanks to the Riemann Solver approximation presented in Section 2.2, see also [9]. Therefore, the discretization of source term (2.25)-(2.26), is also capable of preserving the steady state solution (2.27).

3 Interface Tracking

To achieve an efficient adaptive scheme for multifluid flows, it is essential to accurately capture the curve where two types of fluid join simultaneously with the flow field evolution. The interface tracking is important in preventing excessive numerical diffusion of variable density, see Section 3.3. We also need the location of density jumps to exactly update the cell averages in the adaptive mesh reconstruction, Section 4. Therefore, we desire a simple and effective interface reconstruction for the system (1.1a)-(1.1d). Over the last two decades, many methods have been proposed for this purpose such as the level set method [31, 38], the volume of fluid method [17, 34], and the front tracking method [42, 41]. Among various versions of interface tracking, we have considered the approach described in [45, 44] for our work due to its simplicity, robustness, and high efficiency. In particular, the interface is obtained by using both the level set and the volume fraction functions. The details of the interface reconstruction is described as follows.

3.1 Mixed Cell Detecting by Level Set Function

In the first part of this section, we will discuss the method of detecting the mixed cells in the triangular grids. For this end, we consider the level set function ϕ\phi which is defined such that it is positive in one fluid, is negative in the other fluid, and has zero value at the interface. Very often, the level set value of each grid point is initialized by the signed distance from that point to the curve of density discontinuities, see [29, 31, 38, 45]. As discussed in [29, 31, 38, 45], level set function is evolved by the velocity (u,v)(u,v) of the flow field as

ϕt+uϕx+vϕy=0.\phi_{t}+u\phi_{x}+v\phi_{y}=0. (3.1)

The equation (3.1) can be rewritten in conservation form as follows.

ϕt+(uϕ)x+(vϕ)y=(ux+vy)ϕ.\phi_{t}+(u\phi)_{x}+(v\phi)_{y}=(u_{x}+v_{y})\phi. (3.2)

We have used the central-upwind scheme presented in Section 2 to solve for ϕ\phi, where the point values ϕ(Mjk),k=1,2,3\phi(M_{jk}),k=1,2,3 in triangle TjT_{j} are approximated by the piecewise linear reconstruction (2.7). The integral of the source term in (3.2) can be approximated by midpoint rule. Note that using the central-upwind scheme to solve (3.1) only give us the cell averages of ϕ\phi in each cell and does not point out which cells contain the interface ϕ=0\phi=0. We have to provide a numerical method for detecting mixed cells. However, a triangle is a single-fluid cell, also called as “reliable” cell, if the level set values at its vertices are either all positive or all negative. Hence, we will locate each node in the grid based on its point value of level set as presented below.

Without the loss of generality, we assume that ϕ(x,y)\phi(x,y) is positive in fluid 1 and ϕ(x,y)\phi(x,y) is negative in fluid 2. The point value of level set function ϕjκ\phi^{*}_{j\kappa} at each vertex VjκV_{j\kappa} of cell TjT_{j} is approximated by extrapolation [9]

ϕjκ=i=0mκciϕjκii=0mκci,\phi^{*}_{j\kappa}=\dfrac{\displaystyle\sum_{i=0}^{m^{*}_{\kappa}}c_{i}\phi^{i}_{j\kappa}}{\displaystyle\sum_{i=0}^{m^{*}_{\kappa}}c_{i}}, (3.3)

where ϕjκi,\phi^{i}_{j\kappa}, is the cell averages of level set function in cells TjκiT^{i}_{j\kappa} which have common vertex at VjκV_{j\kappa}, and the weight cic_{i} is inversely proportional to the distance between the center of cells Tjκi,i=0,1,,mκT^{i}_{j\kappa},i=0,1,...,m^{*}_{\kappa} and vertex VjκV_{j\kappa}. If ϕjκ>0\phi^{*}_{j\kappa}>0, we have the vertex VjκV_{j\kappa} staying in fluid 1. Otherwise, if ϕjκ<0\phi^{*}_{j\kappa}<0, the vertex VjκV_{j\kappa} is in fluid 2. Finally, based on the physical meaning of the level set function, a triangle TjT_{j} is naturally marked as a mixed cell if it has two vertices staying in different fluids.

3.2 Interface Reconstruction

In most works of interface tracking, see [31, 38, 17, 34, 42, 41], the curve of density discontinuity in a mixed cell is approximated as a linear line segment of the form 𝐧x=α\mathbf{n}\cdot x=\alpha, where 𝐧\mathbf{n} is the normal vector of the interface, xx is the location of a point, and α\alpha is the line constant. A variety of methods for computing normal vector 𝐧\mathbf{n} and parameter α\alpha have been briefly introduced and compared in [45, 33]. Based on the advantages and disadvantages of conventional interface tracking methods, an innovative approach has been proposed in [45]. The approach employs both the level set and volume of fluid methods to denote the density segment in each flagged cell by its two endpoints. Namely, the interface normal vector is calculated from the level set function while the exact location of two endpoints of the segment is determined by enforcing mass conservation based on the volume fraction. In our work, we will apply this interface tracking method in the adaptive triangular mesh due to its simplicity, accuracy, and versatility. The details of this method can be seen in [45]. In the following, we will briefly present the main steps of the interface reconstruction.

Once the mixed cells are detected, we will first compute the interface normal vector in each flagged cell based on the level set function and a least square problem. Namely, for each mixed cell TjT_{j} with center at (xj,yj)(x_{j},y_{j}), we consider a stencil that consists of all centers (xi,yi),i=1,2,,N(x_{i},y_{i}),i=1,2,...,N of NN cells that share at least a vertex with TjT_{j} (to simplify the computation, we do not place the vertices of cell TjT_{j} in the stencil as in [45]). A quadratic function for function ϕ\phi of a point (x,y)(x,y) is then given in the generic form

ϕ=ax2+bxy+cy2+dx+ey+g,\phi=ax^{\prime 2}+bx^{\prime}y^{\prime}+cy^{\prime 2}+dx^{\prime}+ey^{\prime}+g,

where (x:=xxj,y:=xxj)(x^{\prime}:=x-x_{j},y^{\prime}:=x-x_{j}) is the location of point (x,y)(x,y) in the local coordinate frame xx^{\prime} and yy^{\prime} obtained by shifting the original coordinate such that the new origin is at the center of TjT_{j}. The coefficients a,b,c,d,e,a,b,c,d,e, and gg are determined by using the least squares method with the linear system

Qs=r,Qs=r,

where

Q=[x12x1y1y12x1y11x22x2y2y22x2y21xN2xNyNyN2xNyN1],s=[abcdeg],ϕ=[ϕ1ϕ2ϕn],Q=\begin{bmatrix}x^{\prime 2}_{1}&x^{\prime}_{1}y^{\prime}_{1}&y^{\prime 2}_{1}&x^{\prime}_{1}&y^{\prime}_{1}&1\\ x^{\prime 2}_{2}&x^{\prime}_{2}y^{\prime}_{2}&y^{\prime 2}_{2}&x^{\prime}_{2}&y^{\prime}_{2}&1\\ \vdots&\vdots&\vdots&\vdots&\vdots&\vdots\\ x^{\prime 2}_{N}&x^{\prime}_{N}y^{\prime}_{N}&y^{\prime 2}_{N}&x^{\prime}_{N}&y^{\prime}_{N}&1\\ \end{bmatrix},\quad s=\begin{bmatrix}a\\ b\\ c\\ d\\ e\\ g\end{bmatrix},\quad\phi=\begin{bmatrix}\phi_{1}\\ \phi_{2}\\ \vdots\\ \phi_{n}\end{bmatrix}, (3.4)

(xi=xixj,yi=yiyj),i=1,,N,(x^{\prime}_{i}=x_{i}-x_{j},y^{\prime}_{i}=y_{i}-y_{j}),i=1,...,N, are the local coordinates of the ii-th node in the stencil and ϕi,i=1,,N,\phi_{i},i=1,...,N, is the cell average of level set function in cell TiT_{i} corresponding to node ii-th. Once the coefficients are known, we compute the unit normal vector by 𝐧=(dd2+e2,ed2+e2).\mathbf{n}=\left(\dfrac{d}{\sqrt{d^{2}+e^{2}}},\dfrac{e}{\sqrt{d^{2}+e^{2}}}\right). The system (3.4) is solvable as explained in [45]. In addition, since the level set function is continuous, the normal calculation is second-order accurate.

Next, we continue to determine the exact coordinates of two endpoints of the interface by using the volume of fluid approach (VOF). The VOF method has been widely used and developed for interface tracking in [17, 34, 44, 45]. In the VOF method, the volume fraction function, denoted by ff, is defined as the ratio of the volume of one fluid, called fluid 1, in each cell to the total volume of the cell. Hence, ff is unity if the cell is a single-fluid cell in fluid 1, and is zero if the cell only contains fluid 2. For mixed cells, we have 0<f<10<f<1. The function ff is advected by

ft+ufx+vfy=0.f_{t}+uf_{x}+vf_{y}=0. (3.5)

The main idea of the VOF method proposed in [44, 45] is to reconstruct the interface segment by determining the coordinates of its endpoints. In particular, the two endpoints must form a segment which has the normal vector 𝐧\mathbf{n} as computed above and the interface truncates the cell with the given volume fraction. Fig. 3.1 is an illustration for two cases of a mixed cell TjT_{j} where the interface I1I2I_{1}I_{2} splits TjT_{j} into two parts, Tj(1)T^{(1)}_{j} and Tj(2)T^{(2)}_{j}, respectively occupied by fluid 1 and fluid 2.

Refer to caption
Refer to caption
Figure 3.1: An example of mixed cell Tj=Vj12Vj23Vj13T_{j}=V_{j12}V_{j23}V_{j13} with the interface segment I1I2I_{1}I_{2} and the normal vector 𝐧\vec{\mathbf{n}}.

We then have

I1I2𝐧=0,Tj(1)Tj= fj,I_{1}I_{2}\cdot\mathbf{n}=0,\quad\dfrac{T^{(1)}_{j}}{T_{j}}=\hbox{\vbox{\hrule height=0.5pt\kern 1.72218pt\hbox{\kern-0.50003pt$f$\kern-0.50003pt}}}_{j},

where 𝐧\mathbf{n} is the normal vector of the interface computed by (3.4) and  fj\hbox{\vbox{\hrule height=0.5pt\kern 1.72218pt\hbox{\kern-0.50003pt$f$\kern-0.50003pt}}}_{j} is the cell average of volume fraction in mixed cell TjT_{j} obtained by using the central-upwind method, see Section 2, to solve (3.5). This interface reconstruction is explicit, accurate, and capable of conserving the volume of the fluid. The details of endpoint calculation can be seen in [45]. Finally, the reconstructed interface will be used in the adaptive mesh reconstruction as discussed in the following sections.

3.3 The Cell Averages Correction

The idea of correcting the solution in the neighborhood of the interface has been used in numerical methods for multifluid flows [9, 45] to improve the computed solution. This technique prevents the diffusion of density emerging when we use the central-upwind method to solve compressible systems. In our work, we will also perform the correction procedure such that the local conservation is ensured based on the location of density jumps. Namely, suppose we have two types of fluid, fluid 1 and fluid 2, in the flow. After determining the single-fluid cells and mixed cells by using the point values of the level set function, see Section 3.1, the cell average correction will proceed as follows.

  • If a cell TjT_{j} is a single fluid cell in fluid i=1,2i=1,2, we correct the cell averages of hρh\rho by  hρjnew=hjρj(i)\hbox{\vbox{\hrule height=0.5pt\kern 1.72218pt\hbox{\kern-0.50003pt$h\rho$\kern-0.50003pt}}}^{new}_{j}=h_{j}\rho^{(i)}_{j}, where ρj(i)\rho^{(i)}_{j} is the value of density in fluid i=1,2i=1,2. hj= wjBjh_{j}=\hbox{\vbox{\hrule height=0.5pt\kern 1.72218pt\hbox{\kern-0.50003pt$w$\kern-0.50003pt}}}_{j}-B_{j} is the cell average of water depth in TjT_{j}. To preserve the mass of hρh\rho in the domain, we equally split the change of  hρh\rho in TjT_{j} into the nearby mixed cells. Namely, if the neighboring cell Tjk,k=1,2,3T_{jk},k=1,2,3 of TjT_{j} is a mixed cell, we obtain the new cell average of hρh\rho in TjkT_{jk} by

     hρjknew= hρjk+ hρj hρjnewnmix,\hbox{\vbox{\hrule height=0.5pt\kern 1.72218pt\hbox{\kern-0.50003pt$h\rho$\kern-0.50003pt}}}^{new}_{jk}=\hbox{\vbox{\hrule height=0.5pt\kern 1.72218pt\hbox{\kern-0.50003pt$h\rho$\kern-0.50003pt}}}_{jk}+\dfrac{\hbox{\vbox{\hrule height=0.5pt\kern 1.72218pt\hbox{\kern-0.50003pt$h\rho$\kern-0.50003pt}}}_{j}-\hbox{\vbox{\hrule height=0.5pt\kern 1.72218pt\hbox{\kern-0.50003pt$h\rho$\kern-0.50003pt}}}^{new}_{j}}{n_{mix}}, (3.6)

    where  hρj\hbox{\vbox{\hrule height=0.5pt\kern 1.72218pt\hbox{\kern-0.50003pt$h\rho$\kern-0.50003pt}}}_{j} and  hρjk\hbox{\vbox{\hrule height=0.5pt\kern 1.72218pt\hbox{\kern-0.50003pt$h\rho$\kern-0.50003pt}}}_{jk} are the old cell averages computed by using the central-upwind scheme in triangles TjT_{j} and TjkT_{jk}, and nmixn_{mix} is the number of mixed cells surrounding the cell TjT_{j}.

  • If TjT_{j} is a mixed cell, except the update (3.6) from its nearby single-fluid cells, no further correction is needed.

Due to the fact that the interface normally moves from one cell to its adjacent cells, only cells surrounding the interface are updated and the loss of mass from this correction is negligible. In addition, for cells in the “lake at rest” area, this correction will not change the existing solution therefore maintaining the well-balanced properties.

4 Adaptive Central-Upwind Scheme

The traditional numerical methods for system (1.1a)–(1.1d) consider very fine fixed meshes to reconstruct delicate features of the solution. However, this can lead to high computational cost, as well as to a poor accuracy of small scale characteristics of the problem. Therefore, we will use adaptive meshes to improve the accuracy of the approximation at a much lower cost. In this section, we will review an efficient and accurate adaptive central-upwind algorithm from [13] which we adapt to the system (1.1a)-(1.1d).

4.1 Adaptive Central-Upwind Algorithm

From [13], the adaptive central-upwind algorithm for the system (1.1a)- (1.1d) is described briefly by the following steps.

Step 0. At time t=t0t=t^{0}, generate the initial uniform grid 𝒯0,0\mathcal{T}^{0,0}.

Step 1. On mesh 𝒯n,n\mathcal{T}^{n,\mathcal{M}_{n}}, evolve the cell averages  𝑼n\hbox{\vbox{\hrule height=0.5pt\kern 1.72218pt\hbox{\kern-0.50003pt$\bm{U}$\kern-0.50003pt}}}^{n} of the solution from time tnt^{n} to  𝑼n+1\hbox{\vbox{\hrule height=0.5pt\kern 1.72218pt\hbox{\kern-0.50003pt$\bm{U}$\kern-0.50003pt}}}^{n+1} at the next time level tn+1t^{n+1} using adaptive central-upwind scheme (4.5a)-(4.5b), see Section 4:

  • At time tnt^{n}, determine the level l=0,1,,Ll=0,1,...,L of each triangle Tjn,n𝒯n,nT^{n,\mathcal{M}_{n}}_{j}\in\mathcal{T}^{n,\mathcal{M}_{n}}, (4.1), Section 4.3.

  • At each time level tln,p,p=0,1,,𝒫l1t^{n,p}_{l},p=0,1,...,\mathcal{P}_{l}-1, perform the piecewise polynomial reconstruction (2.7) for single-fluid cells and apply the Riemann Solver (2.14) on the mixed cells to calculate the point values, Section 2, Section 3.3.

  • At each time level tln,p,p=0,1,,𝒫l1t^{n,p}_{l},p=0,1,...,\mathcal{P}_{l}-1, compute the one-sided local speeds of propagation using (2.8), Section 2.

  • At time tnt^{n}, calculate the reference time step Δt\Delta t using (4.2), Section 4.3.

  • At each time level tln,p,p=0,1,,𝒫l1t^{n,p}_{l},p=0,1,...,\mathcal{P}_{l}-1, compute the local time step for each cell level, (4.4), Section 4.3.

  • At each time level tln,p,p=0,1,,𝒫l1t^{n,p}_{l},p=0,1,...,\mathcal{P}_{l}-1, compute numerical fluxes and source term in the adaptive central-upwind scheme (4.5a)-(4.5b), (2.6), (2.25)-(2.26), Section 2, Section 4.3.

Step 2. On mesh 𝒯n,n\mathcal{T}^{n,\mathcal{M}_{n}}, compute WLR error using (4.9) in Section 4.4 and determine the refinement/de-refinement status for each cell, Section 4.4.

Step 3. Generate the new adaptive mesh 𝒯n+1,n+1\mathcal{T}^{n+1,\mathcal{M}_{n+1}} at tn+1t^{n+1}, Section 4.2. This step includes coarsening of some cells, refinement of some cells, and the appropriate projection of the cell averages from the mesh 𝒯n,n\mathcal{T}^{n,\mathcal{M}_{n}} at tnt^{n} onto a new adaptive mesh 𝒯n+1,n+1\mathcal{T}^{n+1,\mathcal{M}_{n+1}} at time tn+1t^{n+1}, Section 4.2.

Step 4. Repeat Step 1 - Step 3 until final time.

4.2 Adaptive Mesh Refinement/Coarsening

The purpose of mesh reconstruction is to obtain adaptive grids which delivers higher accuracy with a lower computational cost. An efficient adaptive mesh should have small cells in the regions with large errors and large cells in the other regions. In particular, at time tnt^{n}, we start with the given mesh, denoted as 𝒯n,m={Tjn,m}\mathcal{T}^{n,m}=\{T^{n,m}_{j}\}, where Tjn,mT^{n,m}_{j} is a triangular cell with the barycenter (xjn,m,yjn,m)(x^{n,m}_{j},y^{n,m}_{j}), and index m=0,1,2m=0,1,2... is the level of refinement (𝒯n,0𝒯0,0\mathcal{T}^{n,0}\equiv\mathcal{T}^{0,0} for all nn and 𝒯0,0\mathcal{T}^{0,0} represents the initial mesh with no refinement). The triangular cells in the mesh 𝒯n,m\mathcal{T}^{n,m} are flagged for refinement/de-refinement based on the weak local residual (WLR) error estimator, see Section 4.4. On grid 𝒯n,m\mathcal{T}^{n,m}, we apply “regular refinement” described in [13] on the triangles flagged for refinement to obtain a new mesh 𝒯n,m+1\mathcal{T}^{n,m+1} with the refinement level m+1m+1. Namely, each flagged triangle (“parent” triangle) is split into four smaller triangles (“children” triangles) by inserting a new node at the mid-point of each edge of the “parent” triangle. Fig. 4.1 (a) is an illustration of the “regular refinement”, where a flagged cell Tjn,mT^{n,m}_{j} is refined to obtain the “children” cells Tjsn,m+1,s=1,2,3,4T^{n,m+1}_{j_{s}},s=1,2,3,4 by using the mid-points of the sides. In addition, due to the insertion of new nodes on the edges of the non-flagged triangles adjacent to refined triangles, we must also refine these neighboring cells by creating a new edge between the hanging node and the opposite corner as illustrated in Fig. 4.1 (b).

Refer to caption
(a) Triangle Tjn,mT^{n,m}_{j} (left) is split into four “children” cells Tjsn,m+1,s=1,2,3,4T^{n,m+1}_{js},s=1,2,3,4 (right).
Refer to caption
(b) Refinement in the neighboring cells of Tjn,mT^{n,m}_{j}.
Figure 4.1: An outline of the “regular refinement”.

In practice, there may be some cells having very large WLR error (4.9), and we need to reach a higher level of refinement for those cells to improve the accuracy. This can be done by repeating the refinement for the flagged triangles in the refined mesh 𝒯n,m+1\mathcal{T}^{n,m+1} to get the mesh with higher level 𝒯n,m+2,m=0,1,2,.\mathcal{T}^{n,m+2},m=0,1,2,..... Fig. 4.2 is the illustration of the “regular refinement” procedure with two levels of refinement.

Refer to caption
Refer to caption
Refer to caption
Figure 4.2: An example of the “regular refinement” procedure with two levels of refinement. The left figure is the initial coarse mesh 𝒯n,0\mathcal{T}^{n,0} with the region flagged for the refinement (gray). The middle figure is the “first” level mesh 𝒯n,1\mathcal{T}^{n,1} with the region flagged for higher level of the refinement (gray). The right figure is the “second” level mesh 𝒯n,2\mathcal{T}^{n,2}.

Note that in the numerical simulations of the wave phenomena, the regions of the domain flagged for refinement changes over time evolution and the refinement in some cells may become no longer needed. Hence, in [13], the de-refinement/coarsening procedure is performed to deactivate unnecessarily fine cells in the grid. Namely, at time tnt^{n}, we deactivate “children” cells in the mesh 𝒯n,m+1,m=0,1,,Mn1\mathcal{T}^{n,m+1},m=0,1,...,M_{n}-1 based on the WLR and activate the corresponding “parent” cell from the mesh 𝒯n,m\mathcal{T}^{n,m} back. More details of refinement/de-refinement process can be seen in [13].

Finally, at time tnt^{n}, a hierarchical system of grids 𝒮n={𝒯n,0,𝒯n,1,𝒯n,2,,𝒯n,n}\mathcal{S}^{n}=\{\mathcal{T}^{n,0},\mathcal{T}^{n,1},\mathcal{T}^{n,2},...,\mathcal{T}^{n,\mathcal{M}_{n}}\} is obtained, where 𝒯n,m\mathcal{T}^{n,m}, m=1,2,,nm=1,2,...,\mathcal{M}_{n} is the grid with the level of refinement mm reconstructed from the grid 𝒯n,m1\mathcal{T}^{n,m-1}. We will use the final mesh 𝒯n,n𝒮n\mathcal{T}^{n,\mathcal{M}_{n}}\in\mathcal{S}^{n} for adaptive central-upwind scheme (4.5a)-(4.5b) to evolve the numerical solution from time tnt^{n} to time tn+1t^{n+1}. Next, at tn+1t^{n+1}, we generate a new adaptive grid 𝒯n+1,n+1𝒮n+1\mathcal{T}^{n+1,\mathcal{M}_{n+1}}\in\mathcal{S}^{n+1} from the mesh 𝒯n,n\mathcal{T}^{n,\mathcal{M}_{n}}. After the mesh reconstruction at time tn+1t^{n+1}, the obtained cell averages  𝑼n+1\hbox{\vbox{\hrule height=0.5pt\kern 1.72218pt\hbox{\kern-0.50003pt$\bm{U}$\kern-0.50003pt}}}^{n+1} on the mesh 𝒯n,n\mathcal{T}^{n,\mathcal{M}_{n}} need to be accurately projected on the new mesh 𝒯n+1,n+1\mathcal{T}^{n+1,\mathcal{M}_{n+1}}, using the ideas as summarized briefly below.

Case 1. At tn+1t^{n+1}, a triangle Tjn+1,n+1𝒯n+1,n+1T^{n+1,\mathcal{M}_{n+1}}_{j}\in\mathcal{T}^{n+1,\mathcal{M}_{n+1}} is the same cell as in the grid 𝒯n,n\mathcal{T}^{n,\mathcal{M}_{n}}, we will maintain the cell averages for that triangle at tn+1t^{n+1}.

Case 2. A cell Tjn+1,n+1𝒯n+1,n+1T^{n+1,\mathcal{M}_{n+1}}_{j}\in\mathcal{T}^{n+1,\mathcal{M}_{n+1}} is obtained by de-refining some finer cells Tjsn,n𝒯n,n,s=1,2,..,ST^{n,\mathcal{M}_{n}}_{j_{s}}\in\mathcal{T}^{n,\mathcal{M}_{n}},s=1,2,..,S. The cell average of solution,  Ujn+1\hbox{\vbox{\hrule height=0.5pt\kern 1.72218pt\hbox{\kern-0.50003pt$U$\kern-0.50003pt}}}^{n+1}_{j} in the cell Tjn+1,n+1T^{n+1,\mathcal{M}_{n+1}}_{j}, is computed as

 Ujn+1\displaystyle\hbox{\vbox{\hrule height=0.5pt\kern 1.72218pt\hbox{\kern-0.50003pt$U$\kern-0.50003pt}}}^{n+1}_{j} =1|Tjn+1,n+1|s=1S Ujsn|Tjsn,n|,\displaystyle=\dfrac{1}{|T^{n+1,\mathcal{M}_{n+1}}_{j}|}\sum\limits_{s=1}^{S}\hbox{\vbox{\hrule height=0.5pt\kern 1.72218pt\hbox{\kern-0.50003pt$U$\kern-0.50003pt}}}^{n}_{j_{s}}|T^{n,\mathcal{M}_{n}}_{j_{s}}|,

where  Ujsn\hbox{\vbox{\hrule height=0.5pt\kern 1.72218pt\hbox{\kern-0.50003pt$U$\kern-0.50003pt}}}^{n}_{j_{s}} is the solution in Tjsn,nT^{n,\mathcal{M}_{n}}_{j_{s}}.

Case 3. A triangle Tjn+1,n+1𝒯n+1,n+1T^{n+1,\mathcal{M}_{n+1}}_{j}\in\mathcal{T}^{n+1,\mathcal{M}_{n+1}} is obtained from the refinement of the cell Tin,n𝒯n,nT^{n,\mathcal{M}_{n}}_{i}\in\mathcal{T}^{n,\mathcal{M}_{n}}. If Tin,nT^{n,\mathcal{M}_{n}}_{i} is a single-fluid cell, the cell averages at tn+1t^{n+1} in 𝒯n+1,n+1\mathcal{T}^{n+1,\mathcal{M}_{n+1}} are approximated by using the the piecewise linear reconstruction (2.7) of the solution at tn+1t^{n+1} in the triangle Tin,nT^{n,\mathcal{M}_{n}}_{i}. If Tin,nT^{n,\mathcal{M}_{n}}_{i} contains the density discontinuity, we will compute the cells averages in the “son” cell Tjn+1,n+1T^{n+1,\mathcal{M}_{n+1}}_{j} based on the interface tracking, see Section 3.2, and the information of the nearby single-fluid cells. For example, suppose that from the reconstructed interface in “dad” cell Tin,nT^{n,\mathcal{M}_{n}}_{i}, the “child” cell Tjn+1,n+1T^{n+1,\mathcal{M}_{n+1}}_{j} completely lies in one fluid, called fluid 1. Hence, triangle Tjn+1,n+1T^{n+1,\mathcal{M}_{n+1}}_{j} is a single-fluid cell and the cell averages  Ujn+1\hbox{\vbox{\hrule height=0.5pt\kern 1.72218pt\hbox{\kern-0.50003pt$U$\kern-0.50003pt}}}^{n+1}_{j} are set to be equal to the cell averages of another “reliable” cell which is in fluid 1 and is the closest cell to the “dad” cell Tin,nT^{n,\mathcal{M}_{n}}_{i}.

Remark 4.1

The update of cell averages in case 3 does not ensure the mass conservation which means the total mass of “son” cells in the adaptive grid is not equal to the mass of their “dad” cell. However, the volume of fluid and the exact location of the interface are conserved. In addition, the reconstructing method also maintains the steady state solution for “lake at rest” situations, see example 2 Section 5, since the values of the cell averages are obtained by using the information from nearby “reliable” cells.

4.3 Second-order Adaptive Time Evolution

Note that using a global time step in the adaptive algorithm may lead to a very small time step due to the presence of much finer cells in the mesh. To reduce the computational cost, we consider the approach based on the adaptive time step from [13, 11, 12, 30]. The main idea of this approach is to group cells into different levels based on the cell sizes and applying local time step on each level to evolve from tnt^{n} to tn+1t^{n+1}. Recently, in our work on the shallow water model [13], we have derived a simple and efficient adaptive time evolution algorithm based on the second-order strong stability preserving Runge-Kutta methods (SSPRK2) in [16, 11, 12, 30]. This method is also capable to perform on the multi-fluid system (1.1a)-(1.1b). The algorithm can be briefly described by an example as illustrated in Fig. 4.3.

Refer to caption
Figure 4.3: The example of SSPRK2 on mesh with three cell levels, l=0,1,2l=0,1,2.

First, we group all cells in the grid 𝒯n,n\mathcal{T}^{n,\mathcal{M}_{n}} at time tnt^{n} in cell levels l=0,1,..,Ll=0,1,..,L based on their sizes. Namely, a cell Tjn,n𝒯n,nT^{n,\mathcal{M}_{n}}_{j}\in\mathcal{T}^{n,\mathcal{M}_{n}} belongs to the level ll, if ll is the smallest positive integer satisfying,

2lmaxj(mink(rjk))mink(rj,k),2^{l}\geq\dfrac{\displaystyle\max_{j}\left(\displaystyle\min_{k}\left(r_{jk}\right)\right)}{\displaystyle\min_{k}(r_{j,k})}, (4.1)

where rjk,k=1,2,3r_{jk},k=1,2,3 are three altitudes of triangle Tjn,nT^{n,\mathcal{M}_{n}}_{j}. Next, at tnt^{n}, we define the reference time step Δt\Delta t as the local time step on the coarsest level l=0l=0 of cells in the mesh 𝒯n,n\mathcal{T}^{n,\mathcal{M}_{n}} by considering the CFL-type condition (2.20) locally on level l=0l=0.

ΔtΔt0n,0=0.9maxj(mink(rjk))18amax,\displaystyle\Delta t\equiv\Delta t^{n,0}_{0}=\frac{0.9\displaystyle\max_{j}\left(\displaystyle\min_{k}\left(r_{jk}\right)\right)}{18a_{max}}, (4.2)

where

amax:=maxj,k(ajkin,ajkout),a_{max}:=\displaystyle\max_{j,k}(a^{\rm in}_{jk},a^{\rm out}_{jk}), (4.3)

and (ajkin,ajkout)(a^{\rm in}_{jk},a^{\rm out}_{jk}) are the local one-sided speeds of propagation (2.8) at tnt^{n} for sides k=1,2,3k=1,2,3 in the triangle Tjn,n𝒯n,nT^{n,\mathcal{M}_{n}}_{j}\in\mathcal{T}^{n,\mathcal{M}_{n}}. We set, tn+1=tn+Δtt^{n+1}=t^{n}+\Delta t.

Next, assume that 𝒫l\mathcal{P}_{l} is the number of steps needed for the higher levels l=1,..Ll=1,..L to evolve from tnt^{n} to tn+1,t^{n+1}, namely [tn,tn+1]=[tln,p,tln,p+1],p=0,,𝒫l1[t^{n},t^{n+1}]=\cup[t_{l}^{n,p},t_{l}^{n,p+1}],p=0,...,\mathcal{P}_{l}-1 with tln,0tnt^{n,0}_{l}\equiv t^{n}, tln,𝒫ltn+1lt_{l}^{n,\mathcal{P}_{l}}\equiv t^{n+1}\quad\forall l. At tln,pt^{n,p}_{l}, the local time step for cells on these levels l=1,,Ll=1,...,L is calculated by

Δtln,p=2lΔtmax(μln,p,1),\Delta t^{n,p}_{l}=\dfrac{2^{-l}\Delta t}{\max(\mu^{n,p}_{l},1)}, (4.4)

where parameter μln,p\mu^{n,p}_{l} takes into account change in the local one-sided speeds of the propagation,

μln,p=maxj,k(ajkin,ajkout)ln,pamax,\mu^{n,p}_{l}=\dfrac{\displaystyle\max_{j,k}(a^{\rm in}_{jk},a^{\rm out}_{jk})^{n,p}_{l}}{a_{max}},

where (ajkin,ajkout)ln,p(a^{\rm in}_{jk},a^{\rm out}_{jk})^{n,p}_{l} are the local one-sided speeds of propagation of the cell Tjn,nT^{n,\mathcal{M}_{n}}_{j} in the level ll at tln,pt^{n,p}_{l}. Therefore, on each cell Tjn,nT^{n,\mathcal{M}_{n}}_{j} of level ll, for each substep [tln,p,tln,p+1][tln,p,tln,p+Δtln,p],p=0,1,2,3,,𝒫l1[t_{l}^{n,p},t_{l}^{n,p+1}]\equiv[t_{l}^{n,p},t_{l}^{n,p}+\Delta t_{l}^{n,p}],p=0,1,2,3,...,\mathcal{P}_{l}-1 of the evolution from tnt^{n} to tn+1t^{n+1}, we apply the following two adaptive steps of the SSPRK2 method, see [16, 11, 12, 30],

 𝑼j(1)\displaystyle\hbox{\vbox{\hrule height=0.5pt\kern 1.72218pt\hbox{\kern-0.50003pt$\bm{U}$\kern-0.50003pt}}}_{j}^{(1)} = 𝑼jn,pΔtln,p(1|Tjn,n|k=13𝑯jkn,p 𝑺jn,p):=𝑹( 𝑼jn,p,Δtln,p),\displaystyle=\hbox{\vbox{\hrule height=0.5pt\kern 1.72218pt\hbox{\kern-0.50003pt$\bm{U}$\kern-0.50003pt}}}_{j}^{n,p}-\Delta t^{n,p}_{l}\left(\frac{1}{|T^{n,\mathcal{M}_{n}}_{j}|}\sum_{k=1}^{3}{\bm{H}}^{n,p}_{jk}-\hbox{\vbox{\hrule height=0.5pt\kern 1.72218pt\hbox{\kern-0.50003pt$\bm{S}$\kern-0.50003pt}}}^{n,p}_{j}\right):={\bm{R}}(\hbox{\vbox{\hrule height=0.5pt\kern 1.72218pt\hbox{\kern-0.50003pt$\bm{U}$\kern-0.50003pt}}}_{j}^{n,p},\Delta t_{l}^{n,p}), (4.5a)
 𝑼jn,p+1\displaystyle\hbox{\vbox{\hrule height=0.5pt\kern 1.72218pt\hbox{\kern-0.50003pt$\bm{U}$\kern-0.50003pt}}}_{j}^{n,p+1} =12 𝑼jn,p+12𝑹( 𝑼j(1),Δtln,p).\displaystyle=\dfrac{1}{2}\hbox{\vbox{\hrule height=0.5pt\kern 1.72218pt\hbox{\kern-0.50003pt$\bm{U}$\kern-0.50003pt}}}_{j}^{n,p}+\dfrac{1}{2}{\bm{R}}(\hbox{\vbox{\hrule height=0.5pt\kern 1.72218pt\hbox{\kern-0.50003pt$\bm{U}$\kern-0.50003pt}}}_{j}^{(1)},\Delta t_{l}^{n,p}). (4.5b)

The flux term 𝑯jkn,p{\bm{H}}^{n,p}_{jk} in (4.5a) -(4.5b) is the flux (2.6) computed at t=tln,pt=t^{n,p}_{l}. The source term  𝑺jn,p\hbox{\vbox{\hrule height=0.5pt\kern 1.72218pt\hbox{\kern-0.50003pt${\bm{S}}$\kern-0.50003pt}}}^{n,p}_{j} in (4.5a) -(4.5b) is the source (2.25) - (2.26) computed at t=tln,pt=t^{n,p}_{l} with the time step Δtln,p\Delta t_{l}^{n,p}. Note that,  𝑼jn,0 𝑼jn\hbox{\vbox{\hrule height=0.5pt\kern 1.72218pt\hbox{\kern-0.50003pt$\bm{U}$\kern-0.50003pt}}}_{j}^{n,0}\equiv\hbox{\vbox{\hrule height=0.5pt\kern 1.72218pt\hbox{\kern-0.50003pt$\bm{U}$\kern-0.50003pt}}}_{j}^{n} and  𝑼jn,𝒫l 𝑼jn+1\hbox{\vbox{\hrule height=0.5pt\kern 1.72218pt\hbox{\kern-0.50003pt$\bm{U}$\kern-0.50003pt}}}_{j}^{n,\mathcal{P}_{l}}\equiv\hbox{\vbox{\hrule height=0.5pt\kern 1.72218pt\hbox{\kern-0.50003pt$\bm{U}$\kern-0.50003pt}}}_{j}^{n+1}.

Remark 4.2

If cells from different cell levels are neighbors, we use linear interpolation in time to match the time levels of such cells, see also Fig. 3.6, for the illustration of the interpolation.

4.4 A Posteriori Error Estimator

To create a robust indicator for the adaptive mesh refinement, in our prior work [13], we have derived local error estimator from the idea of Weak Local Residual (WLR) presented in [40, 18]. This error indicator has shown its advantages in accurately capturing the regions with large error in numerical simulation for Saint-Venant system of shallow water model. Hence, for the adaptive central-upwind scheme for SWEDs, we will extend the error estimator by applying the computation performed in [13] for the last equations in the system (1.1d).

Let us recall that from the weak form of the mass conservation equation (1.1a), in [13], the WLR errors Eiw,n+12E^{w,n+\frac{1}{2}}_{i} at each node NiN_{i} on mesh 𝒯n,n\mathcal{T}^{n,\mathcal{M}_{n}} is given by the formula,

Eiw,n+12\displaystyle E^{w,n+\frac{1}{2}}_{i} =1Δ(𝒰iw,n+12+iw,n+12+𝒢iw,n+12),\displaystyle=\frac{1}{\Delta}(\mathcal{U}^{w,n+\frac{1}{2}}_{i}+\mathcal{F}^{w,n+\frac{1}{2}}_{i}+\mathcal{G}^{w,n+\frac{1}{2}}_{i}), (4.6)
𝓤iw,n+12\displaystyle\mathcal{\bm{U}}^{w,n+\frac{1}{2}}_{i} =c=1Ci13|Tjcn,n|( wjcn wjcn+1),\displaystyle=\sum\limits_{c=1}^{C_{i}}\frac{1}{3}|T^{n,\mathcal{M}_{n}}_{j_{c}}|(\hbox{\vbox{\hrule height=0.5pt\kern 1.72218pt\hbox{\kern-0.50003pt$w$\kern-0.50003pt}}}^{n}_{j_{c}}-\hbox{\vbox{\hrule height=0.5pt\kern 1.72218pt\hbox{\kern-0.50003pt$w$\kern-0.50003pt}}}^{n+1}_{j_{c}}),
iw,n+12\displaystyle\mathcal{F}^{w,n+\frac{1}{2}}_{i} =c=1Ciac(i)Δt2|Tjcn,n|(( hu)jcn+( hu)jcn+1),\displaystyle=\sum\limits_{c=1}^{C_{i}}a^{(i)}_{c}\frac{\Delta t}{2}|T^{n,\mathcal{M}_{n}}_{j_{c}}|((\hbox{\vbox{\hrule height=0.5pt\kern 1.72218pt\hbox{\kern-0.50003pt$hu$\kern-0.50003pt}}})^{n}_{j_{c}}+(\hbox{\vbox{\hrule height=0.5pt\kern 1.72218pt\hbox{\kern-0.50003pt$hu$\kern-0.50003pt}}})^{n+1}_{j_{c}}),
𝒢iw,n+12\displaystyle\mathcal{G}^{w,n+\frac{1}{2}}_{i} =c=1Cibc(i)Δt2|Tjcn,n|(( hv)jcn+( hv)jcn+1),\displaystyle=\sum\limits_{c=1}^{C_{i}}b^{(i)}_{c}\frac{\Delta t}{2}|T^{n,\mathcal{M}_{n}}_{j_{c}}|((\hbox{\vbox{\hrule height=0.5pt\kern 1.72218pt\hbox{\kern-0.50003pt$hv$\kern-0.50003pt}}})^{n}_{j_{c}}+(\hbox{\vbox{\hrule height=0.5pt\kern 1.72218pt\hbox{\kern-0.50003pt$hv$\kern-0.50003pt}}})^{n+1}_{j_{c}}),

where CiC_{i} is the number of triangles Tjcn,nT^{n,\mathcal{M}_{n}}_{j_{c}} having common vertex at node NiN_{i}. Here, the quantity (ac(i),bc(i))(a^{(i)}_{c},b^{(i)}_{c}) is the gradient of the linear piece restricted to Tjcn,nT^{n,\mathcal{M}_{n}}_{j_{c}},

ac(i)\displaystyle a^{(i)}_{c} =y~2y~3(y~3y~i)(x~2x~i)(y~2y~i)(x~3x~i),\displaystyle=\dfrac{\widetilde{y}_{2}-\widetilde{y}_{3}}{(\widetilde{y}_{3}-\widetilde{y}_{i})(\widetilde{x}_{2}-\widetilde{x}_{i})-(\widetilde{y}_{2}-\widetilde{y}_{i})(\widetilde{x}_{3}-\widetilde{x}_{i})}, (4.7)
bc(i)\displaystyle b^{(i)}_{c} =x~3x~2(y~3y~i)(x~2x~i)(y~2y~i)(x~3x~i),\displaystyle=\dfrac{\widetilde{x}_{3}-\widetilde{x}_{2}}{(\widetilde{y}_{3}-\widetilde{y}_{i})(\widetilde{x}_{2}-\widetilde{x}_{i})-(\widetilde{y}_{2}-\widetilde{y}_{i})(\widetilde{x}_{3}-\widetilde{x}_{i})},

where Ni=(x~i,y~i),(x~2,y~2),N_{i}=(\widetilde{x}_{i},\widetilde{y}_{i}),(\widetilde{x}_{2},\widetilde{y}_{2}), and (x~3,y~3)(\widetilde{x}_{3},\widetilde{y}_{3}) are the three vertices of triangle Tjcn,nT^{n,\mathcal{M}_{n}}_{j_{c}}.

Now, by applying the same calculation in [13] on the weak form of the last equations in the system (1.1d), we then define the WLR error of variable hρh\rho at node NiN_{i} in the grid as,

Eihρ,n+12\displaystyle E^{h\rho,n+\frac{1}{2}}_{i} =1Δ(𝒰ihρ,n+12+ihρ,n+12+𝒢ihρ,n+12),\displaystyle=\frac{1}{\Delta}(\mathcal{U}^{h\rho,n+\frac{1}{2}}_{i}+\mathcal{F}^{h\rho,n+\frac{1}{2}}_{i}+\mathcal{G}^{h\rho,n+\frac{1}{2}}_{i}), (4.8)
𝓤ihρ,n+12\displaystyle\mathcal{\bm{U}}^{h\rho,n+\frac{1}{2}}_{i} =c=1Ci13|Tjcn,n|( hρjcn hρjcn+1),\displaystyle=\sum\limits_{c=1}^{C_{i}}\frac{1}{3}|T^{n,\mathcal{M}_{n}}_{j_{c}}|(\hbox{\vbox{\hrule height=0.5pt\kern 1.72218pt\hbox{\kern-0.50003pt$h\rho$\kern-0.50003pt}}}^{n}_{j_{c}}-\hbox{\vbox{\hrule height=0.5pt\kern 1.72218pt\hbox{\kern-0.50003pt$h\rho$\kern-0.50003pt}}}^{n+1}_{j_{c}}),
ihρ,n+12\displaystyle\mathcal{F}^{h\rho,n+\frac{1}{2}}_{i} =c=1Ciac(i)Δt2|Tjcn,n|(( huρ)jcn+( huρ)jcn+1),\displaystyle=\sum\limits_{c=1}^{C_{i}}a^{(i)}_{c}\frac{\Delta t}{2}|T^{n,\mathcal{M}_{n}}_{j_{c}}|((\hbox{\vbox{\hrule height=0.5pt\kern 1.72218pt\hbox{\kern-0.50003pt$hu\rho$\kern-0.50003pt}}})^{n}_{j_{c}}+(\hbox{\vbox{\hrule height=0.5pt\kern 1.72218pt\hbox{\kern-0.50003pt$hu\rho$\kern-0.50003pt}}})^{n+1}_{j_{c}}),
𝒢ihρ,n+12\displaystyle\mathcal{G}^{h\rho,n+\frac{1}{2}}_{i} =c=1Cibc(i)Δt2|Tjcn,n|(( hvρ)jcn+( hvρ)jcn+1).\displaystyle=\sum\limits_{c=1}^{C_{i}}b^{(i)}_{c}\frac{\Delta t}{2}|T^{n,\mathcal{M}_{n}}_{j_{c}}|((\hbox{\vbox{\hrule height=0.5pt\kern 1.72218pt\hbox{\kern-0.50003pt$hv\rho$\kern-0.50003pt}}})^{n}_{j_{c}}+(\hbox{\vbox{\hrule height=0.5pt\kern 1.72218pt\hbox{\kern-0.50003pt$hv\rho$\kern-0.50003pt}}})^{n+1}_{j_{c}}).

Hence, the error in a cell Tjn,n𝒯n.nT^{n,\mathcal{M}_{n}}_{j}\in\mathcal{T}^{n.\mathcal{M}_{n}} takes into account both WLR errors of water surface ww and of variable hρh\rho as,

ej=maxk(|Ejkw,n+12|,|Ejkhρ,n+12|),k=1,2,3,e_{j}=\max_{k}\left(\left|E^{w,n+\frac{1}{2}}_{jk}\right|,\left|E^{h\rho,n+\frac{1}{2}}_{jk}\right|\right),\quad k=1,2,3, (4.9)

where Ejkw,n+12E^{w,n+\frac{1}{2}}_{jk} and Ejkhρ,n+12E^{h\rho,n+\frac{1}{2}}_{jk} are the WLR errors computed in (4.6) and (4.8) at a node kk of triangle TjT_{j}.

The error eje_{j} in each cell Tjn.n𝒯n,nT^{n.\mathcal{M}_{n}}_{j}\in\mathcal{T}^{n,\mathcal{M}_{n}} is compared to the error tolerance computed by

ω=σmaxj(ej),\omega=\sigma\max_{j}(e_{j}), (4.10)

where σ<1\sigma<1 is a given problem-dependent constant. Based on the error comparison, the cell is then either “flagged” for refinement/de-refinement or “no-change”.

5 Numerical Experiments

In this section, we will verify the computational efficiency of the designed adaptive central-upwind scheme. We compare the results of the adaptive method with the results of the central-upwind scheme without the adaptivity, see Section 4, on uniform triangular meshes (example of such uniform triangular mesh is outlined in Fig. 5.1). To this end, in all examples, we calculate the L1L^{1}-errors and a ratio, CPU=CPUuniformCPUadaptive\mathcal{R}_{CPU}=\frac{CPU_{uniform}}{CPU_{adaptive}}, which is the ratio of the CPU times of the central-upwind algorithm without the mesh reconstruction to the CPU time of the adaptive central-upwind algorithm. To compare L1L^{1}-errors, as well as to compare the CPU times and to compute CPU\mathcal{R}_{CPU}, we consider uniform mesh and the adaptive mesh with the same size of the smallest cells. Namely, in Tables 5.1-5.8, L1L^{1}-errors and CPU\mathcal{R}_{CPU} are computed by using the uniform meshes 2×N×N,N=100,200,4002\times N\times N,N=100,200,400 and the corresponding adaptive meshes which are reconstructed from the coarser uniform mesh 2×N/2×N/22\times N/2^{\mathcal{M}}\times N/2^{\mathcal{M}} (=1,2\mathcal{M}=1,2 is the highest level of refinement in the adaptive mesh). To compute the L1L^{1}-errors, the reference solution is obtained by applying the central-upwind method without implementing adaptivity techniques on the uniform mesh with 2×800×8002\times 800\times 800 triangles. In all experiments, we consider a zero-order extrapolation at all boundaries. In addition, we use the gravitational acceleration, g=1.0g=1.0 and the reference density, ρ0=997\rho_{0}=997 [15] for all examples. The desingularization parameters τ\tau and ε\varepsilon for calculations of the velocity components uu and vv are set τ=maxj{|Tjn,n|2}\tau=\max_{j}\{|T^{n,\mathcal{M}_{n}}_{j}|^{2}\} and ε=104\varepsilon=10^{-4} (see Section 2.1 formula (2.6) in [29]).

Refer to caption
Figure 5.1: An outline of uniform triangular mesh.

5.1 Example 1:

In the first example taken from [9], we will compare the performance of the adaptive central-upwind scheme and the central-upwind scheme without adaptivity on uniform triangular meshes. We also verify experimentally the advantages of the interface reconstruction in compressing the diffusion of variable density at the interface of fluids and improving the accuracy of computed solutions.

We consider the bottom topography B(x,y,0):=0B(x,y,0):=0 and the following initial condition,

(w,u,v,ρ)T(x,y,0)={(2,0,0,1.5ρ0),ifx2+y2<0.5,(1,0,0,ρ0),otherwise.(w,u,v,\rho)^{T}(x,y,0)=\begin{cases}(2,0,0,1.5\rho_{0}),\quad\mbox{if}\quad&x^{2}+y^{2}<0.5,\\ (1,0,0,\rho_{0}),\quad&\mbox{otherwise}.\end{cases} (5.1)

The data is simulated in the domain [1,1]×[1,1][-1,1]\times[-1,1]. The error tolerance (4.10) for the mesh refinement in this example is set to ω=0.01maxj(ej)\omega=0.01\max_{j}(e_{j}).

In Fig. 5.2 and Fig. 5.3, we show the numerical solution of the water surface (first column) and the density (second column) at time t=0.15t=0.15. The solution is calculated by using the central-upwind scheme on uniform meshes on Fig. 5.2 (a, b) and Fig. 5.3 (a,b) and using the adaptive central-upwind scheme on Fig. 5.2 (c, d) and Fig. 5.3 (c,d). The adaptive meshes in Fig. 5.2 (third column) are obtained from the uniform mesh 2×100×1002\times 100\times 100, Fig. 5.2 (a). The adaptive mesh with one level of refinement =1\mathcal{M}=1 (as the highest level of refinement) is on Fig. 5.2 (c), and with two levels of refinement =2\mathcal{M}=2 (as the highest level of refinement) is on Fig. 5.2 (d). As can be observed in Fig. 5.2, both ww and ρ\rho are much sharper resolved by using the adaptive central-upwind scheme. We note also, that by increasing the level of refinement from =1\mathcal{M}=1 to =2\mathcal{M}=2, the number of cells in the mesh increases from 40,29240,292 cells with =1\mathcal{M}=1 to 60,32660,326 cells with =2\mathcal{M}=2, but the accuracy is clearly improved with higher resolution as seen in Fig. 5.2 (c) and Fig. 5.2 (d). Also from the adaptive meshes in Fig. 5.2 (third column), one can easily see that only cells in the region having steep gradients are refined. This means that the WLR error estimator accurately detects regions in the domain for adaptive refinement/coarsening.

Refer to caption
(a) Uniform mesh 2×100×1002\times 100\times 100.
Refer to caption
(b) Uniform mesh 2×200×2002\times 200\times 200.
Refer to caption
(c) Adaptive mesh with =1\mathcal{M}=1.
Refer to caption
(d) Adaptive mesh with =2\mathcal{M}=2.
Figure 5.2: Example 1: Contour plots of computational water surface w(x,y,0.15)w(x,y,0.15) (first column) and density ρ(x,y,0.15)\rho(x,y,0.15) (second column) of the IVP (5.1) with the corresponding meshes (third column).
Refer to caption
(a) Uniform mesh 2×100×1002\times 100\times 100.
Refer to caption
(b) Uniform mesh 2×200×2002\times 200\times 200.
Refer to caption
(c) Adaptive mesh with =1\mathcal{M}=1.
Refer to caption
(d) Adaptive mesh with =2\mathcal{M}=2.
Figure 5.3: Example 1: 3-D plots of computational water surface w(x,y,0.15)w(x,y,0.15) (first column) and density ρ(x,y,0.15)\rho(x,y,0.15) (second column) of the IVP (5.1).

Next, in Table 5.1 we calculate the L1L^{1}-errors obtained on the adaptive grids and on the fixed uniform grids. The errors obtained in the uniform meshes are approximate to the errors calculated in the corresponding adaptive meshes (the adaptive meshes have the same size of the smallest cells with the uniform meshes). However, the adaptive scheme uses fewer cells than the central-upwind scheme which does not consider the mesh reconstruction. In addition, in Table 5.2, we also compute the CPU\mathcal{R}_{CPU} ratio to compare the computational cost of the two methods. The results in Table 5.1 and Table 5.2 show that the adaptive scheme produces similar accuracy as the scheme designed on fixed uniform triangular meshes, but at a less computational cost.

algorithm without adaptivity adaptive algorithm
one level =1\mathcal{M}=1 two levels =2\mathcal{M}=2
cells L1L^{1}-error rate cells L1L^{1}-error rate cells L1L^{1}-error rate
2×100×1002\times 100\times 100 0.0256 13,516 0.0257 12,800 0.0265
2×200×2002\times 200\times 200 0.0127 1.01 40,292 0.0128 1.00 38,284 0.0133 0.99
2×400×4002\times 400\times 400 0.0047 1.43 153,152 0.0049 1.39 60,326 0.0050 1.41
Table 5.1: Example 1: L1L^{1}-errors of the water surface ww of the IVP (5.1) at t=0.15t=0.15, and the convergence rates of the central-upwind scheme without adaptivity (uniform mesh 2×N×N,N=100,200,4002\times N\times N,N=100,200,400) and the adaptive scheme (the corresponding adaptive mesh is reconstructed from the uniform mesh 2×N/2×N/22\times N/2^{\mathcal{M}}\times N/2^{\mathcal{M}}).
uniform mesh adaptive mesh =1\mathcal{M}=1 CPU\mathcal{R}_{CPU} with =1\mathcal{M}=1 adaptive mesh =2\mathcal{M}=2 CPU\mathcal{R}_{CPU} with =2\mathcal{M}=2
(cells) (cells) total without grid generation (cells) total without grid generation
2×100×1002\times 100\times 100 13,516 1.81 2.01 12,800 1.83 1.94
2×200×2002\times 200\times 200 40,292 1.82 2.14 38,284 2.14 2.30
2×400×4002\times 400\times 400 153,152 1.98 2.29 60,326 2.33 2.50
CPU\mathcal{R}_{CPU} average: 1.87 2.15 2.10 2.27
Table 5.2: Example 1: CPU\mathcal{R}_{CPU} ratio for the IVP (5.1) at t=0.15t=0.15, where for adaptive central-upwind scheme, we consider the total CPU times and CPU times without the grid generation.

In addition, we will use this example to show that interface reconstruction presented in Section 3.2 plays an important part in preserving the sharpness of the solution as well as improving the accuracy of the adaptive central-upwind scheme. On Fig. 5.4 (a), we plot the water surface ww (first) and density ρ\rho (second column) at t=0.15t=0.15 by using the adaptive central-upwind method, but implemented without the interface tracking technique. We then compare the results shown in Fig. 5.4 (a) to the results calculated by using the adaptive scheme with the interface tracking, Fig. 5.4 (b). The adaptive meshes on Fig. 5.4 (third column) are reconstructed from the uniform mesh 2×100×1002\times 100\times 100 with one level of refinement. As can be seen in Fig. 5.4 (a), both ww and ρ\rho are very scattered around the contact wave when we do not track and reconstruct the interface. Meanwhile, in Fig. 5.4 (b), the proposed adaptive scheme, though using an adaptive mesh with fewer cells (10828 cells fewer), provides more accurate results.

Refer to caption
(a) Adaptive scheme without interface tracking on adaptive mesh with 51768 cells.
Refer to caption
(b) Adaptive scheme with interface tracking on adaptive mesh with 40940 cells
Figure 5.4: Example 1: Computational water surface w(x,y,0.15)w(x,y,0.15) (first column), density ρ(x,y,0.15)\rho(x,y,0.15) (second column) of the IVP (5.1), and the corresponding adaptive meshes (third column) obtained by using the proposed adaptive central-upwind scheme (bottom) and using the adaptive scheme without interface tracking (top).

In the next numerical test, we replace the flat bottom with the bottom topography that consists of two Gaussian shaped humps as

B(x,y,t)={0.5e100(x+0.5)2+(y+0.5)2,ifx<0,0.6e100(x0.5)2+(y0.5)2,ifx0.B(x,y,t)=\begin{cases}0.5e^{-100(x+0.5)^{2}+(y+0.5)^{2}},\quad&\mbox{if}\quad x<0,\\ 0.6e^{-100(x-0.5)^{2}+(y-0.5)^{2}},\quad&\mbox{if}\quad x\geq 0.\end{cases} (5.2)

The purpose of this test is to illustrate the performance of the adaptive algorithm in situations having irregular bottom topography. In Fig. 5.5, we show the contour plots of the water surface ww (first column) and density ρ\rho (second column) obtained at t=0.2t=0.2 by using the central-upwind scheme with and without adaptivity. The computed solutions of the water surface exhibit reflecting waves where the flow meets the submerged humps. Clearly, from the plots of the adaptive meshes in Fig. 5.5 (third column), the meshes are adapted to the behavior of the flow. Hence, the WLR error estimator is capable to exactly detect the location of the steep local gradients in the solution.

Refer to caption
(a) Uniform mesh 2×100×1002\times 100\times 100.
Refer to caption
(b) Uniform mesh 2×200×2002\times 200\times 200.
Refer to caption
(c) Adaptive mesh with =1\mathcal{M}=1.
Refer to caption
(d) Adaptive mesh with =2\mathcal{M}=2.
Figure 5.5: Example 1: Contour plots of computational water surface w(x,y,0.2)w(x,y,0.2) (first column) and density ρ(x,y,0.2)\rho(x,y,0.2) (second column) of the IVP (5.1)-(5.2) with the corresponding meshes (third column).

We then recompute the accuracy of the solution for this example 5.1-5.2, see Table 5.3, and the CPU time ratio, see Table 5.4. The results show that the adaptive scheme uses fewer cells and takes a smaller CPU time to achieve the approximately small L1L^{1}-errors as computed by the scheme without adaptivity. Therefore, the advantages of the adaptive scheme is maintained in examples with irregular bottom level.

algorithm without adaptivity adaptive algorithm
one level =1\mathcal{M}=1 two levels =2\mathcal{M}=2
cells L1L^{1}-error rate cells L1L^{1}-error rate cells L1L^{1}-error rate
2×100×1002\times 100\times 100 0.0271 16,252 0.0273 16,006 0.0282
2×200×2002\times 200\times 200 0.0134 1.01 57,300 0.0136 1.00 42,602 0.0140 0.99
2×400×4002\times 400\times 400 0.0050 1.43 213,268 0.0054 1.40 120,654 0.0055 1.41
Table 5.3: Example 1: L1L^{1}-errors of the water surface ww of the IVP (5.1)-(5.2) at t=0.2t=0.2, and the convergence rates of the central-upwind scheme without adaptivity (uniform mesh 2×N×N,N=100,200,4002\times N\times N,N=100,200,400) and the adaptive scheme (the corresponding adaptive mesh is reconstructed from the uniform mesh 2×N/2×N/22\times N/2^{\mathcal{M}}\times N/2^{\mathcal{M}}).
uniform mesh adaptive mesh =1\mathcal{M}=1 CPU\mathcal{R}_{CPU} with =1\mathcal{M}=1 adaptive mesh =2\mathcal{M}=2 CPU\mathcal{R}_{CPU} with =2\mathcal{M}=2
(cells) (cells) total without grid generation (cells) total without grid generation
2×100×1002\times 100\times 100 16,252 1.69 1.89 16,006 1.84 1.94
2×200×2002\times 200\times 200 57,300 2.57 2.95 42,602 3.41 3.68
2×400×4002\times 400\times 400 213,268 2.24 2.60 120,654 2.63 2.84
CPU\mathcal{R}_{CPU} average: 2.17 2.48 2.63 2.82
Table 5.4: Example 1: CPU\mathcal{R}_{CPU} ratio for the IVP (5.1)-(5.2) at t=0.2t=0.2, where for adaptive central-upwind scheme, we consider the total CPU times and CPU times without the grid generation.

5.2 Example 2:

The second numerical example here was proposed in [9] to verify the capability of the adaptive scheme in preserving the steady state solution in “lake at rest’ problems, (1.2) and (1.3). In particular, the initial data consists of two “lake at rest” states of type (1.2) connected through the density jump corresponding to the “lake at rest” state of type (1.3) as

(w,u,v,ρ)T(x,y,0)={(3,0,0,43ρ0),ifx2+y2<0.25,(2,0,0,3ρ0),otherwise.(w,u,v,\rho)^{T}(x,y,0)=\begin{cases}(3,0,0,\dfrac{4}{3}\rho_{0}),\quad\mbox{if}\quad&x^{2}+y^{2}<0.25,\\ (2,0,0,3\rho_{0}),\quad&\mbox{otherwise}.\end{cases} (5.3)

In this example, we consider the bottom topography (5.2) on a computational domain [1,1]×[1,1][-1,1]\times[-1,1]. To reconstruct the adaptive meshes, the threshold is set, ω=0.1maxj(ej)\omega=0.1\max_{j}(e_{j}). In Fig. 5.6, we present the plots of the computed water surface (first column) and density (second column) at t=0.15t=0.15 obtained by using the central-upwind scheme, but without adaptivity, Fig. 5.6 (a, b) and by using the adaptive algorithm Fig. 5.6 (c, d). The adaptive grids plotted on Fig. 5.6 (third column) are generated from the uniform mesh 2×100×1002\times 100\times 100 with one level of refinement =1\mathcal{M}=1, Fig. 5.6 (c), and two levels of refinement =2\mathcal{M}=2, Fig. 5.6 (d). Fig. 5.7 shows the 3D plots of the numerical solution computed by the two methods. As expected, in Fig. 5.6 and Fig. 5.7, the adaptive scheme with interface tracking exactly preserves the steady state. Hence, in Fig. 5.6 (third column), the WLR error only marks cells surrounding the circle of density jump for refinement. In addition, no pressure oscillations are observed at the interface.

Refer to caption
(a) Uniform mesh 2×100×1002\times 100\times 100.
Refer to caption
(b) Uniform mesh 2×200×2002\times 200\times 200.
Refer to caption
(c) Adaptive mesh with =1\mathcal{M}=1.
Refer to caption
(d) Adaptive mesh with =2\mathcal{M}=2.
Figure 5.6: Example 2: Contour plots of computational water surface w(x,y,0.15)w(x,y,0.15) (first column) and density ρ(x,y,0.15)\rho(x,y,0.15) with the corresponding meshes (right column).
Refer to caption
(a) Uniform mesh 2×100×1002\times 100\times 100.
Refer to caption
(b) Uniform mesh 2×200×2002\times 200\times 200.
Refer to caption
(c) Adaptive mesh with =1\mathcal{M}=1.
Refer to caption
(d) Adaptive mesh with =2\mathcal{M}=2.
Figure 5.7: Example 2: 3-D plots of computational water surface w(x,y,0.15)w(x,y,0.15) (left column) and density ρ(x,y,0.15)\rho(x,y,0.15) (right column).

Next, we will illustrate the advantages of the adaptive central-upwind scheme. We compute the L1L^{1}-error, Table 5.5, and the CPU ratio, Table 5.6, by using the central-upwind method without adaptivity and using the adaptive algorithm presented in our work. In order to compare the computational costs and calculate CPU\mathcal{R}_{CPU}, we consider uniform and adaptive meshes with the same size of the smallest cells. Table 5.5 shows that in the adaptive meshes, we achieve L1L^{1}-errors as small as the errors obtained in the corresponding uniform meshes. However, the adaptive algorithm uses fewer cells and reduces the CPU times up to eight times. The computational cost is remarkably cut down since as illustrated in Fig. 5.6 and Fig. 5.7, only a few cells in the neighborhood of the density discontinuity have large WLR errors and are therefore marked for refinement. This example has clearly show the efficiency of the proposed scheme for numerically solving the system of multi-fluid flow.

algorithm without adaptivity adaptive algorithm
one level =1\mathcal{M}=1 two levels =2\mathcal{M}=2
cells L1L^{1}-error rate cells L1L^{1}-error rate cells L1L^{1}-error rate
2×100×1002\times 100\times 100 0.0045 6,284 0.0045 5,928 0.0045
2×200×2002\times 200\times 200 0.0021 1.10 22,546 0.0021 1.10 11,260 0.0021 1.10
2×400×4002\times 400\times 400 7.9252e-04 1.41 85,132 8.5079e-04 1.30 33,904 8.9818e-04 1.23
Table 5.5: Example 2: L1L^{1}-errors of the water surface ww at t=0.15t=0.15, and the convergence rates of the central-upwind scheme without adaptivity (uniform mesh 2×N×N,N=100,200,4002\times N\times N,N=100,200,400) and the adaptive scheme (the corresponding adaptive mesh is reconstructed from the uniform mesh 2×N/2×N/22\times N/2^{\mathcal{M}}\times N/2^{\mathcal{M}}).
uniform mesh adaptive mesh =1\mathcal{M}=1 CPU\mathcal{R}_{CPU} with =1\mathcal{M}=1 adaptive mesh =2\mathcal{M}=2 CPU\mathcal{R}_{CPU} with =2\mathcal{M}=2
(cells) (cells) total without grid generation (cells) total without grid generation
2×100×1002\times 100\times 100 6,284 3.01 3.54 5,928 3.48 3.75
2×200×2002\times 200\times 200 22,546 3.78 4.76 11,260 7.76 8.66
2×400×4002\times 400\times 400 85,132 4.46 5.57 33,904 11.13 12.86
CPU\mathcal{R}_{CPU} average: 3.75 4.62 7.46 8.42
Table 5.6: Example 2: CPU\mathcal{R}_{CPU} ratio at t=0.15t=0.15, where for adaptive central-upwind scheme, we consider the total CPU times and CPU times without the grid generation.

5.3 Example 3:

The last example is designed to illustrate the capability of the proposed adaptive algorithm to handle irregular density interfaces. Hence, in a domain [1,1]×[1,1][-1,1]\times[-1,1], the density jump at t=0t=0 is given by a curve which consists of a horizontal segment, a vertical segment, and a quarter of a circle connected at their endpoints as illustrated in Fig. 5.8.

Refer to caption
Figure 5.8: Example 3: The interface at initial time t=0t=0.

The initial condition is described by

(w,u,v,ρ)T(x,y,0)={(2,0,0,ρ0),if(x,y)Ω,(1,0,0,1.5ρ0),otherwise.(w,u,v,\rho)^{T}(x,y,0)=\begin{cases}(2,0,0,\rho_{0}),\quad\mbox{if}\quad&(x,y)\in\Omega,\\ (1,0,0,1.5\rho_{0}),\quad&\mbox{otherwise}.\end{cases} (5.4)

where

Ω:={x<0.5,y<0}{(x+0.5)2+(y+0.5)2<0.25}{x<0,y<0.5}.\Omega:=\{x<-0.5,y<0\}\cup\{(x+0.5)^{2}+(y+0.5)^{2}<0.25\}\cup\{x<0,y<-0.5\}.

. We consider a bottom topography with a surbmerged hump as

B(x,y,t)=0.5e100(x2+y2).B(x,y,t)=0.5e^{-100(x^{2}+y^{2})}.

In this example, we will also perform the same numerical tests which are done in previous examples. Namely, we first calculate the water surface and density at t=0.15t=0.15 using central-upwind scheme without adaptivity and present the results in Fig. 5.9 (a, b) and Fig. 5.10 (a, b). In 5.9 (c, d) and 5.10 (c, d), we plot the results for ww (first column) and ρ\rho (second column) obtained by the adaptive scheme. The adaptive grids in 5.9 (third column) are generated from the uniform grid 2×100×1002\times 100\times 100 for one level of refinement =1\mathcal{M}=1 and =2\mathcal{M}=2 using the threshold ω=0.01maxj(ej)\omega=0.01\max_{j}(e_{j}). As expected, the solutions obtained in the adaptive meshes with high levels of refinement are much sharper than the solutions computed in fixed uniform meshes. The density jump moves Northeast and does not diffuse. There is no non-physical spurious waves generated at the interface. Also, as can be seen in the adaptive meshes, the WLR error indicator captures subtle features of the solution.

Refer to caption
(a) Uniform mesh 2×100×1002\times 100\times 100.
Refer to caption
(b) Uniform mesh 2×200×2002\times 200\times 200.
Refer to caption
(c) Adaptive mesh with =1\mathcal{M}=1.
Refer to caption
(d) Adaptive mesh with =2\mathcal{M}=2.
Figure 5.9: Example 3: Contour plots of computational water surface w(x,y,0.15)w(x,y,0.15) (first column) and density ρ(x,y,0.15)\rho(x,y,0.15) (second column) with the corresponding meshes (third column).
Refer to caption
(a) Uniform mesh 2×100×1002\times 100\times 100.
Refer to caption
(b) Uniform mesh 2×200×2002\times 200\times 200.
Refer to caption
(c) Adaptive mesh with =1\mathcal{M}=1.
Refer to caption
(d) Adaptive mesh with =2\mathcal{M}=2.
Figure 5.10: Example 3: 3-D plots of computational water surface w(x,y,0.15)w(x,y,0.15) (left column) and density ρ(x,y,0.15)\rho(x,y,0.15) (right column).

Finally, we compute the L1L^{1}-errors in Table 5.7 and the CPU ratio in Table 5.8 by using the adaptive scheme and using the central-upwind method without the mesh generation. By comparing the results presented in Tables 5.7 and 5.8, one can easily see that at a reduced computational cost, the proposed adaptive central-upwind method is still able to obtain the accurate solutions for this example. In our experiments, we considered only =1\mathcal{M}=1 and =2\mathcal{M}=2, but to further enhance the accuracy of the numerical solution at the lower computational cost, one can consider higher levels of refinement.

algorithm without adaptivity adaptive algorithm
one level =1\mathcal{M}=1 two levels =2\mathcal{M}=2
cells L1L^{1}-error rate cells L1L^{1}-error rate cells L1L^{1}-error rate
2×100×1002\times 100\times 100 0.0155 12,164 0.0145 8,994 0.0166
2×200×2002\times 200\times 200 0.0074 1.07 40,814 0.0074 0.97 30,263 0.0071 1.23
2×400×4002\times 400\times 400 0.0027 1.45 148,473 0.0028 1.40 87,214 0.0028 1.34
Table 5.7: Example 3: L1L^{1}-errors of the water surface ww at t=0.15t=0.15, and the convergence rates of the central-upwind scheme without adaptivity (uniform mesh 2×N×N,N=100,200,4002\times N\times N,N=100,200,400) and the adaptive scheme (the corresponding adaptive mesh is reconstructed from the uniform mesh 2×N/2×N/22\times N/2^{\mathcal{M}}\times N/2^{\mathcal{M}}).
uniform mesh adaptive mesh =1\mathcal{M}=1 CPU\mathcal{R}_{CPU} with =1\mathcal{M}=1 adaptive mesh =2\mathcal{M}=2 CPU\mathcal{R}_{CPU} with =2\mathcal{M}=2
(cells) (cells) total without grid generation (cells) total without grid generation
2×100×1002\times 100\times 100 12,164 1.75 1.98 8,994 2.69 2.87
2×200×2002\times 200\times 200 40,814 2.71 3.14 30,263 3.57 3.86
2×400×4002\times 400\times 400 148,473 2.86 3.38 87,214 4.60 5.03
CPU\mathcal{R}_{CPU} average: 2.44 2.83 3.62 3.92
Table 5.8: Example 3: CPU\mathcal{R}_{CPU} ratio at t=0.15t=0.15, where for adaptive central-upwind scheme, we consider the total CPU times and CPU times without the grid generation.

6 Conclusion

We have developed a new adaptive well-balanced and positivity preserving central-upwind scheme on unstructured traingular meshes for shallow water equations with variable density. The scheme is designed as an extension the scheme in [13] by utilizing the interface tracking method in [9] and the interface reconstruction in [15]. The proposed scheme is capable to preserve the steady state solutions (1.2) and (1.3) and prevent the oscillation at the density jumps. In addition, to achieve an efficient strategy for the adaptive mesh reconstruction, we also obtain a robust local error indicator. We performed several challenging numerical tests for multi-fluid models and we demonstrated that the new adaptive central-upwind scheme maintains well-balanced and positivity-preserving properties and obtains high-accuracy at a reduced computational cost.

Acknowledgements

I would like to sincerely thank my advisor, Prof. Yekaterina Epshteyn, for her suggestion of the problem to investigate, her encouragement and help. The proposed approach in this paper is an extension of the adaptive method developed in [13] which is my joint work with her. Without her support, this work would not have started, progressed, or ended.

References

  • [1] D. S. Balsara, M. Dumbser, and R. Abgrall, Multidimensional hllc riemann solver for unstructured meshes–with application to euler and mhd flows, Journal of Computational Physics, 261 (2014), pp. 172–208.
  • [2] A. Bollermann, G. Chen, A. Kurganov, and S. Noelle, A well-balanced reconstruction of wet/dry fronts for the shallow water equations, J. Sci. Comput., 56 (2013), pp. 267–290.
  • [3] S. Bryson, Y. Epshteyn, A. Kurganov, and G. Petrova, Central Upwind Scheme on Triangular Grids for the Saint Venant System of Shallow Water Equations, AIP Conference Proceedings, 1389 (2011), pp. 686–689.
  • [4] S. Bryson, Y. Epshteyn, A. Kurganov, and G. Petrova, Well-balanced positivity preserving central-upwind scheme on triangular grids for the Saint-Venant system, ESAIM Math. Model. Numer. Anal., 45 (2011), pp. 423–446.
  • [5] S. Bryson and D. Levy, Balanced central schemes for the shallow water equations on unstructured grids, SIAM J. Sci. Comput., 27 (2005), pp. 532–552 (electronic).
  • [6] A. Chertock, Y. Epshteyn, H. Hu, and A. Kurganov, High-order positivity-preserving hybrid finite-volume-finite-difference methods for chemotaxis systems, Adv. Comput. Math., 44 (2018), pp. 327–350.
  • [7] A. Chertock, K. Fellner, A. Kurganov, A. Lorz, and P. A. Markowich, Sinking, merging and stationary plumes in a coupled chemotaxis-fluid model: a high-resolution numerical approach, Journal of Fluid Mechanics, 694 (2012), pp. 155–190.
  • [8] A. Chertock, A. Kurganov, and Y. Liu, Central-upwind schemes for the system of shallow water equations with horizontal temperature gradients, Numer. Math., 127 (2014), pp. 595–639.
  • [9]  , Central-upwind schemes for the system of shallow water equations with horizontal temperature gradients, Numerische Mathematik, 127 (2014), pp. 595–639.
  • [10] P. J. Dellar, Common hamiltonian structure of the shallow water equations with horizontal temperature gradients and magnetic fields, Physics of Fluids, 15 (2003), pp. 292–297.
  • [11] M. O. Domingues, S. M. Gomes, O. Roussel, and K. Schneider, An adaptive multiresolution scheme with local time stepping for evolutionary pdes, Journal of Computational Physics, 227 (2008), pp. 3758–3780.
  • [12] R. Donat, M. Martí, A. Martínez-Gavara, and P. Mulet, Well-balanced adaptive mesh refinement for shallow water flows, Journal of Computational Physics, 257 (2014), pp. 937–953.
  • [13] Y. Epshteyn and T. Nguyen, Adaptive central-upwind scheme on triangular grids for the saint-venant system, arXiv preprint arXiv:2011.06143, (2020).
  • [14] M. A. Ghazizadeh and A. Mohammadian, An adaptive central-upwind scheme on quadtree grids for variable density shallow water equations, arXiv preprint arXiv:2008.02111, (2020).
  • [15] M. A. Ghazizadeh, A. Mohammadian, and A. Kurganov, An adaptive well-balanced positivity preserving central-upwind scheme on quadtree grids for shallow water equations, Computers &\& Fluids, 208 (2020), p. 104633.
  • [16] S. Gottlieb, C.-W. Shu, and E. Tadmor, Strong stability-preserving high-order time discretization methods, SIAM Rev., 43 (2001), pp. 89–112.
  • [17] C. W. Hirt and B. D. Nichols, Volume of fluid (vof) method for the dynamics of free boundaries, Journal of computational physics, 39 (1981), pp. 201–225.
  • [18] S. Karni and A. Kurganov, Local error analysis for approximate solutions of hyperbolic conservation laws, Adv. Comput. Math., 22 (2005), pp. 79–99.
  • [19] A. Kurganov, Finite-volume schemes for shallow-water equations, Acta Numerica, 27 (2018), pp. 289–351.
  • [20] A. Kurganov and D. Levy, Central-upwind schemes for the Saint-Venant system, M2AN Math. Model. Numer. Anal., 36 (2002), pp. 397–425.
  • [21] A. Kurganov and C.-T. Lin, On the reduction of numerical dissipation in central-upwind schemes, Commun. Comput. Phys, 2 (2007), pp. 141–163.
  • [22] A. Kurganov and Y. Liu, New adaptive artificial viscosity method for hyperbolic systems of conservation laws, J. Comput. Phys., 231 (2012), pp. 8114–8132.
  • [23] A. Kurganov and J. Miller, Central-upwind scheme for Savage-Hutter type model of submarine landslides and generated tsunami waves, Comput. Methods Appl. Math., 14 (2014), pp. 177–201.
  • [24] A. Kurganov, S. Noelle, and G. Petrova, Semi-discrete central-upwind schemes for hyperbolic conservation laws and Hamilton-Jacobi equations, SIAM J. Sci. Comput., 23 (2001), pp. 707–740.
  • [25] A. Kurganov, S. Noelle, and G. Petrova, Semidiscrete central-upwind schemes for hyperbolic conservation laws and hamilton–jacobi equations, SIAM Journal on Scientific Computing, 23 (2001), pp. 707–740.
  • [26] A. Kurganov and G. Petrova, Central-upwind schemes on triangular grids for hyperbolic systems of conservation laws, Numer. Methods Partial Differential Equations, 21 (2005), pp. 536–552.
  • [27] A. Kurganov and G. Petrova, A second-order well-balanced positivity preserving scheme for the Saint-Venant system, Commun. Math. Sci., 5 (2007), pp. 133–160.
  • [28] A. Kurganov and E. Tadmor, New high-resolution semi-discrete central schemes for Hamilton-Jacobi equations, J. Comput. Phys., 160 (2000), pp. 720–742.
  • [29] X. Liu, J. Albright, Y. Epshteyn, and A. Kurganov, Well-balanced positivity preserving central-upwind scheme with a novel wet/dry reconstruction on triangular grids for the Saint-Venant system, Journal of Computational Physics, 374 (2018), pp. 213 – 236.
  • [30] M. Moreira Lopes, M. O. Domingues, K. Schneider, and O. Mendes, Local time-stepping for adaptive multiresolution using natural extension of runge–kutta methods, Journal of Computational Physics, 382 (2019), pp. 291 – 318.
  • [31] S. Osher and R. P. Fedkiw, Level set methods: an overview and some recent results, Journal of Computational physics, 169 (2001), pp. 463–502.
  • [32] T. Qin, C.-W. Shu, and Y. Yang, Bound-preserving discontinuous galerkin methods for relativistic hydrodynamics, Journal of Computational Physics, 315 (2016), pp. 323–347.
  • [33] W. Rider and D. Kothe, Stretching and tearing interface tracking methods, in 12th computational fluid dynamics conference, 1995, p. 1717.
  • [34] W. J. Rider and D. B. Kothe, Reconstructing volume tracking, Journal of computational physics, 141 (1998), pp. 112–152.
  • [35] P. Ripa, Conservation laws for primitive equations models with inhomogeneous layers, Geophysical & Astrophysical Fluid Dynamics, 70 (1993), pp. 85–111.
  • [36]  , On improving a one-layer ocean model with thermodynamics, Journal of Fluid Mechanics, 303 (1995), pp. 169–201.
  • [37] M. L. Sæ tra, A. R. Brodtkorb, and K.-A. Lie, Efficient GPU-implementation of adaptive mesh refinement for the shallow-water equations, J. Sci. Comput., 63 (2015), pp. 23–48.
  • [38] J. A. Sethian and P. Smereka, Level set methods for fluid interfaces, Annual review of fluid mechanics, 35 (2003), pp. 341–372.
  • [39] H. Shirkhani, A. Mohammadian, O. Seidou, and A. Kurganov, A well-balanced positivity-preserving central-upwind scheme for shallow water equations on unstructured quadrilateral grids, Comput. & Fluids, 126 (2016), pp. 25–40.
  • [40] E. Tadmor, Local error estimates for discontinuous solutions of nonlinear hyperbolic equations, SIAM J. Numer. Anal., 28 (1991), pp. 891–906.
  • [41] G. Tryggvason, B. Bunner, A. Esmaeeli, D. Juric, N. Al-Rawahi, W. Tauber, J. Han, S. Nas, and Y.-J. Jan, A front-tracking method for the computations of multiphase flow, Journal of computational physics, 169 (2001), pp. 708–759.
  • [42] S. O. Unverdi and G. Tryggvason, A front-tracking method for viscous, incompressible, multi-fluid flows, Journal of computational physics, 100 (1992), pp. 25–37.
  • [43] Y. Xing and X. Zhang, Positivity-preserving well-balanced discontinuous galerkin methods for the shallow water equations on unstructured triangular meshes, Journal of Scientific Computing, 57 (2013), pp. 19–41.
  • [44] X. Yang and A. J. James, Analytic relations for reconstructing piecewise linear interfaces in triangular and tetrahedral grids, Journal of computational physics, 214 (2006), pp. 41–54.
  • [45] X. Yang, A. J. James, J. Lowengrub, X. Zheng, and V. Cristini, An adaptive coupled level-set/volume-of-fluid interface capturing method for unstructured triangular grids, Journal of Computational Physics, 217 (2006), pp. 364–394.