An efficient compact difference scheme for solving the streamfunction formulation of the incompressible Navier–Stokes equations

https://doi.org/10.1016/j.jcp.2010.12.031Get rights and content

Abstract

Recently, a new paradigm for solving the steady Navier–Stokes equations using a streamfunction–velocity formulation was proposed by Gupta and Kalita [M.M. Gupta, J.C. Kalita, A new paradigm for solving Navier–Stokes equations: streamfunction–velocity formulation, J. Comput. Phys. 207 (2005) 52–68], which avoids difficulties inherent in the conventional streamfunction–vorticity and primitive variable formulations. It is discovered that this formulation can reached second-order accurate and obtained accuracy solutions with little additional cost for a couple of fluid flow problems.

In this paper, an efficient compact finite difference approximation, named as five point constant coefficient second-order compact (5PCC-SOC) scheme, is proposed for the streamfunction formulation of the steady incompressible Navier–Stokes equations, in which the grid values of the streamfunction and the values of its first derivatives (velocities) are carried as the unknown variables. The derivation approach is simple and can be easily used to derive compact difference schemes for other similar high order elliptic differential equations. Numerical examples, including the lid driven cavity flow problem and a problem of flow in a rectangular cavity with the hight–width ratio of 2, are solved numerically to demonstrate the accuracy and efficiency of the newly proposed scheme. The results obtained are compared with ones by different available numerical methods in the literature. The present scheme not only shows second-order accurate, but also proves more effective than the existing second-order compact scheme of the streamfunction formulation in the aspect of computational cost.

Highlights

► We introduce a novel approach for approximating higher order derivatives. ► We suggest an efficient second-order compact scheme for the streamfunction-velocity formulation. ► The coefficient matrix arising from the scheme of the streamfunction is diagonally dominant, symmetric and positive definite. ► The present algorithm is more effective than the existing ones in the aspect of computational cost and convergency.

Introduction

Numerical solution of incompressible Navier–Stokes equations is the most significant area in computational fluid dynamics (CFD) related fields in science and engineering. The two-dimensional (2D) incompressible flows are usually solved with the conventional primitive variable or the streamfunction–vorticity formulation of the Navier–Stokes equations. Over the past couple of decades, these formulations have been utilized by a large number of authors to test methods proposed for solving numerically a variety of fluid flow or heat transfer problems [2], [3], [5], [6], [7], [8], [9], [10], [11], [12], [13], [14], [15], [16], [17], [18], [19], [20], [22]. The primitive variable form of Navier–Stokes equations can accurately describe the fluid flow phenomena, but a major difficult comes from the pressure term in the momentum equations and must be implicitly updated for the incompressibility to be satisfied. The streamfunction–vorticity form of Navier–Stokes equations has been used to avoid handling the pressure variable for several decades. The vorticity formulation is obtained by taking the rotational of the momentum equations. The difficulty with the vorticity formulation is the lack of the simple physical boundary conditions for the vorticity field at the no-slip boundaries. When the vorticity transport equation is numerically solved, as mentioned by some researchers [27], [28], [45], a variety of numerical approximations for the boundary values of vorticity has to be carried out. In [45], a method of vorticity–streamfunction dynamics has been developed by Ben-Artzi, Fishelov and Trachtenberg. An important corollary of this method is that the difficulty of determining the vorticity on the boundary was already avoided. Later, in order to circumvent the pitfalls associated with the vorticity values at the boundary, the streamfunction–velocity or the pure streamfunction formulation-based methodology for the solution of the 2D incompressible fluid flows has been utilized by some authors [27], [28], [29], [30], [31], [46], [47]. The main advantage of this type of formulation is that the boundary conditions of streamfunction and velocity are generally known and are easy to implement computationally, thus the computational schemes proposed are very efficient and accurate. The scheme developed in this paper belongs to this category.

We consider the following streamfunction–velocity formulation of the 2D steady Navier–Stokes equations representing incompressible fluid flows:4ψx4+24ψx2y2+4ψy4=Reu3ψx3+3ψxy2+v3ψx2y+3ψy3u=ψy,v=-ψxwhere ψ is the streamfunction, u and v are the velocities and Re is the nondimensional Reynolds number.

When the streamfunction–velocity formulation (1), which is a fourth-order partial differential equation, is solved by finite differences, a uniform grid with 13 points must be needed to obtain a classical second-order finite difference (FD) approximation. This difference discretization using 13 grid points needs to be amended at grid points near the boundaries and must bring about difficulties for the solution of the resulting linear systems [27]. In order to overcome the above drawback, Gupta and Kalita [27] proposed a new paradigm for solving the steady Navier–Stokes equations: streamfunction–velocity formulation and derived two second-order compact finite difference schemes that carry streamfunction and its first derivatives (velocities) as the unknown variables for this equation using the Mathematica code. They used a biconjugate gradient method to obtain the numerical solutions of the fluid flow problems and solved the cavity flow with a grid size of 161 × 161 for 3200  Re  10,000 and a problem of flow in a rectangular cavity with the hight–width ratio of 2 with a grid size of 81 × 161 for 100  Re  1500. Similar a second-order compact finite difference formulation for the streamfunction–velocity formulation (1) was presented by Tian et al. [33]. They used a multigrid method to obtain the numerical solutions for the lid driven cavity flow problem for Reynolds numbers up to Re = 3200 with a maximum of 257 × 257 grid mesh.

In Fig. 1, we denote the placement of nine points, and number the mesh points (xi, yj), (xi + h, yj), (xi, yj + h), (xi  h, yj), (xi, yj  h), (xi + h, yj + h), (xi  h, yj + h), (xi  h, yj  h) and (xi + h, yj  h) as 0, 1, 2, 3, 4, 5, 6, 7 and 8, respectively, where h denotes the mesh size of x- and y-directions. In writing the finite difference approximations a single subscript ‘k’ denotes the corresponding function value at the mesh point numbered ‘k’.

Using the Mathematica code, Gupta and Kalita [27] proposed two second-order compact difference approximations for the solution of the streamfunction formulation (1), which are given by28ψ0-8k=14ψk+k=58ψk=3h(v1-v3-u2+u4)+12Reh2v0k=14uk-u0k=14vkand-112ψ0+(32-2Rehu0)ψ1+(32-2Rehv0)ψ2+(32+2Rehu0)ψ3+(32+2Rehv0)ψ4-[4-Reh(u0+v0)]ψ5-[4+Reh(u0-v0)]ψ6-[4+Reh(u0+v0)]ψ7-[4-Reh(u0-v0)]ψ8=12h(u2-u4-v1+v3)+2Reh2[u0(v1+v3)-v0(u2+u4)]respectively.

In [33], another second-order compact difference scheme for the solving the streamfunction formulation (1) was given by-112ψ0+(32+4Rehu0)ψ1+(32+4Rehv0)ψ2+(32-4Rehu0)ψ3+(32-4Rehv0)ψ4-[4-Reh(u0+v0)]ψ5-[4+Reh(u0-v0)]ψ6-[4+Reh(u0+v0)]ψ7-[4-Reh(u0-v0)]ψ8=12h(u2-u4-v1+v3)The above three second-order compact finite difference schemes discretize the 2D streamfunction Eq. (1) at grid point (xi, yj) using the eight neighboring values of ψ, the nearest neighbors values of −ψx (=v) and values of ψy (=u). Corresponding the fourth order compact approximations for −ψx (=v) and ψy (=u) are given, respectively, by16v1+46v0+16v3=ψ3-ψ12h16u2+46u0+16u4=ψ2-ψ42hScheme (3) may be called as the nine point constant coefficient second-order compact (9PCC-SOC) scheme; i.e., the influence coefficients of the FD formula for the streamfunction are constant. Schemes (4), (5) may be classified as the nine point variable coefficient second-order compact (9PVC-SOC) schemes; i.e., the influence coefficients of the FD formula for the streamfunction are connected to Re, u, v and h.

It is easily found that the coefficients of the schemes (4), (5) depend on the first derivatives (velocities) of the unknown variables ψ and Reh. This indicates that the resulting algebra systems of the equations arising from schemes (4), (5) are strongly nonlinear. So, the direct solvers for the solution of the resulting systems of algebraic equations can only be used for small values of Reh and the iterative methods either converge very slowly or diverge. In contrary, the algebraic systems associated with the nine point constant coefficient second-order compact scheme (3) is linear for the streamfunction ψ. However, the coefficient matrix arising from the discretization (3) is not diagonally dominant and conventional iterative methods such as Gauss–Seidel method may not obtain the convergence results. Hence to solve the system of equation associated with scheme (3), Gupta and Kalita [2] used the hybrid biconjugate gradient stabilized method (BiCGStab) [24], [23], [34].

In this paper, we develop a new second-order compact FD formulation for solving the streamfunction–velocity formulation of the incompressible Navier–Stokes equations (1), (2). The formulation also uses the streamfunction and its first derivatives (velocities) as unknown variables. The new scheme for the streamfunction ψ is established on a uniform grid using the four nearest neighbors values of ψ and is the constant coefficient second-order compact scheme, named as the five point constant coefficient second-order compact (5PCC-SOC) scheme. The present scheme gives rise to a diagonally dominant block tri-diagonal system of equations, which results in more sparse matrix than one resulted from Gupta and Kalita’s scheme (3). This will significantly decrease the computational complexity. As mentioned in Ref. [29], the idea of using the streamfunction formulation is not novel, what was missing for many years was an efficient implementation of it. We use a version of multigrid called FAS (full approximation scheme) to obtain the numerical solutions of the fluid flow problems. We employ the newly proposed 5PCC-SOC scheme and the above three second-order compact schemes (3), (4), (5) mentioned with multigrid techniques to simulate the two-dimensional square driven cavity flow for Reynolds numbers up to Re = 7500 with a maximum of 129 × 129 grid mesh. Our computational results are compared with those obtained by using the 9PCC-SOC scheme [27] and the 9PVC-SOC schemes [27], [33], and well established results from various other schemes in the literature. It is discovered that our new formulation successfully provides second-order accuracy solutions and high computational efficiency.

The remainder of this paper is organized as follows. In Section 2, a second-order compact FD scheme for the streamfunction formulation of Navier–Stokes equations is proposed using a new derivation approach. In Section 3, the solution of algebraic systems associated with the proposed FD approximations is described. Numerical experiments for two test problems are performed to validate the accuracy and efficiency of the newly derived compact difference scheme in Section 4. Conclusions are included in Section 5.

Section snippets

Second-order compact (SOC) difference approximation

In this section we formulate a second-order compact FD method that can solve Eq. (1). The compact approach involves discretizing the streamfunction formulation using not just the grid values of unknown solution and but also the values of its first derivatives at select grid points.

For convenience sake, some standard finite difference operators at the grid point (xi, yj) are defined as follows:δx2δyϕ=ϕ5+ϕ6-ϕ7-ϕ8-2(ϕ2-ϕ4)2h3δxδy2ϕ=ϕ5-ϕ6-ϕ7+ϕ8-2(ϕ1-ϕ3)2h3δx2ϕ=ϕ1-2ϕ0+ϕ3h2,δxϕ=ϕ1-ϕ32hδy2ϕ=ϕ2-2ϕ0+ϕ4h2,

Solution of algebraic systems

In this section, we discuss the solution of the algebraic systems arising from the newly proposed FD approximations. Although the algebraic systems associated with the currently proposed FD approximation formulation of the streamfunction can be solved by using the conventional iterative methods, the simple iteration method may result in slow convergence and is hence very time consuming. To improve the convergence, the multigrid method is employed to solve the sparse linear systems. The

Numerical experiments

In this section, we carry out numerical experiments to illustrate the accuracy, validity and effectiveness of the present schemes developed in this article. The numerical results of two problems, the lid driven cavity flow problem and a problem of flow in a rectangular cavity with the hight–width ratio of 2, are given.

For these problems we compare with the numerical results of major methods involving the streamfunction–velocity formulation proposed by Gupta and Kalita [27] and developed by Tian

Conclusions

In this paper, the proposed algorithm is able to solve in a new fashion the two-dimensional Navier–Stokes equation in terms of the streamfunction and its first derivatives (velocities) as variables. The advantages of the new algorithm that it is five point constant coefficient second-order compact (5PCC-SOC) scheme for the streamfunction, which produces a diagonally dominant block tri-diagonal system of equations; the associated matrices are symmetric and positive definite, which allows

Acknowledgment

This work was supported in part by the National Natural Science Foundation of China under Grant Nos. 10972058 and 10662006, Research Fund for the Doctoral Program of Higher Education of China (No. 20100071110017), China Postdoctoral Science Foundation and the Teaching and Research Award Program for Outstanding Young Teachers in Higher Education Institutions of MOE, PR China.

References (50)

  • M. Ben-Artzi et al.

    A pure-compact scheme for the streamfunction formulation of Navier–Stokes equations

    J. Comput. Phys.

    (2005)
  • A. Kolesnikov et al.

    An efficient high-order Taylor weak statement formulation for the Navier–Stokes equations

    J. Comput. Phys.

    (2001)
  • J. Zhang

    Numerical simulation of 2D square driven cavity using fourth-order compact finite difference schemes

    Comput. Math. Appl.

    (2003)
  • S.P. Vanka

    Block-implicit multigrid solution of Navier–Stokes equations in primitive variables

    J. Comput. Phys.

    (1986)
  • E. Barragy et al.

    Streamfunction-vorticity driven cavity solution using p finite elements

    Comput. Fluid

    (1997)
  • O. Botella et al.

    Benchmark spectral results on the lid-driven cavity flow

    Comput. Fluid

    (1998)
  • C.-H. Bruneau et al.

    An efficient scheme for solving steady incompressible Navier–Stokes equations

    J. Comput. Phys.

    (1990)
  • A. Brandt

    Multi-level adaptive solutions to boundary-value problems

    Math. Comput.

    (1977)
  • M.M. Gupta et al.

    A single cell high order scheme for the convection-diffusion equation with variable coefficients

    Int. J. Numer. Methods Fluids

    (1984)
  • M. Li et al.

    A compact fourth-order finite difference scheme for the incompressible Navier–Stokes equations

    Int. J. Numer. Methods Fluids

    (1995)
  • M. Li et al.

    A compact fourth-order finite difference scheme for unsteady viscous incompressible flows

    J. Sci. Comput.

    (2001)
  • R.J. MacKinnon et al.

    Differential equation based representtaion of truncation errors for accurate numerical simulation

    Int. J. Numer. Methods Fluids

    (1991)
  • W. E et al.

    Projection method I: convergence and numerical boundary layers

    SIAM J. Numer. Anal.

    (1996)
  • W. E et al.

    Projection method. II: Godunov–Ryabenki analysis

    SIAM J. Numer. Anal.

    (1996)
  • S. Rogers et al.

    Steady and unsteady solutions of the incompressible Navier–Stokes equations

    AIAA J.

    (1991)
  • Cited by (41)

    • A neutrally buoyant particle motion in a double-lid-driven square cavity

      2024, Computers and Mathematics with Applications
    • A less time-consuming upwind compact difference method with adjusted dissipation property for solving the unsteady incompressible Navier-Stokes equations

      2022, Computers and Mathematics with Applications
      Citation Excerpt :

      Appropriate iterative method need to be adopted to linearize the equations; Secondly, the characteristic of incompressible leads to the coupling of velocities and pressure; Thirdly, non-physical oscillation may occur if convective terms of N-S equation are dicretized by symmetric or central schemes for the problem with high Reynolds numbers or steep gradients; Lastly, we are unable to solve directly some large-scale problems because of the limited computing resources. With the continuous improvement of computer performance, numerical methods [1–11,13,14,16,18–21] for solving the two-dimensional (2D) incompressible N-S equations have become more and more extensive in the past several decades. The mathematical formulations of solving incompressible N-S equations can be roughly divided into three categories.

    • General mesh method: A unified numerical scheme

      2020, Computer Methods in Applied Mechanics and Engineering
    View all citing articles on Scopus
    View full text