1 Introduction

Supersonic cavity flows have been widely studied both experimentally and numerically [1,2,3,4] because of their applications to various practical engineering problems. Although geometrically simple, the flow physics is quite challenging and complex. The first insight into the rectangular cavity was provided by Rossiter [5], where a semi-empirical formula was proposed to predict the resonant frequencies. Also, the mechanism of a feedback cycle was explained [6,7,8] through the sequence of events, such as (1) excitation of shear layer at the leading edge due to acoustic resonance, leading to vortical shedding, (2) convection and growth of the vortical structures further downstream, ultimately impacting the trailing edge, (3) generation of upstream traveling compression waves at the trailing edge, and (4) upstream propagation of these compression waves exciting the shear layer. The mechanism of flow-induced pressure oscillations in cavities has been reported in the published literature [9,10,11,12]. Heller and Bliss [10, 11] modified Rossiter’s formula and further classified four types of waves: type I: upstream propagation of waves above the cavity, due to the disturbances traveling upstream within the cavity, type II: formation of compression and expansion waves at the leading edge due to shear layer oscillation, type III: the quasi-steady external bow shocks at the trailing edge due to reattachment of flow, and type IV: the weak compression waves near the trailing edge. Zhang et al. [13] were the first to observe the fifth type of wave propagating upstream as an acoustic wave or perturbation. Arunajatesan and Sinha [14] simulated the flow over a cavity using a large eddy simulation as well as a hybrid RANS/LES solver. The hybrid model predictions were in good accordance with the measured pressure values. A computational investigation of the supersonic flow (\(M=1.5\)) over a three-dimensional (3D) cavity was done by Rizzetta and Visbal [15]. The frequency spectra from this computational analysis agreed well with the experimental data. It was noted that while the fundamental behavior of the problem was two-dimensional (2D), the presence of a vortex evolving at the side wall of the front wall of the cavity produced noticeable 3D effects. In a subsequent study, Zhuang et al. [16] observed generation of shock waves in shear layer due to convection of large-scale structures. At high Reynolds number, the flow above a rectangular open cavity is relatively undisturbed and the prominent unsteady flow feature is the convection of the vortices in the shear layer [17]. The dynamics of such a flow can be studied by observing the mechanism of the generation and propagation of the shear layer vortices. But, any high Reynolds number flow is associated with the significant separation of scales and isolating the different types of vortices present in the unsteady shear layer is an enormous task. Therefore, the proper orthogonal decomposition (POD) and the dynamic mode decomposition (DMD) are employed for the present study.

The proper orthogonal decomposition (POD), also known as the Karhunen–Loeve expansion or principle component analysis, was first introduced by Lumley [18] in the context of fluid dynamics to understand the turbulent flows by identifying the coherence in flow structures. The large-scale structures, also called coherent structures, are primarily responsible for most of the transport occurring in any turbulent flow. Thus, the study of turbulent flows that contain a wide range of scales and infinite degrees of freedom reduces to the study of the dynamics of the coherent structures. POD involves the decomposition of the flow field in time and space, and the eigenmodes are computed by collecting a sufficient number of snapshots separated properly in time, as temporal separation plays a vital role in the decomposition process. The decomposition is performed in such a manner that only a few basis functions are able to represent most of the energy. Basically, this allows only the first few modes to represent the flow field accurately. Over the years, the POD has emerged as a powerful tool for the extraction of dominant structures in turbulent flows. The POD has been widely used to construct a low-dimensional model to study the dynamics of the unsteady flow field. There exist various types of POD techniques of which the direct method and the method of snapshots are used widely. In the present investigation, the method of snapshots proposed by Lawrence [19] is utilized, and the formulation of energy-based POD is similar to [20,21,22,23].

The POD modes obtained from any system are based on the energy content of the loss of phase information, which makes POD unsuited for capturing any dynamic information of the system. Thus, any small perturbation leading to large-scale instability will not be captured by POD. However, the resulting flow features with high energy content will be reflected in the POD modes. A system comprised of a local instability in any finite region is capable of exhibiting self-sustained oscillations at a particular frequency. The flow over an open cavity is one such example with the deflection of the shear layer being the local instability. Thus, to extract dynamical features of a system, dynamic mode decomposition (DMD), a tool based on Koopman analysis [24] and introduced by Schmid [25], is employed. The basis of the algorithm is the extraction of low-dimensional subspace after fitting a high-degree polynomial to the original data sequence without any prior knowledge of the process by which the data had initially been generated. Thus, despite employing an infinite-dimensional linear Koopman operator [24, 26], DMD can be used for any data that stems from a linear or a nonlinear process. The eigenvalues and eigenvectors of the low-dimensional subspace capture the principal dynamics of the flow. Basically, DMD attempts to represent a data sequence by orthogonalizing it in time, while POD attempts a decomposition based on orthogonality in space. Furthermore, the DMD is directly applied to the data, while a POD analysis processes second-order statistics of the data.

The POD and DMD are powerful tools to study any turbulent flow associated with an enormous number of scales (length and time) with infinite degrees of freedom. They convert the study of the turbulent flow into the analysis of a few modes corresponding to coherence in space and time. The present flow geometry involves various interactions between the acoustic and the hydrodynamic modes, which lead to the generation of different types of vortices. The spatial and temporal evolution of these structures is key to understand the overall flow field. Hence, in the present work, both of the modal decomposition techniques are employed to study the generation and the propagation of the vortices along the shear layer and the feedback loop generated within the cavity, which is the consequence of the convection of these vortices. To the best knowledge of the authors, POD and DMD analyses of a supersonic cavity flow have not been reported widely except for recent work by Zhang et al. [27]. Their work involves reduced-order modeling for supersonic flow over a cavity using POD and Galerkin projection, whereas the present research focuses on the study of the hydrodynamic and acoustic modes due to the convection of discrete vortices along the shear layer. To be precise, the major philosophical difference between our study and that of the study of by Zhang et al. [27] lies in the fact that they propose a new norm for the reduced-order modeling of the supersonic flow. However, in the present investigation, we are only interested in the modal decomposition and not the reduced-order modeling; by this, we mean that these decomposition tools are utilized to characterize the structures generated due to the hydrodynamic and acoustic interactions leading to the self-sustained oscillation.

2 Numerical details

The filtered governing equations for the conservation of mass, momentum, and energy are solved and recast as:

Continuity equation:

$$\begin{aligned} \frac{\partial }{\partial t}({\bar{\rho }} )+\frac{\partial }{\partial x_i }(\bar{{\rho }} {\tilde{u}}_i )=0 \end{aligned}$$
(1)

Momentum equation:

$$\begin{aligned} \frac{\partial }{\partial t}(\bar{{\rho }}{\tilde{u}}_i) +\frac{\partial }{\partial x_j }(\bar{{\rho }}{\tilde{u}}_i \tilde{u}_j )=-\frac{\partial }{\partial x_i }(\bar{{p}})+\frac{\partial }{\partial x_j }\left( {(\mu +\mu _\mathrm{t} )\frac{\partial {\tilde{u}}_i }{\partial x_j }}\right) \nonumber \\ \end{aligned}$$
(2)

Energy equation:

$$\begin{aligned} \frac{\partial }{\partial t}(\bar{{\rho }}{\tilde{E}})+\frac{\partial }{\partial x_i }(\bar{{\rho }}{\tilde{u}}_i \tilde{E})= & {} -\frac{\partial }{\partial x_j }\left( {{\tilde{u}}_j \left( {-{\tilde{p}}I+\mu \frac{\partial {\tilde{u}}_i }{\partial x_j }} \right) } \right) \nonumber \\&+\,\frac{\partial }{\partial x_i }\left( {\left( {k+\frac{\mu _\mathrm{t} C_\mathrm{p} }{\Pr _\mathrm{t} }} \right) \frac{\partial \tilde{T}}{\partial x_i }} \right) \end{aligned}$$
(3)

Equation of state:

$$\begin{aligned} {\tilde{p}}=\bar{{\rho }}R{\tilde{T}} \end{aligned}$$
(4)

where \(\rho \) is the density, \(u_i\) is the velocity vector, p is the pressure, and \(E=e+u_{i}^{2}/{2}\) is the total energy, where \(e=h-p/\rho \) is the internal energy and h is enthalpy. The fluid properties \(\mu \) and k are, respectively, the viscosity and the thermal conductivity, while \(\mu _{\mathrm{t}}\) and \(\hbox {Pr}_{\mathrm{t}}\) are the turbulent eddy viscosity and the turbulent Prandtl number, respectively. The only unclosed terms in the above set of equations are the subgrid stresses (terms involving \(\mu _{\mathrm{t}}),\) which are modeled with the help of a turbulent eddy viscosity formulation.

The (−) quantities in the above equations are the Favre-averaged quantities, and the (\(\sim \)) quantities are the ones that are obtained after the application of the filter function. The application of the filter in the momentum equation produces subgrid-scale stress (SGS), which are modeled using an eddy viscosity assumption. The turbulent eddy viscosity is given by the relation:

$$\begin{aligned} \mu _{\mathrm{t}} =(C_{\mathrm{s}}{\bar{\Delta }} )^{2}|{\bar{S}} _{{ ij}} | \end{aligned}$$
(5)

where \({C}_{\mathrm{s}}\) is the Smagorinsky constant, \({\bar{\Delta }}\) is the filter width, and \(|{\bar{S}} _{{ ij}} |=(2{\bar{S}} _{{ ij}}{\bar{S}} _{{ ij}})^{\frac{1}{2}}\) is the strain rate magnitude. The Smagorinsky constant is determined a priori and is maintained as constant throughout the whole domain and computational time. Yoshizawa [28] proposed an eddy viscosity model that uses the Smagorinsky model to account for the anisotropic part of the SGS stress tensor, while the SGS energy was modeled separately as presented in the equations

$$\begin{aligned} \tau _{{ ij}} -\frac{\delta _{{ ij}} }{3}\tau _{kk}= & {} -C_{\mathrm{s}}^2 2\bar{{\Delta }}^{2}\bar{{\rho }}\left( {{\tilde{S}}_{{ ij}} -\frac{\delta _{{ ij}} }{3}{\tilde{S}}_{kk} } \right) \;=C_{\mathrm{s}}^2 \alpha _{{ ij}} \end{aligned}$$
(6)
$$\begin{aligned} \tau _{kk}= & {} C_{\mathrm{I}} 2\bar{{\rho }}\bar{{\Delta }}^{2}\left| {{\tilde{S}}_{{ ij}} } \right| \end{aligned}$$
(7)

The constant value of the Smagorinsky constant \(C_{\mathrm{s}}\) hinders the accurate prediction of the fields in massively separated flow regions that is overcome by using a dynamic procedure for the determination of the Smagorinsky constant [29]. This procedure involves an application of a test filter \(\hat{\Delta }\) that is roughly two times the size of the filter \({\bar{\Delta }}\). The SGS stresses \(\tau _{{ ij}}={\overline{{u}_{i}{u}_{j}}}-{\bar{u}}_{i}{\bar{u}}_{j}\) are related to the resolved turbulent stresses \(L_{{ ij}}=\widehat{\bar{u}_{i}\bar{u}_{j}}-\widehat{\bar{u}_{i}}\widehat{\bar{u}_{j}}\) and the subtest stresses \(T_{{ ij}}=\widehat{\overline{{u}_{i}{u}_{j}}}-\widehat{\bar{u}_{i}}\widehat{\bar{u}_{j}}\) via Germano identity [28]. A dynamic procedure proposed by Yoshizawa [28] was applied by the Moin et al. [30]. For the present study, this dynamic model has been used where the constants \(C_{\mathrm{s}}\) and \({C}_{\mathrm{I}}\) were calculated as follows

$$\begin{aligned} C=C_{\mathrm{s}}^2 =\;\frac{\langle L_{{ ij}} M_{{ ij}} \rangle }{\langle M_{kl} M_{kl} \rangle } \quad \mathrm{and} \quad C_{\mathrm {I}}= \frac{\langle L_{kk} \rangle }{\langle \beta -\alpha \rangle } \end{aligned}$$
(8)
$$\begin{aligned} \left. {\begin{array}{l} \beta _{{ ij}} =-2\hat{{\Delta }}^{2}\hat{{\bar{{\rho }}}}\left| {{\mathop {\tilde{S}}\limits ^{\smile }}}\right| \left( {{\mathop {\tilde{S}}\limits ^{\smile }}}_{{ ij}}-{\delta _{{ ij}}} {{\mathop {\tilde{S}}\limits ^{\smile }}}_{kk}/3\right) \\ M_{{ ij}} =\beta _{{ ij}} -\hat{{\alpha }}_{{ ij}} \\ \beta =2\hat{{\bar{{\Delta }}}}^{2}\hat{{\bar{{\rho }}}}\left| {{\mathop {\tilde{S}}\limits ^{\smile }}}\right| ^{2} \\ \end{array}} \right\} \end{aligned}$$
(9)

In order to reduce the computational cost of the simulation, the present LES grid does not resolve the wall boundary layer. Instead, a wall model is used to generate a smooth profile from the wall up to the first grid point. The modeling of the boundary layer is achieved through a wall model that uses Spalding’s law of the wall to create a smooth profile for \(\mu _{\mathrm{sgs}}\) from the wall until the first grid point. The Spalding’s law of the wall is given by

$$\begin{aligned} y^{+}=u^{+}+0.1108(\hbox {e}^{0.4u^{+}}-1-0.4u^{+}) \end{aligned}$$
(10)

where

$$\begin{aligned} u_\tau =\sqrt{\tau _{\mathrm{w}} /\rho } ,\quad y^{+}=yu_{{\tau }} /\nu ,\quad u^{+}=u/u_{{\tau }} \end{aligned}$$
(11)

From Spalding’s law, a smooth profile for the turbulent eddy viscosity \(\mu _{\mathrm{t}}\) is created from the wall up to the first grid point.

$$\begin{aligned} \frac{\mu _{\mathrm{t}} }{\mu _{\mathrm {eff}} }=1/\left[ 1+\frac{1}{0.04432}\left\{ \hbox {e}^{0.4u^{+}}-1-0.4u^{+}-\frac{(0.4u^{+})^{2}}{2!}\right\} \right] \nonumber \\ \end{aligned}$$
(12)

The performance assessment of the present wall model in predicting the velocity profile is done by Soni et al. [31] by comparing the results of LES simulation with the DNS results of [32, 33]. It has been shown by [31] that the values predicted by the wall model for \(y^{+}\) less than 100 are in excellent agreement with the DNS results.

Fig. 1
figure 1

Computational domain (xy plane) and grid distribution

3 Computational details

The computational domain consists of two regions: an internal (cavity) region and an outer (channel) region as shown in Fig. 1. The length from domain inlet to the cavity leading edge is 10D, and from the trailing edge to domain outlet, it is 7D to allow the reattachment shock to exit the system without reflecting. In the outer region, the length of the wall normal direction is 6.7D, and in the spanwise direction, it is 2D. The cavity has L/D ratio of 3 where \(D = 8.9\) mm. The domain is discretized through the multi-block approach to maintaining optimum grid size while retaining the resolution in the region of interest. Three sets of grids are generated, namely Grid 1, Grid 2, and Grid 3. For Grid 1, the outer region has a node distribution of \(250\times 85\times 40\), whereas in the internal region, the grid is distributed as \(130\times 85\times 40\) leading to a total grid size of 1.29 M. Whereas Grid 2 consists of \(630\times 125\times 50\) nodes in the outer region, the internal region is discretized with \(250\times 150\times 50\) nodes, and the total grid is 5.81 M. Grid 3 is 1.5 times that of Grid 2. From Fig. 2 (Grid 2), it can be seen that the grid clustering is mainly done in the cavity region and also in the aft region to resolve the spatial flow features. The Reynolds number based on the D is \(\hbox {Re}_{D} = 3.39\times 10^{5}\). The grid spacing within cavity region for Grid 2 is \(\Delta x=0.02D, \Delta y = 0.0067D\), and \(\Delta z = 0.034D\), where for both Grids 2 and 3, \(y ^{+}\) is 20, and in outer region \(y^{+}\) of 30 is maintained.

Fig. 2
figure 2

Time-averaged non-dimensional pressure distribution along the cavity wall

Fig. 3
figure 3

a Resolved energy spectrum and b resolution of grid through LES quality criteria

At the inlet boundary, uniform flow properties such as static pressure (\(P_{\infty } = 18.78\) KPa) and static temperature (\(T_{\infty } = 107\) K) are specified providing Mach 3 flow, while a power law velocity profile is imposed for the velocity. A supersonic freestream condition is imposed at the top, while a no-slip boundary condition is enforced along the bottom wall with condition that the normal pressure gradient vanishes at the wall. At the outlet, flow variables are extrapolated and a non-reflecting boundary condition (NRBC) is imposed based on the formulation of Poinsot and Lele [34]. This boundary condition provides a wave transmissive outflow condition based on solving \(\frac{\partial }{\partial t}( {\psi ,U} )=0\) at the boundary. The wave speed is calculated as

$$\begin{aligned} x_{\mathrm{p}} =\frac{\varphi _{\mathrm{p}} }{\left| {s_{\mathrm{f}} } \right| }+\sqrt{\frac{\gamma }{\psi _{\mathrm{p}} }}; \end{aligned}$$

where \(x_{\mathrm{p}}\) is the value of the field at the patch, \(\varphi _{\mathrm{p}}\) is the flux value of the field, \(S_{\mathrm{f}}\) is the face area vector, and \(\psi _{\mathrm{p}}\) is the patch compressibility. Numerical results are obtained by employing the dynamic SGS model inside the density-based solver (rhoCentralFoam) in OpenFOAM framework employing central schemes [35, 36]. These Godunov-type central schemes have been used by many authors for various numerical studies [37,38,39]. The dynamics SGS model utilized for the present computation is based on a dynamic calculation of two model constants. A second-order backward Euler scheme is used for temporal discretization, while the convection and diffusion terms are discretized using a second-order low-dissipation filtered-linear scheme and a central difference scheme, respectively.

4 Results and discussion

This section is organized in the following manner: (1) Initially, the validation of the solver is demonstrated along with the unsteady results, then (2) the results of both energy- and scalar-based POD are discussed at different planes, and (3) finally, the observation from the DMD analysis is presented.

Fig. 4
figure 4

Instantaneous shadowgraph image depicting various flow features. a The presence of expansion and compression wave. b Left- and right-moving acoustic wave. c Shear layer impingement leading to the formation of acoustic waves. d Upstream traveling acoustic wave

4.1 Mean and unsteady flow field

4.1.1 Grid independence and mean data analysis

The non-dimensional time-averaged pressure distribution for both grids, along the cavity wall, is shown in Fig. 2. The simulated result (Grids 2 and 3) exhibits excellent agreement with the experimental results of Gruber et al. [40]. It can be seen that the variation in pressure is only observed in the region close to the trailing edge where the feedback occurs. Since the results obtained via Grids 2 and 3 are in excellent agreement with each other, therefore the detailed analysis is presented in the following subsections using Grid 2 only.

To further demonstrate the resolution of the chosen grid, energy spectrum using Grid 2 is presented in Fig. 3a. It can be observed that the spectra follow the −5/3 slope closely in the inertial subrange, and hence, it can be inferred that the grid is resolved enough to capture the large-scale structures in the cavity as well as in the wake region. Apart from energy spectra, index of the grid quality, proposed by the Celik et al. [41], which is based on the eddy viscosity ratio, is recast as:

$$\begin{aligned} \hbox {LES}\_{\mathrm{IQ}}=\frac{1}{1+\alpha _{\mathrm{v}} \left( {\frac{\vartheta _{\mathrm {t},\mathrm{Eff}} }{\vartheta }} \right) ^{n}} \end{aligned}$$

where \(n = 0.53\) and \(\alpha _{\mathrm{v}} = 0.05\). It is generally suggested that LES_IQ above 75 % indicates a well-resolved grid for LES computations. In Fig. 3b, LES_IQ for Grid 2 is presented in the near cavity region. It is evident from the plot that the chosen grid offers sufficient resolution, and therefore, it is invoked for the detailed analysis of the flow field.

4.1.2 Instantaneous data analysis

The instantaneous double derivative of density (shadowgraph) is shown in Fig. 4. Figure 4a corresponds to the mean flow with only expansion (E) and reattachment waves (C) along the cavity leading and trailing edges. In Fig. 4b, apart from the expansion and the compression waves, an acoustic wave (A) traveling left and right can be observed; these acoustic waves while traveling within the cavity perturb the shear layer and lead to self-sustained oscillations. Ben-Yakar and Hanson [42] suggested that the acoustic waves traveling upstream upon impinging the leading edge induce smaller vortices, which eventually grow in size as they are convected downstream. From the similar figure, it is also evident that the acoustic waves (A) have their leg within the cavity with a part of it moving above the cavity as well. Figure 4c, d presents the formation of compression and expansion waves along the shear layer due to the flapping of the shear layer. The downstroke of the shear layer near the trailing edge introduces mass inside the cavity that follows the feedback loop and is added back to the main flow with the upstroke of the shear layer. The results presented in Fig. 4a–d are consistent with the observation of [43].

Figure 5a–d presents the second invariant of the velocity gradient tensor over one feedback cycle. From Fig. 5, it is evident that the large-scale structures are convected downstream along the cavity shear layer, which is consistent with the observation of [44]. The 3D structures convected downstream upon reaching the trailing edge tend to transform into a wake region and are discussed later. Apart from these vortices, there are also vortical structures present near the trailing edge due to vortex shedding. Arya et al. [43] too reported the presence of the K–H vortices and three-dimensional structures in the shear layer region. From Fig. 5a, b, it is evident that the incoming boundary layer contains vortical structures that transform into a spanwise roller right at the leading edge of the cavity.

Fig. 5
figure 5

Iso-surface of the second invariant of velocity gradient tensor, \(Q=9\left( {\frac{u_\infty }{L}} \right) ^{2}\)presented for one feedback cycle, colored by instantaneous streamwise velocity

Fig. 6
figure 6

Energy spectra of pressure signal

4.1.3 FFT and phase averaging

Figure 6 presents the power spectra where three distinct peaks are clearly visible, while the second and a third peak appear to be harmonic frequencies. To perform FFT, pressure signals are acquired at various locations, but only locations close to the shear layer and trailing edge are presented herein. The first peak corresponds to 5518 Hz and is very close to the theoretical calculation of Rossiter an Kurn [8], where the frequency corresponding to Rossiter’s first mode calculated through the modified formula is 4834 Hz [8]. To further assess the evolution of flow field within the cavity, phase averaging is performed corresponding to the first two peak frequencies, namely 5247 and 7357 Hz. The phase averaging is performed over 10 cycles with a phase difference of \(36^{\circ }\) to eliminate the effect of high-frequency oscillations present in the flow field. Figure 7 represents the schematic of shear layer oscillation about the mean shear layer (dotted centerline). The position A of the shear layer is representative of the upstroke where the mass ejection occurs, and position B represents the downstroke leading to mass injection at the trailing edge. The vortices generated at the leading edge induce instability along the shear layer as they are convected downstream and finally impinge on the trailing edge, leading to the generation of noise. The vortices that impinge on the trailing edge during the downstroke phase are entrained inside the cavity and roll down along the trailing edge wall through the formation of the second recirculation bubble and finally leave the cavity during the upstroke phase.

Fig. 7
figure 7

Schematic depiction of shear layer oscillation with mean shear layer position (−)

Fig. 8
figure 8

Phase-averaged streamline plots over a cycle corresponding to first peak (\(f = 5247\) Hz)

Figure 8 presents the streamlines over one complete cycle, where the movement of these vortical structures during upstroke and downstroke is clearly observed. Moreover, the shear layer oscillation can be identified along the various phases as the oscillation of the shear layer alters the recirculation zones within the cavity. At different phases of the cycle, the motion of two recirculation bubbles is observed. In the first half of the cycle (phase 1–5), the leading-edge bubble grows in size, while during the latter half of the cycle (phase 6–10) the trailing edge bubble grows in size. Worth noticing is the significant variation in the evolution of two recirculation bubbles over a cycle, as the core of the recirculation zone appears to shift in both transverse and streamwise direction, which can be attributed to the shear layer flapping. Essentially, the upstroke of the shear layer results in the mass addition at the trailing edge and the contraction near the trailing edge as the shear layer moves downwards; this phenomenon leads to the change in the size of the secondary bubble, while this leads to the elongation of second recirculation bubble in streamwise direction but during the downstroke the reverse happens, meaning the first bubble grows due to the contraction at the leading edge. This becomes a repetitive process corresponding to the frequency 7357 Hz and primarily happens due to the shear layer oscillation during upstroke and downstroke. This particular process is more prominent for the other frequency observed in Fig. 6 as depicted in Fig. 9.

Fig. 9
figure 9

Phase-averaged streamline plots over a cycle corresponding to second peak (\(f = 7357\) Hz)

In Fig. 9, phase-averaged data corresponding to the second frequency, as obtained from Fig. 6, are presented. From different phase plots, the presence of vortical structures close to the cavity leading edge is observed. On combining this observation with that of Figs. 5 and 6, it becomes clear that these vortical structures are the spanwise rollers formed at the leading edge due to the perturbation of the shear layer. These large-scale vortices, which are being convected over the shear layer toward the cavity trailing edge, act as local obstructions to supersonic flow and lead to the formation of compression waves. However, vortical motion in the inner edge of the shear layer is responsible for the generation of the edge tone and formation of the feedback loop. The streamline plots from Figs. 8 and 9 clearly demonstrate the presence of the discrete vortices. A high degree of unsteadiness in the recirculating bubble is evident from the phase-averaged plots. Further details about the underlying physics are discussed in the POD section.

Fig. 10
figure 10

Distribution of relative energy (\(\lambda _{{ i}})\) content as a function of mode number (N)

Table 1 Comparison of energy distribution for the first five eigenmodes for all three N
Fig. 11
figure 11

First six spatial eigenmodes colored with the streamwise velocity fluctuation

4.2 POD analysis (energy based)

4.2.1 POD at \(z/h = 0\) plane

The energy-based POD analysis is presented in this section; hereafter, energy-based POD means that temperature along with components of velocities is used as input to perform the decomposition and the inner product [20,21,22]. To demonstrate the least number of snapshots required to resolve the coherence in the flow, three different numbers of snapshots (N) are initially used and the distribution of energy is demonstrated in Fig. 10. For all the values of N presented in Fig. 10, the temporal spacing between the consecutive snapshots has been maintained at \(\Delta t= 10^{-5 }\) s. The energy content of the first mode for all values of N is around 51%, whereas for the second and third modes for all N it varies between 10 and 13%. The first 10 modes represent around 88% energy of the mean flow, and hence, the higher modes that amount to approximately 1% energy are not included in the further study. Comparison of energy distribution for the first five modes for all three N is presented in Table 1. From Table 1, comparison of eigenvalues for three different values of N reveals that there exist very little differences in the value of \(\lambda _{i}\) for a given mode using \(N=80\) and 100. Hence in the present section POD, eigenmodes obtained with 80 snapshots are only reported.

Figure 11 presents the first six POD modes along the centerline plane (\(z = 0\)), and the contour represents the streamwise velocity fluctuations. It can be observed that the various coherent structures are revealed by the POD depending on the energy distribution for different modes. The various vortical structures observed here are consistent with the observation of phase averaged and the second invariant of velocity data. The coherent structures are distinguished by the labels, as shown in Fig. 11, e.g., type I and type II, to facilitate the discussion. It is evident that every coherent structure exhibits specific characteristics, but some appear to transform into different structures altogether. At first, the role and evolution of different vortices are discussed, and then, the POD modes itself are characterized. Type I structures near the trailing edge are formed due to the impingement of discrete vortices present in the shear layer. As discussed in [10], compression and expansion waves are generated at the leading edge; this phenomenon leads to the generation of type II vortices that are convected above the shear layer. Type III vortices are formed due to the upstream traveling disturbances. Further details will be discussed in the following section. Type IV vortices are the structures present inside the boundary layer, whereas type V structures are originally part of type I vortices that follow the feedback loop, and type VI vortices are formed by the pairing action of type II vortices.

In mode 1, type I and II vortices are resolved, the type I vortices upon impinging the trailing edge lead to the acoustic resonance, and an upstream traveling disturbance is created that interacts with the shear layer at the leading edge. The type II vortices are present above the shear layer and can be associated with the large-scale structures that are responsible for the wake formation at the cavity trailing edge. From modes 2 and 3, a very important observation can be made: Type III vortices, which are also observed in Figs. 8 and 9, are generated at the leading edge (mode 2) and convect along the shear layer (mode 3). From the discussion in the previous sections, it can be determined that these vortices are formed due to the perturbation caused by the shear layer. The addition of mass within the cavity at the trailing edge leads to the perturbation at the leading edge, and hence, type III vortices, which are basically low-frequency structures, are generated. The presence of the type III structure is consistent with the observation of Figs. 8 and 9 and confirms the presence of the feedback loop, which suggests that the present modal decomposition is able to resolve the structures formed due to both hydrodynamic and acoustic modes accurately. If the eigenmodes are analyzed along with Figs. 5 and 6, it becomes apparent that type I vortices are transformed into type III structures due to pairing/merging. The presence of the vortices in the boundary layer is noticed; it is possible that while convecting downstream they interact with other vortices especially ones formed on the outer edge of the shear layer. The type II vortices present on either side of the shear layer are present across different modes. These vortices start to pair close to the trailing edge, and the pairing continues further downstream leading to the large-scale structure in the wake region (type VI). The overall convincing output is obtained through the modal decomposition, i.e., all the vortical structures corresponding to major phenomena are resolved. Although both hydrodynamic and acoustic mode-related structures are present, the discussion in a temporal sense may not be convincing from the eigenmodes plot alone. However to remedy this, combined analysis with instantaneous data set can be utilized to better understand the nature and formation of certain vortical structures and their motion.

Now coming to the contour plot, it can be noticed that all six modes exhibit two local extremes of opposite sign. This observation is especially more pronounced in the first four modes, and modes one and four appear to be identical; similarly, modes two and three appear in a pair but with the spatial shift compared to modes 1 and 4. This suggests the periodicity in the presence of the large-scale structures, present along the shear layer. The first local extreme presents in first and fourth modes is of positive sign and suggest the local increase in streamwise component yielding the downward shift of the shear layer, whereas the second local extreme of negative sign induces the increment in the streamwise component and results in upward movement of the shear layer. This can be ascribed to the momentum ejection and injection across the shear layer. On combining this argument with the first four modes, it becomes evident that the shear layer flapping is a periodic event oscillating regularly about the mean position. This suggests that the first four modes represent the undulating motion of the shear layer. The last two modes (fifth and sixth) are mainly representative of the wake mode and relatively small-scale motions.

Fig. 12
figure 12

Phase plots of temporal coefficient

The phase plots of temporal coefficients are presented in Fig. 12. The presence of a low-dimensional attractor is clearly visible from the plots as mostly temporal coefficients are clustered around the origin. Hence, it can be inferred that the decomposition does its job to perform a linear mapping of the data to a lower-dimensional space such that the variance of the data in the lower-dimensional space is maximized.

Since the POD decomposition is based on the two-point correlation phase, information is lost due to which only spatially coherent structures are revealed. However, the temporal coefficients can be invoked to obtain insight in the spectral sense. Although in general it is a good idea to utilize the temporal coefficients, one must be careful as it does not reveal the pure frequency. However, the fast Fourier transform of the temporal coefficient could be a good indicator to establish relationship between modes. Hence, the FFT of the first five temporal coefficients for three different norms is evaluated and collated in Fig. 13. Since the spatial coherence is established from the energy-based eigenmodes, hence for the sake of brevity only the FFT of temporal coefficients for pressure- and density-based decomposition is reported. The peak highlighted with the red circle corresponds to 5247 Hz, which corresponds to the vortical motion along the shear layer (Fig. 8). This result explains the presence of this particular frequency among all the eigenmodes investigated in Fig. 11. It can be thought of as the most probable (or dominant) frequency present in the domain; one can safely assume that this frequency is responsible for large-scale vortical motion along the shear layer and hence is the frequency of the shear layer oscillation as well. The relation between mode two and three in Fig. 13(i) is clearly unfurled from the FFT as well; the mode seems to be phase shifted suggesting convection of vortices along the shear layer. Similarly, for the density- and pressure-based decomposition mostly common frequencies are observed. However, for these two decompositions, mostly higher harmonics are witnessed, which suggests that these decompositions represent acoustic-related phenomenon. Most intriguing is the presence of the higher frequencies; it appears that the two peaks are in fact super-harmonics of the shear layer flapping frequency. The harmonics can be related to the small-scale vortical motion happening within the cavity due to vortex stretching/breakdown at the trailing edge.

Fig. 13
figure 13

Fast Fourier transform of the temporal coefficient corresponding to the first five most energetic modes (i. energy POD, ii. pressure POD, and iii. density POD)

Fig. 14
figure 14

POD modes for \(x/d = 3.93\) plane (contour: out-of-plane component)

4.2.2 POD at \(x/d = 3.93\) plane

POD modes for the x/\(d =3.93\) plane are presented in this section, which lies in the region of vortex shedding immediately after the reattachment point. Here again, POD results are shown for the \(N=80\) case. Again the first five and tenth eigenmodes are presented in this section. From Fig. 14, it can be inferred that first and third modes are closely related to first mode very close to the mean flow. In these two modes, vortical structures are observed above the aft region wall, whereas second and fourth modes, which again appear similar, have more pronounced vortical structures shifted toward the wall region. Similarly, from the fifth and tenth modes, it can be seen that the structures are clustered close to the wall. On combining this observation with that of z/\(d = 0\) plane, it can be concluded that indeed large-scale structures are present due to the vortex shedding at the trailing edge as well as the structures passing through the shear layer, and this is consistent with the observation of Fig. 11.

4.3 DMD analysis

From the discussion of the proper orthogonal decomposition in the preceding section, the spatial coherence is established. Although the fast Fourier transform does offer significant insight in the spectral sense, the presence of mixed frequencies throughout the modes indeed creates the confusion. The source of this confusion lies in the lack of POD to extract temporal orthogonality, which is its inherent limitation. This issue can be remedied by invoking another modal decomposition technique that extracts the temporal orthogonality and relieves the observation of the mixed frequency. The dynamic mode decomposition does not collate the modes on the basis of energy content; instead it is based on the observed frequencies that are exclusive to a particular mode. So in a way it can be said that the eigenvalues associated with the DMD are actually representative of the growth and decay of any instability present in the flow field. In the present investigation, \(N= 101\) snapshots are utilized that results in the companion matrix of the size \(( N-1) \times (N-1)\). The snapshots for the DMD have been generated such that it complies with the Nyquist criteria, and in the current investigation, the sampling frequency (\(F_{\mathrm{s}})\) has been maintained to be \(10^{5}\) Hz. This choice of the \(F_{\mathrm{s}}\) will assure that all the frequencies of interest are resolved especially those detected in the POD temporal coefficient spectra.

Fig. 15
figure 15

\({L}_{2}\) norm for pressure (left) and streamwise velocity (right)

Fig. 16
figure 16

Dynamic modes computed for a streamwise velocity, b spanwise vorticity, and c pressure field

In Fig. 14, the \(L_{2}\)-norm of the DMD spectrum for pressure and velocity is presented. The choice of the sampling frequency is reflected in the resolution of all the frequencies that are relevant to characterize the physics. The three frequencies marked in the plot (Fig. 14) as 1, 2, and 3 represent 5590, 7381, and 11,190 Hz, respectively, where the highest frequency is the super-harmonic of the lowest one. The dynamic modes corresponding to all the three field variables are presented for only those three frequencies, which is consistent with the observation of the temporal coefficient spectra. In Fig. 15a–c, the dynamic modes computed for velocity, vorticity, and pressure, respectively, are presented. The dynamic modes related to streamwise velocity show the convection of large-scale vortical motion along the shear layer and inside the cavity. The structures present along the shear layer are the ones generated at the leading edge and are convected downstream to interact with the trailing edge and lead to the initiation of the self-sustained oscillation (feedback mechanism). The large wavelength present inside the cavity for the first two modes signifies the low-frequency structures traversing upstream. However, for the last mode relatively smaller wavelength structure inside the cavity gives impression of the feedback mechanism. It can be conjectured that first two modes reflect mostly the large-scale vortices, whereas the third mode signifies the effect of vortex stretching inside the cavity while sweeping upstream. Apart from these, structures past the trailing edge are also reflected in the modal plot, which suggests that shear layer flapping and vortex shedding in the wake region are at a similar frequency. The same is true for the dynamic mode computed through spanwise vorticity; for low frequency, large wavelengths are present within the cavity, and for the super-harmonic, smaller wavelengths depicting a complete feedback cycle are present. The presence of the local maxima and minima characterizes the vortical motion of opposite sign convecting downstream. The large wavelength witnessed for the lower frequencies probably signifies the interaction of vortex leading to pairing/merging phenomenon. The presence of a single structure along the shear layer is possibly related to the Rossiter’s first mode, which makes sense because as seen from the POD analysis low frequency type III vortices are present due to the acoustic perturbation. However, the single structure for highest frequency showing two wavelengths along the shear layer signifies the vortex stretching process, possibly higher Rossiter’s mode. Finally, the modes corresponding to the pressure mostly represent the propagation of acoustic waves inside the cavity. The acoustic wave travels back and forth inside the cavity and, upon interacting with the shear layer at the leading edge, results in the formation of vortices in shear region leading to the onset of the self-sustained oscillation. The different pressure modes also seem to represent the compression and expansion region at the leading and trailing edge apart from the waves that interact with the shear layer the during up and downstroke. For example, the first two low-frequency modes clearly show the presence of bow shock (or reattachment) at the trailing edge as a region of high gradient (Fig. 16).

5 Conclusions

Wall-modeled LES of the supersonic open cavity at Mach 3 is reported, and the numerical results (mean) follow the experimental observation very closely. The numerical results validate the fact that wall modeling approach is efficient in reducing computational overhead without compromising the numerical accuracy. Also, the LES_IQ demonstrates the effect of grid resolution used in the present study. Unsteady data and phase-averaged data reveal the presence of discrete vortices along the shear layer; it is also confirmed that these vortices are responsible for the acoustic excitation and feedback mechanism in the cavity. The modal decomposition (POD and DMD) is performed on the various snapshots, and it reveals that major flow structures governing much of the phenomenon in the cavity are discrete vortices present along the shear layer. The energy- and scalar-based POD is performed along the centerline plane (\(z = 0\)). The energy-based POD along this plane reveals the evolution of various large-scale structures. Higher eigenmodes along this plane reveal the presence of discrete structures formed due to the acoustic excitation and wake vortices; also the incoming boundary layer contains vortical structures that are convected downstream. The variation in the wavelength across various modes suggests phenomena exclusive to vortical motion, i.e., stretching and pairing/merging. This suggests that the growth of vortices is basically due to the interaction of different types of vortices generated independently. The spectra of temporal coefficients for energy, pressure, and density show consistency in a sense that the entire norm reveals more or less similar frequencies. The fundamental frequency that is close to the Rossiter’s first mode is also revealed, the most prominent being the first super-harmonic that is present consistently throughout for all the norms. The DMD performed on the spanwise vorticity, streamwise velocity, and pressure all reveal the similar observation as POD. The presence of the feedback mechanism is established through the velocity- and vorticity-based decomposition, whereas pressure-based modal analysis points toward the acoustics-related phenomenon.