Chapter 2
Chapter 2
                                 Ibrahim Sezai
                            Department of Mechanical Engineering
                              Eastern Mediterranean University
Fall 2014-2015
                                                                                                       1
The six faces are labelled
N, S, E, W, T, B
ρ = ρ (x, y, z, t)              p=p
(x, y, z, t)
T = T (x, y, z, t)              u=u
(x, y, z, t)                    Fig. 2-1
                p                      xand
                                 x
                                            2
                              1
                        x 2                              x 2
                                
 ME555 : Computational Fluid Dynamics         3                I. Sezai – Eastern Mediterranean University
                                
                                                        
                                v  (v)
                             (v)    
                                            1
                                               y  x z  v 
                                   1
                                        y  x z
                             (front)
                               
                               
                               
                               
                              
                                  w  (
                             (w)     
                                          w) 1
                                               z  x y    w 
                                   1
                                       z  x y
                             (bottom)
                               
                               
                               
                               
                               
                                                                                                            2
                               
                               
Rates of change following a fluid particle and for a fluid element
                   D     dx   dy
                                                         
                      dz Dt     t                x dt
                     y dt  z dt
 A fluid particle follows the flow, so
                dx / dt  u
                 dy / dt 
                v dz / dt
                w
 Hence         the
 substantive
 derivative of is
 given by
          D                                            
                  u      v    w    
           u grad Dt t    x    y   z
                t
   ME555 : Computational Fluid Dynamics    5                    I. Sezai – Eastern Mediterranean University
                       (2-8)
                          Dt                                     t                    
                                                    
 ρ = mass per unit volume.
Lhs of the mass conservation equation (2-4) is
                        
                               div( u)
                         t
The generalization of these terms for an arbitrary conserved
property is
                       ( )
                                 div(  u)
                      (2-9)
                        t
                           Net rate of flow of 
    Rate of increase        
   of  per unit volume    out of fluid element 
                             per unit volume     
                                                    
                                                                                              
   ME555 : Computational Fluid Dynamics    6                    I. Sezai – Eastern Mediterranean University
                                                                                                              3
Rewriting eq. (2-9)                                       0 (due to conservation
                                                        of mass)   
        ( )                                         
                div(  u)        u  grad         div( u)                                   
       D
       (2-10)
         t                                  t                t                        Dt
 The rates of increase of x-, y-, and z-momentum per unit volume are
                        Du                                       Dv                       Dw
                                                                                   
                        Dt                                            Dt                     Dt
 We distinguish two types of forces on fluid particles:
 • surface forces - pressure forces
                   - viscous forces
     • body forces        - gravity
                             forces
                  - centrifugal
                     forces
                             source terms
                          - Coriolis
                            forces
                          - electromagne
                            tic force
 The pressure, a normal stress, is denoted by p.
  Viscous stresses are denoted by τ.
    ME555 : Computational Fluid Dynamics       8                    I. Sezai – Eastern Mediterranean University   4
                    Fig. 2-3 Stress components on three
                    faces of fluid element.
                    The suffices i and j in τij indicate that
                    the stress component acts in the j-
                    direction on a surface normal to the i-
                     direction.
                                                              (2.13)
               x                    y     z
  To find x-component of the momentum equation:
 Rate of change of   Total force in x-direction   Total force in x-direction
 x-momentum of    on the element due to
 fluid particle    
                       on the element due to 
                      surface                        body forces
                               stresses
            
      
                                 
       Eqn.( 2.11)                                                Eqn.( 2.13)                                    SMx
             Du  ( p  xx )                           yx       zx  S
                                                                  
                                                             (2.14a)
           Dt                     x        y    z     Mx
                                                                                                                              6
     Energy Equation in Three Dimensions
The energy equation is derived from the first law of thermodynamics
which states that
                                         Net rate of   Net rate of
     Rate of increase
                                                                           to     
   work 
    of                                                heat added                 done on
     energy of fluid particle
                                        fluid pacirtel        fluid particle                   
                                             
                                              
                                             
                        DE
                   
                        Dt
          (2.16a)
          
                                  x                y             z 
                                                                     
          (2.16c)                                                                                                  7
                                                                            
                             x           y                    z
                                                                            
Summing (2.16a-c) yields the total rate of work done on the fluid
particle by surface stresses:
where
                                   
                                    
   ME555 : Computational Fluid Dynamics            16             I. Sezai – Eastern Mediterranean University
                                                                                                                8
Similarly, the net rates of heat transfer to the fluid due to heat flows in
the y- and z-direction are
        q                                   q                      (2.18b-c)
      – y x y z           and            z x y z
       y                                           z
The net rate of heat added to CV per unit volume is the sum of (2.18a-
c) divided by δxδyδz
                               qx        qy        qz
                          –           div q                                                  (2.19)
                              x            y z
              T                      T           T
     q  k                  q  k         q  k
      x                         y              z
                     x               y            z
This can be written in vector form as
               q  k grad T
                      (2.20)
Combining (2.19) and (2.20) yields the rate of heat addition to the
CV due to heat conduction
         div q  div(k grad T )
  ME555 : Computational Fluid Dynamics              17           I. Sezai – Eastern Mediterranean University
                  Energy Equation
                                 sum of the net rate of work done on the CV
                      b       y su rfa ce stre sse s(2 .17 )
                                           
                         (uxx )  (uyx )  (uzx )  (vxy ) 
            div( pu)                             
    DE
                            x       y        z       x 
     Dt               (v )           (v )  (w)       (w )
      (w)       (2.22)
                                               y         z          x               y               z
                                                
                                                                                                               9
Multiplying
     the x-momentum equation (2.14a) by u
      the y-momentum equation (2.14a) by v
      the z-momentum equation (2.14a) by w
                     yx
                                               zx
                                                    
                 Dt                                             x           y          z 
                                           xy  yy  zy 
                                    v              
                                              x y z 
                                            
                                            
                                               xz    yz
                                          w                
                                           zz 
                                                         u  S
                                          (2.23)
                                              
                                                  x
                                                y 
                                                z
                                                M
                                                
                                                
  ME555 : Computational Fluid Dynamics                   19                    I. Sezai – Eastern Mediterranean University
 Subtracting    (2.23) from (2.22)
                                    Di                                                                   u                  u
                                          p div u  div(k grad T )                                                         (2.24)
                                                                  xx
                           Dt                                         x yx  y
                                          u v
                                                     
                                         v         v        w
                                                       
                                           zx            xy         yy          zy              xz
                                                z          x           y          z                  x
                                                w            w
                                         yz        zz          i S
                                                y            z
                                                                                                                                           10
                  hip/                                             and             h  h  1 (u2  v2 
                  w2 )
                                                  o                                      2
 Combining these two definitions with the one for specific energy E
                h  i  p /   1 (u2  v2  w2 )  E  p / 
                (2.26)
                  o                                               2
                                  
                                     p  (u xx )  (uyx )  (u zx )
                                   t             x          y             z
                                     (v xy )  (v yy )  (v zy )
                                                                    
                                          x                                                            y
                                          z
                                       (wxz )        (wyz )
                                                                  (wzz )  S
                                  (2.27)
                                      x                                                                  y
                                  Equations
                                      z                   of State                                      h
                                                                                                                        11
           Navier-Stokes Equations for a Newtonian Fluid
          We need a suitable model for the viscous stresses τij.
          Viscous stresses can be expressed as functions of the
           local deformation rate (or strain rate).
          In 3D flows the local rate of deformation is
          composed of the linear deformation rate and the
           volumetric deformation rate.
          All gases and many liquids are isotropic.
          The rate of linear deformation of a fluid element has
          nine components in 3D, six of which are
          independent in isotropic fluids.
          They are denoted by the symbol eij.
         1 DV           1 dV
                                                      
                                      u       v       w V Dt
                                                
         V dt      xx                      yy                      zz
                   x             y       z
          ME555 : Computational Fluid Dynamics            24                 I. Sezai – Eastern Mediterranean University
                                                                                                                           12
Strain Rate Tensor
We can combine linear strain rate and shear strain rate
into one symmetric second-order tensor called the strain-
rate tensor.
                   u       1 u v      1   u  w 
                                                  
                                           2  z x  
                           x      2  yx            
         
                    1 v
       xx xy    xz
                                       u    v     1 v
                                                   w 
        yx  yy  yz    2  x  y         y   
                                                    2 z
  ji
                                                          
                                                 y 
              
 zx zy      zz                                         
                     1   w   u  1  w  v   w 
                 2  x  z     2 y 
                                             z  z     
                                 
                                 
  ME555 : Computational Fluid Dynamics   25        I. Sezai – Eastern Mediterranean University
                                                                                                 13
The nine viscous stress components, of which six are independent, are
                               u                            v                                     w
    xx   div
              u2                                 yy 2          div u  zz 2
                                                                                    div u
                               x                            y                                      z
                      v            u                        u w 
    xy             yx 
                                         xz
                                                           
                                                            zx    z x
                                       y x
                                                                                                                 
                                     v w                 (2.31)
                                    
                                                            
Not much is known about the second viscosity λ, because its effect is
small.
For gases a good working approximation is λ = –⅔μ
Liquids are incompressible so the mass conservation equation is
                                    div u = 0
  ME555 : Computational Fluid Dynamics                27              I. Sezai – Eastern Mediterranean University
Substitution of the above shear stresses (2.31) into (2.14a-c) yields the
Navier-Stokes equations
                                                        
         Du   p   2 u   div u    u  v
        (2.32a)
           Dt                         x x x                                       
                                                                                            y x 
                                                                       y
                                                                       
                       v w  
                                 S
                     z z                                    x  Mx
                                                                  
          Dv        p     u  v     v
                                                               2 
                   
          div u
          (2.32b)
             Dt
                                     y  x    y                   
                                                                         x
                                      y             y
                                                                             
                          v w
                                  S
                       z z                                     y  My
                                                                     
          Dw        p    u w      v
                                        
          w 
                                                                                                                        14
             Often it is useful to rearrange the viscous stress terms as follows:
                       
                           2
                              u              u  v      u  w  
                                   div u 
                      
                       x              x        y  y                   x   z 
                        z               x 
                                                                                       
                                                                                                                       
                            
                            
                                
                                     u
                                      
                                         u                                                                                div( grad
                               u)
                                    x             x             y      y      z       z 
                                                                                                            
                                     u
                                     
                                                  
                                                  w 
                                                 v
                                                      ( div u)
                                    sMx
                                       x x  y  x                               z                      x        x
                                                                                                             
                                div( grad u)  sMx
            The viscous stresses in the y- and z-momentum equations can be re-cast in a similar
            manner.
            To simplify the momentum equations:
               ‘hide’ the smaller contributions to the viscous stress terms in the momentum
               source.
            Defining a new source by
                                          SM = SM + sM
                                          (2.33)
            theME555
                Navier-Stokes    equations
                     : Computational           can be written
                                     Fluid Dynamics       29 in the most useful
                                                                         I. Sezai –form
                                                                                    Easternfor the
                                                                                            Mediterranean University
            development of the finite volume method:
                                 Du   p  div( grad u)  S
                                (2.34a)
                                     Dt                                         x                             Mx
                                    Dv      p
                                            div( grad v)  S
                                (2.34b)
                                   Dt                                           y                             My
 div( grad w)  S             Dw   p
                               (2.34c)
                               Dt                              z                      Mz
                   u    v    w       u    v    w 
                                                           
            x  x  y  x  z  x          x  x  x  y  x  
                                                                            z
                                                              
                                                            
                                 u v w 
                                              0
                                              
                                x  x y z
                                                                                                                             15
                                          0 from continuity equation
               ME555 : Computational Fluid Dynamics                     30             I. Sezai – Eastern Mediterranean University
If we use the Newtonian model for viscous stresses in the internal
energy equation (2.24) we obtain
             Di
                   p div u  div(k grad T )    S
                                                     (2.35)
                   Dt                                                  i
          u                        v 
              2                                2
                       v
       2                2
                       w    u
     2                                   
            x
                  y       z  y   x  
          2                                                                       
         (div u)                    (2.36)
                                                                          
                          2                      2
              
               u  w   
                              v w                                       
                                                                         
                   z x       
                                  z y 
                                                                      
                          (v)               p
           div( grad v)  S  div( vu)  
 y-momentum
 (2.37b)
                                    t                                                            y
                                                                                                  My
                                     (w)                        p
z-momentum                                      div( wu)  grad w)  S
                                                         div(
(2.37c)
                                    t                                                             z
                                                                                                   Mz
                                     (i)
internal energy                                div( iu)   p div u  div(k grad T )   
S                                   (2.38c)
                                t
                                i
                              (2.29)
                      p   RT and i  CvT
T able 2.1                                                                                                         16
A system of seven equations with seven unknowns  this system is mathematically
 Differential and Integral Forms of the General Transport Equations
 Equations in Table 2.1 can usefully be written in the following form:
                   ( )
                             div(  u)  div( grad  )  S
                                                                                                   
                    t
                                                                                                   (2.39)
 Rate of increase  Net rate of flow   Rate of increase  Rate of increase
 of  of fluid 
 element              of  out of 
                                        of  due to 
                                          diffusion          of  due to   
                        fluid element                            sources
                                                                          
           
                   w      wu        wv         w
                                                      w       
                                                            z
                                                            
                                 z
                                           
                                                    w w
                                                                                 w
             v                                vv                                           
                                                                                 x       y
                   
             z
                                                      
                                                                v
                    u                                v w
                    x                           
                                                       x
                                                          
                                                            x                 p               
                                                      f                   x                
                       u                              v       w
                   x    x
                    
                                                                                 p       
                      f 
                    y                            y 
                                                       y
                                                           y                                  
                   y    y
                                                       z
                       u                   v     w
                        p     z     f z  
                      
                                               
                                                                                                              17
                                          
                                                              pI
                    z                    f z   z 
Then, the conservation of mass and momentum equations can be
written in vectorial form as
                  ( v) 0
                   
                  ( v)  ( vv) ((v  v T )) 
                pI  f
               t
I : unit tensor
v: gradient of velocity vector v.
v is a tensor given by
                         u                     u       u 
                        x y           z 
                        
                        
                        vv v 
            v 
                        x y z 
                        
                        
                         w
                        w
                        w 
                        
                            x
                        y
 Similarly, the product vv appearing on the left hand side of
                   z is a tensor given by
 momentum equations
                  f: body forces
                                 uu
                  per unit volume
                  
                        
  ME555 : Computational Fluid Dynamics    uv35        I. Sezai – Eastern Mediterranean University
                                   uw 
                        vv  v  v   vu                               vv
                                                                       vw
                                          
                                          
                                          wu
wv
ww
                              τ   (v  v T )
Neglecting dissipation effects, the energy equation can
be written in terms of temperature T as
                         
                             (c T )  (c vTp ) (kTp )
                      t
In the finite volume method Eqn. (2.39) is integrated over 3-D control
volume yielding
        ( )
                dV          div(u)dV           div( grad  )dV                        S
  dV
  (2.40)
        t                                                                                       
 CV                          CV                   CV                               CV
      (2.42)                                                                                                 19
         CV                            A                 A                              CV
Equation (2.42) can be expressed as follows:
                         Net rate of          Rate of increase
     Rate of
                          decrease of   due to    of  due to 
                                                                                                  Net
  increase of  
                convection across
                                      rate of
                                                        
                                                       diffusion across  creation of 
                                                      
                  the boundaries                        the boundaries
                                                                             
In steady state problems the rate of change term of (2.42) is equal to
zero.
                 (2.43)
                  A                                      A                             CV
   Auxiliary Conditions
               (2.44)   for Viscous Fluid Flow Equations
                            t A                                                            t CV
 Table 2-5
   ME555     Boundary
         : Computational Fluid conditions
                               Dynamics   for39 compressible   viscous
                                                          I. Sezai           flow. University
                                                                   – Eastern Mediterranean
                                                                                                               20
Outflow boundaries:
• High Re flows far from solid objects in an external flow
• Fully developed flow out of a duct.
                              Pressure = specified
                              ∂un/∂n = 0
                              ∂T/∂n = 0
Sources and sinks of mass are placed on the inlet and outlet
boundaries to ensure the correct mass flow into and out of domain.
                                                                                                   21
Boundary conditions for an external flow problem.
                                        
                                              0
                                        r
                                                                                                 22
Example to cyclic boundary conditions:
    Cyclic b.c.:                  1
     2
                                                 1
                                        2
                              1                      2
23