Introduction
Accurate numerical simulations of high-speed flows demand methods that exhibit good shock-capturing and eddy-resolving capabilities. On this front, several high-resolution numerical methods and improvements are proposed in the literature every year [2 , 3 ] . Many of the proposed methods are generally developed and tested on Cartesian grids and employing canonical test cases. However, extending these methods and testing their applicability on the non-uniform meshes is also important to enable complex flow simulations of practical interest. In the previous paper from our group by Chamarthi [1 ] , a new gradient based reconstruction algorithm and α \alpha α -damping [4 ] viscous flux discretization scheme were proposed. In this paper, we extend the proposed numerical schemes of Chamarthi [1 ] to a generalized curvilinear coordinate system and perform demonstrations on highly skewed and dynamically deforming meshes. Moreover, we also demonstrate the method’s parallelizability and efficacy in resolving the physics of noise due to an under-expanded supersonic jet.
One of the first widely recognized high-order shock-capturing schemes in the literature was the Weighted Essentially Non-Oscillatory (WENO) class of schemes first introduced by Liu et al. [5 ] and later improved by Jiang and Shu [6 ] . The performance of WENO schemes and the issues concerning its extension to simulate flows over non-uniform curvilinear grids were addressed in various studies [7 , 8 , 9 ] . It was then followed by the wide usage of the WENO schemes to study the physics of numerous high-speed flow problems of practical interest [10 , 11 ] . Although the WENO class of schemes has gained significant popularity in the literature with several enhancements proposed over the years [12 , 13 , 14 ] , alternative high-order shock-capturing schemes with even better spectral properties were also studied and applied. A few examples include the limiter-based Monotonocity Preserving (MP) approach of Suresh and Huynh [15 ] , filtering/artificial dissipation based approaches [16 , 17 ] , and hybrid approaches such as Boundary Variation Diminishing (BVD) algorithm [18 ] . Efforts were also made by researchers to mitigate the dissipation coming from the shock capturing scheme. This was achieved through hybrid-central schemes, where a non-dissipative central scheme in smooth regions is combined with a shock capturing scheme near discontinuities. Examples of such attempts include the Hybrid Central-WENO schemes by Costa & Don [19 ] and Karami et al. [20 ] . In addition, there have been attempts to design non-linearly stable numerical methods that retain the energy properties of the governing equations in a discrete sense. These methods, known as energy consistent schemes, have been found to enhance stability and eliminate numerical dissipation [21 ] . The inviscid scheme in the present study proposed by Chamarthi [1 ] fundamentally operates on a novel reconstruction polynomial that employs explicit or implicit gradients of primitive variables to enhance the solution accuracy and an improved MP limiter for shock capturing. The two versions of the algorithm either use the standard central sixth-order explicit (E6) gradients or the fourth-order implicit gradients (IG4) (specific details of the gradient scheme will be presented in § 5 ). The resultant schemes were named MEG6 and MIG4 where ‘M’ stands for Monotonocity preserving, and ‘EG6’ and ‘IG4’ refer to sixth-order Explicit Gradients and fourth-order Implicit Gradients, respectively.
Historically, viscous flux discretization has received significantly less attention in the literature than the discretization of inviscid terms. Many of the widely used viscous flux discretization schemes suffer from the odd-even decoupling phenomenon and poor second derivative spectral properties [22 , 23 ] . To counter this problem, Chamarthi [1 ] has also proposed a new α \alpha α -damping discretization with superior spectral properties. One of the key benefits of the method is that the same cell-center primitive variable gradients used in inviscid scheme are used in the viscous flux discretization algorithm. This gradient-sharing strategy was demonstrated to balance the computational efficiency and solution resolution well. The new inviscid and viscous discretization schemes proposed in Ref. [1 ] were primarily tested using two-dimensional test cases on Cartesian grids. However, the fine details of extending the MEG6/MIG4 and the new α \alpha α -damping schemes to curvilinear, stationary, and dynamic meshes have not been addressed thus far and require attention. This establishes the motivation for the first objective of the current work.
Objective 1: To adapt MEG6/MIG4 and α \alpha α -damping schemes to simulate flows on stationary and moving curvilinear grids.
Mesh non-uniformities and low-quality grid cells are unavoidable and difficult to control while designing grids for complex geometries. Often, such low-quality grids can affect the simulation results, mainly when the interest of the simulation is to capture sensitive flow features such as small amplitude acoustic waves, eddies, or instability waves. The freestream preservation property is vital while solving such flow problems on non-uniform grids (containing grid stretching and local skewness) since the errors associated with non-preserved freestream can grow to become comparable to the magnitude of essential flow features of interest. Visbal and Gaitonde [24 ] were the first to address this issue in the context of solving the compressible Navier-Stokes equations on curvilinear grids using high-order finite difference schemes. They employed the conservative metric term formulations of Thomas and Lombard [25 ] and maintained a consistent discretization between inviscid flux terms and metric terms to achieve freestream preservation on stationary and dynamically moving three-dimensional curvilinear meshes. Later, in 2010, Nonomura et al. [8 ] pointed out that employing the same procedure for the WENO class of shock capturing schemes does not preserve freestream due to the nature of WENO reconstruction. They resolved this issue in the same work by proposing an alternative discretization approach. In the later years, other methods were proposed in the literature for freestream preservation in the context of the WENO class of schemes [8 , 26 , 27 ] . In addition to objective 1 stated above, the present work also explores the freestream preservation nature of the MEG6 and MIG4 schemes using theory and example numerical flow simulations. This motivates the second objective of this work.
Objective 2: To elucidate the required procedure to guarantee freestream preservation for the present methods on stationary and moving curvilinear grids.
The present study is part of the broader investigation initiated in the CFDLAB group at Technion to understand the fundamental and applied aspects of noise due to supersonic jets [28 ] . Supersonic jet noise is one of the primary concerns in the aerospace industry. Although numerous experimental and computational studies have been conducted since the 1950s [29 ] , some of the fundamental aspects of supersonic jet noise remain unsolved. Of all the supersonic jet noise components, the noise due to aeroacoustic resonance (commonly referred to as screech) can be harmful due to its discrete tonal nature and requires a through physical understanding and control. The review article by Edgington [30 ] summarizes the current understanding of the fundamental aspects of aeroacoustic resonance loop in shock containing supersonic jets. It was believed that the high-accuracy methods (MEG6/MIG4 and α \alpha α -damping schemes) adapted in the current work could offer superior fidelity in resolving the three-dimensional physical aspects of supersonic jet noise that are otherwise challenging to capture even through state-of-the-art experimental diagnostics. This leads to the third objective of the current study.
Objective 3: To explore the efficacy of MEG6 and MIG4 schemes in resolving the screech tones and unsteady aspects of a supersonic jet.
Large Eddy Simulations (LES) and Direct Numerical Simulations (DNS) are the current state-of-the-art high-fidelity simulation strategies that enable us to understand the physics of fundamental and applied flow problems. However, the grid resolution requirements for a wall resolved LES roughly scales with the ( 13 7 ) t h \left(\frac{13}{7}\right)^{\mathrm{th}} ( 7 13 ) th power of the flow Reynolds number [31 ] . As a result, the primary bottleneck in performing LES (particularly of high Reynolds number flows) is the computational time. Although the computing power of CPUs has been growing continuously over the years (owing to their increasing transistor concentration), significant speedup gains in recent times were achieved through dedicated accelerator cards, especially from Graphics Processing Units (GPUs). In recent years, there has been an increasing interest in the use of GPUs to accelerate Computational Fluid Dynamics (CFD) applications. A number of popular open-source GPU-based CFD solvers have been developed, such as PyFR [32 ] , STREAmS [33 ] , ZEFR [34 ] , and HTR [35 ] . These solvers utilize some of the latest generations of high-order algorithms to simulate a range of flow regimes including incompressible [32 ] , compressible [33 , 34 ] , and turbulent reacting flows [35 ] . Additionally, several non-open-source GPU accelerated codes have also been developed, such as CharLES [36 ] and COMP-SQUARE [37 ] .
A study by Konrad et al. [36 ] has shown that utilizing 96 NVIDIA V100 GPU cards can result in up to 26 times faster performance than using 2000 CPU cores for the same task. This effectively means that each GPU can replace approximately 540 CPU cores. The exceptional acceleration capabilities of GPUs can be attributed to their unique hardware architecture, which is comprised of hundreds of weaker processing elements, referred to as threads, rather than a smaller number of more powerful processor cores as in CPUs. This allows GPUs to excel at processing data when a limited number of straightforward instructions are to be executed on large datasets, a requirement commonly seen in CFD algorithms. Research has also shown that GPUs are more energy efficient than CPUs [38 , 39 ] , which has led to the widespread adoption of GPU cards in the new exascale data center supercomputers and desktop-grade workstations. To take advantage of this increased computing power, it is important to adapt parallelization models in CFD applications to suit GPU accelerators. In this study, we focus on accelerating the MEG6/MIG4 + α \alpha α -damping algorithm using OpenACC. While most of the GPU accelerated CFD applications in the literature primarily use the CUDA based programming model [36 , 40 , 41 , 42 , 43 ] , we investigate the performance gains that could be achieved by using OpenACC a directive-based programming language, which requires less development time due to its high-level nature. The fourth objective of the present study is stated below.
Objective 4: To accelerate the MEG6/MIG4 algorithms on GPUs and explore their computational efficiency and performance statistics on the latest generations of data center GPUs.
The rest of the article is organized as follows. Firstly, the governing equations are presented. This is followed by a brief description of the conservative finite difference discretization approach in § 3 . The freestream preserving conservative metric formulations are presented in § 4 . The discretization approach employed for inviscid and viscous terms is presented in § 5 . The freestream preservation nature of MEG6 and MIG4 schemes is discussed in section 7. Next, the results and demonstrations are presented using a suite of standard and practical test cases (section 8). In section 9 the GPU acceleration models adapted for single and multi-GPU simulations to accelerate the MEG6 and MIG4 algorithms are presented with detailed analyses. Concluding remarks are laid out in the last section.
Governing equations
The unsteady three-dimensional compressible Navier-Stokes equations (dimensional) in a generalized curvilinear coordinate system with ξ \xi ξ , η \eta η , and ζ \zeta ζ as the spatial coordinate directions and t t t as the time can be written in the following vector form:
∂ ∂ t ( Q J ) + ∂ F ^ ∂ ξ + ∂ G ^ ∂ η + ∂ H ^ ∂ ζ = ∂ F ^ v ∂ ξ + ∂ G ^ v ∂ η + ∂ H ^ v ∂ ζ , (1) \frac{\partial}{\partial t}\left(\frac{\mathbf{Q}}{J}\right)+\frac{\partial\hat{\mathbf{F}}}{\partial\xi}+\frac{\partial\hat{\mathbf{G}}}{\partial\eta}+\frac{\partial\hat{\mathbf{H}}}{\partial\zeta}=\frac{\partial\hat{\mathbf{F}}_{\mathrm{v}}}{\partial\xi}+\frac{\partial\hat{\mathbf{G}}_{\mathrm{v}}}{\partial\eta}+\frac{\partial\hat{\mathbf{H}}_{\mathrm{v}}}{\partial\zeta}, \tag*{(1)} ∂ t ∂ ( J Q ) + ∂ ξ ∂ F ^ + ∂ η ∂ G ^ + ∂ ζ ∂ H ^ = ∂ ξ ∂ F ^ v + ∂ η ∂ G ^ v + ∂ ζ ∂ H ^ v , (1)
where Q \mathbf{Q} Q represents the vector of conservative variables, i.e. Q = [ ρ , ρ u , ρ v , ρ w , E ] T \mathbf{Q}=[\rho,\rho u,\rho v,\rho w,E]^{T} Q = [ ρ , ρ u , ρ v , ρw , E ] T . The vectors of inviscid fluxes (F ^ \hat{\mathbf{F}} F ^ , G ^ \hat{\mathbf{G}} G ^ and H ^ \hat{\mathbf{H}} H ^ ) and viscous fluxes (F ^ v \hat{\mathbf{F}}_{\mathrm{v}} F ^ v , G ^ v \hat{\mathbf{G}}_{\mathrm{v}} G ^ v and H ^ v \hat{\mathbf{H}}_{\mathrm{v}} H ^ v ) are,
F ^ = [ ρ U ^ ρ u U ^ + ξ ^ x p ρ v U ^ + ξ ^ y p ρ w U ^ + ξ ^ z p ( E + p ) U ^ − ξ ^ t p ] , G ^ = [ ρ V ^ ρ u V ^ + η ^ x p ρ v V ^ + η ^ y p ρ w V ^ + η ^ z p ( E + p ) V ^ − η ^ t p ] , H ^ = [ ρ W ^ ρ u W ^ + ζ ^ x p ρ v W ^ + ζ ^ y p ρ w W ^ + ζ ^ z p ( E + p ) W ^ − ζ ^ t p ] . (2) \hat{\mathbf{F}}=
\begin{bmatrix}
\rho\hat{U}\\
\rho u\hat{U}+\hat{\xi}_{x}p\\
\rho v\hat{U}+\hat{\xi}_{y}p\\
\rho w\hat{U}+\hat{\xi}_{z}p\\
(E+p)\hat{U}-\hat{\xi}_{t}p
\end{bmatrix},
\qquad
\hat{\mathbf{G}}=
\begin{bmatrix}
\rho\hat{V}\\
\rho u\hat{V}+\hat{\eta}_{x}p\\
\rho v\hat{V}+\hat{\eta}_{y}p\\
\rho w\hat{V}+\hat{\eta}_{z}p\\
(E+p)\hat{V}-\hat{\eta}_{t}p
\end{bmatrix},
\qquad
\hat{\mathbf{H}}=
\begin{bmatrix}
\rho\hat{W}\\
\rho u\hat{W}+\hat{\zeta}_{x}p\\
\rho v\hat{W}+\hat{\zeta}_{y}p\\
\rho w\hat{W}+\hat{\zeta}_{z}p\\
(E+p)\hat{W}-\hat{\zeta}_{t}p
\end{bmatrix}. \tag*{(2)} F ^ = ρ U ^ ρ u U ^ + ξ ^ x p ρ v U ^ + ξ ^ y p ρw U ^ + ξ ^ z p ( E + p ) U ^ − ξ ^ t p , G ^ = ρ V ^ ρ u V ^ + η ^ x p ρ v V ^ + η ^ y p ρw V ^ + η ^ z p ( E + p ) V ^ − η ^ t p , H ^ = ρ W ^ ρ u W ^ + ζ ^ x p ρ v W ^ + ζ ^ y p ρw W ^ + ζ ^ z p ( E + p ) W ^ − ζ ^ t p . (2)
F ^ v = [ 0 ξ ^ x τ x x + ξ ^ y τ x y + ξ ^ z τ x z ξ ^ x τ x y + ξ ^ y τ y y + ξ ^ z τ y z ξ ^ x τ x z + ξ ^ y τ y z + ξ ^ z τ z z ξ ^ x β x + ξ ^ y β y + ξ ^ z β z ] , G ^ v = [ 0 η ^ x τ x x + η ^ y τ x y + η ^ z τ x z η ^ x τ x y + η ^ y τ y y + η ^ z τ y z η ^ x τ x z + η ^ y τ y z + η ^ z τ z z η ^ x β x + η ^ y β y + η ^ z β z ] . (3) \hat{\mathbf{F}}_{\mathrm{v}}=
\begin{bmatrix}
0\\
\hat{\xi}_{x}\tau_{xx}+\hat{\xi}_{y}\tau_{xy}+\hat{\xi}_{z}\tau_{xz}\\
\hat{\xi}_{x}\tau_{xy}+\hat{\xi}_{y}\tau_{yy}+\hat{\xi}_{z}\tau_{yz}\\
\hat{\xi}_{x}\tau_{xz}+\hat{\xi}_{y}\tau_{yz}+\hat{\xi}_{z}\tau_{zz}\\
\hat{\xi}_{x}\beta_{x}+\hat{\xi}_{y}\beta_{y}+\hat{\xi}_{z}\beta_{z}
\end{bmatrix},
\qquad
\hat{\mathbf{G}}_{\mathrm{v}}=
\begin{bmatrix}
0\\
\hat{\eta}_{x}\tau_{xx}+\hat{\eta}_{y}\tau_{xy}+\hat{\eta}_{z}\tau_{xz}\\
\hat{\eta}_{x}\tau_{xy}+\hat{\eta}_{y}\tau_{yy}+\hat{\eta}_{z}\tau_{yz}\\
\hat{\eta}_{x}\tau_{xz}+\hat{\eta}_{y}\tau_{yz}+\hat{\eta}_{z}\tau_{zz}\\
\hat{\eta}_{x}\beta_{x}+\hat{\eta}_{y}\beta_{y}+\hat{\eta}_{z}\beta_{z}
\end{bmatrix}. \tag*{(3)} F ^ v = 0 ξ ^ x τ xx + ξ ^ y τ x y + ξ ^ z τ x z ξ ^ x τ x y + ξ ^ y τ y y + ξ ^ z τ y z ξ ^ x τ x z + ξ ^ y τ y z + ξ ^ z τ z z ξ ^ x β x + ξ ^ y β y + ξ ^ z β z , G ^ v = 0 η ^ x τ xx + η ^ y τ x y + η ^ z τ x z η ^ x τ x y + η ^ y τ y y + η ^ z τ y z η ^ x τ x z + η ^ y τ y z + η ^ z τ z z η ^ x β x + η ^ y β y + η ^ z β z . (3)
H ^ v = [ 0 ζ ^ x τ x x + ζ ^ y τ x y + ζ ^ z τ x z ζ ^ x τ x y + ζ ^ y τ y y + ζ ^ z τ y z ζ ^ x τ x z + ζ ^ y τ y z + ζ ^ z τ z z ζ ^ x β x + ζ ^ y β y + ζ ^ z β z ] . (4) \hat{\mathbf{H}}_{\mathrm{v}}=
\begin{bmatrix}
0\\
\hat{\zeta}_{x}\tau_{xx}+\hat{\zeta}_{y}\tau_{xy}+\hat{\zeta}_{z}\tau_{xz}\\
\hat{\zeta}_{x}\tau_{xy}+\hat{\zeta}_{y}\tau_{yy}+\hat{\zeta}_{z}\tau_{yz}\\
\hat{\zeta}_{x}\tau_{xz}+\hat{\zeta}_{y}\tau_{yz}+\hat{\zeta}_{z}\tau_{zz}\\
\hat{\zeta}_{x}\beta_{x}+\hat{\zeta}_{y}\beta_{y}+\hat{\zeta}_{z}\beta_{z}
\end{bmatrix}. \tag*{(4)} H ^ v = 0 ζ ^ x τ xx + ζ ^ y τ x y + ζ ^ z τ x z ζ ^ x τ x y + ζ ^ y τ y y + ζ ^ z τ y z ζ ^ x τ x z + ζ ^ y τ y z + ζ ^ z τ z z ζ ^ x β x + ζ ^ y β y + ζ ^ z β z . (4)
The quantity ‘J J J ’ here represents the Jacobian of grid transformation. The metric terms in the inviscid and viscous flux terms in Eqns. (2,3) with a hat (⋅ ^ \hat{\cdot} ⋅ ^ ) denote Jacobian normalized quantities (e.g. ξ ^ x = ξ x / J \hat{\xi}_{x}=\xi_{x}/J ξ ^ x = ξ x / J ).
The contravariant velocities U ^ \hat{U} U ^ , V ^ \hat{V} V ^ , and W ^ \hat{W} W ^ are,
U ^ = ξ ^ t + ξ ^ x u + ξ ^ y v + ξ ^ z w , V ^ = η ^ t + η ^ x u + η ^ y v + η ^ z w , W ^ = ζ ^ t + ζ ^ x u + ζ ^ y v + ζ ^ z w (5) \hat{U}=\hat{\xi}_{t}+\hat{\xi}_{x}u+\hat{\xi}_{y}v+\hat{\xi}_{z}w,\qquad
\hat{V}=\hat{\eta}_{t}+\hat{\eta}_{x}u+\hat{\eta}_{y}v+\hat{\eta}_{z}w,\qquad
\hat{W}=\hat{\zeta}_{t}+\hat{\zeta}_{x}u+\hat{\zeta}_{y}v+\hat{\zeta}_{z}w \tag*{(5)} U ^ = ξ ^ t + ξ ^ x u + ξ ^ y v + ξ ^ z w , V ^ = η ^ t + η ^ x u + η ^ y v + η ^ z w , W ^ = ζ ^ t + ζ ^ x u + ζ ^ y v + ζ ^ z w (5)
The energy per unit volume E E E is,
E = p γ − 1 + 1 2 ρ ( u 2 + v 2 + w 2 ) (6) E=\frac{p}{\gamma-1}+\frac{1}{2}\rho\left(u^{2}+v^{2}+w^{2}\right) \tag*{(6)} E = γ − 1 p + 2 1 ρ ( u 2 + v 2 + w 2 ) (6)
For stationary meshes, the computation of the terms ξ ^ t \hat{\xi}_{t} ξ ^ t , η ^ t \hat{\eta}_{t} η ^ t , and ζ ^ t \hat{\zeta}_{t} ζ ^ t can be skipped as they are zero. The viscous and thermal stress related terms in the equations are defined as,
τ x x = λ ∇ ⋅ u ˉ + 2 μ ∂ u ∂ x , τ y y = λ ∇ ⋅ u ˉ + 2 μ ∂ v ∂ y , τ z z = λ ∇ ⋅ u ˉ + 2 μ ∂ w ∂ z , (7) \tau_{xx}=\lambda\nabla\cdot\bar{u}+2\mu\frac{\partial u}{\partial x},\qquad
\tau_{yy}=\lambda\nabla\cdot\bar{u}+2\mu\frac{\partial v}{\partial y},\qquad
\tau_{zz}=\lambda\nabla\cdot\bar{u}+2\mu\frac{\partial w}{\partial z}, \tag*{(7)} τ xx = λ ∇ ⋅ u ˉ + 2 μ ∂ x ∂ u , τ y y = λ ∇ ⋅ u ˉ + 2 μ ∂ y ∂ v , τ z z = λ ∇ ⋅ u ˉ + 2 μ ∂ z ∂ w , (7)
τ x y = τ y x = μ ( ∂ u ∂ y + ∂ v ∂ x ) , τ x z = τ z x = μ ( ∂ u ∂ z + ∂ w ∂ x ) , τ y z = τ z y = μ ( ∂ v ∂ z + ∂ w ∂ y ) (8) \tau_{xy}=\tau_{yx}=\mu\left(\frac{\partial u}{\partial y}+\frac{\partial v}{\partial x}\right),\qquad
\tau_{xz}=\tau_{zx}=\mu\left(\frac{\partial u}{\partial z}+\frac{\partial w}{\partial x}\right),\qquad
\tau_{yz}=\tau_{zy}=\mu\left(\frac{\partial v}{\partial z}+\frac{\partial w}{\partial y}\right) \tag*{(8)} τ x y = τ y x = μ ( ∂ y ∂ u + ∂ x ∂ v ) , τ x z = τ z x = μ ( ∂ z ∂ u + ∂ x ∂ w ) , τ y z = τ z y = μ ( ∂ z ∂ v + ∂ y ∂ w ) (8)
β x = u τ x x + v τ x y + w τ x z + κ t ∂ T ∂ x , β y = u τ y x + v τ y y + w τ y z + κ t ∂ T ∂ y , β z = u τ z x + v τ z y + w τ z z + κ t ∂ T ∂ z (9) \beta_x = u\tau_{xx} + v\tau_{xy} + w\tau_{xz} + \kappa_t \frac{\partial T}{\partial x}, \qquad\beta_y = u\tau_{yx} + v\tau_{yy} + w\tau_{yz} + \kappa_t \frac{\partial T}{\partial y}, \qquad\beta_z = u\tau_{zx} + v\tau_{zy} + w\tau_{zz} + \kappa_t \frac{\partial T}{\partial z} \tag*{(9)} β x = u τ xx + v τ x y + w τ x z + κ t ∂ x ∂ T , β y = u τ y x + v τ y y + w τ y z + κ t ∂ y ∂ T , β z = u τ z x + v τ z y + w τ z z + κ t ∂ z ∂ T (9)
Where u ˉ \bar{u} u ˉ in the normal stress terms denotes the velocity vector. The thermodynamic equation of state p = ρ R T p = \rho RT p = ρR T is used to close the governing equations. μ \mu μ and κ t \kappa_t κ t denote the fluid’s dynamic viscosity and thermal conductivity, respectively, which are temperature-dependent properties. The dynamic viscosity is computed using Sutherland’s law [44 ] while thermal conductivity is calculated using the Prandtl number (P r Pr P r ) and dynamic viscosity. Additionally, bulk viscosity λ = − 2 3 μ \lambda= -\frac{2}{3}\mu λ = − 3 2 μ is incorporated into the normal stress terms τ x x \tau_{xx} τ xx , τ y y \tau_{yy} τ y y , and τ z z \tau_{zz} τ z z based on Stokes’ hypothesis. The values of γ \gamma γ and P r Pr P r are set to 1.4 and 0.71, respectively, for air as the working fluid. Although the governing equations are presented in their dimensional form here, they are solved in their non-dimensional form to facilitate problem parameterization and minimize computational errors. The ambient speed of sound, density, temperature, viscosity, and nozzle exit diameter are used as reference quantities for scaling the flow variables.
Review of conservative finite difference framework, and an overview of the algorithm
The current work employs MEG6, MIG4, and α \alpha α -damping schemes [1 ] , which use a conservative finite difference approach to discretize the spatial derivative terms. Like most numerical schemes, these schemes are derived based on uniform stencils. Applying these schemes to non-uniform stencils (in curved/stretched grids) requires a recast of the Cartesian form of governing equations into generalized curvilinear coordinates form. The transformed equations are presented in § 2 . Such a coordinate transformation allows non-uniform skewed input cells of the mesh to be re-stretched into uniform cubical cells in the computational space, as shown in Figure 1 (a). Based on this idea, MEG6, MIG4, and α \alpha α -damping schemes are implemented in the solver to compute flow fields over non-uniform meshes.
Figure 1. (a) A 3-dimensional grid cell before and after coordinate transformation, (b) A two-dimensional ξ − η \xi-\eta ξ − η plane of the computational domain depicting, cell centers, interface centers (located at the centroid of cell interface), and interface fluxes.
The association between grid, solution, and conservative fluxes is as follows. The input mesh consists of hexahedral cells, identified by the coordinates of cell vertices provided in the grid file. A schematic of the two-dimensional solution domain in transformed coordinates is depicted in Figure 1 (b). The figure shows cell centers, interface centers (half locations), and fluxes. The solution Q \mathbf{Q} Q (conservative variables) is stored at the cell centers, which are located by the centroid of corresponding cell vertices. On the other hand, inviscid and diffusion fluxes (F i + 1 2 \mathbf{F}_{i+\frac{1}{2}} F i + 2 1 , G i + 1 2 \mathbf{G}_{i+\frac{1}{2}} G i + 2 1 etc.) are computed at cell-interface centers to preserve conservation. The current paper also refers to these interface centers as half locations. After computing the inviscid and diffusion fluxes at all six half locations corresponding to the cell, the right-hand-side (RHS) residual corresponding to that cell denoted by R e s i , j , k \mathbf{Res}_{i,j,k} Res i , j , k is computed as follows:
∂ ∂ t ( Q J ) = R e s i , j , k = − ∂ ( F ^ − F ^ v ) ∂ ξ − ∂ ( G ^ − G ^ v ) ∂ η − ∂ ( H ^ − H ^ v ) ∂ ζ (10) \frac{\partial}{\partial t}\left(\frac{\mathbf{Q}}{J}\right)=\mathbf{Res}_{i,j,k}=-\frac{\partial\left(\widehat{\mathbf{F}}-\widehat{\mathbf{F}}^{v}\right)}{\partial\xi}-\frac{\partial\left(\widehat{\mathbf{G}}-\widehat{\mathbf{G}}^{v}\right)}{\partial\eta}-\frac{\partial\left(\widehat{\mathbf{H}}-\widehat{\mathbf{H}}^{v}\right)}{\partial\zeta} \tag*{(10)} ∂ t ∂ ( J Q ) = Res i , j , k = − ∂ ξ ∂ ( F − F v ) − ∂ η ∂ ( G − G v ) − ∂ ζ ∂ ( H − H v ) (10)
∂ ( F ^ − F ^ v ) ∂ ξ = 1 Δ ξ [ ( F ^ i + 1 2 , j , k − F ^ i − 1 2 , j , k ) − ( F ^ i + 1 2 , j , k v − F ^ i − 1 2 , j , k v ) ] ∂ ( G ^ − G ^ v ) ∂ η = 1 Δ η [ ( G ^ i , j + 1 2 , k − G ^ i , j − 1 2 , k ) − ( G ^ i , j + 1 2 , k v − G ^ i , j − 1 2 , k v ) ] ∂ ( H ^ − H ^ v ) ∂ ζ = 1 Δ ζ [ ( H ^ i , j , k + 1 2 − H ^ i , j , k − 1 2 ) − ( H ^ i , j , k + 1 2 v − H ^ i , j , k − 1 2 v ) ] . (11) \begin{aligned}
\frac{\partial\left(\widehat{\mathbf{F}}-\widehat{\mathbf{F}}^{v}\right)}{\partial\xi}&=\frac{1}{\Delta\xi}\left[\left(\widehat{\mathbf{F}}_{i+\frac{1}{2},j,k}-\widehat{\mathbf{F}}_{i-\frac{1}{2},j,k}\right)-\left(\widehat{\mathbf{F}}^{v}_{i+\frac{1}{2},j,k}-\widehat{\mathbf{F}}^{v}_{i-\frac{1}{2},j,k}\right)\right]\\
\frac{\partial\left(\widehat{\mathbf{G}}-\widehat{\mathbf{G}}^{v}\right)}{\partial\eta}&=\frac{1}{\Delta\eta}\left[\left(\widehat{\mathbf{G}}_{i,j+\frac{1}{2},k}-\widehat{\mathbf{G}}_{i,j-\frac{1}{2},k}\right)-\left(\widehat{\mathbf{G}}^{v}_{i,j+\frac{1}{2},k}-\widehat{\mathbf{G}}^{v}_{i,j-\frac{1}{2},k}\right)\right]\\
\frac{\partial\left(\widehat{\mathbf{H}}-\widehat{\mathbf{H}}^{v}\right)}{\partial\zeta}&=\frac{1}{\Delta\zeta}\left[\left(\widehat{\mathbf{H}}_{i,j,k+\frac{1}{2}}-\widehat{\mathbf{H}}_{i,j,k-\frac{1}{2}}\right)-\left(\widehat{\mathbf{H}}^{v}_{i,j,k+\frac{1}{2}}-\widehat{\mathbf{H}}^{v}_{i,j,k-\frac{1}{2}}\right)\right]. \tag*{(11)}
\end{aligned} ∂ ξ ∂ ( F − F v ) ∂ η ∂ ( G − G v ) ∂ ζ ∂ ( H − H v ) = Δ ξ 1 [ ( F i + 2 1 , j , k − F i − 2 1 , j , k ) − ( F i + 2 1 , j , k v − F i − 2 1 , j , k v ) ] = Δ η 1 [ ( G i , j + 2 1 , k − G i , j − 2 1 , k ) − ( G i , j + 2 1 , k v − G i , j − 2 1 , k v ) ] = Δ ζ 1 [ ( H i , j , k + 2 1 − H i , j , k − 2 1 ) − ( H i , j , k + 2 1 v − H i , j , k − 2 1 v ) ] . (11)
The above formulation is conservative throughout the computational domain since the residuals are computed based on fluxes at cell interfaces (half-locations). Even though the fluxes are estimated at the cell interfaces, the process involved in computing these fluxes (F ^ \widehat{\mathbf{F}} F , G ^ \widehat{\mathbf{G}} G , H ^ \widehat{\mathbf{H}} H , F ^ v \widehat{\mathbf{F}}^{v} F v , G ^ v \widehat{\mathbf{G}}^{v} G v , H ^ v \widehat{\mathbf{H}}^{v} H v ) only requires the cell-center solution information and uses finite difference approximations for reconstruction. Hence the approach is classified as a conservative finite difference approach.
Figure 2 shows a flow chart view of key stages involved in the algorithm. The program starts with pre-processing steps and ends with post-processing. Before entering into the main time-loop, the necessary information required to execute the main time-loop is transferred to GPU memory, which will remain and update there without any communication with the CPU until the simulation ends at time t e n d t_{end} t e n d . This allows the computationally expensive parts of the program such as reconstruction, Riemann solvers, viscous fluxes, residuals, and time integration to be executed solely on GPUs. More details about the parallelization model employed and the achieved performance increase will be discussed in § 9 .
Figure 2. Flow chart of solver algorithm. The stages outlined in the green boxes are executed fully on the GPU.
One of the key features of the present Navier-Stokes algorithm is gradient sharing. The gradients of primitive variables are utilized in multiple stages of the algorithm, enhancing efficiency and solution accuracy. This includes the use of gradients in inviscid fluxes (via gradient-based reconstruction - § 5.1 ) and viscous flux discretization (via α \alpha α -damping approach - Sec. 5.2), as well as the improvement of shock-capturing through the improved MP-limiter. Additionally, the gradients of primitive variables are used in post-processing calculations such as enstrophy, vorticity, density gradient magnitudes, Q-criterion, and others. As a result, the approach is efficient and produces relatively accurate and well resolved flow solutions.
Metric terms
Metric terms at cell centers and half locations
Since the current framework stores the solution at cell centers and fluxes at half locations, the solver requires metric terms at both these locations. The metrics belonging to cell centers are used in the following stages of the algorithm:
To impose boundary conditions (§ 6 )
While computing the time-step based on the inviscid and viscous CFL condition (Section Appendix B)
For computing cell-interface metrics (§ 7 )
While computing post-processing quantities such as enstrophy, vorticity, etc.
On the other hand, the metrics corresponding to half locations ( i + 1 2 , j + 1 2 , k + 1 2 ) (i+\frac{1}{2},j+\frac{1}{2},k+\frac{1}{2}) ( i + 2 1 , j + 2 1 , k + 2 1 ) are used during the following stages of the algorithm:
While transforming primitive variables in to characteristic space (to be discussed in § 5.1 )
The approximate Riemann solver (§ 5.1.1 )
While computing viscous fluxes (Section 5.2)
The half location metrics required in the above mentioned steps are interpolated from cell-centered metrics employing the same scheme as that of the reconstruction scheme used for inviscid flux computation (§ 5.1 ) in order to satisfy the geometric conservation law. A detailed description of the interpolation formula and it’s effect on the flow simulations will be discussed in § 7 . Firstly, the formulations employed to compute cell-centered metrics will be presented.
Conservative metrics for cell centered grid
The following conservative form of grid metrics given by Thomas and Lombard [25 ] were used in this work to satisfy the Geometric Conservation Law (GCL).
ξ ^ x = ( y η z ) ζ − ( y ζ z ) η , ξ ^ y = ( z η x ) ζ − ( z ζ x ) η , ξ ^ z = ( x η y ) ζ − ( x ζ y ) η , η ^ x = ( y ζ z ) ξ − ( y ξ z ) ζ , η ^ y = ( z ζ x ) ξ − ( z ξ x ) ζ , η ^ z = ( x ζ y ) ξ − ( x ξ y ) ζ , ζ ^ x = ( y ξ z ) η − ( y η z ) ξ , ζ ^ y = ( z ξ x ) η − ( z η x ) ξ , ζ ^ z = ( x ξ y ) η − ( x η y ) ξ . (12) \begin{aligned}
\hat{\xi}_x &= (y_\eta z)_\zeta-(y_\zeta z)_\eta,\qquad\hat{\xi}_y=(z_\eta x)_\zeta-(z_\zeta x)_\eta,\qquad\hat{\xi}_z=(x_\eta y)_\zeta-(x_\zeta y)_\eta,\\
\hat{\eta}_x &= (y_\zeta z)_\xi-(y_\xi z)_\zeta,\qquad\hat{\eta}_y=(z_\zeta x)_\xi-(z_\xi x)_\zeta,\qquad\hat{\eta}_z=(x_\zeta y)_\xi-(x_\xi y)_\zeta,\\
\hat{\zeta}_x &= (y_\xi z)_\eta-(y_\eta z)_\xi,\qquad\hat{\zeta}_y=(z_\xi x)_\eta-(z_\eta x)_\xi,\qquad\hat{\zeta}_z=(x_\xi y)_\eta-(x_\eta y)_\xi. \tag*{(12)}
\end{aligned} ξ ^ x η ^ x ζ ^ x = ( y η z ) ζ − ( y ζ z ) η , ξ ^ y = ( z η x ) ζ − ( z ζ x ) η , ξ ^ z = ( x η y ) ζ − ( x ζ y ) η , = ( y ζ z ) ξ − ( y ξ z ) ζ , η ^ y = ( z ζ x ) ξ − ( z ξ x ) ζ , η ^ z = ( x ζ y ) ξ − ( x ξ y ) ζ , = ( y ξ z ) η − ( y η z ) ξ , ζ ^ y = ( z ξ x ) η − ( z η x ) ξ , ζ ^ z = ( x ξ y ) η − ( x η y ) ξ . (12)
By satisfying GCL, metric cancellation errors corresponding to the grid transformation are reduced to machine zero, thus achieving freestream and vortex preservation properties. Ensuring freestream preservation is particularly important while studying flows involving features such as transition, aero-acoustic feedback mechanisms, etc., which are significantly affected by the non-preserved freestream errors. While the metric terms in Eqn. (12) are only computed once per simulation for stationary grid cases, they are re-computed after each time-step for dynamic meshes. The chain rule is used to evaluate the temporal metric terms as follows,
ξ t = − ( x t ξ x + y t ξ y + z t ξ z ) , η t = − ( x t η x + y t η y + z t η z ) , ζ t = − ( x t ζ x + y t ζ y + z t ζ z ) . (13) \xi_t=-(x_t\xi_x+y_t\xi_y+z_t\xi_z),\qquad\eta_t=-(x_t\eta_x+y_t\eta_y+z_t\eta_z),\qquad\zeta_t=-(x_t\zeta_x+y_t\zeta_y+z_t\zeta_z). \tag*{(13)} ξ t = − ( x t ξ x + y t ξ y + z t ξ z ) , η t = − ( x t η x + y t η y + z t η z ) , ζ t = − ( x t ζ x + y t ζ y + z t ζ z ) . (13)
The grid velocities x t x_t x t , y t y_t y t , and z t z_t z t could be either predetermined analytically or can also be estimated numerically on the fly as the grid deforms and changes with time. In the current work the test case considered uses predetermined analytical values for x t x_t x t , y t y_t y t , and z t z_t z t . For more details on the use of numerically estimated grid velocities and the associated errors, the reader is referred to Ref. [24 ] .
The time derivative term in Eqn. (1) , is split as follows,
∂ ∂ t ( Q J ) = 1 J ∂ Q ∂ t + ( 1 J ) t Q (14) \frac{\partial}{\partial t}\left(\frac{\mathbf{Q}}{J}\right)=\frac{1}{J}\frac{\partial\mathbf{Q}}{\partial t}+\left(\frac{1}{J}\right)_t\mathbf{Q} \tag*{(14)} ∂ t ∂ ( J Q ) = J 1 ∂ t ∂ Q + ( J 1 ) t Q (14)
The first term 1 / J 1/J 1/ J on the right hand side is the instantaneous Jacobian computed based on instantaneous grid cell positions as follows.
1 J = ∣ x ξ y ξ z ξ x η y η z η x ζ y ζ z ζ ∣ (15) \frac{1}{J}=
\begin{vmatrix}
x_{\xi} & y_{\xi} & z_{\xi}\\
x_{\eta} & y_{\eta} & z_{\eta}\\
x_{\zeta} & y_{\zeta} & z_{\zeta}
\end{vmatrix} \tag*{(15)} J 1 = x ξ x η x ζ y ξ y η y ζ z ξ z η z ζ (15)
The second term with ( 1 J ) t \left(\frac{1}{J}\right)_t ( J 1 ) t is only relevant to the dynamically changing meshes and is computed in accordance with GCL as follows,
( 1 J ) t = − [ ( ξ t ) ξ + ( η t ) η + ( ζ t ) ζ ] (16) \left(\frac{1}{J}\right)_t=-\left[(\xi_t)_{\xi}+(\eta_t)_{\eta}+(\zeta_t)_{\zeta}\right] \tag*{(16)} ( J 1 ) t = − [ ( ξ t ) ξ + ( η t ) η + ( ζ t ) ζ ] (16)
Discretization
In this section the discretization approaches used to compute inviscid and viscous fluxes are detailed. The MEG6/MIG4 algorithm of Chamarthi [1 ] , the HLLC Riemann solver, and the α \alpha α -damping approach are explained in the context of generalized curvilinear coordinates with applicability to both stationary and moving grids.
Inviscid flux discretization - MEG6 and MIG4 schemes
Monotonocity preserving Explicit sixth order Gradient scheme (MEG6) and the Monotonocity Preserving Implicit 4th order Gradient scheme (MIG4) proposed by Chamarthi [1 ] are a class of gradient-based algorithms to discretize inviscid flux terms in the compressible Navier-Stokes equations. They are primarily driven by the gradients of primitive variables (P ξ P_{\xi} P ξ , P η P_{\eta} P η , and P ζ P_{\zeta} P ζ ) and the Monotonicity Preserving limiter of Suresh and Huynh [15 ] for shock capturing. For interpolating the variables to the half locations, the following general form containing the functional values and their corresponding first and second derivatives at cell centers is employed [45 ] :
ϕ ( ξ ) = ϕ i + ( ∂ ϕ ∂ ξ ) i ( ξ − ξ i ) + 3 κ ( ∂ 2 ϕ ∂ ξ 2 ) i [ ( ξ − ξ i ) 2 − Δ ξ 2 12 ] for ξ i − 1 2 ≤ ξ ≤ ξ i + 1 2 (17) \phi(\xi)=\phi_i+\left(\frac{\partial\phi}{\partial\xi}\right)_i(\xi-\xi_i)+3\kappa\left(\frac{\partial^2\phi}{\partial\xi^2}\right)_i\left[(\xi-\xi_i)^2-\frac{\Delta\xi^2}{12}\right]\qquad\text{for }\xi_{i-\frac{1}{2}}\leq\xi\leq\xi_{i+\frac{1}{2}} \tag*{(17)} ϕ ( ξ ) = ϕ i + ( ∂ ξ ∂ ϕ ) i ( ξ − ξ i ) + 3 κ ( ∂ ξ 2 ∂ 2 ϕ ) i [ ( ξ − ξ i ) 2 − 12 Δ ξ 2 ] for ξ i − 2 1 ≤ ξ ≤ ξ i + 2 1 (17)
where ϕ \phi ϕ is the variable of interest to be interpolated and κ = 1 3 \kappa=\frac{1}{3} κ = 3 1 [45 ] . Since the above formulation contains functional values and its derivatives that are belonging to location i i i , by substituting ξ = ± Δ ξ 2 \xi=\pm\frac{\Delta\xi}{2} ξ = ± 2 Δ ξ the left (L L L ) and right (R R R ) biased interpolation formulae for ϕ \phi ϕ at locations i + 1 2 i+\frac{1}{2} i + 2 1 and i − 1 2 i-\frac{1}{2} i − 2 1 are obtained. Simplifying the resulting equations with Δ ξ = 1 \Delta\xi=1 Δ ξ = 1 (since unit grid spacing convention is followed for transformed coordinates) yields the following left and right biased states of ϕ \phi ϕ at i + 1 2 i+\frac{1}{2} i + 2 1 location.
ϕ i + 1 2 L = ϕ i + 1 2 ( ∂ ϕ ∂ ξ ) i + 1 12 ( ∂ 2 ϕ ∂ ξ 2 ) i \phi_{i+\frac{1}{2}}^{L}=\phi_i+\frac{1}{2}\left(\frac{\partial\phi}{\partial\xi}\right)_i+\frac{1}{12}\left(\frac{\partial^2\phi}{\partial\xi^2}\right)_i ϕ i + 2 1 L = ϕ i + 2 1 ( ∂ ξ ∂ ϕ ) i + 12 1 ( ∂ ξ 2 ∂ 2 ϕ ) i
ϕ i + 1 2 R = ϕ i + 1 − 1 2 ( ∂ ϕ ∂ ξ ) i + 1 + 1 12 ( ∂ 2 ϕ ∂ ξ 2 ) i + 1 (18) \phi_{i+\frac{1}{2}}^{R}=\phi_{i+1}-\frac{1}{2}\left(\frac{\partial\phi}{\partial\xi}\right)_{i+1}+\frac{1}{12}\left(\frac{\partial^2\phi}{\partial\xi^2}\right)_{i+1} \tag*{(18)} ϕ i + 2 1 R = ϕ i + 1 − 2 1 ( ∂ ξ ∂ ϕ ) i + 1 + 12 1 ( ∂ ξ 2 ∂ 2 ϕ ) i + 1 (18)
The above two polynomials are used to reconstruct the variables in MEG6 and MIG4 schemes. The two methods MEG6 and MIG4 differ from each other only in the scheme that is used to compute the derivatives of primitive variables present in the above equations (Eqn. 16); the rest of the algorithm (which will be detailed soon) remains the same. Despite the different gradients employed, both MEG6 and MIG4 schemes yield fourth-order accurate estimates of inviscid flux derivatives ∂ F ^ ∂ ξ \frac{\partial\hat{F}}{\partial\xi} ∂ ξ ∂ F ^ , ∂ G ^ ∂ η \frac{\partial\hat{G}}{\partial\eta} ∂ η ∂ G ^ , and ∂ H ^ ∂ ζ \frac{\partial\hat{H}}{\partial\zeta} ∂ ζ ∂ H ^ . The theoretical details regarding order of accuracy can be found in Ref. [1 ] . The schemes however differ in their dispersion and dissipation properties. Readers are referred to Fig. 3 of Ref. [1 ] which shows the spectral properties of MEG6 and MIG4 schemes in comparison with other well known discretization approaches.
Figure 3 depicts a flow chart view of different steps in computing the inviscid flux residual at half locations. A detailed step-by-step procedure is shown. For simplicity, the procedure is described for F i + 1 2 \mathbf{F}_{i+\frac{1}{2}} F i + 2 1 fluxes only. Extending the same to other directions is straightforward. Also, for the sake of simplicity the ‘j j j ’ and ‘k k k ’ subscripts corresponding to η \eta η and ζ \zeta ζ directions are omitted in all the expressions to be presented now; the formulations remain the same and are independent of ‘j j j ’ and ‘k k k ’ indices.
Figure 3. Various stages while estimating inviscid flux residual using the MEG/MIG schemes.
Step-1, Compute gradients: Compute first and second gradients of primitive variables P = [ ρ , u , v , w , p ] T \mathbf{P} = [\rho, u, v, w, p]^T P = [ ρ , u , v , w , p ] T at cell centers in the computational coordinate system using the following expressions:
For MEG6:
( ∂ u ∂ ξ ) i = 3 4 ( u i + 1 + u i − 1 ) − 3 20 ( u i + 2 + u i − 2 ) + 1 60 ( u i + 3 + u i − 3 ) (19) \left(\frac{\partial u}{\partial\xi}\right)_i = \frac{3}{4}(u_{i+1}+u_{i-1})-\frac{3}{20}(u_{i+2}+u_{i-2})+\frac{1}{60}(u_{i+3}+u_{i-3}) \tag*{(19)} ( ∂ ξ ∂ u ) i = 4 3 ( u i + 1 + u i − 1 ) − 20 3 ( u i + 2 + u i − 2 ) + 60 1 ( u i + 3 + u i − 3 ) (19)
For MIG4:
α ( ∂ u ∂ ξ ) i − 1 + ( ∂ u ∂ ξ ) i + α ( ∂ u ∂ ξ ) i + 1 = 2 ( 2 + α ) 6 ( u i + 1 + u i − 1 ) + − 1 + 4 α 12 ( u i + 2 + u i − 2 ) (20) \alpha\left(\frac{\partial u}{\partial\xi}\right)_{i-1}+\left(\frac{\partial u}{\partial\xi}\right)_i+\alpha\left(\frac{\partial u}{\partial\xi}\right)_{i+1}=\frac{2(2+\alpha)}{6}(u_{i+1}+u_{i-1})+\frac{-1+4\alpha}{12}(u_{i+2}+u_{i-2}) \tag*{(20)} α ( ∂ ξ ∂ u ) i − 1 + ( ∂ ξ ∂ u ) i + α ( ∂ ξ ∂ u ) i + 1 = 6 2 ( 2 + α ) ( u i + 1 + u i − 1 ) + 12 − 1 + 4 α ( u i + 2 + u i − 2 ) (20)
For both MEG6 and MIG4:
( ∂ 2 u ∂ ξ 2 ) i = 2 ( u ^ i + 1 − 2 u ^ i + u ^ i − 1 ) − 0.5 ( u i + 1 ′ − u i − 1 ′ ) (21) \left(\frac{\partial^2 u}{\partial\xi^2}\right)_i=2(\hat{u}_{i+1}-2\hat{u}_i+\hat{u}_{i-1})-0.5\left(u'_{i+1}-u'_{i-1}\right) \tag*{(21)} ( ∂ ξ 2 ∂ 2 u ) i = 2 ( u ^ i + 1 − 2 u ^ i + u ^ i − 1 ) − 0.5 ( u i + 1 ′ − u i − 1 ′ ) (21)
α = 5 14 \alpha=\frac{5}{14} α = 14 5 is considered for the implicit scheme in Eqn.18. The above mentioned explicit sixth-order (E6) gradients are used for the MEG6 scheme, and implicit gradients of fourth-order (IG4) are used for the MIG4 scheme.
Step-2, Perform characteristic transformation: The cell center primitive variables P = [ ρ , u , v , w , p ] T \mathbf{P} = [\rho, u, v, w, p]^T P = [ ρ , u , v , w , p ] T , their first derivatives, ∂ P ∂ ξ \frac{\partial\mathbf{P}}{\partial\xi} ∂ ξ ∂ P and second derivatives, ∂ 2 P ∂ ξ 2 \frac{\partial^2 \mathbf{P}}{\partial\xi^2} ∂ ξ 2 ∂ 2 P are transformed into characteristic space W \mathbf{W} W , ∂ W ∂ ξ \frac{\partial\mathbf{W}}{\partial\xi} ∂ ξ ∂ W and, ∂ 2 W ∂ ξ 2 \frac{\partial^2 \mathbf{W}}{\partial\xi^2} ∂ ξ 2 ∂ 2 W by multiplying them with the left-eigenvectors of the flux Jacobian matrix, ∂ F ∂ P \frac{\partial\mathbf{F}}{\partial\mathbf{P}} ∂ P ∂ F , using the following relations Eqn. 20. Reconstructing the resulting characteristic variables will result in cleaner results without any oscillations near the discontinuities. This is since the Euler equations resemble linear wave equation in characteristic form for which the up-winding in the Riemann solver is designed for (will be discussed in Sec. 5.1.1).
W = R ‾ ξ − 1 P , ∂ W ∂ ξ = R ‾ ξ − 1 ∂ P ∂ ξ , and ∂ 2 W ∂ ξ 2 = R ‾ ξ − 1 ∂ 2 P ∂ ξ 2 (22) \mathbf{W}=\overline{\mathbf{R}}_{\xi}^{-1}\mathbf{P},\qquad\frac{\partial\mathbf{W}}{\partial\xi}=\overline{\mathbf{R}}_{\xi}^{-1}\frac{\partial\mathbf{P}}{\partial\xi},\qquad\text{and}\ \frac{\partial^{2}\mathbf{W}}{\partial\xi^{2}}=\overline{\mathbf{R}}_{\xi}^{-1}\frac{\partial^{2}\mathbf{P}}{\partial\xi^{2}} \tag*{(22)} W = R ξ − 1 P , ∂ ξ ∂ W = R ξ − 1 ∂ ξ ∂ P , and ∂ ξ 2 ∂ 2 W = R ξ − 1 ∂ ξ 2 ∂ 2 P (22)
The eigenvector matrices employed in these equations are provided in Appendix § 12 .
Step-3, Compute left and right biased states of W \mathbf{W} W : Evaluate the unlimited left and right biased states of characteristic variables at half locations employing Eqns. (18) . Figure 4 illustrates the location of these quantities on the interpolation stencil.
Figure 4. An illustration depicting left and right biased states of W W W on the grid stencil.
( W i + 1 / 2 L ) u n l i m i t e d = W i + 1 2 ( ∂ W ∂ ξ ) i + 1 12 ( ∂ 2 W ∂ ξ 2 ) i (23) \left(\mathbf{W}^{L}_{i+1/2}\right)_{unlimited}=\mathbf{W}_{i}+\frac{1}{2}\left(\frac{\partial\mathbf{W}}{\partial\xi}\right)_{i}+\frac{1}{12}\left(\frac{\partial^{2}\mathbf{W}}{\partial\xi^{2}}\right)_{i} \tag*{(23)} ( W i + 1/2 L ) u n l imi t e d = W i + 2 1 ( ∂ ξ ∂ W ) i + 12 1 ( ∂ ξ 2 ∂ 2 W ) i (23)
( W i + 1 / 2 R ) u n l i m i t e d = W i + 1 − 1 2 ( ∂ W ∂ ξ ) i + 1 + 1 12 ( ∂ 2 W ∂ ξ 2 ) i + 1 (24) \left(\mathbf{W}^{R}_{i+1/2}\right)_{unlimited}=\mathbf{W}_{i+1}-\frac{1}{2}\left(\frac{\partial\mathbf{W}}{\partial\xi}\right)_{i+1}+\frac{1}{12}\left(\frac{\partial^{2}\mathbf{W}}{\partial\xi^{2}}\right)_{i+1} \tag*{(24)} ( W i + 1/2 R ) u n l imi t e d = W i + 1 − 2 1 ( ∂ ξ ∂ W ) i + 1 + 12 1 ( ∂ ξ 2 ∂ 2 W ) i + 1 (24)
Step-4, Modify W i + 1 / 2 L , R \mathbf{W}^{L,R}_{i+1/2} W i + 1/2 L , R through limiting: An improved version of the Monotonicity Preserving fifth order limiting algorithm (MP5) [15 ] (see Appendix § 16 ) proposed in Ref. [1] is employed to check for discontinuities and limit the left and right reconstructed states of the characteristic variables ( W i + 1 / 2 L , R ) \left(\mathbf{W}^{L,R}_{i+1/2}\right) ( W i + 1/2 L , R ) . This step essentially captures flow discontinuities by limiting the interpolated unlimited value from the previous step and avoids unphysical oscillations. One of the key favourable attributes of the MP5 limiter is that it allows an effective capturing of shock and acoustic waves simultaneously compared to the WENO based strategies [46 ] . The limiting procedure is detailed in Appendix § 16 .
Step-5, Map characteristic variables back to primitive variables: The reconstructed left and right characteristic variable states computed in the previous step are now transformed back to primitive variables by multiplying them with the right-eigenvector matrices provided in Appendix § 12 .
( P L ) i + 1 / 2 = R ‾ ξ ( W i + 1 / 2 L ) l i m i t e d (25) \left(\mathbf{P}^{L}\right)_{i+1/2}=\overline{\mathbf{R}}_{\xi}\left(\mathbf{W}^{L}_{i+1/2}\right)_{limited} \tag*{(25)} ( P L ) i + 1/2 = R ξ ( W i + 1/2 L ) l imi t e d (25)
( P R ) i + 1 / 2 = R ‾ ξ ( W i + 1 / 2 R ) l i m i t e d (26) \left(\mathbf{P}^{R}\right)_{i+1/2}=\overline{\mathbf{R}}_{\xi}\left(\mathbf{W}^{R}_{i+1/2}\right)_{limited} \tag*{(26)} ( P R ) i + 1/2 = R ξ ( W i + 1/2 R ) l imi t e d (26)
Step-6, Compute interface fluxes: Now that the flow states on both sides of the interface are known, the mathematical setting at each i + 1 2 i+\frac{1}{2} i + 2 1 location reduces to a Riemann problem. In this step, the local one-dimensional Riemann problem is solved, and the resultant flux F i + 1 2 \mathbf{F}_{i+\frac{1}{2}} F i + 2 1 is estimated at each interface. The HLLC approximate riemann solver (Harten–Lax–van Leer with Contact restoration) [47 ] is employed to estimate the fluxes in the present work. As shown in Eqn. (27) , the only inputs required in order to compute the fluxes using the HLLC approach are the local left and right reconstructed states of the primitive variables and the interpolated metric terms at the i + 1 2 i+\frac{1}{2} i + 2 1 locations. The required relations to compute the fluxes via the HLLC Riemann solver in the context of curvilinear coordinates is provided in a dedicated section on Riemann solvers in § 5.1.1 .
F ^ i + 1 2 = f H L L C { P i + 1 2 L , P i + 1 2 R , ( ξ ^ t ) i + 1 2 , ( ξ ^ x ) i + 1 2 , ( ξ ^ y ) i + 1 2 , ( ξ ^ z ) i + 1 2 } (27) \widehat{F}_{i+\frac{1}{2}}=f_{\mathrm{HLLC}}\left\{P^{L}_{i+\frac{1}{2}},P^{R}_{i+\frac{1}{2}},(\widehat{\xi}_{t})_{i+\frac{1}{2}},(\widehat{\xi}_{x})_{i+\frac{1}{2}},(\widehat{\xi}_{y})_{i+\frac{1}{2}},(\widehat{\xi}_{z})_{i+\frac{1}{2}}\right\} \tag*{(27)} F i + 2 1 = f HLLC { P i + 2 1 L , P i + 2 1 R , ( ξ t ) i + 2 1 , ( ξ x ) i + 2 1 , ( ξ y ) i + 2 1 , ( ξ z ) i + 2 1 } (27)
Step-7, Compute residual: Using the interface fluxes estimated through the Riemann solver, the net flux entering into each cell is computed via Eqn. (28) . It should be noted that if the flow problem is linear in nature, the accuracy of this term theoretically yields fourth-order using both E6 and IG4 gradients in step-1 (Eqns. (19) and (20) ). More theoretical details including demonstrative tests regarding the order of accuracy can be found in [1 ] .
( ∂ F ∂ ξ ) i = F i + 1 2 − F i − 1 2 Δ ξ (28) \left(\frac{\partial F}{\partial\xi}\right)_{i}=\frac{F_{i+\frac{1}{2}}-F_{i-\frac{1}{2}}}{\Delta\xi} \tag*{(28)} ( ∂ ξ ∂ F ) i = Δ ξ F i + 2 1 − F i − 2 1 (28)
The HLLC Riemann solver
In this section, the HLLC Riemann solver is presented within the framework of curvilinear coordinates. The HLLC Riemann solver is a three-wave approximate solution that accounts for the presence of contact discontinuities. One of the notable advantages of the HLLC fluxes is their ability to minimize dissipation in comparison to other commonly used methods, such as HLL [48 ] and Rusanov [47 ] . As a result, HLLC is able to effectively resolve shocks, contact discontinuities, and shear layers. The inviscid flux F i + 1 2 F_{i+\frac{1}{2}} F i + 2 1 in the transformed coordinates through the HLLC approximate Riemann solver is obtained as follows:
F ^ i + 1 2 H L L C = { F ^ L if S ^ L ≥ 0 , F ^ ∗ L = F ^ L + S ^ L ( Q ∗ L − Q L ) if S ^ L ≤ 0 ≤ S ^ ∗ , F ^ ∗ R = F ^ R + S ^ R ( Q ∗ R − Q R ) if S ^ ∗ ≤ 0 ≤ S ^ R , F ^ R if S ^ R ≤ 0 (29) \widehat{F}^{\mathrm{HLLC}}_{i+\frac{1}{2}}=
\begin{cases}
\widehat{F}^{L} & \text{if }\widehat{S}^{L}\ge0,\\
\widehat{F}^{*L}=\widehat{F}^{L}+\widehat{S}^{L}\left(Q^{*L}-Q^{L}\right) & \text{if }\widehat{S}^{L}\le0\le\widehat{S}^{*},\\
\widehat{F}^{*R}=\widehat{F}^{R}+\widehat{S}^{R}\left(Q^{*R}-Q^{R}\right) & \text{if }\widehat{S}^{*}\le0\le\widehat{S}^{R},\\
\widehat{F}^{R} & \text{if }\widehat{S}^{R}\le0
\end{cases} \tag*{(29)} F i + 2 1 HLLC = ⎩ ⎨ ⎧ F L F ∗ L = F L + S L ( Q ∗ L − Q L ) F ∗ R = F R + S R ( Q ∗ R − Q R ) F R if S L ≥ 0 , if S L ≤ 0 ≤ S ∗ , if S ∗ ≤ 0 ≤ S R , if S R ≤ 0 (29)
The three wave speeds of the local one-dimensional problem are calculated as follows.
S ^ L = Min ( U ^ L − c L ξ ^ x 2 + ξ ^ y 2 + ξ ^ z 2 , U ^ R − c R ξ ^ x 2 + ξ ^ y 2 + ξ ^ z 2 ) \widehat{S}^{L}=\operatorname{Min}\left(\widehat{U}^{L}-c^{L}\sqrt{\widehat{\xi}_{x}^{2}+\widehat{\xi}_{y}^{2}+\widehat{\xi}_{z}^{2}},\widehat{U}^{R}-c^{R}\sqrt{\widehat{\xi}_{x}^{2}+\widehat{\xi}_{y}^{2}+\widehat{\xi}_{z}^{2}}\right) S L = Min ( U L − c L ξ x 2 + ξ y 2 + ξ z 2 , U R − c R ξ x 2 + ξ y 2 + ξ z 2 )
S ^ R = Max ( U ^ L + c L ξ ^ x 2 + ξ ^ y 2 + ξ ^ z 2 , U ^ R + c R ξ ^ x 2 + ξ ^ y 2 + ξ ^ z 2 ) \widehat{S}^{R}=\operatorname{Max}\left(\widehat{U}^{L}+c^{L}\sqrt{\widehat{\xi}_{x}^{2}+\widehat{\xi}_{y}^{2}+\widehat{\xi}_{z}^{2}},\widehat{U}^{R}+c^{R}\sqrt{\widehat{\xi}_{x}^{2}+\widehat{\xi}_{y}^{2}+\widehat{\xi}_{z}^{2}}\right) S R = Max ( U L + c L ξ x 2 + ξ y 2 + ξ z 2 , U R + c R ξ x 2 + ξ y 2 + ξ z 2 )
S ^ ∗ = ρ R U ^ R ( S ^ R − U ^ R ) − ρ L U ^ L ( S ^ L − U ^ L ) + ( P L − P R ) ( ξ ^ x 2 + ξ ^ y 2 + ξ ^ z 2 ) ρ R ( S ^ R − U ^ R ) − ρ L ( S ^ L − U ^ L ) \widehat{S}^{*}=
\frac{\rho^{R}\widehat{U}^{R}\left(\widehat{S}^{R}-\widehat{U}^{R}\right)-\rho^{L}\widehat{U}^{L}\left(\widehat{S}^{L}-\widehat{U}^{L}\right)+\left(P_{L}-P_{R}\right)\left(\widehat{\xi}_{x}^{2}+\widehat{\xi}_{y}^{2}+\widehat{\xi}_{z}^{2}\right)}
{\rho^{R}\left(\widehat{S}^{R}-\widehat{U}^{R}\right)-\rho^{L}\left(\widehat{S}^{L}-\widehat{U}^{L}\right)} S ∗ = ρ R ( S R − U R ) − ρ L ( S L − U L ) ρ R U R ( S R − U R ) − ρ L U L ( S L − U L ) + ( P L − P R ) ( ξ x 2 + ξ y 2 + ξ z 2 )
The conservative variables in the star region Q ∗ K Q^{*K} Q ∗ K for K = L , R K=L,R K = L , R are estimated as follows.
Q ∗ K = ρ K ( S ^ K − U ^ K S ^ K − S ^ ∗ ) [ 1 ξ ^ x ( S ^ ∗ − ξ ^ t ) + ( ξ ^ y 2 + ξ ^ z 2 ) u K − ξ ^ y ξ ^ x v K − ξ ^ z ξ ^ x w K ξ ^ x 2 + ξ ^ y 2 + ξ ^ z 2 ξ ^ y ( S ^ ∗ − ξ ^ t ) − ξ ^ x ξ ^ y u K + ( ξ ^ x 2 + ξ ^ z 2 ) v K − ξ ^ z ξ ^ y w K ξ ^ x 2 + ξ ^ y 2 + ξ ^ z 2 ξ ^ z ( S ^ ∗ − ξ ^ t ) − ξ ^ x ξ ^ z u K − ξ ^ y ξ ^ z v K + ( ξ ^ x 2 + ξ ^ y 2 ) w K ξ ^ x 2 + ξ ^ y 2 + ξ ^ z 2 E K ρ K + ( S ^ ∗ − U ^ K ) { S ^ ∗ − ξ ^ t ξ ^ x 2 + ξ ^ y 2 + ξ ^ z 2 + P K ρ K ( S ^ K − U ^ K ) } ] (30) Q^{*K}=\rho^{K}\left(\frac{\widehat{S}^{K}-\widehat{U}^{K}}{\widehat{S}^{K}-\widehat{S}^{*}}\right)
\begin{bmatrix}
1\\
\dfrac{\widehat{\xi}_{x}(\widehat{S}^{*}-\widehat{\xi}_{t})+(\widehat{\xi}_{y}^{2}+\widehat{\xi}_{z}^{2})u^{K}-\widehat{\xi}_{y}\widehat{\xi}_{x}v^{K}-\widehat{\xi}_{z}\widehat{\xi}_{x}w^{K}}{\widehat{\xi}_{x}^{2}+\widehat{\xi}_{y}^{2}+\widehat{\xi}_{z}^{2}}\\
\dfrac{\widehat{\xi}_{y}(\widehat{S}^{*}-\widehat{\xi}_{t})-\widehat{\xi}_{x}\widehat{\xi}_{y}u^{K}+(\widehat{\xi}_{x}^{2}+\widehat{\xi}_{z}^{2})v^{K}-\widehat{\xi}_{z}\widehat{\xi}_{y}w^{K}}{\widehat{\xi}_{x}^{2}+\widehat{\xi}_{y}^{2}+\widehat{\xi}_{z}^{2}}\\
\dfrac{\widehat{\xi}_{z}(\widehat{S}^{*}-\widehat{\xi}_{t})-\widehat{\xi}_{x}\widehat{\xi}_{z}u^{K}-\widehat{\xi}_{y}\widehat{\xi}_{z}v^{K}+(\widehat{\xi}_{x}^{2}+\widehat{\xi}_{y}^{2})w^{K}}{\widehat{\xi}_{x}^{2}+\widehat{\xi}_{y}^{2}+\widehat{\xi}_{z}^{2}}\\
\dfrac{E^{K}}{\rho^{K}}+\left(\widehat{S}^{*}-\widehat{U}^{K}\right)\left\{\frac{\widehat{S}^{*}-\widehat{\xi}_{t}}{\widehat{\xi}_{x}^{2}+\widehat{\xi}_{y}^{2}+\widehat{\xi}_{z}^{2}}+\frac{P^{K}}{\rho^{K}\left(\widehat{S}^{K}-\widehat{U}^{K}\right)}\right\}
\end{bmatrix} \tag*{(30)} Q ∗ K = ρ K ( S K − S ∗ S K − U K ) 1 ξ x 2 + ξ y 2 + ξ z 2 ξ x ( S ∗ − ξ t ) + ( ξ y 2 + ξ z 2 ) u K − ξ y ξ x v K − ξ z ξ x w K ξ x 2 + ξ y 2 + ξ z 2 ξ y ( S ∗ − ξ t ) − ξ x ξ y u K + ( ξ x 2 + ξ z 2 ) v K − ξ z ξ y w K ξ x 2 + ξ y 2 + ξ z 2 ξ z ( S ∗ − ξ t ) − ξ x ξ z u K − ξ y ξ z v K + ( ξ x 2 + ξ y 2 ) w K ρ K E K + ( S ∗ − U K ) { ξ x 2 + ξ y 2 + ξ z 2 S ∗ − ξ t + ρ K ( S K − U K ) P K } (30)
The i + 1 2 i+\frac{1}{2} i + 2 1 metrics involved in the above formulation are interpolated consistently with the inviscid flux discretization to prevent metric cancellation errors, which can accumulate in the flow solution. The corresponding interpolation formulae and demonstrative examples concerning metric cancellation errors and their effect on the flow solution will be discussed in § 7 . The above formulations only show the flux calculation in the ξ \xi ξ direction. Extending these formulae to other directions is straightforward. For instance,
G ^ i , j + 1 2 , k = f H L L C { P i , j + 1 2 , k L , P i , j + 1 2 , k R , ( η ^ t ) i , j + 1 2 , k , ( η ^ x ) i , j + 1 2 , k , ( η ^ y ) i , j + 1 2 , k , ( η ^ z ) i , j + 1 2 , k } . (31) \hat{\mathbf{G}}_{i,j+\frac{1}{2},k}=\mathbf{f}_{HLLC}\left\{\mathbf{P}^{L}_{i,j+\frac{1}{2},k},\mathbf{P}^{R}_{i,j+\frac{1}{2},k},(\hat{\eta}_{t})_{i,j+\frac{1}{2},k},(\hat{\eta}_{x})_{i,j+\frac{1}{2},k},(\hat{\eta}_{y})_{i,j+\frac{1}{2},k},(\hat{\eta}_{z})_{i,j+\frac{1}{2},k}\right\}. \tag*{(31)} G ^ i , j + 2 1 , k = f H LL C { P i , j + 2 1 , k L , P i , j + 2 1 , k R , ( η ^ t ) i , j + 2 1 , k , ( η ^ x ) i , j + 2 1 , k , ( η ^ y ) i , j + 2 1 , k , ( η ^ z ) i , j + 2 1 , k } . (31)
Viscous flux discretization - α \alpha α -damping scheme
Many viscous schemes such as those proposed in [24 , 49 ] are prone to odd-even decoupling and inaccurate spectral representation particularly in the high wave-number region. In the recent past, efforts have been made in the development of numerical algorithms to compute diffusion fluxes without odd-even decoupling and good spectral properties over a broader wavenumber range [22 , 23 , 50 ] . The current work employs the fourth order accurate version of viscous fluxes proposed by Chamarthi et al. [22 ] . The gradients required for the viscous fluxes are not re-computed here since they are already computed while estimating inviscid flux residuals (Eqns-(19) and (20) ). A step-by-step procedure to evaluate the interface viscous fluxes according to this algorithm in curvilinear coordinates is depicted in Figure 5 . For simplicity, the steps are described only for the ξ \xi ξ direction but the same can be extrapolated to other directions, as well.
Figure 5. Various stages involved in estimating the viscous flux residual using the α \alpha α -damping scheme. Applies for both E6 and IG4 gradients of P \mathcal{P} P , yielding 4th order accuracy for both [1 ] .
Step-1, Compute interface gradients: Interface gradients of P = [ u , v , w , T ] T \mathcal{P}=[u,v,w,T]^T P = [ u , v , w , T ] T in ξ \xi ξ η \eta η and ζ \zeta ζ directions are first computed using Eqn. (32) , where P \mathcal{P} P is a vector of variables required to evaluate the viscous fluxes. For simplicity, the equations are presented only for the variable u u u here. The same should be repeated for other variables of P \mathcal{P} P as well.
( ∂ u ∂ ξ ) i + 1 2 = 1 2 [ ( ∂ u ∂ ξ ) i + ( ∂ u ∂ ξ ) i + 1 ] + α D 2 ( u R − u L ) (32) \left(\frac{\partial u}{\partial\xi}\right)_{i+\frac{1}{2}}=\frac{1}{2}\left[\left(\frac{\partial u}{\partial\xi}\right)_i+\left(\frac{\partial u}{\partial\xi}\right)_{i+1}\right]+\frac{\alpha^D}{2}(u_R-u_L) \tag*{(32)} ( ∂ ξ ∂ u ) i + 2 1 = 2 1 [ ( ∂ ξ ∂ u ) i + ( ∂ ξ ∂ u ) i + 1 ] + 2 α D ( u R − u L ) (32)
Where the left and right states of u u u are defined using the following interpolation polynomial:
u L = u i + 0.5 ( ∂ u ∂ ξ ) i + β D ( u i + 1 − 2 u i + u i − 1 ) (33) u_L=u_i+0.5\left(\frac{\partial u}{\partial\xi}\right)_i+\beta^D(u_{i+1}-2u_i+u_{i-1}) \tag*{(33)} u L = u i + 0.5 ( ∂ ξ ∂ u ) i + β D ( u i + 1 − 2 u i + u i − 1 ) (33)
u R = u i + 1 − 0.5 ( ∂ u ∂ ξ ) i + 1 + β D ( u i + 2 − 2 u i + 1 + u i ) . (34) u_R=u_{i+1}-0.5\left(\frac{\partial u}{\partial\xi}\right)_{i+1}+\beta^D(u_{i+2}-2u_{i+1}+u_i). \tag*{(34)} u R = u i + 1 − 0.5 ( ∂ ξ ∂ u ) i + 1 + β D ( u i + 2 − 2 u i + 1 + u i ) . (34)
α D = 4 \alpha^D=4 α D = 4 and β D = 0 \beta^D=0 β D = 0 are the scheme coefficients based on Ref. [1 ] for both E6 and IG4 based gradients of P \mathcal{P} P . These coefficients produce fourth order accuracy for both E6 and IG4 gradients. The temperature at the i + 1 2 i+\frac{1}{2} i + 2 1 location is computed from an arithmetic average of T L T_L T L and T R T_R T R values. From this, the interface dynamic viscosity μ i + 1 2 \mu_{i+\frac{1}{2}} μ i + 2 1 is estimated using the Sutherland’s law of viscosity.
Step-2, Compute the derivatives in Cartesian coordinates: Using the ξ \xi ξ , η \eta η and ζ \zeta ζ direction gradients of [ u , v , w , T ] [u,v,w,T] [ u , v , w , T ] computed in the previous step, the derivative chain rule is used to evaluate the x x x , y y y , and z z z derivatives of the same variables. For instance, this is done as follows to compute the interface x x x direction derivative:
( ∂ u ∂ x ) i + 1 2 = ( ξ x ) i + 1 2 ( ∂ u ∂ ξ ) i + 1 2 + ( η x ) i + 1 2 ( ∂ u ∂ η ) i + 1 2 + ( ζ x ) i + 1 2 ( ∂ u ∂ ζ ) i + 1 2 (35) \left(\frac{\partial u}{\partial x}\right)_{i+\frac{1}{2}}=(\xi_x)_{i+\frac{1}{2}}\left(\frac{\partial u}{\partial\xi}\right)_{i+\frac{1}{2}}+(\eta_x)_{i+\frac{1}{2}}\left(\frac{\partial u}{\partial\eta}\right)_{i+\frac{1}{2}}+(\zeta_x)_{i+\frac{1}{2}}\left(\frac{\partial u}{\partial\zeta}\right)_{i+\frac{1}{2}} \tag*{(35)} ( ∂ x ∂ u ) i + 2 1 = ( ξ x ) i + 2 1 ( ∂ ξ ∂ u ) i + 2 1 + ( η x ) i + 2 1 ( ∂ η ∂ u ) i + 2 1 + ( ζ x ) i + 2 1 ( ∂ ζ ∂ u ) i + 2 1 (35)
Note: Metric values at i + 1 2 i+\frac{1}{2} i + 2 1 location are interpolated from the cell center metrics using the relations provided in Eqns. 36 and (40) .
Step-3, Compute stress terms: The shear stress and energy diffusion terms τ i j \tau_{ij} τ ij , β i \beta_i β i present in the viscous flux vector are computed at i + 1 2 i+\frac{1}{2} i + 2 1 using Eqns. 6 and 7 provided in § 2 and with the interface gradients computed in the previous step. The required interface velocities are computed via an arithmetic average of the left and right states of the velocities (e.g. u i + 1 2 = 0.5 ( u L + u R ) u_{i+\frac{1}{2}}=0.5(u_L+u_R) u i + 2 1 = 0.5 ( u L + u R ) ). The shear-stress term τ x x \tau_{xx} τ xx at i + 1 2 i+\frac{1}{2} i + 2 1 is evaluated as follows:
( τ x x ) i + 1 2 = 2 μ i + 1 2 ( ∂ u ∂ x ) i + 1 2 + λ i + 1 2 [ ( ∂ u ∂ x ) i + 1 2 + ( ∂ v ∂ y ) i + 1 2 + ( ∂ w ∂ z ) i + 1 2 ] (36) (\tau_{xx})_{i+\frac{1}{2}}=2\mu_{i+\frac{1}{2}}\left(\frac{\partial u}{\partial x}\right)_{i+\frac{1}{2}}+\lambda_{i+\frac{1}{2}}\left[\left(\frac{\partial u}{\partial x}\right)_{i+\frac{1}{2}}+\left(\frac{\partial v}{\partial y}\right)_{i+\frac{1}{2}}+\left(\frac{\partial w}{\partial z}\right)_{i+\frac{1}{2}}\right] \tag*{(36)} ( τ xx ) i + 2 1 = 2 μ i + 2 1 ( ∂ x ∂ u ) i + 2 1 + λ i + 2 1 [ ( ∂ x ∂ u ) i + 2 1 + ( ∂ y ∂ v ) i + 2 1 + ( ∂ z ∂ w ) i + 2 1 ] (36)
Step-4, Estimate the interface fluxes: The viscous fluxes at i + 1 2 i+\frac{1}{2} i + 2 1 locations are computed using the relations provided in Eqn. 3. For instance, the viscous flux vector in the ξ \xi ξ direction is evaluated as follows:
F ^ i + 1 2 v = [ 0 ( ξ ^ x ) i + 1 2 ( τ x x ) i + 1 2 + ( ξ ^ y ) i + 1 2 ( τ x y ) i + 1 2 + ( ξ ^ z ) i + 1 2 ( τ x z ) i + 1 2 ( ξ ^ x ) i + 1 2 ( τ y x ) i + 1 2 + ( ξ ^ y ) i + 1 2 ( τ y y ) i + 1 2 + ( ξ ^ z ) i + 1 2 ( τ y z ) i + 1 2 ( ξ ^ x ) i + 1 2 ( τ z x ) i + 1 2 + ( ξ ^ y ) i + 1 2 ( τ z y ) i + 1 2 + ( ξ ^ z ) i + 1 2 ( τ z z ) i + 1 2 ( ξ ^ x ) i + 1 2 ( β x ) i + 1 2 + ( ξ ^ y ) i + 1 2 ( β y ) i + 1 2 + ( ξ ^ z ) i + 1 2 ( β z ) i + 1 2 ] (37) \hat{\mathbf{F}}^{v}_{i+\frac{1}{2}}=
\begin{bmatrix}
0\\
(\hat{\xi}_x)_{i+\frac{1}{2}}(\tau_{xx})_{i+\frac{1}{2}}+(\hat{\xi}_y)_{i+\frac{1}{2}}(\tau_{xy})_{i+\frac{1}{2}}+(\hat{\xi}_z)_{i+\frac{1}{2}}(\tau_{xz})_{i+\frac{1}{2}}\\
(\hat{\xi}_x)_{i+\frac{1}{2}}(\tau_{yx})_{i+\frac{1}{2}}+(\hat{\xi}_y)_{i+\frac{1}{2}}(\tau_{yy})_{i+\frac{1}{2}}+(\hat{\xi}_z)_{i+\frac{1}{2}}(\tau_{yz})_{i+\frac{1}{2}}\\
(\hat{\xi}_x)_{i+\frac{1}{2}}(\tau_{zx})_{i+\frac{1}{2}}+(\hat{\xi}_y)_{i+\frac{1}{2}}(\tau_{zy})_{i+\frac{1}{2}}+(\hat{\xi}_z)_{i+\frac{1}{2}}(\tau_{zz})_{i+\frac{1}{2}}\\
(\hat{\xi}_x)_{i+\frac{1}{2}}(\beta_x)_{i+\frac{1}{2}}+(\hat{\xi}_y)_{i+\frac{1}{2}}(\beta_y)_{i+\frac{1}{2}}+(\hat{\xi}_z)_{i+\frac{1}{2}}(\beta_z)_{i+\frac{1}{2}}
\end{bmatrix} \tag*{(37)} F ^ i + 2 1 v = 0 ( ξ ^ x ) i + 2 1 ( τ xx ) i + 2 1 + ( ξ ^ y ) i + 2 1 ( τ x y ) i + 2 1 + ( ξ ^ z ) i + 2 1 ( τ x z ) i + 2 1 ( ξ ^ x ) i + 2 1 ( τ y x ) i + 2 1 + ( ξ ^ y ) i + 2 1 ( τ y y ) i + 2 1 + ( ξ ^ z ) i + 2 1 ( τ y z ) i + 2 1 ( ξ ^ x ) i + 2 1 ( τ z x ) i + 2 1 + ( ξ ^ y ) i + 2 1 ( τ z y ) i + 2 1 + ( ξ ^ z ) i + 2 1 ( τ z z ) i + 2 1 ( ξ ^ x ) i + 2 1 ( β x ) i + 2 1 + ( ξ ^ y ) i + 2 1 ( β y ) i + 2 1 + ( ξ ^ z ) i + 2 1 ( β z ) i + 2 1 (37)
Step-5, Compute residual: Finally, the viscous flux residual is computed using the following relation:
( ∂ F v ∂ ξ ) i ≈ F i + 1 2 v − F i − 1 2 v Δ ξ (38) \left(\frac{\partial\mathbf{F}^{v}}{\partial\xi}\right)_i\approx\frac{\mathbf{F}^{v}_{i+\frac{1}{2}}-\mathbf{F}^{v}_{i-\frac{1}{2}}}{\Delta\xi} \tag*{(38)} ( ∂ ξ ∂ F v ) i ≈ Δ ξ F i + 2 1 v − F i − 2 1 v (38)
After computing the inviscid and viscous flux residuals time marching is performed to compute the solution corresponding to next time-step. The details regarding the time marching scheme and the stable time-step evaluation for both inviscid and viscous flow simulations is detailed in Appendix B.
Multi-block approach and boundary conditions
The multi-block approach enables geometric flexibility to simulate flows through and around domains of various atypical shapes. The multi-block approach adopted in the present work is similar to the approach proposed by Lien et al. [51 ] . Any block in the domain can interface one or more of it’s boundaries (six in 3-D, four in 2-D) with the blocks surrounding it. Each block possesses its own coordinate system, essentially making the approach block unstructured. To ensure consistency of the block dimensions at the boundaries, the dimensions of the block interface plane should be identical on both home and neighbor blocks. A schematic of a multi-block layout depicting the arrangement of cells and the coordinate systems is illustrated in Figure 6 a. Ghost cells are adapted to introduce necessary inter-block information sharing and enable sufficient stencil size at block boundaries to compute high-order fluxes corresponding to MEG6, MIG4, and α \alpha α -damping.
Figure 6. (a) Schematic of a block and its ghost points on left, right, bottom and top boundaries. (b) Schematic of ghost point sharing between blocks sharing interface along ξ \xi ξ direction. The letter ‘G’ in figure-b represents ghost cell region.
Boundary conditions are imposed at each block boundary through ghost cells. The geometric location of the ghost points is arbitrary as they are physically non-existent. Therefore, metric terms are also non-existent and do not need to be computed in those locations. However, the lack of geometric information at boundaries poses difficulties in applying the usual high order approximations that are employed for cells inside the domain. Appendix C shows the special boundary formulae that were adopted in the present work.
A schematic of a two-dimensional block and the imaginary ghost cells surrounding it's four boundaries is illustrated in Figure 6 . A total of five ghost cells were used for all the simulations in the current study. Suitable primitive variable values are specified in those ghost cells based on the type of boundary condition adapted at that boundary. A list of expressions to compute the primitive variables in ghost cells corresponding to various boundary conditions is provided in Table 1 . All the formulations and concepts discussed in this section can be extrapolated to three dimensions.
Table 1. Expressions for primitive variable values in the ghost cells for various boundary conditions. Where, N g N_g N g is number of ghost cells, prefix ( . ) i n (.)_{in} ( . ) in represents inflow conditions at the inflow boundary, N I NI N I is number of points in x i xi x i direction, U U U is the contravariant velocity in ξ \xi ξ direction, V V V is the contravariant velocity in η \eta η direction, Suffix ‘H’ and ‘N’ denote ‘Home’ and ‘Neighbour’ blocks respectively.
Freestream preservation
In this section, firstly we layout the three essential steps to be followed to ensure freestream preservation for MEG6 and MIG4 schemes. Then we present a proof showing how the metric identities are satisfied with the use of MEG6 and MIG4 schemes to discretize and interpolate the conservative metric term formulae (Eqn. (12) ). The following are the three steps to be incorporated while computing metric terms in order to achieve freestream preservation:
Conservative metrics: Conservative metrics presented in Eqn. (12) should be used to ensure geometric and volume conservation [25 ] .
Consistent discretization using a central scheme: While computing the cell-centered metric terms, the same scheme as that of the inviscid flux discretization (∂ F ∂ ξ \frac{\partial F}{\partial\xi} ∂ ξ ∂ F ) has to be used to compute derivative terms involved in the conservative metric formulae. Furthermore, in order to estimate the metric terms in a linear fashion, the limiting steps (steps 4 and 5 in Figure 3 ) are skipped and the left and right biased interpolated states should be averaged.
For instance, to compute the ( x ξ ) i (x_{\xi})_i ( x ξ ) i term (which is required to compute metric terms), firstly, the values of x x x at i + 1 2 i+\frac{1}{2} i + 2 1 and i − 1 2 i-\frac{1}{2} i − 2 1 should be computed by averaging the left and right biased interpolated values obtained using the formulation described in Eqn. (18) . Then, using Eqn. (40) the derivative at location i i i is computed.
x i + 1 2 = 0.5 ( x i + 1 2 L + x i + 1 2 R ) = 0.5 [ ( x i + 1 2 x i ′ + 1 12 x i ′ ′ ) + ( x i + 1 − 1 2 x i + 1 ′ + 1 12 x i + 1 ′ ′ ) ] , x_{i+\frac{1}{2}} = 0.5\left(x^L_{i+\frac{1}{2}}+x^R_{i+\frac{1}{2}}\right) = 0.5\left[\left(x_i+\frac{1}{2}x'_i+\frac{1}{12}x''_i\right)+\left(x_{i+1}-\frac{1}{2}x'_{i+1}+\frac{1}{12}x''_{i+1}\right)\right], x i + 2 1 = 0.5 ( x i + 2 1 L + x i + 2 1 R ) = 0.5 [ ( x i + 2 1 x i ′ + 12 1 x i ′′ ) + ( x i + 1 − 2 1 x i + 1 ′ + 12 1 x i + 1 ′′ ) ] ,
x i − 1 2 = 0.5 ( x i − 1 2 L + x i − 1 2 R ) = 0.5 [ ( x i − 1 + 1 2 x i − 1 ′ + 1 12 x i − 1 ′ ′ ) + ( x i − 1 2 x i ′ + 1 12 x i ′ ′ ) ] (39) x_{i-\frac{1}{2}} = 0.5\left(x^L_{i-\frac{1}{2}}+x^R_{i-\frac{1}{2}}\right) = 0.5\left[\left(x_{i-1}+\frac{1}{2}x'_{i-1}+\frac{1}{12}x''_{i-1}\right)+\left(x_i-\frac{1}{2}x'_i+\frac{1}{12}x''_i\right)\right] \tag*{(39)} x i − 2 1 = 0.5 ( x i − 2 1 L + x i − 2 1 R ) = 0.5 [ ( x i − 1 + 2 1 x i − 1 ′ + 12 1 x i − 1 ′′ ) + ( x i − 2 1 x i ′ + 12 1 x i ′′ ) ] (39)
( x ξ ) i = x i + 1 2 − x i − 1 2 Δ ξ (40) (x_{\xi})_i=\frac{x_{i+\frac{1}{2}}-x_{i-\frac{1}{2}}}{\Delta\xi} \tag*{(40)} ( x ξ ) i = Δ ξ x i + 2 1 − x i − 2 1 (40)
In the above equations, the x ′ x' x ′ and x ′ ′ x'' x ′′ terms should be computed using the formulations described in Eqns. (19) or (20) depending on whether the scheme being employed is MEG6 or MIG4. The procedure leads to linear interpolation and, consequently, a linear estimate of all the metric terms. It should be noted that though x ′ x' x ′ and x ξ x_{\xi} x ξ have mathematically the same meaning, they are different in the numerical sense.
Consistent interpolation using a central scheme: The same formulation used in interpolating the left and right characteristic variable states in the inviscid flux algorithm (Eqns. (23) ) should be used to interpolate metric terms from cell centers to cell interfaces. Furthermore, while interpolating metric terms of the form ξ x J \frac{\xi_x}{J} J ξ x (which are used in the Riemann solver), the quantity should be interpolated as a whole rather than interpolating ξ x \xi_x ξ x and 1 J \frac{1}{J} J 1 separately and then multiplying them later. To make the interpolation central, the left and right states should be averaged. For instance, the following expression should be used to interpolate ξ x J \frac{\xi_x}{J} J ξ x to the i + 1 2 i+\frac{1}{2} i + 2 1 interface.
( ξ x J ) i + 1 2 = 0.5 { ( ξ x J ) i + 1 2 L + ( ξ x J ) i + 1 2 R } = 0.5 { [ ( ξ x J ) i + 1 2 ( ξ x J ) i ′ + 1 12 ( ξ x J ) i ′ ′ ] + [ ( ξ x J ) i + 1 − 1 2 ( ξ x J ) i + 1 ′ + 1 12 ( ξ x J ) i + 1 ′ ′ ] } (41) \begin{aligned}
\left(\frac{\xi_x}{J}\right)_{i+\frac{1}{2}}=0.5\left\{\left(\frac{\xi_x}{J}\right)^L_{i+\frac{1}{2}}+\left(\frac{\xi_x}{J}\right)^R_{i+\frac{1}{2}}\right\} \\
&=0.5\left\{\left[\left(\frac{\xi_x}{J}\right)_i+\frac{1}{2}\left(\frac{\xi_x}{J}\right)'_i+\frac{1}{12}\left(\frac{\xi_x}{J}\right)''_i\right]+\left[\left(\frac{\xi_x}{J}\right)_{i+1}-\frac{1}{2}\left(\frac{\xi_x}{J}\right)'_{i+1}+\frac{1}{12}\left(\frac{\xi_x}{J}\right)''_{i+1}\right]\right\} \tag*{(41)}
\end{aligned} ( J ξ x ) i + 2 1 = 0.5 { ( J ξ x ) i + 2 1 L + ( J ξ x ) i + 2 1 R } = 0.5 { [ ( J ξ x ) i + 2 1 ( J ξ x ) i ′ + 12 1 ( J ξ x ) i ′′ ] + [ ( J ξ x ) i + 1 − 2 1 ( J ξ x ) i + 1 ′ + 12 1 ( J ξ x ) i + 1 ′′ ] } (41)
Now that all the steps are detailed, next, we present a proof showing how freestream preservation is ensured by following these steps. To ensure freestream preservation, the interpolated metrics should satisfy the three metric identities listed in Eqn. 39 in the discrete sense [8 , 25 ] . These metric identities can be obtained by simplifying the momentum equations by considering the freestream flow assumption (i.e., constant [ ρ , u , v , w , p ] [\rho,u,v,w,p] [ ρ , u , v , w , p ] values throughout the domain). For the sake of brevity, the proof is only presented for the metrics corresponding to MEG6. Nevertheless, following the essential steps, the same result can also be obtained even for metrics that are computed with the MIG4 scheme.
∂ ∂ ξ ( ξ ^ x ) + ∂ ∂ η ( η ^ x ) + ∂ ∂ ζ ( ζ ^ x ) = 0 , (42) \frac{\partial}{\partial\xi}\left(\hat{\xi}_x\right)+\frac{\partial}{\partial\eta}\left(\hat{\eta}_x\right)+\frac{\partial}{\partial\zeta}\left(\hat{\zeta}_x\right)=0, \tag*{(42)} ∂ ξ ∂ ( ξ ^ x ) + ∂ η ∂ ( η ^ x ) + ∂ ζ ∂ ( ζ ^ x ) = 0 , (42)
∂ ∂ ξ ( ξ ^ y ) + ∂ ∂ η ( η ^ y ) + ∂ ∂ ζ ( ζ ^ y ) = 0 , (43) \frac{\partial}{\partial\xi}\left(\hat{\xi}_y\right)+\frac{\partial}{\partial\eta}\left(\hat{\eta}_y\right)+\frac{\partial}{\partial\zeta}\left(\hat{\zeta}_y\right)=0, \tag*{(43)} ∂ ξ ∂ ( ξ ^ y ) + ∂ η ∂ ( η ^ y ) + ∂ ζ ∂ ( ζ ^ y ) = 0 , (43)
∂ ∂ ξ ( ξ ^ z ) + ∂ ∂ η ( η ^ z ) + ∂ ∂ ζ ( ζ ^ z ) = 0 (44) \frac{\partial}{\partial\xi}\left(\hat{\xi}_z\right)+\frac{\partial}{\partial\eta}\left(\hat{\eta}_z\right)+\frac{\partial}{\partial\zeta}\left(\hat{\zeta}_z\right)=0 \tag*{(44)} ∂ ξ ∂ ( ξ ^ z ) + ∂ η ∂ ( η ^ z ) + ∂ ζ ∂ ( ζ ^ z ) = 0 (44)
Statement. The three metric identities (Eqn. 39) will be satisfied in discrete sense if the conservative metrics are discretized and interpolated based on MEG6 or MIG4 schemes (as described in steps 2-3 above).
Proof. The metric terms ξ ^ x \hat{\xi}_x ξ ^ x , η ^ x \hat{\eta}_x η ^ x , and ζ ^ x \hat{\zeta}_x ζ ^ x presented in Eqn. 39a can be analytically expressed as,
ξ ^ x = ( y η z ) ζ − ( y ζ z ) η , η ^ x = ( y ζ z ) ξ − ( y ξ z ) ζ , ζ ^ x = ( y ξ z ) η − ( y η z ) ξ (45) \hat{\xi}_x=(y_\eta z)_\zeta-(y_\zeta z)_\eta,\qquad\hat{\eta}_x=(y_\zeta z)_\xi-(y_\xi z)_\zeta,\qquad\hat{\zeta}_x=(y_\xi z)_\eta-(y_\eta z)_\xi \tag*{(45)} ξ ^ x = ( y η z ) ζ − ( y ζ z ) η , η ^ x = ( y ζ z ) ξ − ( y ξ z ) ζ , ζ ^ x = ( y ξ z ) η − ( y η z ) ξ (45)
We proceed to discretize ξ ^ x \hat{\xi}_x ξ ^ x , η ^ x \hat{\eta}_x η ^ x and ζ ^ x \hat{\zeta}_x ζ ^ x at i , j , k i,j,k i , j , k locations. Firstly the terms y ξ z y_\xi z y ξ z , y η z y_\eta z y η z , and y ζ z y_\zeta z y ζ z are computed using the discretization scheme employed for the MEG6 scheme as follows:
( y ξ z ) i , j , k = 1 Δ ξ ( y i + 1 2 , j , k + y i − 1 2 , j , k ) z i , j , k = 1 2 Δ ξ ( y i + 1 2 , j , k L + y i + 1 2 , j , k R ) z i , j , k + 1 2 Δ ξ ( y i − 1 2 , j , k L + y i − 1 2 , j , k R ) z i , j , k = 2282 2880 Δ ξ ( y i + 1 , j , k − y i − 1 , j , k ) z i , j , k − 546 2880 Δ ξ ( y i + 2 , j , k − y i − 2 , j , k ) z i , j , k + 89 2880 Δ ξ ( y i + 3 , j , k − y i − 3 , j , k ) z i , j , k − 3 2880 Δ ξ ( y i + 4 , j , k − y i − 4 , j , k ) z i , j , k − 1 2880 Δ ξ ( y i + 5 , j , k − y i − 5 , j , k ) z i , j , k . (46) \begin{aligned}
(y_\xi z)_{i,j,k}
&=\frac{1}{\Delta\xi}\left(y_{i+\frac{1}{2},j,k}+y_{i-\frac{1}{2},j,k}\right)z_{i,j,k}\\
&=\frac{1}{2\Delta\xi}\left(y^L_{i+\frac{1}{2},j,k}+y^R_{i+\frac{1}{2},j,k}\right)z_{i,j,k}
+\frac{1}{2\Delta\xi}\left(y^L_{i-\frac{1}{2},j,k}+y^R_{i-\frac{1}{2},j,k}\right)z_{i,j,k}\\
&=\frac{2282}{2880\Delta\xi}(y_{i+1,j,k}-y_{i-1,j,k})z_{i,j,k}
-\frac{546}{2880\Delta\xi}(y_{i+2,j,k}-y_{i-2,j,k})z_{i,j,k}\\
&\quad+\frac{89}{2880\Delta\xi}(y_{i+3,j,k}-y_{i-3,j,k})z_{i,j,k}
-\frac{3}{2880\Delta\xi}(y_{i+4,j,k}-y_{i-4,j,k})z_{i,j,k}\\
&\quad-\frac{1}{2880\Delta\xi}(y_{i+5,j,k}-y_{i-5,j,k})z_{i,j,k}. \tag*{(46)}
\end{aligned} ( y ξ z ) i , j , k = Δ ξ 1 ( y i + 2 1 , j , k + y i − 2 1 , j , k ) z i , j , k = 2Δ ξ 1 ( y i + 2 1 , j , k L + y i + 2 1 , j , k R ) z i , j , k + 2Δ ξ 1 ( y i − 2 1 , j , k L + y i − 2 1 , j , k R ) z i , j , k = 2880Δ ξ 2282 ( y i + 1 , j , k − y i − 1 , j , k ) z i , j , k − 2880Δ ξ 546 ( y i + 2 , j , k − y i − 2 , j , k ) z i , j , k + 2880Δ ξ 89 ( y i + 3 , j , k − y i − 3 , j , k ) z i , j , k − 2880Δ ξ 3 ( y i + 4 , j , k − y i − 4 , j , k ) z i , j , k − 2880Δ ξ 1 ( y i + 5 , j , k − y i − 5 , j , k ) z i , j , k . (46)
Similar expressions can be derived for y η z y_\eta z y η z and y ζ z y_\zeta z y ζ z . Next we compute the terms ( y η z ) ζ (y_\eta z)_\zeta ( y η z ) ζ and ( y ζ z ) η (y_\zeta z)_\eta ( y ζ z ) η as follows.
[ ( y η z ) ζ ] i , j , k = 1 Δ ζ [ ( y η z ) i , j , k + 1 2 − ( y η z ) i , j , k − 1 2 ] = 1 2 Δ ζ [ ( y η z ) i , j , k + 1 2 L + ( y η z ) i , j , k + 1 2 R ] + 1 2 Δ ζ [ ( y η z ) i , j , k − 1 2 L + ( y η z ) i , j , k − 1 2 R ] = 2282 2880 Δ ζ [ ( y η z ) i , j , k + 1 − ( y η z ) i , j , k − 1 ] − 546 2880 Δ ζ [ ( y η z ) i , j , k + 2 − ( y η z ) i , j , k − 2 ] + 89 2880 Δ ζ [ ( y η z ) i , j , k + 3 − ( y η z ) i , j , k − 3 ] − 3 2880 Δ ζ [ ( y η z ) i , j , k + 4 − ( y η z ) i , j , k − 4 ] − 1 2880 Δ ζ [ ( y η z ) i , j , k + 5 − ( y η z ) i , j , k − 5 ] . (47) \begin{aligned}
\left[(y_\eta z)_\zeta\right]_{i,j,k}
&=\frac{1}{\Delta\zeta}\left[(y_\eta z)_{i,j,k+\frac{1}{2}}-(y_\eta z)_{i,j,k-\frac{1}{2}}\right]\\
&=\frac{1}{2\Delta\zeta}\left[(y_\eta z)^L_{i,j,k+\frac{1}{2}}+(y_\eta z)^R_{i,j,k+\frac{1}{2}}\right]
+\frac{1}{2\Delta\zeta}\left[(y_\eta z)^L_{i,j,k-\frac{1}{2}}+(y_\eta z)^R_{i,j,k-\frac{1}{2}}\right]\\
&=\frac{2282}{2880\Delta\zeta}\left[(y_\eta z)_{i,j,k+1}-(y_\eta z)_{i,j,k-1}\right]
-\frac{546}{2880\Delta\zeta}\left[(y_\eta z)_{i,j,k+2}-(y_\eta z)_{i,j,k-2}\right]\\
&\quad+\frac{89}{2880\Delta\zeta}\left[(y_\eta z)_{i,j,k+3}-(y_\eta z)_{i,j,k-3}\right]
-\frac{3}{2880\Delta\zeta}\left[(y_\eta z)_{i,j,k+4}-(y_\eta z)_{i,j,k-4}\right]\\
&\quad-\frac{1}{2880\Delta\zeta}\left[(y_\eta z)_{i,j,k+5}-(y_\eta z)_{i,j,k-5}\right]. \tag*{(47)}
\end{aligned} [ ( y η z ) ζ ] i , j , k = Δ ζ 1 [ ( y η z ) i , j , k + 2 1 − ( y η z ) i , j , k − 2 1 ] = 2Δ ζ 1 [ ( y η z ) i , j , k + 2 1 L + ( y η z ) i , j , k + 2 1 R ] + 2Δ ζ 1 [ ( y η z ) i , j , k − 2 1 L + ( y η z ) i , j , k − 2 1 R ] = 2880Δ ζ 2282 [ ( y η z ) i , j , k + 1 − ( y η z ) i , j , k − 1 ] − 2880Δ ζ 546 [ ( y η z ) i , j , k + 2 − ( y η z ) i , j , k − 2 ] + 2880Δ ζ 89 [ ( y η z ) i , j , k + 3 − ( y η z ) i , j , k − 3 ] − 2880Δ ζ 3 [ ( y η z ) i , j , k + 4 − ( y η z ) i , j , k − 4 ] − 2880Δ ζ 1 [ ( y η z ) i , j , k + 5 − ( y η z ) i , j , k − 5 ] . (47)
After computing the term [ ( y ζ z ) η ] i , j , k \left[(y_\zeta z)_\eta\right]_{i,j,k} [ ( y ζ z ) η ] i , j , k in a similar fashion, it can be subtracted from [ ( y η z ) ζ ] i , j , k \left[(y_\eta z)_\zeta\right]_{i,j,k} [ ( y η z ) ζ ] i , j , k to obtain the metric term ( ξ ^ x ) i , j , k (\hat{\xi}_x)_{i,j,k} ( ξ ^ x ) i , j , k . Similarly, other metric terms ( η ^ x ) i , j , k (\hat{\eta}_x)_{i,j,k} ( η ^ x ) i , j , k and ( ζ ^ x ) i , j , k (\hat{\zeta}_x)_{i,j,k} ( ζ ^ x ) i , j , k can also be computed. The next step is to interpolate ξ ^ x \hat{\xi}_x ξ ^ x , η ^ x \hat{\eta}_x η ^ x , and ζ ^ x \hat{\zeta}_x ζ ^ x terms from ( i , j , k ) (i,j,k) ( i , j , k ) locations to the half locations and evaluate Eqn. 39a. For instance, the first term of Eqn. 39a is computed as follows. It should be noted that the grid spacing in the computational coordinates is uniform and taken equal to one unit, i.e., Δ ξ = Δ η = Δ ζ = 1 \Delta\xi=\Delta\eta=\Delta\zeta=1 Δ ξ = Δ η = Δ ζ = 1 .
∂ ∂ ξ ( ( ξ x ) ^ ) = ( ξ x ) i + 1 2 , j , k − ( ξ x ) i − 1 2 , j , k Δ ξ = 1 2 Δ ξ [ ( ξ x ) i + 1 2 , j , k L + ( ξ x ) i + 1 2 , j , k R ] − 1 2 Δ ξ [ ( ξ x ) i − 1 2 , j , k L + ( ξ x ) i − 1 2 , j , k R ] = 1 23887872000 [ − y i − 5 , j − 5 , k − 5 z i − 5 , j − 5 , k − 3 y i − 5 , j − 5 , k − 4 z i − 5 , j − 5 , k + ⋯ + 3 y i + 5 , j + 5 , k + 4 z i + 5 , j + 5 , k + y i + 5 , j + 5 , k + 5 z i + 5 , j + 5 , k ] (48) \begin{aligned}
\frac{\partial}{\partial\xi}\left(\widehat{(\xi_x)}\right)=\frac{(\xi_x)_{i+\frac{1}{2},j,k}-(\xi_x)_{i-\frac{1}{2},j,k}}{\Delta\xi}
=\frac{1}{2\Delta\xi}\left[(\xi_x)^L_{i+\frac{1}{2},j,k}+(\xi_x)^R_{i+\frac{1}{2},j,k}\right]-\frac{1}{2\Delta\xi}\left[(\xi_x)^L_{i-\frac{1}{2},j,k}+(\xi_x)^R_{i-\frac{1}{2},j,k}\right] \\
&=\frac{1}{23887872000}\left[-y_{i-5,j-5,k-5}z_{i-5,j-5,k}-3y_{i-5,j-5,k-4}z_{i-5,j-5,k}+\cdots+3y_{i+5,j+5,k+4}z_{i+5,j+5,k}+y_{i+5,j+5,k+5}z_{i+5,j+5,k}\right] \tag*{(48)}
\end{aligned} ∂ ξ ∂ ( ( ξ x ) ) = Δ ξ ( ξ x ) i + 2 1 , j , k − ( ξ x ) i − 2 1 , j , k = 2Δ ξ 1 [ ( ξ x ) i + 2 1 , j , k L + ( ξ x ) i + 2 1 , j , k R ] − 2Δ ξ 1 [ ( ξ x ) i − 2 1 , j , k L + ( ξ x ) i − 2 1 , j , k R ] = 23887872000 1 [ − y i − 5 , j − 5 , k − 5 z i − 5 , j − 5 , k − 3 y i − 5 , j − 5 , k − 4 z i − 5 , j − 5 , k + ⋯ + 3 y i + 5 , j + 5 , k + 4 z i + 5 , j + 5 , k + y i + 5 , j + 5 , k + 5 z i + 5 , j + 5 , k ] (48)
Similarly, the expressions ( η x ) i , j + 1 2 , k − ( η x ) i , j − 1 2 , k Δ η \frac{(\eta_x)_{i,j+\frac{1}{2},k}-(\eta_x)_{i,j-\frac{1}{2},k}}{\Delta\eta} Δ η ( η x ) i , j + 2 1 , k − ( η x ) i , j − 2 1 , k and ( ζ x ) i , j , k + 1 2 − ( ζ x ) i , j , k − 1 2 Δ ζ \frac{(\zeta_x)_{i,j,k+\frac{1}{2}}-(\zeta_x)_{i,j,k-\frac{1}{2}}}{\Delta\zeta} Δ ζ ( ζ x ) i , j , k + 2 1 − ( ζ x ) i , j , k − 2 1 can also be discretized. Adding up all the expressions will result in a sum equal to zero. The zero-sum proves that the first metric identity is satisfied in a discrete sense. The other two metric identities Eqns. 39b-c can also be proved similarly. Due to the large number of terms involved, full length arithmetic operations are not showed here. A detailed, worked-out Mathematica notebook file has been provided in the supplementary section (Suppl. 101) to support the proof. It was also found that the use of any other interpolation scheme for the present discretization approach (MEG4/MIG4), other than the one mentioned in step 3 above, will not satisfy the metric identities.
( ξ x ) i + 1 2 , j , k − ( ξ x ) i − 1 2 , j , k Δ ξ + ( η x ) i , j + 1 2 , k − ( η x ) i , j − 1 2 , k Δ η + ( ζ x ) i , j , k + 1 2 − ( ζ x ) i , j , k − 1 2 Δ ζ = 0 (49) \frac{(\xi_x)_{i+\frac{1}{2},j,k}-(\xi_x)_{i-\frac{1}{2},j,k}}{\Delta\xi}
+\frac{(\eta_x)_{i,j+\frac{1}{2},k}-(\eta_x)_{i,j-\frac{1}{2},k}}{\Delta\eta}
+\frac{(\zeta_x)_{i,j,k+\frac{1}{2}}-(\zeta_x)_{i,j,k-\frac{1}{2}}}{\Delta\zeta}=0 \tag*{(49)} Δ ξ ( ξ x ) i + 2 1 , j , k − ( ξ x ) i − 2 1 , j , k + Δ η ( η x ) i , j + 2 1 , k − ( η x ) i , j − 2 1 , k + Δ ζ ( ζ x ) i , j , k + 2 1 − ( ζ x ) i , j , k − 2 1 = 0 (49)
Results
The results are organized into three parts. The first part (Sec. 8.1) presents demonstrative examples to show the freestream preserving nature of the MEG6/MIG4 schemes. The second part (Sec. 8.2) explores the efficacy of MEG6 and MIG4 schemes to simulate flows through dynamically deforming grids. Finally, in the third part (Sec. 8.3), the resolving capability of MEG6 and MIG4 in capturing screech tones and unsteady aspects of an under-expanded supersonic jet [52 ] are shown employing coarse grid LES. The test cases used in each of the three parts are enumerated below.
Freestream preservation: Three-dimensional uniform flow, convecting vortex, and Double Mach reflection.
Dynamically deforming meshes: Three-dimensional uniform flow, stationary vortex, and double periodic shear layer.
Application to simulate supersonic jet noise: Mach 1.35 choked under-expanded supersonic jet.
Freestream preservation: Demonstration
The test cases in this section were chosen to cover two-dimensional, three-dimensional, subsonic, and supersonic flow scenarios. To discern the effect of using a non-freestream preserving approach for computing metric terms, tests were also performed using a non-conservative metric term approach presented in Appendix § 15 . The non-freestream preserving approach employs a non-conservative form of metrics and explicit fourth order central scheme for first and second derivative evaluation instead of Eqs. 17 or 18. The non-freestream preserving metrics are referred to with the names Non-Freestream Preserving MEG6 (Non-FP MEG6) and Non-Freestream Preserving MEG6 (Non-FP MIG4) when MEG6 and MIG4 schemes were used to compute the inviscid fluxes, respectively.
Three-dimensional uniform flow
A fluid stream with uniform density, velocity, and pressure flowing through a periodic domain is simulated to test freestream preservation of MEG6 and MIG4 schemes in this test case. The effect of mesh non-uniformity on the solution is assessed by employing freestream preserving and non-freestream preserving metric terms. Two non-uniform meshes are employed in this test case; the first is a wavy sinusoidal domain, and the second is a randomized grid (Figure 7 ). The formulation used to generate the sinusoidal grid [53 ] is as follows:
Figure 7. (a) Sinusoidal grid and (b) Randomized grid used to test freestream preservation nature of MEG6 and MIG4 schemes.
x i , j , k = x min + Δ x 0 [ ( i − 1 ) + sin ( π ( j − 1 ) Δ y 0 ) sin ( π ( k − 1 ) Δ z 0 ) ] , y i , j , k = y min + Δ y 0 [ ( j − 1 ) + sin ( π ( k − 1 ) Δ z 0 ) sin ( π ( i − 1 ) Δ x 0 ) ] , z i , j , k = z min + Δ z 0 [ ( k − 1 ) + sin ( π ( i − 1 ) Δ x 0 ) sin ( π ( j − 1 ) Δ y 0 ) ] (50) x_{i,j,k}=x_{\min}+\Delta x_0\left[(i-1)+\sin\left(\pi(j-1)\Delta y_0\right)\sin\left(\pi(k-1)\Delta z_0\right)\right],\\
y_{i,j,k}=y_{\min}+\Delta y_0\left[(j-1)+\sin\left(\pi(k-1)\Delta z_0\right)\sin\left(\pi(i-1)\Delta x_0\right)\right],\\
z_{i,j,k}=z_{\min}+\Delta z_0\left[(k-1)+\sin\left(\pi(i-1)\Delta x_0\right)\sin\left(\pi(j-1)\Delta y_0\right)\right] \tag*{(50)} x i , j , k = x m i n + Δ x 0 [ ( i − 1 ) + sin ( π ( j − 1 ) Δ y 0 ) sin ( π ( k − 1 ) Δ z 0 ) ] , y i , j , k = y m i n + Δ y 0 [ ( j − 1 ) + sin ( π ( k − 1 ) Δ z 0 ) sin ( π ( i − 1 ) Δ x 0 ) ] , z i , j , k = z m i n + Δ z 0 [ ( k − 1 ) + sin ( π ( i − 1 ) Δ x 0 ) sin ( π ( j − 1 ) Δ y 0 ) ] (50)
where,
i = 1 , 2 , ⋯ , N I , j = 1 , 2 , ⋯ , N J , k = 1 , 2 , ⋯ , N K , i=1,2,\cdots,NI,\quad j=1,2,\cdots,NJ,\quad k=1,2,\cdots,NK, i = 1 , 2 , ⋯ , N I , j = 1 , 2 , ⋯ , N J , k = 1 , 2 , ⋯ , N K ,
Δ x 0 = L x N I , Δ y 0 = L y N J , Δ z 0 = L z N K , \Delta x_0=\frac{L_x}{NI},\quad\Delta y_0=\frac{L_y}{NJ},\quad\Delta z_0=\frac{L_z}{NK}, Δ x 0 = N I L x , Δ y 0 = N J L y , Δ z 0 = N K L z ,
x min = − L x 2 , y min = − L y 2 , z min = − L z 2 (51) x_{\min}=-\frac{L_x}{2},\quad y_{\min}=-\frac{L_y}{2},\quad z_{\min}=-\frac{L_z}{2} \tag*{(51)} x m i n = − 2 L x , y m i n = − 2 L y , z m i n = − 2 L z (51)
The variables N I NI N I , N J NJ N J , and N K NK N K represent the total number of cells along the ξ \xi ξ , η \eta η , and ζ \zeta ζ directions, respectively; all of them are taken as 20, thus making the grid resolution 20 × 20 × 20 20 \times20 \times20 20 × 20 × 20 . L x L_x L x , L y L_y L y , and L z L_z L z are the length parameters taken as four units each. On the other hand, the randomized grid shown in Figure 7 b is generated by randomly moving the uniformly distributed grid node positions by an amount of 20 percent of the local grid spacing in each direction.
The initial conditions of the flow are: ( ρ , u , v , w , p ) = ( 1 , 1 , 0 , 0 , 1 γ M 2 ) (\rho,u,v,w,p)=\left(1,1,0,0,\frac{1}{\gamma M^2}\right) ( ρ , u , v , w , p ) = ( 1 , 1 , 0 , 0 , γ M 2 1 ) . The value of γ \gamma γ is taken to as 1.4. Inviscid calculations were performed with a Mach number of 0.5. The initial conditions essentially dictate that the y y y and z z z velocities should remain zero everywhere in the domain at the end of the simulation. However, if the scheme is not freestream preserving, the errors associated with the metric cancellation will add up and grow. Consequently, they will be seen as non-zero values in the y y y and z z z direction velocities.
The flow is simulated until a non-dimensional time of 10 units. Then, the L 2 L^2 L 2 norm errors associated with the y y y and z z z velocities are computed for both freestream and non-freestream preserving metric approaches. All the L 2 L^2 L 2 errors recorded in the simulations are tabulated in Table 2 . The errors associated with non-freestream preserving schemes presented in the first and second rows of the table can be seen to be significantly high. The errors are in the order of 10 − 3 10^{-3} 1 0 − 3 and 10 − 1 10^{-1} 1 0 − 1 in magnitude on sinusoidal and randomized grids, respectively. On the other hand, the errors associated with freestream preserving metrics are close to machine zero (of double-precision computations) on both sinusoidal and randomized grids; these errors can be treated as zeros. This clearly demonstrates that the current approach is freestream preserving concerning both MEG6 and MIG4 schemes. Experiments were also performed with conservative metrics computed using the fourth-order scheme (Eqn. D.2), which also failed to preserve the freestream values, as expected.
Table 2. L 2 L^2 L 2 norm errors of y y y and z z z component velocity in the freestream preservation test on sinusoidal and randomized grids employing non-conservative and conservative metric term approaches.
Two-dimensional moving vortex
In this test case, an isentropic inviscid vortex is advected through a distorted randomized grid of size 64 × 64 64 \times64 64 × 64 to test for the freestream and vortex preservation nature of the MEG6 and MIG4 schemes. The test is performed on a periodic domain spanning over square dimensions of [ 0 , 16 ] × [ 0 , 16 ] [0,16]\times[0,16] [ 0 , 16 ] × [ 0 , 16 ] . With the advection velocity chosen as one unit and the simulation time 16 non-dimensional time units, the vortex is allowed to travel one full cycle to reach back to its initialized location. The grid randomization is only done in the central portion of the domain spanning over the region given by x ∈ [ 3 , 13 ] ∪ y ∈ [ 3 , 13 ] x \in[3, 13] \cup y \in[3, 13] x ∈ [ 3 , 13 ] ∪ y ∈ [ 3 , 13 ] (Figure 8 a). Such an abrupt mesh non-uniformity (also an abrupt change in metric term values) is created intentionally to check the robustness of the schemes. The level of grid randomization in the current simulation is also considered twenty percent, similar to the previous case. The mesh resulting non-uniformities created a maximum included angle of about 160 degrees in the domain. The initial conditions are given by:
Figure 8. (a) 64 × 64 2D grid used for the simulation, (b) Plots of swirl velocity along y = 8 y = 8 y = 8 and, (c,d,e,f) Plots of z-vorticity (Ω z \Omega_z Ω z ) at t = 16 t = 16 t = 16 using conservative and non-conservative metrics for MEG6 and MIG4 schemes.
u = 1 − C ( y − y c ) U ∞ R exp ( − r 2 / 2 ) u = 1 - \frac{C(y-y_c)}{U_\infty R}\exp\left(-r^2/2\right) u = 1 − U ∞ R C ( y − y c ) exp ( − r 2 /2 )
v = C ( x − x c ) U ∞ R 2 exp ( − r 2 / 2 ) v = \frac{C(x-x_c)}{U_\infty R^2}\exp\left(-r^2/2\right) v = U ∞ R 2 C ( x − x c ) exp ( − r 2 /2 )
p = 1 − γ M 2 C 2 U ∞ 2 R 2 exp ( − r 2 ) p = 1-\gamma M^2\frac{C^2}{U_\infty^2R^2}\exp\left(-r^2\right) p = 1 − γ M 2 U ∞ 2 R 2 C 2 exp ( − r 2 )
r 2 = ( x − x c ) 2 + ( y − y c ) 2 (52) r^2 = (x-x_c)^2+(y-y_c)^2 \tag*{(52)} r 2 = ( x − x c ) 2 + ( y − y c ) 2 (52)
where ( x c , y c ) = ( 8 , 8 ) (x_c,y_c)=(8,8) ( x c , y c ) = ( 8 , 8 ) are the coordinates of vortex core center. R R R denotes the vortex core radius. The value of non-dimensional vortex core strength C U ∞ R \frac{C}{U_\infty R} U ∞ R C is taken as 0.02. The freestream Mach number M M M is set to 0.1.
Figure 8 b shows the swirl velocity profiles (y-direction velocity) along y = 8 y=8 y = 8 computed using freestream preserving and non-freestream preserving metric schemes in comparison to the exact solution. The blue triangles and the black circles can be noted to follow close to the exact solution, unlike the solution corresponding to the non freestream scheme. A similar conclusion can be drawn from the vorticity contours presented in Figure 8 c-Figure 8 d. While MEG6 and MIG4 conservative approaches preserve the vortex shape and its surrounding field, the solution computed using non-conservative compact fourth-order schemes yields an unphysical solution. This test has successfully demonstrated the vortex-preserving nature of the MEG6 and MIG4 conservative metric approaches.
Double Mach reflection
Through this test case, the freestream preservation property of the MEG6 and MIG4 schemes is further accessed in the presence of shock waves and shear layers in the solution field. The problem comprises a planar shock wave moving towards a compression ramp. The ramp is inclined at 30 degrees relative to the shock. The moving shock wave interacts with the wall to form two triple points, two reflected shocks, two Mach stems, and a slip-stream. In order to simplify the computational domain and grid, the planar shock wave is inclined while keeping the ramp wall horizontal; this consequently makes the domain rectangular. Simulations are performed on a domain size of [ 0 , 3 ] × [ 0 , 1 ] [0,3]\times[0,1] [ 0 , 3 ] × [ 0 , 1 ] at a resolution of 768 × 256 768\times256 768 × 256 . The grid is randomized in the central portion of the domain by randomly moving the grid nodes in both x x x and y y y directions by a maximum distance of fifty percent of the uniform grid spacing. The maximum included angle of the resulting mesh in the entire domain is close to 200 degrees, making the grid highly skewed and non-uniform. A closeup view of the randomized grid is shown in Figure 9 a. The initial conditions for this test case are:
Figure 9. (a) 768 × 256 2D grid used for the simulation, (b,c,d,e) Plots of density contours using conservative and non-conservative metrics for MEG6 and MIG4 schemes. Blow-up view of the shear layer corresponding to (d,e) conservative metrics approach are also shown at the bottom of the image. (f) Close-up view of the shear layer region, corresponding to the results obtained from the WENO-Z simulation employing uniform grid.
( ρ , u , v , p ) = { ( 8 , 8.25 cos 30 ∘ , − 8.25 sin 30 ∘ , 116.5 ) , x < 1 / 6 + y tan 60 ∘ ( 1.4 , 0 , 0 , 1 ) , x > 1 / 6 + y tan 60 ∘ (53) (\rho,u,v,p)=
\begin{cases}
(8,8.25\cos30^\circ,-8.25\sin30^\circ,116.5), & x<1/6+\frac{y}{\tan60^\circ} \\
(1.4,0,0,1), & x>1/6+\frac{y}{\tan60^\circ}
\end{cases} \tag*{(53)} ( ρ , u , v , p ) = { ( 8 , 8.25 cos 3 0 ∘ , − 8.25 sin 3 0 ∘ , 116.5 ) , ( 1.4 , 0 , 0 , 1 ) , x < 1/6 + t a n 6 0 ∘ y x > 1/6 + t a n 6 0 ∘ y (53)
The boundary conditions are as follows. Post-shock flow conditions are set at the left boundary, and zero-gradient conditions are imposed on the right boundary. At the bottom boundary, reflecting boundary conditions are used from x = 1 / 6 x=1/6 x = 1/6 to x = 3.0 x=3.0 x = 3.0 and post-shock conditions for rest of the region i.e., x ∈ [ 0 , 1 / 6 ] x\in[0,1/6] x ∈ [ 0 , 1/6 ] . A time-varying boundary condition is imposed on the top with pre- and post-shock conditions to the left and right of the shock, respectively, to accommodate the shock motion. The flow is simulated until an end time of t = 0.2 t=0.2 t = 0.2 .
Figure 9 b-Figure 9 d shows density contours at t = 0.2 t=0.2 t = 0.2 obtained using MEG6 and MIG4 schemes with freestream-preserving and non-freestream preserving metrics. The leftover errors corresponding to the non-freestream preserving schemes can be seen in the central region of the solution as rough patches in Figure 9 b-Figure 9 c. Interestingly the errors corresponding to MIG4 are minimal and significantly less compared to the MEG6 Non-FPP approach (Figure 9 c). This might be attributed to the accuracy of implicit gradient values used in estimating the metric terms of the MIG4-based derivatives and interpolations. On the other hand, with conservative metric terms evaluated using MEG6 and MIG4 schemes, the solution in the central region can be seen unaffected by the grid distortion. Furthermore, the original solution is noted to be preserved even in the presence of shocks. In addition, the bottom right of the figure illustrates the outcome of a WENO-Z simulation for comparison with the current schemes. The simulation was conducted utilizing a uniform grid at the same resolution. The variations in the shear layer characteristics between the current schemes and the WENO-Z scheme demonstrate the enhanced resolving capabilities of the current schemes. This concludes the discussion on demonstrating the freestream and vortex-preserving nature of the MEG6 and MIG4 schemes. The use of these schemes on dynamically deforming meshes is explored next.
Application to dynamically deforming meshes
In this section, we examine the usage of MEG6 and MIG4 schemes to simulate flows through dynamically deforming mesh environments using three canonical test cases, namely ‘3-D uniform flow’, ‘stationary vortex,’ and ‘doubly periodic shear layer.’ The time derivative is split into two parts using the chain rule described in Eqn. (14) . To ensure the geometric conservation law (GCL) which is a necessary condition for freestream preservation, the term ( 1 J ) t \left(\frac{1}{J}\right)_{t} ( J 1 ) t is computed using Eqn. (16) . The mesh velocities are computed analytically for all the test cases presented in this section. The corresponding expressions are presented while describing the case.
Three-dimensional uniform flow on deforming sinusoidal grid
Firstly, we start with the trivial case of three-dimensional uniform flow. The flow is simulated in a dynamically moving mesh environment with periodic boundary conditions on all sides. The initial and boundary conditions for this test case are the same as that of the conditions described in § 8.1.1 . Inviscid calculations are performed using both freestream and non-freestream preserving metric approaches. The time-dependent location of the grid nodes for the simulation is given by:
x i , j , k ( t ) = x min + Δ x o [ i + A x sin ( 2 π ω t ) sin n x y π j Δ y o L y sin n x z π k Δ z o L z ] y i , j , k ( t ) = y min + Δ y o [ j + A y sin ( 2 π ω t ) sin n y x π i Δ x o L x sin n y z π k Δ z o L z ] z i , j , k ( t ) = z min + Δ z o [ k + A z sin ( 2 π ω t ) sin n z x π i Δ x o L x sin n z y π j Δ y o L y ] (54) \begin{aligned}
x_{i,j,k}(t) &= x_{\min} + \Delta x_o \left[i + A_x \sin(2\pi\omega t)\sin\frac{n_{xy}\pi j\Delta y_o}{L_y}\sin\frac{n_{xz}\pi k\Delta z_o}{L_z}\right] \\
y_{i,j,k}(t) &= y_{\min} + \Delta y_o \left[j + A_y \sin(2\pi\omega t)\sin\frac{n_{yx}\pi i\Delta x_o}{L_x}\sin\frac{n_{yz}\pi k\Delta z_o}{L_z}\right] \\
z_{i,j,k}(t) &= z_{\min} + \Delta z_o \left[k + A_z \sin(2\pi\omega t)\sin\frac{n_{zx}\pi i\Delta x_o}{L_x}\sin\frac{n_{zy}\pi j\Delta y_o}{L_y}\right] \tag*{(54)}
\end{aligned} x i , j , k ( t ) y i , j , k ( t ) z i , j , k ( t ) = x m i n + Δ x o [ i + A x sin ( 2 π ω t ) sin L y n x y π j Δ y o sin L z n x z π k Δ z o ] = y m i n + Δ y o [ j + A y sin ( 2 π ω t ) sin L x n y x π i Δ x o sin L z n y z π k Δ z o ] = z m i n + Δ z o [ k + A z sin ( 2 π ω t ) sin L x n z x π i Δ x o sin L y n z y π j Δ y o ] (54)
Taking the analytical derivative of the above expressions, the following grid time-dependent deformation velocity expressions are obtained:
x i , j , k ′ ( t ) = 2 π ω Δ x o A x cos ( 2 π ω t ) sin n x y π j Δ y o L y sin n x z π k Δ z o L z , y i , j , k ′ ( t ) = 2 π ω Δ y o A y cos ( 2 π ω t ) sin n y x π i Δ x o L x sin n y z π k Δ z o L z , z i , j , k ′ ( t ) = 2 π ω Δ z o A z cos ( 2 π ω t ) sin n z x π i Δ x o L x sin n z y π j Δ y o L y , (55) \begin{aligned}
x'_{i,j,k}(t) &= 2\pi\omega\Delta x_o A_x\cos(2\pi\omega t)\sin\frac{n_{xy}\pi j\Delta y_o}{L_y}\sin\frac{n_{xz}\pi k\Delta z_o}{L_z}, \\
y'_{i,j,k}(t) &= 2\pi\omega\Delta y_o A_y\cos(2\pi\omega t)\sin\frac{n_{yx}\pi i\Delta x_o}{L_x}\sin\frac{n_{yz}\pi k\Delta z_o}{L_z}, \\
z'_{i,j,k}(t) &= 2\pi\omega\Delta z_o A_z\cos(2\pi\omega t)\sin\frac{n_{zx}\pi i\Delta x_o}{L_x}\sin\frac{n_{zy}\pi j\Delta y_o}{L_y}, \tag*{(55)}
\end{aligned} x i , j , k ′ ( t ) y i , j , k ′ ( t ) z i , j , k ′ ( t ) = 2 π ω Δ x o A x cos ( 2 π ω t ) sin L y n x y π j Δ y o sin L z n x z π k Δ z o , = 2 π ω Δ y o A y cos ( 2 π ω t ) sin L x n y x π i Δ x o sin L z n y z π k Δ z o , = 2 π ω Δ z o A z cos ( 2 π ω t ) sin L x n z x π i Δ x o sin L y n z y π j Δ y o , (55)
where, i i i , j j j , k k k , Δ x o \Delta x_o Δ x o , Δ y o \Delta y_o Δ y o , Δ z o \Delta z_o Δ z o , x min x_{\min} x m i n , y min y_{\min} y m i n , z min z_{\min} z m i n assume their usual meanings described in Eqn. (51) . The grid resolution for the simulation is set to 32 3 32^3 3 2 3 . The values of the rest of the parameters are: A x = A y = A z = 1.5 A_x=A_y=A_z=1.5 A x = A y = A z = 1.5 , L x = L y = L z = 12 L_x=L_y=L_z=12 L x = L y = L z = 12 , and n x y = n y z = ⋯ = 4 n_{xy}=n_{yz}=\cdots=4 n x y = n y z = ⋯ = 4 . The grid deformation oscillation frequency ω \omega ω is set to 1. As the mesh undergoes deformation, the maximum included angle in the domain reaches a maximum value of ≈ 160 \approx160 ≈ 160 .
Contours of y y y -velocity and the corresponding grid at t = 5.25 t=5.25 t = 5.25 are shown in Figure 10 . The contours clearly indicate that the non-conservative metrics (non-FP) approach feeds error into the solution while the conservative metrics (FP) approach does not. Figure 10 c shows the L 2 L^2 L 2 norm errors computed using MEG6 and MIG4 schemes. The errors corresponding to the conservative metric formulation can be noted to stay close to machine zero, while the non-conservative approach does not. This clearly demonstrates that the present schemes satisfy the geometric conservation law and are thus freestream preserving even on dynamically deforming meshes.
Figure 10. Snapshots of 20 × \times × 20 three dimensional deforming sinusoidal grid with y-velocity contours on the surface using (a) non conservative (non-FP) metrics and (b) conservative (FP) metrics for MEG6 and MIG4 schemes. (c) L 2 L^2 L 2 norm error in y and z velocities using different different metric schemes.
Stationary vortex on a three-dimensional deforming mesh
In this test case, the vortex preservation nature of MEG6 and MIG4 schemes is shown in a moving grid environment. A stationary columnar vortex is initialized at the center of a three-dimensional, cubical domain of dimensions [ − 8 , 8 ] × [ − 8 , 8 ] × [ − 8 , 8 ] [-8,8] \times[-8,8] \times[-8,8] [ − 8 , 8 ] × [ − 8 , 8 ] × [ − 8 , 8 ] . In each direction, thirty-two cells were used. The grid is set to deform in time according to the same equations presented in the previous test case on three-dimensional uniform flow (§ 8.2.1 ). The oscillation frequency of the grid is set to ω = 1 \omega= 1 ω = 1 .
Inviscid calculations were performed until an end-time of t e n d = 8 t_{\mathrm{end}} = 8 t end = 8 using MEG6 and MIG4 schemes. The grid undergoes eight deformation cycles before the end time. Figure 11 a-Figure 11 b shows the grid and z z z -vorticity contours computed using the MIG4 scheme (with conservative metrics approach) at two different time instances. The vortex shape can be noted to stay intact and unaffected by the grid motion throughout. Figure 11 c shows the computed and exact swirl velocity profiles along the mid-horizontal line. Both MEG6 and MIG4 approaches can be noted to be in excellent agreement with the theoretical solution.
Figure 11. (a,b) Instantaneous snapshots of vorticity contours collected on the surface corresponding cells on the 16th grid index in the ζ \zeta ζ -direction. (c) Swirl velocity plot along NZ/2 and y = 8 y = 8 y = 8 at t = 8 t = 8 t = 8 .
Double periodic shear-layer on dynamic mesh
In this test case, the freestream preserving nature of the MEG6 and MIG4 schemes in the presence of viscous stresses are tested. The case consists of two shear layers initially parallel to each other that evolve to produce two large vortices at t = 1 t = 1 t = 1 . Viscous forces are dominant near the shear layer in this test case. The non-dimensional parameters concerning the flow are, Re = 1 × 10 4 \operatorname{Re} = 1 \times10^{4} Re = 1 × 1 0 4 and M = 0.1 M = 0.1 M = 0.1 . The value of γ \gamma γ is taken as 5 / 3 5/3 5/3 . The initial conditions for the flow are:
ρ = 1 γ M 2 , (56) \rho= \frac{1}{\gamma M^{2}}, \tag*{(56)} ρ = γ M 2 1 , (56)
u = { tanh ( 80 × ( y − 0.25 ) ) , if ( y ≤ 0.5 ) , tanh ( 80 × ( 0.75 − y ) ) , if ( y > 0.5 ) , (57) u =
\begin{cases}
\tanh(80 \times(y - 0.25)), & \text{if } (y \le0.5), \\
\tanh(80 \times(0.75 - y)), & \text{if } (y > 0.5),
\end{cases} \tag*{(57)} u = { tanh ( 80 × ( y − 0.25 )) , tanh ( 80 × ( 0.75 − y )) , if ( y ≤ 0.5 ) , if ( y > 0.5 ) , (57)
v = 0.05 × sin ( 2 π ( x + 0.25 ) ) (58) v = 0.05 \times\sin(2\pi(x + 0.25)) \tag*{(58)} v = 0.05 × sin ( 2 π ( x + 0.25 )) (58)
T = 1. (59) T = 1. \tag*{(59)} T = 1. (59)
Simulations are performed on a two-dimensional deforming grid of resolution 360 × 360 360 \times360 360 × 360 using MEG6 and MIG4 schemes with the freestream preserving metrics. The spatial positions of mesh nodes and their respective velocities in time are given by Eqn. (60) and Eqn. (61) respectively, as described in Ref-[54 ] .
x i , j ( τ ) = x min + Δ x 0 [ ( i − 1 ) + A x sin ( 2 π ω τ ) sin ( n x π ( j − 1 ) Δ y 0 L y + i ϕ x I L − 1 ) ] , y i , j ( τ ) = y min + Δ y 0 [ ( j − 1 ) + A y sin ( 2 π ω τ ) sin ( n y π ( i − 1 ) Δ x 0 L x + i ϕ y J L − 1 ) ] (60) \begin{aligned}
x_{i,j}(\tau) &= x_{\min} + \Delta x_{0}\left[(i-1) + A_x \sin(2\pi\omega\tau)\sin\left(\frac{n_x\pi(j-1)\Delta y_{0}}{L_y} + \frac{i\phi_x}{IL-1}\right)\right],\\
y_{i,j}(\tau) &= y_{\min} + \Delta y_{0}\left[(j-1) + A_y \sin(2\pi\omega\tau)\sin\left(\frac{n_y\pi(i-1)\Delta x_{0}}{L_x} + \frac{i\phi_y}{JL-1}\right)\right] \tag*{(60)}
\end{aligned} x i , j ( τ ) y i , j ( τ ) = x m i n + Δ x 0 [ ( i − 1 ) + A x sin ( 2 π ω τ ) sin ( L y n x π ( j − 1 ) Δ y 0 + I L − 1 i ϕ x ) ] , = y m i n + Δ y 0 [ ( j − 1 ) + A y sin ( 2 π ω τ ) sin ( L x n y π ( i − 1 ) Δ x 0 + J L − 1 i ϕ y ) ] (60)
x τ = 2 π ω Δ x 0 A x cos ( 2 π ω τ ) sin ( n x π ( j − 1 ) Δ y 0 L y + i ϕ x I L − 1 ) x_{\tau}=2\pi\omega\Delta x_0 A_x\cos(2\pi\omega\tau)\sin\left(\frac{n_x\pi(j-1)\Delta y_0}{L_y}+\frac{i\phi_x}{IL-1}\right) x τ = 2 π ω Δ x 0 A x cos ( 2 π ω τ ) sin ( L y n x π ( j − 1 ) Δ y 0 + I L − 1 i ϕ x )
y τ = 2 π ω Δ y 0 A y cos ( 2 π ω τ ) sin ( n y π ( i − 1 ) Δ x 0 L x + i ϕ y J L − 1 ) (61) y_{\tau}=2\pi\omega\Delta y_0 A_y\cos(2\pi\omega\tau)\sin\left(\frac{n_y\pi(i-1)\Delta x_0}{L_x}+\frac{i\phi_y}{JL-1}\right) \tag*{(61)} y τ = 2 π ω Δ y 0 A y cos ( 2 π ω τ ) sin ( L x n y π ( i − 1 ) Δ x 0 + J L − 1 i ϕ y ) (61)
The length parameters L x L_x L x and L y L_y L y are considered 1 unit each. The mesh oscillation frequency ω \omega ω is set to 1, enabling the mesh to deform through one full cycle during the simulation (t e n d = 1 t_{\mathrm{end}}=1 t end = 1 ).
E k = 1 L x L y ∫ 0 L y ∫ 0 L x ρ u 2 + v 2 2 d x d y E_k=\frac{1}{L_xL_y}\int_{0}^{L_y}\int_{0}^{L_x}\rho\frac{u^2+v^2}{2}\,\mathrm{d}x\,\mathrm{d}y E k = L x L y 1 ∫ 0 L y ∫ 0 L x ρ 2 u 2 + v 2 d x d y
E = 1 L x L y ∫ 0 L y ∫ 0 L x ρ Ω ⋅ Ω 2 d x d y (62) \mathcal{E}=\frac{1}{L_xL_y}\int_{0}^{L_y}\int_{0}^{L_x}\rho\frac{\boldsymbol{\Omega}\cdot\boldsymbol{\Omega}}{2}\,\mathrm{d}x\,\mathrm{d}y \tag*{(62)} E = L x L y 1 ∫ 0 L y ∫ 0 L x ρ 2 Ω ⋅ Ω d x d y (62)
Figure 12 shows the z z z -vorticity field at four equally spaced time instances during the simulation. Two large vortices of opposing angular velocity can be seen to evolve as time progresses. The dynamic mesh motion can be seen to not show any effect on the flow contours (for comparison against the stationary grid DNS solution, please refer to [23 ] ). The evolution of Kinetic Energy (KE) and Enstrophy (E \mathcal{E} E ) in the entire computational domain is tracked in time for both MEG6 and MIG4 schemes. The expressions to compute these quantities are provided in Eqn. (62) . Evolution plots of these quantities are shown in Figure 12 e-Figure 12 f in comparison to the solutions corresponding to a stationary grid simulation and the incompressible flow solution of Clausen [55 ] , both simulated on a uniform grid with a resolution of on 512 × 512 512 \times512 512 × 512 . An excellent agreement between the reference solutions and the current calculations can be noted in both KE and Enstrophy plots. This demonstrates that a Navier-Stokes solution computed using the higher accuracy schemes, MEG6 and MIG4, will resist the errors associated with the dynamic grid motion.
Figure 12. (a,b,c,d) Snapshots of instantaneous vorticity contours collected at four different time instances with every 10th point of the grid overlain on the solution computed using MIG4 scheme. Evolution of (e) Kinetic energy (KE) and (f) Enstrophy computed using MEG6 and MIG4 schemes compared against the incompressible solution of Clausen [55 ] .
Mach 1.35 under-expanded supersonic round jet
Shock containing supersonic jets emit intense aeroacoustic noise at distinct frequencies due to the phenomenon termed ‘screech’. The nearfield noise levels due to screech in a free single jet configuration typically range between 120dB-180dB. Although the physical mechanism of screech tone production is still not completely understood, it is a well-established fact that it occurs as the consequence of aeroacoustic resonance [30 , 56 ] . According to the classical feedback loop theory of Powell [29 , 57 ] , firstly, a series of small flow disturbances are initiated at the nozzle lip region. These disturbances travel downstream (in the form of Kelvin-Helmholtz instabilities) towards the shock cells to interact with the oblique shocks. As the disturbances interact with the shocks (generally after the second or third shock cells), they undergo strong amplification and radiate intense acoustic waves, which drive the entire jet plume to resonate and consequently oscillate. Some of the produced acoustic waves travel upstream towards the nozzle lip through the atmosphere outside the jet to close the feedback loop. The screech is sustained with the continuous excitation of the shear layer (receptivity process) from these emission waves. Therefore, since the screech depends on several flow features, such as shock cells, shear layer, vortical structures, and acoustic waves, it is crucial to capture all these features with sufficient fidelity in order to simulate its effect through computations. The main objective of this section is to test the efficacy of MEG6 and MIG4 schemes in resolving ‘screech’ and ‘unsteady jet oscillation mode’ of an under-expanded supersonic jet. Simulations are also performed using WENO-Z [58 ] scheme for comparison against the present scheme.
An under-expanded supersonic jet ejecting from a converging, choked nozzle operating at a Nozzle Pressure Ratio (NPR) of 2.97 is considered as the test case. The flow simulated in the present computations is compared with the nearfield microphone data of Ponton et al. [52 ] . The experimental setup used in their work consists of a settling chamber attached to an axisymmetric converging nozzle with an exit diameter (D) equal to one inch. The lip thickness of the nozzle exit is 0.6 D 0.6D 0.6 D . The flow diagnostics include a microphone placed on the nozzle exit plane at a radial location of two nozzle diameters away from the nozzle axis. Figure 13 a shows the dimensions of the computational domain used to simulate the flow. The domain is axisymmetric and consists of four blocks. The jet Reynolds number based on the nozzle diameter and the jet exit conditions is R e D = 1.144 × 10 6 Re_D = 1.144 \times10^6 R e D = 1.144 × 1 0 6 . The flow is non-dimensionalized based on the ambient atmospheric conditions (T ∞ = 293 T_\infty= 293 T ∞ = 293 K, p ∞ = 101325 p_\infty= 101325 p ∞ = 101325 Pa). The nozzle exit conditions are theoretically computed using Eqns. (63) . The computed inlet conditions are directly provided as an inlet boundary condition on the nozzle exit plane. The effect of the boundary layer and turbulent fluctuations developed inside the annular region are not considered. Although this does not replicate the experimental conditions accurately, the effect of annular fluctuations in the present case was believed to show little effect on the screech feedback loop based on the study by [59 , 60 ] . To prevent spurious reflections from entering in to the computational domain, sponge zones are employed at the far-field boundaries in the regions marked in Figure 13 . These zones are implemented by incorporating a dissipative source term into the governing equations as outlined in the methodology of Bodony [61 ] .
Figure 13. (a) Computational domain used, (b) Butterfly mesh topology adapted to avoid singularity at the axis, visualized on x = 2 D x = 2D x = 2 D plane.
p e p ∞ = 1 γ [ 2 + ( γ − 1 ) M j 2 γ + 1 ] γ γ − 1 \frac{p_e}{p_\infty} = \frac{1}{\gamma}\left[\frac{2+(\gamma-1)M_j^2}{\gamma+1}\right]^{\frac{\gamma}{\gamma-1}} p ∞ p e = γ 1 [ γ + 1 2 + ( γ − 1 ) M j 2 ] γ − 1 γ
ρ e ρ ∞ = γ ( γ + 1 ) p e 2 ( T n / T ∞ ) \frac{\rho_e}{\rho_\infty} = \frac{\gamma(\gamma+1)p_e}{2(T_n/T_\infty)} ρ ∞ ρ e = 2 ( T n / T ∞ ) γ ( γ + 1 ) p e
u e a ∞ = 2 ( T n / T ∞ ) γ + 1 , v e = w e = 0 (63) \frac{u_e}{a_\infty} = \sqrt{\frac{2(T_n/T_\infty)}{\gamma+1}}, \qquad v_e=w_e=0 \tag*{(63)} a ∞ u e = γ + 1 2 ( T n / T ∞ ) , v e = w e = 0 (63)
In this test case, three grids were utilized with resolutions of 10, 13, and 20 million cells to examine the independence of the results from the choice of grid. To prevent a singularity at the nozzle axis, the butterfly topology was employed, as illustrated in Figure 13 b. The grid was clustered towards the axis and exit of the nozzle, where the key flow features are located. Along the axial direction of the geometry, a minimum grid spacing of Δ x = 0.0085 D \Delta x = 0.0085D Δ x = 0.0085 D , 0.0075 D 0.0075D 0.0075 D , and 0.0065 D 0.0065D 0.0065 D was maintained for the 10, 13, and 20 million grids, respectively. The grid spacing was linearly increased along the x x x -direction, with the maximum grid spacing not exceeding 0.1 D 0.1D 0.1 D in all three grids. The grid was uniformly distributed along the azimuthal direction, with 80, 100, and 120 divisions for the 10, 13, and 20 million grids, respectively. The grid distribution along the radial direction was consistent across all three meshes used in the study. Along the radial direction, a minimum spacing of 0.0075 D 0.0075D 0.0075 D was used close to the axis, with a growth rate of ≈ 4 % \approx4\% ≈ 4% , resulting in a total of 120 cells. Computations were performed with a Δ t a ∞ / D = 2 × 10 − 3 \Delta t a_\infty/D = 2 \times10^{-3} Δ t a ∞ / D = 2 × 1 0 − 3 until an end-time of t a ∞ / D = 800 t a_\infty/D = 800 t a ∞ / D = 800 (400, 000 iterations). All the statistics were collected after the flow reached a statistically steady state, which is after t a ∞ / D = 400 t a_\infty/D = 400 t a ∞ / D = 400 . All the simulations were run in parallel on a single Nvidia A100 GPU. The simulations corresponding to 13 million grid were completed in a span of 34.0 and 41.7 hours using MEG6 and MIG4 schemes, respectively. More details about the GPU acceleration will be discussed in the next section.
Given the high Reynolds number in the present case, Large Eddy Simulations (LES) were conducted on course grids. In conventional Large Eddy Simulation (LES) approaches, the effect of unresolved sub-grid-scale (SGS) flow features is modeled through an explicit SGS model while the larger scales are resolved by the grid [62 ] . However, in the present simulations, we solve the unfiltered Navier-Stokes equations directly and utilize the inherent numerical dissipation of the MEG6/MIG4 schemes to implicitly mimic the effects of SGS models. This approach is commonly referred to as “implicit-LES” or, specifically in the present case, “Monotonically integrated Implicit LES (MILES)” [63 ] because of the use of the Monotonicity Preserving limiter in the inviscid flux discretization and its high spectral resolution. A similar LES strategy was also employed in the study performed by Ahn et al. [59 ] on twin-jet configurations.
Instantaneous and average flow features
Figure 14a -Figure 14b shows the time-averaged axial density and x x x -velocity profiles on three different grid resolutions. The peaks and troughs in the profiles suggest the presence of shock cells. The solution has converged sufficiently at a grid resolution of 13 million cells, especially in the region corresponding to the first four shock cells. It can be noted that the solution corresponding to the 10 million grid fails to capture the peaks and troughs of the density and velocity profiles between the range of x / D = 0 x/D = 0 x / D = 0 to 4, which is critical for the screech phenomenon. Thus, the results corresponding to 10 million grid are not considered for the analysis. Figure 14c -Figure 14d shows the instantaneous and mean contours of density and Mach number. Various flow features such as shocks, expansion fans, shear-layer, vortices, and induced density fluctuations can be noted in the pictures. The first two shock cells appear clearly defined, but progressively downstream the structure of shock cells become less distinct due to the growth of instability waves and turbulent mixing. The non-dimensional shock cell spacing in the jet is a crucial length scale in supersonic jets as it dictates the location of effective screech noise source [29 ] . The first shock cell spacing denoted by λ 1 \lambda_1 λ 1 , can be calculated theoretically using the formulation proposed by Pack [64 ] through Eqn. (64) approximately.
λ 1 = 2.695 ( N P R 0.291 − 1.205 ) (64) \lambda_1 = 2.695\sqrt{\left(\mathrm{NPR}^{0.291} - 1.205\right)} \tag*{(64)} λ 1 = 2.695 ( NPR 0.291 − 1.205 ) (64)
Plugging in N P R = 2.97 \mathrm{NPR}=2.97 NPR = 2.97 in to the equation, results in λ 1 ≈ 1.1 \lambda_1 \approx1.1 λ 1 ≈ 1.1 . On the other hand in the present simulations, as can be seen in the time-averaged density and velocity plots shown in Figure 14a ,Figure 14b ), the first shock cell spacing was obtained to be λ 1 = 1.15 \lambda_1 = 1.15 λ 1 = 1.15 . A good agreement is observed between the theoretical calculations and the numerical results. Subsequently the shock cell spacing downstream was noted to slowly decrease with λ 2 = 1.15 \lambda_2 = 1.15 λ 2 = 1.15 , λ 3 = 1.0 \lambda_3 = 1.0 λ 3 = 1.0 , λ 4 = 1.0 \lambda_4 = 1.0 λ 4 = 1.0 , and λ 5 = 0.9 \lambda_5 = 0.9 λ 5 = 0.9 . In Figure 14c ,Figure 14d ) the shear layer instabilities initiated near the nozzle lip can be seen to grow progressively in scale as they move downstream to interact with the shock cells. Consequently, local acoustic disturbances are produced, which travel upstream to close the feedback loop causing screech, as explained before. To better visualize this phenomenon, movies of density field are provided in the supplementary materials section 10. From the time-resolved data shown in Movie-1 of Sec. 10, the evolution of Kelvin-Helmholtz instabilities, the interaction of shear layer vortices with the shock cells, emitted acoustic radiation, and the consequent jet oscillation behavior can be remarked.
A supersonic jet has multiple noise sources [30 , 65 , 66 ] . The above-mentioned acoustic resonance, shock shear layer interaction, and the jet mixing are part of the generation mechanisms behind different the various noise components. The tones corresponding to screech noise are predominant and can be characterized in the upstream region of the jet [29 , 67 , 68 , 69 ] . Figure 15a presents a snapshot of the instantaneous 3-D jet surface visualized through density iso-surface, along with the pressure fluctuation field surrounding it. The figure illustrates the progressive amplification of three-dimensional hydrodynamic disturbances on the jet surface close to the nozzle exit. In Figure 15b , the instantaneous pressure fluctuation contours and the mean Sound Pressure Levels (SPL) are displayed on the z = 0 z = 0 z = 0 plane. The pressure fluctuation field immediately close to the jet surface appears choppy and seemingly random; however, a clear sinusoidal-type pattern can be observed in the upstream region of the jet just above the nozzle, as indicated by the dashed white box in Figure 15 . Given the pronounced sinusoidal nature of the wave pattern and the prevalence of screech in the upstream location, it can be inferred that these fluctuations correspond to screech. The lower half of Figure 15 displays isolines of SPL, with SPL near the lip of the nozzle observed to be close to 150dB. The solutions presented in Figure 14 correspond to the MIG4 scheme; however, similar results were also observed with the MEG6 scheme.
Figure 14. Time averaged axial profiles of density (a) and x-velocity (b) at various grid resolutions. The length of first shock cell spacing λ 1 \lambda_1 λ 1 is also indicated in the figures (a) and (b). Instantaneous and mean density contours (c) and local Mach number (d) contours of M j = 1.35 M_j = 1.35 M j = 1.35 jet solution plotted on z / D = 0 z/D = 0 z / D = 0 plane employing a grid resolution of 20M. All the plots shown here are based on MIG4 scheme.
Figure 15. (a) Visualization of the jet surface using an iso-surface of density corresponding to ρ / ρ ∞ = 1.2 \rho/\rho_\infty= 1.2 ρ / ρ ∞ = 1.2 . The figure also illustrates the circular pressure ripples surrounding the jet planes y = 0 y = 0 y = 0 and x = − 2 D x = -2D x = − 2 D . (b) Instantaneous pressure fluctuations (upper half) and overall sound pressure levels (lower half) are shown.
Comparison of acoustic data with experiments
To evaluate the screech tones and amplitudes captured in the flowfield (Figure 15 ), a Fourier analysis of the nearfield pressure data is conducted and compared to the experiments of Ponton et al. [52 ] . Given the non-axisymmetric nature of screech pressure fluctuations at the present jet Mach number as previously reported in studies [59 , 67 ] , time-series data is gathered at multiple azimuthal locations on the jet exit plane. A total of 20 equally spaced pressure probes (computational) are placed at two nozzle diameters from the nozzle axis on the jet exit plane, as shown in Figure 16 e. In contrast, the experiments of Ponton et al. [52 ] only utilized one microphone placed at an arbitrary azimuthal location two diameters away from the nozzle axis on the jet exit plane. The Fourier analysis of the time-series data collected at various azimuthal locations is then compared to the pressure spectra obtained in the experiments [52 ] .
Figure 16. Comparison of pressure spectra of probe data collected at various azimuthal angles on the nozzle exit plane 2 D 2D 2 D away from the nozzle axis, using (a,b) MEG6, (c,d) MIG4, and (e,f) WENO-Z scheme, with the experimental data of Ponton et al. [52 ] . The figure also includes (g) a plot illustrating the variation of the amplitude of the fundamental tone with azimuthal angle, using data from twenty probes and the various schemes.
Figure 16 (a-Figure 16 d) presents pressure spectra of probe data using the MEG6, MIG4, and WENO-Z schemes on a 13 million cell grid at various azimuthal locations. The accuracy of capturing the fundamental screech frequency and the first harmonic at all azimuthal locations is observed in computations performed on both 13 and 20 million cell grids. As an illustration, four sample pressure spectra are displayed at different azimuthal angles, with the peak of the fundamental tone indicated by a dashed circle. The Strouhal number remains constant across all azimuthal angles, as summarized in Table 3 for the fundamental screech tone at different grid resolutions using the MEG6 and MIG4 schemes, showing a good agreement with experimental results. In addition to the screech, the plots also reveal the presence of the first harmonic at around S t ≈ 0.62 \mathrm{St} \approx0.62 St ≈ 0.62 and mixing noise component at S t ≈ 0.2 \mathrm{St} \approx0.2 St ≈ 0.2 . However, the WENO-Z scheme in Figure 16 (e,Figure 16 f) exhibited a fundamental tone at S t = 0.43 \mathrm{St} = 0.43 St = 0.43 which is significantly off from the experimental value. The inaccuracy can be attributed to the relatively poor spectral properties of the scheme.
Table 3. Summary of Strouhal numbers and average amplitudes of fundamental screech tones obtained at various grid resolutions employing MEG6, MIG4 and WENO-Z (only at 13M cell count) schemes. The screech amplitude corresponding to experiments presented in the table does not correspond to azimuthal average since only one microphone is employed in the experiments.
Despite the constant Strouhal number across various azimuthal probe locations, variations in amplitude can be observed in Figure 16 a-Figure 16 d. The screech amplitudes recorded at different azimuthal angles (θ \theta θ ) using the
MEG6, MIG4, and WENO-Z schemes are presented in Figure 16 g. The amplitude of the WENO-Z scheme maintains a consistent level, while the MEG6 and MIG4 schemes exhibit a fluctuating wavy pattern with a difference in amplitude between peaks and troughs greater than 15dB. The physical reasoning behind this observation is due to the flapping mode of the jet which will be discussed next in § 8.3.3 . Table 3 presents the azimuthal average of screech amplitudes for different grid resolutions using the MEG6 and MIG4 schemes, and a good agreement with experimental values is observed. This supports the effectiveness of both MEG6 and MIG4 schemes in resolving supersonic jet screech ‘frequencies’ and ‘amplitudes’.
Unsteady jet oscillation behaviour
Previously in § 8.3.2 , the amplitude variation depicted in Figure 16 indicated the presence of azimuthally asymmetric jet oscillations. However, the specific oscillation mode cannot be determined from those plots alone as they correspond to a data from single point. Previous research by Powell et al. [70 ] has determined that the jet should exhibit flapping B B B mode oscillations at the current Nozzle Pressure Ratio of 2.97. In order to accurately identify the jet oscillation mode in the present simulations, Fourier analysis was conducted on two-dimensional nearfield pressure data on plane x = − 2 D x=-2D x = − 2 D , which is a jet normal plane located two diameters upstream of the nozzle exit. The results from the MEG6 and WENO-Z methods are compared to each other along with experimental observations [52 , 70 ] .
In Figure 17 (a,Figure 17 c), the frequency and amplitude of pressure data collected along a circular line located two diameters away from the nozzle axis on the x = − 2 D x=-2D x = − 2 D plane are presented, utilizing the MEG6 and WENO-Z schemes. The ordinate of the plot represents the azimuthal angle θ \theta θ along the circle. The data reveals the presence of fundamental tones (marked with red arrows on top) at Strouhal numbers of 0.308 and 0.432, which are consistent with the observations made in the Fourier analysis presented in § 8.3.2 .
Figure 17. Pressure spectra (a,c) and phase variation of fundamental frequency S t = 0.308 St = 0.308 S t = 0.308 (b,d) along a circular line two diameters away from the nozzle axis on the x = − 2 D x = -2D x = − 2 D plane using MEG6 and WENO-Z schemes. The location of the fundamental frequency is marked with a red arrow on the top in figures (a) and (c). The phase shift of π \pi π in figure (b) illustrates the flapping nature of the jet as captured by the MEG6 scheme and in the experiments of Ponton et al. [52 ] . Black arrows in figure (a) indicate the azimuthal location at which this phase shift occurs.
The spectrum for the WENO-Z scheme in Figure 17 (c) appears fairly uniform at all azimuthal angles, whereas the MEG6 results in Figure 17 (a) exhibit two notches separated by an angular distance of π \pi π radians which are indicated by two black arrows. This suggests the presence of a plane of symmetry on the x = − 2 D x = -2D x = − 2 D surface. The phase angle (the argument of the Fourier transformation) at the fundamental tone for the MEG6 and WENO-Z schemes is plotted in Figure 17 (b,Figure 17 d). The MEG6 results show a step-like distribution with a step height equal to π \pi π radians, which is indicative of sinuous flapping behavior of the jet, where pressure fluctuations are separated by a phase difference of π \pi π radians about a plane of symmetry. In contrast, the WENO-Z results shown in Figure 17 (d) exhibited a constant phase value at all azimuthal locations, indicating an axisymmetric or toroidal oscillation mode (or A1 mode) of the jet, which ideally leads to axisymmetric pressure fluctuations. To better understand these aspects noted from the 1D line data, the Fourier amplitude and phase fields of 2D data from the plane at x = − 2 D x = -2D x = − 2 D are presented next.
Figure 18 illustrates the Fourier amplitudes and phase values computed on the x = − 2 D x = -2D x = − 2 D plane at the fundamental tone frequency, as determined by the MEG6 and WENO-Z schemes. It can be observed that the results obtained using the WENO-Z scheme exhibit a clear axisymmetric distribution of both amplitude and phase, which is not consistent with the flapping behavior observed in experiments [70 ] . In contrast, the amplitude levels for the MEG6 scheme, as shown in Figure 18 (a), displays a plane of symmetry, about which the jet flapping occurs. Additionally, a spiraling phase distribution, as seen in Figure 18 (b) for the MEG6 scheme, is a clear indication of the sinuous flapping mode. This conclusively confirms the efficacy of the MEG6 scheme in resolving the Flapping B mode observed by Powell et al. [70 ] in their experiments.
Figure 18. Fourier amplitude fields (a,c) and Fourier phase fields (b,d), corresponding to the fundamental frequency S t = 0.308 St = 0.308 S t = 0.308 on x = − 2 D x = -2D x = − 2 D plane using MEG6 and WENO-Z schemes. The contour distributions depicted in these figures indicate the presence of the flapping B-mode and A1-toroidal modes, captured by the MEG6 and WENO-Z schemes, respectively.
Proper Orthogonal Decomposition of density field
Proper Orthogonal Decomposition (POD) was performed on the fluctuations of the 2D density field collected on the x y xy x y -plane, within a window of x / D = [ 0 , 8 ] x/D = [0, 8] x / D = [ 0 , 8 ] and y / D = [ − 4 , 4 ] y/D = [-4, 4] y / D = [ − 4 , 4 ] , to identify the dominant unsteady coherent structures within the jet that contribute to the screech. The POD analysis in this Sec. is based on the snapshot technique described by Weiss in Ref-[71 ] and follows a similar approach to the analysis conducted by Chandravamsi et al. [72 ] . Firstly, a time series of ‘N’ (N = 1600 N = 1600 N = 1600 in the present case) evenly spaced instantaneous 2D density fluctuation field data (separated by Δ t a ∞ / D = 0.015 \Delta t a_\infty/D = 0.015 Δ t a ∞ / D = 0.015 ) is collected and reshaped to form a 2D solution matrix named A = [ ρ ′ ( x , y , t 1 ) , ρ ′ ( x , y , t 2 ) , . . . . ρ ′ ( x , y , t N ) ] \mathbf{A} = [\rho'(x, y, t_1), \rho'(x, y, t_2), ....\rho'(x, y, t_N)] A = [ ρ ′ ( x , y , t 1 ) , ρ ′ ( x , y , t 2 ) , .... ρ ′ ( x , y , t N )] . The data is reshaped in such a way that each column in A \mathbf{A} A corresponds to a ‘time-instance’ and each row ‘spatial location’. The covariance matrix C = A T A \mathbf{C} = \mathbf{A}^{T}\mathbf{A} C = A T A was then subjected to eigenvalue decomposition to find its eigenvalues ‘Λ i \Lambda_i Λ i ’ and eigenvectors E i \mathbf{E}_i E i , forming an orthogonal basis in the eigenspace where each eigenvalue represents the variance along the corresponding eigenvector. Finally, the POD modes (Φ i \mathbf{\Phi}_i Φ i ) and their corresponding time coefficients (a ~ \tilde{a} a ~ ) are evaluated using the eigenvectors and input flow data (ρ ′ ( x , y , t ) \rho'(x, y, t) ρ ′ ( x , y , t ) ) using the following relations:
Φ i = ∑ j = 1 N E i j ρ ′ ( x , y , t j ) ∥ ∑ j = 1 N E i j ρ ′ ( x , y , t j ) ∥ , and a ~ i = ( Φ i ) T A , i = 1 , 2 , … , N . (65) \mathbf{\Phi}_i = \frac{\sum_{j=1}^{N} E_i^j \rho'(x,y,t_j)}{\left\lVert\sum_{j=1}^{N} E_i^j \rho'(x,y,t_j)\right\rVert}, \quad\text{and} \quad\tilde{a}_i = (\mathbf{\Phi}_i)^T\mathbf{A}, \quad i = 1,2,\ldots,N. \tag*{(65)} Φ i = ∑ j = 1 N E i j ρ ′ ( x , y , t j ) ∑ j = 1 N E i j ρ ′ ( x , y , t j ) , and a ~ i = ( Φ i ) T A , i = 1 , 2 , … , N . (65)
The index ‘i i i ’ here represents the mode number. The modes are ordered based on their relative mode energy, calculated as R E i = Λ i × ( ∑ i = 1 N Λ i ) − 1 RE_i = \Lambda_i \times\left(\sum_{i=1}^{N}\Lambda_i\right)^{-1} R E i = Λ i × ( ∑ i = 1 N Λ i ) − 1 . As depicted in Figure 19 (a), amongst the first eight dominant modes displayed, the first mode itself accounts for ≈ 45 % \approx45\% ≈ 45% of the total energy. A noticeable decrease in energy can be observed following the first mode, implying that only a single dominant mode exists, and the majority of the jet’s unsteady dynamics are contained within mode-1. The normalized mode-1 shape is displayed in Figure 19 (b), along with annotations describing the locations of shock cells by white dashed lines. The shock cell spacings (λ \lambda λ ), as determined from Figure 14b , are indicated at the top. The mode shape exhibits symmetry about the jet axis, with a reversal in sign, indicating that the jet oscillations of the most energetic portion are oriented along the y y y -axis. The dominant fluctuations are observed in the region corresponding to the third, fourth, and fifth shock cells, suggesting that the shear layer structures along the jet surface experience significant amplification after their interaction with the third shock cell. Therefore, the effective source of the screech noise can be considered to be situated between the third and fifth shock cells. As depicted in Figure 19 (c), the Fourier analysis of the mode-1 time coefficients revealed a “pure tone” that precisely matches the screech frequency (S t = 0.308 St = 0.308 S t = 0.308 ) determined from the acoustic data in Sec. 8.3.2. This suggests that the oscillation frequency of the oblique shocks within the jet plume and the turbulent structures between the third and fifth shock cells are all operating at the same frequency as the screech.
Figure 19. (a) Mode energies of first eight POD modes, (b) Mode-1 shape with shock cell locations and spacing indicated, and (c) Power Spectral Density of mode-1 POD coefficients.
GPU acceleration model and speedup analysis
This section discusses the GPU parallelization model employed in the present work to implement the MEG6 and MIG4 schemes along with the performance results achieved on various GPUs. In presenting the performance details, a particular emphasis was laid on subjects such as ‘the contribution of various functions to the overall computational time’, ‘the effect of cell count’, ‘memory occupancy versus cell count’, and ‘the effect of working precision’.
In order to specify the parallelism on GPUs, the directive based ‘OpenACC’ programming language [73 ] is used in the present work. The use of OpenACC directives over the more popular ‘CUDA’ programming language is motivated by less code development time associated with OpenACC while still being able to achieve beneficial speedup results that are comparable to CUDA, as will be demonstrated soon. The details of OpenACC implementation are being skipped here for brevity. Interested readers are referred to the OpenACC API guide [74 ] and other resources available in their website [73 ] .
A high-level view of the computing model adapted for single GPU computations is pictorially illustrated in Figure 20 . It consists of a CPU-GPU pair connected via a PCI Express bus or an NVLink interconnect; the latter option which is an NVIDIA proprietary bus is designed to offer a higher bandwidth. The program is hosted by the CPU (or called ‘host’), which initializes the compute environment, reads the geometry, mesh, and other input variables. The compute routines of the program are off-loaded onto the GPU; GPU is refereed to as ‘device’. Figure 20 , shows the three elemental steps involved in performing a single device GPU simulation. The first step before starting the main time loop involves creating a copy of all the necessary data, such as mesh, initial conditions, and the flow parameters on the device memory. Since scientific computing based programs such as present are mainly bandwidth bounded, this step is done as a one time act to restrict the communication between the host and device during the simulation. It is followed by executing all the routines that are part of the main time loop listed in Figure 2 until the simulation reaches its end-time. Once the computations inside the main time loop are completed, the solution is transferred to the host memory (step-3 in Figure 20 ), from where it can be viewed and post-processed in the end. But often in many cases, the user requires to store the solution corresponding to intermediate time-steps for temporal analysis. In such a scenario, only the primitive variable data is transferred to the host whenever necessary. Such communication during the middle of a simulation, if carried out just once per hundred iterations or more, was noted to add only a negligible amount of computational time to the overall simulation.
Figure 20. Schematic diagram of the parallelization model employed for single device GPU computations. Shown in the left of the figure, is an example multi-block computational domain (of an airfoil) whose geometrical and initial conditions data is distributed to the host memory. The three steps involved in the parallelization model are shown in blue circles with numbers.
Now that the parallelization strategy is outlined, the performance details achieved employing both MEG6 and MIG4 schemes will be presented. All the computations are performed using double precision by default unless any other working precision is specified. The high performance ‘Intel(R) Xeon(R) Gold 5115 CPU @ 2.40GHz’ is used for all the CPU computations. For GPU computations, three generations of data center GPUs, namely, NVIDIA Quadro A6000, NVIDIA V100, and NVIDIA A100 are employed to present a comparative study of their efficiencies. These GPUs are referred to as A6000, V100 and A100 for short in this paper. The acceleration offered by a GPU is mainly dependent on three key hardware attributes which are listed in Table 4 .
Table 4. Key hardware specifications of GPUs used in the current study.
Speedup comparison to single core CPU
Tables 5 and 6 show the elapsed simulation times per hundred iterations on the CPU and various GPUs. To access the performance, three test cases are employed. The first is the two-dimensional Inviscid Double Mach Reflection (DMR) case (described in section 8.1.3) consisting of 3 million cells. The second is the three-dimensional Viscous Taylor Greene Vortex (TGV) case (details of the test case can be found in [23 ] ) consisting of 27 million cells. The relative difference in the grid resolution between the two cases and the fact that the viscous TGV test case has extra routines to be executed (thus higher exposed parallelism) is planned intentionally to note the performance variation between two such contrasting compute scenarios. To also understand the speedup on a practically relevant multi-block test case, the supersonic jet noise case discussed in Sec. ?? is simulated at a grid resolution of 13 million.
The results presented in Table 5 , Table 6 , and Table 7 suggest that the computations performed on V100 and A100 are about two orders of magnitude faster than the calculations performed on CPU. These speedup results can be noted to be on par with the CUDA based parallelization models implemented in other studies, for instance Refs-[42 , 43 , 75 ] . Amongst the GPUs, the A100 can be noted to perform the best by producing a maximum speedup of greater than 200× for both MEG6 and MIG4 schemes. V100 stands next in terms of performance, followed by A6000 in the last position. This is consistent with the hardware specifications presented in table 4; the double precision processing speed and memory bandwidth of Nvidia A100 is the highest which is followed by V100 and A6000. The effect of superior single precision speed corresponding to A6000 on the simulation times will be discussed later in section 9.5.
Table 5. Comparison of time taken per 100 iterations on CPU versus various Nvidia GPUs employing MEG6 scheme.
Table 6. Comparison of time taken per 100 iterations on CPU versus various Nvidia GPUs employing MIG4 scheme.
Table 7. Comparison of time taken per 100 iterations on CPU versus various Nvidia GPUs employing WENO-Z scheme.
The results also indicate that the speedup of the simulation is influenced by its parallelism and size. The viscous TGV simulation at 27 million cell count was found to run efficiently compared to the 3 million cell count inviscid DMR test case. The MEG6 scheme was the most efficient among the three schemes tested, due to its explicit derivative computations as opposed to implicit derivatives being used in MIG4 and WENO-Z tests. Since WENO-Z does not use gradients for inviscid flux calculations, for the inviscid DMR case, the WENO-Z scheme was the fastest. However, for the viscous cases (viscous TGV and supersonic jet), the computational time of WENO-Z and MIG4 were similar, with MIG4 being slightly more efficient. Although the computational time of WENO-Z and MIG4 are close for viscous cases, the solution resolution is significantly different, with MIG4 being superior.
Contribution of various routines to the overall computational time
Figure 21a -Figure 21d shows a pie-chart view representing the contribution of various routines to the overall computational time in performing one RK-iteration of MEG6 and MIG4 algorithms on both CPU (Intel Xeon Gold 5115) and GPU (Nvidia A100). All the tests were run using the Viscous Taylor-Greene-Vortex case at a grid resolution of 256 3 256^3 25 6 3 . The plots suggest that more than 50% of the time on both CPU and GPU is spent just performing the ‘reconstruction routine’ (indicated with number ‘1’) in all the scenarios. This is mainly because of the multiple sub-steps involved in the reconstruction routine described in 3. Furthermore, the contribution of primitive variable gradients (indicated with the number ‘6’) can be noted to occupy a more significant portion of the pie in the MIG4 scheme compared to MEG6. This is due to the extra tri-diagonal matrix inversion step involved in the MIG4 algorithm. Apart from reconstruction and gradient computation routines, the other routines can be noted to occupy a relatively smaller portion of the pie due to the relatively simple nature of the corresponding kernels.
To understand the efficiency of parallelization corresponding to each routine, the individual speedup values for each routine achieved for both MEG6 and MIG4 are computed and tabulated in Figure 21 e. Interestingly, the speedup values corresponding to MEG6 and MIG4 are nearly similar for all the routines, including the ‘primitive variable gradient computation’. The ‘Riemann solver’ routine can be noted to run with highest efficiency achieving a speedup of about ≈ 420 × \approx420\times ≈ 420 × in both MEG6 and MIG4 approaches. On the other hand, the least speedup is noted for the residual computations, time integration, and the boundary condition routines.
Vector (PDF) (a) (a) CPU - MEG6
(b) (b) GPU - MEG6
(c) (c) CPU - MIG4
(d) (d) GPU - MIG4
Table 21e. (e) Routine-wise speedup values
Figure 21. Contribution of various routines to the total computational time while executing one RK-time step, corresponding to (a) MEG-6, (b) MIG-4 schemes tested using Viscous Taylor Greene Vortex test case (256 × 256 × 256 256 \times256 \times256 256 × 256 × 256 ) on Nvidia A100 GPU.
Effect of cell count on the speedup
Variation of speedup with increasing cell count is studied relative to the computations on a single core CPU. The test runs were performed on the Nvidia A100 using the Viscous Taylor Greene Vortex test case. The speedup was measured by taking the ratio of time taken per hundred iterations on a single GPU to that of a single core CPU. To avoid GPU memory over-subscription (40GB - A100), the simulations were not carried out beyond 27 Million cells. Figure 22 shows a monotonically increasing trend in the efficiency for all the three schemes tested. However, due to the implicit nature of the derivative computation involved in the MIG4 and WENO-Z schemes, their parallel efficiency turned out to be slightly lower compared to MEG6. In comparison, WENO-Z was noted to produce the least amount of efficiency, which can be acknowledged by comparing the curves in Figure 22 near the 27 million range.
Figure 22. Speedup efficiencies of MEG6, MIG4, and WENO-Z schemes with increasing grid size on the Nvidia A100 GPU with reference to single-core CPU.
The curves shown in Figure 22 suggest that the rate of rise in speedup is considerably high in the initial range of 0 to 2.5 million cells. Although the speedup still increases beyond the 0−2.5 million range, the curve gets progressively plateaued with increasing cell count. This trend can be explained as follows. Initially, when the cell count is increased, the threads in the GPU are progressively occupied, resulting in a steady and almost linear rise in the speedup until all the GPU threads are fully occupied. This maximum GPU occupancy reaches at close to two million cells in the specific case studied here. However, when the cell count is further increased, the kernel divides the program loops into multiple sets to run, each of them in parallel resulting in multiple computation cycles within the kernel. This effect manifests as a slow rise in the parallel efficiency after a certain cell count limit. Despite this plateauing effect, keeping the GPU unit as occupied as possible is always a good practice to extract the highest possible efficiency, especially keeping in view the net power consumption when multiple GPUs are employed.
Memory occupancy of the solver on GPU
The capability to run a simulation of given size on a GPU is largely determined by the available RAM on the device. Memory utilization is a crucial factor for finite difference algorithms based on curvilinear coordinates, as they require multiple variables representing metric terms to be defined at each cell center and interface. The memory footprint of a three-dimensional solver scales approximately as O ( N 3 ) O(N^3) O ( N 3 ) , where N N N represents the number of cells in each direction, and for simplicity, it is assumed to be equal in all directions.
Figure 23 displays the memory occupancy (M \mathcal{M} M ) of the flow solver at different grid resolutions. The plot also includes a rough estimate of the expected memory consumption (M = [ 117 ( N + 8 ) 3 ] × 64 \mathcal{M} = [117(N + 8)^3] \times64 M = [ 117 ( N + 8 ) 3 ] × 64 bits) derived based on the number of variables in the solver. The solver uses 117 global 3D double-precision arrays, each of size ( N + 8 ) 3 (N + 8)^3 ( N + 8 ) 3 (including ghost cells), excluding small scalars and arrays. The discrepancy between the blue line and gray dashed line in Figure 23 is due to arrays/variables defined in each function that consume memory on GPU RAM. For the present flow solver (employing MEG6 or MIG4), tests show that a Nvidia A100 (40GB) can handle simulations with up to 34 million cells without any decrease in performance or memory over-subscription issues. Among the various data variables, metric terms consume about 60% of the total memory as they are needed at cell centers and six-cell interfaces surrounding each cell. 71 out of a total 117 variables belong to the metric terms such as ( ξ x ) i (\xi_x)_i ( ξ x ) i , ( ξ x ) i + 1 2 (\xi_x)_{i+\frac{1}{2}} ( ξ x ) i + 2 1 , ( ξ ^ x ) i + 1 2 (\hat{\xi}_x)_{i+\frac{1}{2}} ( ξ ^ x ) i + 2 1 , and ( ξ ~ x ) i + 1 2 (\tilde{\xi}_x)_{i+\frac{1}{2}} ( ξ ~ x ) i + 2 1 .
Figure 23. The GPU memory consumption with respect to variation in the grid size of the simulation, as demonstrated by tests performed on an NVIDIA A100 with 40GB RAM using the Viscous Taylor-Green Vortex test case. The gray dashed line corresponds to the approximate estimate of memory consumption based on the number of global variables defined in the solver.
Effect of working precision on the speedup
The floating point representation in computer calculations can influence the computational time as it can directly affect the number of arithmetic operations and the overall memory movement required to complete a task. A 32-bit/single-precision memory allocation (FP32) is generally used for tasks where the accuracy of calculations is not critical and the tasks are bounded by limitations in allocated memory. On the other hand, a 64-bit/double-precision (FP64) allocation is usually employed for tasks like scientific calculations where accuracy is needed. Although FP64 is widely used for CFD simulations, a few studies show that the working precision does not significantly influence the solution and the corresponding physics. One can also improve the simulation turnaround times by employing FP32 for the transient phase of simulation (where the flowfield is not of interest to the user) and switching back to FP64 for the rest of the flowfield calculations when the accuracy of the solution is essential.
Figure 24 compares FP32 and FP64 computational times for both MEG6 and MIG4 schemes on various GPUs. The tests were performed by running one hundred iterations of the Viscous Taylor Greene vortex test case at 256 3 256^3 25 6 3 resolution. The simulations that use FP32 can be noted to run faster than FP64 by a factor of ≈ 1.3 x \approx1.3\mathrm{x} ≈ 1.3 x to 1.4 x 1.4\mathrm{x} 1.4 x contrary to the anticipated 2 x 2\mathrm{x} 2 x speedup that is suggestive from Table 4 . There is a high discrepancy between the FP32 processing speed of A6000 displayed in table 4 and the FP32 speedup achieved here. Furthermore, the FP32 calculations on A6000 can be noted to only run almost as fast as FP64 calculations on the V100. This suggests that rather than the processing speed, the computations are primarily bounded by the memory bandwidth of GPU. Which means that the overall simulation time is not only spent in performing the floating point operations but also on other essential tasks such as initializing the kernels, moving data across GPU RAM and various levels of cache memory storage, etc. It is worth noting that scientific computing applications like the present solver are generally bounded by memory bandwidth as opposed to arithmetic operations. Therefore, the working precision does not hugely affect the performance, as demonstrated here. Nevertheless, the speedup from the employment of FP32 can still be used to accelerate the simulations.
Figure 24. Comparison of elapsed times using Single Precision (FP32) and Double Precision (FP64) data variables.
Conclusions
Various aspects of extending the ‘MEG6/MIG4’ and ‘α \alpha α -damping’ schemes (proposed by Chamarthi [22 ] in Ref. [1 ] ) to simulate flows over curvilinear, multi-block meshes are presented in this paper. The first part of this paper discusses the extension of MEG6/MIG4 and α \alpha α -damping schemes to the generalized curvilinear coordinates. Various steps required to achieve freestream and vortex preservation on static and dynamic low-quality stretched and skewed grids are presented with demonstrative examples. The theoretical and numerical results showed that the freestream preservation property was satisfied by the use of central schemes to compute metrics that were derived consistently from the corresponding upwind schemes MEG6 and MIG4 (averaging left and right states). The efficacy of MEG6 and MIG4 schemes to run simulations on dynamically deforming meshes is also illustrated using both inviscid and viscous test cases. The results show that employing conservative metric terms that are computed and interpolated consistently using the same scheme as that of the inviscid flux discretization will ensure freestream preservation on both stationary and moving grids.
The second part demonstrates the efficacy of MEG6 and MIG4 schemes in resolving supersonic jet screech. Both the schemes were noted to perform well in terms of resolving the essential flow features necessary to simulate the screech. The predicted screech frequencies and screech amplitudes of a round Mach 1.35 under-expanded jet are noted to be in great agreement with the experimental measurements. Furthermore, aspects concerning the jet oscillation mode and screech amplitude variation along the azimuthal direction are elucidated. In the particular case studied, it was noted that the nearfield screech amplitude can differ by almost 15dB (varies between 155dB to 140dB) depending on the azimuthal location of the observer.
The third part of the paper discusses the GPU acceleration model employed for single GPU computations. The benchmark speedup tests conducted on different GPUs show that the simulations can be run up to ≈ 200 times faster on a single NVIDIA A100 GPU card compared to a single-core Intel Xeon Gold CPU. The achieved speedup statistics were noted be on par with some of the CUDA based implementations reported in the literature. In the context of the MEG6/MIG4 schemes, this study also investigates several aspects of GPU acceleration through the use of example test cases, including the ‘speedup efficiencies of different GPU hardware,’ ‘compute loads of various functions,’ ‘memory occupancy,’ ‘the impact of cell-count on speedup,’ and the ‘influence of working precision.’ The supersonic jet noise simulation (13 million cells, 400,000 iterations, MEG6 scheme) presented in the paper was completed in a reasonable turnaround time of 34.5 hours on a single A100 GPU card.
The current approach however has a limitation in its inviscid scheme which only achieves second-order accuracy for non-linear test cases, as depicted in Ref. [1 ] . Despite efforts to improve the MP limiter, it may still get activated frequently in the regions that doses not correspond to shocks. The ongoing work to address these issues will be reported in a separate publication. The readers should note that, despite its low-order nature, the present method outperforms a truly fifth-order scheme, as shown in Ref. [1 ] .
Supplementary material
Notebook-1: link - Mathametica notebook proving the metric identities through symbolic manipulation employing MEG6 based derivatives and interpolation.
Movie-1: link - Density contours of Mach 1.35 under-expanded supersonic jet corresponding to Figure 14c .
Primitive variables form of 3-D Euler equations and its eigen Structure
The eigenvectors used for characteristic transformation employed during the reconstruction procedure in the MEG6 and MIG4 schemes (§ 5.1 ) are presented in this section. Firstly, removing the viscous terms from the Navier-Stokes equations (Eqn. (1) ) we obtain the following inviscid counterpart.
∂ ∂ t ( Q J ) + ∂ F ^ ∂ ξ + ∂ G ^ ∂ η + ∂ H ^ ∂ ζ = 0 (66) \frac{\partial}{\partial t}\left(\frac{\mathbf{Q}}{J}\right)+\frac{\partial\widehat{\mathbf{F}}}{\partial\xi}+\frac{\partial\widehat{\mathbf{G}}}{\partial\eta}+\frac{\partial\widehat{\mathbf{H}}}{\partial\zeta}=0 \tag*{(66)} ∂ t ∂ ( J Q ) + ∂ ξ ∂ F + ∂ η ∂ G + ∂ ζ ∂ H = 0 (66)
Following a series of algebraic manipulations, the above equation can be transformed into its primitive variables form with P = [ ρ , u , v , w , p ] T \mathbf{P}=[\rho,u,v,w,p]^{T} P = [ ρ , u , v , w , p ] T present in the time, and spatial derivative terms [76 ] .
∂ P ∂ t + B ‾ ξ ∂ P ∂ ξ + B ‾ η ∂ P ∂ η + B ‾ ζ ∂ P ∂ ζ = 0 (67) \frac{\partial\mathbf{P}}{\partial t}+\overline{\mathbf{B}}_{\xi}\frac{\partial\mathbf{P}}{\partial\xi}+\overline{\mathbf{B}}_{\eta}\frac{\partial\mathbf{P}}{\partial\eta}+\overline{\mathbf{B}}_{\zeta}\frac{\partial\mathbf{P}}{\partial\zeta}=0 \tag*{(67)} ∂ t ∂ P + B ξ ∂ ξ ∂ P + B η ∂ η ∂ P + B ζ ∂ ζ ∂ P = 0 (67)
where the coefficient matrices B ‾ ξ \overline{\mathbf{B}}_{\xi} B ξ , B ‾ η \overline{\mathbf{B}}_{\eta} B η and B ‾ ζ \overline{\mathbf{B}}_{\zeta} B ζ are,
B ‾ ξ = 1 J ( U ρ ξ x ρ ξ y ρ ξ z 0 0 U 0 0 ξ x ρ 0 0 U 0 ξ y ρ 0 0 0 U ξ z ρ 0 γ p ξ x γ p ξ y γ p ξ z U ) , B ‾ η = 1 J ( V ρ η x ρ η y ρ η z 0 0 V 0 0 η x ρ 0 0 V 0 η y ρ 0 0 0 V η z ρ 0 γ p η x γ p η y γ p η z V ) \overline{\mathbf{B}}_{\xi}=\frac{1}{J}\begin{pmatrix}
U & \rho\xi_x & \rho\xi_y & \rho\xi_z & 0\\
0 & U & 0 & 0 & \frac{\xi_x}{\rho}\\
0 & 0 & U & 0 & \frac{\xi_y}{\rho}\\
0 & 0 & 0 & U & \frac{\xi_z}{\rho}\\
0 & \gamma p\xi_x & \gamma p\xi_y & \gamma p\xi_z & U
\end{pmatrix},\qquad
\overline{\mathbf{B}}_{\eta}=\frac{1}{J}\begin{pmatrix}
V & \rho\eta_x & \rho\eta_y & \rho\eta_z & 0\\
0 & V & 0 & 0 & \frac{\eta_x}{\rho}\\
0 & 0 & V & 0 & \frac{\eta_y}{\rho}\\
0 & 0 & 0 & V & \frac{\eta_z}{\rho}\\
0 & \gamma p\eta_x & \gamma p\eta_y & \gamma p\eta_z & V
\end{pmatrix} B ξ = J 1 U 0 0 0 0 ρ ξ x U 0 0 γ p ξ x ρ ξ y 0 U 0 γ p ξ y ρ ξ z 0 0 U γ p ξ z 0 ρ ξ x ρ ξ y ρ ξ z U , B η = J 1 V 0 0 0 0 ρ η x V 0 0 γ p η x ρ η y 0 V 0 γ p η y ρ η z 0 0 V γ p η z 0 ρ η x ρ η y ρ η z V
and
B ‾ ζ = 1 J ( W ρ ζ x ρ ζ y ρ ζ z 0 0 W 0 0 ζ x ρ 0 0 W 0 ζ y ρ 0 0 0 W ζ z ρ 0 γ p ζ x γ p ζ y γ p ζ z W ) . \overline{\mathbf{B}}_{\zeta}=\frac{1}{J}\begin{pmatrix}
W & \rho\zeta_x & \rho\zeta_y & \rho\zeta_z & 0\\
0 & W & 0 & 0 & \frac{\zeta_x}{\rho}\\
0 & 0 & W & 0 & \frac{\zeta_y}{\rho}\\
0 & 0 & 0 & W & \frac{\zeta_z}{\rho}\\
0 & \gamma p\zeta_x & \gamma p\zeta_y & \gamma p\zeta_z & W
\end{pmatrix}. B ζ = J 1 W 0 0 0 0 ρ ζ x W 0 0 γ p ζ x ρ ζ y 0 W 0 γ p ζ y ρ ζ z 0 0 W γ p ζ z 0 ρ ζ x ρ ζ y ρ ζ z W .
For the characteristic variable projection used in the reconstruction procedure of the inviscid flux computation algorithm (Eqns. 20 and 23), the eigenvectors of the coefficient matrices B ‾ ξ \overline{\mathbf{B}}_{\xi} B ξ , B ‾ η \overline{\mathbf{B}}_{\eta} B η and B ‾ ζ \overline{\mathbf{B}}_{\zeta} B ζ are used. The eigen structure of the coefficient matrices can be found by splitting them using eigen decomposition. The following three eigenvalue problems must be solved to find the corresponding eigen matrices.
B ‾ ξ R ‾ ξ = R ‾ ξ Λ ‾ ξ , B ‾ η R ‾ η = R ‾ η Λ ‾ η , B ‾ ζ R ‾ ζ = R ‾ ζ Λ ‾ ζ . (68) \overline{\mathbf{B}}_{\xi}\overline{\mathbf{R}}_{\xi}=\overline{\mathbf{R}}_{\xi}\overline{\mathbf{\Lambda}}_{\xi},\qquad
\overline{\mathbf{B}}_{\eta}\overline{\mathbf{R}}_{\eta}=\overline{\mathbf{R}}_{\eta}\overline{\mathbf{\Lambda}}_{\eta},\qquad
\overline{\mathbf{B}}_{\zeta}\overline{\mathbf{R}}_{\zeta}=\overline{\mathbf{R}}_{\zeta}\overline{\mathbf{\Lambda}}_{\zeta}. \tag*{(68)} B ξ R ξ = R ξ Λ ξ , B η R η = R η Λ η , B ζ R ζ = R ζ Λ ζ . (68)
Where, R ‾ ξ \overline{\mathbf{R}}_{\xi} R ξ , R ‾ η \overline{\mathbf{R}}_{\eta} R η , and R ‾ ζ \overline{\mathbf{R}}_{\zeta} R ζ are the right eigen vector matrices and Λ ‾ ξ \overline{\mathbf{\Lambda}}_{\xi} Λ ξ , Λ ‾ η \overline{\mathbf{\Lambda}}_{\eta} Λ η , and Λ ‾ ζ \overline{\mathbf{\Lambda}}_{\zeta} Λ ζ are the eigen value matrices which are block diagonal in nature.
Solving the above mentioned eigen value problems, the following left and right eigen vector and eigen value matrices are obtained.
Δ ‾ ξ = [ U − a ξ 0 0 0 0 0 U 0 0 0 0 0 U 0 0 0 0 0 U 0 0 0 0 0 U + a ξ ] , R ‾ ξ = [ 1 2 a 2 ξ ~ x a 2 ξ ~ z a 2 − ξ ~ y a 2 1 2 a 2 − ξ ~ x 2 ρ a 0 − ξ ~ y − ξ ~ z ξ ~ x 2 ρ a − ξ ~ y 2 ρ a − ξ ~ z ξ ~ x 0 ξ ~ y 2 ρ a − ξ ~ z 2 ρ a ξ ~ y 0 ξ ~ x ξ ~ z 2 ρ a 1 2 0 0 0 1 2 ] (69) \overline{\Delta}_{\xi} =
\begin{bmatrix}
U-a_{\xi} & 0 & 0 & 0 & 0 \\
0 & U & 0 & 0 & 0 \\
0 & 0 & U & 0 & 0 \\
0 & 0 & 0 & U & 0 \\
0 & 0 & 0 & 0 & U+a_{\xi}
\end{bmatrix},
\qquad
\overline{R}_{\xi} =
\begin{bmatrix}
\frac{1}{2a^{2}} & \frac{\widetilde{\xi}_{x}}{a^{2}} & \frac{\widetilde{\xi}_{z}}{a^{2}} & -\frac{\widetilde{\xi}_{y}}{a^{2}} & \frac{1}{2a^{2}} \\
-\frac{\widetilde{\xi}_{x}}{2\rho a} & 0 & -\widetilde{\xi}_{y} & -\widetilde{\xi}_{z} & \frac{\widetilde{\xi}_{x}}{2\rho a} \\
-\frac{\widetilde{\xi}_{y}}{2\rho a} & -\widetilde{\xi}_{z} & \widetilde{\xi}_{x} & 0 & \frac{\widetilde{\xi}_{y}}{2\rho a} \\
-\frac{\widetilde{\xi}_{z}}{2\rho a} & \widetilde{\xi}_{y} & 0 & \widetilde{\xi}_{x} & \frac{\widetilde{\xi}_{z}}{2\rho a} \\
\frac{1}{2} & 0 & 0 & 0 & \frac{1}{2}
\end{bmatrix} \tag*{(69)} Δ ξ = U − a ξ 0 0 0 0 0 U 0 0 0 0 0 U 0 0 0 0 0 U 0 0 0 0 0 U + a ξ , R ξ = 2 a 2 1 − 2 ρ a ξ x − 2 ρ a ξ y − 2 ρ a ξ z 2 1 a 2 ξ x 0 − ξ z ξ y 0 a 2 ξ z − ξ y ξ x 0 0 − a 2 ξ y − ξ z 0 ξ x 0 2 a 2 1 2 ρ a ξ x 2 ρ a ξ y 2 ρ a ξ z 2 1 (69)
Δ ‾ η = [ V − a η 0 0 0 0 0 V 0 0 0 0 0 V 0 0 0 0 0 V 0 0 0 0 0 V + a η ] , R ‾ η = [ 1 2 a 2 η ~ x a 2 η ~ z a 2 − η ~ y a 2 1 2 a 2 − η ~ x 2 ρ a 0 − η ~ y − η ~ z η ~ x 2 ρ a − η ~ y 2 ρ a − η ~ z η ~ x 0 η ~ y 2 ρ a − η ~ z 2 ρ a η ~ y 0 η ~ x η ~ z 2 ρ a 1 2 0 0 0 1 2 ] (70) \overline{\Delta}_{\eta} =
\begin{bmatrix}
V-a_{\eta} & 0 & 0 & 0 & 0 \\
0 & V & 0 & 0 & 0 \\
0 & 0 & V & 0 & 0 \\
0 & 0 & 0 & V & 0 \\
0 & 0 & 0 & 0 & V+a_{\eta}
\end{bmatrix},
\qquad
\overline{R}_{\eta} =
\begin{bmatrix}
\frac{1}{2a^{2}} & \frac{\widetilde{\eta}_{x}}{a^{2}} & \frac{\widetilde{\eta}_{z}}{a^{2}} & -\frac{\widetilde{\eta}_{y}}{a^{2}} & \frac{1}{2a^{2}} \\
-\frac{\widetilde{\eta}_{x}}{2\rho a} & 0 & -\widetilde{\eta}_{y} & -\widetilde{\eta}_{z} & \frac{\widetilde{\eta}_{x}}{2\rho a} \\
-\frac{\widetilde{\eta}_{y}}{2\rho a} & -\widetilde{\eta}_{z} & \widetilde{\eta}_{x} & 0 & \frac{\widetilde{\eta}_{y}}{2\rho a} \\
-\frac{\widetilde{\eta}_{z}}{2\rho a} & \widetilde{\eta}_{y} & 0 & \widetilde{\eta}_{x} & \frac{\widetilde{\eta}_{z}}{2\rho a} \\
\frac{1}{2} & 0 & 0 & 0 & \frac{1}{2}
\end{bmatrix} \tag*{(70)} Δ η = V − a η 0 0 0 0 0 V 0 0 0 0 0 V 0 0 0 0 0 V 0 0 0 0 0 V + a η , R η = 2 a 2 1 − 2 ρ a η x − 2 ρ a η y − 2 ρ a η z 2 1 a 2 η x 0 − η z η y 0 a 2 η z − η y η x 0 0 − a 2 η y − η z 0 η x 0 2 a 2 1 2 ρ a η x 2 ρ a η y 2 ρ a η z 2 1 (70)
Δ ‾ ζ = [ W − a ζ 0 0 0 0 0 W 0 0 0 0 0 W 0 0 0 0 0 W 0 0 0 0 0 W + a ζ ] , R ‾ ζ = [ 1 2 a 2 ζ ~ x a 2 ζ ~ z a 2 − ζ ~ y a 2 1 2 a 2 − ζ ~ x 2 ρ a 0 − ζ ~ y − ζ ~ z ζ ~ x 2 ρ a − ζ ~ y 2 ρ a − ζ ~ z ζ ~ x 0 ζ ~ y 2 ρ a − ζ ~ z 2 ρ a ζ ~ y 0 ζ ~ x ζ ~ z 2 ρ a 1 2 0 0 0 1 2 ] (71) \overline{\Delta}_{\zeta} =
\begin{bmatrix}
W-a_{\zeta} & 0 & 0 & 0 & 0 \\
0 & W & 0 & 0 & 0 \\
0 & 0 & W & 0 & 0 \\
0 & 0 & 0 & W & 0 \\
0 & 0 & 0 & 0 & W+a_{\zeta}
\end{bmatrix},
\qquad
\overline{R}_{\zeta} =
\begin{bmatrix}
\frac{1}{2a^{2}} & \frac{\widetilde{\zeta}_{x}}{a^{2}} & \frac{\widetilde{\zeta}_{z}}{a^{2}} & -\frac{\widetilde{\zeta}_{y}}{a^{2}} & \frac{1}{2a^{2}} \\
-\frac{\widetilde{\zeta}_{x}}{2\rho a} & 0 & -\widetilde{\zeta}_{y} & -\widetilde{\zeta}_{z} & \frac{\widetilde{\zeta}_{x}}{2\rho a} \\
-\frac{\widetilde{\zeta}_{y}}{2\rho a} & -\widetilde{\zeta}_{z} & \widetilde{\zeta}_{x} & 0 & \frac{\widetilde{\zeta}_{y}}{2\rho a} \\
-\frac{\widetilde{\zeta}_{z}}{2\rho a} & \widetilde{\zeta}_{y} & 0 & \widetilde{\zeta}_{x} & \frac{\widetilde{\zeta}_{z}}{2\rho a} \\
\frac{1}{2} & 0 & 0 & 0 & \frac{1}{2}
\end{bmatrix} \tag*{(71)} Δ ζ = W − a ζ 0 0 0 0 0 W 0 0 0 0 0 W 0 0 0 0 0 W 0 0 0 0 0 W + a ζ , R ζ = 2 a 2 1 − 2 ρ a ζ x − 2 ρ a ζ y − 2 ρ a ζ z 2 1 a 2 ζ x 0 − ζ z ζ y 0 a 2 ζ z − ζ y ζ x 0 0 − a 2 ζ y − ζ z 0 ζ x 0 2 a 2 1 2 ρ a ζ x 2 ρ a ζ y 2 ρ a ζ z 2 1 (71)
where,
a ξ = a ∥ ∇ ξ ∥ , a η = a ∥ ∇ η ∥ , a ζ = a ∥ ∇ ζ ∥ . a_{\xi}=a\lVert\nabla\xi\rVert,\qquad a_{\eta}=a\lVert\nabla\eta\rVert,\qquad a_{\zeta}=a\lVert\nabla\zeta\rVert. a ξ = a ∥ ∇ ξ ∥ , a η = a ∥ ∇ η ∥ , a ζ = a ∥ ∇ ζ ∥ .
The metric terms with a tilde on the top ( ⋅ ~ ) (\widetilde{\cdot}) ( ⋅ ) present in the above matrices denote normalized quantities defined as follows.
ξ ~ x = ξ x ∥ ∇ ξ ∥ , ξ ~ y = ξ y ∥ ∇ ξ ∥ , ξ ~ z = ξ z ∥ ∇ ξ ∥ , \widetilde{\xi}_{x}=\frac{\xi_{x}}{\lVert\nabla\xi\rVert},\qquad
\widetilde{\xi}_{y}=\frac{\xi_{y}}{\lVert\nabla\xi\rVert},\qquad
\widetilde{\xi}_{z}=\frac{\xi_{z}}{\lVert\nabla\xi\rVert}, ξ x = ∥ ∇ ξ ∥ ξ x , ξ y = ∥ ∇ ξ ∥ ξ y , ξ z = ∥ ∇ ξ ∥ ξ z ,
η ~ x = η x ∥ ∇ η ∥ , η ~ y = η y ∥ ∇ η ∥ , η ~ z = η z ∥ ∇ η ∥ , \widetilde{\eta}_{x}=\frac{\eta_{x}}{\lVert\nabla\eta\rVert},\qquad
\widetilde{\eta}_{y}=\frac{\eta_{y}}{\lVert\nabla\eta\rVert},\qquad
\widetilde{\eta}_{z}=\frac{\eta_{z}}{\lVert\nabla\eta\rVert}, η x = ∥ ∇ η ∥ η x , η y = ∥ ∇ η ∥ η y , η z = ∥ ∇ η ∥ η z ,
ζ ~ x = ζ x ∥ ∇ ζ ∥ , ζ ~ y = ζ y ∥ ∇ ζ ∥ , ζ ~ z = ζ z ∥ ∇ ζ ∥ . (72) \widetilde{\zeta}_{x}=\frac{\zeta_{x}}{\lVert\nabla\zeta\rVert},\qquad
\widetilde{\zeta}_{y}=\frac{\zeta_{y}}{\lVert\nabla\zeta\rVert},\qquad
\widetilde{\zeta}_{z}=\frac{\zeta_{z}}{\lVert\nabla\zeta\rVert}. \tag*{(72)} ζ x = ∥ ∇ ζ ∥ ζ x , ζ y = ∥ ∇ ζ ∥ ζ y , ζ z = ∥ ∇ ζ ∥ ζ z . (72)
where,
∥ ∇ ξ ∥ = ξ x 2 + ξ y 2 + ξ z 2 , ∥ ∇ η ∥ = η x 2 + η y 2 + η z 2 , and ∥ ∇ ζ ∥ = ζ x 2 + ζ y 2 + ζ z 2 . \lVert\nabla\xi\rVert=\sqrt{\xi_{x}^{2}+\xi_{y}^{2}+\xi_{z}^{2}},\qquad
\lVert\nabla\eta\rVert=\sqrt{\eta_{x}^{2}+\eta_{y}^{2}+\eta_{z}^{2}},\qquad
\text{and}\qquad
\lVert\nabla\zeta\rVert=\sqrt{\zeta_{x}^{2}+\zeta_{y}^{2}+\zeta_{z}^{2}}. ∥ ∇ ξ ∥ = ξ x 2 + ξ y 2 + ξ z 2 , ∥ ∇ η ∥ = η x 2 + η y 2 + η z 2 , and ∥ ∇ ζ ∥ = ζ x 2 + ζ y 2 + ζ z 2 .
The corresponding inverse matrices or the left eigen vector matrices are,
R ‾ ξ − 1 = [ 0 − ξ ~ x ρ a − ξ ~ y ρ a − ξ ~ z ρ a 1 ξ ~ x a 2 0 − ξ ~ z ξ ~ y − ξ ~ x ξ ~ y a 2 − ξ ~ y ξ ~ x 0 − ξ ~ z ξ ~ z a 2 − ξ ~ z 0 ξ ~ x ξ ~ y 0 ξ ~ x ρ a ξ ~ y ρ a ξ ~ z ρ a 1 ] , R ‾ η − 1 = [ 0 − η ~ x ρ a − η ~ y ρ a − η ~ z ρ a 1 η ~ x a 2 0 − η ~ z η ~ y − η ~ x η ~ y a 2 − η ~ y η ~ x 0 − η ~ z η ~ z a 2 − η ~ z 0 η ~ x η ~ y 0 η ~ x ρ a η ~ y ρ a η ~ z ρ a 1 ] (73) \overline{R}_{\xi}^{-1}=
\begin{bmatrix}
0 & -\widetilde{\xi}_{x}\rho a & -\widetilde{\xi}_{y}\rho a & -\widetilde{\xi}_{z}\rho a & 1 \\
\widetilde{\xi}_{x}a^{2} & 0 & -\widetilde{\xi}_{z} & \widetilde{\xi}_{y} & -\widetilde{\xi}_{x} \\
\widetilde{\xi}_{y}a^{2} & -\widetilde{\xi}_{y} & \widetilde{\xi}_{x} & 0 & -\widetilde{\xi}_{z} \\
\widetilde{\xi}_{z}a^{2} & -\widetilde{\xi}_{z} & 0 & \widetilde{\xi}_{x} & \widetilde{\xi}_{y} \\
0 & \widetilde{\xi}_{x}\rho a & \widetilde{\xi}_{y}\rho a & \widetilde{\xi}_{z}\rho a & 1
\end{bmatrix},
\qquad
\overline{R}_{\eta}^{-1}=
\begin{bmatrix}
0 & -\widetilde{\eta}_{x}\rho a & -\widetilde{\eta}_{y}\rho a & -\widetilde{\eta}_{z}\rho a & 1 \\
\widetilde{\eta}_{x}a^{2} & 0 & -\widetilde{\eta}_{z} & \widetilde{\eta}_{y} & -\widetilde{\eta}_{x} \\
\widetilde{\eta}_{y}a^{2} & -\widetilde{\eta}_{y} & \widetilde{\eta}_{x} & 0 & -\widetilde{\eta}_{z} \\
\widetilde{\eta}_{z}a^{2} & -\widetilde{\eta}_{z} & 0 & \widetilde{\eta}_{x} & \widetilde{\eta}_{y} \\
0 & \widetilde{\eta}_{x}\rho a & \widetilde{\eta}_{y}\rho a & \widetilde{\eta}_{z}\rho a & 1
\end{bmatrix} \tag*{(73)} R ξ − 1 = 0 ξ x a 2 ξ y a 2 ξ z a 2 0 − ξ x ρ a 0 − ξ y − ξ z ξ x ρ a − ξ y ρ a − ξ z ξ x 0 ξ y ρ a − ξ z ρ a ξ y 0 ξ x ξ z ρ a 1 − ξ x − ξ z ξ y 1 , R η − 1 = 0 η x a 2 η y a 2 η z a 2 0 − η x ρ a 0 − η y − η z η x ρ a − η y ρ a − η z η x 0 η y ρ a − η z ρ a η y 0 η x η z ρ a 1 − η x − η z η y 1 (73)
R ‾ ζ − 1 = [ 0 − ζ ~ x ρ a − ζ ~ y ρ a − ζ ~ z ρ a 1 ζ ~ x a 2 0 − ζ ~ z ζ ~ y − ζ ~ x ζ ~ y a 2 − ζ ~ y ζ ~ x 0 − ζ ~ z ζ ~ z a 2 − ζ ~ z 0 ζ ~ x ζ ~ y 0 ζ ~ x ρ a ζ ~ y ρ a ζ ~ z ρ a 1 ] . (74) \overline{R}_{\zeta}^{-1}=
\begin{bmatrix}
0 & -\widetilde{\zeta}_{x}\rho a & -\widetilde{\zeta}_{y}\rho a & -\widetilde{\zeta}_{z}\rho a & 1 \\
\widetilde{\zeta}_{x}a^{2} & 0 & -\widetilde{\zeta}_{z} & \widetilde{\zeta}_{y} & -\widetilde{\zeta}_{x} \\
\widetilde{\zeta}_{y}a^{2} & -\widetilde{\zeta}_{y} & \widetilde{\zeta}_{x} & 0 & -\widetilde{\zeta}_{z} \\
\widetilde{\zeta}_{z}a^{2} & -\widetilde{\zeta}_{z} & 0 & \widetilde{\zeta}_{x} & \widetilde{\zeta}_{y} \\
0 & \widetilde{\zeta}_{x}\rho a & \widetilde{\zeta}_{y}\rho a & \widetilde{\zeta}_{z}\rho a & 1
\end{bmatrix}. \tag*{(74)} R ζ − 1 = 0 ζ x a 2 ζ y a 2 ζ z a 2 0 − ζ x ρ a 0 − ζ y − ζ z ζ x ρ a − ζ y ρ a − ζ z ζ x 0 ζ y ρ a − ζ z ρ a ζ y 0 ζ x ζ z ρ a 1 − ζ x − ζ z ζ y 1 . (74)
Appendix B Time integration
For time marching the solution, the 3rd order explicit Total Variation Diminishing Range-Kutta (TVD RK-3) [77 ] time integration scheme is used. To employ this method, firstly, the residual (R e s Res R es ) is computed from the spatial discretization procedure described in the previous sections. Then the following three-stage formulation is employed where the solution corresponding to the previous RK step is used to compute the solution corresponding to the next; thus arriving at the final solution corresponding to t + Δ t t+\Delta t t + Δ t at the end.
Q ^ ( 1 ) = Q ^ n + Δ t R e s ( Q ^ n ) J Q ^ ( 2 ) = 3 4 Q ^ n + 1 4 Q ^ ( 1 ) + 1 4 Δ t R e s ( Q ^ ( 1 ) ) J Q ^ n + 1 = 1 3 Q ^ n + 2 3 Q ^ ( 2 ) + 2 3 Δ t R e s ( Q ^ ( 2 ) ) J , (75) \begin{aligned}
\widehat{\mathbf{Q}}^{(1)} &= \widehat{\mathbf{Q}}^n + \Delta t\,Res\left(\widehat{\mathbf{Q}}^n\right)J \\
\widehat{\mathbf{Q}}^{(2)} &= \frac{3}{4}\widehat{\mathbf{Q}}^n + \frac{1}{4}\widehat{\mathbf{Q}}^{(1)} + \frac{1}{4}\Delta t\,Res\left(\widehat{\mathbf{Q}}^{(1)}\right)J \\
\widehat{\mathbf{Q}}^{n+1} &= \frac{1}{3}\widehat{\mathbf{Q}}^n + \frac{2}{3}\widehat{\mathbf{Q}}^{(2)} + \frac{2}{3}\Delta t\,Res\left(\widehat{\mathbf{Q}}^{(2)}\right)J, \tag*{(75)}
\end{aligned} Q ( 1 ) Q ( 2 ) Q n + 1 = Q n + Δ t R es ( Q n ) J = 4 3 Q n + 4 1 Q ( 1 ) + 4 1 Δ t R es ( Q ( 1 ) ) J = 3 1 Q n + 3 2 Q ( 2 ) + 3 2 Δ t R es ( Q ( 2 ) ) J , (75)
The Jacobian (J J J ) used in the above formulation corresponds to the cell center of the grid, the location where time integration is performed.
All the simulations using this solver are performed with a Courant Friedrichs Lewy (CFL) number number of 0.2 unless a different value is specified for a particular case. As opposed to maintaining a constant CFL, a constant stable time-step (CFL < 0.5 < 0.5 < 0.5 ) is maintained for supersonic jet flow calculations to facilitate Fourier analysis of pressure signals extracted from the solution. The time-step while performing Euler simulations is computed as follows.
Δ t = C F L × min c e l l s ( 1 ∣ U ∣ + c l ∥ ∇ ξ ∥ , 1 ∣ V ∣ + c l ∥ ∇ η ∥ , 1 ∣ W ∣ + c l ∥ ∇ ζ ∥ ) . (76) \Delta t = \mathrm{CFL} \times\min_{\mathrm{cells}}\left(\frac{1}{|U|+c_l\lVert\nabla\xi\rVert},\frac{1}{|V|+c_l\lVert\nabla\eta\rVert},\frac{1}{|W|+c_l\lVert\nabla\zeta\rVert}\right). \tag*{(76)} Δ t = CFL × cells min ( ∣ U ∣ + c l ∥ ∇ ξ ∥ 1 , ∣ V ∣ + c l ∥ ∇ η ∥ 1 , ∣ W ∣ + c l ∥ ∇ ζ ∥ 1 ) . (76)
The time step for viscous flow computations is computed as follows.
Δ t = C F L × min [ min c e l l s ( 1 ∣ U ∣ + c l ∥ ∇ ξ ∥ , 1 ∣ V ∣ + c l ∥ ∇ η ∥ , 1 ∣ W ∣ + c l ∥ ∇ ζ ∥ ) , 1 α min c e l l s ( 1 μ ∥ ∇ ξ ∥ 2 , 1 μ ∥ ∇ η ∥ 2 , 1 μ ∥ ∇ ζ ∥ 2 ) ] (77) \Delta t = \mathrm{CFL}\times\min\left[\min_{\mathrm{cells}}\left(\frac{1}{|U|+c_l\lVert\nabla\xi\rVert},\frac{1}{|V|+c_l\lVert\nabla\eta\rVert},\frac{1}{|W|+c_l\lVert\nabla\zeta\rVert}\right),\frac{1}{\alpha}\min_{\mathrm{cells}}\left(\frac{1}{\mu\lVert\nabla\xi\rVert^2},\frac{1}{\mu\lVert\nabla\eta\rVert^2},\frac{1}{\mu\lVert\nabla\zeta\rVert^2}\right)\right] \tag*{(77)} Δ t = CFL × min [ cells min ( ∣ U ∣ + c l ∥ ∇ ξ ∥ 1 , ∣ V ∣ + c l ∥ ∇ η ∥ 1 , ∣ W ∣ + c l ∥ ∇ ζ ∥ 1 ) , α 1 cells min ( μ ∥ ∇ ξ ∥ 2 1 , μ ∥ ∇ η ∥ 2 1 , μ ∥ ∇ ζ ∥ 2 1 ) ] (77)
Appendix C Metric term computation at boundaries
As previously discussed in § 7 , the lack of geometric information in ghost points poses a limitation on the computation of metric terms using high-order estimates, as outlined in Equations 36, (40) , and (41) . To address this limitation, low-order approximations are employed for interpolation and derivative computation in the calculation of metric terms. An example of this approach is demonstrated in the computation of the term ‘x ξ x_{\xi} x ξ ’ at various boundary cell centers and interfaces.
Figure C.25. Representation of boundary cells and interfaces along the ξ \xi ξ direction, with corresponding indices. Note that the first cell index begins at 1 and the first interface index starts at ‘1/2’.
x i + 1 2 = { x i + 1 − 1 2 x i + 1 ′ + 1 12 x i + 1 ′ ′ if i = 1 , 1 2 [ x i + 1 2 x i ′ + 1 12 x i ′ ′ ] + 1 2 [ x i + 1 − 1 2 x i + 1 ′ + 1 12 x i + 1 ′ ′ ] if i = 2 and 3. (78) x_{i+\frac{1}{2}} =
\begin{cases}
x_{i+1} - \frac{1}{2}x'_{i+1} + \frac{1}{12}x''_{i+1} & \text{if } i=1,\\
\frac{1}{2}\left[x_i+\frac{1}{2}x'_i+\frac{1}{12}x''_i\right]+\frac{1}{2}\left[x_{i+1}-\frac{1}{2}x'_{i+1}+\frac{1}{12}x''_{i+1}\right] & \text{if } i=2\text{ and }3.
\end{cases} \tag*{(78)} x i + 2 1 = { x i + 1 − 2 1 x i + 1 ′ + 12 1 x i + 1 ′′ 2 1 [ x i + 2 1 x i ′ + 12 1 x i ′′ ] + 2 1 [ x i + 1 − 2 1 x i + 1 ′ + 12 1 x i + 1 ′′ ] if i = 1 , if i = 2 and 3. (78)
( x ′ ) i = { − 3 2 x i + 2 x i + 1 − 1 2 x i + 2 if i = 1 (2nd order one sided) , − 1 4 x i − 5 6 x i + 1 + 3 2 x i + 2 − 1 2 x i + 3 + 1 12 x i + 4 if i = 2 (4th order partially one sided) , 2 3 [ x i + 1 − x i − 1 ] − 1 12 [ x i + 2 − x i − 2 ] if i = 3 (4th order central) . (79) \left(x'\right)_i =
\begin{cases}
-\frac{3}{2}x_i+2x_{i+1}-\frac{1}{2}x_{i+2} & \text{if } i=1\text{ (2nd order one sided)},\\
-\frac{1}{4}x_i-\frac{5}{6}x_{i+1}+\frac{3}{2}x_{i+2}-\frac{1}{2}x_{i+3}+\frac{1}{12}x_{i+4} & \text{if } i=2\text{ (4th order partially one sided)},\\
\frac{2}{3}\left[x_{i+1}-x_{i-1}\right]-\frac{1}{12}\left[x_{i+2}-x_{i-2}\right] & \text{if } i=3\text{ (4th order central)}.
\end{cases} \tag*{(79)} ( x ′ ) i = ⎩ ⎨ ⎧ − 2 3 x i + 2 x i + 1 − 2 1 x i + 2 − 4 1 x i − 6 5 x i + 1 + 2 3 x i + 2 − 2 1 x i + 3 + 12 1 x i + 4 3 2 [ x i + 1 − x i − 1 ] − 12 1 [ x i + 2 − x i − 2 ] if i = 1 (2nd order one sided) , if i = 2 (4th order partially one sided) , if i = 3 (4th order central) . (79)
( x ′ ′ ) i = { − 3 2 x i ′ + 2 x i + 1 ′ − 1 2 x i + 2 ′ if i = 1 , − 1 4 x i ′ + 5 6 x i + 1 ′ + 3 2 x i + 2 ′ − 1 2 x i + 3 ′ + 1 12 x i + 4 ′ if i = 2 , − 1 2 [ x i + 1 − 2 x i + x i − 1 ] − 2 [ x i + 1 − 2 x i + x i − 1 ] if i = 3. (80) \left(x''\right)_i =
\begin{cases}
-\frac{3}{2}x'_i+2x'_{i+1}-\frac{1}{2}x'_{i+2} & \text{if } i=1,\\
-\frac{1}{4}x'_i+\frac{5}{6}x'_{i+1}+\frac{3}{2}x'_{i+2}-\frac{1}{2}x'_{i+3}+\frac{1}{12}x'_{i+4} & \text{if } i=2,\\
-\frac{1}{2}\left[x_{i+1}-2x_i+x_{i-1}\right]-2\left[x_{i+1}-2x_i+x_{i-1}\right] & \text{if } i=3.
\end{cases} \tag*{(80)} ( x ′′ ) i = ⎩ ⎨ ⎧ − 2 3 x i ′ + 2 x i + 1 ′ − 2 1 x i + 2 ′ − 4 1 x i ′ + 6 5 x i + 1 ′ + 2 3 x i + 2 ′ − 2 1 x i + 3 ′ + 12 1 x i + 4 ′ − 2 1 [ x i + 1 − 2 x i + x i − 1 ] − 2 [ x i + 1 − 2 x i + x i − 1 ] if i = 1 , if i = 2 , if i = 3. (80)
and finally
( x ξ ) i = x i + 1 2 − x i − 1 2 (81) (x_{\xi})_i=x_{i+\frac{1}{2}}-x_{i-\frac{1}{2}} \tag*{(81)} ( x ξ ) i = x i + 2 1 − x i − 2 1 (81)
After computing x ξ x_{\xi} x ξ and the other required terms present in Equation (12) , they are utilized in the computation of the metric terms through the use of conservative formulations detailed in § 4 . However, as primitive variables are retained in the ghost cells, it is not necessary to use one-sided formulae to compute fluxes at boundary points. As a result, the high-order relations discussed in § 5 remain valid for both inviscid and viscous flux computation at boundaries.
Non-conservative metric term formulation
The non-conservative metric formulations used to compute metrics in the approach mentioned in section 7 are:
ξ ^ x = ( y η z ζ − y ζ z η ) , ξ ^ y = ( z η x ζ − z ζ x η ) , ξ ^ z = ( x η y ζ − x ζ y η ) , \hat{\xi}_x=(y_{\eta}z_{\zeta}-y_{\zeta}z_{\eta}),\quad
\hat{\xi}_y=(z_{\eta}x_{\zeta}-z_{\zeta}x_{\eta}),\quad
\hat{\xi}_z=(x_{\eta}y_{\zeta}-x_{\zeta}y_{\eta}), ξ ^ x = ( y η z ζ − y ζ z η ) , ξ ^ y = ( z η x ζ − z ζ x η ) , ξ ^ z = ( x η y ζ − x ζ y η ) ,
η ^ x = ( y ζ z ξ − y ξ z ζ ) , η ^ y = ( z ζ x ξ − z ξ x ζ ) , η ^ z = ( x ζ y ξ − x ξ y ζ ) , \hat{\eta}_x=(y_{\zeta}z_{\xi}-y_{\xi}z_{\zeta}),\quad
\hat{\eta}_y=(z_{\zeta}x_{\xi}-z_{\xi}x_{\zeta}),\quad
\hat{\eta}_z=(x_{\zeta}y_{\xi}-x_{\xi}y_{\zeta}), η ^ x = ( y ζ z ξ − y ξ z ζ ) , η ^ y = ( z ζ x ξ − z ξ x ζ ) , η ^ z = ( x ζ y ξ − x ξ y ζ ) ,
ζ ^ x = ( y ξ z η − y η z ξ ) , ζ ^ y = ( z ξ x η − z η x ξ ) , ζ ^ z = ( x ξ y η − x η y ξ ) . (82) \hat{\zeta}_x=(y_{\xi}z_{\eta}-y_{\eta}z_{\xi}),\quad
\hat{\zeta}_y=(z_{\xi}x_{\eta}-z_{\eta}x_{\xi}),\quad
\hat{\zeta}_z=(x_{\xi}y_{\eta}-x_{\eta}y_{\xi}). \tag*{(82)} ζ ^ x = ( y ξ z η − y η z ξ ) , ζ ^ y = ( z ξ x η − z η x ξ ) , ζ ^ z = ( x ξ y η − x η y ξ ) . (82)
The Jacobian is computed using Eqn. (15) . To estimate the derivative terms involved in the above equations, the fourth order explicit central scheme is used [24 , 78 ] . For instance, to estimate x ξ x_{\xi} x ξ ,
( x ξ ) i = 2 3 ( x i + 1 − x i − 1 ) − 1 12 ( x i + 2 − x i − 2 ) Δ ξ (83) (x_{\xi})_i=\frac{\frac{2}{3}(x_{i+1}-x_{i-1})-\frac{1}{12}(x_{i+2}-x_{i-2})}{\Delta\xi} \tag*{(83)} ( x ξ ) i = Δ ξ 3 2 ( x i + 1 − x i − 1 ) − 12 1 ( x i + 2 − x i − 2 ) (83)
The interpolation of metrics to cell interfaces is performed using the same formulae listed in Eqn. (41) , except the derivative terms involved in it are computed using the above mentioned fourth order central scheme.
Improved MP-limiter
A modified version of the MP-limiter as described in Ref.[1 ] is presented here. After evaluating the unlimited upwind interpolated values of the characteristic variables (W i + 1 / 2 , u n l i m i t e d L , R W^{L,R}_{i+1/2,unlimited} W i + 1/2 , u n l imi t e d L , R ) in Step-3 described in § 5.1 , the solution is limited in Step-4. For brevity the procedure is only described for the left interpolated value here.
Check the following condition to determine if a discontinuity exists:
( W i + 1 2 L − W ^ i ) ( W i + 1 2 L − W M P ) ≤ 10 − 20 (84) \left(W^L_{i+\frac{1}{2}}-\widehat{W}_i\right)\left(W^L_{i+\frac{1}{2}}-W^{MP}\right)\leq10^{-20} \tag*{(84)} ( W i + 2 1 L − W i ) ( W i + 2 1 L − W M P ) ≤ 1 0 − 20 (84)
where,
W M P = W ^ i + minmod [ W ^ i + 1 − W ^ i , β ( W ^ i − W ^ i − 1 ) ] , (85) \mathbf{W}^{MP} = \widehat{\mathbf{W}}_i + \operatorname{minmod}\left[\widehat{\mathbf{W}}_{i+1} - \widehat{\mathbf{W}}_i,\beta\left(\widehat{\mathbf{W}}_i - \widehat{\mathbf{W}}_{i-1}\right)\right], \tag*{(85)} W M P = W i + minmod [ W i + 1 − W i , β ( W i − W i − 1 ) ] , (85)
and, minmod ( a , b ) = 1 2 ( sign ( a ) + sign ( b ) ) min ( ∣ a ∣ , ∣ b ∣ ) \operatorname{minmod}(a,b)=\frac{1}{2}\left(\operatorname{sign}(a)+\operatorname{sign}(b)\right)\min(|a|,|b|) minmod ( a , b ) = 2 1 ( sign ( a ) + sign ( b ) ) min ( ∣ a ∣ , ∣ b ∣ ) .
Compute W i + 1 2 min \mathbf{W}^{\min}_{i+\frac{1}{2}} W i + 2 1 m i n and W i + 1 2 max \mathbf{W}^{\max}_{i+\frac{1}{2}} W i + 2 1 m a x as follows:
d i = 2 ( W ^ i + 1 − 2 W ^ i + W ^ i − 1 ) − 0.5 Δ x ( W i + 1 ′ − W i − 1 ′ ) d_i = 2\left(\widehat{\mathbf{W}}_{i+1}-2\widehat{\mathbf{W}}_i+\widehat{\mathbf{W}}_{i-1}\right)-0.5\Delta x\left(\mathbf{W}'_{i+1}-\mathbf{W}'_{i-1}\right) d i = 2 ( W i + 1 − 2 W i + W i − 1 ) − 0.5Δ x ( W i + 1 ′ − W i − 1 ′ )
d i + 1 2 M = minmod ( d i , d i + 1 ) d^M_{i+\frac{1}{2}}=\operatorname{minmod}(d_i,d_{i+1}) d i + 2 1 M = minmod ( d i , d i + 1 )
W i + 1 2 M D = 1 2 ( W ^ i + W ^ i + 1 ) − 1 2 d i + 1 2 M \mathbf{W}^{MD}_{i+\frac{1}{2}}=\frac{1}{2}\left(\widehat{\mathbf{W}}_i+\widehat{\mathbf{W}}_{i+1}\right)-\frac{1}{2}d^M_{i+\frac{1}{2}} W i + 2 1 M D = 2 1 ( W i + W i + 1 ) − 2 1 d i + 2 1 M
W i + 1 2 U L = W ^ i + α ( W ^ i − W ^ i − 1 ) \mathbf{W}^{UL}_{i+\frac{1}{2}}=\widehat{\mathbf{W}}_i+\alpha\left(\widehat{\mathbf{W}}_i-\widehat{\mathbf{W}}_{i-1}\right) W i + 2 1 U L = W i + α ( W i − W i − 1 )
W i + 1 2 L C = 1 2 ( 3 W ^ i − W ^ i − 1 ) + 4 3 d i − 1 2 M (86) \mathbf{W}^{LC}_{i+\frac{1}{2}}=\frac{1}{2}\left(3\widehat{\mathbf{W}}_i-\widehat{\mathbf{W}}_{i-1}\right)+\frac{4}{3}d^M_{i-\frac{1}{2}} \tag*{(86)} W i + 2 1 L C = 2 1 ( 3 W i − W i − 1 ) + 3 4 d i − 2 1 M (86)
W i + 1 2 min = max [ min ( W ^ i , W ^ i + 1 , W i + 1 2 M D ) , min ( W ^ i , W i + 1 2 U L , W i + 1 2 L C ) ] \mathbf{W}^{\min}_{i+\frac{1}{2}}=\max\left[\min\left(\widehat{\mathbf{W}}_i,\widehat{\mathbf{W}}_{i+1},\mathbf{W}^{MD}_{i+\frac{1}{2}}\right),\min\left(\widehat{\mathbf{W}}_i,\mathbf{W}^{UL}_{i+\frac{1}{2}},\mathbf{W}^{LC}_{i+\frac{1}{2}}\right)\right] W i + 2 1 m i n = max [ min ( W i , W i + 1 , W i + 2 1 M D ) , min ( W i , W i + 2 1 U L , W i + 2 1 L C ) ]
W i + 1 2 max = min [ max ( W ^ i , W ^ i + 1 , W i + 1 2 M D ) , max ( W ^ i , W i + 1 2 U L , W i + 1 2 L C ) ] \mathbf{W}^{\max}_{i+\frac{1}{2}}=\min\left[\max\left(\widehat{\mathbf{W}}_i,\widehat{\mathbf{W}}_{i+1},\mathbf{W}^{MD}_{i+\frac{1}{2}}\right),\max\left(\widehat{\mathbf{W}}_i,\mathbf{W}^{UL}_{i+\frac{1}{2}},\mathbf{W}^{LC}_{i+\frac{1}{2}}\right)\right] W i + 2 1 m a x = min [ max ( W i , W i + 1 , W i + 2 1 M D ) , max ( W i , W i + 2 1 U L , W i + 2 1 L C ) ]
Finally, the limited value is computed.
W i + 1 2 l i m i t e d = W i + 1 2 L + minmod ( W i + 1 2 min − W i + 1 2 L , W i + 1 2 max − W i + 1 2 L ) . (87) \mathbf{W}^{\mathrm{limited}}_{i+\frac{1}{2}}=\mathbf{W}^{L}_{i+\frac{1}{2}}+\operatorname{minmod}\left(\mathbf{W}^{\min}_{i+\frac{1}{2}}-\mathbf{W}^{L}_{i+\frac{1}{2}},\mathbf{W}^{\max}_{i+\frac{1}{2}}-\mathbf{W}^{L}_{i+\frac{1}{2}}\right). \tag*{(87)} W i + 2 1 limited = W i + 2 1 L + minmod ( W i + 2 1 m i n − W i + 2 1 L , W i + 2 1 m a x − W i + 2 1 L ) . (87)
References