You are on page 1of 11

Weekly Report

Yosua Heru Irawan


2019 - 11 - 27

B. Solve lid-driven cavity case using 3-D N-S solver


1 Problem

Figure 1: Lid-driven cavity

The square container is filled with fluid and the lid of the container moves at a given constant
velocity, thereby setting the fluid in motion. The results of this case will be compared with the
results of published papers. The initial condition at t = 0 is u = v = w = 0, and the boundary
conditions for this case are presented in table 1:

1
1. At x = 0 and x = 1, u = v = w = 0
2. At y = 0, u = v = w = 0
3. At y = 1, u = 1 and v = w = 0

4. At z = 0 and z = 1, u = v = w = 0

2 3D N-S Solver
The solver solves the continuity and Navier-Stokes equations in three dimensions. For this case,
different grid sizes are used to compare the results with published results. The number of grids used
can be seen in the following list below. All cases are for Re = 100.
1. x = 20, y = 20, z = 20
2. x = 40, y = 40, z = 40

3. x = 60, y = 60, z = 60
4. x = 80, y = 80, z = 80
5. x = 100, y = 100, z = 100

3 Results

Table 1: Calculation time

Number of grid Calculation time (s)


20 x 20 x 20 9
40 x 40 x 40 323 (5 minutes)
60 x 60 x 60 5156 (1.5 hours)
80 x 80 x 80 30568 ( 8 hours)
100 x 100 x 100 107377 (30 hours)

All calculations are performed on the same machine (desktop) and use four threads for parallelization.
The number of grids used greatly affects the calculation time. For this case, validation compares the
numerical results with the corresponding cases published by Ku et al. in 1986. Validation is done
in the plane x-y at the mid-position of z = 0.5. Validation data used are velocity profile at vertical
and horizontal centerlines of the plane.

2
Figure 2: Vertical u-velocity profile at x-y plane (z = 0.5)

The u-velocity profiles at vertical centerline of plane can be seen in figure 2. Increasing the number of
grids results in more precise calculations. But, increasing the number of grids also means increasing
computing costs, because the calculation time is getting longer. Calculation with a grid of 20×20×20
provide results that are not precise, whereas the most precise results are obtained using the grid size
100×100×100. But if we consider the computational cost, calculation using the grid size 60×60×60
looks optimal, because the calculation result quite close to that from the grid size 100 × 100 × 100
while the calculation time is 20 times faster.

3
Figure 3: Horizontal v-velocity profile at x-y plane (z = 0.5)

Similar results appear in horizontal v-velocity profiles of the plane (figure 3). Calculations with the
grid size 20 × 20 × 20 gives poor prediction, while other calculations give good prediction that look
close to the results of the Ku et all. The flow field data like contours, vectors and streamlines can
be seen in figures below.

4
Figure 4: Pressure contour at x-y plane on position of z = 0.5

5
Figure 5: The contours of velocity magnitude at x-y plane on position of z = 0.5

6
Figure 6: The contours of u-velocity at x-y plane on position of z = 0.5

7
Figure 7: The contours of v-velocity at x-y plane on position of z = 0.5

8
Y

Velocity Magnitude: 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
Z X

Figure 8: Velocity vector at x-y plane on position of z = 0.5

9
Figure 9: Streamline at x-y plane on position of z = 0.5

4 Conclusions
The lid-driven cavity case has been solved using 3-D N-S solver with five different grid sizes. A
larger grid sizes produces more precise results, but increases computational costs. For an efficient
calculation process it is necessary to choose the right number of grids, where the results are good
and the computational costs are not too high.
The things I learned:

1. How to use 3-D N-S solver


2. How to plot velocity profile in Tecplot
3. How to plot flow field data in Tecplot

10
5 Future work
1. Run this case again with different Reynold number
2. Try to compare results from uniform and non-uniform grid for this case
3. Learn how this solver work

11

You might also like