1 Introduction

The aim of this article is to explore the accuracy of WKBJ (Wentzel–Kramers–Brillouin–Jeffreys) approximations for computing the time evolution of localized high-frequency disturbance in incompressible viscous flows. This method is often used in the literature but studies of its validity are sparse. Here, a new approximation is derived which is second-order accurate in the WKBJ parameter \(\epsilon \), the parameter controlling fast spatial oscillation, and its numerical accuracy is explored in comparison with direct numerical simulation (DNS). From a computational point of view, capturing short-wave dynamics with WKBJ is much faster than using a fine-grid discretization of PDEs. Notably, WKBJ becomes more accurate as oscillations increase and this property complements grid-based discretization methods like finite differences and finite elements. Unfortunately, in the long run, WKBJ approximation may become inaccurate. Understanding when WKBJ approximation can be trusted is important for applications.

The linearized Navier–Stokes equation (LNSE) is obtained by the linearization of the Navier–Stokes equation of a given base flow; its time-evolving solutions are called disturbances and its eigenfunctions are called modes. The WKBJ method can be used to approximate either fast oscillating disturbances or fast oscillating modes. In the context of hydrodynamic stability of localized disturbances, the WKBJ method acquired its modern form following the work of Lifschitz and Hameiri [1]. Before their work, albeit not using the WKBJ formalism, there were many studies on constant-gradient base flows describing either plane-wave disturbances [2] or modes which are constructed as a superposition of such waves [3]. The studies with constant-gradient base flows have a long history which can be traced back to Kelvin waves in circular vortices. Interest in the field intensified when the elliptical instability of inviscid vortices, identified in a seminal paper by Pierrehumbert [4], was mathematically explained by Bayly [5, 6] as being a parametric instability of these plane-wave disturbances. The presence of viscosity can stabilize the elliptical instability, and thus a critical viscosity can be calculated [7].

Since then, WKBJ has been extensively applied in many scientific fields by the inclusion of other physical effects, for example, flows with time dependence [8], stratification [9], rotation [10], magnetism [11], among others. Furthermore, there was theoretical progress which produced generalizations [12] of the well-known Rayleigh circulation criterion for the stability of rotating flows [13]. Also, work clarifying the use of WKBJ for the approximation of large-axial-wavenumber Kelvin modes in vortices has advanced [14]. Despite the large number of studies in this field, only a fraction of them addressed the validity of the WKBJ method in comparison to numerical calculations. The studies of Lundgren and Mansour [15] and Sipp and Jacquin [16] have computational confirmation about the quality of WKBJ for predicting the modal growth rate of the elliptical instability that occurs at the center of the Taylor–Green (TG) vortex. Also concerning modal growth rates, but with other base flows, some authors report quantitative agreement between WKBJ and numerical experiment [17,18,19], while some authors report qualitative agreement only [8, 20].

In the present article, we are mainly concerned with the approximation of transients in viscous flows. We perform numerical experiments with 3D perturbations superimposed on 2D base flows and discuss the possible reasons behind WKBJ’s successful, or unsuccessful, results. Transients are intensely researched because of their connection with bypass transition to turbulence, a phenomenon commonly observed in shear flows [21]. The term “bypass” indicates that linear modal growth is not important in this transition scenario. In the case of shear flows, there are two types of linear mechanisms that promote strong transient growth of disturbances: the Orr mechanism [22], also known as tilted-wave, and the streak formation mechanism [23] also known as lift-up effect. Both mechanisms are present in plane-wave disturbances of constant-gradient flows and their nonlinear interactions were studied [24] in connection with self-sustaining processes [25]. The extension of these mechanisms, from plane-wave disturbances to wave packet disturbances, may depend on the validity of WKBJ on suitable time scales.

The structure of the paper is as follows. In Sect. 2, the second-order accurate time-dependent WKBJ approximation is derived yielding a set of ODEs which is called the second-order WKBJ system. In some cases, for example at the center point of TG base flow, the first-order WKBJ approximation can be automatically second-order accurate; this is called superconvergence. The theoretical aspects of superconvergence are discussed in Sect. 3. Model base flows such as TG and the recirculation flow (RF) are defined in Sect. 4 along with details about initial wave packet disturbance and scalings. The numerical comparison between the WKBJ approximations and DNS for wave packet disturbances in both TG and RF base flows is addressed in Sects. 5.1 and 5.2. Conclusions and discussions are made in Sect. 6. A summary of equations is found in Appendix.

2 The second-order WKBJ asymptotic

This section brings the derivation of the second-order WKBJ approximation for the linearized Navier–Stokes equation (LNSE). In essence, WKBJ method approximates the original PDE by an advection-like PDE that can be solved using ODE integration along characteristics (unlike Schrödinger equation or optics, caustics are absent in incompressible fluid because characteristics coincide with particle paths). The quality of this approximation depends on the scale separation between the fast oscillating solution and the slowly varying coefficients of the PDE.

The notation used is as follows. Boldface symbols are used to denote a three-component vector, for example, \({\mathbf x}:= (x_1,x_2,x_3)\) denotes the spatial coordinates, while \({\mathbf u}({\mathbf x},t) := (u_1({\mathbf x},t),u_2({\mathbf x},t),u_3({\mathbf x},t))\) denotes the velocity field. The notation “\(:=\)” stands for “defined as.” A base flow is denoted by \({\mathbf U}({\mathbf x},t)\) and a disturbance by \({\mathbf u}({\mathbf x},t)\). The LNSE is written in tensorial notation:

$$\begin{aligned}&\partial _t u_j + U_\mathrm{s} \partial _\mathrm{s} u_j + u_\mathrm{s} \partial _\mathrm{s} U_j = - \partial _j p + {\text {Re}}^{-1} \partial ^2_\mathrm{s} u_j, \end{aligned}$$
(1)
$$\begin{aligned}&\partial _\mathrm{s} u_\mathrm{s} = 0, \end{aligned}$$
(2)

where repeated indices denote the summation ranging from 1 to 3; for instance, \(\partial _\mathrm{s} u_\mathrm{s}\) denotes the divergence of the velocity field and, for example, the expression \(k_\mathrm{s}^2\) denotes \(k_1^2 + k_2^2 + k_3^2\). The compact notation \(\mathcal{U}:=({\mathbf u}, \epsilon p)\) denotes the joint 4-component vector with velocity and pressure where the pressure is scaled by \(\epsilon \). An approximate solution \(\mathcal{U}_{\epsilon }:=({\mathbf u}_{\epsilon },\epsilon p_{\epsilon })\) is sought with highly oscillatory behavior using the following WKBJ ansatz:

$$\begin{aligned} \mathcal{U}_\epsilon := \mathcal{U}^\mathrm{amp} \text {e}^{\mathrm{i}\phi ({\mathbf x},t)/\epsilon } + \text {cc}, \end{aligned}$$
(3)

where \(\text {cc}\) denotes the complex conjugate; \(\phi ({\mathbf x},t) \in \mathbb {R}\) is the phase; \(\mathcal{U}^\mathrm{amp}:=({\mathbf u}^\mathrm{amp},\epsilon p^\mathrm{amp})\), where \({\mathbf u}^\mathrm{amp}({\mathbf x},t)\in \mathbb {C}^3\) is the velocity amplitude and \(p^\mathrm{amp}({\mathbf x},t)\in \mathbb {C}\) is the pressure amplitude. There are several ways to expand \(\mathcal{U}^\mathrm{amp}\) in powers of \(\epsilon \); the following three possibilities are usually considered:

$$\begin{aligned} \mathcal{U}^\mathrm{amp}_F({\mathbf x},t)&:= \mathcal{U}^0({\mathbf x},t), \end{aligned}$$
(4)
$$\begin{aligned} \mathcal{U}^\mathrm{amp}_\mathrm{S}({\mathbf x},t)&:= \mathcal{U}^0({\mathbf x},t)+ \epsilon \mathcal{U}^1({\mathbf x},t), \end{aligned}$$
(5)
$$\begin{aligned} \mathcal{U}^\mathrm{amp}_\mathrm{T}({\mathbf x},t;\tau )&:= \mathcal{U}^{0}({\mathbf x},t;\tau )+\epsilon \mathcal{U}^1({\mathbf x},t). \end{aligned}$$
(6)

The first-order WKBJ approximation is defined by Eq. (4). The second-order WKBJ approximation is defined by either Eq. (5) or (6), where \(\mathcal{U}^\mathrm{amp}_\mathrm{S}\) is a single-time-scale expansion, while \(\mathcal{U}^\mathrm{amp}_\mathrm{T}\) is a two-time-scale expansion. The term \(\epsilon \mathcal{U}^1\) in Eq. (5) is called second-order correction. The difference between (5) and (6) is the presence of the slow-time parameter \(\tau = \epsilon t\); this scale can be used to eliminate resonances when approximating a neutrally stable solution. In computational experiments, only Eqs. (4) and (5) will be used because we are mainly concerned with transient behavior rather than neutrally stable solutions. Thus, for brevity, we do not include here the formulas for Eq. (6) but we mention that the derivation presented here can be extended to include both two-time scales and superpositions of wave packets. We also mention that two-time scales have been used, albeit with plane waves rather than wave packets, to show that localized elliptical instability is supercritical [26].

The small asymptotic parameter \(\epsilon >0\) is related to the large Reynolds number by

$$\begin{aligned} \text {Re}^{-1} = \nu \epsilon ^2, \end{aligned}$$
(7)

where \(\nu \in \mathbb {R}\).

Henceforth, the material derivative with respect to the base flow is denoted by the operator \(D_t\)

$$\begin{aligned} D_t := \partial _t + U_j\partial _j. \end{aligned}$$

The local wavevector is defined as

$$\begin{aligned} k_j := \partial _j\phi \end{aligned}$$
(8)

for \(j=1,2,3\), and it is also denoted by \({\mathbf k}:= (k_1,k_2,k_3)\). The notation \(\xi _j(t;{\mathbf x}_0)\) stands for the particle path starting at \({\mathbf x}_0\) when \(t=0\) that is transported by the base flow according to the equation:

$$\begin{aligned} \frac{\text {d}\xi _j}{\text {d}t} = U_j(\xi (t),t). \end{aligned}$$
(9)

The derivative along a particle path of a function \(f({\mathbf x},t)\) is denoted by \(\dot{f}\), where \(\dot{f} := df(\xi (t),t)/dt\).

When substituting ansatz (3) into Eqs. (1, 2), and collecting terms with equal powers of \(\epsilon \), the following three equations for orders \(O(\epsilon ^{-1})\), \(O(\epsilon ^{0})\), and \(O(\epsilon ^{1})\) are obtained. The equation at \(O(\epsilon ^{-1})\) is the transport of the phase

$$\begin{aligned} D_t\phi = 0. \end{aligned}$$
(10)

At order \(O(\epsilon ^{0})\), the system of equations is

$$\begin{aligned}&D_t u_j^0 + u_\mathrm{s}^0\partial _\mathrm{s} U_j + i k_j p^0 +\nu k_\mathrm{s}^2 u_j^0 =0, \end{aligned}$$
(11)
$$\begin{aligned}&i k_\mathrm{s} u_\mathrm{s}^0 =0, \end{aligned}$$
(12)

which represents the transport of the velocity amplitude. Eq. (12) imposes the orthogonality between wavevector \({\mathbf k}\) and amplitude vector \((u_1^0,u_2^0,u_3^0)\). Finally, at order \(O(\epsilon ^{1})\), the system of equations is

$$\begin{aligned}&D_t u_j^1 + u_\mathrm{s}^1\partial _\mathrm{s} U_j + i k_j p^1 + \nu k_\mathrm{s}^2 u_j^1= \nu ( 2i k_\mathrm{s} \partial _\mathrm{s} u_j^0 + i \partial _\mathrm{s} k_\mathrm{s} u_j^0) - \partial _j p^0, \end{aligned}$$
(13)
$$\begin{aligned}&i k_\mathrm{s} u_\mathrm{s}^1 + \partial _\mathrm{s} u_\mathrm{s}^0 =0. \end{aligned}$$
(14)

The initial conditions of Eqs. (10)–(14) are obtained from the initial disturbance amplitude \(\mathcal{U}_\epsilon ({\mathbf x},0)=\mathcal{U}^\mathrm{amp}_\mathrm{S}({\mathbf x},0)\) in Eqs. (3) and (5). For the initial value problem, the initial condition \(\mathcal{U}^\mathrm{amp}\mathrm{S}({\mathbf x},0)\) is represented by \(\mathcal{U}^{0}({\mathbf x},0)\) while \(\mathcal{U}^{1}({\mathbf x},0)=0\).

The precision of the WKBJ approximation in Eq. (3) is analyzed after solving Eqs. (10)–(14). The use of characteristic variables simplifies the computation of these equations; the remainder of this section is dedicated to rewriting these equations as an ODE system. This task starts by eliminating the pressure variable using Eqs. (12) and (14). Also, the material derivative of every function appearing in Eqs. (10)–(14) is given. Namely, the material derivatives of \(k_j\) and \(\partial _\mathrm{s} k_j\) are obtained by repeated differentiation of Eq. (10), while \(\partial _\mathrm{s} u_j^0\) is obtained by the differentiation of Eq. (11); in this process, \(\partial _j p^0\) is also obtained.

By repeated differentiation of Eq. (10), it follows that

$$\begin{aligned} D_t k_j= & {} - \partial _j U_\mathrm{s} k_\mathrm{s}, \end{aligned}$$
(15)
$$\begin{aligned} D_t \partial _l k_j= & {} - \partial _l\partial _j U_\mathrm{s} k_\mathrm{s} - \partial _j U_\mathrm{s} \partial _l k_\mathrm{s} - \partial _l U_\mathrm{s}\partial _\mathrm{s} k_j. \end{aligned}$$
(16)

To eliminate the pressure in Eq. (11), the material derivative of (12) is taken and (15) is used to obtain

$$\begin{aligned} 0 = D_t(k_\mathrm{s} u_\mathrm{s}^0) = k_\mathrm{s} D_t u_\mathrm{s}^0 - \partial _\mathrm{s} U_l k_l u_\mathrm{s}^0. \end{aligned}$$
(17)

Also, the scalar product of Eq. (11) with \(k_j\) yields, by using (12) and (17), an expression for \(ip^0\):

$$\begin{aligned} i p^0 = - 2\frac{u_\mathrm{s}^0\partial _\mathrm{s} U_l k_l}{k_j^2}. \end{aligned}$$
(18)

In order to keep expressions compact, Eqs. (11) and (18) are written separately, but notice that the substitution of (18) into (11) yields the well-known equation [1, 2, 5, 7]:

$$\begin{aligned} D_t u^0_j + \left( \delta _{jl} - 2\frac{k_j k_l}{k_m^2}\right) \partial _\mathrm{s} U_l u^0_\mathrm{s} + \nu k_m^2 u_j^0 = 0. \end{aligned}$$
(19)

This equation can be rewritten in a compact form as follows:

$$\begin{aligned} D_t u^0_j + \mathcal{L}_{js}(t;{\mathbf x}_0,{\mathbf k}_0,\nu )u^0_\mathrm{s} = 0, \end{aligned}$$
(20)

where \(\mathcal{L}(t;{\mathbf x}_0,{\mathbf k}_0,\nu )\) is a 3-by-3 time-dependent real matrix which depends on the parameters listed after the semicolon. The set of Eqs. (9,15,19) is henceforth called the first-order WKBJ system. The first-order WKBJ system can be derived without the WKBJ formalism by assuming that the base flow has constant gradient in the space variables.

Proceeding with the derivation of the second-order WKBJ system, it is necessary to find expressions for \(\partial _j p^0\) and \(\partial _\mathrm{s} u^0_j\) in Eqs. (13)–(14). These are obtained by differentiating (18) and (11):

$$\begin{aligned} i\partial _j p^0&= -\frac{2}{k^2_m}\left( \partial _j u_\mathrm{s}^0 \partial _\mathrm{s} U_l k_l + u_\mathrm{s}^0 \partial ^2_{sj} U_l k_l + u_\mathrm{s}^0\partial _\mathrm{s} U_l \partial _j k_l - 2 \frac{u_\mathrm{s}^0\partial _\mathrm{s} U_l k_l k_n \partial _j k_n}{k^2_m}\right) , \end{aligned}$$
(21)
$$\begin{aligned} D_t \partial _\mathrm{s} u_j^0&=-\left( \partial _\mathrm{s} U_l \partial _l u_j^0 + \partial _\mathrm{s} u_l^0 \partial _l U_j + u_l^0 \partial ^2_{ls} U_j + i \partial _\mathrm{s} k_j p^0 + i k_j \partial _j p^0\right) -\nu \left( 2 k_m \partial _\mathrm{s} k_m u_j^0 + k_m^2 \partial _\mathrm{s} u_j^0\right) , \end{aligned}$$
(22)

where (16), (18), and (21) are needed in (22). These expressions depend on the Hessians of the base flow \(\partial ^2_{sj} U_l\), \(l = 1,2,3\).

In order to compute \(p^1\) in Eq. (13), an expression for \(k_j D_t u_j^1\) is sought. By taking the scalar product of \(k_j\) with Eq. (13) and the material derivative of Eq. (14), the following identity is found:

$$\begin{aligned} D_t(i k_\mathrm{s} u_\mathrm{s}^1 + \partial _\mathrm{s} u_\mathrm{s}^0) = i D_t k_\mathrm{s} u_\mathrm{s}^1 + i k_\mathrm{s} D_t u_\mathrm{s}^1 + d^0 = 0, \end{aligned}$$
(23)

where

$$\begin{aligned} d^0:=D_t \partial _\mathrm{s} u_\mathrm{s}^0 \end{aligned}$$
(24)

which is the trace of the right-hand side (r.h.s.) of Eq. (22). Next, Eq. (15) can be used to replace \(D_t k_\mathrm{s}\) in order to find

$$\begin{aligned} k_\mathrm{s} D_t u_\mathrm{s}^1 = u_\mathrm{s}^1 \partial _\mathrm{s} U_l k_l + i d^0. \end{aligned}$$
(25)

Proceeding with the scalar product \(k_j\) with Eq. (13), \(p^1\) is found

$$\begin{aligned} i p^1= & {} - 2\frac{u^1_\mathrm{s}\partial _\mathrm{s} U_l k_l}{k_j^2} + g^0, \end{aligned}$$
(26)
$$\begin{aligned} g^0:= & {} \frac{1}{k_j^2}\left[ - id^0 - k_j\partial _j p^0 + \nu \left( - i k_m^2 \partial _\mathrm{s} u_\mathrm{s}^0 + 2 i k_m \partial _m u^0_\mathrm{s} k_\mathrm{s}\right) \right] . \end{aligned}$$
(27)

Now, Eq. (13) can be rewritten as a linear ODE with a forcing term:

$$\begin{aligned} \dot{u}^1_j + \mathcal{L}_{js}\left( t;{\mathbf x}_0,{\mathbf k}_0,\nu \right) u^1_\mathrm{s} = -\partial _j p^0 - k_j g^0 + \nu \left( 2 i k_\mathrm{s}\partial _\mathrm{s} u_j^0 + i \partial _m k_m u^0_j\right) , \end{aligned}$$
(28)

where \(\mathcal{L}_{js}\) is the same matrix as in Eq. (20).

In summary, the second-order WKBJ system is defined as the set of ODEs governing the evolution of \(\xi \), \(k_j\), \(\partial _\mathrm{s} k_j\), \(u^0_j\), \(\partial _\mathrm{s} u_j^0\), and \(u^1_j\); these are written in Eqs. (9), (15), (16), (19), (22), and (28) which depend on the auxiliary quantities \(p^0\), \(\partial _j p^0\), \(d^0\), and \(g^0\) given in (18), (21), (24), and (27), respectively. When the base flow is 2D, \({\mathbf U}(x_1,x_2,t)\), the second-order WKBJ system consists of 18 scalar equations (\(\partial _\mathrm{s} k_j\) is symmetric). For a 3D base flow, there are 27 scalar equations. The system can be solved in a sequence, for example, beginning with \(\xi \) followed by \(k_j\), \(u^0_j\), \(\partial _\mathrm{s} k_j\), \(\partial _\mathrm{s} u_j^0\), and \(u^1_j\). These equations are organized in a single list in Appendix, Eqs. (40)–(50).

3 Special superconvergence of first-order WKBJ approximation

This section addresses the interesting situations where the first-order WKBJ approximation behaves like a second-order approximation. This can occur either because the second-order correction vanishes or because it does not contribute to the quantity of interest. The first-order WKBJ approximation is indeed shown to be second-order accurate when applied to flows with a special symmetry which include the classical case of elliptical instability. Moreover, for general flows, there are particle paths where the first-order approximation becomes second-order accurate due to a symmetry in the disturbance’s amplitude; numerical examples are given in Sect. 5.1.

In the interesting case of elliptical instability, which includes the TG base flow, the first-order WKBJ approximation can be more accurate than expected. A serendipitous superconvergence due to symmetries occurs if two special features are present: the Hessians of \((U_1,U_2)\) vanish along a particle path, and the wave packet disturbance is locally a plane wave. In this case, the second-order WKBJ correction vanishes. The result is stated in the following proposition:

Proposition 1

(i) If the base flow \({\mathbf U}({\mathbf x},t)\) satisfies \(\partial _l\partial _j U_\mathrm{s}(\xi (t),t)=0\) for all index \(1\le i,j,l\le 3\), where \(\xi (t)\) is the streamline governed by Eq. (9) with initial condition \(\xi _j(0;{\mathbf x}_0) ={\mathbf x}_0\), and (ii) if \(\partial _l u^0_j({\mathbf x}_0,0)=0\) and \(\partial _l k_\mathrm{s}({\mathbf x}_0,0)=0\) in the initial condition of Eqs. (16) and (22), then the solution \(u^1_j(\xi (t),t)\) of Eq. (28) is identically zero if initially \(u^1_j({\mathbf x}_0,0)=0\).

Proof

First, Eq. (16) is trivially satisfied because its initial condition is zero and the forcing term is identically zero from the hypothesis \(\partial _l\partial _j U_\mathrm{s}(\xi (t),t)=0\). Second, every nonhomogeneous term on the r.h.s. of Eqs. (21) and (22) contains one null factor: it contains either \(\partial _l\partial _j U_\mathrm{s}\) or \(\partial _l k_\mathrm{s}\) or \(\partial _l u^0_j\). As a consequence, \(\partial _l u^0_j\) and \(\partial _l p^0\) remain zero along the characteristic. This implies that the expressions for both \(d^0\) in Eq. (24) and \(g^0\) in Eq. (27) are zero. Then, from Eq. (28), all the nonhomogeneous terms in this equation vanish and, therefore, \(u_j^1\) is zero along the streamline \(\xi (t;{\mathbf x}_0)\). \(\square \)

A numerical experiment illustrating this proposition is presented in Sect. 5.1, cf. line marked with (\(*\)) in Fig. 3. Hypothesis (i) is valid at the stagnation point of vortices with reflexion symmetry along its principal axis, e.g., if the stagnation point is at the origin of a 2D flow where the stream function is an even function of the spatial variables \((x_1,x_2)\). Hypothesis (ii) is met by wave packet disturbances when the point \({\mathbf x}_0\) is exactly at a maximum of the wave packet envelope. Both hypotheses are met when placing the wave packet center at the stagnation point of an elliptic vortex. There is a well-known corollary of Proposition 1: plane-wave perturbations are exact solutions of constant-gradient flows. Using Proposition 1, this assertion translates into the special case where \(u^1_j({\mathbf x},t)\) vanishes identically over the domain because \(\partial _l\partial _j U_\mathrm{s}({\mathbf x},t)=0\) and \(\partial _l k_\mathrm{s}({\mathbf x},t) = 0\) everywhere. In this corollary, the plane-waves are solution of the fully nonlinear NSE [2].

The next proposition shows that, without any symmetry hypothesis on the base flow, superconvergence can occur along a decreasing sequence of \(\epsilon \) when the wave packet amplitude takes a special form. Recall that initially \({\mathbf u}^\mathrm{amp}({\mathbf x}_0,0)\in \mathbb {C}^3\) in Eq. (3) and that each component can be written in polar form \({\mathbf u}^\mathrm{amp}_j= |{\mathbf u}^\mathrm{amp}_j|\exp (i \alpha _j)\), where \(\alpha _j\) is real. The wave packet amplitude is defined as coherent at \({\mathbf x}_0\) with argument \(\alpha \) when there are \(k_j\in \mathbb {Z}\), \(j=1,2,3\), such that \(\alpha _j =\alpha + k_j \pi \). For example, a coherent wave packet has “purely real” velocity amplitude \({\mathbf u}^\mathrm{amp}\) when \(\alpha =0\). With respect to the pressure, the argument of \(p^0\) is shifted by \(\pi /2\) because of Eq. (18).

Proposition 2

If the wave packet amplitude \({\mathbf u}^\mathrm{amp}({\mathbf x}_0,0)\in \mathbb {C}^3\) is coherent at \({\mathbf x}_0\) with argument \(\alpha \) and if \(\epsilon ^{-1}\phi ({\mathbf x}_0,0) + \alpha = n\pi \) for a certain \(n\in \mathbb {Z}\), then \({\mathbf u}_\epsilon ({\mathbf x}(t),t)\) in Eq. (3) is independent of \({\mathbf u}^{1}({\mathbf x}(t),t)\) (i.e., knowledge of \({\mathbf u}^{0}({\mathbf x}(t),t)\) is sufficient to compute \({\mathbf u}_\epsilon ({\mathbf x}(t),t)\) up to second order).

Proof

Initially, the argument of \(u^0_j\) in Eq. (20) is \(\alpha +k_j \pi \); the argument remains unchanged in time because \(\mathcal{L}\) is real. By tracking the argument of subsequent expressions until Eq. (28), the argument of \(u^1_j\) is found to be \(\alpha +k_j \pi \pm \pi /2\). From the expression in Eqs. (3) and (6), the j-th velocity component of \(\mathcal{U}_\epsilon \) is found:

$$\begin{aligned} \left( |u^0_j| \text {e}^{\mathrm{i}\alpha +k_j \pi } + \epsilon |u^1_j| \text {e}^{\mathrm{i}\left( \alpha +k_j \pi \pm \pi /2\right) }\right) \text {e}^{\mathrm{i} \epsilon ^{-1}\phi } + \mathrm{cc}. \end{aligned}$$

Because \(\phi \) is constant along particle paths, the hypothesis \(\epsilon ^{-1}\phi ({\mathbf x}_0,0) + \alpha = n\pi \) implies

$$\begin{aligned} |u^1_j|\exp \left( i\left( \alpha +k_j \pi \pm \pi /2 + \epsilon ^{-1}\phi \right) \right) \end{aligned}$$

to be imaginary. Thus, \(u^1_j\) does not contribute to the second-order approximation due to cancelation with its complex conjugate. \(\square \)

Proposition 2 should not be regarded as a method for reaching second-order accuracy; nevertheless, it explains numerical features which, otherwise, could be mistaken as an “unexpected precision.” A computational instance of Proposition 2 is found in Sect. 5.1 following the discussion of Fig. 3.

4 Base flows, initial disturbance, and scaling

Numerical experiments are performed with two base flows: a flattened Taylor–Green (TG) vortex and a recirculation flow (RF) vortex. The TG vortex is a well-studied model for elliptical instability [16]. The stagnation point of the TG vortex is surrounded by approximately elliptic streamlines and Proposition 1 can be applied. The streamlines of the RF flow are far from elliptical and symmetries are absent. Both base flows are solutions of the forced NSE but, in particular, the TG flow is a solution of Euler’s equation. These base flows facilitate numerical simulations because they are composed of few Fourier modes. The Taylor–Green (TG) vortex is frequently used to benchmark numerical simulations because its simple geometry allows accurate spectral methods to be used. The RF is chosen because (i) its Fourier coefficients are similar to those of TG, and (ii) its streamlines are visibly different from a symmetric vortex. The similarity of RF with TG is chosen in order to conduct numerical experiments on WKBJ precision with analogous scale separation, avoiding the spatial symmetries of the TG base flow. We emphasize that RF is not connected to a “physically motivated” meaning but it is a random mathematical choice satisfying these two criteria.

The base flows \({\mathbf U}^\mathrm{TG}\) and \({\mathbf U}^\mathrm{RF}\) are defined in the whole plane \({\mathbf U}(x_1,x_2):\mathbb {R}^2\rightarrow \mathbb {R}^2\). Let \(\psi ^\mathrm{TG}\) and \(\psi ^\mathrm{RF}\) denote the stream functions of TG and RF flows, respectively. These stream functions are given as a series of sine functions with the form:

$$\begin{aligned} \psi (x_1,x_2) = \frac{1}{\pi } \left( \sum _{p =1}^{N_p} c_p\sin \left( \pi p x_1/L_1\right) \right) \left( \sum _{q=1}^{N_q} d_q\sin \left( \pi q x_2/L_2\right) \right) , \end{aligned}$$
(29)

which is an odd periodic function in each coordinate. The stream function \(\psi ^\mathrm{TG}\) is defined with \(N_p=N_q=1\) and \(c_1= d_1= 1\). The stream function \(\psi ^\mathrm{RF}\) is defined with \(N_p=N_q=4\), where \(c_1= d_1= 0.8\); \(c_p= (5p)^{-1}\) for \(p=2,3,4;\) and \(d_2=1/15\), \(d_3=1/35\), \(d_4=1/35\). Contour lines of \(\psi ^\mathrm{TG}\) and \(\psi ^\mathrm{RF}\) are shown in further sections: Figs. 2 and 9a, respectively. These figures have \(L_1=2\) and \(L_2=1\) and these values are maintained in all numerical computations. The maximum speed is 1 for TG and 0.83 for RF; both flows attain their maximum speed at a boundary point.

The wave packet disturbances \({\mathbf u}({\mathbf x},t)\) considered in Eqs. (1, 2) are constructed so that \(\partial _j u_j=0\), where \({\mathbf u}{:}\;\Omega \times [0,+\infty )\rightarrow \mathbb {R}^3\), and where

$$\begin{aligned} \Omega =\left\{ (x_1,x_2,x_3), 0\le x_1\le L_1, 0\le x_2\le L_2, 0\le x_3\le L_3\right\} . \end{aligned}$$

Disturbances can be extended to \({\mathbf u}{:}\;\mathbb {R}^3\times [0,+\infty )\rightarrow \mathbb {R}^3\) by appropriate even/odd parity properties, namely (i) the components \({\mathbf u}=(u_1,u_2,u_3)\) are periodic functions of the variables \((x_1,x_2,x_3)\) with periods: \(2L_1, 2L_2,\) and \(L_3\) in each variable, respectively; (ii) \((u_1,u_2,u_3)\) have the parity properties according to Table 1; and (iii) \({\mathbf u}(x,t)\) is initially tangential to the planes \(x_1=0\), \(x_2=0\), \(x_1=L_1\), and \(x_2=L_2\). It is well known that if the initial disturbance \({\mathbf u}({\mathbf x},0):\mathbb {R}^3\rightarrow \mathbb {R}^3\) verifies properties (i)–(iii), then the evolution of \({\mathbf u}({\mathbf x},t)\) by the NSE in the whole space \(\mathbb {R}^3\) maintains these properties. Thus, the flow can be regarded as being confined to a rectangular cavity, which extends periodically in \(x_3\), with slip velocity boundary conditions on the walls [15]. Moreover, condition (ii) precludes hyperbolic instability of short wave associated with the hyperbolic stagnation points \((0,0,0), (0,L_2,0), (L_1,0,0), (L_1,L_2,0)\); this means that linear instability occurs at a higher Reynolds number than the usual TG base flow without these symmetries. Computational experiments presented in further sections use an initial disturbance in the form of Eq. (3) which obeys conditions (i)–(iii). This allows numerical methods to speed up the fast Fourier transforms (FFTs) by the use of these symmetries or, even better, to use discrete sine and cosine transforms.

Table 1 Parity of each component of \({\mathbf u}\) as a function of variables \(x_1\) and \(x_2\)

An example of wave packet initial condition is shown in Fig. 1 and explored in detail in Sect. 5. A formula for constructing initial wave packets that are localized in the \((x_1,x_2)\) plane and periodic in \(x_3\) is given below. Let \(\eta (x_1,x_2):[0,L_1]\times [0,L_2]\rightarrow \mathbb {R}\) be a smooth envelope function with support inside the rectangle \([0,L_1]\times [0,L_2]\); let \({\mathbf A}_0\in \mathbb {C}^3\) be the amplitude vector and let \({\mathbf k}_0\in \mathbb {R}^3\) be a wavevector such that \({\mathbf k}_0\cdot {\mathbf A}_0=0\). Denote the center of the envelope \(\eta \) by the point \({\mathbf y}:=(y_1,y_2,0)\in \Omega \). The initial disturbance in (3) is chosen as

$$\begin{aligned} {\mathbf u}^\mathrm{amp}({\mathbf x},0) = \nabla \alpha _0({\mathbf x}) \wedge \nabla \phi _0({\mathbf x}), \end{aligned}$$
(30)

where \(\phi _0:\Omega \rightarrow \mathbb {R}\) is given by \(\phi _0 ={\mathbf k}_0\cdot ({\mathbf x}-{\mathbf y})\) and \(\alpha _0:\Omega \rightarrow \mathbb {C}\) is given by

$$\begin{aligned} \alpha _0({\mathbf x}) = \eta ({\mathbf x}) \left( {\mathbf b}- \frac{b_3}{k_3} {\mathbf k}_0 \right) \cdot ({\mathbf x}-{\mathbf y}) \end{aligned}$$

with \({\mathbf b}= {\mathbf k}_0\wedge {\mathbf A}_0/\Vert {\mathbf k}_0 \Vert ^2\). With the above formulas, the initial disturbance has the same support in the \((x_1,x_2)\) plane as the envelope \(\eta \), it is divergence free, and it is periodic in \(x_3\) with period

$$\begin{aligned} L_3 = \frac{2\pi \epsilon }{k_3}, \end{aligned}$$
(31)

which is consistent with the definition of \(\Omega \), moreover \({\mathbf u}^\mathrm{amp}({\mathbf y},0) = \eta ({\mathbf y}){\mathbf A}_0\).

In computational experiments, \(\eta \) is always chosen as \(\eta (x_1,x_2)=g_1(x_1-y_1)g_2(x_2-y_2)\), where \(g_1\) and \(g_2\) are Gaussian functions that are slightly modified to vanish smoothly before the boundary. \(\eta \) is normalized so that \(0\le \eta \le 1\) and \(\eta ({\mathbf y})=1\) with \({\mathbf y}=(L_x/2,L_y/2)\). The values of \({\mathbf A}_0\), \({\mathbf k}_0\), and \(\nu \) are chosen so that the WKBJ system has a periodic orbit when applied to the TG base flow with \(\xi (0;{\mathbf y}) = {\mathbf y}\); in our case, the period is 4 time units. The numerical values of \({\mathbf A}_0\), \({\mathbf k}_0\), and \(\nu \) are given in Appendix; notice that \({\mathbf A}_0\) has real components only.

Fig. 1
figure 1

Speed \(\Vert {\mathbf u}(x_1,x_2,0,0) \Vert _2\) in the plane \(x_3=0\) of a wave packet disturbance constructed with \(\epsilon = 1.34\,{\times }\, 10^{-2}\). a Initial disturbance superimposed on the Taylor–Green base flow and b the disturbance at \(t=1\) computed by DNS

Scale separation is a key feature that influences the properties of WKBJ approximations. The highly oscillatory part of \(\exp (i\epsilon ^{-1}\phi )\) should oscillate faster than the base flow \({\mathbf U}\) and other quantities like \({\mathbf u}^0\) and \({\mathbf k}\). In essence, scale separation means that these functions, and all other functions in the WKBJ system, should have O(1) spatial derivatives when compared to \(O(\epsilon ^{-1})\) spatial derivatives occurring in fast oscillations. Henceforth, let \(L_h\) express the diameter of a disk D containing approximately \(N_p\) periods of fast oscillations \(\exp (i\epsilon ^{-1}\phi )\), and let \(\tilde{\eta }({\mathbf x})\) be a smooth wave packet envelope that vanishes outside D. A localized disturbance with envelope \(\tilde{\eta }\) will have a recognizable “wave packet shape” if, for example, \(N_p \ge 2.5\). These numbers, \(N_p\), \(\epsilon \), and \(L_h\), are connected by the equation:

$$\begin{aligned} L_h({\mathbf x}) = 2\pi N_p \epsilon \Big /\sqrt{k_1^2+k_2^2}, \end{aligned}$$
(32)

where \((k_1,k_2)=(\partial _1\phi ,\partial _2\phi )\) denotes the 2D gradient of the phase at \((x_1,x_2)\). The definition of the derivative strength of \({\mathbf k}\) is given as

$$\begin{aligned} S_{{\mathbf k}}({\mathbf x},t) := \frac{L_h \Vert \nabla {\mathbf k} \Vert _A }{2\Vert {\mathbf k} \Vert _B}, \end{aligned}$$
(33)

where \(\Vert \cdot \Vert _A\) and \(\Vert \cdot \Vert _B\) are semi-norms defined inside a disk D. Clearly, smaller values of \(S_{{\mathbf k}}\) are better for scale separation. In numerical experiments, we find that WKBJ shows poor results in regions where \(\Vert {\mathbf k} \Vert \) is small and \(\Vert \nabla {\mathbf k} \Vert \) is large; we obtain this information from the Lagrangian map of particles. In practice, one should use any information available, including physical arguments, to find if \(S_{{\mathbf k}} \gg 1\) anywhere in the domain because this is a warning for low precision. Analogous to Eq. (33), equivalent definitions can be given for \(S_{{\mathbf U}}\), \(S_{{\mathbf u}^0}\), etc. Because the envelope \(\tilde{\eta }\) must vanish before the boundary, \(L_h/2\) also defines a minimum distance from the center of D to the boundary.

Finally, from \(L_h\) and \(\nabla {\mathbf U}\), a local Reynolds number \(\text {Re}_l\) can be defined by considering \(L_h/2\) to be the length scale and \(\Vert \nabla {\mathbf U}\Vert _2L_h/2\) to be the velocity scale (difference of velocity at the center of D and at its edge). The viscosity is \(\text {Re}^{-1}\) given in Eq. (1) and \(\text {Re}_l\) is defined as

$$\begin{aligned} \text {Re}_l(x_1,x_2) := \frac{\Vert \nabla {\mathbf U}\Vert _2 L_h^2 Re}{4} = \frac{\pi ^2 N_p^2 \Vert \nabla {\mathbf U}\Vert _2}{\nu \left( k_1^2+k_2^2\right) }, \end{aligned}$$
(34)

where the expression on the right follows from Eqs. (7) and (32). \(\text {Re}_l\) depends on the scale separation \(N_p\) but it does not depend on \(\epsilon \).

Fig. 2
figure 2

Streamlines of the Taylor–Green base flow and three particle paths denoted by \({\mathbf x}^{(j)}(t)=(x^{(j)}(t),y^{(j)}(t),0)\), where \(j=1,2,3\) is the superscript that distinguishes the paths. Each initial point for a particle path is marked. The center point \({\mathbf x}^{(1)}(0)=(1.0,0.5,0)\) is marked with (asterisk), the point \({\mathbf x}^{(2)}(0)=(1.0, 0.75,0)\) is marked with (open circle), and the point \({\mathbf x}^{(3)}(0)=(1.5, 0.5,0)\) is marked with (open square). Lines are drawn starting at \(t=0\) and finishing at \(t=1\)

Fig. 3
figure 3

Difference between the DNS and the first-order WKBJ approximation. The data points marked with (asterisk) refer to the particle path \({\mathbf x}^{(1)}(t)\). The data points marked with (open circle) refer to the particle path \({\mathbf x}^{(2)}(t)\). They show the pointwise error at time \(t=1\) as a function of \(\epsilon \). The pointwise error is the Euclidean norm of the difference of the vector \({\mathbf u}_\epsilon ({\mathbf x}^{(j)}(1),1)\), calculated by the WKBJ ansatz Eq. (3), and the corresponding vector \({\mathbf u}_\mathrm{dns}({\mathbf x}^{(j)}(1),1;\epsilon )\) obtained by the DNS of Eq. (1, 2) at the same space-time coordinates. The reference solid line has slope 2; this shows quadratic convergence rates. This is an example of superconvergence as predicted by Propositions 1 and 2

5 Comparison between DNS and WKBJ

In this section, the WKBJ approximation is compared with DNS simulations and the numerical errors are analyzed. For either of the base flows, i.e., TG or RF, the initial disturbance is chosen as the wave packet in Sect. 4. The DNS method uses FFTs to compute derivatives with spectral precision. Computational costs are alleviated by employing the parity conditions of Table 1; time integration uses Matlab’s function ode45. Because the DNS method uses a base-flow-plus-disturbance formulation, the disturbance is transformed to physical space prior to multiplication by the base flow. Aliasing errors are very small because the base flows under consideration have short bandwidth in Fourier space, cf. Eq. (29). The domain \(\Omega \) is discretized with \(N\times M\times 2\) points. The \(x_3\) direction is special because the base flow does not depend on \(x_3\) and the initial condition has a single Fourier mode in this direction; thus, the first Fourier mode in the \(x_3\) direction is enough to represent solutions exactly. Both the first- and the second-order WKBJ systems are time integrated using Matlab’s function ode45, and the equations are summarized in Appendix.

5.1 Convergence rates: numerical experiments with Taylor–Green vortex

To obtain numerical convergence rates, time integration is carried out in a unit time interval using TG as the base flow. Figure 1 shows an example of the evolution of speed of the fluid in this interval. The oscillations increase if \(\epsilon \) decreases but the wave packet envelope changes slightly. Several DNS simulations are performed by varying the parameter \(\epsilon \) while setting \(L_3=2\pi \epsilon /k_3\), cf. Eq. (31). The initial condition for the DNS simulation is obtained from Eq. (3) where the velocity amplitude is given by Eq. (30). In this section, all DNS simulations are carried out with the domain \(\Omega \) discretized by \(1024\times 1024\times 2\) points; in all ode45 calls, \(\textit{RelTol}\) and \(\textit{AbsTol}\) are set equal to \(10^{-7}\), which guarantees small time-stepping errors. The initialization of \(\partial _\mathrm{s} u^0_j\) in the WKBJ system is obtained by numerical differentiation of the envelope (30) with highly accurate eighth-order finite differences. The initial conditions for \(\partial _\mathrm{s} k_j\) and \(u_j^1\) are simply zero.

Fig. 4
figure 4

Pointwise error between the DNS and WKBJ approximation as a function of \(\epsilon \) when \(t=1\) for the particle path \({\mathbf x}^{(3)}(t)\) [(marked (open square) in Fig. 2]. Data points are marked with squares (open square). Data points computed with the first-order WKBJ approximation are joined by dashed lines, and data points computed with second-order WKBJ approximation are joined by solid lines. The dashed line without marks has slope 1 and the solid line without marks has slope 2. The pointwise error shows an irregular convergence rate

Fig. 5
figure 5

The envelope error \(\mathcal{E}({\mathbf x}^{(3)}(1),1)\) of the first- and the second-order WKBJ approximation is shown as a function of \(\epsilon \) for the particle path marked with (open square) in Fig. 2 at \(t=1\). Dashed lines and solid lines connect data points marked with (open square) for the first- and the second-order WKBJ approximation, respectively; dashed and solid lines without marks indicate slopes 1 and 2, respectively. The envelope error \(\mathcal{E}\) clearly exhibits the theoretical convergence rates

Comparisons between DNS simulation and WKBJ approximation are made for the three particle paths shown in Fig. 2. The pointwise error is shown in Figs. 3 and 4. Remarkably, Fig. 3 shows quadratic convergence rates even though the approximation uses first-order WKBJ, Eq. (4). These quadratic convergence rates are clear illustrations of Propositions 1 and 2. In fact, for the center point (\(*\)), the term \({\mathbf u}^1\) in Eq. (5) is identically zero because the base flow satisfies the hypothesis of Proposition 1. For the particle marked with (\(\circ \)), the phase \(\phi ({\mathbf x}^{(1)}(0),0)\) is zero and the hypotheses of Proposition 2 are satisfied because the velocity has a coherent phase with \(\alpha =0\) (\({\mathbf A}_0\) is real). When \(\phi ({\mathbf x}^{(1)}(0),0)=0\), Proposition 2 does not depend on \(\epsilon \). Notice that the error at the center point (\(*\)) is slightly larger in absolute value because the initial envelope has a maximum at the center of the vortex. We remark that trigonometric interpolation is used to obtain \({\mathbf u}_\mathrm{dns}({\mathbf x}^{(j)}(1),1;\epsilon )\) because usually \({\mathbf x}^{(j)}(1)\) is not a DNS grid point. The interpolation uses FFT from the frequency-space data. Albeit computationally demanding, this interpolation recovers exactly the spatial velocity field used by the DNS.

Figure 4 shows the pointwise error of the particle path marked with (\(\square \)) in Fig. 2. By looking at the segments between data points, the convergence rates seem to be irregular. For example, the second-order approximation mixes slopes greater than 2 with one slope smaller than 1. These sharp changes in slopes occur because \(\phi ({\mathbf x}^{(3)}(0),0)\ne 0\) and thus the term \(\cos (\phi /\epsilon )\) in the initial condition, Eq. (3), varies in magnitude as \(\epsilon \) is reduced. This causes the absolute value of the initial velocity to change with \(\epsilon \).

In order to obtain a clear numerical convergence rate for the data in Fig. 4, the envelope error is defined next. Two DNS simulations are initialized to compute the error: the first simulation is initialized with a vector amplitude \(\mathcal{U}^\mathrm{amp}\) and the second simulation is initialized with a vector amplitude \(i\mathcal{U}^\mathrm{amp}\), with both simulations having the same phase \(\phi \). Without loss of generality, consider \(\mathcal{U}^\mathrm{amp}= ({\mathbf u}^\mathrm{amp},\epsilon p^\mathrm{amp})\), where \({\mathbf u}^\mathrm{amp}\) is a purely real vector, while \(p^\mathrm{amp}\) is a purely imaginary constant; then, for each DNS simulation, the initial velocity field oscillates spatially either with \(\cos (\phi /\epsilon )\) or with \(\sin (\phi /\epsilon )\). Denote each of these DNS simulations by \({\mathbf u}_\mathrm{dns}^{\cos }({\mathbf x},t)\) or \({\mathbf u}_\mathrm{dns}^{\sin }({\mathbf x},t)\), respectively; also, denote their WKBJ approximate solutions by \({\mathbf u}_{\epsilon }^{\cos }({\mathbf x},t)\) and \({\mathbf u}_{\epsilon }^{\sin }({\mathbf x},t)\) (it can be either the first- or the second-order WKBJ approximation). The envelope error associated with these two simulations is defined as

$$\begin{aligned} \mathcal{E}({\mathbf x},t) := \frac{1}{2}\sqrt{\Vert {\mathbf u}_\mathrm{dns}^{\cos }({\mathbf x},t)-{\mathbf u}_{\epsilon }^{\cos }({\mathbf x},t)\Vert ^2+\Vert {\mathbf u}_\mathrm{dns}^{\sin }({\mathbf x},t)-{\mathbf u}_{\epsilon }^{\sin }({\mathbf x},t)\Vert ^2}. \end{aligned}$$
(35)

This quantity is an upper bound for the pointwise error of either individual simulation; moreover, it does not have strong spatial oscillations as the pointwise error. Intuitively, sine and cosine are phase shifted so that their square sum is constant; thus, \(\mathcal{E}\) measures the error by the oscillation’s peak value. By analogy, the relative envelope error is defined as

$$\begin{aligned} \mathcal{R}({\mathbf x},t) := \mathcal{E}({\mathbf x},t)/\mathcal{A}({\mathbf x},t), \end{aligned}$$
(36)

where \(\mathcal{A}({\mathbf x},t) := \sqrt{\Vert {\mathbf u}_\mathrm{dns}^{\cos }({\mathbf x},t)\Vert ^2+\Vert {\mathbf u}_\mathrm{dns}^{\sin }({\mathbf x},t)\Vert ^2}\).

Clear convergence rates can be obtained by employing the envelope error. To see this, consider again the particle path marked with \((\square )\) in Fig. 2. The envelope error \(\mathcal{E}\) is shown in Fig. 5 as a function of \(\epsilon \). The envelope error clearly exhibits the theoretical convergence rates. In contrast, it is difficult to establish these convergence rates directly from the pointwise errors in Fig. 4.

The spatial distribution of the relative envelope error \(\mathcal{R}({\mathbf x},1)\) is shown in Fig. 6 where at each particle position the value

$$\begin{aligned} \mathcal{F}({\mathbf x}) := -\log _{10} \mathcal{R}({\mathbf x},1) \end{aligned}$$
(37)

is given in a color scale. The contour lines of \(\mathcal{F}\) shown in this figure are obtained from the bulk of the computational data, which is then smoothed by an average-of-neighbors filter in order to help visualization (this procedure avoids the inconvenience of drawing and labeling many small contour “islands”).

Comparing both parts of Fig. 6, the second-order WKBJ is found to be more accurate than the first-order one everywhere except, perhaps, in regions close to the boundary. In part (b), \(\mathcal{F}\) in the inner region of the flow is always larger than 1. Also in part (b), the maximum value \(\mathcal{F}=3.2\) is attained slightly above and below the center point. As a consequence of Proposition 1, both the first- and second-order approximations coincide at the center point; at this point \(\mathcal{F}= 2.3\) in both parts (a) and (b). This is the best precision attained by the first-order WKBJ approximation.

High relative errors close to the boundaries are found in both parts of Fig. 6, but velocities have small absolute value because the wave packet envelope decreases rapidly toward the boundaries. Notice that a localized wave packet could not be placed at a boundary point because the symmetries of Table 1 would not always hold for such disturbance. For disturbances at boundaries, the general approach to satisfy boundary conditions is to superimpose a linear boundary layer correction to the solution but this subject will not be addressed here [27].

Fig. 6
figure 6

The spatial distribution of the relative envelope error \(\mathcal{R}({\mathbf x},1)\) (cf. Eq. (36)) is shown as scatter plots for a the first- and b the second-order WKBJ approximation with \(\epsilon = 6.6\times 10^{-3}\) and \(t=1\) (cf. Fig. 1 for the disturbance shape). Each point in these scatter plots marks the position at \(t=1\) of a particle initially placed on a coarse regular Cartesian grid at \(t=0\) (a coarser grid than the computational one). At each particle position, the value of \(\mathcal{F}({\mathbf x}) = -\log _{10} \mathcal{R}({\mathbf x},1)\) is given in a color scale; contour lines of \(\mathcal{F}\) with values 1, 2, and 2.7 are also shown. The function \(\mathcal{F}\) can be interpreted as the number of correct digits in the WKBJ approximation. The second-order WKBJ approximation shows better accuracy. (Color figure online)

Scale separation for the TG flow is now analyzed using the parameters in Fig. 6. At the center point, the values of \(\epsilon \), \(N_p\), \(S_{\mathbf k}\), \(\text {Re}_l\), and Re are \(6.6\times 10^{-3}\), 3.78, 1.60, \(2.2703\times 10^{-3}\) and \(7.347\times 10^{-4}\), respectively. These values are obtained assuming \(L_h=0.2\) and \(v_\mathrm{ref} = 0.5\) which is the largest velocity at a distance \(L_h\) from the center point; the 2D wavevector is \(\sqrt{k_1^2+k_2^2}=0.7845\). Moreover, using the largest values of \(\epsilon \) shown in Fig. 3, namely \(\epsilon = 2.66\,{\times }\, 10^{-2}\), the accompanying value of Re is 4523; this is the lowest Re where WKBJ has shown relative error below 10%.

In summary, the first- and the second-order WKBJ approximations were shown to converge numerically at \(t=1\) with the expected convergence rates as predicted by Propositions 1 and 2. With the value of \(\epsilon \) used in Fig. 6, the second-order WKBJ approximation gives good results everywhere in the inner part of the flow. In the next section, we consider WKBJ approximations of transient dynamics in the time interval \(t\in [0,16]\).

5.2 WKBJ precision for transient and asymptotic time scales

In this section, we use numerical experiments to show that the second-order WKBJ approximation is generally better than the first-order one on time intervals where linear transient features of the LNSE develop. We also discuss how to identify points with loss of precision using the Lagrangian map of particles. The value of \(\epsilon = 6.6\,{\times }\, 10^{-3}\) is held fixed.

Before presenting numerical experiments, we explain two physical processes that aid in the understanding of the local dynamics: the Orr mechanism (OM) [22] and the accelerated diffusion (AD) [28]. In the following, we provide an analytical example to clarify how they appear in base flows with local shear and explain a connection between transient growth and WKBJ precision. For this example, assume that the base flow is, at least locally, a linear shear, \({\mathbf U}({\mathbf x}) = (x_2,0,0)\), and that the initial conditions for the first-order WKBJ system are as follows: \(\xi (0) = (0,0,0)\), \({\mathbf k}(0) =(1,0,0)\), and \({\mathbf u}^0(0) = (0,1,0)\). Then the solution of the WKBJ system yields

$$\begin{aligned} {\mathbf k}(t)&= (1, t, 0), \end{aligned}$$
(38)
$$\begin{aligned} \Vert {\mathbf u}(t)\Vert _2^2&= \frac{1}{1+t^2} \text {e}^{-\nu (t + t^3/3)}. \end{aligned}$$
(39)

Notice that large linear transient growth occurs if \(\nu \) is small. Indeed, by computing \(\Vert {\mathbf u}(\cdot )\Vert _2\) at two different time instants, \(t_\mathrm{ini}< t_\mathrm{end}\), the amplification factor \(\Vert {\mathbf u}(t_\mathrm{end})\Vert _2/\Vert {\mathbf u}(t_\mathrm{ini})\Vert _2\) can be maximized by selecting suitable \(t_\mathrm{ini}\) and \(t_\mathrm{end}\). For small \(\nu \), the maximum amplification factor is of the order \(\nu ^{-2/3}\) and the time interval \(t_\mathrm{end}-t_\mathrm{ini}\) is of the order \(\nu ^{-1/3}\). The amplification of \(\Vert {\mathbf u}(t)\Vert _2\) between \(t_\mathrm{ini}\) and \(t_\mathrm{end}\) is known as the OM and the super-exponential decay is known as AD. We remark that AD occurs because of the presence of both diffusion and shear [29]. In the inviscid case, \(\nu =0\), the shear produces a slower algebraic damping, the so-called inviscid damping [22] also known as Landau damping [30] (named after a similar phenomenon in plasma). We also remark that the size of \(\nu \), which influences the amount of transient growth, is influenced by the quality of WKBJ approximation because smaller values of \(\nu \) imply both larger values for \(\epsilon \), Eq. (7), and larger transient amplification. Thus, there is a delicate balance between maintaining sufficient WKBJ precision and obtaining larger transients. In particular, \(\Vert {\mathbf k}\Vert _2\) attains its minimum at \(t=0\) which is close to the instant where \(\Vert {\mathbf u}\Vert _2\) attains its peak value; in view of Eqs. (32) and (33), special attention should be paid to precision. For AD, on the other hand, scale separation tends to improve because \(L_h\) shrinks. Both the first- and second-order WKBJ approximations coincide for this example if the disturbance is locally a plane wave.

5.2.1 TG base flow

For the first numerical experiment, we consider the TG base flow with the same initial disturbance and the same \(\epsilon \) used in Fig. 6 but now we extend the time to \(t=16\). In Fig. 7, the first- and second-order WKBJ approximations are compared to DNS along three different particle paths. The DNS data have error bars around them. Henceforth, we use the term quantitatively correct when the approximation is within the error bars and the term qualitatively correct if it is outside the error bars but still with the same dynamic behavior as the DNS solution. Even though Fig. 7 shows only the \(u_3\) velocity component, the other two velocity components have similar precision quality.

Figure 7a shows the approximation at the center point of TG vortex; this point is marked with \((*)\) in Fig. 7d. At this particle, WKBJ approximation is quantitatively correct in the whole interval \(t\in [0,16]\). Only the solid line is shown in Fig. 7a because the first- and second-order WKBJ approximations coincide at \((*)\), cf. Proposition 1. The approximation is very accurate up to \(t=8\) and then slight deviations start to be visible at the peaks. The good quality of WKBJ approximation at the center of the TG vortex extends beyond the [0, 16] time interval; at the end of this section, we discuss how the growth rate of WKBJ system approximates the leading eigenvalue of the LNSE.

Figure 7b shows the approximations for the particle marked with \((\times )\) in Fig. 7d; in part (b), it is visible that the second-order WKBJ approximation is quantitatively correct up to \(t=8.7\) and it is qualitatively correct until \(t=16\). The second-order WKBJ approximation shows better results than the first-order one both with respect to quantitative and qualitative approximations. We remark that, in the neighborhood of \((\times )\), the disturbance maintains a wave packet shape during the whole interval \(t\in [0,16]\). Because the intensity of the \(u_3\) velocity at the point \((\times )\) varies within this time interval, the instant of time used in Fig. 7d is chosen in order to provide a good visual representation of wave packet oscillations in the neighborhood of \((\times )\).

Figure 7c shows the approximation for the particle marked with \((+)\) in Fig. 7d. The first-order approximation is quantitatively correct up to \(t= 1.7\). In contrast, the second-order WKBJ approximation remains quantitatively correct up to \(t=8.7\). Up to this moment, the second-order approximation captures correctly subtle undulations of DNS solution that the first-order approximation misses. The second-order approximation remains qualitatively correct up to \(t=10\) and, after this moment, it breaks down completely. A possible explanation for this breakdown can be seen in Fig. 7d: the particle marked with \((+)\) no longer belongs to the main body of the wave packet.

Fig. 7
figure 7

The \(u_3\) velocity component is computed using the first-order WKBJ approximation (dashed blue line), the second-order one (continuous red line), and DNS (bullet points). For visualization of approximation errors, the DNS data are plotted with error bars around the exact value. The size of the error bars follows the formula: \(\max \{0.15|u_3|,0.03\}\), i.e., either 15% relative error of \(|u_3|\) (as computed by DNS) or an absolute error of 0.03, whichever is larger. ac show \(u_3\) as a function of time along three different particle paths. The position of each particle at time \(t=13.75\) in the \((x_1,x_2,0)\) plane is shown in d which also shows the spatial distribution of \(u_3\) in this plane (the domain is partially shown). ac correspond to the particles marked with (asterisk), (times), and (plus), respectively. (Color figure online)

From the data shown here, we can say that the second-order approximation is better than the first-order one; it is always more accurate, it is quantitatively correct for longer time, and it captures better oscillations in the DNS solution; nevertheless, it can break down. We conjecture that a WKBJ approximation remains qualitatively correct (both the first and the second order) as long as the disturbance maintains its wave packet shape because, in this case, the disturbance still “fits” in the WKBJ ansatz even though its amplitude and wavevector have deviated slightly. Later, when the initial wave packet loses its shape, the original wave packet ansatz no longer holds true and qualitative agreement is lost.

Fig. 8
figure 8

a, b Contour lines of \(L_1({\mathbf x},1)\) and \(L_1({\mathbf x},13.75)\), respectively. Initially \(L_1({\mathbf x},0)\) are vertical lines with 0.05 spacing in the \(x_1\)-direction. Markers represent the same particles as Fig. 7d

In the following, we use the Lagrangian map to help identify regions where WKBJ may become inaccurate. The idea is to find regions where scale separation may be lost either because \(|{\mathbf k}(t,x)|\) becomes small or because its derivative \(\nabla {\mathbf k}(t,x)\) becomes large, cf. Eq. (33). Consider a particle at \(({\mathbf x},t)\), and the Lagrangian map \({\mathbf L}({\mathbf x},t):\mathbb {R}^2\times [0,T]\rightarrow \mathbb {R}^2\) yields the position of this particle at \(t=0\), i.e., \({\mathbf L}(\xi (t;{\mathbf x}_0),t) = {\mathbf x}_0\). Then the solution of Eq. (10) is \(\phi ({\mathbf x},t) = \phi _0({\mathbf L}({\mathbf x},t))\). For the disturbance used in numerical experiments, as defined in Sect. 4, it is sufficient to plot the contour lines of the first component \(L_1({\mathbf x},t)\) of \({\mathbf L}({\mathbf x},t)\) because \(\phi ({\mathbf x},t)\) is proportional to \(L_1({\mathbf x},t)\). From the contour lines of \(L_1({\mathbf x},t)\), both the direction of \({\mathbf k}({\mathbf x},t)\) and the norm \(|{\mathbf k}({\mathbf x},t)|\) can be inferred by visual inspection.

Figure 8 shows the contour lines of \(L_1({\mathbf x},1)\) and of \(L_1({\mathbf x},13.75)\) in part (a) and part (b), respectively; the markers \((*,\times ,+)\) correspond to the same particles shown in Fig. 7d. In part (a), all contour lines show small curvature regardless of particle position. In part (b), there are strong curvatures in contour lines in the neighborhood of \((+)\); indeed, \({\mathbf k}\) changes the direction abruptly (pointing toward and then away from the center) and the contour lines have the largest curvature where they are further apart. Thus, in this neighborhood, \(|{\mathbf k}|\) is small but the derivatives of \({\mathbf k}\) are not. The loss of qualitative agreement at \((+)\) and the increase of \(S_{\mathbf k}\) occur simultaneously. In contrast, at the same time \(t=13.75\), WKBJ approximation is qualitatively correct at \((\times )\) where the curvature of the contour lines in the neighborhood are not so strong. Furthermore, at the center of the vortex, \((*)\) remains at a point where the contour line has zero curvature and WKBJ remains accurate beyond \(t=16\). Notice that at the top and at the bottom of part (b) there are regions where contour lines are very close together, and because \(|{\mathbf k}|\) increases, the wave packet quickly vanishes due to AD. This means that any remaining disturbances of the NLSE in this region are due to a global dynamics which the initial wave packet has triggered. The global mode shown in Fig. 10a eventually becomes the dominant disturbance. For the nonlinear NSE, the intensity of the initial wave packet, combined with transient growth, can trigger transition before the dominant global mode is reached.

Fig. 9
figure 9

a Streamlines of the recirculation flow (RF); the central part of the flow has lower speeds. The initial disturbance shown in Fig. 1 is added to the RF flow. b Time evolution of the \(u_3\) velocity component of the disturbance along the trajectory of the particle marked with (asterisk) in (c, d). In b, this velocity component is computed by the first-order WKBJ approximation (dashed blue line), the second-order WKBJ approximation (solid red line), and DNS (bullet points). Error bars around the DNS data represent 15% relative error or \(6\times 10^{-3}\) absolute error, whichever is larger. The second-order WKBJ approximation closely follows the transient peak. c \(u_3\) velocity component in the \((x_1,x_2,0)\) plane at \(t=7\). d The contour lines of the Lagrangian map of particles, \({\mathbf L}_1\), at the same \(t=7\). The same three particles are marked in (c) and (d). At particle (asterisk), the wave is tilted along the shear and AD becomes strong. At particle (plus), the wave packet shape still remains, while at particle (times) the wave packet has lost its shape due to a sharp fold in the Lagrangian map. (Color figure online)

Fig. 10
figure 10

a, b The \(u_3\)-component of the leading eigenfunctions of TG and RF, respectively. The leading eigenfunction of TG resembles a localized wave packet. Because of its oscillations, the TG eigenfunction is computationally more demanding: a grid \(257\times 257\) is used in a, while in b the dimensions are \(129\times 129\)

5.2.2 RF base flow

In the second numerical experiment, we consider the WKBJ precision when applied to RF base flow; the initial condition is the same as used with TG base flow in the first numerical experiment and \(\epsilon \) is also the same. Figure 9a shows RF’s streamlines. Figure 9b shows the DNS data and WKBJ approximations along the particle marked with \((*)\) in parts (c) and (d). Clearly, the second-order WKBJ approximation correctly captures a relatively strong transient that the first-order one misses. The peak in part (b) is an example of OM: at time \(t=3.5\), the ridges-and-valleys of the \(u_3\) velocity are tilted backward to the local shear, which then moves the fluid above \((*)\) faster than the fluid below \((*)\) and, latter on at \(t=7\) shown in part (d), the ridges-and-valleys are tilted forward to the local shear. Furthermore, both WKBJ approximations approach zero for \(t>8\) and this is due to AD. The DNS data show that the disturbance has an oscillatory motion which persists for \(t>8\). This persistent oscillation may be due to long-time behavior which is better captured by eigenfunctions.

Contour lines of the Lagrangian map and the \(u_3\) component of the wave packet disturbance can be compared in parts (c) and (d) of Fig. 9. This snapshot is close to the instant where, at (\(*\)), the second-order WKBJ goes outside the error bar in part (b). The marker \((+)\) indicates a point where both WKBJ approximations, first and second order, yield good results. Both are quantitatively correct up to \(t=6.5\) and qualitatively correct thereafter (time plot for this point is not shown for brevity); notice in part (d) that the contour lines have mild curvature and they are not far apart; also notice in part (c) the local wave packet shape of the disturbance in the neighborhood of \((+)\). In contrast, at the point marked with \((\times )\) in part (d), contour lines indicate that WKBJ should not be trusted: comparison with part (c) reveals that the disturbance no longer resembles a wave packet in its neighborhood. Indeed, comparison with DNS reveals that the second-order approximation at the particle \((\times )\) is quantitatively correct up to \(t=5.5\) (time plot not shown for brevity) but then the DNS solution changes rapidly just before \(t=7\) and qualitative agreement is lost thereafter.

The procedure based on Lagrangian map is effective in depicting where and when WKBJ can be trusted; this procedure is computationally cost effective and can be supplemented by physical knowledge. Because asymptotic time dynamics is governed by eigenvalues and eigenfunctions, WKBJ eventually fails unless the leading eigenfunction has a wave packet shape; this is the next topic.

5.2.3 Eigenfunctions

Figure 10 shows \(u_3\) component of the leading eigenfunctions \({\mathbf g}_1(x_1,x_2)\) and \({\mathbf g}_2(x_1,x_2)\) for TG and RF, respectively. The important remark is that the largest growth rate of the first-order WKBJ system can be used to approximate the growth rate of \({\mathbf g}_1\) but not of \({\mathbf g}_2\). Indeed, for TG, WKBJ yields 0.1071 as the approximate value for the exponential growth rate, while DNS yields 0.09857, a relative error of 8.7%. On the other hand, for RF, these values are 0.3180 for the WKBJ growth rate and 1.116 for the DNS growth rate, a relative error of 72%. The reason for the success of TG is the wave packet shape of the eigenfunction \({\mathbf g}_1\). We do not extend the discussion into theoretical grounds, which is vast [6, 12, 14, 31,32,33], but we comment on the construction of the elliptical unstable mode [31]. The eigenfunction \({\mathbf g}_1\) is special because it can be approximated by a continuous superposition of plane-wave disturbances that are the solutions of the first-order WKBJ system; this superposition generates a Bessel-like function with radial oscillations as observed in part (a). The approximation of the eigenfunction can be further generalized following the theory presented in [6, 32] where the largest WKBJ growth rate occurs along a closed streamline. Unfortunately, for general base flows, there is no guarantee that the leading eigenfunction is obtainable in this way.

For completion, we summarize the numerical methods used for computing the leading eigenvalue and the largest growth rate of the first-order WKBJ system. The eigenvalue method is based on Arnoldi’s algorithm [34]: the matrix-vector multiplication, \(A{\mathbf b}\), inside this algorithm is computed by time integration of the LNSE over a fixed time interval (0.5 time units) where the initial condition is \({\mathbf b}\). The dimension of Krylov subspace is 50. Six restarts of Arnoldi’s algorithm are necessary until the modulus of the leading eigenvalue satisfies the stopping criteria, namely the relative change of the leading eigenvalue between consecutive restarts is less than \(10^{-7}\). The procedure for computing the largest growth rate of the first-order WKBJ system is described in [16] and outlined here as follows. For each streamline of the base flow, chose any \(\xi (0)\) on this streamline, then determine the best \({\mathbf k}(0)\) (it can be shown that the best \({\mathbf k}(0)\) yields a time periodic \({\mathbf k}(t)\) with the same period as the streamline), and then, using Floquet theory, determine \({\mathbf u}^0(0)\) that results in the largest exponential growth rate of \({\mathbf u}^0(t)\). Finally, the growth rate of \({\mathbf u}^0(t)\) is maximized over all streamlines. During this procedure, a few time integrations of the first-order WKBJ system are necessary per streamline examined in the optimization.

6 Conclusions and discussion

In this article, we study the first- and the second-order WKBJ approximations of wave packet disturbances (inertial waves) in viscous flows and compare this approximation with numerical simulations. We find that important elements to consider are as follows: symmetries of the base flow (Sect. 5.1), scale separation (Sect. 4), Lagrangian map of particles (Sect. 5.2.1), and distance to boundaries (Sect. 5.1). We conclude that WKBJ is successful in approximating localized transients but its success in approximating eigenvalues seems to be limited to a specific setting. Numerical experiments show that the second-order WKBJ approximation gives better results than the first-order one. This conclusion holds for general base flows because of the local character of the approximation.

Surprisingly, the center of the TG vortex has a symmetry that enhances WKBJ’s precision. We find that the second-order WKBJ correction vanishes and thus the first-order WKBJ approximation becomes superconvergent (Sect. 3). This precision enhancing symmetry is present in any vortex with streamlines that have the same symmetry group of an ellipse. In order to test WKBJ approximation without precision enhancing symmetries, the RF base flow is defined by disrupting TG’s symmetries.

Generally speaking, the WKBJ approximation is expected to yield good results when there is a wide scale separation between the base flow and the spatial oscillations of disturbances, i.e., if the gradient of the base flow varies slowly when compared with the length scale of oscillations. When searching for linear instabilities, or linear transients, the first step is to find a set of parameters where the WKBJ system has such instabilities/transients. In inviscid flows, it is safe to say WKBJ approximation works because short-wave oscillations can be made arbitrarily short to guarantee scale separation. In contrast, for viscous flows, an arbitrary short wave is strongly damped by viscosity. Thus, the shortness of the wave must scale with viscosity in order to allow interesting dynamics to occur. The second step is to verify if the interesting solutions of the WKBJ system can attain enough scale separation at the given Re; this is related to Eq. (7). In Sect. 4, a local length scale is defined based on the disturbance wavelength. This length scale leads to the definition of local adimensional quantities, for example, the local Reynolds number \(\text {Re}_l\) and other quantities related to scale separation. Moreover, in order to maintain scale separation for longer time scales, the gradient of quantities like the wavevector and wave packet envelope should not become large. Finally, the third step is the validation of the analysis by placing the desired wave packet disturbance in the DNS code and comparing its time evolution with the WKBJ approximation. It is not always possible to perform this last step due its cost. In this case, we suggest using the Lagrangian map of particles for further assurance of scale separation. For the approximation of transients, computational experiments show that the second-order WKBJ approximation captures the transient dynamics of wave packet disturbances, provided that the level sets of the phase \(\phi ({\mathbf x},t)\) are not strongly folded. Folds are revealed by the Lagrangian map of particles (Figs. 8b, 9d). A fold is a potential source of error for the WKBJ approximation because the local wavevector varies strongly in space in contrast to the hypothesis of scale separation.

Knowledge about the quality WKBJ approximation can be used, for example, to simplify the calculation of linear transient growth. The Orr mechanism, commonly present in shear flows, is a source of transient growth for which WKBJ approximation can be applied. In computational experiments, we observe that the second-order WKBJ approximation is accurate at the peak intensity of transients (Fig. 9). Capturing transients in a pointwise form (as opposed to an energy integral form over the domain) is important for analyzing possible nonlinear interactions and its relation to bypass transition. We mention that there is a recent investigation on linear disturbances with strong pointwise intensity [35].

At the center point of the TG vortex, the time asymptotic growth rate of the first-order WKBJ approximation is known to agree with the modal growth rate [15, 16]; we confirm this assertion in Sect. 5.2.3. Furthermore, a computational experiment with a wave packet initial condition shows that the first-order WKBJ yields a good approximation at this point, Fig. 7. From the results presented in Sect. 3, we can state that this agreement is second-order accurate in the asymptotic parameter. We mention that, despite the good agreement with the modal growth rate of the TG base flow, studies on the accuracy of WKBJ for approximating modal growth rates in other viscous flows are not unanimous. There is either quantitative agreement [18, 19] or qualitative agreement only [8, 20]. It is not yet clear what distinguishes one case from the other, but it seems that quantitative agreement occurs whenever the leading eigenfunction is localized in the neighborhood of the streamline where WKBJ predicts the highest growth rate. This statement is supported by the numerical evidence presented in [19] and by theoretical work showing that the eigenfunction can be reconstructed by superposition [6, 31, 32]. Although our computational experiments are not designed to resolve this issue, we mention that they are consistent with the above view.