Skip to main content

A Comparison Between FEM and FVM via the Method of Weighted Residuals

  • Chapter
  • First Online:
50 Years of CFD in Engineering Sciences

Abstract

The Method of Weighted Residuals (MWR) is used to compare the finite element method (FEM) with the finite volume method (FVM) through nodal recursion relations. Both methods reside under the general MWR structure, with the underlying switch between the two methods established through the weighting function. Both methods yield comparable spatial accuracy for steady-state conditions. However, the flexibility of the FEM permits additional options that can increase accuracy, but generally at the expense of additional time and resource constraints.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 149.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 199.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 199.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Zienkiewicz, O. C., & Taylor, R. L. (1989). The finite element method. Basic Formulation and Linear Problems, 4th Ed., McGraw-Hill, London, UK.

    Google Scholar 

  2. Patankar, S. V. (1980). Numerical heat transfer and fluid flow. Hemisphere, NY.

    Google Scholar 

  3. Gosman, A. D., Pun, W. M., Runchal, A. K., Spalding, D. B., & Wolfshtein, M. (1969). Heat and mass transfer in recirculating flows. London: Academic Press.

    MATH  Google Scholar 

  4. Ansys Fluent (2019). Ansys Inc., Canonsburg, PA.

    Google Scholar 

  5. Argyris, J. H. (1954). Recent advances in matrix methods of structural analysis. Pergamon Press, Elmsford, NY.

    Google Scholar 

  6. Turner, M., Clough, R. W., Martin, H., & Topp, L. (1956). Stiffness and deflection of complex structures. Journal of Aerosol Science, 23, 805–823.

    Google Scholar 

  7. Clough, R. W. (1960). The finite element method in plane stress analysis. In Proceedings of the 2nd Conference on Electronic Computation, ASCE, Pittsburgh, PA (pp. 345–378).

    Google Scholar 

  8. Patran 2019 Installation and Operations Guide, 2019, MSC Software Corporation, Newport Beach, CA, 132 p.

    Google Scholar 

  9. Ansys 19.2, 2019, Ansys Inc., Canonsburg, PA.

    Google Scholar 

  10. COMSOL 5.4, 2019, User’s Manual, COMSOL, Inc., Burlington, MA.

    Google Scholar 

  11. Pepper, D. W., Kassab, A. J., & Divo, E. A. (2014). Introduction to finite element, boundary element, and meshless methods, ASME Press, NY.

    Google Scholar 

  12. Roache, P. J. (1998). Fundamentals of computational fluid dynamics. Albuquerque, New Mexico: Hermosa Press.

    Google Scholar 

  13. Fletcher, C. A. J. (1991). Computational techniques for fluid dynamics, Vol. I and II, Springer, New York.

    Google Scholar 

  14. Finlayson, B. A. (1972). The method of weighted residuals and variational principles. New York: Academic Press.

    MATH  Google Scholar 

  15. Pepper, D., & Heinrich, J. (2017). The finite element method: basic concepts and applications with MATLAB, Maple, and COMSOL (3rd ed.). Boca Raton, FL: CRC Press.

    Book  Google Scholar 

  16. Gottlieb, D., & Orzag, S. A. (1977). Numerical analysis of spectral methods: theory and applications. Bristol, England: Society for Industrial and Applied Mathematics.

    Book  Google Scholar 

  17. Maday, Y., & Quateroni, A. (1982). Spectral and pseudo-spectral approximations of the Navier–Stokes equations. SIAM Journal of Numerical Analysis, 19(4), 761–780.

    Article  Google Scholar 

  18. Gray, W. G., & Pinder, G. F. (1976). On the relationship between the finite element and finite difference methods. International Journal for Numerical Methods in Engineering, 10, 893–923.

    Article  MathSciNet  Google Scholar 

  19. Pepper, D. W., & Baker, A. J. (1979). A simple one-dimensional finite element algorithm with multidimensional capabilities. Numerical Heat Transfer, 2, 81–95.

    Article  Google Scholar 

  20. Pirbastami, S., & Pepper, D. W. (2018). Two-dimensional chapeau function recursion relations, WCCM XIII, July 22–27, NY.

    Google Scholar 

  21. Harlow, F. H., & Amsden, A. A. (1971). Fluid Dynamics, A LASL Monograph, LA-4700, June 1971.

    Google Scholar 

  22. Schneider, G. E., & Zedan, M. (1981). A modified strongly implicit procedure for the numerical solution of field problems. Numerical Heat Transfer, 4, 1–19.

    Article  Google Scholar 

  23. Idelsohn, S. R., & Onate, E. (1994). Finite volumes and finite elements: two ‘Good Friends’. International Journal for Numerical Methods in Engineering, 37, 3323–3341.

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Darrell W. Pepper .

Editor information

Editors and Affiliations

Appendix

Appendix

1D FEM Formulation with Advection

For simplicity, we define \(\phi (x,t)\) as a 1D scalar transport variable. Linear shape functions are used for two consecutive adjacent linear elements. After assembly (creating a 3 × 3 global matrix), the recursion relation for the ith node can be established.

Setting W(x) = N(x) and using the integral relation for the 1D element spanning nodes i-1 to i, the governing equation for time-dependent transport and diffusion,

$$\frac{\partial \phi }{\partial t} + U\frac{\partial \phi }{\partial x} - K\frac{{\partial^{2} \phi }}{{\partial x^{2} }} = 0$$

can be written numerically as

$$\int {N_{i} } N_{i - 1} dx\left\{ {\begin{array}{*{20}c} {\dot{\phi }_{i - 1} } \\ {\dot{\phi }_{i} } \\ \end{array} } \right\} + \int {UN_{j} N_{i} } \frac{{dN_{i - 1} }}{dx}dx\left\{ {\begin{array}{*{20}c} {\phi_{i - 1} } \\ {\phi_{i} } \\ \end{array} } \right\} + K\int {\frac{{dN_{i} }}{dx}\frac{{dN_{i - 1} }}{dx}} dx\left\{ {\begin{array}{*{20}c} {\phi_{i - 1} } \\ {\phi_{i} } \\ \end{array} } \right\} = 0$$
(33)

where \(\dot{\phi }(x,t)\) denotes time dependence and U(x) is velocity. The integral terms are similarly evaluated for elements spanning i to i + 1. Thus, for the two adjacent linear elements,

For \(\Delta x_{ - } = x_{i} - x_{i - 1}\)

$$\frac{{\Delta x_{ - } }}{6}\left[ {\begin{array}{*{20}c} 2 & 1 \\ 1 & 2 \\ \end{array} } \right]\left\{ {\begin{array}{*{20}c} {\dot{\phi }_{i - 1} } \\ {\dot{\phi }_{i} } \\ \end{array} } \right\} - \frac{U}{2}\left[ {\begin{array}{*{20}c} { - 1} & 1 \\ { - 1} & 1 \\ \end{array} } \right]\left\{ {\begin{array}{*{20}c} {\phi_{i - 1} } \\ {\phi_{i} } \\ \end{array} } \right\} - \frac{K}{{\Delta x_{ - } }}\left[ {\begin{array}{*{20}c} 1 & { - 1} \\ { - 1} & 1 \\ \end{array} } \right]\left\{ {\begin{array}{*{20}c} {\phi_{i - 1} } \\ {\phi_{i} } \\ \end{array} } \right\} = 0$$
(34)

For \(\Delta x_{ + } = x_{i + 1} - x_{i}\)

$$\frac{{\Delta x_{ + } }}{6}\left[ {\begin{array}{*{20}c} 2 & 1 \\ 1 & 2 \\ \end{array} } \right]\left\{ {\begin{array}{*{20}c} {\dot{\phi }_{i} } \\ {\dot{\phi }_{i + 1} } \\ \end{array} } \right\} - \frac{U}{2}\left[ {\begin{array}{*{20}c} { - 1} & 1 \\ { - 1} & 1 \\ \end{array} } \right]\left\{ {\begin{array}{*{20}c} {\phi_{i} } \\ {\phi_{i + 1} } \\ \end{array} } \right\} - \frac{K}{{\Delta x_{ + } }}\left[ {\begin{array}{*{20}c} 1 & { - 1} \\ { - 1} & 1 \\ \end{array} } \right]\left\{ {\begin{array}{*{20}c} {\phi_{i} } \\ {\phi_{i + 1} } \\ \end{array} } \right\} = 0$$
(35)

For simplicity, the velocity is assumed constant. The use of hypermatrix formulation is needed to deal with variable velocity—more details are described in [19].

Assembling the two adjacent elements into a 3 × 3 global matrix,

$$\begin{aligned} \frac{1}{6}\left[ {\begin{array}{*{20}c} {2\Delta x_{ - } } & {\Delta x_{ - } } & 0 \\ {\Delta x_{ - } } & {2\Delta x_{ - } + 2\Delta x_{ + } } & {\Delta x_{ + } } \\ 0 & {\Delta x_{ + } } & {2\Delta x_{ + } } \\ \end{array} } \right]\left\{ {\begin{array}{*{20}c} {\dot{\phi }_{i - 1} } \\ {\dot{\phi }_{i} } \\ {\dot{\phi }_{i + 1} } \\ \end{array} } \right\} + \frac{U}{2}\left[ {\begin{array}{*{20}c} { - 1} & 1 & 0 \\ { - 1} & 0 & 1 \\ 0 & { - 1} & 1 \\ \end{array} } \right]\left\{ {\begin{array}{*{20}c} {\phi_{i - 1} } \\ {\phi_{i} } \\ {\phi_{i + 1} } \\ \end{array} } \right\} \hfill \\ + \frac{K}{6}\left[ {\begin{array}{*{20}c} {\frac{1}{{\Delta x_{ - } }}} & {\frac{ - 1}{{\Delta x_{ - } }}} & 0 \\ {\frac{ - 1}{{\Delta x_{ - } }}} & {\frac{1}{{\Delta x_{ - } }} + \frac{1}{{\Delta x_{ + } }}} & {\frac{ - 1}{{\Delta x_{ + } }}} \\ 0 & {\frac{ - 1}{{\Delta x_{ + } }}} & {\frac{1}{{\Delta x_{ + } }}} \\ \end{array} } \right]\left\{ {\begin{array}{*{20}c} {\phi_{i - 1} } \\ {\phi_{i} } \\ {\phi_{i + 1} } \\ \end{array} } \right\} = 0 \hfill \\ \end{aligned}$$
(36)

Setting Δx- = Δx+ = Δx, the recursion relation in 1D is obtained by stripping out the central expression within the global matrix, i.e.,

$$\frac{1}{6}\left( {\dot{\phi }_{i - 1} + 4\dot{\phi }_{i} + \dot{\phi }_{i + 1} } \right) + \frac{U}{2\Delta x}(\phi_{i + 1} - \phi_{i - 1} ) - \frac{K}{{\Delta x^{2} }}(\phi_{i + 1} - 2\phi_{i} + \phi_{i - 1} ) = 0$$
(37)

which appears similar to the central difference FDM (or FVM). The improved accuracy of the FEM lies in the time-dependent terms, \(\dot{\phi }\). When employing Crank–Nicolson time averaging, Eq. (37) yields O(Δx4) versus O(Δx2) in space.

2D FEM Formulation with Advection

The general transport equation in 2D can be discretized using either 2D triangular elements or quadrilateral elements and then assembled over eight triangular elements, four quadrilateral elements, or one quadratic Lagrangian quadrilateral element, consecutively, to establish a set of recursion relations. The resulting set of recursion relations can then be solved using the Strongly Implicit Procedure (SIP), or with a Modified SIP [20, 22]. A more detailed discussion on the formulation of FEM and FVM methods that includes advection and upwinding is provided in Idelsohn and Onate [23].

The matrix equivalent equation of the transport relation (assume \(\phi (x,y) \equiv T(x,y)\) for simplicity) can be written as

$$[M]\left\{ {\dot{T}} \right\} + [A]\left\{ T \right\} - [K]\left\{ T \right\} = 0$$
(38)

where [M] is the mass matrix, [A(V)] is the advection matrix, and [K] is the diffusion matrix

$$[M] = \iint {N_{i} }N_{j} dxdy$$
(39)
$$[A(V(u,v))] = \iint {\left( {u \cdot N_{i} N_{j} \frac{{\partial N_{k} }}{\partial x} + v \cdot N_{i} N_{j} \frac{{\partial N_{k} }}{\partial y}} \right)dxdy}$$
(40)
$$[K] = \iint {K\left( {\frac{{\partial N_{i} }}{\partial x}\frac{{\partial N_{j} }}{\partial x} + \frac{{\partial N_{i} }}{\partial y}\frac{{\partial N_{j} }}{\partial y}} \right)}dxdy$$
(41)

where the i, j, k indices denote row and column vectors [20]. After establishing the global matrices for a patch consisting of 8 bilinear triangular elements, 4 bilinear quadrilateral elements, and one Lagrangian quadratic quadrilateral element, a set of recursion relations for the Ti, j node can be established.

2D BASIS Functions

Bilinear triangular and quadratic elements are used for the 2D trial functions [19, 20]. The general 2D bilinear element configurations are shown in Figs. 11 and 12. Notice that the triangular element array permits either a 9-node configuration or a 5-node configuration.

Fig. 11
figure 11

Basis function-triangular element

Fig. 12
figure 12

Basis function-quadrilateral element

The set of finite element expressions, defined over a rectangular subspace and formulated using chapeau basis functions, can be interpreted as integrated averaged difference approximations. After applying Galerkin’s method, integrating by parts, and using isoparametric transformations, we obtain the equations as follows:

2D bilinear triangular elements:

$$\begin{aligned} & \frac{1}{36}\left[ {\left( {3\left( {\dot{T}_{i + 1,j + 1} + \dot{T}_{i - 1,j - 1} + \dot{T}_{i + 1,j} + \dot{T}_{i - 1,j} + \dot{T}_{i,j + 1} + \dot{T}_{i,j - 1} } \right) + 18\dot{T}_{i,j} } \right)} \right] \\ & \quad + \frac{K}{{\Delta x^{2} }}\left[ {T_{i - 1,j} - 2T_{i,j} + T_{i + 1,j} } \right] + \frac{K}{{\Delta y^{2} }}\left[ {T_{i,j + 1} - 2T_{i,j} + T_{i,j - 1} } \right] \\ & \quad + \frac{u}{6\Delta x}\left[ { + T_{i,j + 1} - 2T_{i + 1,j} + 2T_{i - 1,j} - T_{i,j - 1} } \right] \\ & \quad + \frac{v}{6\Delta y}\left[ {T_{i - 1,j} - T_{i - 1,j - 1} + 2T_{i,j + 1} - 2T_{i,j - 1} + T_{i + 1,j + 1} - T_{i + 1,j} } \right] = 0 \\ \end{aligned}$$
(42)

2D bilinear quadrilateral elements:

$$\begin{aligned} & \frac{1}{9}\left[ {\left( \begin{aligned} \left( {\dot{T}_{i - 1,j + 1} + \dot{T}_{i + 1,j + 1} + \dot{T}_{i - 1,j - 1} + \dot{T}_{i + 1,j - 1} } \right) \hfill \\ + 4\left( {\dot{T}_{i - 1,j} + \dot{T}_{i + 1,j} + \dot{T}_{i,j + 1} + \dot{T}_{i,j - 1} } \right) + 16\dot{T}_{i,j} \hfill \\ \end{aligned} \right)} \right] \\ & \quad + \frac{K}{{6\Delta x^{2} }}\left[ \begin{aligned} - T_{i - 1,j + 1} - 4T_{i - 1,j} - T_{i - 1,j - 1} + 2T_{i,j + 1} \hfill \\ + 8T_{i,j} + 2T_{i,j - 1} - T_{i + 1,j + 1} - 4T_{i + 1,j} - T_{i + 1,j - 1} \hfill \\ \end{aligned} \right] \\ & \quad + \frac{K}{{6\Delta y^{2} }}\left[ \begin{aligned} - T_{i - 1,j + 1} + 2T_{i - 1,j} - T_{i - 1,j - 1} - 4T_{i,j + 1} \hfill \\ + 8T_{i,j} - 4T_{i,j - 1} - T_{i + 1,j + 1} + 2T_{i + 1,j} - T_{i + 1,j - 1} \hfill \\ \end{aligned} \right] \\ & \quad + \frac{u}{6\Delta x}\left[ \begin{aligned} - T_{i - 1,j + 1} - 4T_{i - 1,j} - T_{i - 1,j - 1} \hfill \\ + T_{i + 1,j + 1} + 4T_{i + 1,j} + T_{i + 1,j - 1} \hfill \\ \end{aligned} \right] \\ & \quad + \frac{v}{6\Delta y}\left[ \begin{aligned} T_{i - 1,j + 1} - T_{i - 1,j - 1} \hfill \\ + 4T_{i,j + 1} - 4T_{i,j - 1} + T_{i + 1,j + 1} - T_{i + 1,j - 1} \hfill \\ \end{aligned} \right] = 0 \\ \end{aligned}$$
(43)

2D Quadratic Lagrangian quadrilateral element:

$$\begin{gathered} \frac{1}{{225}}\left[ {\left( \begin{gathered} 4\left( {\dot{T}_{{i - 1,j + 1}} + \dot{T}_{{i - 1,j - 1}} + \dot{T}_{{i + 1,j + 1}} + \dot{T}_{{i + 1,j - 1}} } \right) \hfill \\ + 32\left( {\dot{T}_{{i - 1,j}} + \dot{T}_{{i,j + 1}} + \dot{T}_{{i,j - 1}} + \dot{T}_{{i + 1,j}} } \right) + 256\dot{T}_{{i,j}} \hfill \\ \end{gathered} \right)} \right] \hfill \\ + \frac{K}{{45\Delta x^{2} }}\left[ \begin{gathered} - 8T_{{i - 1,j + 1}} - 64T_{{i - 1,j}} - 8T_{{i - 1,j - 1}} + 16T_{{i - 1,j}} + 128T_{{i,j}} \hfill \\ + 16T_{{i,j - 1}} - 8T_{{i + 1,j + 1}} - 64T_{{i + 1,j}} - 8T_{{i + 1,j - 1}} \hfill \\ \end{gathered} \right] \hfill \\ + \frac{K}{{45\Delta y^{2} }}\left[ \begin{gathered} - 8T_{{i - 1,j + 1}} + 16T_{{i - 1,j}} - 8T_{{i - 1,j - 1}} - 64T_{{i - 1,j}} \hfill \\ + 128T_{{i,j}} - 64T_{{i,j - 1}} - 8T_{{i + 1,j + 1}} + 16T_{{i + 1,j}} - 8T_{{i + 1,j - 1}} \hfill \\ \end{gathered} \right] \hfill \\ + \frac{u}{{45\Delta x}}\left[ \begin{gathered} - 4T_{{i - 1,j + 1}} - 32T_{{i - 1,j}} - 4T_{{i - 1,j - 1}} \hfill \\ + 4T_{{i + 1,j + 1}} + 32T_{{i + 1,j}} + 4T_{{i + 1,j - 1}} \hfill \\ \end{gathered} \right] \hfill \\ + \frac{V}{{45\Delta y}}\left[ \begin{gathered} 4T_{{i - 1,j + 1}} - 4T_{{i - 1,j - 1}} + 32T_{{i - 1,j}} \hfill \\ - 32T_{{i,j - 1}} + 4T_{{i + 1,j + 1}} - 4T_{{i + 1,j - 1}} \hfill \\ \end{gathered} \right] = 0 \hfill \\ \end{gathered}$$
(44)

Rights and permissions

Reprints and permissions

Copyright information

© 2020 Springer Nature Singapore Pte Ltd.

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Pepper, D.W., Pirbastami, S., Carrington, D.B. (2020). A Comparison Between FEM and FVM via the Method of Weighted Residuals. In: Runchal, A. (eds) 50 Years of CFD in Engineering Sciences. Springer, Singapore. https://doi.org/10.1007/978-981-15-2670-1_21

Download citation

  • DOI: https://doi.org/10.1007/978-981-15-2670-1_21

  • Published:

  • Publisher Name: Springer, Singapore

  • Print ISBN: 978-981-15-2669-5

  • Online ISBN: 978-981-15-2670-1

  • eBook Packages: EngineeringEngineering (R0)

Publish with us

Policies and ethics