Imaginative Consultancy in Computational Fluid Dynamics
Home
Consultancy
Contact us
Order the Book








Computational Fluid Dynamics Worked Examples

List of the Examples in the Book

All the problems are extracted from our publication" Computational Fluid Dynamics Recipes - Outline & Worked Examples" and all formulae references are from the book. To order our publications, please visit our page here.

We will add more and more problems as we go on.

To support this effort, please either order our publications or ask you library to do so.

Two - Dimensional Lid - Driven Cavity Flow - Creeping Flow

Example 13.1 - Two - Dimensional Lid - Driven Cavity Flow - Creeping Flow

Consider a two dimensional square cavity filled with an incompressible fluid as shown in Figure 13.1. A steady creeping fluid motion is generated inside the cavity by the slid of the infinitely long top lid at a constant velocity U0. Since there is no fluid squeezed out of the cavity below the moving plate, the momentum, or vorticity, generated at the upper wall is diffused into the fluid forming closed path patterns within the cavity. We want to find this pattern.

From the hydrodynamics point of view, this problem represents a simplified model of complicated flow phenomena like recirculating flows in the lubrication process or flow in micro - structures.

Working with nondimensional equations, we may assume the size of the cavity is 1 × 1 and the sliding velocity is U0 = 1

Fig 13_1



Simplified Staggered Grid

The regular approach of single grid will create some difficulties in these problems. Here, vorticity and velocities are given in terms of the derivatives of stream function. With a regular grid for vorticity, stream function and velocities on the faces of the control volumes should be approximated. Such an approximation will increase the errors.

A convenient way to get around these complications is to use two different grids. The first grid is our regular grid. We use this grid for the vorticity. The second grid is staggered towards left to coincide with the boundaries of the control volumes. This grid is used for the stream function. This is a simple model of the staggered grids which will be used later in solving convective - diffusive flows.

On this basis, we find the vorticity by solving a conservation of momentum. Then, the stream function can be found by solving the Poisson Equation, using a finite difference method. Notice that the values of the stream function are set on the second grid. Finally, having the stream function, we can find the velocities from Eqn.(13.2).

To distinguish between the two grids, the grid for vorticity is indexed by i and j and the second grid by I and J. The west walls of the cavity will be defined by I = 1 and J = 1. Assuming a uniform grid with Δ x = Δ y = h, the grids can be presented as in Figure 13.2.

Fig 13_2

The Integral Equations

The governing equations are shown in Eqns.(13.1) and (13.2). The vorticity equation (Eqn.(13.1)) is exactly like the heat conduction equation. This is an elliptic differential equation and the value of the vorticity should be preassigned on all boundaries. Hence, the integral equation given in the Eqn.(7.25) can be used here.

Boundary conditions

Assigning the vorticity on the walls is not always straight forward. Here we find the vorticity on the walls by the use of Eqn.(13.3) as follows

  1. The north wall

    A schematic drawing of a typical north boundary grids is shown in Figure 13.3.

    Fig 13_3

    The vorticity on the north wall is given by

    Fig 13_4

    It is clear, from Figure 13.3, that the north control volumes are indexed by (i, jmax+1) and the north wall by (I + 1/2, Jmax + 1). Then we can write

    Fig 13_5

    On the wall, we can assume

    Fig 13_6

    First, let us consider the vorticity at (I, Jmax + 1), we have

    Fig 13_7

    It is not difficult to show that if we use the Taylor’s series expansion for the right - hand side terms, we can get a proper difference equation:

    Fig 13_8

    Knowing

    Fig 13_9

    Eqn.(13.9) can be written as

    Fig 13_10

    Similarly we can write:

    Fig 13_11

    Then, Eqn.(13.8) can be written as

    Fig 13_12
  2. The west wall

    We have (see the book for the derivation)

    Fig 13_13
  3. The east wall: See the book
  4. The south wall: See the book

Discretization

  1. Vorticity Equation (for detail of derivation see the Book)

    Here we formulate our discretization (similar to Example 8.6), in the form of

    Fig 13_14
    1. The Inner Nodes, defined by:
      {2 ≤ i ≤ imax − 1, 2 ≤ j ≤ jmax − 1}

      and, from Eqn.(13.7), we have

      Fig 13_15
    2. The West Boundary, defined by:
      {i = 1, 2 ≤ j ≤ jmax−1}

      Here, we have a Dirichlet boundary condition. Then (see the book for the derivation)

      Fig 13_16
    3. The North Boundary, defined by
      {j = jmax, 2 ≤ i ≤ imax−1}
      Then (see the book)
      Fig 13_17
    4. The East Boundary: See the Book
    5. The South Boundary: See the Book
    6. SW Corner defined by:
      {i = 1, j = 1}

      The schematic of the southwest cell is shown in Figure 13.7.

      Fig 13_18

      On the west side we have:

      Fig 13_19

      Here we have a ghost cell at (2, 0). The easiest way to approximate the value of at this point is to use a linear extrapolation based on Ψ2,1 and Ψ2,2. But we know that Ψ2,1 is on the wall, hence it is zero. Then we have

      Ψ2,0 = - Ψ2,2

      That is

      Γ9 = 0

      Hence

      Fig 13_20

      For the south side we have

      Fig 13_22

      The ghost point here is at (0, 2). Using the same argument we can say

      Ψ2,0 = - Ψ2,2

      Hence

      Fig 13_23

      Then (see the Book)

      Fig 13_24
    7. NW Corner, defined by
      {i = 1, j = jmax}

      Here, we have

      Fig 13_25

      and

      Fig 13_26

      Similarly

      Fig 13_27

      and

      Fig 13_28

      Finally

      Fig 13_29
    8. For the rest of the descritization details see the Book

  2. Stream-Function

    For the stream - function we have:

    2 = - ω

    The value of the stream - function on all the boundaries are equal to zero. Hence, this equation should be solved for the interior points of the (I, J) grid.

    The stream - function Ψ is not a conserved variable. Hence, we can use a 2nd - order finite difference approximation for Eqn.(13.55). Then, we will have:

    Fig 13_30

    Then the finite difference discretization would be

    Fig 13_31
  3. Velocities

    We have

    Fig 13_32

    Then, using a 2nd - order approximation, we will have

    Fig 13_33

Results

The plot of the stream lines is shown in Figures 13.8.

Fig 13_34

The Code

See the Book