INTERNATIONAL JOURNAL OF NUMERICAL ANALYSIS AND MODELING Volume 7 Number Pages 3 39 c Institute for Scientific Computing and Information NOVEL FINITE DIFFERENCE SCHEME FOR THE NUMERICAL SOLUTION OF TWO-DIMENSIONAL INCOMPRESSIBLE NAVIER-STOKES EQUATIONS N.P. MOSHKIN AND K. POOCHINAPAN (Communicated by Jean-Luc Guermond) Abstract. In the present article a new methodology has been developed to solve two-dimensional (D) Navier-Stoes equations (NSEs) in new form proposed by Puhnachev (J. Appl. Mech. Tech. Phys. 45: (4) 67 7) who introduces a new unnown function that is related to the pressure and the stream function. The important distinguish of this formulation from vorticitystream function form of NSEs is that stream function satisfies to the transport equation and the new unnown function satisfies to the elliptic equation. The scheme and algorithm treat the equations as a coupled system which allows one to satisfy two conditions for stream function with no condition on the new function. The numerical algorithm is applied to the lid-driven cavity flow as the benchmar problem. The characteristics of this flow are adequately represented by the new numerical model. Key Words. Navier-Stoes equations incompressible viscous flow finitedifference scheme.. Introduction There are many numerical schemes for the solution of the Navier-Stoes Equations (NSEs) representing incompressible viscous flows. Some of these are schemes utilize primitive variables(velocity-pressure) vorticity-stream function stream function (biharmonic equation) and vorticity-velocity formulation. The primary difficulty in obtaining numerical solutions with primitive variable formulation is that there is no evolution equation for the pressure variable. To avoid the troubles associated with primitive variable approach stream function vorticity and vorticityvelocity formulations of the NSEs are widely used. Unfortunately the correct boundary values of vorticity are not always easy to get. In the present study we use a new form of the NSEs. Aristov and Puhnachev [] and Puhnachev [7] proposed new form of the NSEs for the case of axisymmetric and D flows respectively. The D NSEs in the terms of new unnown functions contain one transport equation for the stream function and one elliptic equation for the new unnown function. This system only resembles the vorticity and stream function s form but the physical meaning of the coupling function is different from the vorticity. We have constructed finite-difference scheme for the NSEs in the new form. Our algorithm treats the equations as a coupled system which allows us to satisfy two conditions for stream function with no condition on the new unnown function. The proposed Received by the editors October 3 8 and in revised form February 6 9. Mathematics Subject Classification. 76M76D5 65M6. 3
3 N.P. MOSHKIN AND K. POOCHINAPAN scheme can easily be extended to solving axisymmetric NSEs. The performance of the proposed method is investigated by considering well-nown benchmar problem. A test case involves simulating a D lid-driven cavity flow at Reynolds number Re when the motion is strictly laminar and steady. Several numerical investigations have been reported the characteristics of this cavity flow. Moreover viscous fluid flow inside a driven cavity has been a common experiment approach used to chec or improve numerical techniques (see for example [ 3 4 5 6 8]). The content of this paper is organized as follows. In the next section we derive new formulation of the NSEs with no-slip boundary conditions. Section 3 briefly describes the problem used for the test case and detailed description of numerical algorithm. The results of validation of the finite-difference scheme are presented in Section 4 where we mae a detailed comparison with available numerical and experimental data.. The New Formulation of Navier-Stoes equations To mae paper self completed we first represent the transformation of viscous incompressible NSEs in D to a new form. The viscous incompressible flow is governed by the NSEs in a Cartesian coordinate system (x y) () () u t +uu x +vu y = ρ p x +ν ( u xx +u yy ) v t +uv x +vv y = ρ p y +ν ( v xx +v yy ) (3) u x +v y where u and v are the velocity components in x and y directions respectively; p is the pressure ρ is the fluid density and ν is the inematic viscosity. The fluid is subjected to potential external forces. In D the constrain of incompressibility v = can be satisfied exactly by expressing velocity vector in terms of stream function ψ according to (4) u = ψ y v = ψ x. NewformofNSEsisbasedonthe followingobservation. Thesubstitution ofeq.(4) into Eq. () yields (5) y (ψ t ψ x ψ y ν ψ)+ ( ) x ρ p+ψ y where def = x + y. Therefore there is a function Φ satisfies the relations (6) and ρ p = ψ y +Φ y (7) ψ t ψ x ψ y +Φ x = ν ψ. Differentiating Eq. (6) and Eq. (7) with respect to y and x respectively and substituting the resulting expressions into Eq. () where u and v are expressed in terms of ψ we obtain (8) Φ = ψ y ψ.
NUMERICAL SOLUTION OF D INCOMPRESSIBLE NAVIER-STOKES EQUATIONS 33 We will consider only the case where the no-slip conditions are satisfied at the boundary of the flow domain. In term of the stream function ψ only boundary conditions are ψ (9) ψ n = b(xy) where ψ means derivative in the direction of normal vector to the boundary. n To complete the formulation of the problem it is necessary to specify the initial conditions () ψ = ψ (xy) t =. The main goal of this wor is to develop and validate a finite-difference scheme for solving the system (7) (). 3. Numerical Technique The standard benchmar problem for testing D NSEs is the lid driven cavity flow as shown in Fig.. The fluid contained inside a squared cavity is set into motion by the top wall which is sliding at constant velocity from left to right. Let L be the characteristic length scale associated with the cavity geometry and U be the characteristic velocity scale associated with the moving boundary. The U Primary eddy Bottom left secondary eddy Bottom right secondary eddy Figure. Lid driven square cavity flow configuration. non-dimensional parameter of the problem is () Re = LU ν. The system of equations () (3) is rendered dimensionless as follows () x = x L y = y L t = t ν L u = u U v = v U. We cover the domain Q = { x y } with a uniform grid Q h = {(x i y j ) x i = (i.5)h x y j = (j.5)h y i =...N x j =...N y } with spacings h x = N x h y = N y
34 N.P. MOSHKIN AND K. POOCHINAPAN in the x and y directions respectively. Such grid allows one to use central differences to approximate boundary conditions with second-order on two point stencils. The essential element of the proposed here algorithm is that Eqs. (7) and (8) for ψ and Φ are considered as a coupled system. This formulation is based on the idea of regarding the two boundary conditions for ψ as actual conditions for the ψ Φ system. Note that ψ and Φ are evaluated on the full-time steps. We employ second-order central-difference approximations for the operators in Eqs. (7) and (8). The system of difference equations is (3) ψ n+ ij ψ n ij τ Re (ψn i+j ψn i j )(ψn+ ij+ ψn+ ij )+(ψn+ i+j ψn+ i j )(ψn ij+ ψn ij ) + 8h x h y Re ( Φ n+ i+ Φn+ i j ) h x = ( ψ n+ ij + ψ n ij) (4) Φ n+ ij = h y [ (ψ n ij+ ψ n ij ) ψ n+ ij +(ψ n+ i+j ψn+ i j ) ψn ij] The boundary conditions are written in the following form (5) ψj n+ +ψj n+ ψ n+ N xj +ψn+ N x j ψ n+ i +ψ n+ i ψ n+ in y +ψ n+ in y i =...N x j =...N y. ψj n+ ψj n+ h x ψ n+ N xj ψn+ N x j h x ψ n+ i ψ n+ i h y ψ n+ in y ψ n+ in y h y = j =...N y i =...N x. To combine Eqs. (3) (5) as a single linear system with banded matrix we introduce new system of indices as follows (ij) = (j )N x +i i =...N x m (ij) = (j )N x +i = (ij) + j =...N y. Each node (ij) of grid Q h associates with two indices (ij) and m (ij). Index (ij) is an odd number and index m (ij) is an even number. It is easy to see that (6a) (6b) (i+j) = (ij) + (ij+) = (ij) +N x (i j) = (ij) (ij ) = (ij) N x m (i+j) = m (ij) + m (ij+) = m (ij) +N x m (i j) = m (ij) m (ij ) = m (ij) N x. Now we introduce a new grid function σ = {σ =...N x N y } which is defined on the composite grid. Let components of the grid function σ with even indices represent ψ ij and components with odd indices σ m (= σ + ) represent Φ ij. Substituting σ instead ψ ij and substituting σ m instead Φ ij into Eqs. (3) (4) we
NUMERICAL SOLUTION OF D INCOMPRESSIBLE NAVIER-STOKES EQUATIONS 35 recast algebraic system as follows (7a) σ n+ (7b) τ σ n + Re [ (σ n 8h x h + σ n )( σ n+ +N x σ n+ ) ( ) N x + σ n+ + σn+ y ( σ n +Nx σ N n ) ] x Re ( ) σ n+ ( + h σn+ 3 = σ n+ + σ n x ) σ n+ m = (σn m+n x σn m N x ) where h y σ n+ σ = (σ + σ +σ ) h x m + (σn+ m+n x σn+ m N ) x h y σ n m + (σ +N x σ +σ Nx ) h. y The straightforward implementation of the algorithm leads to a problem with a numerically singular matrix. There are different ways to regularize the problem. We found that adding a small term at the boundary gives the best results. According to this idea Eq. (5) can be rewritten for function σ as follows (8a) (8b) (8c) (8d) σ n+ +σ n+ + σ n+ +σ n+ σ n+ +σ n+ +N x σ n+ +σ n+ N x σ n+ m+ σn+ m h x = εσ n+ m i = j =...N y σm n+ σn+ m 3 = εσm n+ i = N x j =...N y h x σ n+ m+n x+ σn+ m j = i =...N x h y σ n+ m σn+ m N x h y = j = N y i =...N x where ε is a small number. If the steady flow is needed then the algorithm can be considered as an iterative procedure and iterations are terminated at certain time n = N when the following criterion is satisfied max ij σ N+ ij max ij σ N+ ij σ N ij 8 Note that the linear system for the coupled formulation of the ψ Φ problem can be written as the following multi-diagonal system for the composite grid function σ (9) B l Nx σ n+ l N +B x l N x σ n+ l N x +B l 3 σ n+ l 3 +B l σ n+ l +B l σ n+ l +B lσ n+ l +B l+ σ n+ l+ +B l+σ n+ l+ +B l+nx σ n+ l+n +B x l+n x σ n+ l+n x +B l+nx+σ n+ l+n = F x+ l where l =...N x N y. The matrix of the linear system (9) is banded with N x + lower and upper bandwidths. We used standard routings DGBSV and DGBSVX of the LAPACK to compute the solution of Eq. (9). 4. Results and Discussions A validation test involves a D cavity flow at Reynolds number up to wherein the flow is laminar and steady. Computations were performed for the liddriven cavity problem on grids from 3 3 up to. The impact of ε on
36 N.P. MOSHKIN AND K. POOCHINAPAN the results is judiciously evaluated by numerical experiments and shown that for ε [ 4 ] the approximate solution agreed with now test case. In order to validate the scheme we compare the extremal values and space location of stream function with [ 3 4 5 6]. Table reports the characteristics of the primary and right bottom secondary eddies at Re = and Re = respectively. This table shows the extreme values of ψ and the space location of the extremal values of ψ. Top rows present our quantities obtained from simulation. Then bottom rows display the quantities obtained by the other authors. For the primary vortex in cases Re = and our results agree within 5% with those obtained by the other authors. For the secondary vortex in the case Re = with the grids 5 5 our results agree within 5% with Christov et al. [5] but differ significantly up to % with those obtained by Botella et al. []. Our data obtained using grid exhibit perfect match with other results from [ 3 4 6]. The geometrical structures of the flow are displayed in Figs. and 3. The grid is used. Note that the values of u (velocity along x direction) v (velocity along y direction) and vorticity ω were computed from ψ after the iteration converge. The values of u v and ω inside the domain were approximated using centraldifference while the values of u v and ω on the boundary were approximated using one side first-order difference. In Fig. 4 we compare the centerline u and v velocity profiles with data of Ghia et al. [6]. The computational has been done for Reynolds number Re = with the grid. The velocity profiles are similar to the data of Ghia et al. [6]. Table. Strength and location of the primary and bottom right secondary vortices at Re = and Re =. Ref. Grid Primary eddy Bottom right second. eddy ψ min (x miny min) ψ max (x maxy max) Re = Present 3 3.365 (.6.733) 3.3439 6 (.967.67) 5 5.3569 (.6.74) 9.49 6 (.94.6).35 (.6.74).89 5 (.94.6) [] 48.8 [4] 6 6.397 (.698.7369) [6] 9 9.3 (.5844.74).5 5 (.94.599) Re = Present 5 5.985 (.54.56).569 3 (.86.).98 (.53.56).6887 3 (.87.) [] 6.8937 (.538.565).797 3 (.864.8) [3] 4 4.89 (.53.5654).79 3 (.8643.3) [4] 8 8.87 (.5346.5645) [5] 5 5.669 (.536.566).64 3 (.865.8) [6] 8.799 (.533.565).75 3 (.8594.94) We find it important to understand the behavior of function Φ for different Reynolds number. Fig. 5 shows the contour of Φ. Pattern of contour lines of Φ are drawn for several Reynolds numbers Re = 5 3 5 and. The set of figures is generated on the grid 5 5 with the parameter ε = 6.
NUMERICAL SOLUTION OF D INCOMPRESSIBLE NAVIER-STOKES EQUATIONS 37 Stream function Vorticity.8.8.6.6.4.4....4.6.8..4.6.8 Velocity in x direction Velocity in y direction.8.8.6.6.4.4....4.6.8..4.6.8 Figure. Stream function ψ vorticity ω and velocity components u and v contours for the lid-driven cavity flow at Re =. 5. Conclusion A finite-difference scheme is developed and validated for the new formulation of the D Navier-Stoes equations proposed in [7]. The feature that qualitatively distinguishes this formulation from the vorticity-stream function formulation of NSEs is that the stream function satisfies the evolution equation (the elliptic equation in case of vorticity-stream function formulation) and the new unnown function satisfies an elliptic equation (vorticity satisfies the evolution equation in case of vorticity-stream function formulation). The scheme and algorithm treat the equations as a coupled system which allows one to satisfy two conditions for stream function with no condition on the new function. The new numerical algorithm demonstrated good accuracy and reasonable efficiency for the lid-driven cavity flow benchmar problem. The results obtained in all test cases are in excellent agreement with other established numerical results underlining that the new formulation isaviable approachto the DNavier-Stoesandcan serveasabasisforthe efficient numerical models.
38 N.P. MOSHKIN AND K. POOCHINAPAN Stream function Vorticity.8.8.6.6.4.4....4.6.8..4.6.8 Velocity in x direction Velocity in y direction.8.8.6.6.4.4....4.6.8..4.6.8 Figure 3. Stream function ψ vorticity ω and velocity components u and v contours for the lid-driven cavity flow at Re =..8.6 Ghia et al. [] Grid.4. Ghia et al. [] Grid u(x=.5y).4.. v(xy=.5)..4.4..4.6.8 y.6..4.6.8 x Figure 4. The vertical centerline u profile and horizontal centerline v profile for the lid-driven cavity flow at Re =.
NUMERICAL SOLUTION OF D INCOMPRESSIBLE NAVIER-STOKES EQUATIONS 39 Re = 5 Re= Re= Re=3 Re=5 Re= References Figure 5. Contours of Φ for the lid-driven cavity flow. [] S. N. Aristov and V. V. Puhnachev On the Equations of Axisymmetric Motion of a Viscous Incompressible Dol. Phys. 49: (4) 5. [] O. Botella and R. Peyret Benchmar spectral results on the lid-driven cavity flow Comput. & Fluids 7:4 (998) 4 433. [3] C. H. Bruneau and M. Saad The D lid-driven cavity problem revisited Comput. & Fluids 35 (6) 36 348. [4] C. I. Christov and R. I. Ridha Splitting scheme for iterative solution of biharmonic equation application to D Navier-Stoes problems Advances in Numerical Methods and Applications Singapure: World Sciences (994) 34 35. [5] C. I. Christov and R. I. Marinova Implicit vectorial operator splitting for incompressible Navier-Stoes equations in primitive variables Journal Computational Technologies 6:4 () 9 9. [6] U. Ghia K. N. Ghia and C. T. Shin High-resolutions for incompressible flow using the Navier-Stoes equations and multigrid method J. Comput. Phys. 48 (98) 387 4. [7] V. V. Puhnachev Integrals of motion of an incompressible fluid occupying the entire space J. Appl. Mech. Tech. Phys. 45: (4) 67 7. [8] W. F. Spotz Accuracy and performance of numerical wall boundary conditions for steady D incompressible streamfunction vorticity Internat. J. Numer. Methods Fluids 8 (998) 737 757. Department of Mathematics Suranaree University of Technology Nahon Ratchasima 3 Thailand E-mail: moshin@math.sut.ac.th and anyuta@math.sut.ac.th