Keywords

1 Introduction

Unsteady incompressible viscous flows use in their modelling the Navier-Stokes equations with the property that the convective terms are distinctly more dominant than the diffusive terms especially when the Reynolds numbers reach high values. At high Reynolds numbers, the convective term is known to be a source of computational difficulties and nonphysical oscillations. In addition, sharp fronts, shocks, vortex shedding and boundary layers are among other difficulties that most Eulerian finite element methods fail to resolve accurately. In general, Eulerian finite element methods employ fixed meshes along with some upstream weightings in their formulations to stabilize the discretization. Examples of Eulerian finite element methods include the Petrov-Galerkin, streamline diffusion, discontinuous Galerkin methods and also many other methods of the high-order reconstructions from computational fluid dynamics such as isogeometric analysis, see for example [1, 2, 5, 13, 14, 21, 23]. However, the main drawback of these methods for solving the convection-dominated problems is the stability conditions which impose a severe restriction on the size of the time steps taken in the numerical simulations. Lagrange-Galerkin finite element methods have the potential to efficiently solve convection-dominated flow problems, see for example [3, 6, 8, 22]. The main idea in these methods lies on reformulating the governing equations in terms of the Lagrangian coordinates as defined by the particle trajectories (or characteristics) associated with the problem under study. In this case, the time derivative and the advection operator are combined in a total directional derivative along the characteristics which can be integrated using a semi-Lagrangian time stepping. In [17], an \(L^2\)-projection on the finite element space is used for the evaluation of solutions at the departure points. The performance of the \(L^2\)-projection Lagrange-Galerkin finite element method has been assessed in [9, 10] for several convection-dominated problems and the incompressible Navier-Stokes equations at high Reynolds numbers. Comparisons between the conventional and the \(L^2\)-projection Lagrange-Galerkin finite element methods have also reported in these references and the \(L^2\)-projection has demonstrated higher accuracy and stronger stability than the conventional method. However, for practical applications in the incompressible viscous flows, these methods may become computationally very demanding due to the dense quadratures required for the \(L^2\) projection.

The objective of the present work is to develop a class of multilevel adaptive Lagrange-Galerkin finite element methods for the numerical solution of incompressible Navier-Stokes equations. The advantage of this approach is the use of multiple quadratures in the \(L^2\)-projection in the numerical solution. This yields considerable efficiency gains to be made since the matrix in the linear system is fixed and reused throughout the time stepping procedure. One other objective is also to implement a multilevel adaptive algorithm for enrichments using the gradient of the velocity field as an error indicator. In contrast to the gradient-based h-adaptive finite element methods as those investigated in [1, 2, 2, 13, 16, 18], the linear systems in the proposed Lagrange-Galerkin finite element method keep the same structure and size at each adaptation step. Indeed, an initial coarse mesh is needed for the gradient-based h-adaptive methods to compute a primary solution for estimation of the gradient. This allows for error accumulations due to the coarse mesh used in the approximation and the computational cost becomes prohibitive due to multiple interpolations between adaptive meshes. The performance of the proposed method is assessed using several test problems for incompressible viscous flows. For various parameters like the Reynolds numbers, multilevel adaptation and mesh refinements, results of the adaptive Lagrange-Galerkin finite element method are compared with those computed using the fixed approach.

This paper is organized as follows. In Sect. 2 we present the formulation of the Lagrange-Galerkin finite element method. This section includes the implementation of the \(L^2\)-projection procedure for the convection stage. Section 3 is devoted to the development of a multilevel adaptive Lagrange-Galerkin finite element method. In this section we also discuss the criteria used for adaptation. In Sect. 4, we examine the numerical performance of the proposed method using several examples of incompressible Navier-Stokes flows. Our new approach is demonstrated to enjoy the expected efficiency as well as the accuracy. Concluding remarks are summarized in Sect. 5.

2 Enriched Lagrange-Galerkin Finite Element Method

In the present study, we are concerned with solving the incompressible Navier-Stokes equations reformulated in a dimensionless form as

$$\begin{aligned} \nabla \cdot \boldsymbol{u}= & {} 0,\nonumber \\[-1.5ex] \\[-1.5ex] \frac{D\boldsymbol{u}}{Dt} + \nabla {p} - \frac{1}{Re}\varDelta \boldsymbol{u}= & {} \mathbf {f},\nonumber \end{aligned}$$
(1)

where \(\boldsymbol{u}= (u,v)^\top \) is the velocity field, p the pressure, \(\mathbf {f}\) a source term, Re the Reynolds number and \(\frac{D\cdot }{Dt}\) the total derivative defined as

$$\begin{aligned} \frac{D\boldsymbol{u}}{Dt} := \frac{\partial \boldsymbol{u}}{\partial t} + \boldsymbol{u}\cdot \nabla \boldsymbol{u}= \mathbf {0}, \end{aligned}$$
(2)

In order to solve the incompressible Navier-Stokes Eqs. (1)–(2), the Lagrange-Galerkin finite element method solves separately at each time step, the convective part (2) then the Stokes Eqs. (1). A quasi-uniform partition \(\varOmega _h\subset \overline{\varOmega }\) composed of triangular elements \(\mathcal {K}_k\) is considered for the finite element discretization. The generated triangles are configured in such a manner, that there are no empty spaces between two elements and that they do not overlap. It is well known that, for such a problem the mixed Taylor-Hood finite elements \(P_{2}\)-\(P_{1}\) is used for the conforming finite element spaces. Furthermore, it has been shown that for this mixed formulation the discrete velocity and pressure solutions satisfy the inf-sup condition, see for instance [6]. For the time discretization, the time interval [0, T] is partitioned into a set of sub-intervals \([t_n,t_{n+1}]\) with fixed length \(\varDelta t = t_{n+1}-t_n\) for \(n\ge 0\). In the rest of this paper, the notation \(w^n_h := w(\boldsymbol{x}_h,t_n)\) is used to denote the value of a given function w at time \(t_n\) and the mesh point \(\boldsymbol{x}_h\). Using this notation, the solutions \({\boldsymbol{u}}^n({\boldsymbol{x}})\) and \(p^n({\boldsymbol{x}})\) are formulated in their associated finite element spaces as

$$\begin{aligned} {\boldsymbol{u}}_h^n({\boldsymbol{x}})=\sum _{j=1}^{M_v}{\boldsymbol{U}}_{j}^n \phi _j({\boldsymbol{x}}),\qquad p_h^n({\boldsymbol{x}})=\sum _{l=1}^{M_p}P_{l}^n\psi _{l}({\boldsymbol{x}}), \end{aligned}$$
(3)

where \(\{\phi _j\}_{j=1}^{M}\) and \(\{\psi _l\}_{l=1}^{M_p}\) are the set of the well known global nodal basis functions of the velocity and the pressure, respectively. In (3), \(M_v\) and \(M_p\) represent the number of the grid points of the velocity and pressure, respectively. Hence, the semi-Lagrangian solution of the convection problem (2) is formulated for all mesh points \(\boldsymbol{x}_j\), \(j=1,\cdots ,M_v\) as

$$\begin{aligned} \boldsymbol{U}^{n+1}_j=\boldsymbol{u}^{n+1}(\boldsymbol{x}_j)=\boldsymbol{u}^{n}(\boldsymbol{\mathcal {X}}_j^n)=: \widehat{\boldsymbol{U}}^n_j, \end{aligned}$$
(4)

where \(\boldsymbol{\mathcal {X}}^n_j=\boldsymbol{\mathcal {X}}_j(t_n)\) is the departure point defined at time \(t_n\) of a physical particle that will attain the grid point \(\boldsymbol{x}_j\) at time \(t_{n+1}\). Here, \(\boldsymbol{\mathcal {X}}_j(t)\) is the characteristic curve associated to the Eq. (2) for the mesh point \(\boldsymbol{x}_j\) which is the solution of the following backward ordinary differential equations

$$\begin{aligned} \frac{d\boldsymbol{\mathcal {X}}_j(t)}{dt}=\boldsymbol{u}(\boldsymbol{\mathcal {X}}_j(t),t), \qquad \boldsymbol{\mathcal {X}}_j(t_{n+1})=\boldsymbol{x}_j, \qquad j=1,\dots ,M_v. \end{aligned}$$
(5)

To evaluate the solution of the Eq. (5) we use a second-order extrapolation method based on the mid-point rule, details on these procedures can be found in [8, 10, 20] among others. It is worth mentioning that, the evaluated departure point \({\boldsymbol{\mathcal {X}}}_{j}^n\) does not generally match with any of the mesh points. Consequently, a search-locate algorithm is needed to allocate the mesh element \(\widehat{\mathcal {K}}_j\) where the departure point \({\boldsymbol{\mathcal {X}}}_{j}^n\) belongs, see for example [7, 10]. Thus, the finite element solution \(\widehat{\boldsymbol{U}}^n\) can be evaluated at the departure point \({\boldsymbol{\mathcal {X}}}_{j}^n\) as

$$\begin{aligned} \widehat{\boldsymbol{U}}_j^{n} := {\boldsymbol{u}}^n\left( {\boldsymbol{\mathcal {X}}}_{j}^{n}\right) = \sum _{i=1}^{N}\boldsymbol{u}^n(\widehat{\boldsymbol{x}}_i)\varphi _i\left( {\boldsymbol{\mathcal {X}}}_{hj}^{n}\right) , \end{aligned}$$
(6)

where \(\{\varphi _i\}_{i=1}^N\) are the local shape functions defined on the host element \(\widehat{\mathcal {K}}_j\), N is the number of nodes which define the velocity mesh points, and \(\{\widehat{\boldsymbol{x}}_i\}_{i=1}^N\) are the vertices of the element \(\widehat{\mathcal {K}}_j\). Using the Eqs. (4) and (6), the global solution obtained suing the conventional Lagrange-Galerkin finite element method can be expressed as

$$\begin{aligned} \boldsymbol{u}^{n+1}({\boldsymbol{x}}) = \sum _{j=1}^{M_v}\widehat{\boldsymbol{U}}_j^{n}\phi _j(\mathbf{x}). \end{aligned}$$
(7)

Note that as in most numerical methods, the accuracy of the conventional semi-Lagrangian finite element method depends on the computational mesh used in the simulations. Moreover, it has been proved in [10] that if the computational mesh is not sufficiently fine, the conventional semi-Lagrangian finite element method fails to accurately resolve the sharp gradients generated by the convective terms. In the present work, we aim to introduce local enrichments using the \(L^2-\)projection to improve the accuracy of considered the semi-Lagrangian finite element method without refining the meshes.

2.1 \(\mathbf {L}^2\)-projection for Local Enrichments

In the present section, we formulate the \(\mathrm {L}^2\)-projection presented in [9, 10] as a local enrichment technique for the convection Eq. (2). Thus, the weak formulation can be achieved by multiplying Eq. (4) by the finite element basis functions \(\phi _i\) and integrating over the domain \(\varOmega \) as

$$\begin{aligned} \int _\varOmega {\boldsymbol{u}}^{n+1}(\boldsymbol{x})\phi _i(\boldsymbol{x})d\boldsymbol{x}= \int _\varOmega {\boldsymbol{u}}^{n}\left( \boldsymbol{\mathcal {X}}^n\right) \phi _i(\boldsymbol{x})\;d\boldsymbol{x},\qquad i=1,\dots ,M. \end{aligned}$$
(8)

The weak form (8) can be expressed in a matrix-vector form as

$$\begin{aligned} \left[ \mathbf{M}\right] \left\{ {\boldsymbol{U}}^{n+1}\right\} = \left\{ \mathbf{r}^{n}\right\} , \end{aligned}$$
(9)

where \(\left[ \mathbf{M}\right] \) is the Lagrange-Galerkin finite element mass matrix with entries \(m_{ij}=\int _\varOmega \phi _j(\boldsymbol{x})\phi _i(\boldsymbol{x})d\boldsymbol{x}\), \(\boldsymbol{U}^{n+1}\) the vector of the unknown nodal values of the solution with entries \({U}_{j}^{n+1}\), and \(\mathbf{r}^{n}\) the known right-hand side with entries \(r_i^n\) defined as

$$\begin{aligned} {r}^n_i=\int _\varOmega {{\boldsymbol{u}}}^{n}\left( \boldsymbol{\mathcal {X}}^n\right) \phi _i(\boldsymbol{x})\;d\boldsymbol{x}=\sum _{k=1}^{N_e}\int _{\mathcal {K}_k}{{\boldsymbol{u}}}^{n}\left( \boldsymbol{\mathcal {X}}^n_h\right) \phi _i(\boldsymbol{x})\;d\boldsymbol{x}, \end{aligned}$$
(10)

where \(N_e\) is the total number of the mesh elements. The quadrature rule is used to evaluate the integrals \(m_{i,j}\) and \({r}_i\) as

$$\begin{aligned} m_{ij} \approx \sum _{k=1}^{N_e}\sum _{q=1}^{N_{k,Q}}\omega _{q,k}\phi _j(\boldsymbol{x}_{q,k})\phi _i(\boldsymbol{x}_{q,k}), \qquad {r}_i \approx \sum _{k=1}^{N_e}\sum _{q=1}^{N_{k,Q}} \omega _{q,k}\widehat{\boldsymbol{U}}_{q,k}^n\phi _i(\boldsymbol{x}_{q,k}) \end{aligned}$$
(11)

with \(\boldsymbol{x}_{q,k}\) are the quadrature points of the element \(\mathcal {K}_k\) and \(\omega _{q,k}\) their associated weights. Here, \(\boldsymbol{\mathcal {X}}_{q,k}^n\) are the departure points associated with \(\boldsymbol{x}_{q,k}\) computed using (5), and \(N_{k,Q}\) is the total number of quadrature points in the element \(\mathcal {K}_k\). Hence, \(\widehat{\boldsymbol{U}}^n_{q,k} = {\boldsymbol{u}}_h^{n}(\boldsymbol{\mathcal {X}}^n_{q,k})\) is the solution evaluated at the departure point \(\boldsymbol{\mathcal {X}}_{q,k}^n\) which can be evaluated according to (6) as

$$\begin{aligned} \widehat{\boldsymbol{U}}_{q,k}^n = \sum _{i=1}^{N}\boldsymbol{u}_h^n(\widehat{\boldsymbol{x}}_i)\varphi _i(\boldsymbol{\mathcal {X}}_{q,k}^n). \end{aligned}$$
(12)

The approximations in (11) can be enriched by adjusting the number of quadrature points \(N_{k,Q}\) either globally in the entire mesh or locally at each element in the computational domain. In the current work, the Dunavant quadrature rules studied in [4] are used. A distribution of Dunavant quadrature points is illustrated in Fig. 1 for \(N_{k,Q}= 6\), 12, 25, 52 and 70.

Fig. 1.
figure 1

A schematic distribution of quadrature points used in the \(\mathrm {L}^2\)-projection method for global and local enrichments.

3 Multilevel Adaptive Enrichments

In many incompressible viscous flows, the solution involves sharp gradients, localized eddies and shear layers specially when the Reynolds number attends high values. To accurately resolve these flow features, the enriched Lagrange-Galerkin finite element method introduced in Sect. 2 may require very fine meshes and high number of quadrature points particularly in regions where the solution gradients become very high. In the present work, to avoid uniform enrichment in the entire computational mesh, we propose an adaptive local enrichment to speed up the algorithm. The main idea of this adaptive technique is to refine the number of quadrature points \(N_{k,Q}\) in mesh elements where the solution gradient attends high values and unrefine otherwise according to a given criterion. In practice, to perform this adaptation one needs an error estimator or error indicator along with a given tolerance to adapt the quadrature accordingly. Gradient-based estimators have been widely used in the literature in h-adaptive finite element methods for incompressible Navier-Stokes equations, see for example [1, 2, 2, 13, 16, 18, 19, 21]. However, most of gradient-based h-adaptive algorithms employ an initial coarse mesh to compute a primary solution for estimating the gradient. As a consequence, error accumulation occurs due to the coarse mesh used in the approximation and computational cost becomes prohibitive due to multiple interpolations between adaptive meshes. In [2], the gradient of the velocity field is used as indicator for mesh adaptation to study vortex shedding in incompressible flows. The results presented demonstrate that this adaptation procedure for dynamic refinement and unrefinement is fully operational. Here, we use similar techniques and the normalized gradient of the velocity is employed as an adaptation criterion for the local enrichment of each element in the computational domain as

$$\begin{aligned} Err^{n+1}\left( \mathcal {K}_k\right) = \frac{\left\| \nabla \boldsymbol{u}^{n+1}_{\mathcal {K}_k}\right\| }{\displaystyle {\max _{j=1}^{N_e}\,\left\| \nabla \boldsymbol{u}^{n+1}_{\mathcal {K}_j}\right\| }}, \end{aligned}$$
(13)

where \(\boldsymbol{u}^{n+1}_{\mathcal {K}_k}\) is the solution on element \(\mathcal {K}_k\) at time \(t_{n+1}\) and \(\left\| \nabla \boldsymbol{u}^{n+1}_{\mathcal {K}_k}\right\| \) is the \(\mathrm {L}^2\)-norm of the gradient of \(\boldsymbol{u}^{n+1}_{\mathcal {K}_k}\) defined as

$$\begin{aligned} \left\| \nabla \boldsymbol{u}^{n+1}_{\mathcal {K}_k}\right\| = \left( \int _{\mathcal {K}_k}\nabla u^{n+1}\cdot \nabla u^{n+1}\;d\boldsymbol{x}+\int _{\mathcal {K}_k}\nabla v^{n+1}\cdot \nabla v^{n+1}\;d\boldsymbol{x}\right) ^{\frac{1}{2}}. \end{aligned}$$
(14)

Using the finite element discretization on the element \(\mathcal {K}_k\) the velocity gradient (14) can be reformulated as

$$\begin{aligned} \left\| \nabla \boldsymbol{u}^{n+1}_{\mathcal {K}_k}\right\| = \left( \left( \boldsymbol{U}^{n+1}_{\mathcal {K}_k}\right) ^\top \mathbf{S}_{\mathcal {K}_k}\boldsymbol{U}^{n+1}_{\mathcal {K}_k} + \left( \boldsymbol{V}^{n+1}_{\mathcal {K}_k}\right) ^\top \mathbf{S}_{\mathcal {K}_k}\boldsymbol{V}^{n+1}_{\mathcal {K}_k}\right) ^{\frac{1}{2}}. \end{aligned}$$
(15)

where \(\boldsymbol{U}_{\mathcal {K}_k}^{n+1} = (U_1^{n+1},\dots ,U_N^{n+1})^\top \), \(\boldsymbol{V}_{\mathcal {K}_k}^{n+1} = (V_1^{n+1},\dots ,V_N^{n+1})^\top \), and \(\mathbf{S}_{\mathcal {K}_k}\) is the elementary stiffness matrix evaluated at the element \(\mathcal {K}_k\). It should be noted that the adaptation criterion (13) is a gradient-based error indicator which is evaluated at time \(t_{n+1}\) from the known solutions at time \(t_n\) due to the backward property of the modified method of characteristics. Normalization of the error indicator is used to keep its values bounded in the interval [0, 1].

figure a

Hence, the multilevel adaptation procedure we propose in this study is performed as follows: given a sequence of three real numbers \(\{\varepsilon _m\}\) such that \(0 = \varepsilon _0< \varepsilon _1< \varepsilon _2< \varepsilon _3 < \varepsilon _4 = 1\). If an element \(\mathcal {K}_k\) satisfies the condition

$$\begin{aligned} \varepsilon _m \le Err^{n+1}\left( \mathcal {K}_k\right) \le \varepsilon _{m+1},\qquad m=0,1,2,3, \end{aligned}$$

then \(\mathcal {K}_k\) is enriched with the quadrature rule \(\left( \boldsymbol{x}_{k,q},w_{k,q}\right) \) with \(\displaystyle q=1,2\dots ,N_{k,q_m}\). Here, the values of \(\{\varepsilon _1,\varepsilon _2,\varepsilon _3\}\) can be interpreted as tolerances to be set by the user resulting into a three-level refining. Note that the number of levels m and the values of tolerances \(\{\varepsilon _m\}\) in the above adaptive enriched Lagrange-Galerkin finite element method are problem dependent and their discussions is postponed for Sect. 4 where numerical examples are discussed. The steps used in the proposed adaptive enriched Lagrange-Galerkin finite element method for solving the convection stage are summarized in Algorithm 1. Note that other adaptive criteria as those used in h-, p- and hp-adaptivity in [1, 13, 16, 18, 19] can also be implemented in our algorithm without major conceptual modifications. A posteriori error estimations as those developed in [5, 12] can also be adopted for our enriched Lagrange-Galerkin finite element methods.

4 Numerical Results

In this section we examine the accuracy of the new enriched Lagrange-Galerkin finite element method introduced in the above sections using two examples of incompressible flow problems. For the first example the analytical solution is known, so that we can evaluate the relative \(L^1\)-error and \(L^2\)-error at time \(t_n\) as

$$\begin{aligned} L^1\text {-error} = \frac{\displaystyle \int _\varOmega \bigl |\boldsymbol{u}_{h}^n - \boldsymbol{u}^n_{\mathrm {exact}}\bigr |\;d\boldsymbol{x}}{\displaystyle \int _\varOmega \bigl |\boldsymbol{u}^n_{\mathrm {exact}}\bigr |\;d\boldsymbol{x}},\qquad L^2\text {-error} = \frac{\displaystyle \left( \int _\varOmega \bigl |\boldsymbol{u}_{h}^n - \boldsymbol{u}^n_{\mathrm {exact}}\bigr |^2\;d\boldsymbol{x}\right) ^{\frac{1}{2}}}{\displaystyle \left( \int _\varOmega \bigl |\boldsymbol{u}^n_{\mathrm {exact}}\bigr |^2\;d\boldsymbol{x}\right) ^{\frac{1}{2}}}, \end{aligned}$$

where \(\boldsymbol{u}^n_{\mathrm {exact}}\) and \(\boldsymbol{u}^n_{h}\) are respectively, the exact and numerical solutions at the gridpoint \({\boldsymbol{x}}_{h}\) and time \(t_n\). In all the computations reported in this section, the resulting linear systems of algebraic equations are solved using the conjugate gradient solver with incomplete Cholesky decomposition. In addition, all stopping criteria for iterative solvers were set to \(10^{-6}\), which is small enough to guarantee that the algorithm truncation errors dominate the total numerical errors. All the computations were performed on an Intel\(^{\textregistered }\) Core(TM) i7-7500U @ 2.70 GHz with 16 GB of RAM.

4.1 Viscous Burgers Flow Problem

To evaluate the accuracy of the proposed Lagrange-Galerkin finite element approach, the coupled viscous Burgers flow problem is considered. It should be noted that, the coupled viscous Burgers system is a suitable form of the incompressible Navier-Stokes equations. Thus, we solve the following system

$$\begin{aligned} \frac{D\boldsymbol{u}}{D t} - \frac{1}{Re}\varDelta \boldsymbol{u}= \mathbf {0}, \end{aligned}$$
(16)

in the squared domain \(\varOmega = [0,1]\times [0,1]\). Initial and boundary conditions for this example are obtained from the analytical solution studied in [11]

$$\begin{aligned} u(x,y,t)=\displaystyle \frac{3}{4}-\displaystyle \frac{1}{g(x,y,t)}, \quad v(x,y,t)=\displaystyle \frac{3}{4}+\displaystyle \frac{1}{g(x,y,t)}, \end{aligned}$$
(17)

where

$$\begin{aligned} g(x,y,t) = \displaystyle 4\left( 1+\exp \left( -\frac{\displaystyle (4 x-4 y+t)Re}{32}\right) \right) \end{aligned}$$
(18)

It is wroth mentioning that only results of the component u are presented in this section, and the results of the component v are similar to those of u.

Fig. 2.
figure 2

Cross-sections at the main diagonal \(y =1-x\) of the solution u obtained for the viscous Burgers problem at time \(t = 2\) and \(Re = 10^3\) on a mesh with \(h = \frac{1}{64}\) using \(N_{k,Q}= 12\) (left) and \(N_{k,Q}= 52\) (right).

Table 1. Results for viscous Burgers problem obtained by the fixed and adaptive Lagrange-Galerkin finite element methods on a mesh with \(h = \frac{1}{128}\) using different quadratures at time \(t = 2\). The CPU times are given in seconds.

Cross-sections of the obtained results at the diagonal of equation \(y = 1-x\) are presented in Fig. 2. These results are computed on a mesh with \(h = \frac{1}{64}\) for the Reynold number \(Re = 10^3\) using two different numbers of quadratures namely, \(N_{k,Q}= 6\) and \(N_{k,Q}= 52\). It can be shown from Fig. 2 that by increasing the number of quadrature points \(N_{k,Q}\) globally or locally in the considered mesh yields to an improve in the accuracy of the results calculated using the proposed Lagrange-Galerkin finite element method with fixed or multilevel adaptive projection. From the same figure it can be clearly shown that, the conventional semi-Lagrangian finite element method suffers from an excessive numerical diffusion while the proposed Lagrange-Galerkin finite element method resolves successfully the shock.

Fig. 3.
figure 3

Computational mesh used for the flow past two circular cylinders.

For the error quantification, a comparison between the proposed fixed and adaptive Lagrange-Galerkin finite element approaches is also performed for this example. The obtained \(L^1\)-error, \(L^2\)-error and CPU times are presented in Table 1 using different numbers of quadrature points for \(Re = 100\), \(Re = 1000\) and \(Re = 10000\) at time \(t = 2\). With reference to error norms and for all selected numbers of quadrature points, both the fixed and adaptive approaches generate similar results for all considered Reynolds numbers Re. Moreover, increasing the number of quadrature points leads to a significant increase in the accuracy of the studied approaches. In terms of CPU times, it is clear from Table 1 that the CPU times of the adaptive method are lower than those of the fixed method. For example, the CPU time of the adaptive approach is about \(64\%\), \(63\%\) and \(62\%\) less than the CPU time of the fixed approach for \(Re = 100\), 1000 and \(10^4\), respectively. Note that this reduction in the CPU times becomes large using fine meshes. As expected, the adaptive enriched method is more efficient than its fixed counterpart.

Fig. 4.
figure 4

Adaptive quadrature points using single-level enrichments (first column), two-level enrichments (second column), three-level enrichments (third column) and vorticity snapshots (fourth column) for the flow past two circular cylinders at Reynolds number \(Re = 100\) and time \(t = 7.4\) (first row), \(t = 12.8\) (second row), \(t = 17.4\) (third row) and \(t = 35.7\) (fourth column). For a better visualization, red, blue and green colors are used for elements with single-level, two-level and three-level enrichments, respectively. (Color figure online)

4.2 Flow Past Two Circular Cylinders

To illustrate the performance of the proposed multilevel adaptive Lagrange-Galerkin finite element method we solve the problem of a viscous flow past two circular cylinders in a channel. A similar configuration is used in [15]. In our computations, two circular cylinders with diameter \(D = 1\) are immersed vertically in a viscous incompressible flow entering the channel with a uniform velocity \(u_\infty = 1\). The Reynolds number for this test case is defined as \(Re = Du_\infty /\nu \), with \(\nu \) is the kinematic viscosity. We perform computations with the mixed formulation \(P_2\)-\(P_1\) using the unstructured mesh composed of 4372 elements, 9063 velocity nodes and 2345 pressure nodes, see Fig. 3. The main purpose of this problem is to show the capability of the multilevel adaptive approach to accurately capture these steep gradients and vortex shedding exhibit by the numerical solutions at low computational costs. In our simulation, we consider single-level, two-level and three-level adaptive procedure using \(\varepsilon _1 = 0.065\), \(\varepsilon _2 = 0.17\) and \(\varepsilon _3 = 0.3\). Initially, the number of quadrature points is \(N_{k,Q}= 6\) in each element and we use \(N_{k,Q}= 70\) for the single-level adaptive approach, (\(N_{k,Q}= 52,N_{k,Q}= 70\)) for the two-level adaptive approach and (\(N_{k,Q}= 12, N_{k,Q}= 52, N_{k,Q}= 70\)) for the three-level adaptive approach. At time \(t = 35.7\), the total number of quadrature points used for fixed approach is 306040 whereas, the total number of quadrature points used for the single-level, the two-level and the three-level approaches are 85066, 79245 and 65751, respectively.

The distribution of quadrature points using the single-level, two-level and three-level adaptive Lagrange-Galerkin finite element methods at four different times \(t = 7,4\), 12.8, 17.4 and 35.7 and the vorticity snapshots obtained using the three-level method are presented in Fig. 4. In the distribution of quadrature points, three different colors are used to identify the mesh element with quadrature points for each level of adaptivity. Notice that the single-level and two-level methods produce results similar to those of the three-level method with different CPU time. For this reason, the vorticity results obtained using the single-level and two-level approaches are not displayed in this figure. It can be shown from Fig. 4 that the flow past two cylinders exhibits areas with large vorticity and vortex shedding. Consequentially, elements with high level of adaptivity are generated in the mesh. Moreover, the proposed Lagrange-Galerkin approach successfully captures the small complex structures of the flow and the eddies over the cylinders. This is because the proposed approach adapts the quadrature points where it is needed according to the used error indicator.

5 Concluding Remarks

A multilevel adaptive Lagrange-Galerkin finite element method is developed in this paper for efficiently solving the incompressible viscous flow problems on unstructured meshes. The proposed method combines the modified method of characteristics, the finite element method and an adaptive procedure based on \(\mathrm {L}^2\)-projection using quadrature rules. Therefore, it benefits from the advantages of all combined procedures to ensure the efficiency and the accuracy of the proposed adaptive algorithm for incompressible viscous flows. Moreover, the considered multilevel adaptive algorithm increases the number of quadrature points where it is needed according to an error indicator without refining the computational mesh during the time integration procedure. As a result and contrary to other adaptive finite element methods, the resulted linear systems in the proposed Lagrange-Galerkin finite element method preserve the same fixed structure and size during the adaptation process. The gradient of the velocity is used as feature-based error indicator for the proposed adaptation technique. We demonstrate using several numerical test examples that the proposed algorithm can capture the flow features on coarse meshes and with a significant reduction in the computational requirement. Future work will concentrate on solving coupled flow-transport and natural convection problems to simulate the transport and dispersion of pollutant in seas. The extension of the proposed multilevel adaptive Lagrange-Galerkin finite element method for the incompressible viscous flow problems in three space dimensions is also under consideration and results will published in near future.