Sei sulla pagina 1di 15

Lars Davidson: Numerical Methods for Turbulent Flow http://www.tfd.chalmers.

se/gr-kurs/MTF071 39

6.1 Introduction

(January 7, 2005)

So far weve studied the diffusion (heat conduction) equation   and the convectiondiffusion equation )(  "!#%$'& 10 Now we will look at the Navier-Stokes (momentum) equations and the continuity equation. In 1D, and in unsteady form we have 2 2 24! 3 2 !5&  6 2A@ 2 2 2 2 CB (33) 24 2 2 2 2 & ( !53 &  7!5&8&  9  0 We see that we have three unknowns and two equations; the third equation is the equation of state. Thus, from the continuity equation we get the density, from the momen@ tum equation we get & , and the equation of state gives the pressure . The above equation system is used for compressible ow, i.e. high-speed ow when the Mach number D6E6F G0IH . Methods to solve this equation system will be treated in a later lecture. If the uid is (nearly) incompressible, the equation system above reads 2 2 !5& 6 2A@ 2 2 2 2 CB 24 2 2 2 2 & ( !53 &  7!5&8&  9  
Chapter 6: Pressure Velocity Coupling

Lars Davidson: Numerical Methods for Turbulent Flow http://www.tfd.chalmers.se/gr-kurs/MTF071 40

where we allow changes in ! due to variation in tempera2 2 of species, but not due to pressure ture and concentration   ). Now we have two equations variations (i.e. ! and two unknowns. The problem is that we dont have any equation for pressure. Instead we have to use the continuity equation as an indirect equation for pressure. Note that in the convective term above we have &8& (a non-linear term); well treat one explicitly (i.e taking it from the old iteration level) and one implicitly (the one we solve for). This is quite similar to the convection-diffusion equa tion for temperature where we had & in the convection term: & was supposed to be known, and we solved for . 6.2 The staggered grid Lets discretize the pressure gradient for the control volume    below, assuming equidistant mesh ( )

  

   

  

e
located in the middle of

Figure. 1D control volume. Node the control volume.

2A@ 2 9 

@ 9

@ 

(34)

Chapter 6: Pressure Velocity Coupling

@ gradient at@ control volume does We nd that the pressure i.e. the discretized not feel the pressure at node @, pressure gradient is independent of . This means that a Sfrag replacements @ highly oscillating pressure eld as that below can occur.

Lars Davidson: Numerical Methods for Turbulent Flow http://www.tfd.chalmers.se/gr-kurs/MTF071 41 @

 
H 9  
We see 2@ that 2  9

 9
!
9




9 

0 0 0 

2A@ 2

2A@ 2 @



 9
!

 @




6

although is highly oscillating. A pressure eld like that in the gure above is called checker-board pressure eld. A remedy is to stagger the grid for the velocities. 2A@ 2  The & momentum equation includes and is thus staggered in the direction; 2A@ 2

 The  momentum equation includes staggered in the  direction;  The

 and is thus
2

2A@

momentum equation includes staggered in the ! direction,

! and is thus

see gure below.


Chapter 6: Pressure Velocity Coupling

Sfrag replacements
Lars Davidson: Numerical Methods for Turbulent Flow @ http://www.tfd.chalmers.se/gr-kurs/MTF071 42

control volume

&



& control volume

 9

 control volume

Note that the pressure (main) control volume is denoted by upper-case indices (  ), whereas a lower-case -index means that the control volume has been staggered in the  ), i.e. it is a & control volume. A lower-case direction (  -index means that the control volume has been staggered  in the  direction (2A@ ), 2 i.e. it is 2A@ a  2 control volume.  over the & and  conLets discretize and trol volume, respectively; we obtain 2A@ @ @ 2 )  #$ 9    ! 9 2A@ " @ @ (35) 2    #$ 9    %'&( ) 9
 

see the gure above. As is seen, all pressure nodes are used, which prevents oscillating pressure.

Chapter 6: Pressure Velocity Coupling

Sfrag replacements

Lars Davidson: Numerical Methods for Turbulent Flow http://www.tfd.chalmers.se/gr-kurs/MTF071 43

6.3 The Momentum Equations Discretize the 2D & the gure below. equation over its control volume, see

& $

control volume control volume control volume

& #$

&

& $

& #$
As mentioned at p. 40, the convective, non-linear term must be linearized so that one & is treated as known, and one is solved for; to differ between these two we denote the & which we solve for by , so that the & momentum equation reads (see Eq. 33 and Eq. 2 2 2A@ 6.1 in 2 M& 2 V) 2 2 B B 2 2 2 2 2 2 2 ( ( "!5&  9      7!   0
  

 & . The diffusion and convection terms are diswith cretized as in Chapter 4 and 5, except that now the control volume is staggered in the negative direction. Term I is

Chapter 6: Pressure Velocity Coupling

Lars Davidson: Numerical Methods for Turbulent Flow http://www.tfd.chalmers.se/gr-kurs/MTF071 44

discretized as 2 2 ( 4 7  5 ! & %'  !


 $

 
7!5&

 #$ (

 $ 2  #$

2 7!5&

(G 4

 
7!5&
( #$

  # $

7!5&

 9

'#$

 

7!5&

 9

A suitable discretization scheme has to be chosen for at ( (  ] as in Chapter 5. the faces [   and  9 The diffusion term in the direction (Term II) is discretized as 2 2 2 2 B B   $ 2 2 2 2 C  C    %  !    # $   # $ 2 2  B  $ B 2 2  9 


 #$  #$  B $ 9 9 #$ 9   #$ '    #$

The pressure in 2A@ term is discretized as 2A @ Eq. 35, i.e.

2
   !

4 @

 

 $ 2

 $

#$

 #$

C @

 


 #$

 '#$ 9

  

@
#$ 9

The discretized & momentum equation can now be written as (now we replace by & ) @ @ ( E E       '#$ 9   &  &      E E E E E ! "    & & #$  & $   & #$  & $   @ @ (  E E E E  E !      $  #   '#$ )9 
Chapter 6: Pressure Velocity Coupling

Lars Davidson: Numerical Methods for Turbulent Flow http://www.tfd.chalmers.se/gr-kurs/MTF071 45

6.4 The SIMPLE Algorithm Sfrag replacements As mentioned in the beginning of this chapter, the continuity equation will be used as an indirect equation for pressure. First the momentum equations are solved, using an old pressure (old values denoted by an asterix as super& and  (see Eqs. 6.12-13 in M & V) script), to give @ @ E E   #$ 9   &    &   @ (36) @ E E    #$ 9  0           Note that & and  are not solved for the same control volumes, see gure on p. 42. Now we discretize the continuity equation over the main control volume (see gure below and compare with gure on p. 42) control volume    $ control volume control volume

&"

& $

 

 

Chapter 6: Pressure Velocity Coupling

Lars Davidson: Numerical Methods for Turbulent Flow http://www.tfd.chalmers.se/gr-kurs/MTF071 46




2 2  !5& ( 


2 2 2

&( !  $

 $  #$

2 "! 
7!5&

(


4 2 

  
7! (

2 !

'#$

(


C "!

  
(
 

7!5&

$ 9

"!5&

 

  $ 9

0

( ! ( Note that index  9  is equal to   , and index   ( ( !  is equal to    , and so on. Introduce @ @ @   &  &  &        (37)
where & and  @ have been obtained from the momentum equations, and was obtained at the previous iteration. Replace & and  in the continuity equation using Eq. 37 so that ( ( !) &  & $ 9 !) &  &    ( ( 60 !)      $ 9 !)      Rewriting this as an equation for &

and

 gives

7!5& 7!

( $ (    $
 9

9 9

"!5& 7!

 
 "!

(  !5& 
  $ 9

( (   
$

   
(

( 9  !5& 
 

(38)

!

where  is the continuity error, and should, when convergence has been reached, be zero.@ We want to turn the equation above into an equation for . We use the momentum
Chapter 6: Pressure Velocity Coupling

equations to obtain a relation between & ,  and . The & momentum equation (Eq. 36) is also valid for & so that @ @ E E   & "    &  #$ 9   0 (39)  @ Were interested in a direct relation between & thus we rewrite @ the above @ equation as E &  #$ @ 9  @  ' &   #$ 9   "  E  0

Lars Davidson: Numerical Methods for Turbulent Flow http://www.tfd.chalmers.se/gr-kurs/MTF071@ 47

and

, and
(40)

In the same way we obtain an relation between @ @        #$ 9      E 0


 

 and
(41)

Insert Eqs. 40,41 into Eq. 38 @ @ E E              ( E E  "!   ( E  E !  "!       E E E E        9 "!5&  ( $ (  7!    $ 9

(  $ ( ! 7   $ E ! " E   ( 9 "!5&  ( !    7!

(42)

It should be stressed that the pressure-correction equation is a correction equation; the object is only to satisfy the continuity equation, i.e. to make the source term  in Eq. 42 vanish. Thus, the fact that the pressure-correction equation was rewritten (from Eq. 39 to Eq. 40) does not inuence the results at all.
Chapter 6: Pressure Velocity Coupling

Lars Davidson: Numerical Methods for Turbulent Flow http://www.tfd.chalmers.se/gr-kurs/MTF071 48

The solution procedure for the equation system consisting of the continuity and the Navier-Stokes equation can be summarized as: @

sure as

 0 Guess the pressure  ! 0 Solve the Navier-Stokes equations (Eq. 36) & ,  @  H0 Solve the pressure-correction equation (Eq. 42)  0 Correct the velocities (see Eqs. 40, 41) and the pres

&  @      8

& " " @   #$ 9 @  @    @    #$ 9    

(43)

 0 Repeat Step 24 till convergence.


Boundary Conditions

What are the boundary conditions for the equation? Usually the normal velocity component at a boundary is given (the exception is when a pressure boundary condition is used, see Section 9.5 in M & V). On a west (low ) boundary, for example,

Chapter 6: Pressure Velocity Coupling

control volume control volume

Lars Davidson: Numerical Methods for Turbulent Flow http://www.tfd.chalmers.se/gr-kurs/MTF071 49

& $

!
&

boundary

& $ , i.e. & $ should not be corrected. Since & $ is given, & $  From Eq. 43 we see that this is satised if the coefcient be tween the near-boundary node and the boundary is set to E   . Thus the boundary conditions zero; in this case where the normal velocity is given is homogeneous Neu  which we implement by setting mann boundary conditions, E E 6 (west boundary), 6 (east boundary), and so on.
Near a west boundary, for example, the & momentum equations are solved for & , see the gure above. The pressure gradient in the & momentum equation is conveniently ! @ H . We nd that computed using the pressure at nodes and we dont need any boundary condition for . This is actually a result of that the velocity grid does not fully cover the computational domain, but stops half a control volume inside the physical boundary.

Chapter 6: Pressure Velocity Coupling

Lars Davidson: Numerical Methods for Turbulent Flow http://www.tfd.chalmers.se/gr-kurs/MTF071 50

An Example Consider a one-dimensional conguration with only two main control volumes, see gure below. The discretized pressure correction in @ equation @  dimension can be written as  @   one E E      E    G( G( E E E E E  "! $   "!    (44) ( (   "!5& 9 "!5& $ 9 $ B  0 and Assume constant density !  , viscosity  . The boundary conditions for the velocities are &  &  (note that & $ is never used since the & grid is staggered half a control volume to the left). We solve the one-dimensional & momentum equation using upwind differencing @  @   E # E # E # 9  # & #$  &   & $   (45) E # E # E #  

@ @ for face 3. From the initial, guessed We solve the equation  6 we have conditions &  B    ( E #    &  &    G0 !  B  ( E #   9 !  &  &  0     E # E #  E #  #   60     9)0 



 0 where   is a body force (    buoyancy. We @ obtain &   0


#

Now the CELL 2

per unit length) due to e.g. (   0  9 0I 0 60 ! .

equation will be solved.

Chapter 6: Pressure Velocity Coupling

boundary Lars Davidson: Numerical Methods for Turbulent Flow http://www.tfd.chalmers.se/gr-kurs/MTF071 51 inlet outlet

Figure 1: A 1D grid for velocity

and pressure

cretized equation for the @ @ 0 H  0 H   0I CELL 3

#  0 H E and from Eq. 44 we get @ 

We have  E 6  




0 H


 0I . The dis equation for cell 2 thus reads


(46)

0 H , 

  For cell 3 we have    . The west coefcient is the E E   , which same as the east coefcient for cell 2, i.e. E   gives  0 H . The source term   9 0I , so the discretized equation for node 3 can be written @ @ 0 H   0 H 9 G0I (47)
We see that the equation system formed by Eqs. 46 and 47 is singular (the determinant is zero). This is always the 2@ 2 @ case for the pressure correction equation because we have @  zero normal gradient   (   in this example) at all boundaries, which means that is determined @ get around this up to an arbitrary additive constant. To problem we x this constant by setting to zero at a cho@ sen cell (cell 2, for instance), and omit this cells equation from the equation system. Here we set   and we get
Chapter 6: Pressure Velocity Coupling

9 G0I . The pressure is corrected according from Eq. 47   ) to @ @ @ @   (48)  0I , and the &  velocity is corrected as which gives   9  @ @  ( 60 !  0 H    0  (  0   (49) &   &    9
Thus we see that the pressure correction equation corrects the velocities so that the continuity is satised. In this example, it happens that the momentum equation is @ also satised, i.e. if the &  momentum equation is solved  once again with new pressure ( ) and new velocity ( &  ), we get &   0   . Thus the momentum and the continuity equations are satised. It was mentioned above that the equation system for the pressure correction equation was singular. Note that this is only a problem for direct solvers (i.e. when we invert the matrix); when we use iterative solvers such as GaussSeidel, we solve the pressure correction equations without worrying about that the system is singular. Under-relaxation Since the momentum equations are non-linear, we must use under-relaxation. This means that when we obtain & from the solver (for example, Gauss-Seidel or TDMA) we compute the new & value as a blend of the value from the & solver ( ) and the old value & , i.e.  (  %& " 9 & &  & "  (50)
Chapter 6: Pressure Velocity Coupling

Lars Davidson: Numerical Methods for Turbulent Flow http://www.tfd.chalmers.se/gr-kurs/MTF071 52 @

Lars Davidson: Numerical Methods for Turbulent Flow http://www.tfd.chalmers.se/gr-kurs/MTF071 53

. When were using small s, the changes where  between successive iterations is slowed down (   corresponds to no change at all), and  corresponds to no under-relaxation. The & momentum equation can be written (see Eq. 36)  E E   & "     $  # &
with the pressure gradient included in the source term  Insert this expression into Eq. 50 gives
# 

&  &

 "  E

 



&




#

9 &


which can be rewritten as E E E &  &   



&




#

& 0

Rearranging gives E E  & "    & E E   # 




#

 9
E (

& " 0

We nd that introducing under-relaxation directly into the equation system is conveniently carried out by modifying E the diagonal coefcient and the source term  # .

Chapter 6: Pressure Velocity Coupling

Potrebbero piacerti anche