Comparison of varieties of numerical methods applied to lid-driven cavity flow: coupling algorithms, staggered grid vs. collocated grid, and FUDS vs. SUDS

Comparison of varieties of numerical methods applied to lid-driven cavity flow: coupling algorithms, staggered grid vs. collocated grid, and FUDS vs. SUDS

The effectiveness of different methods, schemes, algorithms, and approaches is of substantial challenging problems in numerical modeling of transport phenomena. In the present paper, a lid-driven cavity problem is modeled via two basically different approaches of spatial discretization: collocated and staggered. The non-dimensionalized governing equations are semi-discretized by using a finite volume approach. Then, the full discretization is performed in each of collocated and staggered grids, separately. Upwind and central difference schemes are implemented in order to discretize the convective and diffusion terms of equations, respectively. After mesh independency study, the performances of collocated and staggered grids in comparison with the reference benchmark are presented. Next, the effectiveness of the first and the second order upwind schemes are presented, as well as different coupling algorithms of SIMPLE, SIMPLEC, and SIMPLER. Finally, an overall comparison of the methods is provided and acceptable agreements with benchmark are attained.

Introduction

As a classic problem, lid-driven cavity flow is widely implemented in order to validate, compare, and investigate numerical methods and schemes.

Staggered grid has been extensively used for the numerical modeling of lid-driven cavity flows. A two-dimensional computational model was developed to study the fluid dynamic behavior in a square cavity driven by an oscillating lid using staggered grid-based finite volume method (Indukuri and Maniyeri, 2018). The numerical simulations were performed for the case of top wall oscillations for various combinations of Reynolds number and frequencies. From these simulations, an optimum frequency was chosen and then the vortex behavior for the cases of parallel wall oscillations was explored. McDonough (2007) investigated lid-driven cavity problem by use of a new form of large-eddy simulation at moderate Reynolds number to demonstrate the ability of the procedure to automatically predict transition to turbulence. They reported parallel speedups observed on a general-purpose symmetric multiprocessor employing MPI for parallelization. Gutt and Groşan (2015) analyzed the motion of an incompressible viscous fluid through a porous medium located in a two-dimensional square lid-driven cavity flow described by a generalized Darcy–Brinkman model. The effect of inertia and rheology parameters on the flow of viscoplastic fluids inside a lid-driven cavity is investigated using a stabilized finite element approximation (dos Santos et al. 2011). Patil, Lakshmisha, and Rogg (2006) presented the results for deep cavities with aspect ratios of 1.5–4, and Reynolds numbers of 50–3200. Several features of the flow, such as the location and strength of the primary vortex, and the corner-eddy dynamics were investigated and compared with previous findings from experiments and theory.

Direct numerical simulations about the transition process from laminar to chaotic flow in square lid-driven cavity 2D incompressible flow with increasing Reynolds numbers flows were considered by (Peng, Shiau, and Hwang, 2003). The spatial discretization consisted of a seventh-order upwind-biased method for the convection term and a sixth-order central method for the diffusive term.

Collocated grid arrangement is also implemented in order to simulate lid-driven cavity flows. Peng (Ding, 2017) employed the SIMPLE algorithm and its variants to solve the driven-cavity problem at Re < 10,000 by proposing a new segregated solver for determining the solution of incompressible flow on structured collocated grid systems. Case studies of steady incompressible flow in a 2D lid-driven square cavity were investigated for 100 < Re < 5000 by AbdelMigid et al. (Tamer, Khalid, Mohamed, and Ahmed, 2017). Collocated grid arrangement along with a uniform structured Cartesian grid was used. Yapici, Karasozen, and Uludag (2009) presented a finite volume technique for the numerical solution of steady laminar flow of Oldroyd-B fluid in a lid-driven square cavity over a wide range of Reynolds and Weissenberg numbers. Second-order central difference (CD) scheme was used for the convection part of the momentum equation while first-order upwind approximation was employed to handle viscoelastic stresses. In another work, a numerical collocated finite volume method was presented to study Buongiorno’s nanofluid model for MHD mixed convection of a lid-driven cavity filled with nanofluid (Elshehabey and Ahmed, 2015).

Methods

Aim and design for the study

The principal aim of the following research is to compare different computational methods for simulation of a cavity fluid flow driven by a moving lid and to introduce appropriate schemes. The model is based on the finite volume method of the governing equation semi-discretization in two over ally different formulations of staggered and collocated grid systems. The full discretization is made by both the first-order and the second-order upwind schemes. Three different coupling algorithms of SIMPLE, SIMPLEC, and SIMPLER are developed. Afterward, the results of all the methods are compared.

Description of the methodology

Semi-discretization of governing equations

The physical and computational domains of the problem area square cavity with the dimensions of L whose upper lid is moving rightward with the velocity of u0. The origin of the Cartesian coordinate is located at the left lower corner of the cavity.

In order to simplify the model, we consider the following assumptions:

1)

Working fluid is incompressible.

2)

The shear stress tensor is proportional to the deformation rate (Newtonian fluid)

3)

There are no external body forces.

4)

The flow is laminar.

The governing equations are continuity and momentum equations, which for a steady laminar flow of incompressible fluid with constant viscosity and no external force are as follows:

Making governing equations non-dimensional enables us to incorporate some fluid and geometric parameters and to generalize the results of the simulation. We scale the x and y coordinates by the dimension of cavity L, the velocities by lid velocity, and pressure by dynamic pressure as described below:

The next step is to discretize the computational domain. Whether the grid system is collocated or staggered, integrating governing Eqs. (5)–(7) over an arbitrary control volume depicted in Fig. 2 gives semi-discretized Eqs. (9)–(11).

The velocities with that are convecting velocities, which convey mass or momentum of fluid parcels. Considering uniform Cartesian grid and Δx = Δy, divide the last three equations by cross-sectional area, we have

The above equations govern all the control volumes and are applicable for both collocated and staggered grid. In the following section, the discretization of the equations for the collocated and staggered grid will be presented in details.

Discretization in staggered grid

The schematic of staggered grid arrangement is depicted in Fig. 2. Apparently, the u, v, and scalar (pressure) control volumes are staggered with respect to each other. Firstly, consider x-momentum Eq. (13) for non-boundary u-control volumes shown in Fig. 2. Approximate the diffusion terms of viscous stresses by central difference scheme.

The upwind scheme is implemented for convected velocities. In order to generalize the formulation, the relation is derived for the second order upwind. The scheme can be simply changed to the first order upwind only by setting the coefficients 1.5 and 0.5 to 1.0 and 0.0 respectively.

The pressure force exerted on the faces of u-control volume does not need to be approximated because the faces of u-control volume coincide with pressure node, so that

Performing the aforementioned approximations for x-momentum equation, we attained the following algebraic linear equation based on the central node and neighboring node values of u-velocity.

The boundary conditions of x-momentum equation are

Near left wall: for the first column of half-volumes whose centers located at x = 0, the no-penetration condition must be satisfied.

$$ {u}_P\equiv {u}_{i,J}=0\kern5.25em i=1\kern0.5em ,\kern0.75em J=1\kern0.5em to\ n $$

(33)

For the second column of volumes, in the second-order upwind scheme, u_{ww} does not exist, so the equations must be modified based on the first order upwind as follows:

Lower wall control volumes (the first row), i.e., in the vicinity of y = 0: in these volumes, the viscous term of ∂u/∂y must be approximated by forward scheme rather than central scheme.

Where U_{y = 0} is the velocity of the lower wall. Similarly, for the upper wall at the vicinity of y = 1 the viscous term of ∂u/∂y must be approximated by backward scheme rather than central scheme

For four corners, a combination of the mentioned boundary conditions must be used.

Similarly, consider y-momentum Eq. (14) for non-boundary v-control volumes depicted in Fig. 2. To discretize diffusion terms for those CVs, we use the CDS.

The convected velocities at vertical faces are discretized by the second-order upwind scheme. To alter the scheme to the first order, the coefficients 1.5 and 0.5 should be changed to 1.0 and 0.0 respectively.

At four corners of the computational domain, a combination of the described boundary conditions must be utilized.

In order to implement the family of SIMPLE algorithms, manipulate the continuity equation to attain an algebraic equation in terms of nodal pressures to use in couple with the momentum equations.

According to the SIMPLE algorithm, the first step is to guess the pressure field. Nevertheless, due to the non-linearity of the momentum equation, the velocity field must be guessed also. Consider the discretized momentum equations for exact solution u and approximate solution u*:

Incorporating Eqs. (71) and (69), and Eqs. (73) and (72) and then put the resulting relations in the continuity equation yields the following algebraic equations:

In SIMPLER algorithm, the predictive pressure P^{*} itself is calculated in the initial stage by virtual velocity field. To perform this, guess pressure and velocities and put velocities in pressure-free momentum Eqs. (76) and (77) to attain pseudo-velocities.

Insert the pseudo-velocities into relations (78) and (79), and then replace the real velocities in the continuity equation. The result is an algebraic equation for the predictive pressure P^{*}. From this stage onwards, SIMPLER algorithm is similar to SIMPLE algorithm.

In collocated grid (see Fig. 1), faces and nodes of all the variables are the same. The formulation of the collocated grid is simpler than that of the staggered grid and of course, is similar. One difference is in estimating the convecting velocities.

We again recall semi-discretized conservation Eqs. (12)–(14). According to Rhie and Chow, the convecting velocity on a surface equals the average of two neighboring velocities on nodes, plus the third derivative of pressure gradient function as follows:

$$ {\hat{u}}_e=\frac{u_P+{u}_E}{2}+\left[-{d}_e^u{\left(\frac{\partial P}{\partial x}\right)}_e+\frac{1}{2}{d}_P^u{\left(\frac{\partial P}{\partial x}\right)}_P+\frac{1}{2}{d}_E^u{\left(\frac{\partial P}{\partial x}\right)}_E\right]\varDelta x $$

(80)

$$ {\hat{v}}_n=\frac{v_P+{v}_N}{2}+\left[-{d}_n^v{\left(\frac{\partial P}{\partial y}\right)}_n+\frac{1}{2}{d}_P^v{\left(\frac{\partial P}{\partial y}\right)}_P+\frac{1}{2}{d}_N^v{\left(\frac{\partial P}{\partial y}\right)}_N\right]\varDelta y $$

(81)

Similarly, for \( \hat{u} \)_{w} and \( {\hat{\mathrm{v}}}_{\mathrm{s}} \), similar relationships can be derived.

For the non-boundary control volumes, we estimate the pressure gradient terms of Eqs. (80) and (81) with CDS as well as backward or forward linear approximation (depending on the flow direction) for boundary control volumes. For non-boundary surfaces,

After calculating the velocities from the momentum Eqs. (88) and (89), couple velocity and pressure by incorporating Eqs. (82)–(85) into continuity Eq. (12). Subsequently, we obtain an algebraic equation in terms of pressure:

Applying boundary conditions on the continuity equation requires a little care. The coefficients of Eq. (90) are presented in Tables 1 and 2.

In order to apply the boundary conditions in the collocated grid, we go through the same way as for the staggered grid. It is noteworthy that in the collocated grid, more inner CVs are influenced by the boundary conditions than in staggered grid.

Vorticity calculation: we calculate vorticity at nodal points. According to Fig. 2, the vorticity for non-boundary nodes in the staggered grid is calculated by CDS:

First, we need to examine the grid independence of the results. Grid independence study is carried out with FUDS, for Reynolds numbers of 10, 100, and 1000. The v-velocity profiles at y = 1/2 and the vorticity profiles at x = 0.9 (due to the formation of the secondary vertex in the lower right corner of the area) are implemented to check grid independency, though the results of the latter are presented.

For Reynolds number of 10, the vorticity profiles at x = 0.9 are illustrated in Fig. 3. Four different grid systems of 10 × 10, 20 × 20, 40 × 40, and 60 × 60 are investigated. It is clear from the figure that the grid independency is obtained by grid 40 × 40. Figure 4 displays the vorticity profiles at x = 0.9 for grids 20 × 20, 40 × 40, 60 × 60, and 80 × 80 at Reynolds number of 100. Obviously, the grid independency for Re = 100 is obtained by grid 60 × 60. The vorticity profiles of grids 40 × 40, 60 × 60, 80 × 80, 100 × 100, 120 × 120, and 140 × 140 for Re = 1000 are presented in Fig. 5. The mesh independency in this case is obtained by grid 120 × 120.

Collocated grid independency

Similar to those done for the staggered grid, we use the vorticity profiles at x = 0.9 for investigating the grid independence. The vorticity profiles at x = 0.9 and Reynolds number 10 is presented for grids 20 × 20, 40 × 40, and 60 × 60 in Fig. 6. It is clear from the figure that grid independence is obtained by grid 40 × 40. Figure 7 presents the vorticity profiles at x = 0.9 and Reynolds number 100 for grids 40 × 40, 60 × 60, and 80 × 80. This figure reveals that grid 60 × 60 is appropriate for independent results at Re = 100. The vorticity profiles at x = 0.9 with Reynolds number 1000 are depicted for grids 60 × 60, 80 × 80, 100 × 100, 120 × 120, and 140 × 140 in Fig. 8. It is clear from the figure that grid independency is obtained for Re = 1000 by grid 120 × 120.

Consequently, collocated and staggered grids require the same grid size to attain independent results at each Reynolds number.

Staggered versus collocated

To compare the results of staggered and the collocated grids and compare them with benchmark of (Ghia, Ghia, and Shin, 1982), Figs. 9, 10, and 11 are provided. The u-velocity profiles at x = 1/2 are shown for the three Reynolds numbers of 10, 100, and 1000 obtained by FUDS. The results of (Ghia et al. 1982) are presented as benchmark for Re = 100, 1000.

The results prove that in cases of coarse grid (less number of nodes), the difference of the results of collocated grid and staggered grid is larger. Moreover, the values obtained with staggered grid are slightly more accurate than collocated ones by comparison with the reference values. It should be pointed out that the error of two implemented approaches is higher in higher Reynolds numbers, especially in the regions with steep velocity gradients (see Fig. 11 for u at y = 0.17 and y = 0.85). This problem can be resolved by implementing a TVD scheme instead of the upwind scheme.

FUDS versus SUDS

To compare the results of the second order UDS, with the results presented in the previous sections, which are obtained by the first order USD, simulations have been done with different number of nodes at Reynolds numbers 10, 100, and 1000. Prior to that, we studied the grid independency of the results of SUDS. For Re = 10, grid 40 × 40 gives the independent results identical to that of FUDS. At Reynolds number 100, grid 50 × 50 and grid 40 × 40 give the independent results. However, with FUDS, the mesh independency is obtained by grid 60 × 60. Grid 80 × 80 attains independent outcomes, whereas the grid independence is obtained in grid 120 × 120 by FUDS.

According to the aforementioned results, it can be concluded that at low Reynolds numbers, the grid sizes in which independency is attained are the same for both FUDS and SUDS. In contrast, at the high Reynolds numbers (Re > 100), FUDS require a finer grid than SUDS to attain independency. Consequently, the second order upwind scheme is an appropriate approximation for the large convection term at high Reynolds numbers.

Now, in order to compare the results of FUDS and SUDS, the u-velocity profiles at x = 1/2 are illustrated in Figs. 12, 13, and 14 respectively for 3 Reynolds numbers of 10, 100, and 1000 obtained with staggered grid. The results of (Ghia et al. 1982) are also brought in Figs. 13 and 14 for comparison.

With regard to these profiles, there is no superiority of SUDS over FUDS at low Reynolds numbers of 10. By contrast, SUDS has significantly less error than FUDS at Reynolds number 100 in coarse grids, and this issue reveals the SUDS accuracy in the approximation of the momentum convection terms. Of course, the errors of both schemes reduce by fining the grid. In any case, SUDS have closer values to the reference results. The differences in values presented in Fig. 14 for Re = 1000 are more obvious. In this Reynolds number, FUDS has a considerable error even with a fine grid of 120 × 120 (noting that FUDS results are grid independent in this number of nodes). The SUDS results even by grid 40 × 40 have less error than grid independent results of FUDS. Furthermore, SUDS with grid 120 × 120 exactly coincide with the benchmark of (Ghia et al. 1982).

Coupling algorithms of SIMPLE family

First, it must be noted that all previous results presented in this report are obtained by SIMPLE algorithm. To investigate the accuracy and the performance of the algorithms in the iterative solution process, the residual of the x-momentum equation is plotted for 3 algorithms of SIMPLE family at Reynolds numbers of 10, 100, and 1000. The residual in terms of iteration number for Re = 10 for SIMPLE, SIMPLEC, and SIMPLER is shown in Fig. 15. Obviously, the SIMPLER algorithm apparently converges with the number of iterations about 40% of that of SIMPLE. Considering the fact that the number of calculations in each iterate involved in SIMPLER is about 30% larger than that for SIMPLE (Versteeg and Malalasekera, 2007), the simulation time SIMPLER is about half of the SIMPLE. Unfortunately, SIMPLER gives devastating oscillatory solution. SIMPLEC ranks the second in speed but it causes oscillatory solution and of course less than SIMPLER.

Figure 16 depicts the residual of algorithms at Re = 100. The performance of SIMPLE and SIMPLEC algorithms are alike and nearly smooth while SIMPLER is still faster but substantially oscillatory. The residuals for Reynolds number 1000 are illustrated in Fig. 17. Here, the trends are thoroughly different from the previous graphs. From iteration number 800 onwards, SIMPLEC algorithm loses its performance and its convergence rate drops. SIMPLE and SIMPLER behave fairly smooth with acceptable convergence rate. Multiplying the number of iterations by the number of calculations in each iterate ranks SIMPLER as the fastest.

All in all, SIMPLEC algorithm is a proper choice for low Reynolds numbers of order of 10, SIMPLE is suitable for Reynolds numbers of order of 10^{2}, and SIMPLER is the fastest for moderate Reynolds numbers of order of 10^{3}.

Overall comparison of the methods

In order to sum up the results of FUDS versus SUDS, and staggered grid versus collocated grid, and also to compare with the reference, u-velocity profiles along y-axis x = 1/2 and v-velocity profiles along x-axis at y = 1/2 for Re = 1000 are depicted in Figs. 18 and 19, respectively.

According to the two figures, it can be inferred that FUDS is rather inaccurate due to numerical diffusion especially in the regions with large gradients, and it makes the velocity profile smoother. Moreover, staggered and collocated grids have the same results with FUDS. Nevertheless, with SUDS, staggered grid has more accuracy than the collocated grid. It is remarkable that the results of staggered grid with 120 × 120 and SUDS coincide with the results of (Ghia et al. 1982). Totally, staggered grid with SUDS gives the most accurate results followed by collocated grid with SUDS.

Conclusion

In the present paper, a lid-driven cavity problem is modeled via two basically different approaches of spatial discretization: collocated and staggered. From CFD point of view, it is noteworthy that the semi-discrete equations of the staggered grid and the collocated grid are similar. The main difference is in the calculation of convecting velocities and applying the boundary conditions.

Grid independency study proves that collocated and staggered grids require equal grid size to attain independent results at same Reynolds numbers. By coarse grid, the difference of the results of the collocated grid and the staggered grid is larger. Also, the error of two approaches is higher in higher Reynolds numbers, especially in the regions with steep gradients. At low Reynolds numbers, the grid size in which independency is attained is the same for both FUDS and SUDS. In contrast, at the moderate Reynolds numbers, FUDS require a finer grid than SUDS to attain independency. There is no superiority of SUDS over FUDS at low Reynolds numbers whereas SUDS has considerably less error than FUDS at moderate Reynolds numbers. By comparing different coupling algorithms it can be concluded that SIMPLEC algorithm is a proper choice for low Reynolds numbers of order of 10, SIMPLE is suitable for Reynolds numbers of order of 10^{2}, and SIMPLER is the fastest for moderate Reynolds numbers of order of 10^{3}.

Briefly, FUDS is rather inaccurate due to numerical diffusion especially in the regions with large gradients, and it makes the velocity profile smoother and staggered, and collocated grids have the same results with FUDS. Besides, staggered grid with SUDS gives the most accurate results followed by collocated grid with SUDS.

Nomenclatures

A cross-sectional area

a coefficient in discretized equation

b source term

d pressure term coefficient

L cavity dimension

P pressure

P_{0} reference pressure

Re Reynolds number

u velocity in x-direction

u_{0} lid velocity

v velocity in x-direction

x longitudinal coordinate

y transversal coordinate

Greek letters

ρ density

μ dynamic viscosity

Subscripts

I node number in x-direction

i face number in x-direction

J node number in y-direction

j face number in y-direction

Superscripts

* dimensional parameter

Availability of data and materials

The output data of the computer code will be available on request via email to the corresponding author.

References

Ding, P. (2017). Solution of lid-driven cavity problems with an improved SIMPLE algorithm at high Reynolds numbers. International Journal of Heat and Mass Transfer, 115, 942–954.

dos Santos, D. D. O., et al. (2011). Numerical approximations for flow of viscoplastic fluids in a lid-driven cavity. Journal of Non-Newtonian Fluid Mechanics, 166(12–13), 667–679.

Elshehabey, H. M., & Ahmed, S. E. (2015). MHD mixed convection in a lid-driven cavity filled by a nanofluid with sinusoidal temperature distribution on the both vertical walls using Buongiorno’s nanofluid model. International Journal of Heat and Mass Transfer, 88, 181–202.

Ghia, V., Ghia, K. N., & Shin, C. T. (1982). High-resolutions for incompressible flow using the Navier-stokes equations and a multi-grid method. Journal of Computational Physics, 48, 387–411.

Gutt, R., & Groşan, T. (2015). On the lid-driven problem in a porous cavity. A theoretical and numerical approach. Applied Mathematics and Computation, 266, 1070–1082.

Patil, D. V., Lakshmisha, K. N., & Rogg, B. (2006). Lattice Boltzmann simulation of lid-driven flow in deep cavities. Computers & Fluids, 35(10), 1116–1125.

Tamer, A. A. M., Khalid, M. S., Mohamed, A. K., & Ahmed, A. A. (2017). Revisiting the lid-driven cavity flow problem: Review and new steady state benchmarking results using GPU accelerated code. Alexandria Engineering Journal, 56, 123–135.

Yapici, K., Karasozen, B., & Uludag, Y. (2009). Finite volume simulation of viscoelastic laminar flow in a lid-driven cavity. Journal of Non-Newtonian Fluid Mechanics, 164, 51–65.

AAB has developed the model and wrote the computer code. MMH has written the manuscript text and prepared the figures. The manuscript text is finally amended by AAB. Both authors read and approved the final manuscript.

The authors declare that they have no competing interests.

Additional information

Publisher’s Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.

Boroujerdi, A.A., Hamzeh, M. Comparison of varieties of numerical methods applied to lid-driven cavity flow: coupling algorithms, staggered grid vs. collocated grid, and FUDS vs. SUDS.
Int J Mech Mater Eng14, 7 (2019). https://doi.org/10.1186/s40712-019-0104-7