Keywords

1 Introduction

Consider the Stokes problem

$$\displaystyle \begin{aligned}\begin{array}{r*{20}l} {} -\varDelta \boldsymbol{u} + \nabla p &= \boldsymbol{f} \qquad &&\text{in }\varOmega, \end{array}\end{aligned} $$
(1)
$$\displaystyle \begin{aligned}\begin{array}{r*{20}l} {} \operatorname*{\mathrm{div}} \boldsymbol{u} &= 0 \qquad &&\text{in }\varOmega, \end{array}\end{aligned} $$
(2)
$$\displaystyle \begin{aligned}\begin{array}{r*{20}l} \boldsymbol{u} &= \boldsymbol{0} \qquad &&\text{on }\partial \varOmega, \end{array}\end{aligned} $$
(3)

for the velocity \(\boldsymbol {u} : \varOmega \rightarrow \mathbb {R}^d\) and pressure \(\boldsymbol {p} : \varOmega \rightarrow \mathbb {R}\) in a polytopic domain \(\varOmega \subset \mathbb {R}^d\), d = 2, 3.

The Stokes problem is considered here as a first step towards a multimesh formulation for multi-body flow problems, and ultimately fluid–structure interaction problems, in which each body is discretized by an individual boundary-fitted mesh and the boundary-fitted meshes move freely on top of a fixed background mesh. The applications for such a formulation are many, e.g., the simulation of blood platelets in a blood stream, the optimization of the configuration of an array of wind turbines, or the investigation of the effect of building locations in a simulation of urban wind conditions and pollution. Common to these applications is that the multimesh method removes the need for costly mesh (re)generation and allows the platelets, wind turbines or buildings to be moved around freely in the domain, either in each timestep as a part of a dynamic simulation, or in each iteration as part of an optimization problem.

The multimesh formulation presented here is a generalization of the formulation presented and analyzed in [5] for two domains. For comparison, the multimesh discretization of the Poisson problem for arbitrarily many intersecting meshes is presented in [6] and analyzed in [8].

2 Notation

We first review the notation for domains, interfaces, meshes and overlaps used to formulate the multimesh finite element method. For a more detailed exposition, we refer to [6].

Remark 1

To simplify the presentation, the domains Ω 1, …, Ω N are not allowed to intersect the boundary of Ω.

Fig. 1
figure 1

(a) Three polygonal predomains. (b) The predomains are placed on top of each other in an ordering such that \(\widehat {\varOmega }_0\) is placed lowest, \(\widehat {\varOmega }_1\) is in the middle and \(\widehat {\varOmega }_2\) is on top

Fig. 2
figure 2

Partition of Ω = Ω 0 ∪ Ω 1 ∪ Ω 2. Note that \(\varOmega _2 = \widehat {\varOmega }_2\)

Fig. 3
figure 3

(a) The two interfaces of the domains in Fig. 1: \(\varGamma _1 = \partial \widehat {\varOmega }_1 \setminus \widehat {\varOmega }_2\) (dashed line) and \(\varGamma _2 = \partial \widehat {\varOmega }_2\) (filled line). Note that Γ 1 is not a closed curve. (b) Partition of Γ 2 = Γ 20 ∪ Γ 21

Fig. 4
figure 4

(a) The three premeshes. (b) The corresponding active meshes (cf. Fig. 1)

Fig. 5
figure 5

(a) Given three ordered triangles K 0, K 1 and K 2, the overlaps are \(\mathcal {O}_{01}\) in green, \(\mathcal {O}_{02}\) in red and \(\mathcal {O}_{12}\) in blue. (b) The multimesh of the domains in Fig. 1b consists of the active meshes in Fig. 4b

3 Multimesh Finite Element Method

To formulate the multimesh finite element for the Stokes problem (1) and (2), we assume for each (active) mesh \(\mathcal {K}_{h,i}\) the existence of a pair of inf-sub stable spaces V h,i × Q h,i, i = 0, 1, …, N, away from the interface. To be precise, we assume inf-sup stability in ω h,i ⊂ Ω h,i in the sense of (5) below, where ω h,i is close to Ω i in the sense that Ω h,i ∖ ω h,i ⊂ U δ(Γ i), where

$$\displaystyle \begin{aligned} U_\delta(\varGamma_i) = \bigcup_{\boldsymbol{x} \in \varGamma_i} B_\delta(\boldsymbol{x}) \end{aligned} $$
(4)

and B δ(x) is a ball of radius δ centered at x. In other words, U δ(Γ i) is the tubular neighborhood of Γ with thickness δ. In the numerical examples, we let ω h,i be the union of elements in \(\mathcal {K}_{h,i}\) with empty intersection with Γ ij, j > i.

The inf-sup condition may expressed on each submesh ω h,i by

$$\displaystyle \begin{aligned} \| p_i - \lambda_{\omega_{h,i}}(p) \|{}_{\omega_{h,i}} \lesssim \sup_{\boldsymbol{v} \in \boldsymbol{W\!}_{h,i}} \frac{(\operatorname*{\mathrm{div}} \boldsymbol{v},p)_{\omega_{h,i}}}{\|D \boldsymbol{v} \|{}_{\omega_{h,i}}}, \end{aligned} $$
(5)

where \(p_i = p|{ }_{\varOmega _{h,i}}\), \(\lambda _{\omega _{h,i}}(p)\) is the average of p over ω h,i and W h,i is the subspace of V h,i defined by

$$\displaystyle \begin{aligned} \boldsymbol{W\!}_{h,i} &= \{\boldsymbol{v} \in \boldsymbol{V\!}_{h,i}: \boldsymbol{v}=\boldsymbol{0}\text{ on }\overline{\varOmega_{h,i} \setminus \omega_{h,i}}\}. \end{aligned} $$
(6)

We now define the multimesh finite element space as the direct sum

$$\displaystyle \begin{aligned} \boldsymbol{V\!}_h \times Q_h = \bigoplus_{i=0}^N \boldsymbol{V\!}_{h,i}\times Q_{h,i}, \end{aligned} $$
(7)

where V h and Q h consist of piecewise polynomial of degree k and l, respectively. This means that an element v ∈V h is a tuple (v 0, …, v N), and the inclusion V hL 2(Ω) is defined by v(x) = v i(x) for x ∈ Ω i. A similar interpretation is done for q ∈ Q h. We consider here Taylor-Hood elements [3] with k ≥ 2, l = k − 1, for which the condition (5) is fulfilled, but non-conforming elements are also possible.

We now consider the following asymmetric finite element method: Find (u h, p h) ∈V h × Q h such that A h((u h, p h), (v, q)) = l h(v) for all (v, q) ∈V h × Q h, where

$$\displaystyle \begin{aligned} A_h((\boldsymbol{u}, p), (\boldsymbol{v}, q)) &= a_h(\boldsymbol{u},\boldsymbol{v}) + s_h(\boldsymbol{u}, \boldsymbol{v}) + b_h(\boldsymbol{u},q) + b_h(\boldsymbol{v},p) + d_h((\boldsymbol{u},p),(\boldsymbol{v},q)), \end{aligned} $$
(8)
$$\displaystyle \begin{aligned} a_{h}(\boldsymbol{u},\boldsymbol{v}) &= \sum_{i=0}^N (D \boldsymbol{u}_i, D \boldsymbol{v}_i)_{\varOmega_i} \end{aligned} $$
(9)
$$\displaystyle \begin{aligned} &\qquad - \sum_{i=1}^N \sum_{j=0}^{i-1} \big( (\langle (D \boldsymbol{u}) \cdot \boldsymbol{n}_i \rangle,[ \boldsymbol{v}])_{\varGamma_{ij}} + ([ \boldsymbol{u}], \langle (D \boldsymbol{v}) \cdot \boldsymbol{n}_i \rangle)_{\varGamma_{ij}} \big) \\ &\qquad + \sum_{i=1}^N \sum_{j=0}^{i-1} \beta_0 h^{-1}([\boldsymbol{u}],[ \boldsymbol{v}])_{\varGamma_{ij}}, \\ s_{h}(\boldsymbol{u},\boldsymbol{v})&= \sum_{i=0}^{N-1} \sum_{j=i+1}^N \beta_1 ([D\boldsymbol{u}_i], [D\boldsymbol{v}_i])_{\mathcal{O}_{ij}}, \end{aligned} $$
(10)
$$\displaystyle \begin{aligned} b_h(\boldsymbol{u},q) &= - \sum_{i=0}^N (\operatorname*{\mathrm{div}} \boldsymbol{u}_i,q_i)_{\varOmega_i} + \sum_{i=1}^N \sum_{j=0}^{i-1} ([\boldsymbol{n}_i \cdot \boldsymbol{u}],\langle q \rangle )_{\varGamma_{ij}}, \end{aligned} $$
(11)
$$\displaystyle \begin{aligned} d_h((\boldsymbol{u},p),(\boldsymbol{v},q))&= \sum_{i=0}^N \delta h^2(\varDelta \boldsymbol{u}_i - \nabla p_i,\varDelta \boldsymbol{v}_i + \nabla q_i)_{\varOmega_{h,i}\setminus \omega_{h,i}}, \end{aligned} $$
(12)
$$\displaystyle \begin{aligned} l_h(\boldsymbol{v}) &= \sum_{i=0}^N (\boldsymbol{f},\boldsymbol{v}_i)_{\varOmega_i} - \sum_{i=0}^N \delta h^2(\boldsymbol{f},\varDelta \boldsymbol{v}_i + \nabla q_i)_{\varOmega_{h,i}\setminus \omega_{h,i}}. \end{aligned} $$
(13)

Here, β 0 and β 1 are stabilization parameters that must be sufficiently large to ensure that the bilinear form A h is coercive; cf. [5] for an analysis of the two-domain case.

For simplicity, we use the global mesh size h here and throughout the presentation. If the meshes are of substantially different sizes, it may be beneficial to introduce the individual mesh sizes h i in (12) and the average \(h_i^{-1} + h_j^{-1}\) in (9).

Note that since Γ i is partitioned into interfaces Γ ij relative to underlying meshes, the sums of the interface terms are over 0 ≤ j < i ≤ N. In contrast, the sums of the overlap terms are over 0 ≤ i < j ≤ N since the overlap \(\mathcal {O}_i\) is partitioned into overlaps \(\mathcal {O}_{ij}\) relative to overlapping meshes.

The jump terms on \(\mathcal {O}_{ij}\) and Γ ij are defined by [v] = v i −v j, where v i and v j are the finite element solutions (components) on the active meshes \(\mathcal {K}_{h,i}\) and \(\mathcal {K}_{h,j}\). The average normal flux is defined on Γ ij by

$$\displaystyle \begin{aligned} \langle \boldsymbol{n}_i\cdot \nabla \boldsymbol{v} \rangle = (\boldsymbol{n}_i \cdot \nabla \boldsymbol{v}_{i} + \boldsymbol{n}_{i} \cdot \nabla \boldsymbol{v}_{j})/2. \end{aligned} $$
(14)

Here, any convex combination is valid [4].

The proposed formulation (8) is identical to the one proposed in [5] with sums over all domains and interfaces. Also note the similarity with the multimesh formulation for the Poisson problem presented in [6], the difference being the additional least-squares term d h (and the corresponding term in l h) since we only assume inf-sup stability in ω h,i, see (5) and the discussion above. If we do not assume inf-sup stability anywhere (e.g. if we would use a velocity-pressure element of equal order), the least-squares term should be applied over the whole domain as in [10]. Please cf. [10] for the use of a symmetric d h.

Other stabilization terms may be considered. By norm equivalence, the stabilization term s h(u, v) may alternatively be formulated as

$$\displaystyle \begin{aligned} s_h (\boldsymbol{u},\boldsymbol{v}) = \sum_{i=0}^{N-1} \sum_{j=i+1}^N \beta_2 h^{-2} ([ \boldsymbol{u} ], [\boldsymbol{v} ])_{\mathcal{O}_{ij}}. \end{aligned} $$
(15)

where β 2 is a stabilization parameter; see [8].

Note that the finite element method weakly approximates continuity in the sense that [u h] = 0 and [n i ⋅∇u h] = 0 on all interfaces.

4 Implementation

We have implemented the multimesh finite element method as part of the software framework FEniCS [2, 9]. One of the main features of FEniCS is the form language UFL [1] which allows variational forms to be expressed in near-mathematical notation. However, to express the multimesh finite element method (8), a number of custom measures must be introduced. In particular, new measures must be introduced for integrals over cut cells, interfaces and overlaps. These measures are then mapped to quadrature rules that are computed at runtime. An overview of these algorithms and the implementation is given in [7].

To express the multimesh finite element method, we let dX denote the integration over domains Ω i, i = 0, …, N, including cut cells. Integration over Γ ij and \(\mathcal {O}_{ij}\) are expressed using the measures dI and dO, respectively. We let dC denote integration over Ω h,i ∖ ω h,i. Now the multimesh finite element method for the Stokes problem may be expressed as

   a_h = inner(grad(u), grad(v))*dX \        - inner(avg(grad(u)), tensor_jump(v, n))*dI \        - inner(avg(grad(v)), tensor_jump(u, n))*dI \        + beta_0/h * inner(jump(u), jump(v))*dI    s_h = beta_1 * inner(jump(grad(u)), jump(grad(v)))*dO    b_h =  lambda  v, q: inner(-div(v), q)*dX \                     + inner(jump(v, n), avg(q))*dI    d_h = delta*h**2 * inner(-div(grad(u)) + grad(p), \                             -div(grad(v)) - grad(q))*dC

This makes it easy to implement the somewhat lengthy form (8), as well as investigate the effect of different stabilization terms.

5 Numerical Results

To investigate the convergence of the multimesh finite element method, we solve the Stokes problem in the unit square with the following exact solution

$$\displaystyle \begin{aligned} \boldsymbol{u}(x, y) &= 2 \pi \sin{}(\pi x) \sin{}(\pi y) \cdot ( \cos{}(\pi y) \sin{}(\pi x) , -\cos{}(\pi x) \sin{}(\pi y) ), \end{aligned} $$
(16)
$$\displaystyle \begin{aligned} p(x, y) &= \sin{}(2 \pi x) \sin{}(2 \pi y), \end{aligned} $$
(17)

and corresponding right hand side. We use P kP k−1 Taylor–Hood elements with k ∈{2, 3, 4} and we use N ∈{1, 2, 4, 8, 16, 32} randomly placed domains as in [6] (see Fig. 6). Due to the random placement of domains, some domains are completely hidden and will not contribute to the solution. For N = 8, this is the case for one domain, for N = 16, three domains and for N = 32, four domains are completely hidden. This is automatically handled by the computational geometry routines. Convergence results are presented in Fig. 7 as well as in Table 1.

Fig. 6
figure 6

A sequence of N meshes are randomly placed on top of a fixed background mesh of the unit square shown here for N = 2, 4 and 32 using the coarsest refinement level

Fig. 7
figure 7

Convergence results for k = 2, 3 and 4 (left to right) using up to 32 meshes (single mesh results are N = 0). From top to bottom we have the velocity error in the L 2(Ω) norm, the velocity error in the \(H^1_0(\varOmega )\) norm, and the pressure error in the L 2(Ω) norm. Results less than 10−8 are not included in the convergence lines due to limits in floating point precision

Table 1 Error rates for \( \boldsymbol {e}_{L^2} = \| \boldsymbol {u} - \boldsymbol {u}_h\|{ }_{L^2(\varOmega )}\), \( \boldsymbol {e}_{H^1_0} = \| \boldsymbol {u} - \boldsymbol {u}_h\|{ }_{H^1_0(\varOmega )}\) and \(e_{L^2} = \|p - p_h\|{ }_{L^2(\varOmega )}\)

6 Discussion

The results presented in Table 1 and Fig. 7 show the expected order of convergence for the velocity in the L 2(Ω) norm (k + 1), for the velocity in the \(H^1_0(\varOmega )\) norm (k), and for the pressure in the L 2(Ω) norm (k).

A detailed inspection of Fig. 7 reveals that, as expected, the multimesh discretization yields larger errors than the single mesh discretization (standard Taylor–Hood on one single mesh). The errors introduced by the multimesh discretization are one to two orders of magnitude larger than the single mesh error. However, the convergence rate is optimal and it should be noted that the results presented here are for an extreme scenario where a large number of meshes are simultaneously overlapping; see Fig. 6. For a normal application, such as the simulation of flow around a collection of objects, each object would be embedded in a boundary-fitted mesh and only a small number of meshes would simultaneously overlap (in addition to each mesh overlapping the fixed background mesh), corresponding to the situation when two or more objects are close.

The presented method and implementation demonstrate the viability of the multimesh method as an attractive alternative to existing methods for discretization of PDEs on domains undergoing large deformations. In particular, the discretization and the implementation are robust to thin intersections and rounding errors, both of which are bound to appear in a simulation involving a large number of meshes, timesteps or configurations.