You are on page 1of 8

Highly Accurate Discretization of the Navier-Stokes Equations in Streamfunction Formulation

D. Fishelov, M. Ben-Artzi and J.-P. Croisille

Dedicated to the memory of Professor David Gottlieb for his Wisdom and Generosity Abstract A discrete version of the pure streamfunction formulation of the NavierStokes equation is presented. The proposed scheme is fourth order in both two and three spatial dimensions.

1 Fourth order scheme for the Navier-Stokes equations in two dimensions


We consider the Navier-Stokes equations in pure streamfunction form, which in the two-dimensional case leads to the scalar equation

t + 2 = f (x, y,t), (x, y,t) = 0 (x, y).

(1)

Recall that = (y , x ) is the velocity vector. The no-slip boundary condition associated with this formulation is

= 0 , (x, y) , t > 0 n

(2)

D. Fishelov Afeka-Tel-Aviv Academic College for Engineering 218 Bnei-Efraim St. Tel-Aviv 69107, Israel e-mail: daliaf@post.tau.ac.il M. Ben-Artzi Institute of Mathematics, The Hebrew University, Jerusalem 91904, Israel e-mail: mbartzi@math.huji.ac.il J.-P. Croisille Department of Mathematics, University of Metz, France, e-mail: croisil@poncelet.univ-metz.fr

D. Fishelov, M. Ben-Artzi and J.-P. Croisille

and the initial condition is

(x, y, 0) = 0 (x, y), (x, y) .

(3)

The spatial derivatives in Equation (1) are discretized as we describe next. The 2 fourth order discrete Laplacian h and biharmonic h operators introduced in 2 2 2 [3] are perturbations of the second order operators h = (x + y ) and h = 4 + 4 + 2 2 2 ) . They are designed as follows. (x y x y h i, j = 2h i, j (x (x )i, j + y (y )i, j ) = ( )i, j + O(h4 ). (4)

Here, x , y are the fourth-order Hermitian approximations to x , y described as 2 1 = 1 ( ) x x 1 i, j N 1 x i1, j + (x )i, j + (x )i+1, j = x i, j , 6 3 6 1 2 1 = ( ) y y y i, j1 + (y )i, j + (y )i, j+1 = y i, j , 1 i, j N 1. 6 3 6 (5) 2 2 We use the standard central difference operators x , y , x , y . The fourth-order approximation to the biharmonic operator 2 is h 4 4 2 2 4 2 4 2 2 h = x + y + 2x y (x y + y x ) = 2 + O(h4 ), 6
4 4 4 4 where x and y are the compact approximations of x and y , respectively. 4 x i, j = 4 y i, j = 2

(6)

12 2 (x x )i, j x i, j h2

4 4 x = x

1 4 8 h x + O(h6 ), 720

(7)

12 1 4 8 2 4 4 (y y )i, j y i, j h y + O(h6 ). (8) , y = y 2 h 720 The convective term in (1) is C( ) = y (x ) + x (y ). Its fourth-order 2 approximation needs special care. The mixed derivative x y may be approxi mated to fourth-order accuracy by yyx using a suitable combination of lower order approximations.
2 2 2 yyx = y x + x y x y y = x y + O(h4 ). 3 For the pure third order derivative x we note that if is smooth then

(9)

xxx =

3 2 10x h2 x x 10x 2h2

i, j

+ O(h4 ).

(10)

One needs to approximate x to sixth-order accuracy in order to obtain from (10) a 3 fourth-order approximation for x . Denoting this approximation by x , we invoke the Pade formulation [2], having the following form.

Highly accurate discretizations of the Navier-Stokes Equations

1 1 14 i+1, j i1, j 1 i+2, j i2, j (x )i+1, j + (x )i, j + (x )i1, j = + . (11) 3 3 9 2h 9 4h At near-boundary points we apply a special treatment as in [2]. Carrying out the same procedure for y , which yields the approximate value y , and combining with all other mixed derivatives, a fourth order approximation of the convective term is 5 x x 2 2 Ch ( ) = y h x + 6 x x + x y x y y 2 h2 5 y y 2 2 y y + y x y x x + x h y + 6 2 h2 = C( ) + O(h4 ). (12)

Our implicit-explicit time-stepping scheme is of the Crank-Nicholson type as follows. (h i, j )n+1/2 (h i, j )n 2 n+1/2 + 2 n ] (13) = Ch (n) + [h i, j h i, j 2 t/2
(h i, j )n+1 (h i, j )n t

2 n+1 2 n = Ch (n+1/2) + [h i, j + h i, j ]. 2

(14)

Due to stability reasons we have chosen an Explicit-Implicit time stepping scheme. It is possible however to use an explicit time-stepping scheme if one can afford a small time step in order to advance the solution in time. The set of linear equations is solved via a FFT solver using the Sherman-Morrison formula (see [4]). This solver is of O(N 2 logN) operations, where N is the number of grid points in each spatial direction. For the application of the pure streamfunction formulation on an irregular domain see [5].

2 The pure streamfunction formulation in three dimensions


Let be a bounded domain in R3 . The three-dimensional Navier-Stokes equations in vorticity-velocity formulation is

t + ( u) = f, in = u, u = 0, in u = 0 on (x, 0) = 0 (x) := u0 , in .

(15)

where = u and the no-slip boundary condition has been imposed. The pure streamfunction formulation for this system is obtained by introducing a streamfunction (x,t) R3 , such that u = . (16) This is always possible since u = 0. Thus,

D. Fishelov, M. Ben-Artzi and J.-P. Croisille

= u = ( ).
Imposing a gauge condition yields = 0,

(17) (18) (19)

= .

The system (15) can now be rewritten as

( ( )) = 2 + f, t

in

(20)

The boundary conditions u = 0 translates to = 0 on . We require that n = 0, n ( ) = 0, on

(21)

The condition n = 0 means that is parallel to n, hence the normal component of the velocity vector is zero on the boundary. Adding the condition n ( ) = 0 ensures that the full velocity vector vanishes on the boundary. The requirements in (21) are equivalent to four scalar conditions, namely the vanishing of the two tangential components of and . Turning now to the gauge condition = 0, we add the condition

( n) = 0, n

on

(22)

Together with the vanishing of the tangential components of , it implies that = 0 on . Equations (21)-(22) consist of ve scalar conditions for on the boundary. We can still add one more scalar boundary condition, as the equations for the 3- component streamfunction contain the fourth order biharmonic operator. The sixth scalar boundary condition that we choose to add is

( ) = 0,
We thus obtain = 0,

on

.
on

(23)

( ) = 0,

(24)

We assume that the initial value (x, 0) satises ( )(x, 0) = 0. Taking the divergence of (20) we obtain an evolution equation for .

( ) = 2 ( ), t

in

(25)

Equations (24)-(25) together with the assumption that = 0 initially ensure that = 0 for all t > 0. See also [1], [6] and [7]. Finally, we have the following three-dimensional pure streamfunction formulation

Highly accurate discretizations of the Navier-Stokes Equations

( ( )) = 2 + f, in t ( n) n = 0, n = 0, on n ( ) = 0, ( ) = 0, on .

(26)

3 The Numerical Scheme


Our numerical scheme is based on the approximation of the following equation

(( ) ) + ( )( ) 2 = f, t

in ,

(27)

2 assuming that H0 ( ). For the vector function we construct a fourth-order approximation to the the biharmonic operator as follows. The pure fourth-order deriva4 4 tives are approximated by x , y , z4 as in (7)-(8). The mixed terms xxyy , yyzz and zzxx are approximated by

A fourth order approximation of the biharmonic operator is then obtained as


4 4 2 2 2 2 h = x + y + z4 + 2xy + 2yz + 2zx .

2 2 2 2 2 2 2 4 xy i, j,k = 3x y i, j,k x y y,i, j,k y x x,i, j,k = x y i, j,k + O(h ) 2 i, j,k = 3 2 2 i, j,k 2 z z,i, j,k 2 y y,i, j,k = 2 2 i, j,k + O(h4 ) (28) y z y z y z yz 2 2 2 2 zx i, j,k = 3z2 x i, j,k z2 x z,i, j,k x z x,i, j,k = z2 x i, j,k + O(h4 ). (29)

The approximate derivatives x , y and z are related to via the Hermitian derivatives as in (5). Equation (29) provides a fourth order compact operator for 2 , which involves values of , x , y and z at (i, j, k) and at its twenty six nearest neighbors. The Laplacian operator is approximated by a fourth order operator via h = 2h (x x + y y + z z ). (30)

The nonlinear part in (27) consists of two terms, the convective term and the stretching term. We design a fourth-order scheme which approximates the convective term. The convective term in the three-dimensional case is C( ) = (( ) ) = u x + v z + w z . (31)

Here (u, v, w) = u = is the velocity vector, whose components contain rst order derivatives of the streamfunction, and thus may be approximated to fourthorder accuracy. The terms x , z , z may be approximated as in the twodimensional case. The term x , for example, may be written as
3 2 x = x + x y + x z2 .

(32)

D. Fishelov, M. Ben-Artzi and J.-P. Croisille

Here, the pure and mixed type derivatives may be approximated as in the twodimensional Navier-Stokes equations (see (10), (9)). We denote the approximation to the convective term by Ch ( ). Now, we construct a fourth-order approximation to the stretching term S = ( )u = ( )( ). Note that the stretching term contains and mixed second order derivatives of the streamfunction. The Laplacian of may be approximated to fourth-order accuracy, as in (30). The second order mixed terms, such as x y , may be approximated using a Hermitian approximation of the type (x y )(xy )i, j,k = x y i, j,k . Hence, (I + h2 2 h2 2 x )(I + y )(xy )i, j,k = x y i, j,k 6 6 , 1 i, j, k N 1 (34) (33)

is an implicit equation for xy . We denote the approximation of the stretching term by Sh ( ). For the approximation in time, we apply a Crank-Nicholson scheme (see the comment after (13)-(14)). We obtain the following scheme
(h i, j,k )n+1/2 (h i, j,k )n t/2 (h i, j,k )n+1 (h i, j,k )n t

2 = Ch i, j,k + Sh i, j,k + [h i, j,k 2


(n) (n)

n+1/2

2 n + h i, j,k ]

(35)

(n+1/2) + Sh (n+1/2) + [ 2 n+1 + 2 n ]. (36) = Ch i, j,k h i, j,k i, j,k 2 h i, j

At present, a direct solver is invoked to solve the linear set of equations (35)-(36). Some preliminary MATLAB computations with coarse grids conrm the fourth order accuracy of the scheme. We rst show numerical results for the time-dependent Stokes equations = 2 + f, in . (37) t We have picked the exact solution 1 T (x,t) = et z4 , x4 , y4 4 (38)

in the cube = (0, 1)3 . Here, f is chosen such that in (38) satised (37) exactly. In the numerical results shown here we have chosen the time step t of order h2 in order to retain the overall fourth-order accuracy of the scheme. In practice, if we are interested mainly in the steady state solution, a larger time step, which is independent of h, may be used. In Table 1 we show results for the Stokes problem 2 with t = 0.1h2 and t = 0.00625. Here e is the error in the lh norm, i.e. e2 = (3 (xi , y j , zk ) 3 (xi , y j , zk ))2 h3 ,
i j k

Highly accurate discretizations of the Navier-Stokes Equations grid 555 e ey div ( ) 2.5460(-9) 7.7417(-9) 1.3409(-8) rate 3.82 3.73 3.74 grid 999 1.8017(-10) 5.8037(-10) 1.0052(-9) rate 3.98 3.96 3.96

7 grid 17 17 17 1.1443(-11) 3.7391(-11) 6.4621(-11)

Table 1 Stokes equations for t = 0.00625 using t = 0.1h2 .

where 3 is the z component of the exact solution and 3 is the z component of the 2 in the y derivative of . In Table 2 we display the approximate solution. ey is the lh 3 results for t = 0.0625 using t = h2 .
grid 555 e ey div ( ) 9.6461(-7) 3.0293(-6) 5.2470(-6) rate 4.41 4.33 4.33 grid 999 4.5309(-8) 1.5049(-7) 2.6066(-7) rate 4.00 3.99 4.00 grid 17 17 17 2.8291(-9) 9.4269(-9) 1.6328(-8)

Table 2 Stokes equations with t = h2 for t = 0.0625.

Next we show results for the Navier-Stokes Equations

(( ) ) + ( )( ) 2 = f, t

in

(39)

in the cube = (0, 1)3 . Here, the source term g = f is chosen such that T (x,t) = 1 et z4 , x4 , y4 is an exact solution of (39). In Table 3 we present 4 results for t = 0.00625 using t = 0.1h2 .
grid 555 e ey div ( ) 2.4497(-9) 7.6486(-9) 1.2294(-8) rate 3.86 3.75 3.71 grid 999 1.6924(-10) 5.6845(-10) 9.3619(-10) rate 4.01 3.98 3.92 grid 17 17 17 1.0473(-11) 3.5917(-11) 6.1700(-11)

Table 3 Navier-Stokes equations for t = 0.00625 using t = 0.1h2 .

In Table 4 we show results for the Navier-Stokes Equations with t = h2 for t = 0.0625. In Figures 1(a) and 1(b) we display the errors for Navier-Stokes equations in 3 and (3 )y at t = 0.0625 with dt = h2 and a 173 grid.

8 grid 555 e ey div ( ) 9.4418(-7) 2.9836(-6) 5.0471(-6) rate 4.46 4.38 4.40

D. Fishelov, M. Ben-Artzi and J.-P. Croisille grid 999 4.2709(-8) 1.4334(-7) 2.3944(-7) rate 4.04 4.03 4.02 grid 17 17 17 2.5934(-9) 8.7800(-9) 1.4778(-8)

Table 4 Navier-Stokes equations for t = 0.0625 using t = h2 .


error in psi3 with 17 points, t=0.0625, dt=h
3 2

error in (psi ) with 173 points, t=0.0625, dt=h2


3y

x 10 10 8 6 4 2 0 2 20

x 10 3 2 1 0 1 2 3 4 20

15 10 5 0 0 10 5 15

20

15 10 10 5 0 0 5 15

20

Fig. 1 Navier-Stokes : Errors in (a) 3 and (b) (3 )y for N = 17, t = 0.0625, dt = h2 .

References
1. M. Ben-Artzi, Planar Navier-Stokes equations, vorticity approach, Handbook of Mathematical Fluid Dynamics, Chapter 5, Vol. II, (2003). 2. M. H. Carpenter and D. Gottlieb and S. Abarbanel The stability of numerical boundary treatments for compact high-order schemes nite difference schemes, J. Comput. Phys., Vol. 108, pp. 272295, (1993). 3. M. Ben-Artzi, J.-P. Croisille and D. Fishelov, A High Order Compact Scheme for the PureStreamfunction Formulation of the Navier-Stokes Equations, J. Sci. Computing, Vol. 42 (2), pp. 216250 (2010). 4. M. Ben-Artzi, J.-P. Croisille and D. Fishelov, A fast direct solver for the biharmonic problem in a rectangular grid, SIAM J. Sci. Computing, Vol. 31 (1), pp. 303333 (2008). 5. M. Ben-Artzi, I. Chorev, J-P. Croisille and D. Fishelov, A compact difference scheme for the biharmonic equation in planar irregular domains, SIAM J. Numer. Anal., Vol. 47 (4), pp. 30873108 (2009). 6. V. Ruas and L. Quartapelle, Uncouples nite element solutions of biharmonic problems for vector potentials, Inter. J. Numer. Methods in Fluids, Vol. 11, pp. 811-822, (1990). 7. A. Rubel and G. Volpe, Biharmonic vector stream function formulation and multigrid solutions for a three-dimensional driven-cavity Stokes ow, AIAA Computational Fluid Dynamics Conference, 9th, Buffalo, NY, June 13-15, 1989, AIAA, pp. 380388 (1989). Inter. J. Numer. Methods in Fluids, Vol. 11, pp. 811-822, (1990)

You might also like