- Research
- Open access
- Published:

# An improved third-order HWCNS for compressible flow simulation on curvilinear grids

*Advances in Aerodynamics*
**volume 3**, Article number: 32 (2021)

## Abstract

Due to the very high requirements on the quality of computational grids, stability property and computational efficiency, the application of high-order schemes to complex flow simulation is greatly constrained. In order to solve these problems, the third-order hybrid cell-edge and cell-node weighted compact nonlinear scheme (HWCNS3) is improved by introducing a new nonlinear weighting mechanism. The new scheme uses only the central stencil to reconstruct the cell boundary value, which makes the convergence of the scheme more stable. The application of the scheme to Euler equations on curvilinear grids is also discussed. Numerical results show that the new HWCNS3 achieves the expected order in smooth regions, captures discontinuities sharply without obvious oscillation, has higher resolution than the original one and preserves freestream and vortex on curvilinear grids.

## 1 Introduction

In the past three decades, a series of nonlinear schemes with high accuracy and high resolution were developed for the numerical simulation of complex flow fluid with shock wave and multiscale structures, such as turbulence and aeroacoustics problems. Among them, the weighted essentially non-oscillatory (WENO) scheme and the weighted compact nonlinear scheme (WCNS) are both applied more extensively. The WCNS developed by Deng et al. [1–3], which is derived from the classical compact scheme on the basis of the weighted considerations, is a finite difference method with high accuracy, including the explicit form and the implicit form. The classical WCNS procedure consists of three steps: (1) node-to-midpoint weighted nonlinear interpolation of flow variables, (2) fluxes evaluation at midpoints, and (3) midpoint-to-node centered flux differencing. It has not only the high precision/high resolution properties of the spectral-type compact difference scheme, but also the capability of capturing discontinuities automatically of the WENO scheme. Therefore, the WCNS gets lots of attention in the field of computational fluid dynamics. Nonomura et al. [4] compared the freestream and vortex preservation properties of the classic WENO and WCNS on curvilinear grids, and pointed out that the WCNS works better than the WENO in the generalized coordinate system. In 2008, two groups [5, 6] explored higher order WCNS and expanded the scheme to the ninth order, respectively. To further improve the resolution of the WCNS, Yan and Liu [7] developed the Y-type nonlinear weights and proposed a new seventh order compact nonlinear interpolation method based on the same stencil as the fifth order WENO scheme. To recover the optimal numerical resolution in smooth flow field, Zhang et al. [8] recently introduced an ENO-like stencil selection procedure to the WCNS, which fully abandons the oscillatory stencils crossing discontinuities and directly applies optimal linear weights when the flow field is smooth.

In 2011, Deng et al. developed the hybrid cell-edge and cell-node weighted compact nonlinear schemes (HWCNS) [9] based on the original WCNS, and put forward the conservation metric method (CMM) to make the scheme follow the geometrical conservation law. The HWCNS is a hybrid scheme of cell-edge and cell-node, with advantages of narrower difference stencil, higher efficiency and better stability. Furthermore, the HWCNS satisfies the geometric conservation law, and it is more suitable for the simulation of flow fields with complex geometric shapes. Considering that the non-uniqueness form of CMM may cause serious computational instability and inaccuracy for high-order schemes, a symmetrical conservative metric method (SCMM) is proposed based on the discussions of the metrics and Jacobian in [10]. It makes the calculations based on the high-order WCNS schemes around complex geometry flows possible and somewhat easy. In [11], Nonomura et al. modified the flux differencing step of WCNS and developed the midpoint-and-node-to-node difference (MND) scheme. Their modification makes the scheme more robust, but at the same time, more dissipative. And so far, the WCNS has been successfully applied to the numerical simulation of the flow field in the low speed, the supersonic speed and the hypersonic speed, and shown good performance in the computation of the complicated flow field.

Compared with the fifth-order and higher-order WCNS, the advantages of the third-order scheme are robust for shock problems, such as fewer grid points, less computational cost. However, the computational results show that the classical WCNS using the JS weight of Jiang and Shu [12] is too dissipative. To overcome the shortcomings, a stencil-selection procedure was introduced to improve the nonlinear weight of the third-order WCNS in [13]. Since the proposed scheme has reduced the dissipation and dispersion errors, compared with the WCNSs using typical nonlinear weights, there is a parameter to choose during the stencil-selection procedure. In [14], Zhu first designed a new type of finite difference WENO schemes based on the original idea of the multiresolution methods [15, 16]. For the third-order nonlinear interpolation, only the information defined on one one-point central stencil and one three-point central stencil is used. If the solution is smooth enough, the information defined on such two central spatial stencils is combined together to obtain a third-order approximation. When there is a discontinuity in the three-point central stencil, the information of the three-point stencil is effectively abandoned and the approximation order degrades to one. In this work we incorporate Zhu’s nonlinear interpolation procedure to improve the HWCNS and propose a third-order hybrid cell-edge and cell-node weighted compact nonlinear scheme, which is simple and efficient in practical applications. In addition, the new method is applied to the governing equations under the curvilinear coordinate system and its freestream and vortex preservation properties are verified. Our numerical experiments show that the improved method has stronger robustness and its dissipation at nonlinear waves is slightly smaller than that of the original method.

The other parts of the paper are organized as follows. In Section 2, the conventional HWCNS3 on the curvilinear coordinates for hyperbolic conservation laws are reviewed. Section 3 presents the improved HWCNS3. A series of numerical examples are given in Section 4. Concluding remarks are provided in Section 5.

## 2 Preliminaries

### 2.1 Governing equations in curvilinear coordinates

In this subsection, the three-dimensional Euler equations in the Cartesian and generalized coordinate systems and the metrics used in the generalized coordinate system are described. In addition, the numerical technique that can preserve the freestream conditions for the HWCNS is also presented.

The three-dimensional Euler equations in the Cartesian coordinate system are expressed as

where

are conservative variables and convective fluxes, respectively. Here *ρ*, *u*, *v*, *w*, *p* and *E* are density, components of velocity in the *x*, *y* and *z* coordinate directions, pressure and total energy, respectively. By assuming that the fluid obeys the perfect gas state equation, *p* can be calculated as

where *γ* indicates the specific heat ratio of the gas.

When a curvilinear grid is used for numerical computation, the governing Eq. (1) is first transformed into a generalized coordinates system (*ξ*,*η*,*ζ*) with the following relationships

The transformed equation can be written as

where

The transformation Jacobian *J* and the metrics \(\tilde {\xi _{x}}, \tilde {\xi _{y}}, \cdots \) are given by

### 2.2 Original HWCNS

The semi-discrete approximation of the governing Eq. (2) at a grid point indexed as (*i,j*,*k*) is as follows:

where \(\left (\tilde {\mathbf {F}}'_{\xi }\right)_{i,j,k}, \left (\tilde {\mathbf {G}}'_{\eta }\right)_{i,j,k}\) and \(\left (\tilde {\mathbf {H}}'_{\zeta }\right)_{i,j,k}\) are the approximation to the first spatial derivatives of the fluxes \(\tilde {\mathbf {F}}, \tilde {\mathbf {G}}\) and \(\tilde {\mathbf {H}}\) with respect to *ξ*,*η* and *ζ*, respectively. For HWCNS3, \(\left (\tilde {\mathbf {F}}'_{\xi }\right)_{i,j,k}\) is computed by the fourth-order MND formula [11]:

where \(\hat {\mathbf {F}}_{i\pm \frac {1}{2},j,k}\) are the numerical fluxes at half points, the local Lax-Friedrichs flux is used here:

where *α* is the maximum eigenvalue of the Jacobian matrix, the cell-boundary reconstructions \(\tilde {\mathbf {U}}^{L}_{i\pm \frac {1}{2},j,k}\) and \(\tilde {\mathbf {U}}^{R}_{i\pm \frac {1}{2},j,k}\) are computed by the third-order nonlinear interpolation in the characteristic space. Here, only the construction of \(\tilde {\mathbf {U}}^{L}_{i+\frac {1}{2},j,k}\) is presented, and the subscripts “ *j,k*” are dropped for simplicity.

Denote **I**_{m} and **r**_{m} the *m*th left and right eigenvectors of the Jacobi matrix \(\mathbf {A}=\frac {\partial \mathbf {F}}{\partial \mathbf {U}}\). At first, conservative variables are transformed into characteristic variables, the *m*th characteristic variable is computed as follows:

Then \(U^{L}_{i+\frac {1}{2},m}\) is constructed by the following nonlinear interpolation:

where

and the nonlinear weights *ω*_{1,m} and *ω*_{2,m} are determined as follows

with \(d_{1}=\frac {1}{4}\) and \(d_{2}=\frac {3}{4}\) are the linear weights, *ε*=10^{−6} is a small positive number to avoid the denominator becoming zero, and the smoothness indicators are

Finally, the characteristic form of the interpolated value is transformed into the conservative form:

## 3 The new HWCNS

### 3.1 Node-to-midpoint interpolation

The computational results show that the original HWCNS scheme is too dissipative. To overcome this shortcoming, we propose a new nonlinear reconstruction procedure with similar ideas that was first presented in [14].

We still use the construction of \(U^{L}_{i+\frac {1}{2},m}\) as an example. Two central stencils are chosen: *T*_{1}={*i*} and *T*_{2}={*i*−1,*i,i*+1}, the corresponding reconstruction polynomials are denoted as *q*_{1,m}(*x*) and *q*_{2,m}(*x*),

For consistency, the reconstruction polynomials are normalized to obtain the following interpolation polynomials:

where *γ*_{1} and *γ*_{2} are linear weights with *γ*_{1}+*γ*_{2}=1. Based on a balance between the sharp and essentially non-oscillatory shock transitions in nonsmooth regions and accuracy in smooth regions, we set \(\gamma _{1}=\frac {1}{11},\gamma _{2}=\frac {10}{11}\).

The smoothness indicator *β*_{2,m} of *p*_{2,m}(*x*) is computed according to the definition in [12]:

While for the zeroth-degree polynomial *p*_{1,m}(*x*), the measurement of smoothness is different:

with *IS*_{1,m} and *IS*_{2,m} are defined in Eqs. (8) and (9).

The nonlinear weights are defined by

where *τ*_{m} is defined as the absolute difference between the smoothness indicators:

and *ε*=10^{−6} is a small number to avoid the denominator becoming zero.

The final reconstructed variable at cell edges is given by

### 3.2 Freestream preservation property

In uniform flow regions, **U**,**F**,**G** and **H** are constants, and Eq. (2) is simplified as

where

By substituting Eq. (3) into Eq. (17), we can see that

which means the uniform flow conditions hold:

The condition Eq. (18) is called the freestream condition. To preserve it numerically, we first rewrite the metrics in an equivalent form as suggested in [17]:

Then, Eq. (2) at grid node (*i,j*,*k*) is discretized as

where

For \(l=1,2,3, D_{l}^{\xi },D_{l}^{\eta }\) and \(D_{l}^{\zeta }\) denote the finite difference operators in *ξ*,*η* and *ζ* coordinate directions respectively.

As proven in [18], the freestream conditions hold if *D*_{1} and *D*_{2} are exchangeable. Furthermore, *D*_{2}=*D*_{3} in practical calculations can prevent large numerical errors. Therefore, *D*_{1},*D*_{2} and *D*_{3} all use the fourth-order compact differential operator Eq. (5). The values at midpoint are obtained analytically or by the fourth-order Lagrangian interpolation, for example,

## 4 Numerical experiments

In this section, a variety of benchmark problems are given to illustrate the behavior of the present method, compared with the original HWCNS3. The CFL number is taken as 0.6, except for the accuracy tests where a smaller time step is taken to ensure that spatial errors dominate.

### 4.1 The order of numerical accuracy

**Example 1:** We consider the one-dimensional Euler equations on [0,2*π*] with periodic boundary conditions and initial conditions:

This problem has an exact solution of *ρ*(*x,t*)=1+0.2 sin(*x*−*t*). We compute the solution up to *t*=1 using the new HWCNS3, the errors and orders of convergence are listed in Table 1. We can see that the third order of accuracy is achieved.

**Example 2:** We then consider the two-dimensional Euler equations on [0,2*π*]×[0,2*π*] with periodic boundary conditions and initial conditions:

The exact solution of this problem is *ρ*(*x,y*,*t*)=1+0.2 sin(*x*+*y*−2*t*). The final time is *t*=1. Table 2 lists the errors and orders of convergence of density. We can see that the third order of accuracy is also achieved for this two-dimensional case.

### 4.2 Shock capturing ability

**Example 3:** We consider two shock tube problems of the one-dimensional Euler equations. The Sod shock tube problem involves a right-moving shock of Mach number 1.7. Its initial conditions are given as

The next problem is the Lax shock tube problem which involves a right-moving shock of Mach number 2.0. The initial conditions are given as

The computed density *ρ* of the two problems is presented in Figs. 1 and 2 respectively. We can observe that the new method has better resolution than the original HWCNS3 in the neighborhood of shocks for these two problems.

**Example 4:** We now consider the interaction of two blast waves. The initial conditions are given as

The boundaries at *x*=0 and *x*=1 are solid walls with reflecting boundary conditions. At the final time *t*=0.038, the flow field has three contact discontinuities. The middle one, which is generated by the two shocks interacting with each other, is very difficult to resolve. Figure 3 shows the results with *N*=600 grid points. Once again, it appears that the new HWCNS3 works better than the original one for this example.

**Example 5:** We consider a two-dimensional Riemann problem [19] in the square [0,1]×[0,1] which is initialized by the following conditions:

This problem is characterized by rich small scales in the flow fields, and thus is specifically chosen to evaluate the ability of the proposed numerical schemes and resolve the fine structures. We evolve the solution until time *t*=0.8. The results with grid points 400×400 and 1200×1200 are plotted in Figs. 4 and 5. We can see that the new HWCNS3 can capture the rich small scales for this specific example.

**Example 6:** We consider the double Mach reflection problem. This problem describes the phenomenon that a Mach 10 shock reflected from the wall with an incidence angle of 60^{∘}. The computational domain is chosen to be [0,4]×[0,1] and the initial conditions are given as

*γ*=1.4. The left state value and right state value are specified at the left and right boundary respectively. At the bottom boundary *y*=0, the reflective boundary conditions are applied when \(x\geq \frac {1}{6}\) and the inflow boundary conditions are applied when \(x<\frac {1}{6}\). At the top boundary *y*=1, the left state value is specified when *x*<*g*(*t*) and the right state value is specified when *x*≥*g*(*t*), where \(g(t)=\frac {1}{6}+\frac {\sqrt {3}}{3}(1+20t)\). Using grid points 1920×480, the results at *t*=0.2 are shown. We present the density of region [0,3]×[0,1] in Fig. 6. The new HWCNS could gain good resolution and sharp shock transitions for this example.

### 4.3 Freestream and vortex preservation

**Example 7:** The freestream is tested on a three-dimensional wavy grid, as shown in Fig. 7. This grid is generated by

where *L*_{x}=*L*_{y}=*L*_{z}=4,*A*_{x}=*A*_{y}=*A*_{z}=1,*n*_{xy}=*n*_{xz}=*n*_{yz}=*n*_{yx}=*n*_{zx}=*n*_{zy}=4, and *x*_{min}=−*L*_{x}/2,*y*_{min}=−*L*_{y}/2,*z*_{min}=−*L*_{z}/2. The grid resolution is set to 21×21×21.

The initial condition of an ideal gas is given as

where *γ*=1.4 is the specific heat ratio.

We take *Δ**t*=0.03 and compute 200 steps. The *L*_{2} errors of the velocity components *v* and *w* of the flow field and the CPU time distribution are shown in Table 3, where *T*_{1} denotes the CPU time for computing the grid metrics and Jacobian and *T*_{2} denotes the CPU time for time iteration. We can clearly observe that the *L*_{2} errors are all at the level of round-off errors for different precisions, and verify the expected freestream preservation property accordingly. Since the grid metrics and Jacobian only need to be calculated once and stored in the whole computational process, its CPU time is negligible compared with the CPU time of time iteration.

**Example 8:** We consider a two-dimensional moving vortex problem on the following wavy grid to test the vortex preservation property.

where *L*_{x}=*L*_{y}=20,*A*_{x}×*Δ**x*_{0}=*A*_{y}×*Δ**y*_{0}=0.6,*n*_{xy}=*n*_{yx}=8, and *x*_{min}=−*L*_{x}/2,*y*_{min}=−*L*_{y}/2.

Initially, the mean flow is *ρ*=1,*u*=0.5,*v*=0 and \(p=\frac {1}{\gamma }\). Then we add an isentropic vortex to it with perturbation centered at (*x*_{0},*y*_{0})=(0,0) in (*u,v*) with *T*=*p*/*ρ*, and no perturbation in entropy *S*=*p*/*ρ*^{γ},

where \(\tau =\frac {r}{r_{c}},r=\sqrt {(x-x_{0})^{2}+(y-y_{0})^{2}}\) and *r*_{c}=1. The exact solution of this problem is smooth and periodic. We set *α*=0.204,*ε*=0.02 and use 5 different grids to evaluate the scheme convergence. The time-step sizes *Δ**t* respect to those grids are selected as *Δ**t*=0.2 min(*Δ**x*,*Δ**y*). The numerical results at *T*=40 are given in Fig. 8. It can be observed that the new HWCNS3 is able to resolve the moving vortex. In Table 4, grid convergence rates with the wavy grid are shown. As expected, the formal third order of accuracy is obtained.

### 4.4 Supersonic flow past a cylinder

**Example 9:** Finally, the supersonic flow past a cylinder is simulated on a randomized curvilinear grid [20]. As shown in Fig. 9, the grid is generated as:

where

with \(\theta =\frac {5\pi }{12},R_{x}=3,R_{y}=6,i_{\max }=81\) and *j*_{max}=61.

The reflective boundary condition is applied on the cylinder surface, the supersonic inflow condition at the left boundary and the supersonic outflow condition at the other boundaries.

For this problem, the improved HWCNS3 is more robust than the original one. First, we consider a Mach 2 supersonic flow moving toward the cylinder from left and taking the time-step as *Δ**t*=0.01. The new scheme works well while the original scheme will diverge unless the time-step is reduced to 0.001. Figure 10 shows the density and pressure contours of the two schemes. We can see that the results have good agreement with that of [20]. We then increase the Mach number of the inflow to 10 and take the time-step as *Δ**t*=0.001. Although both schemes can work in this situation, the density obtained by the original scheme oscillates slightly as shown in Fig. 11. Finally, we increase the Mach number of the supersonic inflow to 20 and take the time-step as *Δ**t*=0.001, again the new scheme is still robust while the original scheme is divergent under the same condition. Although the original scheme can converge if we further reduce the time step to 0.0001, the density still has small oscillation as shown in Fig. 12.

## 5 Conclusions

In this paper, we construct a third-order HWCNS for the compressible Euler equations on curvilinear grids. The new scheme uses the information defined on two nested central spatial stencils to compute the cell boundary values, which makes it more stable. This nonlinear weighting mechanism can also be extended to the WCNS with arbitrary high order accuracy. Various numerical analyses have shown that the presented scheme is capable of simulating complex flow problems, including curvilinear geometric boundary, strong shock waves and small-scale structures. Further applications of the proposed method are expected.

## Availability of data and materials

Not applicable.

## References

Deng X, Mao M (1997) Weighted compact high-order nonlinear schemes for the Euler equations. AIAA paper1997-1941.

Deng X, Zhang H (2000) Developing high-order accurate nonlinear schemes. J Comput Phys 165:22–44.

Deng X (2002) High-order accurate dissipative weighted compact nonlinear schemes. Sci China Math Phys Astron 45(3):356–370.

Nonomura T, Iizuka N, Fujii K (2010) Freestream and vortex preservation properties of high-order WENO and WCNS on curvilinear grids. Comput Fluids 39:197–214.

Nonomura T, Iizuka N, Fujii K (2007) Increasing order of accuracy of weighted compact nonlinear scheme. AIAA paper2007-893.

Zhang S, Jiang S, Shu C-W (2008) Development of nonlinear weighted compact schemes with increasingly higher order accuracy. J Comput Phys 227:7294–7321.

Yan Z, Liu H, Ma Y, Mao M, Deng X (2017) Further improvement of weighted compact nonlinear scheme using compact nonlinear interpolation. Comput Fluids 156:135–145.

Zhang H, Zhang F, Xu C (2019) Towards optimal high-order compact schemes for simulating compressible flows. Appl Math Comput 355:221–237.

Deng X, Mao M (2011) New high-order hybrid cell-edge and cell-node weighted compact nonlinear schemes. AIAA paper2011-3857.

Deng X, Min Y, Mao M, Liu H, Tu G, Zhang H (2013) Further studies on geometric conservation law and applications to high-order finite difference schemes with stationary grids. J Comput Phys 239:90–111.

Nonomura T, Fujii K (2013) Robust explicit formulation of weighted compact nonlinear scheme. Comput Fluids 85:8–18.

Jiang GS, Shu CW (1996) Efficient implementation of weighted ENO schemes. J Comput Phys 126:202–228.

Tian Z, Wang G, Zhang F, Zhang H (2020) A third-order compact nonlinear scheme for compressible flow simulations. Int J Numer Meth Fluids 92:1352–1367.

Zhu J, Shu CW (2018) A new type of multi-resolution WENO schemes with increasingly higher order of accuracy. J Comput Phys 375:659–683.

Harten A (1995) Multiresolution algorithms for the numerical solution of hyperbolic conservation laws. Commun Pure Appl Math 48:1305–1342.

Harten A (1996) Multiresolution representation of data: a general framework. SIAM J Numer Anal 33:1205–1256.

Thomas P, Lombard C (1979) Geometric conservation law and its application to flow computations on moving grids. AIAA J 17(10):1030–1037.

Deng X, Mao M, Tu G, Liu H, Zhang H (2011) Geometric conservation law and applications to high-order finite difference schemes with stationary grids. J Comput Phys 230:1100–1115.

Lax P, Liu X (1998) Solution of two-dimensional Riemann problems of gas dynamics by positive schemes. SIAM J Sci Comput 19(2):319–340.

Zhu Y, Hu X (2019) Free-stream preserving linear-upwind and WENO schemes on curvilinear grids. J Comput Phys 399:108907.

## Acknowledgements

N/A.

## Funding

The work is supported by the Basic Research Foundation of the National Numerical Wind Tunnel Project (Grant No. NNW2018-ZT4A08) and the National Key Project (Grant No. GJXM92579) of China.

## Author information

### Authors and Affiliations

### Contributions

MC was a major contributor in writing the manuscript. LT carried out the numerical simulation. YL directed the numerical simulation and processed the calculated data. HZ reviewed and revised the manuscript. All authors read and approved the final manuscript.

### Corresponding author

## Ethics declarations

### Competing interests

The authors declare that they have no competing interests.

## Additional information

### Publisher’s Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## Rights and permissions

**Open Access** This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.

## About this article

### Cite this article

Cheng, M., Tang, L., Liu, Y. *et al.* An improved third-order HWCNS for compressible flow simulation on curvilinear grids.
*Adv. Aerodyn.* **3**, 32 (2021). https://doi.org/10.1186/s42774-021-00083-w

Received:

Accepted:

Published:

DOI: https://doi.org/10.1186/s42774-021-00083-w