1 Introduction

In turbulence, unsteady flow structures across a range of spatiotemporal scales emerge, evolve, and interact in a complex manner giving rise to its vibrantly rich dynamics. Understanding the fundamental mechanisms of unsteady and turbulent flows has been of critical importance in fluid dynamics [1,2,3,4,5]. To study these flows, mathematically rigorous and systematic characterization of the spatiotemporal evolution of flow perturbations is key in not only deepening our insights but also for modifying the dynamics of such flows to achieve engineering benefits, including drag reduction, lift increase, noise mitigation, mixing improvement, and combustion enhancement.

Because fluid flows generally require high degrees of freedom to describe their dynamics even for relatively simple problems, tracking and understanding all unsteady flow structures remains a daunting task. Therefore, what is often pursued is to study the dominant dynamics that offer accurate predictions of the primary dynamics (large-scale motions) or turbulent statistics. Capturing the dominant behavior of the flow and the associated spatial structures can be achieved with modal analysis [5,6,7,8,9,10,11,12,13]. At its core, modal analysis methods seek to break down a flow field into a linear combination of modes. These modes can capture the dominant dynamics of the system, enabling analysis, modeling, estimation, and control [6, 14,15,16,17,18].

These modal analysis techniques can be broadly categorized into data-based and operator-based techniques. Data-based techniques include the proper orthogonal decomposition [6, 19], spectral proper orthogonal decomposition [20, 21] and dynamic mode decomposition [7, 8]. Operator-based techniques are based on the linearized Navier–Stokes equations and include the global stability analysis [9, 22] and resolvent analysis [23,24,25,26]. In fact, the global stability analysis and resolvent analysis are closely related to one another [11]. Given the linearized governing equation, the global stability analysis examines the stability of the base flow through eigenvalue decomposition and captures the homogeneous solution to the initial value problem. Resolvent analysis on the other hand considers the same but forced linear system, which can be examined through singular value decomposition. In a complementary manner, the resolvent framework studies the particular solution to the forced problem. For these reasons, it is known that the global stability analysis and resolvent analysis go hand in hand to provide a complete picture of the linear flow dynamics.

Resolvent analysis reveals the amplification dynamics for a given base flow through pairs of forcing and response modes and the gain that signifies the magnitude of amplification [23, 25]. Initially, resolvent analysis was formulated for studying stable laminar flows (solutions to the Navier–Stokes equations). This formulation was later extended to unstable systems [27] and the analysis of time-averaged turbulent flows [26]. The latter extends from the former approach by considering the nonlinear terms as a self-sustained input within the natural feedback mechanism of the flow system. The resolvent analysis essentially analyzes the pseudospectra of the linear operator, revealing harmonic response characteristics and the transient energy growth [23, 25]. These perspectives have greatly expanded the horizon of modal analysis to examine complex turbulent flows [11, 12].

Resolvent analysis has been applied to study diverse types of flow problems, including channel flows [25, 28], pipe flows [26], boundary layers [29], wing wakes [30,31,32], turbulent jets [33, 34], combustion [35], airfoil noise [36], transonic buffet [37, 38] and cavity flows [39, 40]. Because resolvent analysis is essentially equivalent to the state-space system description from the dynamical system and control theories, it naturally provides guidance on designing active and passive flow control strategies [40,41,42,43,44,45,46]. It can also serve as the basis to perform flow estimation [47]. Therefore, resolvent analysis represents a valuable complement to both flow simulations and experiments by offering insights into the fundamental understanding and modeling of fluid flows.

With growing interest in utilizing resolvent analysis to understand the input–output relation for a variety of flows, many research groups have initiated efforts to develop and implement computer programs to perform resolvent analysis. During their efforts, our research groups have been asked on many occasions how to handle some of the details and nuances related to their code developments and how to interpret their results. Some of these details and know-how are not necessarily discussed in archival papers and are not made available in a single document. Here, we attempt to provide as many of these details as possible in a single guide to assist those who may be considering adopting resolvent analysis as their tool of choice. For this reason, this document is not designed to serve as a review article. For a survey on resolvent analysis, we point to [10].

This document aims to serve as a comprehensive guide for implementing resolvent analysis, with detailed discussions and suggestions based on the authors’ use of resolvent analysis over the years. Unlike other papers, we discuss practical matters that should be considered for the construction of the linear operator and numerical procedures to compute the resolvent modes. The basic steps for resolvent analysis are summarized in Fig. 1, which forms the basis of this paper. To offer concrete recommendations for using resolvent analysis in this paper, we mainly focus on the compressible Navier–Stokes equations.

The structure of this paper is as follows. The basic concept of resolvent analysis and its implementation are discussed in Sect. 2. Computational approaches to find the resolvent modes and gain are offered in Sect. 3. Finally, in Sect. 4, we detail the setup for performing the resolvent analysis and provide the physical interpretation of the results through biglobal and triglobal resolvent analysis examples. Concluding remarks are offered in Sect. 5. In addition to the main text, supplemental material on the full linearized compressible Navier–Stokes equations and pseudocodes for performing the resolvent analysis are made available in the Appendix. We hope this document serves as a welcoming invitation to new students and researchers interested in resolvent analysis.

Fig. 1
figure 1

Overview of performing resolvent analysis

2 Resolvent analysis

In this section, we present the formalism of resolvent analysis, provide considerations about the appropriate energy norm and discuss the selection of the base flow, which is a critical aspect for meaningful analysis. We also provide guidance on generating the linear operator and introduce variations from the classical approach that can enhance the effectiveness of resolvent analysis.

2.1 Formulation

Let us consider the Navier–Stokes (NS) equations for three-dimensional compressible flow,Footnote 1 expressed with conservative variables:

$$\begin{aligned} \begin{aligned}&\frac{\partial \rho }{\partial t} + \varvec{\nabla }\cdot ( \rho \textbf{u}) = g_\rho \\&\frac{\partial \rho \textbf{u}}{\partial t} + \varvec{\nabla }\cdot ( \rho \textbf{u}\otimes \textbf{u}) =-\varvec{\nabla }p+\varvec{\nabla }\cdot \left[ \mu \;(\varvec{\nabla }\textbf{u}+\varvec{\nabla }\textbf{u}^T)-\frac{2}{3}\mu \varvec{\nabla }\cdot \textbf{u}\,\textrm{I}\right] + \textbf{g}_{\rho \textbf{u}}\\&\frac{\partial \rho e}{\partial t}+\varvec{\nabla }\cdot ( \rho \textbf{u}e+p\textbf{u})=\varvec{\nabla }\cdot (K\varvec{\nabla }T)+\varvec{\nabla }\cdot \left( \textbf{u}\;\left[ \mu \;(\varvec{\nabla }\textbf{u}+\varvec{\nabla }\textbf{u}^T)-\frac{2}{3}\mu \varvec{\nabla }\cdot \textbf{u}\,\textrm{I}\right] \right) + g_{\rho e}, \end{aligned} \end{aligned}$$
(1)

where \(\rho \) is the fluid density, \(\textbf{u}=(u_x,u_y,u_z)\) the velocity vector, e is the total energy, p the pressure, and T the temperature. In these equations, external source and forcing terms are present in each equation represented by \(g_\rho \), \(\textbf{g}_{\rho \textbf{u}}\), and \(g_{\rho e}\). The viscosity \(\mu \) and the thermal conductivity K are taken to be constant. The above set of equations, Eqs. 1, can be spatially discretized on a grid using a computational fluid dynamics technique of one’s choice. We can then express the discretized NS equations in compact form

$$\begin{aligned} \frac{d\textbf{q}}{dt}=\mathcal {N}(\varvec{\textbf{q}}) + \textbf{g}, \end{aligned}$$
(2)

where \(\textbf{q}=(\rho , \rho \textbf{u},\rho e)^T \in \mathbb {R}^N\) represents the state vector (conservative variables) and \(\mathcal {N}\) denotes the nonlinear NS evolution operator. The degrees of freedom of the state variable N depend on the spatial discretization. If \(N_{\text {cell}}\) indicates the number of cells/points used for the spatial discretization and m is the number of state variables, then \(N=m\times N_{\text {cell}}\). The last term \(\textbf{g} = (g_\rho , \textbf{g}_{\rho \textbf{u}}, g_{\rho e})^T\) collects the external forcing terms. Because Eq. 2 is taken to be spatially discretized, the temporal derivative is expressed with an ordinary derivative instead of a partial derivative.

Now, we consider the flow field to be comprised of the chosen time-invariant base flow \(\textbf{q}_b \in \mathbb {R}^N\), which can be either a time-averaged flow or fixed point solution, and the perturbation \(\textbf{q}^\prime \in \mathbb {R}^N\) such that

$$\begin{aligned} \textbf{q}(\textbf{x},t) = \textbf{q}_b(\textbf{x}) + \textbf{q}^\prime (\textbf{x},t). \end{aligned}$$
(3)

Substituting this velocity field expression into Eq. 2 and performing a Taylor series expansion, we obtain

$$\begin{aligned} \frac{d \textbf{q}_b}{d t}+\frac{d \textbf{q}^\prime }{d t} =\mathcal {N}(\textbf{q}_b+\textbf{q}^\prime ) + \textbf{g} =\mathcal {N}(\textbf{q}_b) +\left. \varvec{\nabla }_{\textbf{q}} \mathcal {N} \right| _{\textbf{q}_b}\textbf{q}^\prime +\textbf{g}+O(|\textbf{q}^\prime |^2). \end{aligned}$$
(4)

Because we are considering a stationary base flow (\({d \textbf{q}_b}/{d t}=0\)), we arrive at the system describing the dynamics of the perturbation \(\textbf{q}^\prime \) as

$$\begin{aligned} \frac{d \textbf{q}^\prime }{d t}=\mathcal {L}\textbf{q}^\prime +\textbf{f}^\prime . \end{aligned}$$
(5)

In this equation,

$$\begin{aligned} \mathcal {L}\equiv \left. \varvec{\nabla }_{\textbf{q}} \mathcal {N} \right| _{\textbf{q}_b} \in \mathbb {R}^{N\times N} \end{aligned}$$
(6)

represents the linearized NS operator about the base flow \(\textbf{q}_b\) (see Appendix A for its continuous form) while

$$\begin{aligned} \textbf{f}^\prime = \mathcal {N}(\textbf{q}_b) +O(|\textbf{q}^\prime |^2) + \textbf{g}\in \mathbb {R}^{N} \end{aligned}$$
(7)

collects the nonlinear NS operator acting on the base flow, the nonlinear terms, and external forcing \(\textbf{g}\). If the problem has a periodic direction as in the case of biglobal analysis, we can have a complex variable formulation. See Appendix A for details. Equation 5 represents the evolution of the response \(\textbf{q}^\prime \) through the linearized NS equations with forcing \(\textbf{f}^\prime \).

Through resolvent analysis, we seek the dominant forcing inputs and the corresponding perturbations that are amplified over the flow field. Given a stationary base flow, we assume the perturbations to be harmonic (sinusoidal in time). This means that the response (\(\textbf{q}^\prime \)) and forcing (\(\textbf{f}^\prime \)) can be expressed through Fourier representation of

$$\begin{aligned} \begin{aligned} \textbf{q}^\prime (\textbf{x,t})=\int ^\infty _{-\infty }\hat{\textbf{q}}_\omega (\textbf{x})e^{-i\omega t}d\omega ,\\ \textbf{f}^\prime (\textbf{x,t})=\int ^\infty _{-\infty }\hat{\textbf{f}}_\omega (\textbf{x})e^{-i\omega t}d\omega . \end{aligned} \end{aligned}$$
(8)

With these Fourier representations, Eq. 5 can be rewritten as

$$\begin{aligned} - i\omega \hat{\textbf{q}}_\omega (\textbf{x}) =\mathcal {L}\hat{\textbf{q}}_\omega (\textbf{x}) +\hat{\textbf{f}}_\omega (\textbf{x}) \end{aligned}$$
(9)

at each temporal frequency \(\omega \), providing the following input–output relationship:

$$\begin{aligned} \hat{\textbf{q}}_\omega (\textbf{x}) = [-i\omega I -\mathcal {L}]^{-1}\hat{\textbf{f}}_\omega (\textbf{x}) =\mathbf {\mathcal {H}}_\omega \hat{\textbf{f}}_\omega (\textbf{x}). \end{aligned}$$
(10)

Here, \(\mathbf {\mathcal {H}}_\omega =[-i\omega I-\mathcal {L}]^{-1}\in \mathbb {C}^{N\times N}\) is the resolvent operator that acts as a transfer function between the forcing input and the response output at frequency \(\omega \).

In resolvent analysis, instead of examining all possible combinations of \( \hat{\textbf{q}}_\omega (\textbf{x})\) and \( \hat{\textbf{f}}_\omega (\textbf{x})\), our objective is to identify the optimal ones that maximize the energy between inputs and outputs of the system [49]

$$\begin{aligned} \sigma _\omega ^2 =\max _{\hat{\textbf{f}}_\omega } \frac{\langle \hat{\textbf{q}}_\omega ,~\hat{\textbf{q}}_\omega \rangle _{E}}{\langle \hat{\textbf{f}}_\omega ,~\hat{\textbf{f}}_\omega \rangle _{E}} ={ {\max _{\hat{\textbf{f}}_\omega } \frac{||\hat{\textbf{q}}_\omega ||^2_{E}}{||\hat{\textbf{f}}_\omega ||^2_{E}}}}, \end{aligned}$$
(11)

where \(\sigma _\omega \) is the energy gain and \(||\cdot ||_{E}\) is a suitable energy norm. This norm needs to be chosen as a physically relevant metric. We will discuss in detail in Sect. 2.2 how to transform the optimization problem of Eq. 11 based on the energy norm into a problem based on the \(L_2\) norm.

Equation 11 is an optimization problem and the most straightforward way to solve this problem is to perform a singular value decomposition (SVD) of the resolvent operator to find

$$\begin{aligned} \mathbf {\mathcal {H}}_\omega =Q_\omega \Sigma _\omega F^*_\omega \text{, } \end{aligned}$$
(12)

where the columns of

$$\begin{aligned} Q_\omega =[\hat{\textbf{q}}_{\omega ,1}, \hat{\textbf{q}}_{\omega ,2},...,\hat{\textbf{q}}_{\omega ,N}] \in \mathbb {C}^{N \times N} \end{aligned}$$
(13)

and

$$\begin{aligned} F_\omega =[\hat{\textbf{f}}_{\omega ,1}, \hat{\textbf{f}}_{\omega ,2},...,\hat{\textbf{f}}_{\omega ,N}] \in \mathbb {C}^{N \times N} \end{aligned}$$
(14)

hold the left and right singular vectors of \(\mathbf {\mathcal {H}}_\omega \). Here, the right singular vectors \(F_\omega \) represent the optimal basis for the input to the system, that is, the forcing modes. On the other hand, the left singular vectors \(Q_\omega \) represent the optimal basis for the output to the system, that is, the response modes. The gains that represent the energy amplification of the system between forcing-response mode pairs are stored on the diagonal of

$$\begin{aligned} \Sigma _\omega =\text {diag}(\sigma _{\omega ,1},\sigma _{\omega ,2},...,\sigma _{\omega ,N}) \in \mathbb {R}^{N\times N} \text{. } \end{aligned}$$
(15)

The formulation of the resolvent analysis is illustrated in Fig. 2. Superscript \(*\) denotes the conjugate transpose of the matrix. Matrices \(Q_\omega \) and \(F_\omega \) are unitary, which means \(Q_\omega ^{-1} = Q^*_\omega \), \(Q_\omega Q^* = Q^*_\omega Q_\omega = I\) and \(F_\omega ^{-1} = F^*_\omega \), \(F_\omega F^*_\omega = F^*_\omega F_\omega = I\). As the left and right singular vectors are orthonormal, they serve as the basis vectors for the range (output) and domain (input) of the resolvent operator (input–output relation). Because the forcing and response modes are both normalized (unit length), the information about amplification is entirely contained in the singular values.

Fig. 2
figure 2

Representation of the resolvent analysis. Blue and yellow boxes show the primary forcing and response modes, respectively. The amplification/gain distribution is shown in red (colour figure online)

For the singular value decomposition, it is standard to order the singular values in decreasing order such that

$$\begin{aligned} \sigma _{\omega ,1} \geqslant \sigma _{\omega ,2} \geqslant \cdots \geqslant \sigma _{\omega ,N} \geqslant 0. \end{aligned}$$
(16)

This means that the most amplified mode pair is made by the first forcing mode \(\hat{\textbf{f}}_{\omega ,1}\) and first response mode \(\hat{\textbf{q}}_{\omega ,1}\) with the amount of amplification (gain) captured by \(\sigma _{\omega ,1}\). If the singular values quickly decrease in magnitude, only the first few modes are retained to study the dominant amplification characteristics of the flow. Therefore, the modes that possess relatively large singular values can be kept and those with negligible singular values can be truncated. In fact, many shear-dominated flows have amplification properties that are dominated by the first few resolvent modes. Thus, we can approximate the resolvent operator as:

$$\begin{aligned} \mathbf {\mathcal {H}}_\omega =Q_\omega \Sigma _\omega F^*_\omega = \sum _{j=1}^N \hat{q}_{\omega ,j} \sigma _{\omega ,j} \hat{f}^*_{\omega ,j} \approx \sum _{j=1}^r \hat{q}_{\omega ,j} \sigma _{\omega ,j} \hat{f}^*_{\omega ,j}, \end{aligned}$$
(17)

that can can be considered as a low-rank approximation that retains only the first r modes. We can consider that these dominant directions are the most effective or dangerous ways to amplify the perturbations.

The collection of the jth gain (\(\sigma _{\omega ,j}\)), response mode (\(\hat{\textbf{q}}_{\omega ,j}\)), and forcing mode (\(\hat{\textbf{f}}_{\omega ,j}\)) are referred to as the jth resolvent (singular) triplet and is expressed as \((\hat{\textbf{q}}_{\omega ,j},\sigma _{\omega ,j},\hat{\textbf{f}}_{\omega ,j})\). We recall that the singular value decomposition is performed for each frequency, which means that \(\hat{\textbf{q}}_{\omega ,j}\), \(\sigma _{\omega ,j}\), and \(\hat{\textbf{f}}_{\omega ,j}\) are functions of \(\omega \) as indicated by their subscripts. However, as these subscripts make the variables notations cumbersome, we drop the subscripts in what follows and refer to them as \(\hat{\textbf{q}}_{j}\), \(\sigma _{j}\), and \(\hat{\textbf{f}}_{j}\).

Generally speaking, what the resolvent analysis seeks is the particular solution to the forced linear dynamical system, Eq. 5. If there is no forcing applied, then the system is satisfied by the homogeneous solution as the initial value problem. For an unforced problem, expressing the perturbation variable as

$$\begin{aligned} \textbf{q}^\prime (\textbf{x,t}) = \hat{\textbf{q}}(\textbf{x})e^{\lambda t}, \end{aligned}$$
(18)

the linearized governing equation can be transformed to

$$\begin{aligned} \mathcal {L} \hat{\textbf{q}}(\textbf{x}) = \lambda \hat{\textbf{q}}(\textbf{x}), \end{aligned}$$
(19)

which is an eigenvalue problem for the linearized Navier–Stokes operator \(\mathcal {L}\). This is the formulation for the global stability analysis [9, 22], which provides the eigenvalue \(\lambda \) and the eigenvector \(\hat{\textbf{q}}(\textbf{x})\), known as the (global) instability mode.

Both resolvent analysis and stability analysis investigate the behavior of perturbations for a system. Resolvent analysis focuses on the system response to external forcing, while stability analysis assesses the natural growth or decay of the perturbations. It has also been shown that, when the leading singular value of the resolvent is substantially larger than the others at a specific frequency, hence well represented by a rank-1 approximation, then the spectral mode and the dominant optimal response mode from the resolvent analysis are directly proportional to each other at that frequency [50]. This generally occurs for weakly non-parallel flows with dominant convective instability mechanisms. As evident from this discussion, the global stability analysis and resolvent analysis complement each other to paint the whole dynamical characterization of the flow. Additional discussion on the stability analysis is provided in Sect. 2.3.

Since the flow is assumed to be statistically stationary, meaning that its statistical properties, such as mean and variance, remain constant over time, we can effectively consider turbulent flows, where fluctuations are still represented as a superposition of Fourier components in time. This perspective allows resolvent analysis to be extended to high Reynolds number flows and their statistical analysis [47, 51,52,53]. In this regard, a significant connection exists between resolvent analysis and spectral proper orthogonal decomposition (SPOD), which bridges theoretical analysis with empirical data. SPOD, as a data-driven technique, relies on instantaneous snapshots of the flow field to identify coherent structures and extracts the most energetic structures that vary in both space and time [54]. The modal structures obtained from SPOD correspond to the most amplified modes derived from resolvent analysis when the forcing is white noise [51].

2.2 Energy norm

Since resolvent analysis is concerned with the optimization problem in Eq. 11 that seeks a forcing input that results in the maximum energy amplification and the corresponding flow response, we need to define a physically relevant energy for fluid flow systems. For compressible flows, both kinetic energy and thermodynamic energy contribute to the total energy in the flow,Footnote 2 and a commonly used compressible flow energy is that considered by Chu [55]. Chu defined the total disturbance energy in a compressible flow as

(20)

where \(\bar{a}=\sqrt{\gamma R \bar{T}}\) is the speed of sound, with R being the gas constant, \(\gamma \) the heat capacity ratio and \(c_v\) the heat capacity at constant volume. Recall that variables denoted with \(\bar{\cdot }\) indicate the base flow quantities.

We note that the Chu energy in Eq. 20 involves quadratic terms for primitive flow variables, \(\textbf{q}'_p = (\textbf{u}', \rho ', T')\). To facilitate the use of Chu energy for our state vector \(\textbf{q}'\) in conservative variables, we need a transformation that maps the conservative variables into primitive ones \((\rho ^\prime ,(\rho u_x)^\prime ,(\rho u_y)^\prime ,(\rho u_z)^\prime ,(\rho e)^\prime )\rightarrow (\rho ^\prime , u_x^\prime , u_y^\prime , u_z^\prime , T^\prime )\) and vice versa. That is,

$$\begin{aligned} \textbf{q}'_p = G\textbf{q}' \quad \text {and}\quad \textbf{q}' = G^{-1}\textbf{q}'_p, \end{aligned}$$
(21)

where

$$\begin{aligned} G= \begin{pmatrix} 1 &{} 0 &{} 0 &{} 0 &{} 0\\ -\dfrac{\bar{u}_x}{\bar{\rho }} &{} \dfrac{1}{\bar{\rho }} &{} 0 &{} 0 &{} 0\\ -\dfrac{\bar{u}_y}{\bar{\rho }} &{} 0 &{} \dfrac{1}{\bar{\rho }} &{} 0 &{} 0\\ -\dfrac{\bar{u}_z}{\bar{\rho }} &{} 0 &{} 0 &{} \dfrac{1}{\bar{\rho }} &{} 0\\ \dfrac{- \bar{p} +\bar{\rho }\bar{U}^2(\gamma -1) }{2R\bar{\rho }^2} &{}-\dfrac{(\gamma -1)\bar{u}_x}{R\bar{\rho }} &{} -\dfrac{(\gamma -1)\bar{u}_y}{R\bar{\rho }} &{} -\dfrac{(\gamma -1)\bar{u}_z}{R\bar{\rho }} &{} \dfrac{(\gamma -1)}{R\bar{\rho }} \end{pmatrix} \end{aligned}$$
(22)

and

$$\begin{aligned} G^{-1}= \begin{pmatrix} 1 &{} 0 &{} 0 &{} 0 &{} 0\\ \bar{u}_x &{} \bar{\rho } &{} 0 &{} 0 &{} 0\\ \bar{u}_y &{} 0 &{} \bar{\rho } &{} 0 &{} 0\\ \bar{u}_z &{} 0 &{} 0 &{} \bar{\rho } &{} 0\\ \dfrac{\bar{U}^2}{2}+\dfrac{\bar{p}}{(\gamma -1)\bar{\rho }} &{} \bar{\rho } \bar{u}_x &{} \bar{\rho } \bar{u}_y &{} \bar{\rho } \bar{u}_z &{} \dfrac{\bar{\rho } R}{(\gamma -1)} \end{pmatrix} \end{aligned}$$
(23)

with \(\bar{U} = (\bar{u}_x^2+\bar{u}_y^2+\bar{u}_z^2)^{1/2}\). With the transformation, the Chu energy in Eq. 20 can be computed via a numerical integration over the computational domain as

$$\begin{aligned} E_\text {Chu} =(G\hat{\textbf{q}})^*W_E(G\hat{\textbf{q}}), \end{aligned}$$
(24)

where the quadrature weight matrix \(W_E\) is given by

$$\begin{aligned} W_E&= \frac{1}{2} \begin{pmatrix} \Delta V\dfrac{\bar{a}^2}{\gamma \bar{\rho }} &{}\quad 0 &{}\quad 0 &{}\quad 0 &{}\quad 0\\ 0 &{}\quad \Delta V\bar{\rho } &{}\quad 0 &{}\quad 0 &{}\quad 0\\ 0 &{}\quad 0 &{}\quad \Delta V\bar{\rho } &{}\quad 0 &{}\quad 0\\ 0 &{}\quad 0 &{}\quad 0 &{}\quad \Delta V\bar{\rho } &{}\quad 0\\ 0 &{}\quad 0 &{}\quad 0 &{}\quad 0 &{}\quad \Delta V\dfrac{\bar{\rho }c_v}{\bar{T}} \end{pmatrix}, \end{aligned}$$
(25)

which contains the cell volume \(\Delta V\) and base flow variables at each grid point. The positive definite weight matrix \(W_E\) can be further decomposed through a Cholesky decomposition, \(W_E=F^*_EF_E\), where

$$\begin{aligned} F_E = \sqrt{\frac{1}{2}} \begin{pmatrix} \sqrt{ \Delta V\dfrac{\bar{a}^2}{\gamma \bar{\rho }}} &{}\quad 0 &{}\quad 0 &{}\quad 0 &{}\quad 0 \\ 0 &{}\quad \sqrt{\Delta V\bar{\rho }} &{}\quad 0 &{}\quad 0 &{}\quad 0\\ 0 &{}\quad 0 &{}\quad \sqrt{ \Delta V\bar{\rho }} &{}\quad 0 &{}\quad 0\\ 0 &{}\quad 0 &{}\quad 0 &{}\quad \sqrt{ \Delta V\bar{\rho } }&{}\quad 0\\ 0 &{}\quad 0 &{}\quad 0 &{}\quad 0 &{}\quad \sqrt{ \Delta V\dfrac{\bar{\rho }c_v}{\bar{T}}} \end{pmatrix}. \end{aligned}$$
(26)

Finally, this allows us to express the Chu energy as a weighted \(L_2\) norm of the conservative state vector, since

$$\begin{aligned} E_\text {Chu} =(G\hat{\textbf{q}})^*W_E(G\hat{\textbf{q}}) =(F_E G\hat{\textbf{q}})^*(F_E G\hat{\textbf{q}}) = \Vert F_E G\hat{\textbf{q}} \Vert _2^2. \end{aligned}$$
(27)

This weighted \(L_2\) norm for the conservative state vector is referred to as the Chu norm, denoted by

$$\begin{aligned} E_\text {Chu} ={ {||G\hat{\textbf{q}}||^2_{E}}} = \Vert F_E G\hat{\textbf{q}} \Vert _2^2. \end{aligned}$$
(28)

By exploiting the Chu norm, the optimization problem in Eq. 11 that seeks an optimal forcing that maximizes the Chu energy can be converted to a \(L_2\)-optimization problem, which can be solved via a singular value decomposition of an appropriately weighted resolvent operator [5]. To account for both the Chu norm and conservative-to-primitive transformation, Eq. 10 becomes

$$\begin{aligned} F_E\underbrace{G\hat{\textbf{q}}_\omega (\textbf{x})}_{\begin{array}{c} \text {response} \\ \text {mode} \end{array}} =\underbrace{F_E(-i\omega I-G\mathcal {L}G^{-1})^{-1}F_E^{-1} }_{\text {resolvent operator}}F_E\underbrace{G\hat{\textbf{f}}_\omega (\textbf{x})}_{\begin{array}{c} \text {forcing}\\ \text {mode} \end{array}}. \end{aligned}$$
(29)

This brings us to the energy-weighted resolvent operator

$$\begin{aligned} \mathcal {H}_{\omega }=F_EG(-i\omega I-\mathcal {L})^{-1}G^{-1}F_E^{-1}. \end{aligned}$$
(30)

Performing the singular value decomposition on this expression of \(\mathcal {H}_{\omega }\), the resulting left and right singular vectors are \(F_EG\hat{\textbf{q}}\) and \(F_EG\hat{\textbf{f}}\), which are appropriately weighted for computing the energy norm with an \(L_2\)-norm and in primitive variables. In order to visualize the actual forcing and response modes over the computational domain, these should be premultiplied by \(F_E^{-1}\) also keeping in mind that the solutions are now expressed in primitive variables.

2.3 Base flow

The linearization of the Navier–Stokes operator is performed about a chosen base flow (\(\textbf{q}_b\)). Traditionally, the base flow is chosen to be a steady-state solution of the Navier–Stokes equations, which is also referred to as an equilibrium state or a fixed point of the fluid flow system. In such case, the linearization of Eqs. 1 provides Eqs. A1 to A3, assuming that the perturbations are small in magnitude. Steady-state analytical solutions of the Navier–Stokes equations are examples of the equilibrium states, such as the Poiseuille or Couette flow.

Numerical simulations can also be used to find the equilibrium state as the base flow. For naturally steady flows, the base flow can be obtained by running the simulations over a sufficiently long time until all unsteadiness subsides to allow for the flow solution to arrive at the stable equilibrium state. For unstable flows, a time-invariant exact solution to the Navier–Stokes equation can be sought numerically by artificially damping the flow unsteadiness. The selective frequency damping technique [56] can be used to numerically damp unsteadiness and determine the unstable equilibrium state. In this approach, an extra feedback term is added to the right-hand side of the Navier–Stokes equation to suppress any temporal fluctuation, thus forcing the flow towards the steady-state solution. This is achieved through

$$\begin{aligned} \begin{aligned}&\frac{d \textbf{q}}{d t}=\mathcal {N}(\textbf{q})-\chi (\textbf{q}-\textbf{q}^\star ),\\&\frac{d \textbf{q}^\star }{d t}=\frac{\textbf{q}-\textbf{q}^\star }{\Delta }, \end{aligned} \end{aligned}$$
(31)

where \(\Delta \) is the width of the low-pass filter, \(\textbf{q}^\star \) is the filtered solution and \(\chi \) a coefficient that tunes the convergence of \(\textbf{q}\) toward \(\textbf{q}^\star \). Therefore, both \(\textbf{q}\) and \(\textbf{q}^\star \) converge toward the filtered steady solution \(\textbf{q}_{b}\) that satisfies \(\mathcal {N}(\textbf{q}_b)=0\). This method has been later modified by [57] to enable adaptive adjustments of \(\Delta \) and \(\chi \) whose values are otherwise known a priori. Another method for computing the unstable equilibrium base flows is a time-stepper formulation of the Newton-GMRES, also called Newton-Krylov methods [58, 59]. Similar to other gradient-based algorithms, these methods seek the solution \(\mathbf {q_b}\) to \(\mathcal {N}(\mathbf {q_b})=0\) by iteratively minimizing the residual \(\textbf{r}\) in \(\mathcal {N}(\mathbf {q_b^*})= \textbf{r}\).

We note that the above numerical approaches to obtaining an unstable equilibrium state generally work for flows of low to modest Reynolds numbers. However, for high Reynolds number turbulent flows, solving for an unstable equilibrium state can be computationally challenging. Moreover, there is no guarantee that a steady-state solution exists. Even if an equilibrium state is successfully sought, it can be quite different from actual turbulent flow or its time-averaged flow field and can limit the interpretability of the results of the resolvent analysis performed about the equilibrium state. Hence, the use of equilibrium state (fixed point) solutions has been mainly limited to analyses close to the stability thresholds.

Fig. 3
figure 3

Feedback loop with the nonlinear term acting as part of forcing

More recently, an alternative perspective for resolvent analysis has emerged to extend its use for base flows beyond an equilibrium solution of the Navier–Stokes equations. For statistically stationary flows, one can consider the time-averaged flowFootnote 3 as the base flow. In this case, the linearization performed to reach Eqs. A1 to A3 does not assume the higher-order nonlinear terms to be negligible. Instead, the nonlinear terms are considered to be part of the forcing term (see Eq. 7), based on a feedback process as depicted in Fig. 3 [26]. By taking this perspective, the focus is placed on the input–output relationship taking place between the flow state and nonlinear forcing with the resolvent operator as a transfer function. The use of time-averaged flows in resolvent analysis has offered a tremendous amount of insights into turbulent flow physics [26, 31, 39, 43]. The time-averaged flows can be obtained from direct numerical simulations, large-eddy simulations, and Reynolds-Averaged Navier–Stokes simulations.

When using a base flow (steady-state or time-averaged) whose linear dynamics is unstable, some care is needed in interpreting the results from the resolvent analysis. In such case, insights on asymptotic input–output amplification characteristics would not be very meaningful since the intrinsic instabilities would become larger than any finite amplification. However, one can consider examining the input–output amplification characteristics on a time scale shorter than that associated with the dominant instability of \(\mathcal {L}\). This can be achieved by using the exponentially discounting approach to restrict the analysis over a finite time horizon [27, 31]. Simple windowing can be applied by multiplying \(\exp (-\gamma t)\) to both sides of Eq. 5, where \(\gamma > 0\) and should depend on the unstable growth rate.

It should be reminded that the results of stability analysis depend on the choice of the base flow [60]. Stability analysis about a fixed-point solution has been shown to correctly detect positive growth rates in correspondence of unsteadiness, despite an underestimation of the nonlinear frequency [61, 62]. On the other hand, in some cases, linear stability analysis of time-averaged base flows has successfully predicted unsteady features of several transitional and turbulent flows [50]. However, caution is advised, as the results can vary depending on whether a primitive or conservative formulation is used [63]. Nevertheless, the use of discounting provides a conservative reading into the amplification characteristics that emerge over a time scale shorter than that of the modal instability, which instead provides information on the asymptotic amplification characteristics. Further details on the discounting approach are offered in Sect. 2.5.2.

An alternative perspective is to treat the nonlinear residual term as an eddy viscosity term [64,65,66,67]. The eddy viscosity term that models the nonlinear term is informed by the base flow and consequently modifies the linear operator. Such an approach has been shown to improve the prediction of coherent structures using resolvent modes [64]. Potentially, the damping effect of the introduced eddy viscosity can also ensure the stability of the overall system. Another approach to model the nonlinear terms is to seek a linear operator modifier via solving a covariance completion problem [68]. This is also shown to improve the prediction of higher statistical moments using resolvent modes.

There are also efforts to use experimentally acquired base flow in resolvent analysis [26]. Care should be taken to consider the effect of noise in experimental measurements and the possible lack of spatial resolution within the boundary layer. There are ongoing effort to incorporate data assimilation to resolve these issues [69].

2.4 Linear operator

Let us describe how the linear operator can be constructed. Because the size of the linear operator \(\mathcal {L}\) is \(N \times N\), which is generally very large, special care must be taken to create or gain access to such a matrix. Luckily, \(\mathcal {L}\) is generally sparse. While the matrix can be stored on a personal computer for small-scale problems (1D and some 2D problems), it can be enormous for larger-scale 2D (biglobal) and 3D (triglobal) problems requiring access to high-performance computing resources. This is especially the case for higher Reynolds numbers and external flows that require a large number of grid points to capture the flow physics.

Once the linear operator \(\mathcal {L}\) is in hand, the resolvent operator is available through \(\mathcal {H}_\omega = [-i\omega I - \mathcal {L}]^{-1}\). However, we stress that the matrix inverse should not be explicitly computed. Numerical algorithms to find a matrix inverse suffer from numerical instabilities and gross inaccuracies, besides being prohibitive regarding the computational cost and memory requirement. Later we discuss how to find the dominant resolvent modes and gains without relying on the availability of the matrix inverse.

There are mainly two approaches to establishing the linear operator within a computer program. The first approach is to develop a computer program that returns the action of the discrete linear Navier–Stokes operator \(\mathcal {L}(\cdot )\) on a given vector. Such a program is equivalent to a right-hand-side function of the linearized Navier–Stokes equations 6. In Appendix A, we provide full details of the linearized compressible Navier–Stokes equations for the three-dimensional (triglobal) case. Simplifications can be achieved for two-dimensional (biglobal) base flows, in which case the homogeneous direction can be expressed in terms of a spatial Fourier series. Details on the biglobal case are also offered in the appendix. This approach avoids explicitly forming a matrix for the linear operator and can free up the computer memory and storage space. However, to facilitate such a matrix-free approach, the adjoint linearized Navier–Stokes operator/program is also needed for the computation of the singular value decomposition of the resolvent operator. More details on such a matrix-free approach and the need for the adjoint operator will be discussed in Sect. 3.

The other approach is to explicitly form the matrix, and is called the matrix-forming method. However, deriving the matrix for the discrete version of the linearized Navier–Stokes equations can be a major task by itself, especially for complex grid structures and for biglobal and triglobal flows. There are two different ways to explicitly derive the linear operator matrix which are described below. We stress that explicitly computing the linear operator matrix, which implies storing the matrix, can be expensive in terms of memory and storage allocation, especially for large-scale problems since the matrix dimension scales as \(O(N_\text {cell}^2)\) while being sparse. However, having access to the actual matrix can facilitate the access also to the adjoint calculations. This can be helpful when the treatment of the boundary conditions is non-trivial for the adjoint operator.

Fig. 4
figure 4

Extraction of the linear operator \(\mathcal {L}\) from a linearized NS code

Matrix extraction If a computer code Linear_NS_RHS(\(\cdot \)) is available to evaluate the right-hand side of the linearized NS equations based on Eqs. A1 to A4, we can form a matrix for the linearized Navier–Stokes operator \(\mathcal {L}\) from such a code. This process can be viewed as right-multiplying an identity matrix I to \(\mathcal {L}\). In practice, we can do so by passing one column of I at a time to the linearized Navier–Stokes operator. The passing of the ith column of the identity matrix to the linear operator (Linear_NS_RHS(\(I_i\))) returns the corresponding ith column of the linear operator \(\mathcal {L}\). This process gives the values of the linear operator in each position as illustrated in Fig. 4, where the action of the linear operator on the identity matrix I is depicted. While this may appear as a computationally cumbersome process, the parallelization of such a task allows for high level of scalability by taking advantage of the sparsity of \(\mathcal {L}\) and non-overlapping stencil within the operator.

Fréchet derivative An alternative way to explicitly compute the linear operator is by using a classic nonlinear CFD solver. This is useful when a solver is not available for the linearized NS equations. In this case, the linear operator \(\mathcal {L}\) can be found through a Fréchet derivative of the nonlinear operator \(\mathcal {N}\) through

$$\begin{aligned} \mathcal {L}I_i=\frac{\mathcal {N}(\textbf{q}_b+\epsilon I_i)-\mathcal {N}(\textbf{q}_b-\epsilon I_i)}{2\epsilon }, \end{aligned}$$
(32)

where \(\epsilon \ll 1\) [70,71,72,73] and \(I_i\) the i-th column vector of the identity matrix. This formulation is based on the second-order finite difference, but any order can be used.

2.4.1 Remarks on computational setup

A comment should be made on the boundary conditions, which are problem-dependent. Nonetheless, it is essential to consider that for most cases, perturbations \(q'\) are expected to vanish in the far field, making the use of Dirichlet boundary conditions an appropriate option. Dirichlet boundary conditions are also used on the body walls, while a Neumann boundary condition should be used at the outflow. These boundary conditions are generally embedded as part of the linear operator (discretization scheme). For external flows, the use of sponge zones at the exterior (e.g., inlet, outlet and far-field boundaries) of the computational domain is also a valuable option to avoid possible numerical problems given by the transpose (adjoint) operator. We note that the treatment of boundary conditions for incompressible external flows can be challenging compared to those of compressible flows. This is due to the mass conservation acting as a constraint to the overall system. Such an issue may not appear for settings such as internal flows.

Another matter to consider is the spatial grid to perform the resolvent analysis. The computational grid and domain size used for the resolvent analysis do not necessarily need to match that of those used to determine the base flow. For base flows determined from direct numerical simulations or large eddy simulations, the grid resolutions should be very fine where small-scale flow structures appear. If the resolvent analysis is used to extract only the dominant modes, their structures generally are larger than the small turbulent eddies, which allows us to use a grid coarser than the one used for obtaining the base flow.

For external flows, the domain size for resolvent analysis can be much smaller in size as long as the primary forcing and response modes fit well within the smaller domain. It should be noted that the forcing modes tend to emerge upstream of the response modes, which can require grid refinement to be performed in the upstream region (similar to adjoint simulations). Computational savings can be attained through grid coarsening and the usage of smaller domains for resolvent analysis. However, such computational grid/domain setups should be carefully chosen and verified to ensure that the discretizations do not influence the final outcome. Further discussion on these matters can be found in Sect. 4.1.

Fig. 5
figure 5

a Stencil of the second-order finite volume formulation. Blank cells in the stencil are 0-valued cells. b three-dimensional and c two-dimensional stencils with representation of reduced cost and matrix compression

If the computation of the linear operator \(\mathcal {L}\) is expensive, parallelization can be used to accelerate the calculation. A useful parallelization when explicitly computing the linear operator matrix can be achieved by considering that each evaluation (\(\texttt {Linear\_NS\_RHS}(I_i)\) in Sect. 2.4) is independent from the others. Moreover, in case of a structured mesh, another way for decreasing the computational cost takes into account the structural orthogonality of the linear operator matrix. This orthogonality corresponds to columns of the linear operator matrix that do not have a nonzero in a common row [74, 75], which depends on the chosen numerical scheme. By identifying the structurally orthogonal columns of the linear operator, concurrent evaluations such as \(\mathtt{Linear\_NS\_RHS} (I_i+I_j+I_k)\) in Fig. 4 can be assessed. This means simultaneously perturbing cells that are sufficiently distant from each other to avoid mutual influence. The nonzero elements in each column of the linear operator matrix depend on the stencil of the operator (Fig. 5a), which is the ensemble of cells that are affected by a variation in the central cell, shown in red. The red cell represents the perturbation of the mth variable in the lth cell, correspondent to the ith column of the identity matrix, \(I_i\), where \(i=l+(m-1)N_{\text {cell}}\). By determining the stencil from the numerical scheme (Fig. 5b), we are able to identify cells that do not affect each other when perturbed (yellow and gray cells do not intersect) as depicted in Fig. 5c, where the evaluation of \(\mathtt{Linear\_NS\_RHS}(I_i+I_j+I_k)\) is illustrated.

2.5 Extensions of resolvent analysis

Over the past few years, there have been a number of extensions made to the resolvent analysis. Here, we present notable extensions that can be useful in focusing the analysis on certain flow physics and addressing some challenges associated with the basic resolvent analysis formulation.

2.5.1 Spatially windowed resolvent analysis

In some cases, we are interested in understanding the input–output relationship over a specific region of the flow. This can be achieved by introducing spatial windows to the resolvent analysis formulation [31, 33, 37]. Here, we incorporate a spatial window B to the forcing input \({\textbf{f}}'\) and an examination window C to the flow response \({\textbf{q}}'\) to yield an output \({\textbf{y}}\). The resulting set of equations become

$$\begin{aligned} \begin{aligned} \frac{d \textbf{q}'}{d t}&=\mathcal {L}\textbf{q}' + B\textbf{f}',\\ \textbf{y}&= C\textbf{q}', \end{aligned} \end{aligned}$$
(33)

where matrices B and C are diagonal matrices whose entries are 1 if the cell resides in the window and 0 otherwise. Note that system 33 reduces to Eq. 5 if \(B=C=I\) which means the whole spatial domain is the area of interest for both the forcing and response. In general, matrices B and C need not be diagonal or square. Smaller size input or output vectors can be considered, in which case matrices B and C would be rectangular. System 33 is the so-called linear state-space representation in dynamical systems theory, which can serve as the basis to invite the use of extensive theories and algorithms from the field of controls and dynamical systems [76,77,78].

Following the same procedure in Sect. 2.1, we can derive the transfer function between the force input \(\hat{\textbf{f}}\) and output \(\hat{\textbf{y}}\) at frequency \(\omega \) as

$$\begin{aligned} \mathcal {H}_{\omega }=C[-i\omega I-\mathcal {L}]^{-1}B, \end{aligned}$$
(34)

which, using the compressible NS equations in conservative form, takes the following form:

$$\begin{aligned} \mathcal {H}_{p,\omega }=F_ECG[-i\omega I-\mathcal {L}]^{-1}G^{-1}BF_E^{-1}, \end{aligned}$$
(35)

by taking into account the energy norm and the transformation from the conservative to primitive variables.

The windowed resolvent analysis enables not only the examination of flow physics in certain regions but also those that may be buried under the dominant flow dynamics. Kojima et al. [37] considered the use of windowing to examine the possible emergence of buffet for transonic airfoil flows in low-Reynolds number flight conditions. Although the examination of the entire flow field will reveal the wake unsteadiness to be dominant, windowing the analysis to the region around the normal shock over the wing uncovers the input–output dynamics for buffeting.

Spatial windowing is a valuable tool for exploring the input–output relationships between particular spatial regions of interest. As an example, windowing has been used to study the aeroacoustics of high-speed isothermal turbulent jets [33]. In this analysis, windowing was applied through matrix B to confine the inputs to a region near the jet nozzle, while the matrix C was applied to the farfield to restrict the output to the isentropic region where acoustic waves propagate. This analysis unveiled the source mechanisms that contribute to jet noise generation. When employing spatially windowed resolvent analysis, the linear operator usually covers a larger domain, but the analysis focuses on a smaller area.

Another use of windowed resolvent analysis is the componentwise resolvent analysis [25, 49], which examines the maximization of the energy through specific variables of the forcing and response modes. For example, one can study the maximization of energy contribution given either the cross-stream or streamwise velocity component. In this case, matrices B and C would be matrices whose diagonal entries are 1 for the components of the state vector that we aim to maximize the energy with, while entries are 0 for the other variables.

2.5.2 Temporally windowed (discounted) resolvent analysis

The original resolvent analysis reveals the input–output relationship that is meaningful only if the system itself is stable. If the system of interest is unstable, the state eventually diverges, even without the action of the forcing function. The system response to the forcing input can become buried under the exponentially growing instability. Although such a situation may discourage the use of resolvent analysis, it can still provide great insights into the system dynamics with only a simple extension.

To address the case for which we have an unstable system, consider filtering the forcing and response modes by \(h = \exp (-\gamma t)\), where \(\gamma > 0\). If the parameter \(\gamma \) is chosen such that \(\gamma > \max \text {Real}[\lambda (\mathcal {L})]\), the largest real component of the eigenvalues of \(\mathcal {L}\), the filtered response,

$$\begin{aligned} \check{\textbf{q}} \equiv h \hat{\textbf{q}} = \exp (-\gamma t) \hat{\textbf{q}}, \end{aligned}$$
(36)

remains bounded over time. The parameter \(\gamma \) is referred to as the (temporal) discounting parameter [27] and it enables us to examine the system dynamics on a finite time scale shorter than that associated with the dominant instability. The filter function h acts here as a temporal window.

This discounting procedure modifies the input–output relationship in Eq. 10 to become

$$\begin{aligned} \check{\textbf{q}}(\textbf{x}) =\mathbf {\mathcal {H}}_{\omega ,\gamma } \check{\textbf{f}}, \end{aligned}$$
(37)

where

$$\begin{aligned} \mathbf {\mathcal {H}}_{\omega ,\gamma } \equiv [(-i\omega + \gamma ) I -\mathcal {L}]^{-1} \end{aligned}$$
(38)

is the discounted resolvent operator. Given this discounted resolvent formulation, the decomposition of \(\textbf{q}'\) and \(\textbf{f}'\) is not performed by using the Fourier transform (suitable for asymptotic input–output analysis). What we have now is the Laplace transform that relates the discounted modes in the frequency domain to the temporal domain [25, 27].

Using the Laplace representation we have

$$\begin{aligned} \begin{aligned} \textbf{q}'(\textbf{x,t})=\frac{1}{2i\pi }\int ^{\gamma +i\infty }_{\gamma -i\infty }\hat{\textbf{q}}_s(\textbf{x})e^{st}ds \end{aligned} \end{aligned}$$
(39)

instead of Eq. 8, where \(\gamma \) is greater than the real parts of all the possible singularities of \(\hat{\textbf{q}}_s=\mathcal {H}_s\hat{\textbf{f}_s}\), where

$$\begin{aligned} \mathcal {H}_s=[s I-\mathcal {L}]^{-1}. \end{aligned}$$
(40)

Therefore, the singularities of the system coincide with the poles of the transfer function, which are the eigenvalues of the linear operator. The integration along a line above the singularities (orange line in Fig. 6a) ensures convergence of the integral over a semi-indefinite time domain, \(t\in [0,\infty )\). With a change of variable \(s^*=s-\gamma \), we recover the Fourier transform

$$\begin{aligned} \begin{aligned} \textbf{q}(\textbf{x,t})=e^{\gamma t}\frac{1}{2i\pi }\int ^{i\infty }_{-i\infty }\hat{\textbf{q}}_{s^*}(\textbf{x})e^{s^*t}ds^*, \end{aligned} \end{aligned}$$
(41)

where

$$\begin{aligned} \hat{\textbf{q}}_{s^*}=\mathcal {H}_{s^*}\hat{\textbf{f}}_{s^*} \quad \text {and} \quad \mathcal {H}_{s^*}=[(s^*+\gamma ) I-\mathcal {L}]^{-1}. \end{aligned}$$
(42)

Essentially, discounting acts as a shift in the complex plane, so that the discounted transfer function \(\mathcal {H}_{s^*}\) has now only stable poles and corresponds to the system in Fig. 6b Increasing the value of time-window constant, \(\gamma \), translates to a shorter time scale over which the input–output dynamics is examined. The shorter time window for the perturbation to grow in amplitude will result in lower resolvent gain. For external flows dominated by advective physics, the increase in \(\gamma \) can also result in forcing and response modes of shorter streamwise extent. These effects of the time window are demonstrated in Fig. 7 [43]. We observe that increasing \(\gamma \) results in a decrease in gain because the physical time-window for perturbation growth has been reduced, as shown in Fig. 7a. Moreover, the gain varies more smoothly over the frequency range since the integration path is farther away from the poles and thus less locally affected by the single frequencies. Additionally, as the time window shortens, the modal structures, having less time to develop, concentrate closer to the body where the base flow gradients are large, as shown in Fig. 7b.

Fig. 6
figure 6

Effect of discounting for a \(\mathcal {H}_{s}\) and b \(\mathcal {H}_{s^*}\). The discounted resolvent analysis for unstable \(\mathcal {L}\) can be related to the shift of the vertical integral path in the inverse Laplace transform. Crosses represent poles, i.e. the eigenvalue of the linear operator, the dashed orange line represents the integration path while the dashed green line is the closing integration path forming the Bromwich contour

Fig. 7
figure 7

Temporal-windowed resolvent analysis of a separated flow over an airfoil with different choices of \(\gamma \). a Gain distribution over frequency in St; the leading resolvent b response and c forcing modes at \(St = 0.833\). The streamwise extent of the modal structures shortens with increasing \(\gamma \)

In the above discounted resolvent analysis, we observed that temporal windowing through an exponential function led to the replacement of the Fourier transform with the Laplace transform to define the forcing and response modes. This can be further generalized to accommodate other types of temporal windowing. In recent studies [79,80,81], a wavelet transform was used to temporally window the input–output relationship. This analysis has enabled the use of resolvent analysis to be performed not only on time-invariant base flows but also to time-varying base flows.

2.5.3 Sparse resolvent analysis

The forcing modes uncovered from the aforementioned resolvent analysis possess spatially global flow structures. This means that the forcing modes exhibit spatial oscillations over some regions of the flow. When the resolvent analysis is used in the hope of guiding flow control efforts, identifying the most appropriate location for an actuator can be difficult. This is because the standard resolvent analysis is formulated on the use of an \(L_2\) norm (see Eqs. 11 and 27) which determines a spatially global distribution of the modes.

This issue can be addressed by revisiting the use of the \(L_2\) norm and instead utilizing a sparsity-promoting norm, such as the \(L_1\) norm, in the resolvent analysis framework (see Fig. 8a for the general concept). The \(L_1\) norm-based formulation can be used to spatially sparsify the forcing modes. By doing so, the forcing modes can reveal the exact position where a spatially sparse forcing input can provide the largest amplification in the response mode [82]. Practically speaking, such forcing location amounts to a single point in space. However, it should be noted that a sparse response mode should not be sought. It would not be physically appropriate to constrain the response mode to be sparse in space.

Fig. 8
figure 8

a Representations of the \(L_2\) and \(L_1\)-norm based optimizations, where the intersection points represent the solutions. A sparse solution is obtained by the \(L_1\)-based approach for this two-dimensional example. b Sparsification of the forcing mode for an example of flow over an airfoil [82]. Notice the global forcing mode (left) collapsing to a single spatial point for sparse resolvent analysis (right)

To implement the sparse resolvent analysis, we can reformulate the optimization problem of Eq. 11 with an alternate setup that seeks to maximize the gain for the \(L_1\) norm. The solution to this sparse resolvent problem would not involve an SVD but can be found with a Riemannian optimization technique. One caveat to this optimization solver is the need to regularize the \(L_1\) norm in the vicinity of the optimal solution to smooth out its gradient, which can be achieved by using a Huber norm [82].

It is interesting that the use of \(L_1\) norm not only finds the spatially sparse forcing mode but also uncovers the sparsity in the state variables. For example, if there are five variables in the state variables as in the case of compressible flow, sparse resolvent analysis can identify which variable out of the state variables is important for forcing. This is also an important piece of insight in active flow control because it will advise on how the forcing input should be introduced for optimal effects - e.g., either a momentum-based or thermal-based control input.

The use of the \(L_1\) norm by itself does not guarantee that the forcing mode will find a spatial point in space that is physically possible. For instance, the forcing mode from the sparsity-promoting resolvent analysis may suggest actuation to be introduced in the middle of the flow. In the work of Skene et al. [82], they performed sparse resolvent analysis for flow over a NACA0012 airfoil, as shown in Fig. 8b. Their analysis pinpointed the actuation location and revealed the best combination of forcing variables (momentum injection). They also revealed the optimal forcing direction for such a forcing input. Furthermore, they were able to find the optimal forcing point on the airfoil surface by restricting the forcing mode to reside only on the surface (see windowed resolvent analysis).

2.5.4 Frequency cross-talks

In this paper, we limit our discussion to the resolvent analysis that focuses on the input–output dynamics only at a single frequency. This could restrain the applicability of resolvent analysis for some turbulent flows, where the nonlinear interactions across multiple frequencies can lead to significantly different perturbation growth from that predicted by single-frequency resolvent analyses [18]. Motivated by these issues, recent efforts have enabled resolvent analysis to account for the interactions across multiple spatial and temporal frequencies at a linear limit by considering base flows with spatial [83] and temporal periodicity [84]. A weakly nonlinear [85] and fully nonlinear [86] resolvent formulations have also been introduced to analyze higher-order perturbation dynamics in the frequency domain.

2.6 Parametric sensitivity of the resolvent gain

Performing resolvent analysis for a sweep of parameters can be somewhat computationally taxing. In this case, identifying the sensitivity (gradients) of the resolvent gain can complement the analysis and enable spline interpolation to provide an accurate mapping of the gain distribution over the parameter space. A sensitivity-based technique [35, 87] can be used to approximate variations in the gain \(\sigma \) with respect to changes in any parameter. This approach can significantly reduce the number of singular value decompositions to be performed, because a gradient-informed interpolation can be used.

This formulation was originally derived for direct and adjoint global stability modes. Because the resolvent forcing modes are similar in spirit to adjoint modes, such as response modes resembling characteristics of the direct global stability modes, this approach can be extended to compute gradients within the resolvent analysis framework. For resolvent analysis, the solutions of both the direct and adjoint problem are computed, with the latter being strictly related to the sensitivity/gradient of the system to variations over the parameters. For this reason, the inner product of the response and forcing modes that are appropriately weighted (energy norm) gives us the gradient/sensitivity with respect to the different parameters.

The resolvent gain is affected by subtle changes in the temporal frequency, the wavelength, and the base flow characteristics. Specifically, for the gradients of \(\sigma _j\) with respect to frequency and wavelength, the parametric sensitivities can be identified through the forcing and response mode characteristics.

The parametric sensitivity formulation of the jth singular value is provided with the following approximation [87]

$$\begin{aligned} \delta \sigma _j \approx \text {Real}\left\{ \hat{\textbf{q}}_j^*\delta \mathcal {H} \hat{\textbf{f}}_j\right\} , \end{aligned}$$
(43)

which can also be expressed in terms of the change in the inverse of the resolvent operator \(\delta \mathcal {H}^{-1}=\delta [-i\omega I-\mathcal {L}]\) rather than \(\delta \mathcal {H}\) such that

$$\begin{aligned} -\frac{\delta \sigma _j}{\sigma _j^2} \approx \text {Real}\left\{ \hat{\textbf{f}}_j^*\delta [ -i\omega I-\mathcal {L}] \hat{\textbf{q}}_j\right\} . \end{aligned}$$
(44)

From this expression, we find that the gradient of \(\sigma \) with respect to a parameter \(\alpha \) is given by

$$\begin{aligned} \frac{1}{\sigma _j^2}\frac{\partial \sigma _j}{\partial \alpha } \approx \text {Real}\left\{ \left<\hat{\textbf{f}}_j,\frac{\partial (i\omega I+\mathcal {L})}{\partial \alpha }\hat{\textbf{q}}_j\right>_E\right\} . \end{aligned}$$
(45)

The above equation now allows us to find the gradient of the resolvent gain with respect to parameters in the resolvent operator.

For the gradient with respect to the forcing frequency \(\omega \), the above gradient expression simply becomes

$$\begin{aligned} \frac{1}{\sigma _j^2} \frac{\partial \sigma _j}{\partial \omega } \approx -\text {Imag}\left\{ \left\langle \hat{\textbf{f}}_j, \hat{\textbf{q}}_j \right\rangle _E\right\} , \end{aligned}$$
(46)

while the real part would correspond to the gradients with respect to the discount parameter \(\gamma \)

$$\begin{aligned} \frac{1}{\sigma _j^2} \frac{\partial \sigma _j}{\partial \gamma } \approx \text {Real}\left\{ \left\langle \hat{\textbf{f}}_j, \hat{\textbf{q}}_j \right\rangle _E\right\} . \end{aligned}$$
(47)

For other parameters, the parametric sensitivity reduces to

$$\begin{aligned} \frac{1}{\sigma _j^2}\frac{\partial \sigma _j}{\partial \alpha } \approx \text {Real}\left\{ \left<\hat{\textbf{f}}_j, \frac{\partial \mathcal {L}}{\partial \alpha }\hat{\textbf{q}}_j\right>_E\right\} , \end{aligned}$$
(48)

because \(\omega \) is independent of other parameters. For example, parametric sensitivity can also be determined for wavenumbers in periodic directions of the problem. For a biglobal setup (see Appendix A), the parametric sensitivity with respect to the wavenumber \(\beta \) in the periodic direction becomes

$$\begin{aligned} \frac{1}{\sigma _j^2}\frac{\partial \sigma _j}{\partial \beta } \approx \text {Real}\left\{ \left<\hat{\textbf{f}}_j, (i\mathcal {L}_1+2\beta \mathcal {L}_2)\hat{\textbf{q}}_j\right>_E\right\} . \end{aligned}$$
(49)

Using the gradients, even with a coarse discretization of the parameter space, it is possible to map out the gains distribution. The gradients can be used in a cubic spline to interpolate the gain distribution between computed gain values. This can reduce computing time by avoiding a large number of SVDs, which would have been required if a finely discretized parametric space were to be adopted.

3 Computational approaches

For a large resolvent operator \(\mathcal {H}\), performing the singular value decomposition is numerically taxing. This calls for efficient numerical algorithms to compute the leading resolvent modes in an accurate manner. In this section, we discuss some approaches that can be taken to find the resolvent modes and gain for large-scale problems.

First, let us discuss some mathematical characteristics of the resolvent formalism. Given the singular value decomposition introduced in Eq. 12, the following algebraic relations holds:

$$\begin{aligned} \mathcal {H}_\omega \mathcal {H}_\omega ^* = Q_\omega \Sigma \Sigma ^* Q_\omega ^* \quad \text {and} \quad \mathcal {H}_\omega ^*\mathcal {H}_\omega = F_\omega \Sigma ^*\Sigma F_\omega ^*. \end{aligned}$$
(50)

Noticing that \(\Sigma \Sigma ^*\) and \(\Sigma ^* \Sigma \) are diagonal matrices with the square of singular values as their entries, we notice that these two equations correspond to eigenvalue decompositions of \(\mathcal {H}_\omega \mathcal {H}_\omega ^*\) and \(\mathcal {H}_\omega ^* \mathcal {H}_\omega \). This tells us that the jth columns of \(Q_\omega \) and \(F_\omega \) are the jth eigenvectors of \(\mathcal {H}_\omega \mathcal {H}_\omega ^*\) and \(\mathcal {H}_\omega ^*\mathcal {H}_\omega \), respectively, with eigenvalues \(\sigma _j^2\). Based on these observations, we will consider below some numerical algorithms to determine the resolvent triplets \((\hat{\textbf{q}}_j,\sigma _j,\hat{\textbf{f}}_j)\) that are founded on both eigenvalue and singular value decomposition properties.

Here, we present some techniques including Krylov projection [88, 89] and the randomized numerical linear algebra [90, 91] to efficiently compute the resolvent modes. These methods aim to identify the singular triplets with the highest singular values through the definition of a low-order subspace that holds the important action of the matrix. This process is performed by a series of matrix–vector multiplications. However, as the resolvent operator is defined within an inverse operation, these processes translate to solving linear systems, which is the most demanding process of resolvent analysis computation. For this reason, we also discuss the iterative time-stepper approach that has shown how to reduce the computational cost associated with solving such linear systems [89, 92,93,94]. To aid with the implementation, we offer pseudocodes for key algorithms presented below. These pseudocodes can be found in Appendix B.

3.1 Krylov projection

Fig. 9
figure 9

Overview of the Krylov projection based resolvent analysis

A common approach to determine the resolvent triplet is to solve the eigenvalue problem (Eq. 50 with respect to \(\mathcal {H}_\omega \mathcal {H}_\omega ^*\) or \(\mathcal {H}_\omega ^*\mathcal {H}_\omega \)) [62, 88, 95, 96]. In this approach, the eigenvalues of a large-scale sparse matrix A are approximated using Krylov projections by considering the problem in the Krylov subspace. We define the m-dimensional Krylov subspace of a matrix \(A \in \mathbb {C}^{N \times N}\) as \(K_m=\text {span}\{A^0\textbf{x},A^1\textbf{x},A^2\textbf{x}, \dots ,A^{m-1}\textbf{x}\}\), where \(\textbf{x}\) is generally a random initial vector. The subspace converges toward the eigenvector associated with the eigenvalue with largest modulus and holds information on the leading eigenvalue and the corresponding eigenvector (i.e., eigenpair). Considering \(V_m\in \mathbb {C}^{N \times m}\) an orthogonal basis of \(K_m\), a low-order approximation of A is formulated as

$$\begin{aligned} AV_m\approx V_m \tilde{A}, \end{aligned}$$
(51)

where \(\tilde{A}\) is an upper Hessenberg matrix whose eigenpairs approximate those of A [62, 89, 96]. Both the orthogonal basis \(V_m\) and the projection matrix \(\tilde{A}\) are computed through a Gram-Schmidt procedure, described in algorithm 1.

For resolvent analysis, the eigendecomposition of \(A=\mathcal {H}_\omega ^*\mathcal {H}_\omega \) is performed to obtain the singular triplet. Recall that resolvent operator \(\mathcal {H}_\omega =[-i\omega I-\mathcal {L}]^{-1}\) is defined with an inverse and is not generally available. As mentioned previously, explicitly determining the inverse matrix is computationally impractical and inaccurate. Therefore, we instead consider numerically solving the linear matrix equation

$$\begin{aligned}{}[-i\omega I-\mathcal {L}][-i\omega I-\mathcal {L}]^*\textbf{y} = [-i\omega I-\mathcal {L}][i\omega I-\mathcal {L}^*]\textbf{y} =\textbf{x} \end{aligned}$$
(52)

to determine \(A\textbf{x}=\textbf{y}\), which is needed for the generation of the Krylov subspace of a resolvent operator. This is listed as step (1) in Fig. 9 which shows the overall approach. With this approach, we retrieve the eigenpairs \((\sigma _j^2,\hat{\textbf{f}}_j)\) through steps (2) and (3) using the compact matrix \(\tilde{A}\) as expressed in Eq. 51 instead of having to deal with the full size A.

The left singular vector \(\hat{\textbf{q}}_j\) is instead computed considering the action of \(\mathcal {H}_\omega \) on \(\hat{\textbf{f}}_j\), \(\mathcal {H}_\omega \hat{\textbf{f}}_j=\sigma _j \hat{\textbf{q}}_j\), which is equivalent to solving the linear system

$$\begin{aligned}{}[-i\omega I-\mathcal {L}]\hat{\textbf{q}}_j=\frac{1}{\sigma _j} \hat{\textbf{f}}_j, \end{aligned}$$
(53)

which is listed as step (4) in Fig. 9. This procedure provides us with the complete triplet \((\hat{\textbf{q}}_j,\sigma _j,\hat{\textbf{f}}_j)\).

The cost of performing a Krylov projection method is \(O(N^2m)\) with m the dimension of the Krylov subspace, N the dimension of the matrix and \(m\ll N\). Also, the convergence of the modes is exponential with respect to the increase of the Krylov subspace dimension.

3.2 Randomized resolvent analysis

Fig. 10
figure 10

Overview of the randomized resolvent analysis

The randomized resolvent analysis is a method based on a low-order approximation of the resolvent operator achieved through a projection of the original operator into an appropriate subspace. First, let us consider a tall and skinny test matrix \(\Theta \in \mathbb {R}^{N \times m}\) that is randomly generated. The crux of this approach is that only a small number of test vectors \(m \ll N\) are needed in \(\Theta = [\varvec{\theta }_1, ~\varvec{\theta }_2, \dots , \varvec{\theta }_m]\), which can make the SVD calculation lower in cost. By passing this test matrix (or the collection of test vectors) through an operator \(A \in \mathbb {C}^{N \times N}\), we can retain the dominant action of A with

$$\begin{aligned} A \Theta = Y. \end{aligned}$$
(54)

The output \(Y \in \mathbb {C}^{N \times m}\) is referred to as the sketch of A. If we denote the ith column of the test matrix as \(\varvec{\theta }_i\), we observe that the sketch collects a sequence

$$\begin{aligned} \{A \varvec{\theta }_1, ~A \varvec{\theta }_2, ~ \dots , ~A \varvec{\theta }_{m}\}, \end{aligned}$$
(55)

which in a way resembles the Krylov sequence in the previous method.

If we consider \(A=\mathcal {H}_\omega \), the computation of Y corresponds to solving a linear system, which is step (1) in Fig. 10. The orthogonalization of this Y through a QR decomposition (step 2) creates a basis \(\mathcal {Q}\) to derive the low-rank approximation of \(\mathcal {H}_\omega \) as

$$\begin{aligned} A\approx \mathcal {Q}\mathcal {Q}^*A=\mathcal {Q} B, \end{aligned}$$
(56)

where \(B\in \mathbb {C}^{m\times N}\). Matrix \(B=\mathcal {Q}^*A\), equivalent to \(B^*=A^*\mathcal {Q}\), is again determined by solving a linear system (step 3). The process described until Step (3) is often named \(\mathcal {Q}B\) decomposition, because it identifies the sketch basis \(\mathcal {Q}\) and the low-order projection matrix B, in which the randomized SVD algorithms are founded. The algorithm to obtain the \(\mathcal {Q}B\) decomposition of the resolvent operator, considering \(A=[-i\omega I-\mathcal {L}]^{-1}\), is summarized in algorithm 3.

Note that energy norms are not considered in the pseudocodes presented herein. For cases where an energy norm is present, their influence is accounted for through matrix–vector multiplications performed before and after direct and adjoint linear systems are solved. After obtaining \(\mathcal {Q}\) and B, the traditional and computationally less expensive manner to obtain the response modes \(Q_\omega \) and the forcing modes \(F_\omega \) requires the single SVD of B and a matrix multiplication. Noteworthy here is that we obtain the complex-conjugate transpose of B, hence, \(B \in \mathbb {C}^{m \times N}\) is a skinny row-matrix, upon which an SVD can be performed quickly for \(m \ll N\). In this manner, through the SVD of the low-order projection matrix B, shown in step (4), we can express

$$\begin{aligned} A\approx \mathcal {Q}\tilde{Q}_\omega \Sigma F_\omega ^*. \end{aligned}$$
(57)

This approach follows the randomized SVD proposed in [90], in which the singular triplet is identified as (\(\mathcal {Q}Q_\omega \),\(\Sigma \),\(F_\omega \)) described in algorithm 4.

Taking advantage of the input–output characteristics of \(A=[-i\omega I-\mathcal {L}]^{-1}\), a modification of the original algorithm was proposed [91]. Indeed, after computing the right singular vectors \(\hat{\textbf{f}}_j\) in step (4), it is possible to perform a further action of matrix A and solving the linear system in order to compute \(\hat{\textbf{q}}_j\sigma _j\) from \(\hat{\textbf{f}}_j\), which corresponds to step (5) in Fig. 10.

$$\begin{aligned} A\hat{\textbf{f}}_j=\sigma _j \hat{\textbf{q}}_j. \end{aligned}$$
(58)

Knowing that \(\hat{\textbf{q}}_j\) is a unit norm vector, we can scale the above results to find

$$\begin{aligned} \hat{\textbf{q}}_j=\frac{A\hat{\textbf{f}}_j}{||A\hat{\textbf{f}}_j||},\;\;\;\;\; \sigma _j=||A\hat{\textbf{f}}_j||. \end{aligned}$$
(59)

This process has an added cost of solving an additional linear system, as summarized in algorithm 5. In spite of the added computational cost, this approach results in more accurate computation of response modes and gains. This additional cost can be minor when the LU factorization of A has been attained in the previous steps. For iterative solvers, using the sketch Y to initiate the solver is helpful to reduce computational time.

The aforementioned methods can improve the accuracy of resolvent gains and response modes, but have no effect on the forcing modes. In fact, for the previous approaches, the accuracy of forcing modes relies solely on the accurate computation of the low-order projection B and its SVD. To obtain further accurate forcing modes, [91] provided an optional step with an additional SVD to improve the accuracy of forcing modes, as shown in algorithm 6.

The cost of performing randomized resolvent analysis is \(O(N^2 k)\) with \(k \ll N\) being the desired number of singular values to compute. The convergence of the singular values with respect to an increasing number of the test vectors (k) is linear. Additionally, it is important to note that with the randomized method, each action on the test vectors can be computed independently, which can help decrease the computational cost of the operation.

3.3 Time-steppers for projection

The computational cost of handling large-sized operators in resolvent analysis can be considerably high, which has been one of the major challenges for applying resolvent analysis to high-Reynolds number turbulent flows. A large computational grid is necessary for such flows, making direct computation of resolvent modes challenging. The major bottleneck is associated with the time and memory requirements for the linear systems solvers as part of the singular value decomposition in resolvent analysis.

Fig. 11
figure 11

Direct-adjoint integration loop for the solution of the optimization problem

A näive approach is to use direct linear system solvers based on LU decomposition. This approach, however, can be computationally taxing as the resolvent operator size increases. There are strategies to avoid the solution of the linear systems in homogeneous flows [97]. Furthermore, iterative solvers and time-steppers have shown a potential to replace the direct solvers with a substantial reduction of memory requirements [92, 98, 99]. The computational time for convergence may be high using traditional methods, but novel approaches have shown how to reduce it by using streaming discrete Fourier transforms [93, 100].

Time-steppers may be developed in matrix-free forms that need no explicit representation of the operator \(\mathcal {L}\), considerably reducing the storage needed for high-dimensional linear systems. It is possible to approximate the effect of the resolvent operator by time integrating both the linearized and adjoint equations. Indeed, the step of solving the linear system, which is performed for each frequency \(\omega \) for computing the iterative action of \(\mathcal {H}_\omega ^* \mathcal {H}_\omega \) on a vector for the construction of the Krylov sequence or the sketch basis in the randomized resolvent algorithms, is replaced by iterative direct-adjoint temporal integrations [92, 93].

The direct and the corresponding adjoint equations read as follows

$$\begin{aligned} \frac{d\textbf{q}'}{dt} = \mathcal {L} \textbf{q}' + \textbf{f}' \quad \text {and} \quad -\frac{d\textbf{w}'}{dt} = \mathcal {L}^* \textbf{w}' + \textbf{q}'. \end{aligned}$$
(60)

This direct-adjoint action in frequency space translates to

$$\begin{aligned} \hat{\textbf{w}}=\mathcal {H}_\omega ^*\mathcal {H}_\omega \hat{\textbf{f}}. \end{aligned}$$
(61)

This means that the direct-adjoint integration, depicted in Fig. 11, serves as an approximation for the action of \(\mathcal {H}_\omega ^*\mathcal {H}_\omega \). This can be used for the construction of the Krylov sequence and also for the direct and adjoint linear systems solvers for the randomized algorithm.

For example, the optimal modes at the forcing frequency can be retrieved by starting the integration loop with a harmonic real-valued or complex-valued forcing, and using the power iteration method (\(\lim _{m\rightarrow \infty }K_m\)) [92, 101]. Then, [93] proposed two variations of this method for computing \(\hat{\textbf{w}}\) in Eq. 61: the transient-response method (TRM), and the steady state response solution (SSRM). TRM computes the solutions of the integration loop providing a compact forcing on time. Therefore, TMR computes the transitional input–output response, while the SSRM computes the steady asymptotic input–output response of the continuously forced system. Moreover, with these two approaches they also proposed to use the full response and forcing variables for computing the input–output response at each frequency simultaneously. Recently, [102] proposed another method, called the RSVD-\(\Delta t\), which couples the randomized resolvent analysis and the steady state response approach [93], showing reduced computational cost and memory consumption which allows to perform resolvent analysis of three-dimensional flows in a very efficient way.

Indeed, with the temporal integration loop, we obtain

$$\begin{aligned} \textbf{w}^\prime (\textbf{x},t)=\int _{-\infty } ^{\infty }\hat{\textbf{w}}(\textbf{x})e^{-i\omega t}d\omega . \end{aligned}$$
(62)

Therefore, the Krylov and sketch sequences can be composed for each \(\omega \) from the Fourier transforms of the signal \(\textbf{w}^\prime (\textbf{x},t)\) allowing for the evaluation of the input–output response with respect to \(\omega \).

The time-stepping method can be employed in both matrix-forming and matrix-free fashions and can make use of either the Krylov projection or the randomized resolvent analysis. The time-stepping approach eliminates the need to solve linear systems for the construction of the projection subspaces and for retrieving the response modes at the final step, indicated by the yellow boxes Figs. 9 and 10. These linear systems are otherwise solved using LU decomposition, which incurs a computational cost of \(O(N^3)\). Furthermore, in case the adjoint equations are also available, the time-stepping method can be executed in a matrix-free manner. This not only avoids the computational expense of LU decomposition but also significantly reduces memory requirements by eliminating the need to explicitly store the matrix. This dual advantage can make the time-stepping matrix-free approach more efficient and scalable, particularly for large-scale problems.

For these methods presented, the choice of the initial vector for the Krylov projection methods, or the test vectors for the randomized resolvent plays a very important role. Indeed, initial vectors that are closer to the relevant subspace yield a considerable reduction in the demanded size of the low-order subspace for accurate computation of resolvent modes. Realizing that the response and forcing modes mainly appear in regions of high gradients (shear) in the base flow, weighting the initial random vector (for the Krylov projection methods) and the test vectors (for the randomized resolvent) with the base flow gradients achieves faster convergence [91].

3.4 Data-driven methods

For linearly stable flows, resolvent modes may be derived from data without access to the adjoint simulations [103]. Through this data-driven resolvent analysis, forcing and response modes can be found in an equation-free manner, without the need for adjoint simulations. The foundation of this method is the dynamic mode decomposition [7, 8, 104], which identifies the linearized flow dynamics based on snapshots obtained from a collection of transient trajectories of the flow.

First, consider a set of m snapshots for p distinct flow trajectories stored within the data matrices X and Y as

$$\begin{aligned} X= & {} [\textbf{x}_1^{(1)} ~\dots ~ \textbf{x}_{m-1}^{(1)} ~\dots ~ \textbf{x}_1^{(p)} ~\dots ~ \textbf{x}_{m-1}^{(p)}],\end{aligned}$$
(63)
$$\begin{aligned} Y= & {} [\textbf{x}_2^{(1)} ~\dots ~ \textbf{x}_m^{(1)} ~\dots ~ \textbf{x}_2^{(p)} ~\dots ~ \textbf{x}_m^{(p)}]. \end{aligned}$$
(64)

Here, the snapshots in X and Y are shifted by a time index, which amounts to a time step of \(\Delta t\). Given these data matrices, the time step, and the desired number of terms r, the dynamic mode decomposition is performed to obtain

$$\begin{aligned} \text {DMD}(X,Y,\Delta t, r) \rightarrow \Lambda _r, V_r, U_r, \end{aligned}$$
(65)

where the reduced-order dynamics of the flow system is identified through the eigenvalues presented in the diagonal of \(\Lambda _r\), along with the direct and adjoint eigenvectors, \(V_r\) and \(U_r\), respectively.

The r eigendecomposition triplets are then used to build the resolvent operator

$$\begin{aligned} \tilde{\mathcal {H}}_\omega = (-i\omega I- \Lambda _r)^{-1}. \end{aligned}$$
(66)

Here, \(\tilde{\mathcal {H}}_\omega \) holds the linear dynamics through the eigenvalues of the dynamic mode decomposition. The projected resolvent modes are then identified through SVD as

$$\begin{aligned} \tilde{\mathcal {H}}_\omega = \tilde{\Psi }_\omega \tilde{\Sigma }_\omega \tilde{\Phi }_\omega , \end{aligned}$$
(67)

in which \(\tilde{\Sigma }_\omega \) is the data-driven resolvent gain, while \(\tilde{\Psi }_\omega \) and \(\tilde{\Phi }_\omega \) are the projected forcing and response modes. The final step needed for data-driven resolvent modes is to synthesize them in physical coordinates with

$$\begin{aligned} \Phi = V_r \tilde{\Phi } \quad \text {and} \quad \Psi = V_r \tilde{\Psi }. \end{aligned}$$
(68)

A weighting norm can be used in the data-driven resolvent analysis to account for appropriate scaling [105]. In such case, a positive definite weighting matrix F must be defined through the Cholesky decomposition of a physically meaningful positive definite \(W = F^* F\) analogous to those described in Sect. 2.2.

The data-driven resolvent analysis has been shown to find resolvent modes for low Reynolds number flows, where linear mechanisms are predominant [103]. However, in highly turbulent flows with significant nonlinearities, this method has difficulty differentiating between linear and nonlinear mechanisms. To enable data-driven resolvent analysis for high Reynolds number turbulent flows, further advancements are necessary to distinguish between linear and nonlinear dynamics in spatio-temporal measurements. For a detailed description of the data-driven resolvent analysis, we point to reference [103].

4 Case studies

In this section, we outline the step-by-step procedure for conducting resolvent analysis and provide two external flow examples. First, we discuss the preparations to perform resolvent analysis, commenting on the computational domain size and providing insights into strategies for achieving a reduction in computational cost and memory usage. Second, we present examples of both biglobal and triglobal resolvent analysis. The first case study is a biglobal resolvent analysis of a separated flow around a NACA0012 airfoil. Following this, we discuss a triglobal resolvent analysis applied to the flow around a finite wing. Finally, we explore the use of resolvent analysis in flow control applications.

Although the case studies here focus on 2D and 3D baseflows, we also refer the readers who are interested in 1D examples to [106], in which useful information and codes are provided. These codes examine the 1D pipe flow discussed in [26] and provide the linear operator, apply the boundary conditions, and compute the resolvent modes and gains. Moreover, this 1D test case can be run with modest computational resources.

Fig. 12
figure 12

Steps for performing the resolvent analysis using a base flow from CFD

4.1 Preparation

As we prepare to perform resolvent analysis, let us go over the necessary steps, as shown in Fig. 12. While we try to keep the discussions as general as possible, some of them may be specific to external flow problems. The first step of performing the stability analysis and resolvent analysis concerns the choice of the base flow. We need to consider whether an equilibrium state can be found or if the time-averaged base flow is to be used. In these cases, it is important that the stability of the base flow is analyzed to see if we need to use discounting or an eddy-viscosity model to provide a valid perspective. We emphasize that the base flow should be accurate and reliable as the rest of the resolvent analysis depends on the fidelity of its discretizations. The computational domain needed for the base flow calculation should follow the classical guidelines of LES/DNS [107] using spatial and temporal discretization schemes with far-field boundary conditions placed sufficiently away from the body to obtain an accurate base flow. This base flow should of course be verified and validated carefully.

The next step is to construct a linear operator \(\mathcal {L}\) about the chosen base flow. For many practical reasons, an optional step of interpolating the base flow onto a different mesh can be computationally beneficial, or even necessary, on which the linear operator is to be discretized.

The first and rather obvious reason for choosing a different mesh is to reduce the computational cost associated with the solution of the linear system (action of the matrix inverse) and the singular value decomposition. Since frequency is a parameter of choice in resolvent analysis, the associated length scale can usually be estimated in accordance with relevant advective (or diffusive) physics. The knowledge of such a length scale can be leveraged to prepare a resolvent mesh whose spatial resolution is carefully tailored according to predetermined length scales. This can lead to a significantly reduced grid size from that of the CFD mesh. While a large computational domain is required for CFD to allow for the free-stream condition to be fully recovered, a much smaller one may be used for resolvent analysis as the fluctuations decay to almost zero much closer to the body. This allows for a smaller computational domain to be used in resolvent analysis of external flows. Therefore, instead of using the original CFD mesh that resolves turbulent length scales as small as possible, a coarser mesh with a smaller domain extent can usually be adapted in the resolvent analysis to reduce the cost of involved numerical linear algebra. This is demonstrated in Fig. 13, where the CFD mesh used for the computation of base flow is highlighted in red, and the coarser resolvent mesh with a smaller domain is highlighted in yellow. We caution the readers that if a different mesh is to be chosen, the results from resolvent analysis should be checked for mesh independence, just as the base flow verification is performed.

Fig. 13
figure 13

Meshes for computing the base flow (red) and the resolvent analysis (yellow) are shown on the left. Zoom-in views are shown in the center and right around the airfoil for base flow and resolvent mode computations. The shown example is for flow around a NACA0012 airfoil at angle of attack \(\alpha =14^\circ \) and Reynolds number \(Re=10,\!000\) (colour figure online)

The second and important reason for using a resolvent-specific mesh concerns the forcing/adjoint mode, whose spatial support (where they appear in space) can be significantly different from that of the turbulent structures captured in direct CFD simulations. As shown in Fig. 13, the forcing mode for external flows emerges upstream of the airfoil. Therefore, the mesh necessitates sufficient spatial resolution in that region in order to resolve the forcing mode structure. The region upstream of a body does not usually have a very refined grid for direct CFD simulation and a relatively aggressive grid stretching may be applied. This is indeed the case for the example in Fig. 13, where CFD is performed on a C-grid where aggressive grid stretching in the upstream of the airfoil would result in inaccurate recovery of forcing mode and resolvent gain. In such case, interpolating the base flow onto a resolvent-specific mesh becomes necessary in order to obtain the forcing modes with sufficient spatial resolution. This is demonstrated in Fig. 13, where the base flow obtained from the C-grid is interpolated onto an H-grid that has the same levels of spatial resolution both upstream and downstream of the body.

Once the linear operator \(\mathcal {L}\) about the chosen base flow is prepared, we solve the eigenvalue problem, Eq. 19, to obtain the spectrum of \(\mathcal {L}\) near the stability margin. In this analysis, the main focus is not the linear stability of the flow. In fact, for base flows that do not represent an equilibrium point, linear stability results must be taken with care. Our goal is to identify the eigenvalues of \(\mathcal {L}\) with higher positive growth rate to set an appropriate discounting parameter for resolvent analysis (see Sect. 2.5.2).

Below, we introduce two specific examples of performing biglobal and triglobal resolvent analysis and giving insights on the interpretation of the results. In these examples, both the calculation of the base flow and resolvent analysis are performed with the compressible flow solver CharLES [108], coupled with the PETSc and SLEPc libraries [109, 110] for performing the singular value decomposition. We specifically use the Krylov-Schur projection method and the randomized resolvent for the singular value decomposition. An LU factorization of the linear operator, instead, is used for solving the linear system, needed for the construction of the Krylov subspace and the sketched matrix. Moreover, for the three-dimensional case, the MUMPS (multifrontal massively parallel sparse direct solver) package [111] is also used within PETSc, in order to parallelize the LU factorization and singular value decomposition. In the triglobal example, the codes used to compute the resolvent modes are part of the ‘linear analysis package’ made available by [112]. Towards the end of this section, we also briefly discuss how the insights from resolvent analysis can be used to guide flow control designs.

4.2 Biglobal analysis

Let us consider a separated turbulent flow around a two-dimensional airfoil at an angle of attack \(\alpha =14^\circ \) and chord based Reynolds number \(Re=10,\!000\). The instantaneous flow field is shown in Fig. 14a and the lift coefficient spectra reveals a characteristic von Karman shedding frequency at \(St_\alpha ={fc\sin {\alpha }}/{U_\infty }=0.163\), as reported in Fig.  14b. Here, c is the chord, f is the frequency and \(U_\infty \) is freestream velocity. At this Reynolds number, the flow is three-dimensional. To compute the base flow, LES is performed over a spanwise periodic domain whose spanwise extent captures the three-dimensional flow structures. A spanwise length of \(L_z=c\) has been chosen for this calculation. The base flow is obtained by averaging the flow over time and the spanwise direction. Therefore, the base flow is a two-dimensional base flow (homogeneous along the spanwise direction) and a biglobal formulation is used for constructing the linear operator \(\mathcal {L}=\mathcal {L}(\beta )\), which depends on the spanwise wavenumber \(\beta \). Details on the formulation can be found in Appendix A).

Fig. 14
figure 14

Spanwise periodic turbulent flow over a NACA0012 airfoil at \(\alpha =14^\circ \) and \(Re=10,\!000\). a Isocontour of Q-criterion of the instantaneous flow field colored by the streamwise velocity and b lift coefficient spectra (\(\hat{C}_L\)) over frequency (\(St_{\alpha }\))

In this example, the least stable eigenvalue has a positive growth rate \(\lambda _r=\text {Real}(\lambda )=0.096\), as shown in Fig.  15a. The system is thus unstable calling for a discount parameter \(\gamma >\lambda _r\) in the resolvent operator (see Sect. 2.5.2)

$$\begin{aligned} \mathcal {H}_\omega = [(-i\omega + \gamma )I -\mathcal {L}(\beta ) ]^{-1}. \end{aligned}$$
(69)

We perform singular value decomposition of \(\mathcal {H}_\omega \) over \(\omega \in [\omega _\text {init},\omega _\text {end}]\) with \(\Delta \omega =(\omega _\text {end}-\omega _\text {init})/N_{\omega }\). In this case, we used \(\Delta \omega =(6.2\times 2\pi )/50\) giving a frequency resolution of \(\Delta St_\alpha = \Delta \omega \sin {\alpha }/2\pi =1.5/50\). During the singular value decomposition, we also evaluate the gradients of the gain with respect to \(\omega \) to enable accurate interpolation, as discussed in Sect. 2.6. For the singular value decomposition, the Krylov-Schur projection method is used (Sect. 3.1) with a dimension of the Krylov subspace \(m=30\). In this examination, the first three singular triplets are sought.

Fig. 15
figure 15

Biglobal resolvent analysis of the NACA0012 airfoil wake. a The most unstable eigenvalue and the corresponding eigenvector visualized with isocontours of streamwise velocity. b The first three dominant gains (singular values \(\sigma _1\), \(\sigma _2\) and \(\sigma _3\)) over \(St_\alpha \) shown in red. Also presented is the influence of discount parameter \(\gamma \) on \(\sigma _1\) illustrated in grayscale. The red curves use the \(\gamma \) value from (a). c Response and forcing modes along with the resolvent wavemaker for \(\gamma =0.15\) at \(St_\alpha =0.188\) and 0.65. Visualization of isocontours of streamwise velocity components for \(\hat{f}_x\) and \(\hat{q}_x\) and isocontours of \(\hat{w}\) on top of the instantaneous flow field (Q-criterion)

Let us present the gains \(\sigma _i\) over \(St_\alpha \) in Fig. 15b for a spanwise wavenumber \(\beta =0\) (2D mode) for the varied discount parameter of \(0.1 \leqslant \gamma \leqslant 1.2\). The primary gain \(\sigma _1\) obtained with \(\gamma =0.15\) is shown in red as a reference and reported together with second and third gains, \(\sigma _2\) and \(\sigma _3\), respectively. The higher order gains are smaller than \(\sigma _1\) by two orders of magnitude, suggesting that the primary resolvent triplet can form an accurate approximation of the resolvent operator

$$\begin{aligned} \mathcal {H}_\omega \approx \hat{\textbf{q}}_1\sigma _1\hat{\textbf{f}}_1^*. \end{aligned}$$
(70)

This particular expression is referred to as the rank-1 approximation.

With this choice of discount parameter, we are effectively considering the input–output relation over a finite-time horizon of \(t_\gamma = 2\pi /0.15 = 41.9\). We can observe that varying the horizon time, the gain variation is monotonic and exhibits two different peaks. The peak at \(St_\alpha = 0.65\) is associated with the oscillations in the separated shear layer over the airfoil, as captured in the response modes in Fig. 15c. This higher frequency mode captures the dominant fast oscillation in the flow. While not shown in this paper, it is possible to visualize how \(\hat{\textbf{q}}\) and \(\hat{\textbf{f}}\) oscillate over time. Recalling Eq. 8, the oscillations of these modes can be expressed as \(\hat{\textbf{q}}e^{-i\omega t}\) and \(\hat{\textbf{f}}e^{-i\omega t}\) over the oscillation period \(T=2\pi /\omega \).

On the slower time scale, a distinct peak at \(St_\alpha = 0.188\) can be identified. This frequency content of the flow acts in contrast in the wake as highlighted by the response mode structure in Fig. 15c. This frequency agrees with the wake instability revealed by the stability analysis (eigenvalues with frequency at \(St_\alpha = 0.188\)). In fact, the relationship between \(\sigma _1\) and \(\lambda \) can be explained with pseudospectral theory [23, 113].

The shift of the response mode from the wake toward the shear-layer region is due to the fact that higher frequency corresponds to a smaller characteristic length in the flow, which is predominantly supported by the shear-layer instability [43]. The fact that the gain peak at short times is at \(St_\alpha = 0.65\) can be explained by the fact that shear regions are known to host nonmodal growths [49]. Therefore, over short time, we observe higher gain from these mechanisms. However, the real parts of the eigenvalues associated with the shear-layer modes are negative. In contrast, the real part of the eigenvalue for the wake-region mode is positive suggesting comparatively dominant behavior. In Fig. 15c we also report the resolvent wavemaker, defined as the Hadamard product of forcing and response modes, which highlights regions in the shear layer associated with self-sustained mechanisms, see [82, 114] for details.

4.3 Triglobal analysis

A triglobal resolvent analysis is conducted to examine flows over finite-span wings. The flow to be examined does not have any homogeneous directions, which necessitates a three-dimensional (triglobal) approach. The triglobal modes are characterized by three-dimensional global forcing and response modes [32, 38, 115]. In this example, we consider the flow over a tapered swept wing with semi-aspect ratio \(sAR = 2\), taper ratio 0.5, leading edge sweep angle \(\Lambda = 40^\circ \) at \(\alpha = 22^\circ \) and \(Re = 600\) [116]. The base flow is the time-averaged flow, obtained from DNS. This translating wing exhibits regions of steady and unsteady flows over the wingspan, as illustrated in Fig. 16b. Notably, the wing tip experiences significant flow unsteadiness and the formation of vortex shedding structures, while inboard flow remains primarily steady, characterized by a pair of large leading-edge vortices. The lift coefficient spectrum, shown in Fig. 16a, indicates the characteristic shedding frequency at \(St_{\alpha ,\Lambda } = {fc\sin {\alpha }}/{(U_\infty \cos {\Lambda })} \approx 0.16\). This Strouhal number takes the sweep angle into consideration.

Fig. 16
figure 16

Triglobal resolvent analysis of the flow over a tapered swept wing with semi aspect ratio \(sAR = 2\), taper ratio 0.5, leading edge sweep angle \(\Lambda = 40^\circ \) at \(Re=600\) and \(\alpha = 22^\circ \). a Lift coefficient (\(\hat{C}_L\)) spectra over frequency (\(St_{\alpha ,\Lambda }\)). b Isocontour of Q-criterion of the instantaneous flow field colored by streamwise velocity. c Resolvent gains (\(\sigma _j\)) over frequency (\(St_{\alpha ,\Lambda }\)). d The primary forcing (top half) and response (bottom half) modes are visualized with isosurfaces of cross-stream component at frequencies \(St_{\alpha ,\Lambda } = 0.16\) and 0.26

Here, the singular value decomposition is performed with the randomized resolvent analysis (Sect. 3.2) with \(m=10\) test vectors. For the resolvent analysis here, discounting is applied, whose effects share similarities with the aforementioned presentation for biglobal modes. In addition, similar to biglobal resolvent modes, triglobal modes are also non-uniform in space and exhibit larger amplitude over certain regions of the domain. These areas are characterized by a larger spatial support of forcing-response modes. In the streamwise x-direction, owing to the convective nature of the linear operator, forcing modes emerge upstream of the wing, while response modes are primarily exhibited downstream of the wing. As illustrated in Fig. 16d, the forcing modes at \(St_{\alpha ,\Lambda } = 0.16\) emerge over and upstream of the wing, while the response modes appear downstream. Note that this mode pair is at the characteristic shedding frequency \(St_{\alpha ,\Lambda } = 0.16\) of this wing. The response modal structures align with the wing tip, exhibiting a larger spatial support over the same region where shedding structures are observed in the numerical simulations.

For the triglobal analysis conducted over finite-span wings, the spatial support of forcing-response mode pairs is significantly influenced by the modal frequency. As illustrated in Fig. 16d, as the frequency increases from \(St_{\alpha ,\Lambda } = 0.16\) to 0.26, the larger spatial support transitions from the wing tip towards the wing root. Previous studies have observed a similar transition in triglobal analysis over untapered swept wings, where the modes transition from tip-based modes near the shedding frequency to root-based modes at higher frequencies. Conversely, for flows over untapered unswept wings, this trend is inverted. In such cases, forcing-response mode pairs transition from root-based to tip-based modes as the frequency increases [32]. Generally, the dominant forcing-response mode pair at the frequency near the vortex shedding exhibits larger spatial support over the regions where flow unsteadiness occurs. As the frequency varies, mode switching shows unsteadiness in other regions of the flow. These findings are particularly relevant for flow control applications. By virtue of the input–output characteristics of the resolvent modes, the optimal location to perturb the flow for wake modification can be identified.

The Triglobal resolvent analysis entails much higher computational costs compared to its biglobal counterpart. This is due to the generally larger size of the triglobal linear operator. However, even when considering a linear operator with a fixed size N, the triglobal one tends to be denser because of the larger stencils required to compute base flow derivatives in all spatial directions. When employing a direct linear system solver approach to compute the resolvent modes, special attention must be given to the LU factorization of the linear operator. Factorizing a triglobal resolvent operator results in higher fill-in ratios and increased memory requirements. Consequently, for triglobal resolvent analysis of high-Reynolds-number flows, numerical methods that address these cost-related matters are essential.

4.4 Resolvent-guided flow control

A natural usage of the insights from resolvent analysis is the design of active and passive flow control strategies. Resolvent analysis elucidates the characteristics of optimal forcing input that can be amplified in the flow field and describes how the flow responds to actuation input. The understanding of the input–output dynamics forms the basis for flow estimation and control design [41, 117, 118]. In the actual nonlinear flow, the level of amplified perturbations can exceed the linear regime and consequently modifies the base flow. However, describing what modification can be made to the base flows by the introduced forcing requires some extensions of basic resolvent analysis. While the analysis identifies the forcing shape and frequency that can potentially result in an effective departure from the base state, full nonlinear flow simulations (CFD) and experiments are necessary to fully identify the modification achieved by the control inputs.

Flow control design using resolvent analysis has been demonstrated in a variety of applications, including turbulent channel flows [42, 119], vortex shedding control around cylinders [44, 120], suppression of laminar separation bubbles over airfoils [43, 45], attenuation of pressure fluctuations in supersonic turbulent cavity flow [40], and control of separation and tip vortices around 3-D wings [46]. In addition to relying on the resolvent gain as a quantitative metric to identify effective control parameters, it is also possible to leverage the resolvent mode structures. Figure 17 shows an example of exploiting both resolvent gain and modes to suppress flow separation over an airfoil [43]. Here, in addition to the resolvent gain, the modal Reynolds stress, given by \(R_{ij} = \left\langle \hat{q}_i, \hat{q}_j\right\rangle \) (subscript i denotes the ith velocity component of the response mode) is also used to quantify the level of momentum mixing enabled by the excited coherent structures. Results show successful suppression of flow separation and improved aerodynamic performance with the resolvent-guided flow control design. This approach significantly can narrow down the design candidates for effective flow control setups with low computational burden instead of performing an enormous number of large scale numerical computations for a full parametric investigation [43].

Fig. 17
figure 17

An example of flow control guided by resolvent analysis. Flow separation is suppressed using the frequencies and wavenumbers of high resolvent gain and insights from the modal Reynolds stress [43]

5 Concluding remarks

We presented the resolvent analysis and offered a guide on its implementations and applications. This paper offered details on the formulation and discussed subtleties in the foundations that should be kept in mind as one applies resolvent analysis to a chosen base flow. Here, the presentations are offered for the compressible Navier–Stokes equations. However, the general concepts that were discussed here can be applied to the incompressible Navier–Stokes equations and other dynamical systems.

Because the main purpose of this paper is to act as a guide and lower the barrier for new practitioners to resolvent analysis, we did not provide an extensive survey of the existing work. We instead point readers to recent review articles on resolvent analysis [10] and modal analysis [11, 12] to gain additional insights and to observe a variety of applications.

As resolvent analysis is considered one of the operator-based methods, access to the discretized version of the linearized Navier–Stokes equations that generally come in the form of a CFD program or spatial discretization schemes is required. As such, grid generation and spatial discretization must be carefully performed. Due to these reasons, there is no universal resolvent analysis computer program that works for all flows, in contrast to data-driven methods such as the proper orthogonal decomposition and dynamic mode decomposition that do not require access to the linearized Navier–Stokes operator. However, to support our goal of making resolvent analysis a viable choice of examination tool for students and practitioners, this article attempted to provide as many necessary details, including pseudocodes, and know-how as possible to develop the resolvent analysis tool. We hope that the readers find this as a useful guide when they delve into this powerful method.

We also hope this article sparks the interest of those unfamiliar with resolvent analysis, encouraging them to explore its potential for uncovering valuable insights for their research endeavors. Resolvent analysis has proven to be useful for examining unsteady flow physics, deriving reduced-order models, and developing flow control designs. The resolvent analysis uncovers the dominant input–output dynamics of the flow with two sets of modes that can serve as the basis to capture the dominant flow oscillations. The close relationship of resolvent analysis to dynamical systems and control theories also gives great potential for novel modeling and control techniques for turbulent flows. We will be delighted if this article serves as an invitation for many new students and researchers to the world of resolvent analysis.