1 Introduction

In recent years, the coupling of multi-physics and multi-scale problems has particulary attracted researchers’ interest; cf., e.g., [1,2,3,4]. Their efficient numerical simulation with respect to the temporal discretization does not become feasible without using different time step sizes adapted to the dynamics and characteristic scales of the respective subproblems. Such methods are referred to as multirate in time (for short, multirate) schemes. For the first time, they were introduced for the numerical approximation of systems of ordinary differential equations in [5, 6]. For a short review of multirate methods including a list of references we refer to [3, 7].

In this work, we focus on the multirate implementation of a fully space-time adaptive convection-dominated transport problem coupled with a time-dependent Stokes flow problem. The implementation is based on our open-source code given in [8], based on the deal.II finite element library; cf. [9]. With regard to our coupled model problem, we assume a highly time-dynamic process modeled by the transport equation such that the underlying temporal mesh is discretized using smaller time step sizes compared to a slowly moving process modeled by the viscous flow problem. For instance, such system is used to model species or heat transport in a creeping flow. Beyond that, such multi-physics systems of coupled flow and transport serve as prototype models for applications in several branches of natural and engineering scienes, for instance, contaminant transport and degradation in the subsurface, reservoir simulation, thermal and mass transport in deformable porous media, and many more; cf., e.g., [10,11,12,13,14]. Our motivation is based on the definition of characteristic times measuring different dynamics of the two subproblems. This approach can be traced back to the field of natural sciences and engineering sciences, cf., e.g., [15, 16]

For the sake of physical realism, the transport problem is supposed to be convection-dominated by assuming high Péclet numbers, cf. [17,18,19]. The solutions of such problems are typically characterized by the occurrence of sharp moving fronts and layers. The key challenge for the numerical approximation consists on an accurate and efficient solution while avoiding non-physical oscillations or smearing effects. The application of stabilization techniques is a typical approach to overcome these effects. As shown in a comparative study for convection-dominated problems in [20], stabilization techniques on globally refined meshes fail to avoid these oscillations even after tuning stabilization parameters. Thus, for an efficient numerical simulation of multi-physics problems handling the challenges described above, it is indisputable that adaptive mesh refinement strategies in space and time are necessary. One possible technique for those adaptive strategies is goal-oriented a posteriori error control based on the Dual Weighted Residual method [21, 22]. For a general review of a posteriori error estimation we refer to [23, 24].

In this work, we extend our approaches and implementations from [8, 25] considering a time-dependent flow problem that needs to be solved on a different time scale than the transport problem. Precisely, the features of this work are the following:

  • Development of a multirate concept with independent time scales for the transport and flow problem, respectively.

  • Implementation of tensor-product space-time slabs for an arbitrary order discontinuous Galerkin (dG) time discretization.

  • Implementation of coupling the Stokes flow velocity to the transport problem using interpolation techniques between different finite element spaces and meshes.

This work is organized as follows. In Sect. 2 we introduce the model problem, the multirate decoupling of the transport and flow problems and their space-time discretizations. In Sect. 3 we derive an a posteriori error representation for the transport problem. In Sect. 4 we explain the implementation of the space-time tensor-product spaces. The underlying algorithm and some related aspects are presented in Sect. 5. Numerical examples are given in Sects. 6 and 7 we summarize with conclusions and give some outlook for future work.

2 Model Problem, Multirate and Space-Time Discretization

In this section, we introduce the coupled model problem, explain our multirate in time approach and present some details of the space-time discretizations.

2.1 Model Problem

The time dependent convection–diffusion–reaction transport problem in dimensionless form is given by

$$\begin{aligned} \begin{array}{rcl l l l} \partial _{t} {u}- \nabla \cdot (\varepsilon \nabla {u}) + \mathbf{v}\cdot \nabla {u}+ \alpha {u}&{}=&{} {g}&{} \text {in} &{} Q &{} = \varOmega \times I\,,\\ {u}&{}=&{} {u}_D &{} \text {on} &{} \varSigma _D &{} = \varGamma _D \times I\,,\\ \varepsilon \nabla {u}\cdot \mathbf{n}&{}=&{} {u}_N &{} \text {on} &{} \varSigma _N &{} = \varGamma _N \times I\,,\\ {u}&{}=&{} {u}_0 &{} \text {on} &{} \varSigma _0 &{} = \varOmega \times \{ 0 \}\,, \end{array} \end{aligned}$$

where \(\varOmega \subset {\mathbb {R}}^{d}\), with \(d=2,3\), is a polygonal or polyhedral bounded domain including a boundary partition \(\partial \varOmega = \varGamma _D \cup \varGamma _N\), \(\varGamma _D \ne \emptyset \) with outer unit normal vector \(\mathbf{n}\). In addition, \(I=(0,T]\), \(0< T < \infty \), is a finite time interval. The characteristic time \(t_{\text {transport}}\) of this transport equation (1) can be understood as a dimensionless time variable depending on the diffusive, convective as well as reactive part and is here defined by

$$\begin{aligned} t_{\text {transport}} := \min \Bigg \{\frac{L^2}{\varepsilon }\,;\, \frac{L}{V}\,;\, \frac{1}{\alpha }\Bigg \}\,, \end{aligned}$$

where \(0 < \varepsilon \ll 1\) is the diffusion coefficient, \(\alpha > 0\) is the reaction coefficient, L denotes the characteristic length of the domain \(\varOmega \), for instance, its diameter, and V denotes a characteristic velocity of the flow field \(\mathbf{v}\), for instance, the mean inflow velocity given by \(\frac{1}{T\, |\varGamma _{\mathrm {in}}|} \int _I \int _{\varGamma _{\mathrm {in}}} \mathbf{v}_D\cdot (- \mathbf{n}) \;\mathrm {d} o\; \mathrm {d} t\); cf. [15, 16] for more details.

The convection field \(\mathbf{v}\) in the transport problem (1) is determined by the dimensionless Stokes flow system

$$\begin{aligned} \begin{array}{rcl l l l} \partial _t \mathbf{v}- \nabla \cdot (2{\nu }\, {\varvec{\epsilon }}(\mathbf{v}) + {p}{\varvec{I}}) &{}=&{} \mathbf{f}&{} \text {in} &{} Q &{} = \varOmega \times I\,,\\ \nabla \cdot \mathbf{v}&{}=&{} 0 &{} \text {in} &{} Q &{} = \varOmega \times I\,,\\ \mathbf{v}&{}=&{} \mathbf{v}_D &{} \text {on} &{} \varSigma _{\text {inflow}} &{} = \varGamma _{\text {in}} \times I\,,\\ \mathbf{v}&{}=&{} {\varvec{0}} &{} \text {on} &{} \varSigma _{\text {wall}} &{} = \varGamma _{\text {wall}} \times I\,,\\ (2{\nu }\, {\varvec{\epsilon }}(\mathbf{v}) + {p}{\varvec{I}}) \mathbf{n}&{}=&{} {\varvec{0}} &{} \text {on} &{} \varSigma _{\text {outflow}} &{} = \varGamma _{\text {out}} \times I\,,\\ \mathbf{v}&{}=&{} \mathbf{v}_0 &{} \text {on} &{} \varSigma _0 &{} = \varOmega \times \{ 0 \}\,,\\ \end{array} \end{aligned}$$

for a boundary partition \(\partial \varOmega = \varGamma _{\text {in}} \cup \varGamma _{\text {wall}} \cup \varGamma _{\text {out}}\) which is (in general) independent from the boundary partition of the transport problem. The appropriate choice for the boundary partition and setting of the inflow profiles is standard and can be found in the literature [26]. We assume that \({\nu }> 0\) is a viscosity coefficient. Further, \(\varvec{\epsilon }(\mathbf{v}):=(\nabla \mathbf{v}+(\nabla \mathbf{v})^\top )/2\) is the strain tensor. The characteristic time \(t_{\text {flow}}\) of the Stokes flow equation is then defined by

$$\begin{aligned} t_{\text {flow}} := \frac{L}{V}\,, \end{aligned}$$

with L and V being chosen as in (2). With regard to the characteristic times of the two subproblems, we assume that \(t_{\text {transport}} \ll t_{\text {flow}}\) such that we are using a finer temporal mesh to resolve the dynamics of a faster process given by the transport equation compared to the slower process of the viscous, creeping flow. This multirate in time approach is described in detail in the following section.

Well-posedness of (1), (3) and the existence of a sufficiently regular solution, such that all of the arguments and terms used below are well-defined, are tacitly assumed without mentioning all technical assumptions about the data and coefficients explicitly, cf. [27] and [28].

2.2 Multirate

For an efficient approximation, we use a multirate in time approach to mimic the behaviour of a slowly moving fluid, that is approximated by a time-dependent Stokes solver, and a faster convection–diffusion–reaction process. Precisely, the problems given by (1) and (3) are considered on different time scales modeling the underlying physical processes. We initialize the temporal mesh independently for the Stokes flow and the transport problem with the following properties

  • the Stokes flow temporal mesh is not finer than that of the transport problem,

  • the endpoints of the temporal mesh of the Stokes solver must match with endpoints of the temporal mesh of the transport problem.

We allow for adaptive time refinements within the transport problem and for global time refinements within the Stokes solver. The latter is due to the lack at the time being of an error estimator for the current implementation of the Stokes flow solver. An exemplary initialization and one manufactured refined temporal mesh are illustrated in Fig. 1.

Fig. 1
figure 1

Illustration of exemplary temporal meshes for the initial loop and the first adaptively refined loop. The temporal mesh of the transport solver is adaptively refined and the mesh of the Stokes flow solver is fixed as explained in Sect. 2.2

For the multirate decoupling of the transport problem, we let \(0 =: t_0^\text {}< \dots < t_{N^\ell }^\text {} := T\) a set of time points for a partition of the time domain I into left-open subintervals \(I_n:=(t_{n-1}^\text {},t_n^\text {}]\), \(n=1,\dots ,N^\ell \). The number \(N^\ell \) depends on the adaptivity loop \(\ell \). In the same way, but in accordance with allowing for a different temporal mesh of the Stokes flow problem, we introduce the following set of time points \(0 =: t_0^\mathrm {f}< \dots < t_{N^{\mathrm {f},\ell }}^{\mathrm {f}} := T\), using an index \(\mathrm {f}\) when dealing with the flow problem here and in the following. We approximate the solution \(\{\mathbf{v}, {p}\}\) of the Stokes flow problem on each \(I_n^\mathrm {f}\) by means of a piecewise constant discontinuous Galerkin (dG(0)) time approximation. For simplicity of the implementation, we ensure that each element of the set \(\{ t_0^\mathrm {f}, \dots , t_{N^{\mathrm {f},\ell }}^\mathrm {f} \}\) corresponds to an element of the set \(\{ t_0^\text {}, \dots , t_{N^\ell } \}\). Additionally, we approximate the solution of the transport problem with an arbitrary degree \(r \ge 0\) in time. This gives us for \(r>0\) an additional level of the multirate in time character between the two problems.

2.3 Weak Formulation

In this section, we present the weak formulation of the transport and Stokes flow problem given by (1) and (3), respectively, to prepare the discretizations in space and time following below. Let \(X:=\{u \in L^2(0, T; H^1_0(\varOmega )) \mid \partial _t u \in L^2(0, T; H^{-1}(\varOmega ))\}\) and \(Y_1 := \{ {\varvec{v}} \in L^2(0, T; H^1_0(\varOmega )^d) \mid \partial _t {\varvec{v}} \in L^2(0, T; H^{-1}(\varOmega )^d) \}\). Then, the weak formulation of (1) reads as follows:

For a given \(\mathbf{v}\in Y_1\) of (6), find \({u}\in X\) such that

$$\begin{aligned} A({u};\mathbf{v})(\varphi ) = G(\varphi ) \quad \forall \varphi \in X\,, \end{aligned}$$

where the bilinear form \(A: \{X;Y_1\} \times X \rightarrow {\mathbb {R}}\) and the linear form \(G: L^2(0, T;\) \(H^{-1}(\varOmega )) \rightarrow {\mathbb {R}}\) are defined by

$$\begin{aligned} \begin{array}{rcl} A({u};\mathbf{v})(\varphi ) &{} := &{} \displaystyle \int _{I} \big \{ (\partial _{t} {u}, \varphi ) + a({u};\mathbf{v})(\varphi ) \big \}\; \mathrm {d} t + ({u}(0), \varphi (0))\,, \text { with }\\ a({u};\mathbf{v})(\varphi ) &{} := &{} (\varepsilon \nabla {u}, \nabla \varphi ) + (\mathbf{v}\cdot \nabla {u}, \varphi ) + (\alpha {u}, \varphi ), \\ G(\varphi ) &{} := &{} \displaystyle \int _{I} ({g}, \varphi )\; \mathrm {d} t + ({u}_{0},\varphi (0) ) \,. \end{array} \end{aligned}$$

Here, \((\cdot , \cdot )\) denotes the inner product of \(L^2(\varOmega )\) or duality pairing of \(H^{-1}(\varOmega )\) with \(H^1_0(\varOmega )\), respectively. By \(\Vert \cdot \Vert \) we denote the associated \(L^2\)-norm.

For the weak formulation of (3) we additionally define \(Y_2 := \{p \in L^2(0,T;L^2(\varOmega ))\}\). Then we get:

For \(\mathbf{f}\in L^2(I;H^{-1}(\varOmega )^d)\) and \(\mathbf{v}_0 \in L^2(\varOmega )^d\), find \(\{ \mathbf{v}, {p}\} \in Y_1 \times Y_2\), such that

$$\begin{aligned} B(\mathbf{v},{p})({\varvec{\psi }},\chi ) = F({\varvec{\psi }}) \quad \forall \{{\varvec{\psi }}, \chi \} \in Y_1 \times Y_2\,, \end{aligned}$$

where the bilinear form \(B: \{ Y_1 \times Y_2 \} \times \{ Y_1 \times Y_2 \} \rightarrow {\mathbb {R}}\) and the linear form \(F: L^2(0,T;H^{-1}(\varOmega )^d) \rightarrow {\mathbb {R}}\) are defined by

$$\begin{aligned} \begin{array}{rcl} B(\mathbf{v},{p})({\varvec{\psi }},\chi ) &{}:=&{} \displaystyle \int _{I} \big \{ (\partial _{t} \mathbf{v},{\varvec{\psi }}) + (2 {\nu }{\varvec{\epsilon }}(\mathbf{v}), {\varvec{\epsilon }}({\varvec{\psi }})) - ({p}, \nabla \cdot {\varvec{\psi }}) - (\nabla \cdot \mathbf{v}, \chi ) \big \}\; \mathrm {d} t \\ &{} &{} + (\mathbf{v}(0),{\varvec{\psi }}(0))\,, \\ F({\varvec{\psi }}) &{}:=&{} \displaystyle \int _{I} \big \{ (\mathbf{f}, {\varvec{\psi }})\big \}\; \mathrm {d} t + (\mathbf{v}_0,{\varvec{\psi }}(0)) \,. \end{array} \end{aligned}$$

2.4 Discretization in Time

The sets of time subintervals \(I_n\) and \(I_n^\mathrm {f}\) as introduced in Sect. 2.2 are finite and countable. Therefore, the separation of the global space-time cylinder \(Q=\varOmega \times I\) into a partition of space-time slabs \({\hat{Q}}_n = \varOmega \times I_n\) for the transport problem and \({\hat{Q}}_n^\mathrm {f} = \varOmega \times I_n^\mathrm {f}\) for the Stokes flow problem, respectively, is reasonable. The time domain of each space-time slab \({\hat{Q}}_n\) or \({\hat{Q}}_n^\mathrm {f}\) is then discretized using a one-dimensional triangulation \({\mathcal {T}}_{\tau ,n}\) or \({\mathcal {T}}_{\sigma ,n}\) for the subinterval \(I_n\) or \(I_n^\mathrm {f}\), respectively. This allows to have more than one cell in time on a slab \({\hat{Q}}_n\) or \({\hat{Q}}_n^\mathrm {f}\) and a different number of cells in time of pairwise different slabs \({\hat{Q}}_i\) and \({\hat{Q}}_j\) or \({\hat{Q}}_i^\mathrm {f}\) and \({\hat{Q}}_j^\mathrm {f}\), \(1 \le i,j \le N^\ell , N^{\mathrm {f},\ell }\). Furthermore, let \({\mathcal {F}}_\tau \) and \({\mathcal {F}}_\sigma \) be the sets of all interior time points given as

$$\begin{aligned} \begin{array}{rcl} {\mathcal {F}}_\tau &{}:=&{} ( \{ t_1^\text {}, \dots , t_{N^\ell }^\text {} \} \cup \{ t \in \partial K_n \mid K_n \in {\mathcal {T}}_{\tau ,n} \} ) \setminus \{ 0, T \} \\ {\mathcal {F}}_\sigma &{}:=&{} ( \{ t_1^\mathrm {f}, \dots , t_{N^{\mathrm {f},\ell }}^\mathrm {f} \} \cup \{ t \in \partial K_n^\mathrm {f} \mid K_n^\mathrm {f} \in {\mathcal {T}}_{\sigma ,n} \} ) \setminus \{ 0, T \}\,. \end{array} \end{aligned}$$

The commonly used time step size \(\tau _K\) or \(\sigma _K\) is here the diameter or length of the cell in time \(K_n\) of \({\mathcal {T}}_{\tau ,n}\) or \(K_n^\mathrm {f}\) of \({\mathcal {T}}_{\sigma ,n}\) and the global time discretization parameter \(\tau \) or \(\sigma \) is the maximum time step size \(\tau _K\) or \(\sigma _K\) of all cells in time of all slabs \({\hat{Q}}_n\) or \({\hat{Q}}_n^\mathrm {f}\).

For the discretization in time of the transport problem (5) we use a discontinuous Galerkin method dG(r) with an arbitrary polynomial degree \(r \ge 0\). Let \(X_{\tau }^{r}\) be the time-discrete function space given as

$$\begin{aligned} \begin{array}{rcl} X_{\tau }^{r} &{}:= \Big \{ &{} {u}_{\tau } \in L^2(0, T; H_0^1(\varOmega )) \,\,\big |\,\, {u}_{\tau }|_{K_n} \in {\mathcal {P}}_r(K_n; H_0^1(\varOmega ))\,,\\ &{}~&{} K_n \in {\mathcal {T}}_{\tau ,n}\,,\,\, n=1,\dots ,N^\ell \,,\,\, {u}_{\tau }(0)\in L^2(\varOmega ) \Big \}\,, \end{array} \end{aligned}$$

where \({\mathcal {P}}_{r}(K_n; H_0^1(\varOmega ))\) denotes the space of all polynomials in time up to degree \(r \ge 0\) on \(K_n\) with values in \(H_0^1(\varOmega )\) . For some discontinuous in time function \(u_{\tau } \in X_{\tau }^{r}\) we define the limits \(u_{\tau }(t_F^\pm )\) from above and below as well as their jump at \(t_F\) by

$$\begin{aligned} u_\tau (t_F^\pm ) := \displaystyle \lim _{t \rightarrow t_F \pm 0} u_\tau (t)\,,\quad [ u_\tau ]_{t_F} := u_\tau (t_F^+) - u_\tau (t_F^-) \,. \end{aligned}$$

The semidiscretization in time of the the transport problem (5) then reads as follows:

For a given \(\mathbf{v}_{\sigma } \in Y_{\sigma }^{r}\) of (11), find \({u}_\tau \in X_{\tau }^{r}\) such that

$$\begin{aligned} A_{\tau }({u}_\tau ; \mathbf{v})(\varphi _\tau ) = G_\tau (\varphi _\tau ) \quad \forall \varphi _\tau \in X_{\tau }^{r}\,, \end{aligned}$$

where the semi-discrete bilinear form and linear form are given by

$$\begin{aligned} \begin{array}{rcl} A_{\tau }({u}_\tau ; \mathbf{v})(\varphi _\tau ) &{}:=&{} \displaystyle \sum _{n=1}^{N^\ell } \sum _{K_n \in {\mathcal {T}}_{\tau ,n}} \int _{K_n} \big \{( \partial _{t} {u}_\tau ,\varphi _\tau ) + a({u}_\tau ; \mathbf{v}_\sigma )(\varphi _\tau ) \big \} \mathrm {d} t\;\\ &{}~&{} + ( {u}_{\tau }(0^+), \varphi _{\tau }(0^+)) + \displaystyle \sum _{t_F \in {\mathcal {F}}_\tau } ( [{u}_\tau ]_{t_F}, \varphi _\tau (t_F^+) )\,, \\ G_\tau (\varphi _{\tau }) &{}:=&{} \displaystyle \int _I ({g}, \varphi _{\tau })\;\mathrm {d}t + ({u}_{0}, \varphi _{\tau }(0^+))\,, \end{array} \end{aligned}$$

with the bilinear form \(a(\cdot ,\cdot )(\cdot )\) depending on the semi-discrete Stokes solution \(\mathbf{v}_\sigma \).

The discontinuous time-discrete function space for the flow problem is given by

$$\begin{aligned} \begin{array}{rcl} Y_{\sigma }^{r} &{}:= \Big \{ &{} \{ \mathbf{v}_{\sigma },{p}_\sigma \} \in L^2(0, T; H_0^1(\varOmega )^d\times L^2(\varOmega )) \,\,\big |\\ &{}~&{} \mathbf{v}_{\sigma }|_{K_n^\mathrm {f}} \in {\mathcal {P}}_r(K_n^\mathrm {f}; H_0^1(\varOmega )^d)\,, \mathbf{v}_{\sigma }(0)\in L^2(\varOmega )\,,\\ &{}~&{} {p}_{\sigma }|_{K_n^\mathrm {f}} \in {\mathcal {P}}_r(K_n^\mathrm {f}; L^2(\varOmega ))\,, K_n \in {\mathcal {T}}_{\sigma ,n}\,,\,\, n=1,\dots ,N^{\mathrm {f},\ell } \Big \}\,. \end{array} \end{aligned}$$

Then, the semidiscretization in time of the the Stokes flow problem (6) reads as:

Find \(\{ \mathbf{v}_{\sigma },{p}_\sigma \} \in Y_{\sigma }^{r}\) such that

$$\begin{aligned} B_{\sigma }(\mathbf{v}_\sigma ,{p}_\sigma )({\varvec{\psi }}_\sigma ,\chi _\sigma ) = F_\sigma ({\varvec{\psi }}_\sigma ) \quad \forall \{{\varvec{\psi }}_{\sigma }, \chi _{\sigma h}\} \in Y_{\sigma }^{r}\,, \end{aligned}$$

where the semi-discrete bilinear form and linear form are given by

$$\begin{aligned} \begin{array}{rcl} B_{\sigma }(\mathbf{v}_\sigma ,{p}_\sigma )({\varvec{\psi }}_\sigma ,\chi _\sigma ) &{}:=&{} \displaystyle \sum _{n=1}^{N^{\mathrm {f},\ell }} \sum _{K_n^\mathrm {f} \in {\mathcal {T}}_{\sigma ,n}} \int _{K_n} \big \{(\partial _{t} \mathbf{v}_\sigma ,{\varvec{\psi }}_\sigma ) + (2 {\nu }{\varvec{\epsilon }}(\mathbf{v}_\sigma ), {\varvec{\epsilon }}({\varvec{\psi _\sigma }})) \\ &{}~&{} - ({p}_\sigma , \nabla \cdot {\varvec{\psi _\sigma }}) -(\nabla \cdot \mathbf{v}_\sigma , \chi _\sigma ) \big \} \mathrm {d} t \\ &{}~&{} + (\mathbf{v}_{\sigma }(0^+), {\varvec{\psi }}_\sigma (0^+)) + \displaystyle \sum _{t_F \in {\mathcal {F}}_\sigma } ([\mathbf{v}_\sigma ]_{t_F}, {\varvec{\psi }}_\sigma (t_F^+) )\,, \\ F_\sigma (\varphi _{\tau }) &{}:=&{} \displaystyle \int _I (\mathbf{f}, {\varvec{\psi _\sigma }})\;\mathrm {d}t + (\mathbf{v}_{0}, {\varvec{\psi }}_\sigma (0^+))\,. \end{array} \end{aligned}$$

2.5 Discretization in Space and SUPG Stabilization

Next, we describe the Galerkin finite element approximation in space of the semi-discrete transport problem (8) and the flow problem (11), respectively. We use Lagrange type finite element spaces of continuous functions that are piecewise polynomials. For the discretization in space, we consider a separation \(Q_n={\mathcal {T}}_{h,n}\times I_n\) or \(Q_n^{\mathrm {f}}={\mathcal {T}}_{h,n}^{\mathrm {f}}\times I_n^{\mathrm {f}}\), where \({\mathcal {T}}_{h,n}\) or \({\mathcal {T}}_{h,n}^{\mathrm {f}}\) build a decomposition of the domain \(\varOmega \) into disjoint elements K or \(K^{\mathrm {f}}\), such that \({\overline{\varOmega }}=\cup _{K\in {\mathcal {T}}_{h}}{\overline{K}}\) or \({\overline{\varOmega }}= \cup _{K^{\mathrm {f}}\in {\mathcal {T}}_{h}^{\mathrm {f}}}\overline{K^{\mathrm {f}}}\) for the transport and Stokes flow problem, respectively. Here, we choose the elements \(K\in {\mathcal {T}}_{h}\) or \(K^{\mathrm {f}}\in {\mathcal {T}}_{h}^{\mathrm {f}}\) to be quadrilaterals for \(d=2\) and hexahedrals for \(d=3\). We denote by \(h_{K}\) or \(h_{K}^{\mathrm {f}}\) the diameter of the element K or \(K^{\mathrm {f}}\). The global space discretization parameter h or \(h^{\mathrm {f}}\) is given by \(h:=\max _{K\in {\mathcal {T}}_{h}}h_{K}\) or \(h^{\mathrm {f}}:=\max _{K^{\mathrm {f}}\in {\mathcal {T}}_{h}^{\mathrm {f}}}h_{K}^{\mathrm {f}}\), respectively. Our mesh adaptation process yields locally refined cells, which is enabled by using hanging nodes. We point out that the global conformity of the finite element approach is preserved since the unknowns at such hanging nodes are eliminated by interpolation between the neighboring ’regular’ nodes; cf. [22, Chapter 4.2] and [29] for more details. On \({\mathcal {T}}_{h}\) and \({\mathcal {T}}_{h}^{\mathrm {f}}\) we define the discrete finite element spaces by \( V_{h}^{p,n}:= \big \{v\in C(\overline{\varOmega })\mid v_{|K} \in Q_h^p(K)\,,\forall K\in \mathcal {T}_{h},n \big \}\,, \) and \( V_{h^{\mathrm {f}}}^{p,n}:= \big \{v\in C(\overline{\varOmega })\mid v_{|K^{\mathrm {f}}} \in Q_h^p(K^{\mathrm {f}})\,,\forall K^{\mathrm {f}}\in \mathcal {T}_{h}^{\mathrm {f}},n \big \}\,, \) with \(1 \le n \le N,N^{\mathrm {f}}\), where \(Q_h^p(K)\) or \(Q_{h^{\mathrm {f}}}^p(K^{\mathrm {f}})\) is the space defined on the reference element with maximum degree p in each variable. By replacing \(H_0^1(\varOmega )\) in the definition of the semi-discrete function space \(X_{\tau }^{r}\) in (7) by \(V_h^{p,n}\) and by replacing \(H_0^1(\varOmega )^d, L^2(\varOmega )\) in the definition of the semi-discrete function space \(Y_{\sigma }^{r}\) in (10) by \(V_{h^{\mathrm {f}}}^{p,n}\), we obtain the fully discrete function spaces for the transport and Stokes flow problem, respectively,

$$\begin{aligned}&\begin{array}{rcl} X_{\tau h}^{r,p} := &{} \Big \{ &{} {u}_{\tau h}\in X_{\tau }^{r} \,\,\big |\,\, {u}_{\tau h}|_{K_n} \in {\mathcal {P}}_r(K_n;H_h^{p_{{u}},n}) \,,\\ &{}~&{} {u}_{\tau h}(0) \in H_h^{p_{{u}},0}, K_n \in {\mathcal {T}}_{\tau ,n}\,,\,\,n=1,\dots ,N \Big \}\,, \\ Y_{\sigma h^{\mathrm {f}}}^{r,p} := &{} \Big \{ &{} \{ \mathbf{v}_{\sigma h},{p}_{\sigma h} \} \in Y_{\sigma }^{r} \,\,\big |\,\, \mathbf{v}_{\sigma h}|_{K_n} \in {\mathcal {P}}_r(K_n; (H_h^{p_\mathbf{v},n})^d)\,, \\ &{}~&{} \mathbf{v}_{\sigma h}(0)\in (H_h^{p_\mathbf{v},0})^d\,, {p}_{\sigma h}|_{K_n} \in {\mathcal {P}}_r(K_n; L_h^{p_{p},n})\,,\\ &{}~&{} K_n \in {\mathcal {T}}_{\sigma ,n}\,,\,\, n=1,\dots ,N^{\mathrm {f},\ell } \Big \} \end{array} \nonumber \\&H_h^{p_{{u}},n}:=V_h^{p_{{u}},n}\cap H_0^1(\varOmega ), \quad H_h^{p_{\mathbf{v}},n}:=V_h^{p_{\mathbf{v}},n}\cap H_0^1(\varOmega ), \quad L_h^{p_{{p}},n}:=V_h^{p_{{p}},n}\cap L^2(\varOmega ).\nonumber \\ \end{aligned}$$

We note that the spatial finite element space \(V_h^{p,n}\) and \(V_{h^{\mathrm {f}}}^{p,n}\) are allowed to be different on all subintervals \(I_n\) and \(I_n^{\mathrm {f}}\), respectively, which is natural in the context of a discontinuous Galerkin approximation of the time variable and allows dynamic mesh changes in time. Due to the conformity of \(H_h^{p_{{u}},n}\), \(H_h^{p_{\mathbf{v}},n}\) and \(L_h^{p_{{p}},n}\), we get \(X_{\tau h}^{r,p}\subseteq X_{\tau }^{r}\) and \(Y_{\sigma h^{\mathrm {f}}}^{r,p}\subseteq Y_{\sigma }^{r}\), respectively.

For convection-dominated transport, the finite element approximation needs to be stabilized in order to avoid spurious and non-physical oscillations of the discrete solution arising close to sharp fronts and layers. Here, we apply the streamline upwind Petrov–Galerkin (SUPG) method introduced by Hughes and Brooks [30, 31]. With this in mind,the stabilized fully discrete discontinuous in time scheme for the transport problem reads as follows:

For a given \(\mathbf{v}_{\sigma h} \in Y_{\sigma h^{\mathrm {f}}}^{r,p}\) of (15), find \({u}_{\tau h} \in X_{\tau h}^{r,p}\) such that

$$\begin{aligned} A_{S}({u}_{\tau h}; \mathbf{v}_{\sigma h})(\varphi _{\tau h}) = G_{\tau }(\varphi _{\tau h}) \quad \forall \varphi _{\tau h} \in X_{\tau h}^{r,p}\,, \end{aligned}$$

where the linear form \(G_{\tau }(\cdot )\) is defined in (9) and the stabilized bilinear form \(A_{S}(\cdot ;\cdot )(\cdot )\) is given by

$$\begin{aligned} A_{S}(u_{\tau h};\mathbf{v}_{\sigma h})(\varphi _{\tau h}) :=A_{\tau }(u_{\tau h};\mathbf{v}_{\sigma h})(\varphi _{\tau h}) +S_A(u_{\tau h};\mathbf{v}_{\sigma h})(\varphi _{\tau h})\,, \end{aligned}$$

with \(A_{\tau }(\cdot ;\cdot )(\cdot )\) being defined in (9). Here, \(S_A(\cdot ;\cdot )(\cdot )\) is the SUPG stabilized bilinear form obtained by adding weighted residuals. In order to keep this work short, we skip here the explicit presentation of \(S_A\) that can be found, e.g., in our work [25, Sec. 2.5].

Finally, the fully discrete discontinuous in time scheme for the Stokes flow problem reads as follows:

Find \(\{ \mathbf{v}_{\sigma h},{p}_{\sigma h} \} \in Y_{\sigma h^{\mathrm {f}}}^{r,p}\) such that

$$\begin{aligned} B_{\sigma }(\mathbf{v}_{\sigma h},{p}_{\sigma h}) ({\varvec{\psi }}_{\sigma h},\chi _{\sigma h}) = F_{\sigma }({\varvec{\psi }}_{\sigma h}) \quad \forall \{{\varvec{\psi }}_{\sigma h}, \chi _{\sigma h}\} \in Y_{\sigma h^{\mathrm {f}}}^{r,p}\,, \end{aligned}$$

with \(B_{\sigma }(\cdot ,\cdot )(\cdot ,\cdot )\) and \(F_{\sigma }(\cdot )\) being defined in (12).

3 An A Posteriori Error Estimator for the Transport Problem

In this section, we present a DWR-based a posteriori error representation for the stabilized transport problem (14) coupled with the flow problem via the convection tensor \(\mathbf{v}_{\sigma h}\) given by (15). The following error representation formulas are given in terms of a user chosen goal functional \(J(\cdot )\) by using Lagrangian functionals \({\mathcal {L}}\) within a constrained optimization approach, cf. [21, 22, 32]. Since the derivation is close to our work based on a coupling of a steady-state Stokes problem, we keep this section rather short by presenting only the main result regarding the separation of the temporal and spatial discretization errors that serve as local error indicators for the adaptive mesh refinement. For a detailed derivation and more details, we refer to our work [25].

Theorem 1

Let \(\{{u},{z}\}\in X \times X\), \(\{{u}_{\tau },{z}_{\tau }\} \in X_{\tau }^{r} \times X_{\tau }^{r}\), and \(\{{u}_{\tau h},{z}_{\tau h}\} \in X_{\tau h}^{r,p} \times X_{\tau h}^{r,p}\) denote stationary points of \({\mathcal {L}}, {\mathcal {L}}_{\tau }\), and \({\mathcal {L}}_{\tau h}\) on different discretization levels, i.e.,

$$\begin{aligned} \begin{array}{rcl} {\mathcal {L}}^{\prime }({u},{z};\mathbf{v})(\delta {u}, \delta {z}) &{} = &{} 0 \quad \forall \{\delta {u},\delta {z}\}\in X \times X\,, \\ {\mathcal {L}}_{\tau }^{\prime }({u}_{\tau },{z}_{\tau };\mathbf{v}_{\sigma }) (\delta {u}_{\tau }, \delta {z}_{\tau }) &{} = &{} 0 \quad \forall \{\delta {u}_{\tau },\delta {z}_{\tau }\} \in X_{\tau }^{r} \times X_{\tau }^{r}\,, \\ {\mathcal {L}}_{\tau h}^{\prime }({u}_{\tau h},{z}_{\tau h};\mathbf{v}_{\sigma h}) (\delta {u}_{\tau h}, \delta {z}_{\tau h}) &{} = &{} 0 \quad \forall \{\delta {u}_{\tau h},\delta {z}_{\tau h}\} \in X_{\tau h}^{r,p} \times X_{\tau h}^{r,p}\,. \end{array} \end{aligned}$$

Additionally, for the errors \(e = {u}- {u}_{\tau }\) and \(e = {u}_{\tau } - {u}_{\tau h}\) we have the Eqs. (27) and (28) of Galerkin orthogonality type. Then, for the discretization errors in space and time we get the representation formulas

$$\begin{aligned} \begin{array}{rcl} J({u})-J({u}_{\tau }) &{}=&{} \frac{1}{2}\rho ({u}_{\tau };\mathbf{v})({z}-{\tilde{{z}}}_{\tau }) + \frac{1}{2}\rho ^{*}({u}_{\tau },{z}_{\tau };\mathbf{v}) ({u}-{\tilde{{u}}}_{\tau }) \\ &{}&{} + \frac{1}{2} {\mathcal {D}}_{\tau }^{\prime }({u}_{\tau },{z}_{\tau }) ({\tilde{{u}}}_{\tau }-{u}_{\tau },{\tilde{{z}}}_{\tau }-{z}_{\tau }) + {\mathcal {D}}_{\tau }({u}_{\tau },{z}_{\tau }) + {\mathcal {R}}_{\tau }\,, \\ J({u}_{\tau })-J({u}_{\tau h}) &{} = &{} \frac{1}{2}\rho _{\tau }({u}_{\tau h};\mathbf{v}_{\sigma })({z}_{\tau }-{\tilde{{z}}}_{\tau h}) + \frac{1}{2} \rho _{\tau }^{*}({u}_{\tau h},{z}_{\tau h};\mathbf{v}_{\sigma }) ({u}_{\tau }-{\tilde{{u}}}_{\tau h}) \\ &{}&{} + \frac{1}{2} {\mathcal {D}}_{\tau h}^{\prime }({u}_{\tau h},{z}_{\tau h}) ({\tilde{{u}}}_{\tau h}-{u}_{\tau h},{\tilde{{z}}}_{\tau h}-{z}_{\tau h}) \\ &{}&{} + {\mathcal {D}}_{\tau h}({u}_{\tau h},{z}_{\tau h}) + {\mathcal {R}}_{h}\,, \end{array} \end{aligned}$$

with non-vanishing Galerkin orthogonality terms \({\mathcal {D}}_{\tau }(\cdot ,\cdot )\) and \({\mathcal {D}}_{\tau h}(\cdot ,\cdot )\), given by

$$\begin{aligned} \begin{array}{rcl} {\mathcal {D}}_{\tau }({u}_{\tau },{z}_{\tau }) &{}=&{} \displaystyle \sum _{t_F \in {\mathcal {F}}_\tau } ( [{u}_\tau ]_{t_F},{z}_{\tau }(t_F^+)) \\ &{}&{} \displaystyle -\sum _{n=1}^{N^{\ell }}\sum _{K_n\in {\mathcal {T}}_{\tau ,n}}\int _{K_n}\big ( (\mathbf{v}-\mathbf{v}_{\sigma })\cdot \nabla {u}_\tau ,{z}_\tau \big )\;\mathrm {d}t\,,\\ {\mathcal {D}}_{\tau h}(\varphi ,\psi ) &{}=&{} \displaystyle S_A({u}_{\tau h}; \mathbf{v}_{\sigma h})({z}_{\tau h}) \\ &{}&{} \displaystyle -\sum _{n=1}^{N^{\ell }}\sum _{K_n\in {\mathcal {T}}_{\tau ,n}}\int _{K_n}\big ( (\mathbf{v}_{\sigma }-\mathbf{v}_{\sigma h})\cdot \nabla {u}_{\tau h}, {z}_{\tau h} \big )\;\mathrm {d}t\,, \end{array} \end{aligned}$$

where \({\mathcal {D}}^\prime _{\tau }(\cdot ,\cdot )(\cdot ,\cdot )\) and \({\mathcal {D}}^\prime _{\tau h}(\cdot ,\cdot )(\cdot ,\cdot )\) denote the Gâteaux derivatives with respect to the first and second argument. Here, \(\{{\tilde{{u}}}_{\tau },{\tilde{{z}}}_{\tau }\}\in X_{\tau }^{r} \times X_{\tau }^{r}\), and \(\{{\tilde{{u}}}_{\tau h},{\tilde{{z}}}_{\tau h}\} \in X_{\tau h}^{r,p} \times X_{\tau h}^{r,p}\) can be chosen arbitrarily and the remainder terms \({\mathcal {R}}_{\tau }, {\mathcal {R}}_{h}\) are of higher-order with respect to the errors \({u}-{u}_\tau ,{z}-{z}_\tau \) and \({u}_{\tau }-{u}_{\tau h},{z}_{\tau }-{z}_{\tau h}\), respectively.

The explicit presentations of the Lagrangian functionals \({\mathcal {L}}, {\mathcal {L}}_{\tau }\) and \({\mathcal {L}}_{\tau h}\) as well as the primal and dual residuals based on the continuous and semi-discrete schemes \(\rho , \rho ^{*}\) and \(\rho _\tau ,\rho _\tau ^*\), respectively, are given in the Appendix.

Remark 1

We note that within the temporal error representation formula (first equation in (16)) additional terms due to the coupling occur, cf. Eq. (17). This is an extension to our previous results obtained in [33] and [25]. Furthermore, we indicate that the occurring differences \(v-{\tilde{v}}_{\tau }\) and \(v_{\tau }-{\tilde{v}}_{\tau h}\) with regard to the primal and dual variables are called temporal and spatial weights, respectively.


The technique to prove the temporal error representation formula (first equation in (16)) is equivalent to the spatial counterpart that can be found in our work [25, Thm. 3.1] and was originally proved by Besier and Rannacher applied to the incompressible Navier-Stokes equations in [32, Thm. 5.2]. More precisely, we are using a general result given in [32, Lemma 5.1] with the following settings:

$$\begin{aligned} L = {\mathcal {L}}\,,\;\; {\tilde{L}}={\mathcal {L}}_{\tau }\,,\;\; Y_1 = X \times X\,,\;\; Y_2 = X_{\tau }^{r} \times X_{\tau }^{r}\,,\;\; Y:=Y_1+Y_2\,, \end{aligned}$$

where \({\mathcal {L}},{\mathcal {L}}_{\tau }\) are the Lagrangian functionals given by (29) and \(Y,Y_1\) and \(Y_2\) are function spaces defined in [32, Lemma 5.1]. \(\square \)

4 Implementation of Tensor-Product Spaces

In this section, we explain the implementation of space-time tensor-product spaces in detail. We restrict the explanation to the case of the scalar-valued transport equation with primal and dual finite element spaces. The implementation for the primal vector-valued Stokes flow problem is very similar with the difference that the spatial finite element has d+1 components for the velocity and pressure variables. We denote the number of spatial degrees of freedom by \(N_{\mathrm {DoF}}^{\mathrm {s,n}}\) for one degree of freedom in time and the number of temporal degrees of freedom by \(N_{\mathrm {DoF}}^{\mathrm {t,n}}\) on the n-th slab.

Fig. 2
figure 2

Two consecutive space-time slabs, exemplary for a discontinuous Galerkin \(\text {dG}(2)\) time discretization generated with three Gaussian quadrature points. The three degrees of freedom (DoF) time points on each slab are the support points for the temporal basis functions. Each of the illustrated slabs here has one temporal cell and an independent and adaptively refined spatial triangulation

To implement the space-time tensor-product space, as illustrated in Fig. 2, we start with the usual discretization of the finite element method in space having only one degree of freedom in time in an adaptive time marching process, but here we do this for each slab. Therefore, we generate the geometrical triangulation, i.e. a spatial mesh, and colourize the boundaries. Boundary colours can mark for instance Dirichlet type boundary conditions, Neumann type boundary conditions, etc. Next, we initialize each slab by creating an independent copy of the generated spatial triangulation.

Then, for one degree of freedom in time on each slab, we distribute the spatial degrees of freedom and generate affine constraints objects. Remark that an affine constraints object may include information on handling degrees of freedom on hanging nodes or on Dirichlet type boundary nodes. The sparsity pattern for a sparse matrix is now generated with the geometric triangulation, the spatial degree of freedom (DoF) handler and the constraints object for one degree of freedom in time.

Next, the space-time tensor-product degrees of freedom on a slab are aligned by their local degree of freedom in time on a slab. Precisely, the first degree of freedom in time has the global number 0 and the last one has the number \(N_{\mathrm {DoF}}^{\mathrm {t,n}}-1\). The numbering of the local temporal degrees of freedom is increasingly ordered by their mesh cell index. Remark that we have an additional one-dimensional triangulation (temporal mesh) for the time subinterval \((t_{n-1}, t_n)\) corresponding to the n-th slab; refer to the Fig. 3 for details. Overall, we have \(N_{\mathrm {DoF}}^{\mathrm {t,n}}\) times \(N_{\mathrm {DoF}}^{\mathrm {s,n}}\) degrees of freedom on the n-th slab. Then, the space-time tensor-product constraints are created by taking the original constraints object and shifting all entries accordingly such that the \(N_{\mathrm {DoF}}^{\mathrm {t,n}}\) are represented. Precisely, the spatial degrees of freedom from 0 to \(N_{\mathrm {DoF}}^{\mathrm {s}}-1\) are associated to the first local temporal degree of freedom on a slab. If there are more than one temporal degrees of freedom on a slab, the corresponding spatial degrees of freedom are shifted by the number \(N_{\mathrm {DoF}}^{\mathrm {s,n}}\) times the local temporal degree of freedom index.

Fig. 3
figure 3

Generation of space-time elements for tensor-product spaces on a slab

Fig. 4
figure 4

Sparsity pattern for the primal operator on a slab for cG(1)–dG(1) with 4 mesh cells in space and 4 mesh cells in time before condensing the Dirichlet nodes. The blocks having black dots correspond to a classical sparsity pattern for one degree of freedom in time. The blocks with green dots are additional couplings between the two time basis functions on a temporal cell. The blocks with red dots are additional couplings from the temporal jump trace operator between two time cells (left). Primal (middle) and dual (right) operator matrix sparsity patterns on a slab for cG(1)–dG(1) on 16 cells in space and 4 cells in time after condensing the Dirichlet nodes

For each degree of freedom in time, the sparsity pattern is now copied into the diagonal blocks for the space-time tensor product sparsity pattern. A higher-order polynomial degree in time introduces couplings between the temporal basis functions resulting in additional coupling blocks. For the case of more than one time cell per slab, additional couplings appear for temporal derivatives between the time basis functions of two consecutive time cells. For the primal problem, the evolution is forward in time and therefore these couplings appear in the left lower part. For the dual problem, the evolution is backward in time and therefore the coupling diagonals appear in the right upper part. Exemplary sparsity patterns are given in Fig. 4.

For the assembly process we can use the basis functions and their derivatives in time similar to the classical finite element approach in space. But the distribution of the local contributions must respect the order of the temporal basis functions. First, we take the mapping from a local to a global degree of freedom in space. To respect the temporal basis functions, we shift the local to global mapping accordingly by the factor of local degrees of freedom in space on a spatial cell. This results in a shift of each global degree of freedom by the factor of \(N_{\mathrm {DoF}}^{\mathrm {s,n}}\) times the global degree of freedom of the respective basis function in time. The local matrix has therefore the size of the local degrees of freedom on a spatial mesh cell times the local degrees of freedom in time on a temporal mesh cell. In the case of more than on time cell per slab, an additional local matrix is assembled for the coupling of the trial basis functions of the previous time cell and the test basis functions of the current time cell. This implements the negative part of the jump trace operator in time which is transferred to the right-hand side in a classical time marching approach.

Finally, the space-time constraints of the slab have to be applied to the system matrix, the solution vector and the right-hand side vector. The space-time hanging node constraints have to be condensed in the solution vector after solving the linear system for all degrees of freedom on the slab.

5 Algorithm

Our space-time adaptivity and mesh refinement strategy uses the following algorithm. Here, we are interested to control the transport problem under the condition that the influence of the error in the Stokes flow problem stays small.

figure a

Remark 2

  • For the spatial discretization of the Stokes flow problem we are using Taylor-Hood elements \(Q_p/Q_{p-1}\,, p \ge 2\). In order to ensure the conditions to the temporal meshes outlined in Sect. 2.2, we refine the transport meshes after the Stokes flow meshes such that the endpoints in the temporal mesh of the Stokes solver match with endpoints in the temporal mesh of the transport solver.

  • Within the Steps 2, 4 and 5 of the algorithm, the computed convection field \(\mathbf{v}_{\sigma h}\) of the Stokes problem is interpolated to the adaptively refined spatial and temporal triangulation of the space-time slabs. By means of the variational equation (15) along with the definition (12) of the bilinear form \(B_{\sigma }\) the fully discrete velocity \(\mathbf{v}_{\sigma h}\) is weakly divergence free on the spatial mesh \({\mathcal {T}}_{\sigma ,n}\) of the flow problem. However, on the spatial mesh \({\mathcal {T}}_{\tau ,n}\) of the transport problem this constraint is in general violated due to the different decomposition of \(\varOmega \). The lack of divergence-freeness might be the source of an approximation error. By the application of an additional Helmholtz or Stokes projection (cf. [34, Rem. 2.1]) the divergence-free constraint can be recovered on the spatial mesh of the transport quantity \(u_{\tau h}\). This amounts to the solution of a problem of Stokes type for each of the fully discrete velocities fields of the temporal flow mesh (cf. Fig. 1). In the numerical experiments of Sect. 6 we did not observe any problems without post-proccesing the velocity fields to ensure discrete divergence-freeness on \({\mathcal {T}}_{\tau ,n}\).

  • Our simulation tools of the DTM++ project are frontend solvers for the deal.II library; cf. [9]. Technical details of the implementation are given in [8, 25].

In the following, we give some details regarding the localization of the error representations derived in Theorem 1. Their practical realization and the definition of error indicators \(\eta _{\tau }\) and \(\eta _{h}\) are obtained by neglecting the remainder terms \({\mathcal {R}}_{\tau }\) and \({\mathcal {R}}_{h}\) and splitting the resulting quantities into elementwise contributions by means of the classical approach using integration by parts on every single mesh element, cf. [21].

$$\begin{aligned}&\begin{array}{rcl} J({u})-J({u}_{\tau }) &{} \doteq &{} \frac{1}{2}\rho _{\mathrm {t}}^{n,\ell }({u}_{\tau })({z}-{\tilde{{z}}}_{\tau }) + \frac{1}{2}\rho _{\mathrm {t}}^{*,n}({u}_{\tau },{z}_{\tau }) ({u}-{\tilde{{u}}}_{\tau }) \\ &{}&{} + \frac{1}{2} {\mathcal {D}}_{\tau }^{\prime ,n,\ell }({u}_{\tau },{z}_{\tau }) ({\tilde{{u}}}_{\tau }-{u}_{\tau },{\tilde{{z}}}_{\tau }-{z}_{\tau }) + {\mathcal {D}}_{\tau h}^{n,\ell }({u}_{\tau h},{z}_{\tau h}) \\ &{} =: &{} \eta _{\tau }^\ell = \displaystyle \sum _{n=1}^{N^\ell } \eta _{\tau }^{n,\ell }\,, \end{array} \end{aligned}$$
$$\begin{aligned}&\begin{array}{rcl} J({u}_{\tau })-J({u}_{\tau h}) &{} \doteq &{} \frac{1}{2}\rho _{\mathrm {t}}^{n,\ell }({u}_{\tau h})({z}_{\tau }-{\tilde{{z}}}_{\tau h}) + \frac{1}{2} \rho _{\mathrm {t}}^{*,n,\ell }({u}_{\tau h},{z}_{\tau h}) ({u}_{\tau }-{\tilde{{u}}}_{\tau h}) \\ &{}&{} + \frac{1}{2} {\mathcal {D}}_{\tau h}^{\prime ,n,\ell }({u}_{\tau h},{z}_{\tau h}) ({\tilde{{u}}}_{\tau h}-{u}_{\tau h},{\tilde{{z}}}_{\tau h}-{z}_{\tau h}) \\ &{}&{} + {\mathcal {D}}_{\tau h}^{n,\ell }({u}_{\tau h},{z}_{\tau h}) \\ &{} =: &{} \eta _h^\ell = \displaystyle \sum _{n=1}^{N^\ell } \eta _{h}^{n,\ell } = \displaystyle \sum _{n=1}^{N^\ell } \sum \limits _{K\in {\mathcal {T}}_h^{n,\ell }} \eta _{h,K}^{n,\ell }\,. \end{array} \end{aligned}$$

To compute these error indicators, we replace all unknown solutions by the approximated fully discrete solutions \({u}_{\tau h} \in X_{\tau h}^{r, p}\), \({z}_{\tau h} \in X_{\tau h}^{r, q}\), with \(p < q\), and \(\mathbf{v}_{\sigma h} \in Y_{\sigma h^{\mathrm {f}}}^{0,p_\mathbf{v}}\), \(p_\mathbf{v}\ge 2\), whereby the arising weights are approximated in the following way.

  • Approximate the temporal weights \(u-{\tilde{u}}_{\tau }, z-{\tilde{z}}_{\tau }\) by means of a higher-order reconstruction using Gauss-Lobatto quadrature points, exemplary given by

    $$\begin{aligned} \begin{array}{rcl} u-{\tilde{u}}_{\tau }\approx & {} \mathrm {E}_{\tau }^{(r+1)}u_{\tau h}-u_{\tau h}\,, \end{array} \end{aligned}$$

    using an reconstruction in time operator \(\mathrm {E}_{\tau }^{(r+1)}\) thats acts on a time cell of length \(\tau _K\) and lifts the solution to a piecewise polynomial of degree (r+1) in time. This approximation technique is a new approach compared to out previous work [25, Sec. 4], where a higher-order finite element approximation was used, and is done for the purpose to reduce numerical costs solving the dual problem.

  • Approximate the spatial weights \(u_{\tau }-{\tilde{u}}_{\tau h}\) and \(z_{\tau }-{\tilde{z}}_{\tau h}\) by means of a patch-wise higher-order interpolation and a higher-order finite elements approach, respectively, given by

    $$\begin{aligned} \begin{array}{rcl} u_{\tau }-{\tilde{u}}_{\tau h} &{} \approx &{} \mathrm {I}_{2h}^{(2p)}u_{\tau h}-u_{\tau h}\,, \\ z_{\tau }-{\tilde{z}}_{\tau h} &{} \approx &{} z_{\tau h}-\mathrm {R}_{h}^{p}z_{\tau h}\,, \end{array} \end{aligned}$$

    using an interpolation in space operator \(\mathrm {I}_{2h}^{(2p)}\) and an restriction in space operator \(\mathrm {R}_{h}^{p}\) that are described in detail in our work [25, Sec. 4].

6 Numerical Examples

In this section, we study the convergence, computational efficiency and stability of the introduced DWR-based adaptivity approach for the coupled transport and Stokes flow problem. The first example given in Sect. 6.1 is an academic test problem with given analytical solutions to study the convergence behavior of the two subproblems and, in particular, the coupling between them. The second example given in Sect. 6.2 serves to demonstrate the performance properties of the algorithm with regard to adaptive mesh refinement in space and time. Finally, the third example in Sect. 6.3 is motivated by a problem of physical relevance in which we simulate a convection-dominated transport with goal-oriented adaptivity of a species through a channel with a constraint.

6.1 Example 1 (Higher-Order Space-Time Convergence Studies)

In a first numerical example, we study the space-time higher-order convergence behavior to validate the correctness of the higher-order implementations in space and time. Therefore, we consider the two cases of a solely solved Stokes flow problem as well as a non-stabilized solved convection–diffusion–reaction transport problem coupled with this Stokes equation via the convection field solution \(\mathbf{v}_{\sigma h}\). The latter may be compared to the results of a solely solved transport equation with a constant convection field \(\mathbf{v}=(2,3)^\top \) published in our work [25, Example 1]. For this purpose, we investigate problem (3) with the given analytical solution

$$\begin{aligned} \begin{array}{rcl} \mathbf{v}({\varvec{x}}, t) &{}:=&{} \left( \begin{array}{c} \sin (t)\sin ^2(\pi x_1)\sin (\pi x_2)\cos (\pi x_2) \\ -\sin (t)\sin (\pi x_1)\cos (\pi x_1)\sin ^2(\pi x_2) \end{array}\right) \,, \\ {p}(\mathbf{x}, t) &{}:=&{} \sin (t)\sin (\pi x_1)\cos (\pi x_1)\sin (\pi x_2)\cos (\pi x_2)\,, \end{array} \end{aligned}$$

with \({\varvec{x}} = (x_1, x_2)^\top \in {\mathbb {R}}^2\,, t \in {\mathbb {R}}\) and \(\nabla \cdot \mathbf{v}= 0\). The viscosity is set to \({\nu }=0.5\). The problem is defined on \(Q=\varOmega \times I:=(0,1)^2\times (0,1]\). The initial and boundary conditions are given as

$$\begin{aligned} \mathbf{v}= 0 \,\text { on }\, \varSigma _0 = \varOmega \times \{ 0 \}\,, \quad \mathbf{v}= 0 \,\text { on }\, \varSigma _D = \partial \varOmega \times (0,1)\,, \end{aligned}$$

and the volume force term \(\mathbf{f}\) is calculated from the given analytical solution (20) and Eq. (3). This example is a typical test problem for time-dependent incompressible flow and can be found, for instance, in [32, Example 1].

For the following test settings, the solution \(\{\mathbf{v},{p}\}\) is approximated with the space-time higher-order methods {cG(2)–dG(2), cG(1)–dG(2)} and {cG(3)–dG(3), cG(2)–dG(3)}, respectively. Due to the same polynomial orders of the spatial and temporal discretizations with respect to the convection field \(\mathbf{v}\), and lower polynomial order in space compared to in time with respect to the pressure variable \({p}\), we expect experimental orders of convergence (EOC \(:= -\log _2(|| e ||_\ell / || e ||_{\ell -1})\)) for the convection field \(\mathbf{v}\) of \(\text {EOC}^{2,2} \approx 3\) for the cG(2)–dG(2) method and \(\text {EOC}^{3,3} \approx 4\) for the cG(3)–dG(3) method, as well as experimental orders of convergence for the pressure variable \({p}\) of \(\text {EOC}^{1,2} \approx 2\) for the cG(1)–dG(2) method and \(\text {EOC}^{2,3} \approx 3\) for the cG(2)–dG(3) method for a global refinement convergence test. The results are given by Table 1 and nicely confirm our expected results for the respective spatial and temporal discretizations.

Table 1 Global convergence for \(\mathbf{v}_{\sigma h}^{2,2},{p}_{\sigma h}^{1,2}\) in a cG(2)–dG(2), cG(1)–dG(2) and \(\mathbf{v}_{\sigma h}^{3,3},{p}_{\sigma h}^{2,3}\) in a cG(3)–dG(3), cG(2)–dG(3) primal approximation for a time-dependent Stokes flow problem for Sect. 6.1

The second part of the first example now serves to verify the higher-order implementation of the coupled problem. Therefore, the convection–diffusion–reaction transport problem (1) is coupled with the Stokes flow problem (3) via the convection field solution \(\mathbf{v}_{\sigma h}\), using the exact solution \(\mathbf{v}\) given by Eq. (20). More precisely, we study problem (1) with the given analytical solution

$$\begin{aligned} \begin{array}{lcl} u({\varvec{x}}, t) &{}:=&{} u_1 \cdot u_2\,,\,\, {\varvec{x}} = (x_1, x_2)^\top \in {\mathbb {R}}^2 \text { and } t \in {\mathbb {R}}\,,\\ u_1({\varvec{x}}, t) &{}:=&{} (1 + a \cdot ( (x_1 - m_1(t))^2 + (x_2 - m_2(t))^2 ) )^{-1}\,,\\ u_2(t) &{}:=&{} \nu _1(t) \cdot s \cdot \arctan ( \nu _2(t) )\,, \end{array} \end{aligned}$$

with \(m_1(t) := \frac{1}{2} + \frac{1}{4} \cos (2 \pi t)\) and \(m_2(t) := \frac{1}{2} + \frac{1}{4} \sin (2 \pi t)\), and, \(\nu _1({{\hat{t}}}) := -1\), \(\nu _2({{\hat{t}}}) := 5 \pi \cdot (4 {{\hat{t}}} - 1)\), for \({{\hat{t}}} \in [0, 0.5)\) and \(\nu _1({{\hat{t}}}) := 1\), \(\nu _2({{\hat{t}}}) := 5 \pi \cdot (4 ({{\hat{t}}}-0.5) - 1)\), for \({{\hat{t}}} \in [0.5, 1)\), \({{\hat{t}}} = t - k\), \(k \in {\mathbb {N}}_0\), and, scalars \(a = 50\) and \(s=-\frac{1}{3}\). The (analytic) solution (21) mimics a counterclockwise rotating cone which additionally changes its height and orientation over the period \(T=1\). Precisely, the orientation of the cone switches from negative to positive while passing \(t=0.25\) and from positive to negative while passing \(t=0.75\). The inhomogeneous Dirichlet boundary condition, the inhomogeneous initial condition and the right-hand side forcing term \({g}\), are calculated from the given analytic solution (21) and Eq. (1), where the latter uses the exact Stokes solution \(\mathbf{v}\) given by Eq. (20). Moreover, we note that the assembly of the transport system matrix uses the approximated fully-discrete Stokes solution \(\mathbf{v}_{\sigma h}\) of (15) that has to be transferred to the spatial and temporal mesh of the transport problem, cf. Remark 2 in Sect. 5.

Since we study the global space-time refinement behavior here, we restrict the convection–diffusion–reaction transport problem to a non-stabilized case, i.e. we set \(\delta _0:=0\) within the local SUPG stabilization parameter \(\delta _K = \delta _0 \cdot h_K\), where \(h_K\) denotes the cell diameter of the spatial mesh cell K. Moreover, we set the diffusion coefficient \(\varepsilon =1\) and choose a constant reaction coefficient \(\alpha =1\).

Table 2 Global convergence for \({u}_{\tau h}^{1,1}\) in a cG(1)–dG(1) and \({u}_{\tau h}^{2,2}\) in a cG(2)–dG(2) primal approximation of the transport problem using \(\mathbf{v}_{\sigma h}^{2,0}\) in a cG(2)–dG(0) and \(\mathbf{v}_{\sigma h}^{3,0}\) in a cG(3)–dG(0) primal approximation of the flow problem for Sect. 6.1

The global space-time refinement behavior is illustrated by Table 2 and nicely confirms our results with respect to the expected EOCs for the solely solved transport problem obtained in [25, Example 1], cf. columns four and five of Table 2. Furthermore, with regard to the EOCs of the Stokes solution, we note that both approximations cG(2)–dG(0) as well as cG(3)–dG(0) are restricted through the lowest order approximation in time, cf. columns eight and nine of Table 2.

6.2 Example 2 (Space-Time Adaptivity Studies for the Coupled Problem)

The second example serves to study the goal-oriented space-time adaptivity behavior of our algorithm introduced in Sect. 5. More precisely, the transport problem is adaptively refined in space and time using an approximated Stokes solution \(\mathbf{v}_{\sigma h}\) on a coarser global refined mesh in space and time. The initial space-time meshes of the transport problem are once more refined compared to the initial meshes of the Stokes flow problem, cf. the first row of Table 3. The temporal and spatial mesh of the Stokes flow problem is refined globally if the global \(L^2(L^2)\)-error \(||\mathbf{v}-\mathbf{v}_{\sigma h}^{2,0}||\) is larger than its counterpart \(||u-u_{\tau h}^{1,0}||\) or rather \(||u-u_{\tau h}^{1,1}||\) for the transport problem (cf. columns five and nine of Tables 3 and 4, respectively.).

We study problem (1) and (3) with the given analytical solutions (21) and (20), respectively, with the same settings as given in Sect. 6.1. Our target quantity for the transport problem is chosen to control the global \(L^2(L^2)\)-error of e, \(e = {u}- {u}_{\tau h}\), in space and time, given by

$$\begin{aligned} J(\varphi )= \frac{1}{\Vert e\Vert _{(0,T)\times \varOmega }} \displaystyle \int _I(\varphi ,e)\mathrm {d}t\,, \quad \mathrm {with} \;\; \Vert \cdot \Vert _{(0,T)\times \varOmega } =\left( \int _I(\cdot ,\cdot )\;\mathrm {d}t\right) ^{\frac{1}{2}}\,. \end{aligned}$$

The tuning parameters of the goal-oriented adaptive Algorithm given in Sect. 5 are chosen here in a way to balance automatically the potential misfit of the spatial and temporal errors as

$$\begin{aligned} \theta _h^\mathrm {top} = 0.5 \cdot \frac{|\eta _h|}{|\eta _h| + |\eta _\tau |} \,,\quad \theta _h^\mathrm {bottom} = 0\quad \text {and}\quad \theta _\tau ^\mathrm {top} = 0.5 \cdot \frac{|\eta _\tau |}{|\eta _h| + |\eta _\tau |} \,. \end{aligned}$$

For measuring the accuracy of the error estimator, we will study the so-called effectivity index as the ratio of the estimated error over the exact error, given by

$$\begin{aligned} {\mathcal {I}}_{\text {eff}} = \left| \frac{\eta _{\tau }+\eta _{h}}{J({u}) -J({u}_{\tau h})}\right| \end{aligned}$$

Desirably, the index \({\mathcal {I}}_{\text {eff}}\) should be close to one. In Tables 3 and 4 we present the development of the total discretization error \(J(e)=\Vert e\Vert _{(0,T)\times \varOmega }\) for (22), the approximated spatial and temporal error estimators \(\eta _h\) and \(\eta _{\tau }\) as well as the effectivity index \({\mathcal {I}}_{\mathrm {eff}}\) during an adaptive refinement process for two different primal and dual solution pairings \(\{u_{\tau h},z_{\tau h}\}\): cG(1)–dG(0)/cG(2)–dG(0), cG(1)–dG(1)/cG(2)–dG(1) of the transport problem. Moreover, the development of the total discretization error \(||\mathbf{v}-\mathbf{v}_{\sigma h}^{2,0}||\) for the Stokes flow solution on a global refined mesh in space and time and the corresponding number of slabs and spatial cells is displayed. Thereby, \(\mathbf{v}_{\sigma h}^{2,0}\) corresponds to a Stokes solution approximation in a cG(2)–dG(0) discretization. We use an approximation of the temporal weights by a higher-order reconstruction strategy using Gauss-Lobatto quadrature points. Here and in the following, \(\ell \) denotes the refinement level or DWR loop, N or \(N^{\mathrm {f}}\) the total cells in time, \(N_{K}^{\mathrm {max}}\) or \(N_{K}^{\mathrm {f},\mathrm {max}}\) the number of spatial cells on the finest spatial mesh within the current loop, and \(N_{\mathrm {DoF}}^{\mathrm {tot}}\) or \(N_{\mathrm {DoF}}^{\mathrm {f},\mathrm {tot}}\) the total space-time degrees of freedom of the transport or Stokes flow problem, respectively.

Regarding the accuracy of the underlying error estimator, as given by the last column of Tables 3 or 4, respectively, we observe a good quantitative estimation of the discretization error as the respective effectivity index increases getting close to one. With regard to efficiency reasons for a space-time adaptive algorithm, it is essential to ensure an equilibrated reduction of the temporal as well as spatial discretization error, cf. [32, Sec. 3.3]. Referring to this, we point out a good equilibration of the spatial and temporal error indicators \(\eta _{h}\) and \(\eta _{\tau }\) in the course of the refinement process (columns ten and eleven of Tables 3 and 4).

Table 3 Adaptive refinement in the transport problem including effectivity indices for goal quantity (22), with \(\varepsilon = 1\), \(\delta _0=0\), and \(\omega = 3\) for Sect. 6.2 using a Stokes solution \(\mathbf{v}_{\sigma h}^{2,0}\) corresponding to a cG(2)–dG(0) approximation on a globally refined mesh in space and time
Table 4 Adaptive refinement in the transport problem including effectivity indices for goal quantity (22), with \(\varepsilon = 1\), \(\delta _0=0\), and \(\omega = 3\) for Sect. 6.2 using a Stokes solution \(\mathbf{v}_{\sigma h}^{2,0}\) corresponding to a cG(2)–dG(0) approximation on a globally refined mesh in space and time

Finally, in Fig. 5 we visualize exemplary the distribution of the adaptively determined time cell lengths \(\tau _K\) of \({\mathcal {T}}_{\tau ,n}\), used for the transport problem, as well as the distribution of the globally determined time cell lengths \(\sigma _K\) of \({\mathcal {T}}_{\sigma ,n}\), used for the Stokes flow problem, over the whole time interval I for different DWR refinement loops, corresponding to Table 3. The initial temporal meshes for the transport and Stokes flow problem are chosen fulfilling the requirements presented in Sect. 2.2 and Fig. 1. While the time steps for the transport problem become smaller when the cone is changing its orientation (\(t=0.25\) and \(t=0.75\)), the time steps for the Stokes flow problem stay comparatively large in the course of the refinement process, cf. the last two plots of Fig. 5. Away from the time points of orientation change, the temporal mesh of the transport problem is almost equally decomposed. This behavior seems natural for a global acting target quantity (22) and nicely confirms our approach of an efficient temporal approximation of a rapidly changing transport coupled with a slowly varying viscous flow.

Fig. 5
figure 5

Distribution of the temporal step size \(\tau _K\) of the transport problem (adaptive) and \(\sigma _K\) of the Stokes flow problem (global) over the time interval \(I=(0,T]\) for the initial (1) and after 5 and 10 DWR-loops, corresponding to Table 3

6.3 Example 3 (Transport in a Channel)

In this example, we simulate a convection-dominated transport with goal-oriented adaptivity of a species through a channel with a constraint. The domain and its boundary colorization are presented by Fig. 6. Precisely, the spatial domain is composed of two unit squares and a constraint in the middle which restricts the channel height by a factor of 5. Precisely, \(\varOmega = (-1,0)\times (-0.5,0.5) \cup (0,1)\times (-0.1,0.1) \cup (1,2)\times (-0.5,0.5)\) with an initial cell diameter of \(h=\sqrt{2 \cdot 0.025^2}\). The time domain is set to \(I=(0,2.5)\) with an initial \(\tau =0.1\) for the transport and \(\sigma =2.5\) for the Stokes flow problem for the initialization of the slabs for the first loop \(\ell =1\). This choice has been made to compare the results to Example 2 in [25], where a quasi-stationary Stokes flow solution \(\mathbf{v}_h\) was used. We approximate the primal solution \({u}_{\tau h}^{1,0}\) with the cG(1)–dG(0) method, the dual solution \({z}_{\tau h}^{2,0}\) with the cG(2)–dG(0) method and the Stokes flow solution \(\mathbf{v}_{\sigma h}^{2,0}\) with the cG(2)–dG(0) method.

Fig. 6
figure 6

Boundary colorization for the convection–diffusion–reaction problem (left) and the coupled Stokes flow problem (right) for Sect. 6.3

Fig. 7
figure 7

Convection \(\mathbf{v}_{\sigma h}\) solution of the Stokes problem on one slab with a sufficiently globally refined spatial mesh with \(Q_2\)\(Q_1\) finite elements for Sect. 6.3. On the left boundary a parabolic inflow profile in the positive x-direction with unit magnitude is prescribed for the convection \(\mathbf{v}\)

The target quantity is

$$\begin{aligned} J(u)= \frac{1}{T \cdot |\varOmega |} \displaystyle \int _I\int _\varOmega u({\varvec{x}}, t)\, \mathrm {d}{} \mathbf{x}\mathrm {d}t\,. \end{aligned}$$

The transport of the species, which enters the domain on the left with an inhomogeneous and time-dependent Dirichlet boundary condition and leaves the domain on the right through a homogeneous Neumann boundary condition, is driven by the convection with magnitudes between 0 and 5 as displayed in Fig. 7. The diffusion coefficient has the constant and small value of \(\varepsilon =10^{-4}\) and the reaction coefficient is chosen \(\alpha =0.1\). The local SUPG stabilization coefficient is here set to \(\delta _K = \delta _0 \cdot h_K\), \(\delta _0=0\), i.e. a vanishing stabilization here. The initial value function \({u}_0=0\) as well as the forcing term \({g}=0\) are homogeneous. The Dirichlet boundary function value is homogeneous on \(\varGamma _D\) except for the line \((-1,-1) \times (-0.4,0.4)\) and time \(0 \le t \le 0.2\) where the constant value

$$\begin{aligned} {u}(\mathbf{x},t)=1 \end{aligned}$$

is prescribed on the solution. The viscosity is set to \({\nu }=1\). The tuning parameters of the goal-oriented adaptive Algorithm given in Sect. 5 are chosen here in a way to balance automatically the potential misfit of the spatial and temporal errors as \(\theta _h^\mathrm {bottom} = 0\),

$$\begin{aligned} \theta _h^\mathrm {top} = \frac{1}{2} \cdot \min \left\{ \frac{|\eta _h|}{|\eta _h| + |\eta _\tau |}, 1\right\} \,\text { and }\, \theta _\tau ^\mathrm {top} = \frac{1}{2} \cdot \min \left\{ \frac{|\eta _\tau |}{|\eta _h| + |\eta _\tau |}, 1\right\} . \end{aligned}$$
Fig. 8
figure 8

Solution profiles and corresponding meshes of loop \(\ell =8\) for Sect. 6.3

Fig. 9
figure 9

Capturing of spurious oscillations with goal-oriented adaptivity illustrated by comparative solution profiles and corresponding meshes of the loops \(\ell =1-8\) for Sect. 6.3

Fig. 10
figure 10

Distribution of the temporal step size \(\tau _K\) of the transport problem for a fixed \(\sigma _K=2.5\) of the Stokes flow problem over the time interval \(I=(0,T]\) for the initial (1) and after 4 and 8 DWR-loops

The solution profiles and corresponding adaptive meshes of the primal solution \({u}_{\tau h}^{1,0}\) of the loop \(\ell =8\) for \(t=0.15\), \(t=0.70\), \(t=0.92\), \(t=1.33\) and \(t=2.45\) are given by Fig. 8. The refinement in space is adjusted to the position of the transported species within the channel. It is located to the layers of the transported species, whereas the mesh stays coarse in the non-affected area. In Fig. 9 we present a comparative study of the solution profile and corresponding meshes for \(t=0.95\) over the adaptivity loops. For \(\ell =1,2,3\) obvious spurious oscillations in the left square and at the beginning of the constriction are existing, which are captured and resolved by the goal-oriented adaptivity by taking spatial mesh refinements along the layers of the transported species within the left square and within the constriction of the channel. For \(\ell >3\) the spatial refinements capture especially the solution profile fronts with strong gradients with a focus on the high-convective middle of the spatial domain. In Fig. 10 we visualize the temporal distribution of the transport problem for several DWR-loops. The time cell lengths of the Stokes flow problem is kept fixed with value \(\sigma _K=2.5\) for all DWR-loops here and thus explicitly not displayed. We observe an adaptive refinement in time at the beginning, consistent with the restriction in time of the inflow boundary condition. The closer we get to the final time point T the coarser the temporal mesh is chosen.

Table 5 Goal-oriented temporal and spatial refinements for the transport problem in Sect. 6.3

The refinement in space and time is automatically balanced due to the dynamic choice of \(\theta _h^\mathrm {top}\) and \(\theta _\tau ^\mathrm {top}\) given by (25) and is illustrated by Table 5. Regarding the spatial and temporal error indicators (cf. columns five and six of Table 5) a good equilibration can be observed within the final loop, whereas in the first step a mismatch occurs resulting in a solely temporal refinement between \(\ell =1\) and \(\ell =2\).

Finally, we modify the parabolic inflow condition for the Stokes flow problem in order to investigate our multirate in time approach for the present example. More precisely, on the left boundary \(\varGamma _{\text {in}}\) the inflow condition \(\mathbf{v}_D\) is now given by

$$\begin{aligned} \mathbf{v}_D = \Bigg \{ \begin{array}{ll} \frac{\arctan (t)}{\pi /2}\cdot (1-4x_2^2,0)^\top &{} \text {for } 0 \le t \le 0.1,\\ (1,0)^\top &{} \text {for } 0.1 < t \le T. \end{array} \end{aligned}$$

Moreover, for the transport problem, the Dirichlet boundary function value is homogeneous on \(\varGamma _D\) except for the line \((-1,-1) \times (-0.4,0.4)\) and time \(0 \le t \le 0.1\) where the constant value

$$\begin{aligned} {u}(\mathbf{x},t)=1 \end{aligned}$$

is prescribed on the solution. Therefore, the time domain \(I=(0,2.5)\) is now discretized with the same initial \(\tau =\sigma =0.1\) for the transport and the Stokes flow problem for the first loop \(\ell =1\). In Fig. 11 we visualize the distribution of the adaptively determined time cell lengths \(\tau _K\) and \(\sigma _K\) used for the transport and Stokes flow problem, respectively, over the whole time interval I for different DWR refinement loops. We observe a similar behavior as displayed in Fig. 10. The temporal mesh is refined close to the time conditions of the respective inflow boundaries for both problems, where the refinement in time for the Stokes flow problem is chosen to refine those slabs related to the inflow condition (26) for each second DWR-loop. Away from the temporal inflow condition both temporal meshes stay coarse.

Fig. 11
figure 11

Distribution of the temporal step size \(\tau _K\) of the transport problem and \(\sigma _K\) of the Stokes flow problem over the time interval \(I=(0,T]\) for the initial (1) and after 4 and 8 DWR-loops

7 Conclusion

In this work, we presented a multirate in time approach regarding different time scales for a rapidly changing transport coupled with a slowly creeping Stokes flow. The transport problem is represented by a convection-dominated convection–diffusion–reaction equation which is for this reason stabilized using the residual based SUPG method. Both subproblems are discretized using a discontinuous Galerkin method dG(r) with an arbitrary polynomial degree \(r \ge 0\) in time and a continuous Galerkin method cG(p) with an arbitrary polynomial degree \(p \ge 1\) in space. A goal-oriented a posteriori error representation based on the Dual Weighted Residual method was derived for the transport problem. This error representation is splitted into an amount in space and time whose localized forms serve as error indicators for the adaptive mesh refinement process in space and time. The temporal weights of the DWR adaptivity process are approximated by a higher-order reconstruction approach whereas the spatial weights are approximated by higher-order finite elements. The practical realization of the space-time slabs is based on tensor-product spaces which enables for an efficient and flexible software implementation of the underlying approach. In numerical experiments we verified expected experimental orders of convergence of the underlying subproblems as well as the coupled problem. Furthermore, space-time adaptivity studies for the coupled problem were investigated for an academic test problem as well as a problem of practical interest, leading to high-efficient adaptively refined meshes in space and time. Effectivity indices close to one and well-balanced error indicators in space and time were obtained. Spurious oscillations that typically arise in numerical approximations of convection-dominated problems could be reduced significantly. Although the computation of the estimators causes additional computational costs, the numerical results give a first hint of the potential regarding a temporal mesh that is adapted to the dynamics of the active or fast components compared to a more standard fixed-time strategy where the whole mesh is refined due to these fast components. Moreover, coupled systems with strongly differing time scales might even not become feasible without multirate time-stepping approaches. Finally, the here presented approach for coupled free flow and species transport is fairly general and can be easily adopted to other multi-physics systems coupling phenomena that are characterized by strongly differing time scales.