- Research
- Open access
- Published:

# The algorithmic resolution of spectral-element discretization for the time-dependent Stokes problem

*Boundary Value Problems*
**volume 2024**, Article number: 89 (2024)

## Abstract

We consider two algorithms for the resolution of the time-dependent Stokes problem with nonstandard boundary conditions by the domain-decomposition spectral-element method. The first algorithm (Elimination method) is based on the Uzawa method by decoupling the linear system, while the second algorithm (Global inversion) is based on the overall resolution of the system by the GMRES method. A detailed implementation is proposed and some numerical tests are carried out in two and three dimensions and where the domain is multiply connected.

## 1 Introduction

This paper deals with the resolution and the implementation of the spectral-element domain-decomposition method for the resolution of the following nonstationary Stokes problem:

The domain Ω of \({\mathbb{R}}^{d}, d=2\), \(d=3\), is bounded and simply connected. *∂*Ω is its connected Lipschitz continuous boundary and *T* is a positive real. \({\bf f}\), \(\nu > 0\) are the data function and the viscosity. The unknowns \({\bf v}\), *p* are the velocity of the fluid and its pressure. Let *γ* be the tangential boundary operator defined as:

• When \(d=2\): if \({\bf v}=({\bf v}_{x},{\bf v}_{y})\), \(\operatorname{curl}{\bf v}=\partial _{x} {\bf v}_{y} -\partial _{y} { \bf v}_{x}\), thus \(\gamma (\operatorname{curl}{\bf v})\) is the trace on *∂*Ω of the scalar function \(\operatorname{curl}{\bf v}\).

• When \(d=3\): if \({\bf v}=({\bf v}_{x},{\bf v}_{y},{\bf v}_{z})\), \(\operatorname{\mathbf{curl}}{\bf v}=(\partial _{y} {\bf v}_{z} -\partial _{z} { \bf v}_{y},\partial _{z} {\bf v}_{x} -\partial _{x} {\bf v}_{y}, \partial _{x} {\bf v}_{y} -\partial _{y} {\bf v}_{x})\), thus \(\gamma (\operatorname{\mathbf{curl}}{\bf v})=\operatorname{\mathbf{curl}}{\bf v}\times {\bf n}\) on the boundary *∂*Ω, × represents the cross product.

Let the new unknown \(\varpi =\operatorname{\mathbf{curl}}{\bf v}\) be called the vorticity. By the property

we prove that the system (1) is equivalent to:

In the case when the domain Ω is multiply connected the conditions

are not enough to prove the uniqueness of the velocity, see [1–3]. An explicit example was given in ([4], Chap. 3). Let \(\Sigma _{i}, 1\leq i\leq I\) be open connected curves or surfaces called “cuts” that satisfy:

• \(\Sigma _{i}, 1\leq i\leq I\) is included in Ω and \(\partial \Sigma _{i}\) is included in *∂*Ω;

• \(\Sigma _{i}\bigcap \Sigma _{j}=\emptyset \), \(1\leq i\neq j\leq I\);

• \(\Omega ^{\diamond}=\Omega {/}\big(\displaystyle \bigcup _{1}^{I} \Sigma _{i}\big)\) is a simply connected domain.

The further conditions that we needed for the uniqueness of the velocity are, for \(1\leq i\leq I\)

The initial treatment of Stokes problems, incorporating velocity and pressure formulations along with pressure-based boundary conditions, was presented in [5]. However, subsequent studies by [6, 7] and [8] demonstrated a novel approach to formulating the Stokes problem, incorporating vorticity alongside velocity and pressure as unknowns.

In [9], the authors introduced an extensive numerical investigation into the spectral-element discretization of this new formulation. They utilized the Generalized Minimal Residual method (GMRES) for implementation, given the nonsymmetric nature of the matrix involved, see [10].

In this paper, we introduce two novel algorithms designed to enhance the performance of previous approaches to solving the Stokes problem in both two and three dimensions within bounded domains, with a focus on optimizing execution time. Initially, we adapted our approach to incorporate the Elimination method like the Uzawa algorithm, as outlined in [1] and [11], by removing discrete vorticity. However, the resulting matrix exhibited severe ill-conditioning, necessitating a high number of iterations for convergence. However, the Global inversion method consists of solving the linear system using the GMRES method, so it does not need to be assembled. We also use local preconditioners: each block in the global matrix in the linear system is preconditioned by the matrix resulting from its incomplete LU factorization. Notably, as is standard in spectral methods, the tensorization properties of the polynomial spaces ensure that each product of these blocks, corresponding to the subdomain \(\Omega _{k}\), with a vector, is performed with \(cN^{d+1}\) operations, significantly reducing the cost of inversion. Consequently, we achieved notably improved accuracy with a reduced number of iterations. Experimental results unequivocally demonstrate the efficacy of these enhancements.

The structure of the paper is outlined as follows: Sect. 2 presents an exposition of the discrete problems in time and in space. Section 3 elaborates on the implementation of the spectral-element discretization for our specific problem. Section 4 is dedicated to a comprehensive description and comparison of the numerical results.

## 2 The discrete problems

We introduce the space:

as the space of velocity. Then, the variational formulation is: If \({\bf f}\in L^{2}(0,T;L^{2}(\Omega )^{d})\), find \((\varpi ,{\bf v},p) \in L^{2}(0,T;H_{0}(\operatorname{\mathbf{curl}},\Omega )) \times L^{2}(0,T;{\mathbb{K}}(\Omega ))\times L^{2}(0,T;L^{2}_{0}( \Omega ))\) such that

The bilinear forms \(a(.,.;.)\), \(b(,.,)\) and \(c(.,.;.)\) are defined as follows:

For \({\bf f}\in L^{2}(0,T;L^{2}(\Omega )^{d})\) and \({\bf v}_{0}\in {\mathbb{K}}(\Omega )\), problem (4) has a unique solution \((\varpi ,{\bf v},p)\) that belongs to \(L^{2}(0,T;H_{0}(\operatorname{\mathbf{curl}},\Omega ))\times L^{2}(0,T;{\mathbb{K}}( \Omega ))\times L^{2}(0,T;L^{2}_{0}(\Omega ))\), [12–14] such that:

For the discretization in time of problem (4) we use the implicit Euler method. We partition the interval \([0,T]\) in the subintervals \([t_{m-1},t_{m}]\), for \(1\leq m\leq M\), \(M>0\) integer such that \(0=t_{0}< t_{1}<\cdots<t_{M}=T\). Let \(\tau _{m}=t_{m}-t_{m-1}\), \(\tau =(\tau _{1},\tau _{2},\ldots,\tau _{m})\) and \(|\tau |=\displaystyle \max _{1\leq m\leq M}\tau _{m}\).

If the data functions \(({\bf f},{\bf v}_{0})\in {L^{2}(0,t;L^{2}(\Omega )^{d})}\times { \mathbb{K}}(\Omega )\), the time-discrete problem is:

Find \((\varpi ^{m})_{0\leq m\leq M}\in (H_{0}(\operatorname{\mathbf{curl}},\Omega ))^{M+1}\), \(({\bf v}^{m})_{0\leq m\leq M}\in ({\mathbb{K}}(\Omega ))^{M+1} \rm{ and } (p^{m})_{1\leq m\leq M}\in (L^{2}_{0}(\Omega ))^{m}\) such that:

and for all \(1 \leq m \leq M\), \(\quad {\bf f}^{m}={\bf f}(.,t_{m})\),

We define

The problem (5) and (6) has a unique solution, see arguments in [1].

In what follows, we subdivide the domain Ω without overlapping into a finite number of rectangles \(\Omega _{k}\) for dimension 2 or a rectangular parallelepiped for dimension 3:

We observe that the subdomain set \(\Omega _{k}\) satisfies the condition that the intersection of any two subdomains \(\bar{\Omega}_{k}\) and \(\bar{\Omega}_{l}\), where \(1 \leq k \neq l \leq K\), is either a vertex, an edge (in the case of \(d=2\)), or a face (in the case of \(d=3\)), which we identify as the cuts \(\Sigma _{i}\) defined in Sect. 2.

The discretization is performed using the spectral-element method inspired by Nèdelec cubic three-dimensional meshes ([15, Sect. 2]). We define \(\mathbb{P}{pq}(\Omega )\) (or \(\mathbb{P}{pqr}(\Omega )\)) as the polynomial space of degree *p* in the *x*-direction and *q* in the *y*-direction (and *r* in the *z*-direction). These spaces are simply denoted as \(\mathbb{P}_{n}(\Omega )\) when \(p=q=r=n\).

Building upon these definitions, and for an integer \(N \geq 2\), we introduce the local discrete spaces:

Then, the space of the discrete velocity in \(H_{0}(\operatorname{div},\Omega )\) is

The space that approximates the vorticity in \(H_{0}({\bf curl},\Omega )\) is defined as

Finally, the space in which we approximate the pressure is defined by

The functions within \({\mathbb{D}}_{N}\) exhibit a continuous normal trace across the interface \(\bar{\Omega}_{k} \cap \bar{\Omega}_{l}\). On the other hand, functions in \({\mathbb{C}}_{N}\) demonstrate a continuous trace along the interface \(\bar{\Omega}_{k} \cap \bar{\Omega}_{l}\) in two dimensions (\(d = 2\)) and a continuous tangent trace in three dimensions (\(d = 3\)). This selection ensures that our proposed discretization is entirely conforming.

Considering \(\xi _{0} = -1\) and \(\xi _{N} = 1\), we focus on the \(N-1\) Gauss–Lobatto nodes \(\xi _{i}\), where \(1 \leq i \leq N-1\), and the \(N+1\) corresponding weights \(\rho _{i}\) on the interval \([-1,1]\). These nodes \(\xi _{i}\) (for \(1 \leq i \leq N-1\)) are the roots of the derivative \(L_{N}'\) of the *N*th-degree Legendre polynomial \(L_{N}\).

Let \(\mathbb{P}_{n}(-1,1)\) denote the space of polynomials restricted to \([-1,1]\) with degrees up to *n*. Therefore, the Gauss–Lobatto quadrature formula is:

Additionally, we recall the following property (see [16]):

Let \(F_{k}\) be the affine bijection from \((-1,1)^{d}\) onto \(\Omega _{k}\). Using formula (8), we introduce the local discrete scalar product defined as follows: For continuous functions *φ* and *ψ* defined on \(\bar{\Omega}_{k}\):

The global scalar product is defined for continuous functions *φ* and *ψ* on Ω̄ as follows:

If the data function remains continuous over \(\overline{\Omega} \times [0,T]\), we derive the discrete problem from equations (10) and (11) using a combination of Galerkin’s method and numerical integration techniques.

For \({\bf v}_{N}^{0}= I_{N}({\bf v}_{0})\), and if \({\bf v}_{N}^{m-1}\) is known, find \((\varpi ^{m}_{N},{\bf v}^{m}_{N},p^{m}_{N})\) in \({\mathbb{C}_{N}}\times {\mathbb{D}}_{N}\times {\mathbb{M}}_{N}\) such that for \(1\leq m\leq M\):

where \(I_{N}\) is the Lagrange interpolating operator with values in \({\mathbb{P}}_{N}(\Omega )\). We define the discrete bilinear forms \({\mathbb{A}}_{N}(\cdot ,\cdot ;\cdot )\), \(b_{N}(\cdot ,\cdot )\), and \(c_{N}(\cdot ,\cdot ;\cdot )\) as

We assume that the data \({\bf f}\) belongs to \(L^{2}(0,T;L^{2}(\Omega )^{d})\) and \({\bf v}_{0}\) belongs to \({\mathbb{K}}(\Omega )\), problem (9) has a unique solution; \((\varpi ^{m}_{N},{\bf v}^{m}_{N},p^{m}_{N})\) belongs to \({\mathbb{C}}_{N} \times {\mathbb{D}}_{N} \times {\mathbb{M}}_{N}\). The proof of the existence and uniqueness of the solution is elaborated in [[13], Sect. 4, Theorem 4.1] and [[1], Chapter I, Lemma 4.1].

## 3 The proposed algorithms

As outlined in the introduction, we introduce two resolution algorithms aimed at improving the performance of previous approaches for solving the Stokes problem in 2D and 3D bounded domains [9], with a focus on optimizing execution time.

Next, we begin by presenting the linear system. Subsequently, we describe two algorithms: the Elimination algorithm and the Global inversion method.

### 3.1 The linear system

In order to define the matrix system of the discrete problem, we have to choose a basis of the discrete spaces \({\mathbb{C}}_{N} \), \({\mathbb{D}}_{N}\), and \({\mathbb{M}}_{N}\).

Let \(l_{i}\), \(0 \le i \le N\), denote the Lagrange polynomials in \({\mathbb{P}}_{N}(-1,1)\) associated with the nodes \(\xi _{i}\) of degree less or equal to *N* such that:

where \(\delta _{ij}\) is the Kronecker symbol. The polynomial \(l_{i}\) is defined as

Let \(i_{*}\) be an integer fixed between 0 and *N* equal to the integer part of \({\frac{N}{2}}\). We define \(I^{*}\) as the set \(\{0,\ldots ,N\} \setminus \{i^{*}\}\), and let:

Now, we describe the unknown vectors in the dimension 2 for simplicity. The vector vorticity \(W^{m}\) at the time \(t_{m}\) is constructed from:

• the value of \(\varpi ^{m}_{N}\) at the nodes \(F_{k}(\xi _{i},\xi _{j})\), \(1 \le i\), \(j \le N-1\) inside each subdomain \(\Omega _{k}\);

• the value of \(\varpi ^{m}_{N}\) at the nodes \(F_{k}(\xi _{i},\pm 1)\) or \(F_{k}(\pm 1,\xi _{j})\), \(1 \le i\), \(j \le N-1\), shared by two subdomains on each edge of the subdomain \(\Omega _{k}\) that is not contained in *∂*Ω.

We multiply the vector \(W^{m}\) by the matching matrix \(Q_{\varpi}\) leading to a vector \(\hat{W^{m}}=Q_{\varpi}W\) made of *K* blocks \(W^{m}_{k}\). The coefficients \(\varpi ^{m}_{ij}\) are the expansion of the discrete vorticity \(\varpi ^{m}_{N}\) on the subdomain \(\Omega _{k}\). Then, we have

The values of \(\varpi ^{m}_{N}\) are equal to 0 on the boundary *∂*Ω.

Likewise, we consider \(U^{m}\) the vector that corresponds to the velocity \({\bf v}^{m}_{N}=({\bf v}^{m}_{Nx},{\bf v}^{m}_{Ny})\) at the time \(t_{m}\) it is build from:

• the values of \({\bf v}^{m}_{Nx}\) at the nodes \(F_{k}(\xi _{i},\xi _{j})\), \(1 \le i\le N-1\), \(/; j\in I^{*}\), and of \({\bf v}^{m}_{Ny}\) at the nodes \(F_{k}(\xi _{i},\xi _{j})\), \(i\in I^{*}; 1 \le j\le N-1\);

• the value of \({\bf v}^{m}_{Nx}\) at the nodes \(F_{k}(\xi _{i},\pm 1)\), \(1 \le i\le N-1\), in the edges of \(\Omega _{k}\) that are parallel to the *x*-axis and the value of \({\bf v}^{m}_{Ny}\) at the nodes \(F_{k}(\pm 1,\xi _{j})\), \(1 \le j\le N-1\), in the edges of \(\Omega _{k}\) that are parallel to the *y*-axis;

• the values of \({\bf v}^{m}_{Nx}\) at the nodes of each edge that are parallel to the *y*-axis and shared by two subdomains and the values of \({\bf v}^{m}_{Ny}\) at the nodes of each edge that are parallel to the *x*-axis and shared by two subdomains;

• in order to verify the condition (3) we delete *J* values on the nodes of each \(\Sigma _{j}\).

Then, we multiply the vector \(U^{m}\) by the matching matrix \(Q_{u}\) leading to a vector \(\hat{U^{m}}=Q_{u} U^{m}\) made of *K* blocks \(U^{m}_{k}\). The components \({\bf v}^{m}_{ij}\) of \(U^{m}_{k}\) are the expansion of the discrete velocity \({\bf v}^{m}_{N}\) at the nodes of the subdomain \(\Omega _{k}\). Hence, we write

and

The value of \({\bf v}^{m}_{N}\cdot {\bf n}\) is equal to 0 on the boundary *∂*Ω.

Finally, let the *K* blocks vector \(P^{m}\) at the time \(t_{m}\) where the coefficient of each of them is made from the value of the pseudopressure \({\tilde{p}^{m}}_{N}\) at the nodes \(F_{k}(\xi _{i},\xi _{j}), \text{for} i\in I^{*} \), \(j\in I^{*}\):

The function \(\tilde{p}^{m}_{N}\) does not belong to \(L^{2}_{0}(\Omega )\); however, the real pressure \(p_{N}\) can be obtained from the formula:

We represent the discrete problem (9) as a matrix system using the bases of the vorticity, velocity, and pressure spaces. These unknowns are organized into vectors labeled *W*, *U*, and *P*, with dimensions \({\frac{d(d-1)}{2}} N_{k}^{d-2}(N_{k}-1)^{2}\), \(dN_{k}^{d-1}(N_{k}-1)\), and \(N_{k}^{d}-1\), respectively. Since the viscosity *ν* does not influence the resolution of the Stokes problem in the same way it does with the Navier–Stokes problem, we set \(\nu =1\).

If \(U^{0}=(U^{0}_{1},U^{0}_{2})\), the components of the vectors \(U^{0}_{1}\) and \(U^{0}_{2}\) are, respectively, \({\bf v}^{0}_{Nx}(\xi _{i},\xi _{j})\) and \({\bf v}^{0}_{Ny}(\xi _{i},\xi _{j})\), where \({\bf v}^{0}_{N}=({\bf v}^{0}_{Nx},{\bf v}^{0}_{Ny})\). Then, for any *m*, \(1\leq m\leq M\), since the vectors \(W^{m-1}\), \(U^{m-1}\), \(P^{m-1}\) are known we solve the following linear system that represents the discrete problem (9):

where \(X^{T}\) denotes the transposed matrix of the matrix *X*. The expression of matrices \(A= \begin{pmatrix} A_{1} \quad 0 \\ 0 \quad A_{2} \end{pmatrix} \), \(B=(B_{1},B_{2})\), and *C* are developed in ([9], Sect. 6).

Finally, for any *m*, \(1\leq m\leq M\), we denote \(F^{m}= \begin{pmatrix} F^{m}_{1} \cr F^{m}_{2} \cr 0 \end{pmatrix} \). The components of the second members \(F^{m}_{1}\) and \(F^{m}_{2}\) are, respectively, \(({\bf v}^{m-1}_{Nx},l_{r} l_{s}^{*})_{N}+\tau ^{m}(f^{m}_{1},l_{r} l_{s}^{*})_{N}, \, 1\leq r\leq N-1; s\in I^{*}\), and \(({\bf v}^{m-1}_{Ny},l_{r}^{*}l_{s})_{N}+\tau ^{m}(f^{m}_{2},l_{r}^{*}l_{s})_{N}, \, 1\leq s\leq N-1; r\in I^{*}\), where the data function \({\bf f}^{m}=(f^{m}_{1},f^{m}_{2})\).

### 3.2 Elimination algorithm

The Elimination algorithm is similar to the Uzawa algorithm, which is suitable for solving the standard Stokes problem (see [1, 11]) with only the velocity and pressure as unknowns. However, our problem involves three unknowns: velocity, pressure, and vorticity. To apply this algorithm, we eliminate the third unknown, namely vorticity. Below, we describe the steps of the resolution process.

We substitute the vorticity into the second equation of system (10), yielding:

We consider the matrix \({\tilde{A}} = [Q_{u}^{T}(A C^{-1} A^{T})Q_{u} + {\text{I}}]\), where I is the identity matrix. We decouple the two unknowns, \(U^{m}\) and \(P^{m}\). The matrix *C* is invertible since its diagonal coefficients are nonzero (see [9], Sect. 6). The second equation of system (11) is written as:

By inserting (12) into the third equation of the system (11) we obtain:

To find the discrete pressure \(P^{m}\), the linear system (13) is solved using the conjugate gradient method since the matrix \(\Big[ B^{T}(Q_{u} \tilde{A}^{-1} Q_{u}^{T}) B \Big]\) is symmetric and positive-definite. The same method is applied to system (12) to find the discrete velocity \(U^{m}\). The value of the vorticity \(W^{m}\) is then determined using the first equation of system (11).

__Elimination algorithm__

• Let \(P^{m}_{0}\) be arbitrary.

• Initialization step:

• Iterations: \(q\geq 0\)

From \(U^{m}_{q}\) and \(P^{m}_{q}\):

While implementing the Elimination algorithm, we aimed to improve the convergence time. Unfortunately, convergence was achieved only after many iterations (hundreds of iterations for an error of order 10^{−7}, as shown in Table 1 and Fig. 2. This is primarily due to the matrix *Ã* being very poorly conditioned. Therefore, we propose solving the problem using a Global inversion approach.

### 3.3 Resolution by a global inversion

In the Global resolution, we propose to maintain the vorticity in the system (11) and invert the Global matrix:

The choice of system (14), which relies on multiplication by Q-type matrices, ensures that the matrices *A*, *B*, and *C* are fully block-diagonal, with each block corresponding to one subdomain \(\omega _{k}\). In the following, system (14) is solved using the GMRES method, so it does not need to be assembled. We also use local preconditioners: each block in the Global matrix in (14) is preconditioned by the matrix resulting from its incomplete LU factorization. Notably, as is standard in spectral methods, the tensorization properties of the polynomial spaces ensure that each product of these blocks, corresponding to the subdomain \(\Omega _{k}\), with a vector, is performed with \(cN^{d+1}\) operations, significantly reducing the cost of inversion.

Convergence is achieved in fewer than 20 iterations for a relative error of approximately 10^{−19} (see Table 2 and Fig. 1). This excellent result was unattainable with the Elimination algorithm, as shown in Table 1.

## 4 Numerical results

### 4.1 Two-dimensional experiments

In this section, first, we focus on the time convergence. We consider the square \(\Omega = {]-1,1[^{2}}\). We look at a given solution obtained thanks to the formulas \({\bf v}= {\bf curl}\,\psi \) and \(\varpi = {\bf curl}\,{\bf v}\).

The functions *ψ* and *p* are defined by

The velocity is a Gaussian that is null for \(t = 0\). We consider the spectral discrete parameter \(N=40\), \(T=1\) and the time steps \(\tau \in \{10^{-1},10^{-2},10^{-3},10^{-4},10^{-5},10^{-6}\}\). Figure 1 presents the curves of time convergence for the three terms \(\log \|\varpi -\varpi ^{m}_{N} \|_{H(\operatorname{\mathbf{curl}},\Omega )}\) (in red), \(\log \|{\bf v}-{\bf v}^{m}_{N}\|_{H(\operatorname{div},\Omega )}\) (in blue), and \(\log \|p-p^{m}_{N}\|_{L^{2}(\Omega )}\) (in green) as a function of \(\log (\tau )\). We note that the time-convergence order is almost equal to 1.

Hereinafter, we consider \(\tau =10^{-6}\) and \(T=1\),

As a first step, we proceed with a Bercovier–Engelman analytical solution (see [17]) within the square \(\Omega = ]-1,1[^{2}\). This test is about the solution \((\varpi ^{m},{\bf v}^{m},p^{m})\) at the time \(t_{m}\) of the Stokes problem. This solution is equal to:

Figure 2 presents the error curves on the solution \((\varpi ^{m},{\bf v}^{m},p^{m})\) for *N* varying from 5 to 20 issued from the solution defined in (16). Figures 2a and b correspond, respectively, to the resolution by the Elimination method and the resolution by the Global inversion method. It is clearly shown that the error is better with the Global inversion resolution. Table 1 and Table 2 present the number of iterations necessary for convergence and the corresponding average error for the three unknowns (vorticity, velocity, and pressure). Comparing the two results, it is clear that the Global inversion method not only achieves better accuracy but also converges within fewer iterations.

From here, we consider only the resolution with the Global inversion method.

We now present four numerical experiments, in dimension \(d = 2\) and in the case where the data *f* and the boundary condition on velocity are defined as:

We consider four situations about the domain Ω. First, we consider the square \(]-1,1[^{2}\) without domain decomposition and \(]-1,1[^{2}\) with domain decomposition, see Fig. 3. Secondly, we consider the not convex L-shaped domain \(\Omega =]-1,1[^{2}/]0,1[^{2}\) that we decompose into three subdomains, see Fig. 4:

Finally, we consider the multiply connected domain \(]-2,2[^{2}/]-1,1[^{2}\) divided into four equal squares and four equal rectangles, as illustrated in Fig. 4 and with the cut \(\Sigma _{1}= ]1, 2[\times \{1\}\). Figure 5 presents, respectively, from left to right and from top to bottom the discrete vorticity, the two components of the vector velocity \(({\bf v}^{m}_{x},v^{m}_{y})\) and the pressure for the data defined in (17) on a spectral mesh grid of the square \(]-1,1[^{2}\) without domain decomposition, obtained with \(N = 40\).

Figure 6 presents, respectively, from left to right and from top to bottom the discrete vorticity, the two components of the vector velocity \(({\bf v}^{m}_{x},v^{m}_{y})\), and the pressure for the data defined in (17) on a spectral mesh grid of the square \(]-1,1[^{2}\) with domain decomposition, obtained with \(N = 40\). Figure 7 presents, respectively, from left to right and from top to bottom the discrete vorticity, the two components of the vector velocity \(({\bf v}^{m}_{x},v^{m}_{y})\), and the pressure for the data defined in (17) on a spectral mesh grid of the nonconvex L-shaped domain \(\Omega =]-1,1[^{2}/]0,1[^{2}\), obtained with \(N = 40\).

Figure 8 presents, respectively, from left to right and from top to bottom the discrete vorticity, the two components of the vector velocity \(({\bf v}^{m}_{x},v^{m}_{y})\), and the pressure for the data defined in (17) on a spectral mesh grid of the decomposition of the multiply connected square ring domain, obtained with \(N = 40\).

### 4.2 Three-dimensional experiments

Here, the domain is \(\Omega = ]-1,1[^{3}\) with \(\tau =10^{-6}\) and \(T=1\).

We consider a given analytic solution constructed thanks to the formulas \({\bf v}^{m} = {\bf curl}\,\chi ^{m}\) and \(\varpi ^{m} = {\bf curl}\,{\bf v}^{m}\), we construct the analytic solution where \(\chi ^{m} = (\chi ^{m}_{x},\chi ^{m}_{y},\chi ^{m}_{z})\), the stream vector, and \(p^{m}\) are defined by

Figure 9 presents the error curves for \(\varpi ^{m}\), \({\bf v}^{m}\), and \(p^{m}\), with *N* varying from 5 to 18. Given that the regularity of the solutions in (18) is \(\mathcal{C}^{\infty}\), the slopes of the error curves are very similar to those in Fig. 2b.

We note that for three-dimensional calculations, the matrices are not sparse and have a large order, necessitating a relatively small maximum value for \(N=18\).

## 5 Conclusion and future work

In this work, we highlight the efficiency of the Global inversion method compared to the Elimination method for solving the discrete problem arising from the spectral-element discretization of the time-dependent vorticity, velocity, and pressure formulation of the Stokes problem. The Global inversion method achieved good convergence. We present several numerical tests on a spectral mesh applied to nonconvex and multiply connected domains.

For future work, we aim to discretize the time-dependent nonlinear Navier–Stokes problem using the spectral-element method.

## Data Availability

No datasets were generated or analysed during the current study.

## References

Girault, V., Raviart, P.-A.: Finite Element Methods for Navier Stokes Equations, Theory and Algorithms. Springer, Berlin (1986)

Tian, Y., Xiang, Y.Z.: Global boundedness to a 3d Chemotaxis-Stokes system with porous medium cell diffusion and general sensitivity. Adv. Nonlinear Anal.

**12**(1), 23–53 (2023)Berselli, L.C., Ruci, M.: On the regularity of solution to the time-dependent p-Stokes system. Opusc. Math.

**40**(1), 49–69 (2020)Amrouche, C., Bernardi, C., Dauge, M., Girault, V.: Vector potentials in three-dimensional nonsmooth domains. Math. Methods Appl. Sci.

**21**, 823–864 (1998)Bègue, C., Conca, C., Murat, F., Pironneau, O.: Les équations de stokes et de navier–stokes avec des conditions aux limites sur la pression. In: Brezis, H., Lions, J.-L. (eds.) Nonlinear Partial Differential Equations and Their Applications. Collège de France Seminar, vol. IX, pp. 179–264. Longman Scientific and Technical, Harlow (1988)

Dubois, F.: Vorticity–velocity–pressure formulation for the Stokes problem. Math. Methods Appl. Sci.

**25**, 1091–1119 (2002)Tong, L.L.: Global existence and decay estimates of the classical solution to the compressible Navier-Stokes-Smoluchowski equations in r3. Adv. Nonlinear Anal.

**13**(1), 1–25 (2024)Salmon, S.: Développement numérique de la formulation tourbillon–vitesse–pression pour le problème de Stokes. PhD thesis, Université Pierre et Marie Curie, Paris, France (1999)

Bernardi, C., Chorfi, N.: Spectral discretization of the vorticity, velocity and pressure formulation of the Stokes problem. SIAM J. Numer. Anal.

**44**, 826–850 (2006)Walker, H.F.: Implementation of the gmres method using Householder transformation. SIAM J. Sci. Stat. Comput.

**9**, 152–163 (1988)Temam, R.: Navier Stokes Equations. Theory and Numerical Analysis. Studies in Mathematics and Its Applications, vol. 2. North-Holland Publishing Co., Amsterdam (1977)

Abdelwahed, M., Chorfi, N.: Spectral discretization of the time dependent vorticity velocity pressure formulation of the Stokes problem. Math. Methods Appl. Sci., 1–18 (2020)

Abdelwahed, M., Chorfi, N.: Spectral discretization of the time-dependent Navier-Stokes problem with mixed boundary conditions. Adv. Nonlinear Anal.

**11**(1), 1447–1465 (2022)Abdelwahed, M., Chorfi, N.: Spectral element discretization of the time dependent Stokes problem with nonstandard boundary conditions. Bound. Value Probl.

**10**, 1–16 (2024)Nédélec, J.-C.: Mixed finite elements in \(\mathbb{R}^{3}\). Numer. Math.

**35**, 315–341 (1980)Bernardi, C., Maday, Y.: Spectral method. In: Ciarlet, P.G., Lions, J.-L. (eds.) Handbook of Numerical Analysis. North-Holland, Amsterdam (1997)

Bercovier, M., Engelman, M.: A finite element for the numerical solution of viscous incompressible flows. J. Comput. Phys.

**30**, 181–201 (1979)

## Acknowledgements

Researchers Supporting Project number (RSP2024R136), King Saud University, Riyadh, Saudi Arabia.

## Funding

Not applicable.

## Author information

### Authors and Affiliations

### Contributions

The authors declare that the study was realized in collaboration with equal responsibility. All authors read and approved the final manuscript.

### Corresponding author

## Ethics declarations

### Competing interests

The authors declare no competing interests.

## Additional information

### Publisher’s Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## Rights and permissions

**Open Access** This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.

## About this article

### Cite this article

Ouertani, H., Abdelwahed, M. The algorithmic resolution of spectral-element discretization for the time-dependent Stokes problem.
*Bound Value Probl* **2024**, 89 (2024). https://doi.org/10.1186/s13661-024-01900-z

Received:

Accepted:

Published:

DOI: https://doi.org/10.1186/s13661-024-01900-z