- About this Journal ·
- Abstracting and Indexing ·
- Aims and Scope ·
- Annual Issues ·
- Article Processing Charges ·
- Articles in Press ·
- Author Guidelines ·
- Bibliographic Information ·
- Citations to this Journal ·
- Contact Information ·
- Editorial Board ·
- Editorial Workflow ·
- Free eTOC Alerts ·
- Publication Ethics ·
- Reviewers Acknowledgment ·
- Submit a Manuscript ·
- Subscription Information ·
- Table of Contents

Journal of Applied Mathematics

Volume 2013 (2013), Article ID 596218, 10 pages

http://dx.doi.org/10.1155/2013/596218

## Comparison Study on the Performances of Finite Volume Method and Finite Difference Method

^{1}National Engineering Laboratory for Pipeline Safety and Beijing Key Laboratory of Urban Oil and Gas Distribution Technology, China University of Petroleum, Beijing 102249, China^{2}PetroChina Southwest Pipeline Company, Chengdu 610041, China

Received 26 March 2013; Revised 9 June 2013; Accepted 9 June 2013

Academic Editor: Shuyu Sun

Copyright © 2013 Renwei Liu et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

#### Abstract

Vorticity-stream function method and MAC algorithm are adopted to systemically compare the finite volume method (FVM) and finite difference method (FDM) in this paper. Two typical problems—lid-driven flow and natural convection flow in a square cavity—are taken as examples to compare and analyze the calculation performances of FVM and FDM with variant mesh densities, discrete forms, and treatments of boundary condition. It is indicated that FVM is superior to FDM from the perspective of accuracy, stability of convection term, robustness, and calculation efficiency. Particularly ,when the mesh is coarse and taken as , the results of FDM suffer severe oscillation and even lose physical meaning.

#### 1. Introduction

In the numerical solution of flow and heat transfer problems, the concepts of conservative and nonconservative equations were firstly proposed in [1, 2] in the 1980s. It is noteworthy that, from the perspective of differential unit, the conservative and nonconservative equations are equivalent, which are both the mathematical expression of physical conservation law. Nevertheless, the numerical calculation is implemented on the calculation unit of finite size, for which the two forms of equations are of different characteristics. Practical calculation process shows that the influence of differences between conservative and nonconservative forms on accuracy, stability, and efficiency of numerical calculation is significant.

Conservative governing equation and the corresponding discrete form show some advantages; for example, in the control volume with finite size, only the conservative equation can guarantee that the conservation law of the problem studied is satisfied [3–5]. The result obtained by the conservative equation is of higher accuracy generally. In the calculation of flow problem involving shock wave, the obtained flow field is usually smooth and stable employing the conservation form of governing equation, while using the non-conservation equation might lead to unsatisfactory spatial oscillations in the upstream and downstream regions of the shock wave [6–8]. Moreover, when the conservation equation is used to a body-fitted coordinate system, the conservativeness of governing equation can still be satisfied [9, 10]. More related researches and applications are presented in the literature [11–15]. Hence, the conservation property of discretized equations is desirable in engineering calculation. Based on this, it is of great significance to investigate the influence from conservation property on the calculation performances and provide guidance for the better implementation of it. The present paper compares the calculation performances by analyzing the finite volume method which is conservative and finite difference method which is nonconservative.

Some researchers made comparisons of the two methods. Patankar [16] and West and Fuller [17] pointed out that the results obtained in the situation that grids numbers decrease and mass conservation is rigorously controlled lose its physical meaning. Leonard [18] made a comparison of the accuracy of truncation error of the convection term in FVM and FDM. By theoretical derivation, he indicated that the truncation error of FVM is smaller than that of FDM in second-order central difference and second-order upwind difference. Botte et al. [19] made comparison of the accuracy, mass conservation, and computation time. It was validated by examples that FDM cannot ensure mass conservation while FVM can. Meanwhile, the influence of boundary conditions on the accuracy of algorithm was taken into consideration.

Previous researchers mainly focused on the comparison of accuracy. There are few systemic studies on the stability, robustness, and computation efficiency. This paper compared the calculation performances of FVM and FDM based on previous research. Comprehensive comparison of accuracy, stability of convection term, robustness, and calculation efficiency was performed. The results obtained may enrich the study on the calculation performances of conservative and nonconservative methods, which are expected to provide some reference for the practical calculation.

#### 2. Physical Problem

To make the study possess general significance, it is necessary to analyze the calculation performances of the two methods based on variant problems. Lid-driven flow and natural convection flow in a square cavity which are both typical problems in computational fluid mechanics and numerical heat transfer are solved in this paper to make a systemic analysis on the subject.

As Figure 1(a) shows, in the lid-driven flow the lid moves horizontally at a constant velocity while the other three boundaries keep still. The Reynolds number, Re (Reynolds number) adopted in this paper, is 1000.

Figure 1(b) shows the schematic of natural convection flow in a square cavity. The left and right boundaries are the first boundary conditions, between which the temperature on the left boundary is higher. The other two boundaries are adiabatic ones. In calculation, Pr (Prandtl number) is taken as 0.71 and Ra (Rayleigh number) is taken as 10^{6}.

#### 3. Numerical Method

Considering that the calculation approach is influential to the calculation, in order to compare the difference of calculation performances between FVM and FDM, this paper adopts both primitive variable method and nonprimitive variable method to solve the governing equations. For primitive variable method, MAC algorithm is adopted, and for nonprimitive variable method, the generally used vorticity-stream function algorithm is adopted. The conservation property generally refers to the convection term, and thus only the difference of convective term between conservative and nonconservative forms is compared. MAC method is characterized by the direct solving of velocity and pressure. The key point of this method is to obtain a nondivergent velocity field in every time step or iteration step. That is, the velocity field of every time layer or iteration layer should satisfy the continuity equation and pressure, and the velocity is decoupled by solving Poisson equation which is relevant to pressure.

##### 3.1. Governing Equation

In primitive variable method, pressure and velocity are directly used as variables to solve the equations. As to the incompressible fluid, the dimensionless unsteady-state conservative and nonconservative equations can be written as respectively,
where the values of , , and for lid-driven flow and natural convection flow are shown in Table 1 and Table 2, respectively. From (1) and (2) we can see that the convection term of conservative equation is given in the form of divergence while that in nonconservative equation is not, where the nondimensional excessive temperature can be described as and *U, V *are defined as nondimensional velocities in separate directions (*X* direction or *Y* direction). Governing equations of conservative and nonconservative equations of primitive variable method are given before. In the calculation process, MAC algorithm is adopted to obtain the result in steady state by unsteady calculation over enough time. The result of steady state is analyzed as follows from the angle of primitive variable method. Taking the vorticity-stream function method as example, the governing equations of conservative form and nonconservative form can be written as respectively,
As to the vorticity-stream function method, only the lid-driven flow is studied in this paper. Values of , , , and are shown in Table 3. where “” stands for vorticity and “” stands for stream function.

##### 3.2. Discretization of Equations

Uniform mesh is adopted in this paper. In order to compare the calculation performances of FVM and FDM with variant discretized schemes, central difference and second-order upwind scheme are adopted. As to FVM, taking *e* interface on *X *direction as example, the expressions can be written as,

where “*e*” stands for the east interface between two nodes; “*E*” stands for east node and “*W*” means west node; and “” can be defined as the east node of “*E*” node.

As to FDM, taking node as example, the expressions can be written as

##### 3.3. Treatment of the Boundary Condition of Vorticity

Since the influence from boundary condition of vorticity on the solution of equations is significant, in this section, the calculation performances of FVM and FDM with variant treatments of the boundary condition for vorticity are studied.

Three boundary conditions of vorticity are compared and studied. In the boundary as shown in Figure 2, their expressions, Thom equations [20], Woods equation [21], and Jenson equation [22], as well as corresponding accuracy are shown in (9)–(11);

Thom equation:

Woods equation:

Jenson equation:

##### 3.4. Deferred Correction

When MAC is adopted, momentum and energy equations are both solved in explicit scheme while in vorticity-stream function method, the convection term is treated in implicit scheme by deferred correction, which can guarantee the main-diagonal domination of the solving matrix and thus guarantee the calculation stability. As to FVM, taking as example, the expressions of deferred correction are as follows: where “*” in these equations stands for the former calculation step.

As to FDM, similarly to the treatment of in FVM, the deferred correction for node can be written as the sum of first-order upwind gradient and correction gradient which is shown as follows: The first terms in the right side of (12)–(14) are all first-order upwind term. The second terms are incorporated into the source term as the form of correction term. The discretized equation is solved by G-S solver with underrelaxation, of which the discrete expression is shown as (15) and the discretized equations of FVM and FDM are shown in (16a), (16b), (17a), and (17b), respectively:

where , , , , and are coefficients in discretized equations and is the source term in discretized equations.

#### 4. Results Comparison and Analysis

In this section, the accuracy, stability of convection term, robustness and calculation efficiency of variant algorithms, schemes, and treatments of boundary condition which have been discussed previously are systemically compared and analyzed based on the calculation results of lid-driven flow and natural convection flow in a square cavity.

##### 4.1. Accuracy

Firstly, the accuracy of FVM and FDM is evaluated by comparing bench mark solution with the results obtained from variant mesh density, discrete schemes, and boundary conditions. Through precision analysis, FVM and FDM are, respectively, adopted with the Taylor expansion commenced at midpoint (*P* node), and their respective truncation error (TE) is just as shown Table 4 [19]. The truncation errors of FVM are obviously less than the FDM’s.

###### 4.1.1. Influence of Mesh Density

In [4], it is indicated that the conservative property can affect the accuracy while the nonconservative FDM loses its conservative property in the situation when the grid is too small. To make further analysis, the calculation results obtained by FVM and FDM with variant mesh densities are compared. The results of the velocity along the horizontal central axis *V* and velocity along the vertical central axis *U* obtained by FDM and FVM with central difference scheme of MAC algorithm are compared and illustrated in Figure 3.

From Figure 3 we can see that, when the mesh density is taken as 80 × 80, the results obtained by FVM and FDM both agree well with the benchmark solution. When the mesh density is reduced to 40 × 40, the results obtained by FVM are closer to the benchmark solution and if the mesh density is further reduced to 20 × 20, the results obtained by FDM differ from the benchmark solution greatly, in which FVM shows its advantage in accuracy. This phenomenon is in good agreement with the theoretical analysis in [18]; that is, the conservative property of FVM better ensures the accuracy of calculation. Therefore, whether the conservative property can be realized is of much significance to the accuracy of the obtained result.

###### 4.1.2. Influence of Boundary Condition

In the following section, FVM and FDM with variant boundary conditions are compared from the perspective of accuracy by vorticity-stream function method. The results of the velocity along the horizontal central axis *V* and velocity along the vertical central axis *U* obtained by FDM and FVM with central difference scheme are compared and illustrated in Figure 4, and the influence of boundary condition of vorticity is also given. From Figure 4 we can see that no matter which treatment of boundary condition is adopted the accuracy of FVM is higher than that of FDM in vorticity-stream function method.

###### 4.1.3. Influence of Discrete Scheme

The selection of discrete forms is also influential to the accuracy. Thus the results obtained with variant discrete forms are studied. Taking the vorticity-stream function with boundary condition treated by first-order Thom equation as example, the results of the velocity along the horizontal central axis *V* and velocity along the vertical central axis *U* obtained by FDM and FVM with variant discrete schemes are compared and illustrated in Figure 5, from which we can see that, whether second-order central difference or second-order upwind scheme is adopted, the accuracy of FVM is higher than that of FDM, the comparison between (a) and (b) indicates that second-order upwind difference possesses higher accuracy than second-order central difference.

###### 4.1.4. Influence of Physical Problem

Finally, two methods in variant physical problems are compared from the perspective of accuracy based on the convection flow in a square cavity. Taking the result obtained by MAC algorithm as example, Figure 6 shows the comparison of results of the velocity along the horizontal central axis *V* and velocity along the vertical central axis *U* obtained by FDM and FVM. Temperature fields obtained by FVM and FDM are compared with the grid-independent solution (obtained with grid of 256 × 256) as Figure 7 shows.

From the comparison in Figure 6 and Figure 7 we can see that, based on the results obtained by MAC of natural convection flow in a square cavity, the accuracy of FVM is generally superior to that of FDM. Thus, it is indicated by comparison that, no matter which mesh density, scheme, and treatment of boundary condition is adopted, FVM shows better accuracy than FDM.

##### 4.2. Stability of Convection Term

Stability of mathematical meaning can only ensure that the oscillation of solution is controlled within a range but cannot eliminate the absence of oscillation. The amplification of oscillation may result in divergence. Stability of convection term originates from varied difference schemes for convective item and is independent of the introducing of rounding error in the calculation. This stability is the key point to obtain a solution with physical meaning. It is concluded that all the unstable schemes will result in the oscillation of solution. Stability condition of the convection item (Mesh Peclet number) is affected by the following factors such as mesh density and boundary condition. Taking lid-driven flow as example, the stability of convection term of FVM and FDM with variant mesh densities treatments of boundary condition is compared.

###### 4.2.1. Influence of Mesh Density

Figure 8 shows the comparison of stream lines between FVM and FDM with variant mesh densities. With the grid of 40 × 40, the two methods both can capture the structure of primary vortex and secondary vortex as Figure 8(a) shows. It is seen in Figure 8(b) that, when the mesh of 20 × 20 is adopted, concussion phenomenon appears, which is more serious in FDM, and the location of the vortex center obviously moves upward.

###### 4.2.2. Influence of Boundary Condition

Similarly to the accuracy analysis, the results obtained by variant treatments for vorticity of wall boundary are compared as Figure 9 shows. Three treatments, Thom, Woods, and Jenson, are analyzed. From Figure 9 we can see that, only when Jenson equation is adopted, the results obtained by FVM and FDM are relatively close, while when Thom and Woods are adopted, FVM shows better results than FDM. The results obtained by FDM suffer severe oscillation and even lack physical meaning. It is clear that, based on the lid-driven flow, stability of convection term of FVM is superior to that of FDM. The influence from the same boundary error (truncation error and rounding error) on difference solving methods is illustrated in Figure 9. With the treatment of boundary condition with the same truncation error or rounding error, the stability of FVM is better than that of FDM, especially in the situation with boundary treatment of (a) and (b) with relatively low precision truncation error; FDM is very unstable and very easy to slip into oscillation.

##### 4.3. Robustness

Robustness is a very critical index to evaluate the numerical approaches. In this section, the robustness of FVM and FDM is compared based on the lid-driven flow problem, which is solved by vorticity-stream function. Grids of 20 × 20, 40 × 40, and 80 × 80 are adopted, respectively, in the calculation. Relaxation factor is tentatively taken up from 0.2 to the maximum which can ensure the convergence of calculation. Iterations are correspondingly recorded as well.

It is shown in Figure 10 when the whether the central difference scheme or second-order upwind scheme is adopted, with the refining of calculation grids, the maximum relaxation factor () increases in both FVM and FDM, the robustness is enhanced, and the iterations (Niter) correspondingly decrease as well.

As Figure 10(a) shows, in the situation that central difference scheme is adopted, with the grid of 20 × 20 and 40 × 40, the maximum relaxation factor of FVM is bigger than that of FVM while with the grid of 80 × 80, the relaxation factor can be taken as 1.0 in both methods. Similarly, as Figure 10(b) shows, generally speaking, when second-order upwind difference scheme is adopted, the maximum relaxation factor is bigger than that of FDM. Based on the result of lid-driven flow, the conservative FVM is superior to the nonconservative FDM from the perspective of numerical robustness.

In the numerical simulation of complex flow field, calculation efficiency is another critical index, on which this paper makes analysis. From Figure 10 we can see that, with the increasing of relaxation factor, the iterations of two methods both decrease generally. What needs to be notified is that the iterations of FVM are smaller than those of FDM.

##### 4.4. Efficiency

In the numerical simulation of complex flow field, calculation efficiency is another critical index, on which this paper makes analysis.

As is shown in Table 5, although the calculation time required by every iteration step in FVM and FDM is almost the same, with the increasing of mesh numbers, calculation time required by FVM slightly decreases. Thus, total calculation time of FVM is much smaller than that of FDM. That is, FVM is much more efficient that FDM. Thus, it is validated that the efficiency of FVM is better than that of FDM in the same calculation condition.

#### 5. Conclusions

Based on vorticity-stream function and MAC algorithm, lid-driven flow and natural convection in a square cavity are calculated. The accuracy, stability of convective term, robustness of FVM and FDM with variant mesh densities, discrete forms, and treatments of boundary condition are compared. The following conclusions are drawn.(1)No matter which algorithm, discrete form, or treatment of boundary condition is adopted, the results obtained by conservative FVM are closer to benchmark solution than those obtained by FDM. The accuracy of FVM is higher than FDM, especially when the mesh density is relatively small.(2)The results of lid-driven flow indicate that the results obtained by FDM show more serious oscillation and the results obtained even lose physical meaning. Thus, the stability of convection term of FVM is superior than that of FDM.(3)As to the lid-driven flow, it is indicated that, when vorticity-stream function method is adopted, the relaxation factor of conservative method is bigger than that of the nonconservative one while the iterations are less, which shows that the robustness and calculation efficiency of conservative method are better than those of the nonconservative method.(4)In the lid-driven flow, with vorticity-stream function method, the calculation time required by every iteration step of FVM is slightly smaller than that of FDM. Together with the smaller total iteration steps, FVM is more efficient than FDM.

#### Acknowledgment

The study is supported by the National Science Foundation of China (nos. 51134006, 51176204, and 51276198).

#### References

- J. D. Anderson Jr.,
*Computational Fluid Dynamics: The Basics With Applications*, McGraw-Hill, 1995. - P. J. Roache,
*Computational Fluid Dynamics*, Hermosa, 1976. View at MathSciNet - W. Q. Tao,
*Heat Transfer*, Science Press, 2001. - W. Q. Tao,
*Advances in Computational Heat Transfer*, Science Press, 2000. - Y. Jaluria and K. E. Torrance,
*Computational Heat Transfer*, Hemisphere Publishing Corporation, 1986. - P. D. Lax, “Weak solutions of nonlinear hyperbolic equations and their numerical computation,”
*Communications on Pure and Applied Mathematics*, vol. 7, pp. 159–193, 1954. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet - P. Lax and B. Wendroff, “Systems of conservation laws,”
*Communications on Pure and Applied Mathematics*, vol. 13, no. 2, pp. 217–237, 1960. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet - A. Jameson, “Transonic potential flow calculations using conservation form,” in
*Proceedings of the Computational fluid dynamics conference*, pp. 148–161, Hartford, Conn, USA, 1975. - M. Vinokur, “Conservation equations of gasdynamics in curvilinear coordinate systems,”
*Journal of Computational Physics*, vol. 14, pp. 105–125, 1974. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet - T. J. Bridges, “Conservation laws in curvilinear coordinates: a short proof of Vinokur's theorem using differential forms,”
*Applied Mathematics and Computation*, vol. 202, no. 2, pp. 882–885, 2008. View at Publisher · View at Google Scholar · View at MathSciNet - R. J. DiPerna, “Decay of solutions of hyperbolic systems of conservation laws with a convex extension,”
*Archive for Rational Mechanics and Analysis*, vol. 64, no. 1, pp. 1–46, 1977. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet - A. Bressan, “Hyperbolic systems of conservation laws,”
*Revista Matemática Complutense*, vol. 12, no. 1, pp. 135–198, 1999. View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet - R. K. S. Hankin, “The Euler equations for multiphase compressible flow in conservation form-Simulation of shock-bubble interactions,”
*Journal of Computational Physics*, vol. 172, no. 2, pp. 808–826, 2001. View at Google Scholar - C. Lai, R. A. Baltzer, and R. W. Schaffranek, “Conservation-form equations of unsteady open-channel flow,”
*Journal of Hydraulic Research*, vol. 40, no. 5, pp. 567–578, 2002. View at Google Scholar - L. M. Gao, K. T. Li, B. Liu, and J. Su, “General integral conservation form of Navier-Stokes equations and numerical application,”
*Chinese Journal of Computational Physics*, vol. 25, no. 2, pp. 172–178, 2008. View at Google Scholar - S. Patankar,
*Numerical Heat Transfer and Fluid Flow*, Hemisphere Publishing, 1980. - A. West and T. Fuller, “Influence of rib spacing in proton-exchange membrane electrode assemblies,”
*Journal of Applied Electrochemistry*, vol. 26, no. 6, pp. 557–565, 1996. View at Google Scholar - B. P. Leonard, “Comparison of truncation error of finite-difference and finite-volume formulations of convection terms,”
*Applied Mathematical Modelling*, vol. 18, no. 1, pp. 46–50, 1994. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet - G. G. Botte, J. A. Ritter, and R. E. White, “Comparison of finite difference and control volume methods for solving differential equations,”
*Computers and Chemical Engineering*, vol. 24, no. 12, pp. 2633–2654, 2000. View at Google Scholar - A. Thom, “The flow past cylinders at low speeds,”
*Proceedings of the Royal Society A*, vol. 141, pp. 651–659, 1993. View at Google Scholar - L. C. Woods, “A note on the numerical solution of fourth order differential equations,” vol. 5, pp. 176–182, 1954. View at Google Scholar · View at MathSciNet
- V. G. Jenson, “Viscous flow round a sphere at low Reynolds numbers (Re LTHEXA 40),”
*Proceedings of the Royal Society A*, vol. 249, pp. 346–366, 1959. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet