1 Introduction

High-order simulations of unsteady incompressible turbulent flows are very challenging, especially at high Reynolds numbers (Re) and in complex geometries. Grid resolution scales as \(\frac{\eta }{L} = \big (\frac{1}{Re}\big )^{\frac{9}{4}}\), thus at high Re, the large grid sizes required, make DNS infeasible. A way to overcome this problem is via large eddy simulation (LES) and hp-adaptivity. Both these techniques require the usage of efficient high-order discretization schemes. In response to this requirement we are working on the development of high-order, hp-adaptive incompressible flow solvers for DNS and LES. In general, modern solver methods should possess several beneficial properties such as high formal order of accuracy, relatively low operation count and good parallel performance.

Spectral methods (SM) and spectral element methods (SEM) using continuous Galerkin (CG) [1] have seen widespread use for fluid flow problems, albeit on simple geometries. Although they possess remarkable accuracy, their principal failing is their instability in convection dominated flows. The discontinuous Galerkin spectral element method (DG-SEM) is a variant of SEM employing a non-conforming approximation space [2], leading to superior performance in the convection dominated regime. In addition, DG-SEM also possesses a a compact stencil, important for parallel computations wherein interprocess passes are sought to be kept to a minimum [3]. However as a general rule spectral methods are computationally expensive. hp-adaptivity seeks to overcome this problem via concentrating computational resources where they are most needed. However typically adaptivity necessitates an error estimator or refinement indicator to highlight those regions in the flow where refinement is needed. For unsteady incompressible flows there is a severe deficiency of suitable error estimators. The usage of wavelets for adaptivity and LES in incompressible flows has a rich history [4]. Thus we intend to use second generation wavelets (SGW) as a refinement indicator. The multi-resolution analysis (MRA) (constructed using SGW) of the flow field gives us information regarding the signal regularity. A local loss in regularity indicates the need for hp-refinement. Here we utilize SGW in conjunction with DG-SEM for incompressible flows. Recent work along similar lines, albeit in the compressible flow regime [5] lends credence to this approach. In this paper we first describe the variant of DG-SEM method which we use. Next we describe the wavelet basis and its applications to adaptivity. We conclude with some results.

2 Discontinuous Galerkin Method for Incompressible Flows

The incompressible Navier–Stokes equations are given as:

$$\begin{aligned} \begin{aligned} \partial _t \mathbf u - \nu \triangle \mathbf u + \nabla .\mathscr {F}(\mathbf u ) + \nabla p = f \;\; in \;\; \varOmega , \;\; t \;\; \varepsilon \;\; [0, T]\\ \nabla . \mathbf u = 0 \;\; in \;\; \varOmega , \;\; t \;\; \varepsilon \;\; [0, T]\\ \mathbf u = \mathbf g \;\; on \;\; \partial \varOmega _g, \;\; t \;\; \varepsilon \;\; [0, T]\\ (\nu \nabla \mathbf u ).\hat{n} = \mathbf h \;\; on \;\; \partial \varOmega _h, \;\; t \;\; \varepsilon \;\; [0, T]\\ \end{aligned} \end{aligned}$$
(1)

where \(\mathscr {F}(\mathbf u ) = (\mathbf u \otimes \mathbf u )\). Over the last decade there has been a proliferation of discretization techniques based on non-conforming approximation spaces. We have chosen a local discontinuous Galerkin (LDG) discretization strategy which uses \(Q_k-Q_k\) velocity-pressure approximation space (equal order) and pressure-jump stabilization for satisfaction of the inf-sup condition [2, 6, 7]. Such a method ensures the satisfaction of inf-sup condition independent of the grid. It also offers the additional benefit of allowing all velocity components and pressure to be hosted at the same element node in a nodal DG setting, greatly simplifying the construction of the code and removing the need for costly interpolations. This property also dovetails rather nicely with the SGW transform which acts upon the element degrees of freedom as will be seen in Sect. 3.

We briefly present the details of the LDG discretisation. The domain (\(\varOmega \)) is first partitioned into elements \(\varOmega = \bigcup _j \mathbf T _j \). The collection of these element forms the mesh \(\mathbb {T} = \{ \mathbf T \}\). The boundaries of the domain are denoted as \(\partial \varOmega \) while element boundaries are denoted by \(\partial \mathbf T \). Let \(\mathbf T _1\) and \(\mathbf T _2\) be two adjacent elements. We define an interface as \(\textit{F}^i = \partial \mathbf T _{1} \cap \partial \mathbf T _{2}\). Similarly a boundary face is defined by \(\textit{F}^b = \partial \mathbf T \cap \partial \varOmega \). The set of all faces is defined by \(\mathbb {F} = \{ \textit{F}^i \cup \textit{F}^b \}\). Each face has an associated length scale denoted as \(h_\mathbf F \).

At the faces, the following definitions are needed. Let u be a piecewise-smooth scalar variable. The trace of u along the interface of two elements \(\mathbf T _1\) and \(\mathbf T _2\) is denoted as \(u|_{\partial \mathbf T _1}\) and \(u|_{\partial \mathbf T _2}\) respectively. Then \(\llbracket u \rrbracket = ( u|_{\partial \mathbf T _1} - u|_{\partial \mathbf T _2} ) \) represent the jump across the interface. Furthermore \( \{\{ u \}\} = \frac{1}{2}( u|_{\partial \mathbf T _1} + u|_{\partial \mathbf T _2} )\) represents the average along the interface. For a piecewise-smooth vector variable u we can define a jump across the interface as \(\llbracket \mathbf u \rrbracket = (\mathbf u |_{\partial \mathbf T _1}.\hat{{n}} - \mathbf u |_{\partial \mathbf T _2}.\hat{{n}})\), where \(\hat{{n}}\) is the unit normal to the interface, while the average is defined as \(\{\{ \mathbf{u } \}\}=\frac{1}{2}(\mathbf{u }|_{\partial \mathbf{T }_1}.{\hat{{n}}} + \mathbf{u }|_{\partial \mathbf{T }_2}.{\hat{{n}}})\).

We equip each element with an appropriate local polynomial space, of maximum degree k in each variable, denoted as \(Q_k(\mathbf{T })\). Then we define the following broken polynomial spaces for velocity and pressure:

$$\begin{aligned} \begin{aligned} V_h({\mathbb {T}}) = \{ \mathbf v \; \varepsilon \; [L^2( \varOmega )]^d \; | \; \mathbf v |_\mathbf{T }\; \varepsilon \; [Q_k]^d(\mathbf T ), \; \forall \; \mathbf T \; \varepsilon \; \mathbb {T} \} \\ Q_h({\mathbb {T}}) = \{ q \; \varepsilon \; L^2( \varOmega ) \; | \; q|_\mathbf{T }\; \varepsilon \; Q_k(\mathbf T ), \; \forall \; \mathbf T \; \varepsilon \; \mathbb {T} \} \\ \end{aligned} \end{aligned}$$

where d is the dimension. Thus the weak form of the LDG discretisation of Eq. 1 is given as: \(\{{\mathbf {u}}_h,p_h\}\,{\varepsilon }\, \{V_h,Q_h\}\) such that

$$\begin{aligned} \begin{aligned} \partial _t (\mathbf v _h, \mathbf u _h) + \nu {a}_h^{sip}(\mathbf v _{h}, \mathbf u _{h}) + \mathscr {A}_h^{nl}(\mathbf v _h, \mathbf u _h) + {b}_h(p_h, \mathbf v _h) - {b}_h(q_h, \mathbf u _h) + s_h(q_h,p_h)\\ = (\mathbf v _h,f) + G_h(\mathbf v _h)\\ \end{aligned} \end{aligned}$$
(2)

is satisfied \(\forall \, \{{\mathbf {v}}_h,q_h\}\, \varepsilon \, \{V_h,Q_h\}\). In Eq. 2, \(a^{sip}_h\) represents the symmetric interior penalty (SIP) bilinear form of the viscous term, given by:

$$\begin{aligned} \begin{aligned} {a}^{sip}_h(\mathbf v _h,\mathbf u _h) = \sum _\mathbf{T \varepsilon \mathbb {T}} \int _\mathbf{T } \nabla _h \mathbf v _h:\nabla _h \mathbf u _h d\mathbf x -\sum _\mathbf{F \varepsilon \mathbb {F}}\int _\mathbf{F }\{\{(\nabla _h \mathbf u _h).\hat{n}\}\} .\llbracket \mathbf v _h \rrbracket d\mathbf s \\ - \sum _\mathbf{F \varepsilon \mathbb {F}} \int _\mathbf{F }\{\{(\nabla _h \mathbf v _h).\hat{n}\}\} .\llbracket \mathbf u _h \rrbracket d\mathbf s + \sum _\mathbf{F \varepsilon \mathbb {F}} \frac{\eta }{h_\mathbf F }\int _\mathbf{F } \llbracket \mathbf v _h \rrbracket . \llbracket \mathbf u _h \rrbracket d\mathbf s \\ \end{aligned} \end{aligned}$$

where \(\eta \) represents the penalty parameter. \(\mathscr {A}_h^{nl}(\mathbf v _h,\mathbf u _h)\) represents the weak form of the non-linear term, given by:

$$\begin{aligned} \begin{aligned} \mathscr {A}^{nl}(\mathbf v _h, \mathbf u _h) = - \sum _\mathbf{T \varepsilon \mathbb {T}} \int _\mathbf{T } \nabla _h \mathbf v _h: \mathscr {F}(\mathbf u _h) d\mathbf x + \sum _\mathbf{F \varepsilon \mathbb {F}} \int _{\partial T} \mathscr {F}^N(\mathbf u ^+_h,\mathbf u ^-_h). \llbracket \mathbf v _h \rrbracket d\mathbf s \\ \end{aligned} \end{aligned}$$

with \(\mathscr {F}^N(\mathbf u ^+_h,\mathbf u ^-_h)\) as a central numerical flux given by:

$$\begin{aligned} \mathscr {F}^N(\mathbf u _h) = \frac{ \mathscr {F}(\mathbf u ^-_h).{\hat{n}} + \mathscr {F}(\mathbf u ^+_h).{\hat{n}} }{2} \end{aligned}$$

and:

$$\begin{aligned} \mathbf u ^-_h = \left\{ \begin{array}{cc} \mathbf u _h|_{\partial \mathbf T _1} &{} in \;\; \mathbf F \; \varepsilon \; {F}^i \\ \mathbf u _h|_{\partial \mathbf T } &{} in \;\; \mathbf F \; \varepsilon \; {F}^b_g\\ \end{array}\right. \;\;\;\; \mathbf u ^+_h = \left\{ \begin{array}{cc} \mathbf u _h|_{\partial \mathbf T _2} &{} in \;\; \mathbf F \; \varepsilon \; {F}^i \\ \mathbf g &{} in \;\; \mathbf F \; \varepsilon \; {F}^b_g\\ \end{array}\right. \end{aligned}$$

In Eq. 2, \({b}_h\) is the bilinear form for the pressure and divergence operators given by:

$$\begin{aligned} {b}^{div}_h({\mathbf {v}}_h, q_h) = \sum _{{\mathbf {T}}\in \mathbb {T}}\int _{{\mathbf {T}}} {\mathbf {v}}_h. \nabla _h q_h d{\mathbf {x}} - \sum _{{\mathbf {F}} \in {F}^i} \int _{{\mathbf {F}}} \{\{{\mathbf {v}}_h.\hat{n}\}\}\llbracket q_h\rrbracket d{\mathbf {s}} \end{aligned}$$

\(S_h(q_h,p_h)\) is the pressure-jump stabilization bilinear form given by:

$$\begin{aligned} \begin{aligned} S_h(q_h,p_h) = \sum _\mathbf{F \varepsilon \mathbb {F}^i} \frac{h_\mathbf F }{\nu }\int _\mathbf{F }\llbracket q_h\rrbracket \llbracket p_h\rrbracket d\mathbf s \end{aligned} \end{aligned}$$

and finally \(G_h(\mathbf v _h)\), containing the boundary terms, is given by:

$$\begin{aligned} \begin{aligned} G_h(\mathbf v _h) = \sum _\mathbf{F \varepsilon {F}^b_h} \int _\mathbf{F } \mathbf v _h.\mathbf h d\mathbf s - \sum _\mathbf{F \varepsilon {F}^b_g} \int _\mathbf{F } \big ( \nu \; \mathbf g . (\nabla _h \mathbf v _h).\hat{n} + \nu \; \frac{\eta }{h_\mathbf F } \mathbf v _h. \mathbf g + q_h \mathbf g .\hat{n} \big ) d\mathbf s \end{aligned} \end{aligned}$$

The temporal discretisation is performed via classical second order pressure correction techniques detailed in [2, 8].

3 Second Generation Wavelets (SGW), Multi-resolution Analysis (MRA) and Adaptivity

In principle the decay of coefficients of an approximating polynomial series is linked directly to the regularity of the target function. As an example, the projection of a target function onto a Fourier basis provides data about which frequencies contribute the most energy. However modal bases (like Fourier) are typically well localized in frequency space and poorly localized in physical space, making it impossible to determine where in space to refine to better capture the signal.

A solution to this problem is to use a wavelet basis, one which is well localized in both space and frequency. Wavelet bases may be used to construct a hierarchy of space-frequency windows each with its own space-frequency range. This construction is called a multi-resolution analysis (MRA). By projecting a target function upon an MRA and by then examining the coefficients within each space-frequency tile we can refine in exactly the correct spatial location as the signal demands. In this work we will use a second generation wavelet (SGW) basis [9], one which can be built directly in physical space and upon bounded domains.

The MRA denoted by M, is the partitioning of the function space \(L^2(R)\), by a sequence of nested closed subspaces \(V_j\), called scaling function space, such that \(\mathbf M = \{V_j \subset L^2(R) \; | \; j \; \varepsilon \; \mathbb {J} \subset Z \}\). This set of subspaces must satisfy the following properties:

  1. 1.

    Nestedness of spaces:

    $$\begin{aligned} \begin{aligned} \small V_{-\infty }\subset ... V_{-2} \subset V_{-1} \subset V_0 \subset V_1 \subset V_2 ... \subset V_j \subset V_{j+1} \subset ... V_{+\infty } \;\;\; j \; \varepsilon \; {Z} \end{aligned} \end{aligned}$$

    with resolution increasing towards continuum as \(j \rightarrow \infty \).

  2. 2.

    Closure of \(L^2(R)\):

    $$\begin{aligned} \overline{\bigcup _j V_j }= L^2(R) \;\;\; j \; \varepsilon \; {Z} \end{aligned}$$
  3. 3.

    For each \(j \; \varepsilon \; \mathbb {J}\), \(V_j\) has a Riesz basis given by scaling functions \(\{\phi ^j_k \; | \; k \; \varepsilon \; \mathbb {K}(j)\}\). \(\mathbb {K}(j)\) is an index set such that \(\mathbb {K}(j) \subset \mathbb {K}(j+1)\). We may consider two cases for the index set \(\mathbb {J}\):

    1. a.

      \(\mathbb {J} = N\). In such a case the coarsest level exists and is \(V_0\).

    2. b.

      \(\mathbb {J} = Z\). This is a bi-infinite setting.

We now define the wavelet space, denoted by \(W_j\). A set of functions \(\{ \psi ^j_m \; | \; j \; \varepsilon \; \mathbb {J}, \; m \; \varepsilon \; \mathbb {M}(j) \; | \; \mathbb {M}(j) = \mathbb {K}(j+1) / \mathbb {K}(j)\}\), are the basis functions of the space \(W_j\) and are called wavelets. The wavelets and the spaces which they span must satisfy the following properties:

  1. 1.

    The space \(W_j\) is the complement space of \(V_j\) in \(V_{j+1}\) i.e. \(V_{j+1} = V_j \oplus W_j\)

  2. 2.

    The wavelet space is complete:

    $$\begin{aligned} \overline{\bigcup _j W_j} = L^2(R) \;\;\; j \; \varepsilon \; {Z} \end{aligned}$$
  3. 3.
    1. a.

      if \(\mathbb {J} = {N}\). Then the set \(\{\psi ^j_m/||\psi ^j_m \; ||, \; j \; \varepsilon \; \mathbb {J}, \; m \; \varepsilon \; \mathbb {M}(j) \} \bigcup \{ \phi ^0_k/||\phi ^0_k \; ||, \; k \; \varepsilon \; \mathbb {K}(0) \}\) is a Riesz basis for \(L^2(R)\)

    2. b.

      if \(\mathbb {J} = {Z}\). Then the set \(\{\psi ^j_m /||\psi ^j_m \; ||, \; j \; \varepsilon \; \mathbb {J},\; m \; \varepsilon \; \mathbb {M}(j) \}\) is a Riesz basis for \(L^2(R)\)

We now define the dual MRA \(\tilde{\mathbf{M }} = \{\tilde{V}_j \subset L^2(R) \; | \; j \; \varepsilon \; \mathbb {J} \subset Z \}\). The space \(\tilde{V}_j\) is termed as dual scaling function space and it is spanned by the dual scaling functions denoted as \(\tilde{\phi }^j_k\). Similarly we define a dual wavelet space denoted by \(\tilde{W}_j\) with basis functions as dual wavelets denoted as \(\tilde{\psi }^j_m\). The space \(\tilde{W}_j\) is the complement to the space \(\tilde{V}_j\).

Consider a function \(f(x)\;\varepsilon \; L^2(R)\). We denote \(P_j\) as the projection operator onto the space \(V_j\). We define the scaling function coefficient as \(s^j_k=(f,\tilde{\phi }^j_k)\). Similarly let \(Q_j\) be the projection operator onto \(W_j\). We define the wavelet coefficient as \(d^j_m = (f,\tilde{\psi }^j_m)\). Thus we have the following series representation:

$$\begin{aligned} P_jf(x) = \sum _{k\varepsilon \mathbb {K}(j)}s^j_k\phi ^j_k \;\;\;\;\; Q_jf(x) = \sum _{m\varepsilon \mathbb {M}(j)}d^j_m\psi ^j_m \end{aligned}$$

For computational purposes spatial localization is extremely important, as it directly influences the computational stencil, which in turn dominates parallel performance. Thus we utilize the SGW basis functions element wise in a DG-SEM discretisation. Thus a signal over the elements may be represented as:

$$\begin{aligned} f(x) \simeq P_Jf(x) = \sum _{\mathbb {T}}\big ( \sum _k s^0_k\phi ^0_k+ \sum ^{J-1}_{j=0}\sum _m d^j_m\psi ^j_m\big ) \end{aligned}$$

Using this description of a function, we can now describe the adaptive algorithm based upon the wavelets. We begin by constructing a coarse approximation space with a given number of elements. During the course of the computation the flow variables are subjected to an MRA. The scaling functions serve as low-pass filters while the wavelets serve as high-pass filters. Thus we examine the magnitude of the wavelet coefficients and compare them to a predefined threshold (\(\varepsilon \)). In the smooth regions of the flow the wavelet coefficients are predominantly zero. A proliferation of wavelet coefficients exceeding the threshold, in any region of the flow, indicates the presence of structures that contributes to the high frequencies in a spectral analysis and thus to the numerical errors. To resolve these regions better, mesh refinement is performed locally. It should be noted that this refinement indicator is completely blind to sudden jumps across the interfaces which is fortuitous as DG-SEM by its very nature produces a discontinuous solution across elements.

4 Numerical Test

The method proposed above has been implemented into an unstructured code for 2D and 3D. It has been written in C++ and uses MPI for parallel multi-domain calculations. We demonstrate the method via a classic test case—the lid driven cavity problem at \(Re=400\). DNS data for this test case is available in [10]. We perform a DG-SEM calculation on a domain discretized with \(4 \times 4\) elements, with \(Q_8\)\(Q_8\) discontinuous velocity-pressure approximation space per element, providing a total of 1, 296 degrees of freedom (G1) (Fig. 2). We then perform a single cycle of h-adaptivity based upon the MRA of the u component of the velocity to produce a geometrically non-conforming grid (G2) (Fig. 2) with 3, 969 degrees of freedom.

Fig. 1
figure 1

Streamline pattern

Fig. 2
figure 2

G1 in red, G2 in black

Fig. 3
figure 3

Comparison of centreline velocity (uv) and moving wall vorticity \(\omega _z\)

For comparison we extract the u and v velocities along the vertical and horizontal center-lines and compute the vorticity (\(\omega _z\)) along the moving wall for grids G1 and G2. These quantities are compared with the reference data. The curves in Fig. 3 clearly illustrated the benefit of the wavelet adapted grid. We see that although the u and v velocity predictions exhibit a negligible improvement the \(\omega _z\) prediction has improved dramatically particularly in the region \(0 \le x \le 0.3\). Although this test case is extremely mild it serves to demonstrate the method in its entirety and demonstrates how adaptivity may be performed in incompressible flows cheaply and effectively.

5 Conclusions

We have outlined the development of a wavelet based adaptive DG-SEM scheme for incompressible flows. The usage of DG-SEM in conjunction with the SGW appears to have a number of advantages which we have demonstrated via the lid driven cavity test case. The overall strategy is fairly unique and should prove useful for unsteady detached flows for which error estimators and refinement indicators are severely lacking. However work must be done in determining the flow variables upon which the MRA should be performed as well as the appropriate choice of the threshold. In the near future we hope to extend our approach to more challenging turbulent flow problems such as the prediction of the skin-friction coefficient in the recirculation region of the backward-facing step.