Skip to main content

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


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.


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. [13], 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.


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

$$ \frac{\partial \mathbf{U}}{\partial t}+\frac{\partial \mathbf{F}}{\partial x}+\frac{\partial \mathbf{G}}{\partial y}+\frac{\partial \mathbf{H}}{\partial z}=0, $$


$$\mathbf{U}=\left(\begin{array}{c}\rho\\\rho u\\\rho v\\\rho w\\E\end{array}\right), \mathbf{F}=\left(\begin{array}{c}\rho u\\\rho u^{2}+p\\\rho uv\\\rho uw\\(E+p)u\end{array}\right), \mathbf{G}=\left(\begin{array}{c}\rho v\\\rho uv\\\rho v^{2}+p\\\rho vw\\(E+p)v\end{array}\right), \mathbf{H}=\left(\begin{array}{c}\rho w\\\rho uw\\\rho vw\\\rho w^{2}+p\\(E+p)w\end{array}\right)$$

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

$$\xi=\xi(x,y,z),\eta=\eta(x,y,z),\zeta=\zeta(x,y,z). $$

The transformed equation can be written as

$$ \frac{\partial \tilde{\mathbf{U}}}{\partial t}+\frac{\partial \tilde{\mathbf{F}}}{\partial\xi}+\frac{\partial \tilde{\mathbf{G}}}{\partial\eta}+\frac{\partial \tilde{\mathbf{H}}}{\partial\zeta}=0, $$


$$\begin{array}{*{20}l} \tilde{\mathbf{U}}&=\frac{1}{J}\mathbf{U}\\ \tilde{\mathbf{F}}&=\tilde{\xi_{x}}\mathbf{F}+\tilde{\xi_{y}}\mathbf{G}+\tilde{\xi_{z}}\mathbf{H}\\ \tilde{\mathbf{G}}&=\tilde{\eta_{x}}\mathbf{F}+\tilde{\eta_{y}}\mathbf{G}+\tilde{\eta_{z}}\mathbf{H}\\ \tilde{\mathbf{H}}&=\tilde{\zeta_{x}}\mathbf{F}+\tilde{\zeta_{y}}\mathbf{G}+\tilde{\zeta_{z}}\mathbf{H} \end{array} $$

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

$$\frac{1}{J}=x_{\xi} y_{\eta} z_{\zeta}-x_{\xi} y_{\zeta} z_{\eta}+x_{\eta} y_{\zeta} z_{\xi}-x_{\eta} y_{\xi} z_{\zeta}+x_{\zeta} y_{\xi} z_{\eta}-x_{\zeta} y_{\eta} z_{\xi}$$
$$ \left\{\begin{array}{ccc}\tilde{\xi_{x}}=\frac{\xi_{x}}{J}=y_{\eta} z_{\zeta}-y_{\zeta} z_{\eta},&\tilde{\xi_{y}}=\frac{\xi_{y}}{J}=x_{\zeta} z_{\eta}-x_{\eta} z_{\zeta},&\tilde{\xi_{z}}=\frac{\xi_{z}}{J}=x_{\eta} y_{\zeta}-x_{\zeta} y_{\eta}\\ \tilde{\eta_{x}}=\frac{\eta_{x}}{J}=y_{\zeta} z_{\xi}-y_{\xi} z_{\zeta},&\tilde{\eta_{y}}=\frac{\eta_{y}}{J}=x_{\xi} z_{\zeta}-x_{\zeta} z_{\xi},&\tilde{\eta_{z}}=\frac{\eta_{z}}{J}=x_{\zeta} y_{\xi}-x_{\xi} y_{\zeta}\\ \frac{\zeta_{x}}{J}=\tilde{\zeta_{x}}=y_{\xi} z_{\eta}-y_{\eta} z_{\xi},&\tilde{\zeta_{y}}=\frac{\zeta_{y}}{J}=x_{\eta} z_{\xi}-x_{\xi} z_{\eta},&\tilde{\zeta_{z}}=\frac{\zeta_{z}}{J}=x_{\xi} y_{\eta}-x_{\eta} y_{\xi}\end{array}\right. $$

Original HWCNS

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

$$ \left(\frac{d\tilde{\mathbf{U}}}{dt}\right)_{i,j,k}=-\left(\tilde{\mathbf{F}}'_{\xi}\right)_{i,j,k}- \left(\tilde{\mathbf{G}}'_{\eta}\right)_{i,j,k}-\left(\tilde{\mathbf{H}}'_{\zeta}\right)_{i,j,k} $$

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]:

$$ \left(\tilde{\mathbf{F}}'_{\xi}\right)_{i,j,k}=\frac{4}{3\Delta\xi}\left(\hat{\mathbf{F}}_{i+\frac{1}{2},j,k}- \hat{\mathbf{F}}_{i-\frac{1}{2},j,k}\right)-\frac{1}{6\Delta\xi}\left(\tilde{\mathbf{F}}_{i+1,j,k}-\tilde{\mathbf{F}}_{i-1,j,k}\right) $$

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:

$$ \hat{\mathbf{F}}_{i\pm\frac{1}{2},j,k}=\frac{1}{2}\left[\tilde{\mathbf{F}}\left(\tilde{\mathbf{U}}^{L}_{i\pm\frac{1}{2},j,k}\right) +\tilde{\mathbf{F}}\left(\tilde{\mathbf{U}}^{R}_{i\pm\frac{1}{2},j,k}\right)-\alpha\left(\tilde{\mathbf{U}}^{R}_{i\pm\frac{1}{2},j,k}-\tilde{\mathbf{U}}^{L}_{i\pm\frac{1}{2},j,k}\right)\right] $$

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 Im and rm the mth 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 mth characteristic variable is computed as follows:

$$U_{l,m}=\mathbf{I}_{m}\tilde{\mathbf{U}}_{l},\quad(l=i-1,i,i+1),\quad l= 1,2. $$

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

$$ U^{L}_{i+\frac{1}{2},m}=\omega_{1,m}\hat{U}^{1}_{i+\frac{1}{2},m}+\omega_{2,m}\hat{U}^{2}_{i+\frac{1}{2},m} $$


$$\hat{U}^{1}_{i+\frac{1}{2},m}=-\frac{1}{2}U_{i-1,m}+\frac{3}{2}U_{i,m} $$
$$\hat{U}^{2}_{i+\frac{1}{2},m}=\frac{1}{2}U_{i,m}+\frac{1}{2}U_{i+1,m} $$

and the nonlinear weights ω1,m and ω2,m are determined as follows

$$\omega_{l,m}=\frac{\alpha_{l,m}}{\alpha_{1,m}+\alpha_{2,m}},\quad \alpha_{l,m}=\frac{d_{l}}{(IS_{l,m}+\varepsilon)^{2}} $$

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

$$\begin{array}{@{}rcl@{}} IS_{1,m}=\left(U_{i-1,m}-U_{i,m}\right)^{2} \end{array} $$
$$\begin{array}{@{}rcl@{}} IS_{2,m}=\left(U_{i,m}-U_{i+1,m}\right)^{2} \end{array} $$

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

$$ \tilde{\mathbf{U}}^{L}_{i+\frac{1}{2}}=\sum_{m}U^{L}_{i+\frac{1}{2},m}\mathbf{r}_{m} $$

The new HWCNS

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: T1={i} and T2={i−1,i,i+1}, the corresponding reconstruction polynomials are denoted as q1,m(x) and q2,m(x),

$$\begin{array}{@{}rcl@{}} q_{1,m}\left(x_{i+\frac{1}{2}}\right)&=&U_{i,m} \end{array} $$
$$\begin{array}{@{}rcl@{}} q_{2,m}\left(x_{i+\frac{1}{2}}\right)&=&-\frac{1}{8}U_{i-1,m}+\frac{3}{4}U_{i,m}+\frac{3}{8}U_{i+1,m} \end{array} $$

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

$$\begin{array}{@{}rcl@{}} p_{1,m}(x)&=&q_{1,m}(x) \end{array} $$
$$\begin{array}{@{}rcl@{}} p_{2,m}(x)&=&\frac{1}{\gamma_{2}}q_{2,m}(x)-\frac{\gamma_{1}}{\gamma_{2}}q_{1,m}(x) \end{array} $$

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 p2,m(x) is computed according to the definition in [12]:

$$\begin{array}{@{}rcl@{}} \beta_{2,m}&=&\left(U_{i-1,m}-2U_{i,m}+U_{i+1,m}\right)^{2}\\ &&+\frac{1}{3}\left(U_{i-1,m}^{2}+U_{i,m}^{2}+U_{i+1,m}^{2} -U_{i-1,m}U_{i,m}-U_{i,m}U_{i+1,m}-U_{i+1,m}U_{i-1,m}\right) \end{array} $$

While for the zeroth-degree polynomial p1,m(x), the measurement of smoothness is different:

$$\mu_{1,m}=\left\{\begin{array}{ll}\frac{1}{11},&IS_{1,m}\geq {IS}_{2,m},\\ \frac{10}{11},&{IS}_{1,m}<{IS}_{2,m},\end{array}\right.\quad \mu_{2,m}=1-\mu_{1,m}. $$
$$\sigma_{l,m}=\mu_{l,m}\left(1+\frac{|{IS}_{1,m}-{IS}_{2,m}|}{IS_{l,m}+\varepsilon}\right),\quad l=1,2. $$
$$\sigma_{m}=\sigma_{1,m}+\sigma_{2,m} $$
$$\beta_{1,m}=\frac{\left(\sigma_{1,m}(U_{i,m}-U_{i-1,m})+\sigma_{2,m}(U_{i+1,m}-U_{i,m})\right)^{2}}{\sigma_{m}^{2}} $$

with IS1,m and IS2,m are defined in Eqs. (8) and (9).

The nonlinear weights are defined by

$$\omega_{l,m}=\frac{\overline{\omega}_{l,m}}{\overline{\omega}_{1,m}+\overline{\omega}_{2,m}},\quad \overline{\omega}_{l,m}=\gamma_{l}\left(1+\frac{\tau_{m}}{\varepsilon+\beta_{l,m}}\right),\quad l=1,2. $$

where τm is defined as the absolute difference between the smoothness indicators:

$$\tau_{m}=|\beta_{2,m}-\beta_{1,m}| $$

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

The final reconstructed variable at cell edges is given by

$$ U^{L}_{i+\frac{1}{2},m}=\omega_{1,m}p_{1}\left(x_{i+\frac{1}{2}}\right)+\omega_{2,m}p_{2}\left(x_{i+\frac{1}{2}}\right) $$

Freestream preservation property

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

$$ \frac{\partial\tilde{\mathbf{U}}}{\partial t}+I_{x}\mathbf{F}+I_{y}\mathbf{G}+I_{z}\mathbf{H}=0, $$


$$ \left\{\begin{array}{cc} I_{x}=\frac{\partial}{\partial\xi}\left(\tilde{\xi_{x}}\right)+\frac{\partial}{\partial\eta}\left(\tilde{\eta_{x}}\right) +\frac{\partial}{\partial\zeta}\left(\tilde{\zeta_{x}}\right)\\ I_{y}=\frac{\partial}{\partial\xi}\left(\tilde{\xi_{y}}\right)+\frac{\partial}{\partial\eta}\left(\tilde{\eta_{y}}\right) +\frac{\partial}{\partial\zeta}\left(\tilde{\zeta_{y}}\right)\\ I_{z}=\frac{\partial}{\partial\xi}\left(\tilde{\xi_{z}}\right)+\frac{\partial}{\partial\eta}\left(\tilde{\eta_{z}}\right) +\frac{\partial}{\partial\zeta}\left(\tilde{\zeta_{z}}\right)\\ \end{array}\right. $$

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

$$ I_{x}=I_{y}=I_{z}=0 $$

which means the uniform flow conditions hold:

$$\frac{\partial\tilde{\mathbf{U}}}{\partial t}=0. $$

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]:

$$ \left\{\begin{array}{l} \frac{1}{J}=\frac{1}{3}\left[\left(x\tilde{\xi_{x}}+y\tilde{\xi_{y}}+z\tilde{\xi_{z}}\right)_{\xi}+ \left(x\tilde{\eta_{x}}+y\tilde{\eta_{y}}+z\tilde{\eta_{z}}\right)_{\eta}+ \left(x\tilde{\zeta_{x}}+y\tilde{\zeta_{y}}+z\tilde{\zeta_{z}}\right)_{\zeta}\right]\\ \begin{array}{ccc} \tilde{\xi_{x}}=(y_{\eta} z)_{\zeta}-(y_{\zeta} z)_{\eta},&\tilde{\xi_{y}}=(z_{\eta} x)_{\zeta}-(z_{\zeta} x)_{\eta},&\tilde{\xi_{z}}=(x_{\eta} y)_{\zeta}-(x_{\zeta} y)_{\eta}\\ \tilde{\eta_{x}}=(y_{\zeta} z)_{\xi}-(y_{\xi} z)_{\zeta},&\tilde{\eta_{y}}=(z_{\zeta} x)_{\xi}-(z_{\xi} x)_{\zeta},&\tilde{\eta_{z}}=(x_{\zeta} y)_{\xi}-(x_{\xi} y)_{\zeta}\\ \tilde{\zeta_{x}}=(y_{\xi} z)_{\eta}-(y_{\eta} z)_{\xi},&\tilde{\zeta_{y}}=(z_{\xi} x)_{\eta}-(z_{\eta} x)_{\xi},&\tilde{\zeta_{z}}=(x_{\xi} y)_{\eta}-(x_{\eta} y)_{\xi}\end{array}\end{array}\right. $$

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

$$ \left(\frac{\partial \tilde{\mathbf{U}}}{\partial t}\right)_{i,j,k}+D_{1}^{\xi}\left(\tilde{\mathbf{F}}\right)_{i,j,k}+D_{1}^{\eta}\left(\tilde{\mathbf{G}}\right)_{i,j,k}+D_{1}^{\zeta}\left(\tilde{\mathbf{H}}\right)_{i,j,k}=0 $$


$$ \begin{aligned} \left\{ \begin{array}{rcl} \left(\tilde{\mathbf{F}}\right)_{i,j,k}&=&\left(D^{\zeta}_{2}\left(\left(D^{\eta}_{3}y\right)z\right)-D^{\eta}_{2}\left(\left(D^{\zeta}_{3}y\right)z\right)\right)\left(\mathbf{F}\right)_{i,j,k} +\left(D^{\zeta}_{2}\left(\left(D^{\eta}_{3}z\right)x\right)-D^{\eta}_{2}\left(\left(D^{\zeta}_{3}z\right)x\right)\right)\left(\mathbf{G}\right)_{i,j,k}\\ &&+\left(D^{\zeta}_{2}\left(\left(D^{\eta}_{3}x\right)y\right)-D^{\eta}_{2}\left(\left(D^{\zeta}_{3}x\right)y\right)\right)\left(\mathbf{H}\right)_{i,j,k}\\ \left(\tilde{\mathbf{G}}\right)_{i,j,k}&=&\left(D^{\xi}_{2}\left(\left(D^{\zeta}_{3}y\right)z\right)-D^{\zeta}_{2}\left(\left(D^{\xi}_{3}y\right)z\right)\right)(\mathbf{F})_{i,j,k} +\left(D^{\xi}_{2}\left(\left(D^{\zeta}_{3}z\right)x\right)-D^{\zeta}_{2}\left(\left(D^{\xi}_{3}z\right)x\right)\right)(\mathbf{G})_{i,j,k}\\ &&+\left(D^{\xi}_{2}\left(\left(D^{\zeta}_{3}x\right)y\right)-D^{\zeta}_{2}\left(\left(D^{\xi}_{3}x\right)y\right)\right)(\mathbf{H})_{i,j,k}\\ \left(\tilde{\mathbf{H}}\right)_{i,j,k}&=&\left(D^{\eta}_{2}\left(\left(D^{\xi}_{3}y\right)z\right)-D^{\xi}_{2}\left(\left(D^{\eta}_{3}y\right)z\right)\right)(\mathbf{F})_{i,j,k} +\left(D^{\eta}_{2}\left(\left(D^{\xi}_{3}z\right)x\right)-D^{\xi}_{2}\left(\left(D^{\eta}_{3}z\right)x\right)\right)(\mathbf{G})_{i,j,k}\\ &&+\left(D^{\eta}_{2}\left(\left(D^{\xi}_{3}x\right)y\right)-D^{\xi}_{2}\left(\left(D^{\eta}_{3}x\right)y\right)\right)(\mathbf{H})_{i,j,k} \end{array}\right. \end{aligned} $$

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 D1 and D2 are exchangeable. Furthermore, D2=D3 in practical calculations can prevent large numerical errors. Therefore, D1,D2 and D3 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,

$$ \left(\tilde{\xi_{x}}\right)_{i+\frac{1}{2},j,k}= \frac{1}{16}\left(-\left(\tilde{\xi_{x}}\right)_{i-1,j,k}+9\left(\tilde{\xi_{x}}\right)_{i,j,k} +9\left(\tilde{\xi_{x}}\right)_{i+1,j,k}-\left(\tilde{\xi_{x}}\right)_{i+2,j,k}\right) $$

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.

The order of numerical accuracy

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

$$\rho(x,0)=1+0.2\sin x,\quad u(x,0)=1,\quad p(x,0)=1,\quad \gamma=1.4. $$

This problem has an exact solution of ρ(x,t)=1+0.2 sin(xt). 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.

Table 1 The accuracy test for the one-dimensional Euler equations

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

$$\rho(x,y,0)=1+0.2\sin(x+y),\quad u(x,y,0)=v(x,y,0)=1,\quad p(x,y,0)=1,\quad \gamma=1.4. $$

The exact solution of this problem is ρ(x,y,t)=1+0.2 sin(x+y−2t). 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.

Table 2 The accuracy test for the two-dimensional Euler equations

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

$$ (\rho,u,p,\gamma)=\left\{\begin{array}{cc}(1,0,1,1.4),&x\in[0,0.5],\\(0.125,0,0.1),&x\in(0.5,1].\end{array}\right. $$

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

$$ (\rho,u,p,\gamma)=\left\{\begin{array}{cc}(0.445,0.698,3.528,1.4),&x\in[0,0.5],\\(0.5,0,0.571), &x\in(0.5,1].\end{array}\right. $$

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.

Fig. 1

Numerical solutions for the Sod Problem at t=0.2,N=200. Left: Density; Right: Zoom in density

Fig. 2

Numerical solutions for the Lax Problem at t=0.14,N=200. Left: Density; Right: Zoom in density

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

$$ (\rho,u,p,\gamma)=\left\{\begin{array}{ll}(1,0,10^{3},1.4),&x\in[0,0.1),\\(1,0,10^{-2},1.4),&x\in[0.1,0.9),\\ (1,0,10^{2},1.4),&x\in[0.9,1].\end{array}\right. $$

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.

Fig. 3

Numerical solutions for the blast wave Problem at t=0.038,N=600. Left: Density; Right: Zoom in density

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

$$ (\rho,u,v,p,\gamma)=\left\{\begin{array}{ll} (1.5,0,0,1.5,1.4),&0.8\leq x\leq 1,0.8\leq y\leq 1,\\ (0.5323,1.206,0,0.3,1.4),&0\leq x<0.8,0.8\leq y\leq 1,\\ (0.138,1.206,1.206,0.029,1.4),&0\leq x<0.8,0\leq y<0.8,\\ (0.5323,0,1.206,0.3,1.4),&0.8\leq x\leq 1,0\leq y<0.8.\end{array}\right. $$

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.

Fig. 4

Numerical solutions with grid points 400×400 for the 2D Riemann Problem at t=0.8, 30 density contour lines ranging from 0.1 to 1.8. Left: the original HWCNS3; Right: the improved HWCNS3

Fig. 5

Numerical solutions with grid points 1200×1200 for the 2D Riemann Problem at t=0.8, 30 density contour lines ranging from 0.1 to 1.8. Left: the original HWCNS3; Right: the improved HWCNS3

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

$$ (\rho,u,v,p)=\left\{\begin{array}{ll} (\rho_{L},u_{L},v_{L},p_{L})=(8.0,7.145,-4.125,116.5),&y\geq\sqrt{3}(x-\frac{1}{6}),\\ (\rho_{R},u_{R},v_{R},p_{R})=(1.4,0,0,1),&y<\sqrt{3}(x-\frac{1}{6}).\end{array}\right. $$

γ=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 xg(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.

Fig. 6

Numerical solutions for the double Mach reflection Problem at t=0.2, 30 density contour lines ranging from 1.8 to 20. Top: the original HWCNS3; Bottom: the improved HWCNS3

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

$$\begin{array}{@{}rcl@{}} x_{i,j,k}=x_{\min}+\Delta x_{0}\left[(i-1)+A_{x}\sin\frac{n_{{xy}}\pi(j-1)\Delta y_{0}}{L_{y}}\sin\frac{n_{{xz}}\pi(k-1)\Delta z_{0}}{L_{z}}\right],\\ y_{i,j,k}=y_{\min}+\Delta y_{0}\left[(j-1)+A_{y}\sin\frac{n_{{yz}}\pi(k-1)\Delta z_{0}}{L_{z}}\sin\frac{n_{{yx}}\pi(i-1)\Delta x_{0}}{L_{x}}\right],\\ z_{i,j,k}=z_{\min}+\Delta z_{0}\left[(k-1)+A_{z}\sin\frac{n_{{zx}}\pi(i-1)\Delta x_{0}}{L_{x}}\sin\frac{n_{{zy}}\pi(j-1)\Delta y_{0}}{L_{y}}\right], \end{array} $$
Fig. 7

The three-dimensional wavy grids for the freestream preservation test

where Lx=Ly=Lz=4,Ax=Ay=Az=1,nxy=nxz=nyz=nyx=nzx=nzy=4, and xmin=−Lx/2,ymin=−Ly/2,zmin=−Lz/2. The grid resolution is set to 21×21×21.

The initial condition of an ideal gas is given as

$$\rho=1,u=0.5,v=w=0,p=\frac{1}{\gamma} $$

where γ=1.4 is the specific heat ratio.

We take Δt=0.03 and compute 200 steps. The L2 errors of the velocity components v and w of the flow field and the CPU time distribution are shown in Table 3, where T1 denotes the CPU time for computing the grid metrics and Jacobian and T2 denotes the CPU time for time iteration. We can clearly observe that the L2 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.

Table 3 L2 errors of v- and w-Components and CPU time distribution in the freestream problem on the wavy grid

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

$$\begin{array}{@{}rcl@{}} x_{i,j}=x_{\min}+\Delta x_{0}\left[(i-1)+A_{x}\sin\frac{n_{{xy}}\pi(j-1)\Delta y_{0}}{L_{y}}\right],\\ y_{i,j}=y_{\min}+\Delta y_{0}\left[(j-1)+A_{y}\sin\frac{n_{{yx}}\pi(i-1)\Delta x_{0}}{L_{x}}\right], \end{array} $$

where Lx=Ly=20,Ax×Δx0=Ay×Δy0=0.6,nxy=nyx=8, and xmin=−Lx/2,ymin=−Ly/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 (x0,y0)=(0,0) in (u,v) with T=p/ρ, and no perturbation in entropy S=p/ργ,

$$(\delta u,\delta v)=\varepsilon\tau e^{\alpha(1-\tau^{2})}(\sin\theta,-\cos\theta),\quad \delta T=-\frac{(\gamma-1)\varepsilon^{2}}{4\alpha\gamma}e^{2\alpha(1-\tau^{2})},\quad \delta S=0,$$

where \(\tau =\frac {r}{r_{c}},r=\sqrt {(x-x_{0})^{2}+(y-y_{0})^{2}}\) and rc=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.

Fig. 8

21 equally spaced vorticity contours from 0.0 to 0.006 of moving vortex on a two-dimensional wavy grid

Table 4 L1,L2 errors of v-Components and their corresponding convergence rates in the moving vortex on a wavy grid

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:

$$\begin{array}{@{}rcl@{}} x=\left(R_{x}-(R_{x}-1)\eta'\right)\cos\left(\theta(2\xi'-1)\right),\\ y=\left(R_{y}-(R_{y}-1)\eta'\right)\sin\left(\theta(2\xi'-1)\right), \end{array} $$
Fig. 9

The computational grids of supersonic flow past a cylinder


$$\sqrt{Random_{i}^{2}+{Random}_{j}^{2}}=\left\{\begin{array}{cc}0.2,&\text{inner points},\\0,&\text{boundary points}.\end{array}\right.$$

with \(\theta =\frac {5\pi }{12},R_{x}=3,R_{y}=6,i_{\max }=81\) and jmax=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.

Fig. 10

Numerical solutions for Mach =2 flow past a cylinder with 21 contour lines. The density contour lines range from 1.2 to 3, and the pressure contour lines range from 0.86 to 3.88

Fig. 11

Numerical solutions for Mach =10 flow past a cylinder with 21 contour lines. The density contour lines range from 1.05 to 5.5, and the pressure contour lines range from 5 to 90

Fig. 12

Numerical solutions for Mach =20 flow past a cylinder with 21 contour lines. The density contour lines range from 1.05 to 6, and the pressure contour lines range from 20 to 360


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.


  1. 1

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

  2. 2

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

    MathSciNet  Article  Google Scholar 

  3. 3

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

    MathSciNet  MATH  Google Scholar 

  4. 4

    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.

    MathSciNet  Article  Google Scholar 

  5. 5

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

  6. 6

    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.

    MathSciNet  Article  Google Scholar 

  7. 7

    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.

    MathSciNet  Article  Google Scholar 

  8. 8

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

    MathSciNet  MATH  Google Scholar 

  9. 9

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

  10. 10

    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.

    MathSciNet  Article  Google Scholar 

  11. 11

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

    MathSciNet  Article  Google Scholar 

  12. 12

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

    MathSciNet  Article  Google Scholar 

  13. 13

    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.

    MathSciNet  Article  Google Scholar 

  14. 14

    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.

    MathSciNet  Article  Google Scholar 

  15. 15

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

    MathSciNet  Article  Google Scholar 

  16. 16

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

    MathSciNet  Article  Google Scholar 

  17. 17

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

    MathSciNet  Article  Google Scholar 

  18. 18

    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.

    MathSciNet  Article  Google Scholar 

  19. 19

    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.

    MathSciNet  Article  Google Scholar 

  20. 20

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

    MathSciNet  Article  Google Scholar 

Download references




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




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

Correspondence to Lingyan Tang.

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

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

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).

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI:


  • Third-order
  • Compact nonlinear scheme
  • Curvilinear grids
  • Nonlinear interpolation