Introduction
Background
The finite element method (FEM) is a numerical approach used to obtain approximate solutions for differential equations related to various physics and engineering problems Similar to basic finite difference methods, FEM necessitates that the problem be defined within a geometric space or domain, which is then divided into a finite number of smaller regions, known as a mesh.
Finite difference methods traditionally utilized a structured mesh of orthogonal lines, whereas finite element methods allow for unique subdivisions that need not be orthogonal, employing shapes like triangles and quadrilaterals in two dimensions, and tetrahedra and hexahedra in three dimensions In finite element analysis, unknown variables such as temperature and velocity are approximated using known functions, which can be linear or higher-order polynomials based on the geometrical nodes defining the element shape Unlike conventional finite difference methods, the governing equations in finite element methods are integrated over each element, with contributions assembled across the entire problem domain This integration process results in a set of finite linear equations representing the unknown parameters, which are solved using linear algebra techniques.
Short History
The finite element method, developed in the mid-1950s, has an intriguing history rooted in early numerical solutions for boundary-valued problems Initial approaches relied on finite difference schemes, as highlighted by Southwell in his 1946 publication The evolution of the finite element method emerged from these foundational numerical techniques, driven by the challenges faced in applying finite difference methods to complex, geometrically irregular problems, as noted by Roache in 1972.
In the mid-1950s, the introduction of small, discrete elements to address continuum problems in elasticity marked a significant advancement in engineering Pioneering work by Argyris in 1954 and Turner et al in 1956 showcased these techniques in the aircraft industry The term "finite element" was officially coined in a 1960 paper by Clough, solidifying its importance in the field.
The finite element method was initially utilized for structurally related issues, but its versatility and strong mathematical foundation soon led to applications in nonstructural fields Pioneers like Zienkiewicz and Cheung (1965) applied this method to field problems such as heat conduction and irrotational fluid flow, focusing on solutions to Laplace and Poisson equations Oden (1972) contributed significantly to the study of nonlinear problems, while Huebner (1975) explored modeling heat transfer with complex boundaries Additionally, Heuser (1972) presented a comprehensive three-dimensional finite element model for heat conduction, and Baker (1971) documented early applications of the technique to viscous fluid flow.
Since the mid-1970s, the usage of the method has experienced significant growth, leading to the publication of numerous articles and texts that regularly introduce new applications Comprehensive reviews and descriptions of the method can be found in earlier works by notable authors such as Finlayson (1972), Desai (1979), Becker et al (1981), Baker (1983), Fletcher (1984), Reddy (1984), Segerlind (1984), and Bickford.
The finite element method has been extensively discussed in various works, including a thorough mathematical analysis by Johnson (1987) and programming insights by Smith (1982) Additionally, Owen and Hinton (1980) provide a concise overview of the method's development, while Zienkiewicz and Taylor (1989) contribute to the foundational literature on the topic.
The underlying mathematical basis of the finite element method first lies with the classical Rayleigh–Ritz and variational calculus procedures introduced by Rayleigh
The finite element method, established by foundational theories in 1877 and 1909, effectively addresses problems with variational statements, such as linear diffusion issues However, as the application of this method broadened to encompass a wider range of problems, particularly in fluid dynamics, the limitations of classical theory became apparent, highlighting the need for more adaptable approaches.
Extension of the mathematical basis to nonlinear and nonstructural problems was achieved through the method of weighted residuals, originally conceived by Galerkin
In the early 20th century, specifically in 1915, the method of weighted residuals emerged as a superior theoretical framework for addressing a broader range of problems compared to the Rayleigh–Ritz method This approach involves multiplying the governing differential equation by a predetermined set of weights and integrating the resulting product over space, ensuring that this integral equals zero Notably, Galerkin's method is a specific application of the weighted residuals technique, where the weights correspond to the functions defining the unknown variables.
Galerkin and Rayleigh–Ritz approximations produce the same outcomes when a suitable variational statement is applied and identical basis functions are utilized The finite volume technique arises from the weighted residual method, which employs constant weights instead of functions For a comprehensive understanding of the weighted residuals method, refer to Finlayson (1972), with more recent analyses provided by Chandrupatla and Belegundu (2002), Liu and Quek (2003), Hollig (2003), Bohn and Garboczi (2003), Hutton (2004), Solin et al (2004), Reddy (2004), Becker (2004), and Ern and Guermond (2004).
Many finite element method practitioners utilize Galerkin’s method for approximating governing equations, a central theme of this book The method's simplicity and depth prove beneficial as users tackle more complex problems Once the foundational concepts are understood, applying the finite element method becomes a straightforward process.
Orientation
This book serves as an introductory guide to the finite element method, starting with one-dimensional heat transfer for easy comprehension It progresses to two-dimensional and three-dimensional elements, concluding with various applications, including fluid flow Emphasis is placed on developing one-dimensional elements, as all principles and formulations of the finite element method are rooted in this class, making the transition to higher dimensions straightforward.
Each chapter features example problems and exercises that can be manually verified, often yielding exact solutions through inspection or analytical equations By focusing on these examples, readers can clearly understand how to define and organize the necessary initial and boundary condition data for specific problems While the initial examples provide straightforward solutions, subsequent problems require increasingly complex input data.
For complex problems that involve extensive calculations, particularly with matrices, a variety of computer codes can be found online at femcodes.nscee.edu These codes are developed in FORTRAN, providing valuable resources for users needing advanced computational solutions.
The article discusses a collection of 95 computer codes, including simple routines in MATLAB, MATHCAD, and MAPLE, designed for use on WINDOWS-based PCs to illustrate finite element programming These codes aim to assist readers in solving examples and exercises, offering a generic and user-friendly approach that allows for modification and optimization Readers are encouraged to consult the README.DOC file available online for detailed information on the codes and execution procedures Additionally, two more codes are provided, one in C/C++ and the other in JAVA, enabling real-time two-dimensional heat transfer calculations with mesh refinement, along with basic pre- and post-processing capabilities for meshes and results.
The article discusses a collection of self-executing files utilizing COMSOL, a modern finite element software developed by COMSOL Inc Originally designed to operate with MATLAB, COMSOL is user-friendly and adept at addressing a diverse range of problems It effectively solves one-, two-, and three-dimensional challenges in areas such as structural analysis, heat transfer, fluid flow, and electrodynamics, featuring a sophisticated yet accessible mesh generator Additionally, the software supports mesh adaptation, a high-end feature that enables local mesh refinement in regions with steep gradients and significant activity.
Chapter 2 discusses the method of weighted residuals and the mathematical foundation of the Galerkin procedure, essential for the finite element method Chapter 3 introduces the finite element method using one-dimensional elements and lays out the entire framework Chapters 4 to 6 reinforce these concepts through two-dimensional elements, while Chapter 7 covers simple three-dimensional elements, focusing on a single-element heat conduction problem with various boundary conditions, including radiation Chapter 8 explores applications in solid mechanics, emphasizing multiple degrees of freedom with two-dimensional examples Chapter 9 addresses convective transport applications, illustrated by potential flow and species dispersion examples Finally, Chapter 10 introduces viscous fluid flow and the nonlinear equations governing incompressible fluids, highlighting COMSOL's effectiveness in solving fluid flow issues For a more in-depth understanding, Heinrich and Pepper's advanced book (1999) offers additional insights into fluid flow, including a two-dimensional penalty approach code and source listing for incompressible fluid flow.
The finite element method (FEM) has emerged as the standard approach for numerically approximating partial differential equations in structural engineering and is increasingly utilized across various engineering and scientific disciplines Many commercial software solutions, including those for computational fluid dynamics, rely on finite element-based mesh generators This text aims to equip readers with a comprehensive understanding of FEM and its applications.
To effectively apply the finite element method, it is essential to grasp five key pieces of information and knowledge These foundational elements aim to spark interest and encourage further exploration into advanced studies within this field, ultimately contributing to the evolution of cutting-edge techniques and applications.
Since the first edition of this book, the finite element method (FEM) has seen a surge in commercial software options suitable for various applications The advent of generalized mathematical solvers like MATHCAD, MAPLE, and MATLAB, along with COMSOL, has facilitated the training and implementation of FEM Notable developments in FEM using these symbolic systems are detailed in works by Pintur (1998), Portela and Charafi (2002), and Kattan (2003) Additionally, VisualFEA/CBT, a computer-based FEM software developed by Intuition Software in 2002, supports up to 3000 nodes and is capable of performing structural, heat conduction, and seepage analysis on both PCs and Macintosh computers.
Closure
For those interested in finite element methods, several valuable websites offer detailed information and downloadable codes Recommended resources include the National Center for Advanced Computational Mechanics at UNLV, CFD Online's FEM topics page, and the FEM Codes database.
Websites often change their locations and addresses over time, making it challenging to find consistent information A Google search for "finite elements" yields a multitude of results, including numerous sites affiliated with universities and institutions globally.
Argyris, J H (1954) Recent Advances in Matrix Methods of Structural Analysis Elmsford, N.Y.: Pergamon Press.
In the realm of finite element analysis, A J Baker's foundational works, including “A Finite Element Computational Theory for the Mechanics and Thermodynamics of a Viscous Compressible Multi-Species Fluid” (1971) and “Finite Element Computational Fluid Mechanics” (1983), provide critical insights into the mechanics of complex fluid behaviors Additionally, Becker's “An Introductory Guide to Finite Element Analysis” (2004) serves as a comprehensive resource for understanding the principles of this computational method Complementing these contributions, Becker, Carey, and Oden's “Finite Elements: An Introduction, Vol I” (1981) lays the groundwork for further exploration in the field, establishing key concepts essential for both new and experienced practitioners.
Bickford, W B (1990) A First Course in the Finite Element Method Homewood, Ill.: Richard D Irwin. Bohn, R B and Garboczi, E J (2003) User Manual for Finite Element Difference Programs: A Parallel Version of NISTIR 6269, NIST Internal Report 6997.
Chandrupatla, T R and Belegundu, A D (2002) Introduction to Finite Elements in Engineering UpperSaddle River, N.J.: Prentice-Hall.
Clough, R W (1960) “The Finite Element Method in Plane Stress Analysis.” Proc 2nd Conf Electronic
Computations Pittsburgh, Pa.: ASCE, pp 345–378.
Desai, C S (1979) Elementary Finite Element Method Englewood Cliffs, N.J.: Prentice-Hall. Ern, A and Guermond, J.-L (2004) Theory and Practice of Finite Elements New York: Springer-Verlag. FEMLAB 3 (2004) User’s Manual Burlington, Mass.: COMSOL, Inc.
Finlayson, B A (1972) The Method of Weighted Residuals and Variational Principles New York: Academic Press.
Fletcher, C A J (1984) Computational Galerkin Methods New York: Springer-Verlag.
Galerkin, B G (1915) “Series Occurring in Some Problems of Elastic Stability of Rods and Plates.” Eng
Heinrich, J C and Pepper, D W (1999) Intermediate Finite Element Method: Fluid Flow and Heat Transfer
Heuser, J (1972) “Finite Element Method for Thermal Analysis.” NASA Technical Note TN-D-7274. Greenbelt, Md.: Goddard Space Flight Center.
Hollig, K (2003) Finite Elements with B-Splines Philadelphia: Society of Industrial and Applied Math- ematics.
Huebner, K H (1975) Finite Element Method for Engineers New York: John Wiley & Sons. Hutton, D V (2004) Fundamentals of Finite Element Analysis Boston: McGraw-Hill.
Intuition Software (2002) VisualFEA/CBT, ver 1.0 New York: John Wiley & Sons.
Johnson, C (1987) Numerical Solution of Partial Differential Equations by the Finite Element Method. Cambridge: Cambridge University Press.
Kattan, P I (2003) MATLAB Guide to Finite Elements, An Interactive Approach Berlin: Springer-Verlag. Liu, G R and Quek, S S (2003) The Finite Element Method: A Practical Course Boston: Butterworth- Heinemann.
MAPLE 9.5 (2004) Learning Guide Waterloo, Canada: Maplesoft, Waterloo Maple, Inc.
MATHCAD 11 (2002) User’s Guide Cambridge, Mass.: Mathsoft Engineering & Education, Inc. MATLAB & SIMULINK 14 (2004) Installation Guide Natick, Mass.: The MathWorks.
Oden, J T (1972) Finite Elements of Nonlinear Continua New York: McGraw-Hill.
Owen, D R J and Hinton, E (1980) A Simple Guide for Finite Elements Swansea, U.K.: Pineridge Press. Pintur, D A (1998) Finite Element Beginnings Cambridge, Mass.: MathSoft, Inc.
Portela, A and Charafi, A (2002) Finite Elements Using Maple, A Symbolic Programming Approach. Berlin: Springer-Verlag.
Rayleigh, J W S (1877) Theory of Sound 1st rev ed New York: Dover.
In "An Introduction to the Finite Element Method," Reddy (1984) provides foundational knowledge essential for understanding finite element analysis, while his later work, "An Introduction to Nonlinear Finite Element Analysis" (2004), delves into more complex applications of the method Additionally, Ritz (1909) introduced a novel approach to solving specific variational problems in mathematical physics, further enriching the field of finite element analysis.
Roache, P J (1972) Computational Fluid Mechanics Albuquerque, N.M.: Hermosa.
Segerlind, L J (1984) Applied Finite Element Analysis New York: John Wiley & Sons.
Smith, I M (1982) Programming the Finite Element Method New York: John Wiley & Sons. Solin, P., Segeth, K., and Dolezel, I (2004) Higher-Order Finite Element Methods Boca Raton, Fla.: Chapman & Hall/CRC Press.
Southwell, R V (1946) Relaxation Methods in Theoretical Physics London: Clarendon Press. Turner, M., Clough, R W., Martin, H., and Topp, L (1956) “Stiffness and Deflection of Complex Struc- tures.” J Aero Sci 23:805–823.
Zienkiewicz, O C and Cheung, Y K (1965) “Finite Elements in the Solution of Field Problems.”
Zienkiewicz, O C and Taylor, R L (1989) The Finite Element Method, 4th ed New York: McGraw-Hill.
The Method of Weighted Residuals and
Background
This chapter outlines essential concepts for developing approximations to differential equations, ultimately leading to the finite element method It begins by establishing the weighted residuals form of governing differential equations and presents a general method for deriving the "weak" formulation, applicable to a wide range of differential equations The next step involves introducing shape functions and the Galerkin approximation to the integral form of these equations, paving the way for effective finite element approximations.
The finite element method, rooted in variational calculus, rapidly evolved into a vital engineering tool due to its strong mathematical foundation Despite common misconceptions suggesting that a robust mathematical background is necessary to grasp this method, we demonstrate that it can be effectively understood using advanced calculus theorems and fundamental physical principles.
Classical Solutions
This article examines the heat conduction in a slender, homogeneous metal wire of length L and constant cross-section, where one end is subjected to a specific heat flux (q) while the other end maintains a constant temperature (T = TL) The wire is insulated along its length, as illustrated in Figure 2.1 Additionally, an electrical current can flow through the wire, serving as an internal heat source with a magnitude of Q By applying Fourier’s law, we can derive the differential equation that describes the temperature distribution along the rod.
In this context, the length coordinate is represented by x, while K denotes the constant thermal conductivity of the material Additionally, Q signifies the internal heat generation per unit volume The problem is governed by specific boundary conditions that must be considered.
When q > 0, the direction of heat flow is into the rod at x = 0, which accounts for the negative sign in Eq (2.2).
The solution to Eq (2.1) with boundary conditions (2.2) and (2.3) can be found by direct integration if we assume that Q is an integrable function, and is given by
If Q is constant, Eq (2.4) reduces to
Figure 2.1 Conduction of heat in a rod of length L
We utilize Eq (2.4) as a reference point to evaluate solutions derived from the finite element method This straightforward example offers a unique solution, highlighting the importance of comprehending numerical solutions in simpler scenarios As more complex problems often lack straightforward analytical solutions, a solid grasp of basic numerical behaviors is essential for accurately interpreting approximations in advanced challenges.
The “Weak” Statement
Two primary procedures are commonly employed to formulate and solve equations using finite elements: the Rayleigh−Ritz method and the Galerkin method Additionally, there are less frequently used techniques such as collocation, constant weights, and least-square methods, all of which fall under the umbrella of weighted residuals For those interested in a detailed explanation of the Rayleigh−Ritz method, Reddy's 1984 book is a valuable resource, while Fletcher's 1984 publication covers other methods.
To initiate any procedure, we must first establish a partition or grid within the range of 0 ≤ x ≤ L This partition consists of a finite number of non-overlapping subintervals that collectively encompass the entire domain Each of these subintervals is referred to as an "element," which we denote as e_k.
In this context, the endpoints of each interval, referred to as "nodes," play a crucial role in approximating temperature distribution For each element, the temperature is estimated using predetermined functions of the independent variable x, represented by φ j (x), along with corresponding unknown parameters a j An element is defined as a subinterval e k, associated with a specific set of functions φ j and an equal number of parameters a j When the parameters a j are identified, it enables a comprehensive approximation of the temperature field T(x) across the entire subinterval.
Over the whole domain 0 ≤ x ≤ L, we can then write
The functions φ i (x) are called “shape functions” (this is explained later) We write expression (2.7) in summation notation and use an equal sign, i.e.,
Figure 2.2 Partition of the domain into a finite element grid e k ={ x x : k ≤ ≤x x k + 1 }
The function T(x) is selected to ensure that Eq (2.3) is consistently fulfilled, even if this is not immediately clear As we integrate expression (2.8) into the subsequent steps of the process, the rationale behind this approximation will become clearer.
The finite element method is formulated using the Galerkin approach of the weighted residuals procedure, which is simpler to implement than the mathematically appealing Rayleigh−Ritz method While the Rayleigh−Ritz procedure offers a comprehensive mathematical theory of approximation and convergence, it can be challenging to apply in complex fluid flow and heat transfer scenarios, particularly when advection is involved For further insights into the Rayleigh−Ritz method, refer to Chapter 8 and works by Huebner et al (1995), Zienkiewicz and Taylor (1989), and Dawe (1984) In contrast, the Galerkin method provides a reliable means to integrate governing equations, even in situations where the Rayleigh−Ritz method may not be feasible.
When approximating a solution to a problem with an expression like (2.8), the true solution to the differential equation is typically unattainable As a result, substituting our approximate solution into the left-hand side of Eq (2.1) yields a "residual" function rather than an identity, which reflects the error in the approximation This error can be precisely defined.
(2.9) Here T is the approximation to the true solution T* It follows that
For any temperature T that is not equal to T*, it is impossible to eliminate the residual at every point x, regardless of how fine the grid is or how extensive the series expansion The weighted residuals method addresses this by multiplying the residual by a weighting function, allowing us to ensure that the integral of this weighted expression equals zero.
In equation (2.11), W(x) represents the weighting function, which can be varied to create a system of linear equations for the unknown parameters a_i By substituting different weighting functions into this equation, we can derive an approximation T that aligns with the finite series outlined in equation (2.8), ensuring it meets the requirements of the differential equation.
“average” or “integral” sense The type of weighting function chosen depends on the
The “Weak” Statement | 11 type of weighted residual technique selected In the Galerkin procedure, the weights are set equal to the shape functions φ(x), i.e.,
The finite element method generates a system of linear algebraic equations with an equal number of equations and unknown parameters, ensuring the existence and uniqueness of solutions when boundary conditions are properly defined This approach is particularly beneficial for addressing nonlinear problems and irregular geometries in higher dimensions The technique's foundation lies in the definition of shape functions, φ i (x), where simple interpolation methods—such as linear, quadratic, and cubic functions—are predominantly used While higher-order approximations can be employed, they introduce additional complexity, computational time, and storage needs Ultimately, the use of elementary functions showcases the elegance and power of the finite element concept.
We now wish to evaluate the left-hand side integrals in Eq (2.11) using our proposed shape functions φ(x) as weights W(x) Thus, the Galerkin procedure gives
To determine the appropriate form for the function φ i (x) in Eq (2.8), we need to ensure that the temperature distribution remains continuous with respect to x A straightforward method for achieving this is through piecewise polynomial interpolation across each element Specifically, using piecewise linear approximation offers the simplest and most effective way to maintain continuity in the function, as illustrated in Figure 2.3.
The first derivatives of these functions are discontinuous at the element boundaries, leading to the non-existence of second derivatives in those regions Additionally, the second derivative of T is zero within each element However, insisting on the existence of second-order derivatives throughout is overly restrictive, which could hinder progress.
Figure 2.3 Piecewise linear approximation to a temperature field
The equation T x 1 x x 2 x 3 x 4 x 5 = L effectively addresses various significant physical scenarios, including the impact of a unit-strength point heat source within a rod Consequently, this leads to the transformation of Equation (2.1).
(2.14) where δ is the Dirac delta function and is zero everywhere except at x = x s , the location of the source, where it is undetermined Evidently, the second derivative of
T does not exist at x = x s ; however, Eq (2.14) has a well known solution, given by
Fortunately, this difficulty can be readily resolved by an application of the principle of integration by parts to the second derivative term in Eq (2.13), i.e.,
(2.16) and Eq (2.13) can be rewritten as
The weak form of our problem, represented by equation (2.17), incorporates only the first derivative of the solution T(x), contrasting with equation (2.13), which includes the second derivative This adjustment signifies a relaxation of the differentiation requirement on T(x), thus earning the designation "weak statement." Importantly, this formulation does not involve any approximations, ensuring that no information is lost As a result, simple piecewise linear approximations become feasible.
Let us consider Eq (2.1) with boundary conditions and the convective boundary condition
⎪ φ( )x Kd T φ φ dx dx K d dx dT dx dx K dT
Kd dx dT dx dx Qdx K dT dx
The “Weak” Statement | 13 which was previously discussed in Section 2.2 Here, h is the convective heat transfer constant and T ∞ is a reference temperature.
The weighted residuals formulation, as presented in Eq (2.17), remains consistent for this problem because it is solely based on Eq (2.1) and is unaffected by the specified boundary conditions As discussed in Chapter 4, when the temperature is defined at a boundary point, we ensure that the heat flux term at that point is zero by making the weighting function equal to zero.
In this analysis, we set φ(x) = 0 and apply the convective boundary condition to reformulate Eq (2.17) into the weighted residuals formulation Additionally, we impose that the weighting function equals one at boundary points with specified flux, resulting in φ(L) = 1, which eliminates the explicit appearance of weighting functions in the boundary terms We will now revisit the fundamental problem outlined in Eqs (2.1) to (2.3).
Utilizing Eq (2.8) for each weighting function φi(x), we can write Eq (2.17) in the form:
Notice that the flux –K(dT/dx) at x = 0 is automatically incorporated into the integral form Also, the integrals in (2.18) can be readily calculated once the shape functions φ i have been chosen.
Closure
The finite element method is fundamentally based on the weighted residuals approach, with the Rayleigh−Ritz and Galerkin methods being the most prevalent techniques While the Rayleigh−Ritz method utilizes calculus of variations, it can be challenging to apply to complex equations In contrast, the Galerkin method offers a straightforward application and ensures a compatible approximation of the governing differential equation.
The Galerkin method approximates the dependent variable using a finite series, assuming the solution's shape is known and dependent on a limited number of parameters When this approximation is substituted into the governing differential equation, it produces a residual function, which, when multiplied by weighting functions, must be orthogonal to these functions in an integrated sense This results in a set of linear algebraic equations that facilitate the determination of the unknown parameters, leading to an approximate solution By applying integration-by-parts to reduce second derivative terms, the method yields a "weak" statement formulation, enabling the development of a general algorithm applicable to a broad range of problems.
2.1 Fill in the details leading to Eq (2.17) and use it to find the weighted residuals formulation of Example 2.1.
2.2 Use Eq (2.17) to find the weighted residuals formulation of Eqs (2.1) through (2.3) in terms of the heat flux q. π 2 π 2 π
2.4 Consider the equation: with u(0) = u(1) = 0 Assume an approximation for u(x) = a 1 φ1(x) with φ1(x) x(1 – x) The residual is and the weight W 1 (x) = φ1(x) = x(1 – x) Find the solution from the following integral
2.5 Use the weak statement formulation to find solutions to the equation
(a) Using linear interpolation functions, as explained in Section 2.3, use (i) one element and (ii) two elements.
(b) Using simple polynomial functions that satisfy the boundary conditions at the left-hand side, i.e.,
(ii)u(x) = a 1 x + a 2 x 2 , hence φ1(x) = W 1(x) = x, φ2(x) = W 2(x) = x 2 (c) Using circular functions that satisfy the boundary conditions at the left- hand side, i.e.,
(ii)u(x) = a 1 sin(π/2Lx) + a 2 sin (3π/2Lx)
(d) Find the analytical solution and compare with results from (a), (b), and (c).
2.6 Subdivide the interval 0 ≤ x ≤ L into 10 linear elements, construct the element equations for four consecutive elements starting with element four, and show that none of the parameters a i is related to more than two additional parameters in the equations The only ones involved being a i–1 and a i+1 (as a consequence of this, the final system of linear equations will involve a tri-diagonal matrix, which is easy to solve).
2.7 The Rayleigh−Ritz formulation for the problem of solving Eq (2.1) with boundary conditions (2.2) and (2.3) can be stated as: Minimize the functional d u dx u x x
F T K dT dx QT dx Tq x
Closure | 19 over all functions T(x) with square integrable first derivatives that satisfy
To approximate T(x) at x = L using two linear elements, we substitute this approximation into Eq (2.34) to express F(T) as F(a1, a2, a3) By minimizing F(a1, a2, a3) with respect to the three variables, we demonstrate that the resulting system of equations aligns with Eq (2.31) This shows that in this scenario, the Galerkin method and the Rayleigh−Ritz method yield equivalent results.
2.8 Let us consider once more Exercise 2.3 above Assume that u(x) = a 1 x andW 1 (x) = x, but this time use Eq (2.11) and proceed as in Exercise 2.2 to obtain a solution Show that this solution is identical to that obtained in Exercise 2.3(b)(ii), and hence, the process of integration by parts does not introduce any changes.
2.9 In Example 2.2, first find the exact analytical solution; then calculate two more Galerkin approximations using
Sketch the three different approximations for a few points and discuss the results.
2.11 Fill in the details in Example 2.2 and verify the solution.
2.12 Show that if the expressions for (i) given by Eq (2.20) are used in Eq (2.19), then a i = T i
2.13 Find the weak formulation of Eq (2.1) with the boundary condition
2.14 Using two linear elements solve the equations in Exercise 2.13 with L = l m, k = 200 w/mK, Q = 100 W/m 3 , h = 150 W/m 2 K, T ∞ = 100°C.
Dawe, D J (1984) Matrix and Finite Element Displacement Analysis of Structures Oxford: Clarendon Press.
Fletcher, C A J (1984) Computational Galerkin Methods Berlin: Springer-Verlag.
Huebner, K H., Thornton, E A., and Byrom, T G (1995) The Finite Element Method for Engineers, 3rd ed New York: Wiley-Interscience.
Reddy, J N (1984) An Introduction to the Finite Element Method New York: McGraw-Hill. Zienkiewicz, O C and Taylor, R L (1989) The Finite Element Method, 4th ed Maidenhead, U.K.: McGraw-Hill.
The Finite Element Method in One Dimension
Background
The finite element method is fundamentally based on the Galerkin procedure of weighted residuals, which, as outlined in Chapter 2, involves implementing this procedure alongside a piecewise polynomial representation of the dependent variable This approach results in a series of algebraic relations derived from discretizing the problem domain into segments known as finite elements Notably, approximation functions can be defined locally over these segments, allowing for the use of any function, including first-degree polynomials, in the approximation process.
The finite element method begins by partitioning the area of interest into smaller subregions known as elements, which include nodal points and define the shape at each element's ends Quadratic elements feature a third node at the midpoint, while cubic elements comprise four nodes spaced at specific intervals Together, these elements and nodal points form the "finite element mesh," and the selection of shape functions in the process is closely associated with the chosen mesh type.
We begin our discussion with the various forms of the shape functions.
Shape Functions
In Chapter 2, we explored piecewise polynomial shape functions φ i (x) for one-dimensional heat conduction, albeit in a general manner This chapter aims to formalize piecewise polynomial interpolation, demonstrating the advantages of utilizing individual elements and local functions that are specific to each element.
We start by defining a grid composed of elements that may vary in size For each element, we establish linear shape functions, similar to those presented in Equation (2.20), as illustrated in Figure 3.1.
The finite element grid and shape functions are globally represented within a coordinate system that effectively describes the geometry of the problem Each mesh consists of elements with nodes that have specific coordinates, as illustrated in Figure 3.1 The domains of these elements are defined accordingly.
The shape functions associated with each node are denoted by such that and if , and are given by
We can now define as
In a one-element mesh, the value at node i is represented as linear between nodes, taking the form T(x) = α1 + α2 x This linearity can be clearly observed, demonstrating the relationship between the values at the nodes.
In this section, we observe that expression (3.12) mirrors Eq (3.6) with n set to 1, utilizing distinct notation compared to Eq (2.8) A comparison reveals that φ i (x) corresponds to N i (x), while α i is equivalent to T i Additionally, we impose a boundary condition resembling the format of (2.3).
Figure 3.1 Shape functions in a general grid of piecewise linear elements
12 replacing the parameters, in this case by the given value of the temperature at the node.
For practical purposes, it is beneficial to analyze each element within its own local coordinate system By focusing on a specific element of length in this local coordinate framework, we can utilize a consistent notation for clarity and precision.
(3.13) where (e) refers to an element, and
(3.15) as shown in Figure 3.2 It follows that
To advance in the solution process, it is essential to establish a relationship between local and global node numbering, as depicted in Figure 3.3 Additionally, we will introduce higher-order elements to enhance our analysis.
Figure 3.2 Local node numbering, temperature representation, and local shape functions
Figure 3.3 Relation between local and global numbering
( )= ( ) dT dx dN dx dN dx
To enhance function approximation through interpolation, utilizing parabolic arcs for each element proves more effective than relying on linear segments, as illustrated in Figure 3.4 This approach allows the functions to be quadratic in x, taking on a specific form that improves accuracy.
In order to fully define the function within the element, we must consider three parameters, which necessitates the introduction of an additional node in the middle of the element for interpolation This adjustment ensures that we can accurately interpolate the function at both the ends and the new central node Figure 3.5 illustrates the updated configuration for the local coordinate system.
The functions are obtained from the requirement that
Figure 3.4 Piecewise linear vs piecewise quadratic interpolation
Figure 3.5 Quadratic element and shape functions in local coordinate system
The solution of this system of equations is given by
Substituting into (3.17) and rearranging, we obtain
Hence, the shape functions are
Figure 3.6 illustrates the notation that connects the global system to the local reference system for a mesh composed of n quadratic elements, with the ith element defined according to Equation 3.1.
Figure 3.6 Relation between local and global coordinate systems The triangles denote nodes interior to each element α α α
Shape Functions | 27 and the element length is given by
(3.21) The derivatives of the function can now be obtained from
(3.23) which are no longer constant over the element.
We can proceed to even higher orders of approximation The next level is given by the cubic functions In this case, we have
(3.24) where four nodes are required on each element, located equally spaced at x = 0, and In this element, the shape functions are given by
The details on this element will be left to Exercise 3.2.
The following points should be noticed with regard to the elements defined above:
1 Even though the derivatives of quadratic and cubic elements are functions of the independent variable x, they will not be continuous at the inter-element nodes An example of this is given by Exercise 3.5 The type of interpolation used here is known as Lagrangian, and it only guarantees continuity of the function across inter-element boundaries The elements are known as ele- ments, where the zero superindex means that only derivatives of order zero are continuous, i.e., the function.
2 Evidently, even higher-order elements, e.g., quartics, quintics, etc., can be con- structed by adding more interpolation nodes in an element Actually, we can construct elements that also interpolate derivatives at the nodes The simplest such elements are the cubic Hermites that interpolate the function and its first derivative at the two nodes located at the ends of the element These are elements because the first derivative will now be continuous everywhere in the domain Even more sophisticated elements can be constructed In fact, there is virtually no limitation to the degree of complexity or predetermined element behavior that can be attained However, one has to keep in mind that the more sophisticated the element, the more computationally expensive it will be In fact, cubic elements already become prohibitively expensive in multidimen- sional calculations and are seldom used.
3 The element interpolation functions considered above have the property that where is the Kronecker delta function, i.e.,
(3.26) and x j are nodal coordinates This adds the convenience that when expression (3.6) is evaluated at nodal points, the value of the dependent function at that point is obtained.
4 The type of interpolation chosen defines the “shape” that the dependent variable can take within an element, i.e., linear, quadratic, etc Therefore, the name
The term "shape function" refers to the mathematical functions that define the characteristics of an element in finite element analysis Higher-order shape functions can precisely represent lower-order functions; for instance, quadratic elements can accurately depict linear and constant functions, while cubic elements can represent quadratic, linear, and constant functions This property ensures that utilizing higher-order elements leads to improved approximation accuracy in modeling Further exploration of this property can be found in Exercise 3.4.
N i ( ) e (x j )= δ ij , δ ij δ ij if i j if i j
Steady Conduction Equation
Consider the problem of finding the temperature distribution T = T(x) on the inter- val that satisfies the steady one-dimensional equation with internal heat source:
Equations (3.27) to (3.29) are identical to Eqs (2.1) to (2.3) used to describe heat conduction in a rod in Chapter 2.
We present fundamental concepts through a discretization method utilizing two linear elements of equal length, resulting in a system of simultaneous equations with three nodal values: T1, T2, and T3 The weighted residuals formulation for this approach is expressed in equation (3.27).
Using the additive property of the integral and two elements, expression (3.30) can be written as
The function T(x) in the global system will be approximated by
3 where the shape functions are given by expressions (3.2), (3.3), and (3.4), respectively, with n = 2 and and
The Galerkin form of (3.31) becomes, with
In Equation (3.33), the initial two terms represent the element, while the final two terms pertain to another component We will examine each of these components individually, utilizing local element coordinates For element e1, we find that N3(x) equals zero, allowing us to express the resulting equations in a matrix format.
Using Eqs (3.14) through (3.16) and the fact that Eq (3.34) can be written as
Using (3.28) and integrating, we finally obtain the element equations for in the form
KdN dx dN dx T N Q dx N KdT dx i j j j i
KdN dx dN dx T N Q dx N
K dN dx dN dx dN dx dN dx e e e e
The steady conduction equation illustrates the relationship between the degrees of freedom in the elements, leading to the derivation of corresponding equations for each element This approach mirrors the process outlined in Exercise 3.5, emphasizing the interconnectedness of the equations in thermal conduction analysis.
To construct a global 3 × 3 matrix, the element equations must be organized using a global numbering system for the equations and degrees of freedom This process, illustrated in Figure 3.7, involves aggregating equations that correspond to the same weighting function across various elements Consequently, the contributions from each element are summed together, as depicted in the figure.
The assembly process in finite element analysis involves utilizing the global degree of freedom numbers within element matrices, allowing for the integration of their contributions into the global matrix For instance, in element 2, the entry at position (1,2) corresponds to (2,3) in the global system, where the value –2k/L is incorporated into the assembled matrix at position (2,3) For a more detailed understanding of this assembly process, refer to Section 3.7.
In Figure 3.7, it is evident that the flux expressions at the interior nodes cancel each other out, indicating that fluxes must remain continuous within the interior Consequently, these terms are typically excluded when formulating the element equations However, caution is needed, as omitting these terms can lead to a loss of equality in the element equations It is common practice to set the flux-related term, such as in Eq (3.6), to zero, resulting in the formation of the global system of equations.
The heat flux at x = L can be disregarded when considering the equation for T3, as T3 is already known Consequently, the system can be reformulated without this equation.
F igur e 3 7 Schem atic o f assembly p ro cess fo r tw o-ele m ent sy stem
− QL 4 − K dT dx x = L/2 − QL 4 − K − QL 4 − K − K dT dx x = L
++ QL 4 dT dx x = L/2 − K dT dx x = L/2 = + QL 4 dT dx x = L/2 − K dT dx − QL 4 x = L
The steady conduction equation can be solved to determine the necessary variables, allowing for the calculation of heat transfer at the right boundary.
In this section, we will approximate equations (3.27) to (3.29) by utilizing a single quadratic element for domain discretization We maintain the same number of nodal points as in the previous method, but we employ a higher-order approximation The Galerkin formulation remains consistent with prior analyses Notably, since the local and global systems are identical for the single-element case, we can express the results accordingly.
Using Eqs (3.19), (3.22), and (3.23), we have in matrix form:
K dN dx dN dx T N Q dx N i j j j i i
Again, the last equation can be eliminated using the final system is
(3.43) with the heat flux at the right-hand boundary given by
3.3.2 Variable Conduction and Boundary Convection
This article discusses the application of a finite element algorithm to approximate the steady-state temperature distribution in a thin rod of length L The rod experiences a convective heat load at the left end (x = 0) while maintaining a fixed temperature at the right end (x = L).
In this analysis, we consider a scenario where there are no internal heat sources (Q = 0) and the thermal conductivity of the rod varies with position (x) due to changes in material composition or cross-sectional variations This leads to a differential equation that characterizes the thermal behavior of the rod under these conditions.
(3.46) where is the external reference temperature and h the convective heat transfer coefficient, and
(3.47) The weighted residual formulation is obtained as before:
In finite element modeling, we eliminate the flux term associated with the boundary where the temperature is fixed, specifically at x = L Additionally, we substitute equation (3.46) for the flux at the left-hand boundary.
In transitioning from equation (3.45) to (3.49), no information has been lost; however, our focus is not on finding an analytical solution for Eq (3.49) Instead, we aim to obtain a computable finite element approximation by employing our defined shape functions and mesh discretization.
As before, we define a mesh over and we approximate T(x) by
(3.50) where n is the number of elements in the mesh If are linear shape functions, the Galerkin form of Eq (3.49) is then
Instead of using a specific form for K(x), we interpolate K(x) based on its nodal values, utilizing linear shape functions similar to those used for T(x) Consequently, the element equations for the first element, which incorporates the convective boundary condition, are derived.
We have used the fact that and in the convective bound- ary term, that is,
K x dW dx dT dx dx W K x dT dx W x
K x dW dx dT dx dx Wh T T x
K x dN dx dN dx T dx N h T T i j j j n
⎟⎟⎟ dN dx dN dx dx T e e
Performing the integration, we get
(3.52) For all other elements, the equations are
If the region has been discretized using two elements of equal length
L/2, the resulting assembled system of equations can be written as
When a convective boundary condition is specified at x = L, the equations for the last element can be derived using the weighted residuals method By omitting the initial boundary term and substituting the convective condition into the second term, the resulting equations are established.
Axisymmetric Heat Conduction
Many problems in steady heat conduction with boundary convection involve fluids flowing in pipes To develop the corresponding finite element algorithm, the axisym- metric form of Eqs (3.45) to (3.47) is
(3.61) The weighted residuals form of (3.59) is
Integrating by parts with respect to r and performing the integral with respect to θ, we obtain
In the axisymmetric case, a key difference between equations (3.63) and (3.48) is the substitution of K(x) with rK While a smoothly varying thermal conductivity is not critical, significant changes in conductivity, such as those caused by material transitions or thermal insulation around a pipe, are important Consequently, equation (3.63) can be simplified by factoring K out of the integral, assuming that the integral will be computed in segments based on the step changes in K Thus, the axisymmetric Galerkin integral for an element can be expressed without the factor.
The Kronecker delta function, denoted as δ e, equals 1 for element e i and is zero for all other elements e j where j ≠ i In this context, n represents the total number of elements, with e n being the element located adjacent to the right-hand boundary.
Expression (3.64) differs from Eqs (3.52), (3.53), and (3.55) only in the handling of the element data We are thus led to the next example problem.
Solve Eq (3.59) for a uniform two-element discretization of a thick-walled circular pipe containing a flowing hot fluid The pipe has a thickness of 10 cm and an inner radius of 20 cm;
* FEM-1D and COMSOL files are available.
1 π rKdW π dr dT dr dr rWh T T r r
Natural Coordinate System | 41 the thermal conductivity is K = 20 W/mC The fluid heat exchange temperature is 400°C, h =
50 W/m 2 C, and the pipe outer wall is T L = 39.18°C Thus,
Using Eq (3.64), with and element gives
The comparison of results with the element equations from Example 3.1 validates the consistency of the finite element equations for the chosen data By assembling the equations and applying the appropriate boundary conditions, the nodal solution is achieved, with the convection temperature error remaining below 0.2% These examples reinforce the assertion of the finite element method's flexibility.
Natural Coordinate System
We now introduce a natural coordinate system for specifying the local operations on an element We define the elements in the interval together with a transformation of the form: element e 1 : h ( ) e 1 = r 2 ( ) e 1 − r 1 ( ) e 1
The linear element shape functions, depicted in Figure 3.8, map the interval into the element interval, providing essential advantages for numerical integration and the analysis of complex two- and three-dimensional geometries.
Using this coordinate system enables straightforward numerical evaluation of the products of shape functions and their derivatives through transformation (3.65).
(3.68) Notice also that Eq (3.65) can be written as
Hence, the transformations can be written strictly in terms of the shape functions and the nodal coordinates Integrals and derivatives of the shape functions take the form
Figure 3.8 Notation and linear shape functions in natural local coordinate system
The analytical evaluation of function products in Eq (3.69a) is straightforward and can be expressed in terms of exponents This method is widely recognized in structural mechanics and is applicable to any one-dimensional element mesh, as referenced by Zienkiewicz.
(1977) The integral relation is expressed as
(3.70) where a and b are non-negative integers Use of Eq (3.70) is relatively easy For example,
Notice that this is a general relation for any element involving the product Also, from (3.69b) dN dx dN dx dx h dN d dN d d j k e j k x x i i i ∫ −
The familiar diffusion integral, represented as (3.72), can be effectively applied using the natural coordinate system, especially for higher-order elements like the quadratic element In this context, the shape functions in natural coordinates play a crucial role.
The transformation from the interval to the element domain in is given by
This expression simplifies to Eq (3.65) as detailed in Exercise 3.9 Unlike the representation in Section 3.2, this formulation is more versatile, permitting the interior node to be positioned at locations other than the midpoint of the element.
The derivative of with respect to x is obtained from and is given by
(3.75) where now dN dx dN dx dx h dN d dN d dN j k x x e i i i
N i ( )ξ dN d dN dx dx d i i ξ = ⋅ ξ dN dx dx d dN d i = 1 i
The global values of element coordinates are represented by the Jacobian of the coordinate transformation, commonly denoted as J This concept is crucial when working with multidimensional elements.
Using the natural coordinate system for a quadratic element, we wish to evaluate the term which is the diffusion term with constant diffusivity Setting the Galerkin procedure yields
The Jacobian of the transformation aligns with the derivative values, confirming that this transformation mirrors the linear transformation previously discussed This consistency is anticipated, as indicated in the analysis of the transformations.
(3.78) which can be written in vector form as
K dN dx dN dx dx T K dT dx N i e j e x x j i x k k k k ( ) ( )
= − = ξ ξ dN dx dN dx dN dx L e e e k k k
In a natural coordinate system, the integration differential for one-dimensional space is expressed in terms of the magnitude of the Jacobian As we progress to higher dimensions, the Jacobian becomes a matrix, and its determinant plays a crucial role in the integration process.
We are now ready to evaluate the diffusion integral Assuming, for simplicity, that the boundary terms in Eq (3.77) vanish, we get
In this analysis, we consider a constant heat flux \( q \) applied exclusively at node 1 of a quadratic element, aligning with the conduction matrix outlined in Eq (3.42) Consequently, the prescribed heat flux at the boundary modifies the term in Eq (3.77), resulting in a specific contribution Ultimately, this leads to the overall contribution of the element being calculated based on these parameters.
K dN dx dN dx dN dx dN d e e e e k k k k
⎥ xx dN dx dN dx dx
Let us now evaluate the integral where Q is a constant internal heat source, for both linear and quadratic elements, using natural coordinates.
For linear elements, we have, in Galerkin form
(3.82) where we used Eqs (3.66) and (3.68).
For quadratic elements, from Eqs (3.73) and the expression for the Jacobian we have
Equations (3.82) and (3.83) are the same expressions obtained before the source term in Eqs. (3.35) and (3.42), respectively, if we replace L by L/2 in Eq (3.82).
In this analysis, we revisit the steady-state problem outlined in Example 3.1, focusing on determining the temperature distribution within a single quadratic element Given the absence of assembly requirements for just one element, we can directly express the Galerkin finite element formulation.
Transforming to natural coordinates, we can write now in matrix form
* FEM-1D and COMSOL files are available.
( ) d QL h ( ) e = 0 1 [ K ( ) e ] T = [ 40 50 60 ]. dN dx K x dN dx dx T N h T T i i e j e j i e x
Utilizing Eqs (3.73) for the shape functions, we have
Performing the integrations, and setting T 3 = 39.18 ° C produces the final set of equations:
The solution derived from Equation (3.85) gives T1 = 99.992°C and T2 = 66.546°C, demonstrating a significant enhancement in accuracy for the convection surface temperature compared to the results obtained using two linear elements Notably, this improvement is evident as the exact solution is 100°C, highlighting the effectiveness of the finite element approximation where the error e(x) exhibits specific behavior.
The error in interpolation decreases with the order of the polynomial, where linear elements exhibit an error proportional to \( h^2 \) and quadratic elements show a reduction proportional to \( h^3 \) Given that the distance between nodes remains constant, the accuracy of the solution using a quadratic approximation surpasses that of two linear elements, confirming its superior precision.
Time Dependence
We extend our finite element algorithm to address the unsteady heat diffusion equation, initially assuming that there are no sources or sinks (Q = 0) The governing equation for heat conduction under constant diffusivity is typically expressed as follows.
The equation (3.87) describes the time rate of change of temperature (∂T/∂t) in relation to thermal diffusivity, density (ρ), and heat capacity (c p) of a material Unlike previous models where temperature (T) depended solely on spatial variable (x), this model introduces temperature as a function of both space (x) and time (t), represented as T = T(x,t) Therefore, it is essential to establish not only boundary conditions but also an initial condition for accurate analysis.
(3.90) with the additional generalization that and is the tem- perature distribution in the rod at time t = 0.
The weighted residual form of Eq (3.87) is
The weighting functions are exclusively dependent on the spatial variable x, focusing solely on spatial discretization Additionally, we assume that the temperature can be approximated using the same shape functions as previously utilized.
(3.92) where n is the number of elements in the grid.
The time dependence does not affect the shape functions and is kept in the dependent variable The derivatives of the temperature are then given by
The value remains at 3.93, consistent with previous measurements We employ partial derivative symbols to represent the derivatives of the shape function and the discretized variable, despite these being functions of a single independent variable, as the derivatives are, in fact, total derivatives.
(3.94) where the dot above denotes time differentiation Recall from Eq (3.22) that [N] is a row matrix and [T] is a column matrix.
The Galerkin formulation of Eq (3.91) is now
At this stage, we introduce indicial notation to replace the summation signs in the expressions, as in Eq (3.95) The following definitions are now used to simplify notation:
(3.96) For example, the gradient expression for temperature is
In indicial notation, the range of the summation index is implicitly understood from the context, as it is not explicitly stated in the expressions For clarity, Equation (3.95) can be expressed in a more compact form.
(3.97) where the time-dependence expression in the first integral is rewritten as
The mass matrix in the equation represents the area of elements shared between node i and all connected nodes j This formulation, known as a semi-discrete Galerkin formulation, discretizes only the spatial variable, leaving the time derivative term untouched A key distinction between finite element and finite difference discretization of the equation lies in the presence of the mass matrix resulting from the Galerkin approach to the time derivative term (Pepper and Baker, 1979).
In finite element methodology, various approaches exist for time integration, as discussed by Zienkiewicz (1977) This article focuses on the θ-method, a widely adopted algorithm for effective time integration.
In the θ-method, the time derivative is replaced by a simple difference as
In this article, we define a variable's value at a specific time, with a time increment that allows us to advance the solution to future time levels We assume that the initial condition is already established, enabling us to progress to a time level where the solution is still unknown Additionally, we introduce a relaxation parameter, θ, which plays a crucial role in formulating the solution.
The parameter θ, which ranges from 0 to 1, is crucial for controlling the accuracy and stability of algorithms Commonly used values include θ = 0, θ = 1/2, and θ = 1 When θ is less than 1/2, the algorithm achieves only conditional stability, as noted by Richtmeyer and Morton in 1967 Specifically, setting θ to 1 results in the backwards implicit method, while θ at 1/2 produces a second-order, centered implicit method known as the Crank-Nicolson-Galerkin Conversely, θ = 0 corresponds to the explicit Euler forward scheme.
Substituting Eqs (3.98) and (3.99) into (3.97), we obtain
Setting θ = 0 in Eq (3.99) does not result in a fully explicit method as shown in Eq (3.97) due to the necessity of inverting the mass matrix To achieve fully explicit algorithms, the concept of mass lumping, discussed in Chapter 4, must be utilized.
1 2/ which can be rewritten as
When θ = 0 in the expression, only the mass matrix term remains on the left-hand side, leading to enhanced connectivity among adjacent elements compared to traditional finite difference methods.
This article addresses the time-dependent heat conduction in a thin rod, where thermal diffusivity remains constant throughout each segment The right wall of the rod is maintained at a fixed temperature, while the left wall experiences a convective heat flux Initially, the temperature is uniform across the rod To analyze this system, we derive finite element equations utilizing two linear elements to represent the slab.
From Eq (3.100), we obtain, for the first element,
(3.101) where and the boundary condition (3.88) has been replaced in the boundary terms. For the second element, we obtain similarly
* FEM-1D and COMSOL files are available.
Let us now utilize the data of Example 3.1, assuming that the average element diffusivities are and We also have that and
If we choose θ = 1 for a fully implicit backward scheme, after multiplying by 120 on both sides, the element equations become element element
Assembling yields the matrix expression
Imposing the right-hand-side boundary condition, Eq (3.103a) becomes
The influence of the mass matrix on the time derivative term is evident in the equation (3.103b), which can be solved at each time step In a finite difference method, this mass matrix simplifies to a diagonal form, with off-diagonal terms being incorporated or "lumped" into the diagonal elements.
For our calculations, we set the time interval ∆t to 100 seconds and assume an initial temperature T 0 (x) of 39.18°C, starting from a slab at a uniform temperature matching the fixed temperature on the right side By simultaneously solving a 3 × 3 system of linear equations, we find the temperature distribution, resulting in T 1 = 62.157°C and T 2 = 43.086°C These results indicate that the temperatures at nodes one and two increase over time, consistent with expectations, and further calculations can be conducted using these values as the initial conditions.
Introducing matrix representation for finite element equations and integral terms enhances clarity and conciseness in the finite element solution process This approach is essential for effectively addressing both steady-state and time-dependent problems, especially when working with multidimensional elements.
Matrix Formulation
The finite element method relies on numerically approximating dependent variables at designated nodal points, leading to a system of simultaneous linear algebraic equations that require direct or iterative solutions While simpler problems can be solved manually due to a limited number of unknowns, most real-world applications involve a significantly larger number of nodes and unknowns, necessitating the use of computers for efficient problem-solving.
The coefficients matrices that we have used previously are formulated from evaluations performed locally over each element and assembled into global arrays.
The local coefficient matrices from each element are aggregated into a comprehensive matrix that encompasses all local contributions This aggregation process can be efficiently executed using "do loops" in a computer program By establishing the finite element algorithm for a single element, we can apply the same methodology to all elements due to the method's general nature Consequently, we can create a set of global matrices derived from the evaluations of the local element matrices and solve the resulting matrix equation using any preferred approach.
It is convenient to define the operations in matrix notation The local mass matrix for the time derivative term is evaluated as
(3.104) The global matrix M is formed as
(3.105) where n is the number of elements The summation implies that each element matrix is an matrix obtained from expanding the element matrices with zeros in all other locations.
In this example, we discretize the interval into three linear elements of equal length By applying Equation (3.104), we evaluate the local mass matrices, resulting in the assembled matrix M.
Because a number of entries in the matrix M are zero, it is called a sparse matrix.
All global matrices derived from finite element discretizations are inherently sparse Specifically, in one-dimensional linear elements, the resulting matrices are tri-diagonal, while those from quadratic elements are penta-diagonal.
In a similar fashion, the diffusion term gives rise to
The matrix K, commonly known as the "stiffness" or "conductance" matrix, represents the structural response in engineering analyses In this context, the integral that incorporates contributions from established functions, such as the source term, is organized as a column matrix, with its length corresponding to the number of nodes in the system.
(3.107) where denotes the restriction of Q to element and is a column matrix.
Incorporating contributions from a heat flux boundary condition enhances the stiffness matrix when the dependent variable is present, or it modifies the load vector F when only known data are utilized The load vector, often referred to as vector F, plays a crucial role in this process.
The time-dependent conduction equation can then be expressed as
In equation (3.108), T represents the vector of nodal unknowns along with their time derivatives By substituting the time derivatives from equations (3.98) and (3.99) into (3.108), we obtain a fully discretized system of linear algebraic equations.
The solution algorithm for the time-dependent conduction equation is outlined in Equation (3.109) utilizing the θ-method This representation allows for symbolic manipulation of the equation through matrix theory, enhancing the analytical capabilities for solving the equation.
(3.110) if is an invertible, nonsingular matrix.
In this book, we employ matrix notation to streamline our algebraic expressions, while also demonstrating the local and elemental evaluations of the matrices that underpin our computer programs.
K dN dx dN dx dx
Solution Methods
The finite element method applied to the governing equations has resulted in a system of linear equations represented by matrices linked to different components of the original differential equations This can be further articulated in the form of Eq (3.109).
All the terms appearing in A and B are known, so we can readily solve for the unknown values φ in Eq (3.111).
Solving large systems of equations can be time-consuming and costly, particularly on personal computers, highlighting the need for specialized methods in numerical linear algebra This field encompasses techniques such as Gaussian elimination, Jacobi and Gauss-Seidel iterations, LU decompositions, successive overrelaxation, and the conjugate gradient method While the development of matrix solution techniques is extensive, our focus is to introduce the fundamental concepts necessary for their implementation in computer programs The solution of large systems, such as Eq (3.111), can be achieved by multiplying both sides by the identity matrix.
Finding φ in large matrices can be challenging, but efficient numerical methods are available that eliminate the need for complex matrix algebra, including matrix inversion, as detailed in Appendix A One of the most straightforward and effective approaches for solving equations like Eq (3.113) is through iterative methods These methods start with initial guesses and refine the solution through successive iterations Eq (3.113) represents a system of n equations, either linear or nonlinear, with n unknowns (φ), where matrix A is n × n in size.
In the finite element method, we often encounter a matrix with coefficients, many of which may be zero By assuming that the diagonal coefficients are non-zero, we can effectively rearrange the equations to facilitate the solution of the unknown values φ i.
(3.114) where k denotes the iteration index.
To solve Eq (3.111), we begin with an initial guess, φ(0), which is then substituted into the right-hand side of Eq (3.114) to produce a new estimate, φ(1) This iterative process continues, generating subsequent estimates φ(2), φ(3), and so on, until we reach a solution that converges Convergence is typically assessed by calculating the relative or absolute error between the successive iterates, ensuring that our estimates improve with each iteration.
Linear iteration is a straightforward method used in solving problems, but it can necessitate numerous iterations to reach convergence, especially in large-scale issues To enhance efficiency and practicality for solutions on smaller computers, accelerating the convergence process becomes essential.
For convergence to occur, the matrix A must meet specific conditions, which will only be briefly mentioned here In the context of the finite element discretizations discussed, these conditions are typically satisfied, ensuring that convergence generally takes place For a more in-depth exploration of the convergence of iterative methods used for solving linear algebraic equations, further resources should be consulted.
Solution Methods | 59 systems of equations, the reader should consult the books by Varga (1962), Isaacson and Keller (1966), and Hageman and Young (1981).
The Gauss-Seidel method is an effective technique for solving large systems of equations, known for its simplicity, computational efficiency, and reduced susceptibility to round-off errors compared to direct elimination methods However, it is important to note that the method may not converge in certain cases, particularly when dealing with ill-conditioned matrices For a deeper understanding of these scenarios, readers can refer to Chapra and Canale's 1988 text Additionally, due to the slow nature of matrix inversion and its high storage demands, the method utilizes matrix multiplication and scalar division to derive solutions.
Eq (3.113) Although somewhat redundant in iterative methods, such operations are quick The algorithm for Gauss-Seidel iterations can be expressed as
The latest update enhances the iterative process, increasing both speed and efficiency For convergence to occur, it is essential that the matrix exhibits diagonal dominance.
When the specified condition is met, the solution will converge regardless of the initial vector chosen, which is why many practitioners opt for zero as a starting estimate.
We can express Eq (3.113) in terms of upper and lower triangular matrices:
(3.119) where L, D, and U are square matrices defined as follows:
(3.120) which is called a lower triangular matrix;
* Ill-conditioning of a matrix occurs when small changes in the coefficients result in large changes in the solution. φ i φ k i ij ij ii j k j b i a a a k
⎩⎪ d a if i j if i j ij ij 0 which is called a diagonal matrix; and
(3.122) which is an upper triangular matrix We can rewrite Eq (3.117) in matrix form as
(3.123) or, multiplying through D and solving for φ (k+1) ,
The convergence speed of iterative methods is influenced by the size of the diagonal terms, as indicated in Eq (3.118), with more strongly diagonally dominant matrices facilitating quicker convergence When initial guessed values are near the actual solution, fewer iterations are needed A widely used variant of the Gauss-Seidel method is Successive Overrelaxation (SOR), which employs acceleration parameters or relaxation factors to enhance convergence rates.
Implementing the algorithm outlined in Eq (3.124) is straightforward with computer code, as the creation of upper and lower triangular matrices can be efficiently managed using a simple "do loop" instruction Source code examples in FORTRAN, C/C++, and JAVA are available in the Numerical series.
Recipes books published by Cambridge University Press (1999).
Iterative methods are particularly beneficial for structured meshes, such as those found in one-dimensional problems or rectangular domains, especially when only a few solutions are required, like in linear steady-state scenarios However, their effectiveness diminishes with irregular computational meshes or when solving the same linear system multiple times, as seen in linear time-dependent or optimization problems The primary advantage of iterative methods is their memory efficiency, as they only require storage for nonzero matrix elements, leading to significant storage savings compared to direct elimination methods Nonetheless, a key drawback is the need to repeat the algorithm implementation each time the right-hand side of the equation is modified.
Elimination methods in which the coefficients matrix A is decomposed into the product of a lower and an upper triangular matrix, known as LU decomposition, *
The matrices discussed differ from traditional upper and lower triangular matrices as defined in Eqs (3.120) and (3.122), as both matrices L and U feature nonzero diagonal elements Additionally, the nonzero coefficients in these matrices typically vary from the corresponding coefficients a_ij found in the original matrix A.
Solution methods utilizing LU decomposition are preferred alternatives to iterative techniques for directly solving systems of equations, as they leverage the sparse structure of the coefficients matrix A to enhance efficiency These elimination procedures are widely recognized for their effectiveness in streamlining the solution process (Atkinson, 1985; Chapra and Canale, 1988).
Closure
This chapter demonstrates the application of the finite element method (FEM) to linear partial differential equations, starting with the steady-state diffusion equation for a scalar quantity and progressing to the one-dimensional, time-dependent diffusion transport equation prevalent in engineering and scientific contexts Through the derivation and implementation of various shape functions in example problems, a generalized FEM procedure emerges, applicable to a diverse range of issues The assemblage process across the mesh generates global matrices, which can be simplified into a linear matrix equation of the form Aφ = B, where φ represents the column vector of unknown variables, allowing for the use of standard matrix solution techniques Fundamental tools and concepts of the finite element method can be effectively derived from the analysis of one-dimensional problems.
1 Apply the weighted residuals method to the governing equations and associated boundary conditions.
2 Choose appropriate shape functions and weighting factors (linear, quadratic, cubic, etc.).
3 Discretize the x-axis and evaluate the Galerkin approximation for the general finite element domain.
4 Assemble the element contributions into a set of global matrices.
5 Apply the necessary boundary condition data (consisting of known values) to the load vector.
6 Solve for the column vector of unknown values, φ, using a suitable matrix solution routine, starting with initial condition data, φ t=0=φ0, and proceeding through time for or to convergence to steady-state conditions.
At this stage, readers should start to understand the mathematical foundations of finite elements based on the simple one-dimensional examples presented For those who may not be well-versed in finite element methodology, it is advisable to revisit the previous sections before progressing to the more complex topics in the upcoming chapters The next chapter will expand the algorithm to address two-dimensional problems.
3.1 Repeat the development of expressions (3.7) to (3.12) using two linear elements to discretize the interval Then combine the element shape functions t n + 1 = +t n ∆t,
Closure | 65 to construct the global shape functions and compare your result to that obtained using expressions (3.2) to (3.4) directly, with
3.2 Show that if in Eq (3.6) we replace T n+1 = T L , the boundary condition (2.3) is automatically satisfied.
3.3 Derive expression (3.25) from (3.24) for cubic elements Then find a relation between global and local reference systems such as the ones given in Figures 3.3 and 3.6 for linear and quadratic elements.
3.4 Write the matrix expression for the derivatives of using cubic elements corresponding to (3.16) and (3.23) for the linear and quadratic cases.
3.5 Interpolate the function in the interval using two equal- length quadratic elements Calculate the derivative of at x = (π/2) from each element and compare.
(a) Show that if is linear function over the interval , then its one quadratic element interpolant over the interval gives
(b) Repeat part (a) for the case where is quadratic using a cubic element interpolant.
(c) Show how the above leads to the conclusion that for linear, quadratic, and cubic elements we have for all x and where for linear, quadratic, and cubic elements, respectively.
3.7 Using integration by parts, obtain Eq (3.33) from Eq (3.31).
3.8 Show that after substituting Eq (3.32) into the first line of (3.33) we obtain (3.34).
3.9 Fill in the details leading to Eq (3.35) from (3.34).
3.10 Derive Eq (3.36) from the second line of Eq (3.33).
3.11 (a) Solve Eq (3.37) for T 1 and T 2 Then compare with the exact solution for
(b) Find the solution using one quadratic element, i.e., solve Eq (3.43). (c) Let T L = 100°C, q = 0.15 cal/cm 2 , K = 0.15 cal/cm 2 s C, L cm, and
Q = 1.5 cal/cm 3 s Sketch the solutions obtained using two linear elements and one quadratic element and compare the results. n=2.
3.12 Set T 3 = T L in Eq (3.37) and show that the resulting system is equivalent to the uncoupled systems (3.38) and (3.39).
3.13 Calculate the heat flux at the left-hand boundary point from the solution obtained using linear elements in (3.38) differentiating (3.32), and compare with q. What happens? Now rewrite the solution in terms of Instead of L, and show that as 0, we do obtain q This is because the boundary condition (3.28) at x = 0 has been imposed “weakly” through the integral statement, and not forced to be satisfied by the solution, as in the case of (3.29) at x = L.
3.14 Now calculate the flux in Exercise 3.13 from Eq (3.39) Discuss the differences between this solution and the one in the previous problem.
3.15 Fill in the details leading from Eq (3.30) to (3.41).
3.16 Discretize Eq (3.27) using five linear elements of equal length and find the assembled global system of equations assuming constant K and q.
3.17 Starting from Eq (3.51) fill in the details leading to Eqs (3.52) and (3.53).
3.18 Verify the solution obtained for Example 3.1.
3.19 Solve Example 3.1 using three equal size elements.
3.20 Show that Eq (3.64) yields the element equations for the axisymmetric prob- lem with convective boundary conditions applied at either or both ends.
3.21 The spherical coordinates of the energy equation take the form:
Find the weak weighted residuals formulation for general convective boundary conditions at both ends.
3.22 Solve the energy equation in spherical coordinates using three linear elements for an insulating layer of a cryogenic storage tank with r 1 = 0.3 m and r 2 0.35 m The inner wall is in perfect contact with a metal sheet at 800 K, the outer wall is exposed to convection with T = 300 K and h = 25 W/m 2 K The heat conduction coefficient is K = 0.0017 W/mK.
3.23 Consider a solid tube of length 20 cm with uniform heat generation Q = 20,000 W/m 3 The linear surface is kept cool at T 1 = 20°C and the outer surface is insulated, K = 0.6 W/mK, r 1 = 10 cm.
(a) Solve using three linear elements.
(b) Solve using one quadratic element.
3.24 Solve Exercise 3.23 with a convective boundary condition at the right-hand side, h = 25 W/m 2 K and T = 100°C.
3.25 In a composite slab material 1 has a thickness of 2 cm, K 1 = 0.3 W/mK, h 1 10 W/m 2 K and the left end is in contact with fluid at T 1 = 35 o C Material 2 is 3 cm thick and in perfect contact at the interface with material 1 K 2 1 W/mK, h 2 = 5 W/m 2 K, and T 2 = 20°C Solve using two linear elements.
3.26 The error in finite element approximations behaves like e = Ch p , where C is a constant, h the uniform mesh size, and p a power that determines the order of the approximation We look at this expression as giving us a function of h.
To determine p, we perform two or more calculations using different uniform h ( e 1 ) h ( e 1 ) →
⎠⎟ Closure | 67 meshes Then, taking logarithms on both sides of the equation, we get
The constant in the equation indicates a shift in the line, allowing us to deduce and graph its slope, which represents the rate of convergence, denoted as p In Example 3.1, this approach is utilized to ascertain the effective order of convergence at the convective boundary.
3.27 Solve the problem of Example 3.2 using three equally spaced finite elements. Then obtain a solution using three linear elements of sizes = 0.2, 0.3, and = 0.5, and compare the solutions The analytical solution for this problem is given by
3.28 (a) Show that if x 2i = (x 2i –1 + x 2i+1)/2 is replaced into Eq (3.74) together with
Eqs (3.73) for the shape functions, it reduces to Eq (3.65) in terms of the element end points x 2i –1 and x 2i+1.
(b) Find the element shape functions for a quadratic element with nodes at x 1 = 0, x 2 = 1/3, and x 3 = 1.
3.29 Write the expressions for the shape functions of a cubic element in natural coordinates and the associated coordinate transformation Show that the trans- formation reduces to Eq (3.65) when x 2 = (2x 1 + x 4)/3 and x 3 = (x 1 + 2x 4)/3.
3.30 Adding time dependence to Exercise 3.22 and = 5 × 10 –7 m 2 /s, solve for the first two time steps using two equal length elements with T(x,0) = 80 and t = 10 s.
3.31 Consider the time-dependent heat conduction defined in Exercise 3.23 with
= 8 × 10 –5 m 2 /s and T(x,0) = 20°C Use a computer code to find the time evaluation to steady-state at the outer surface of the cylinder.
3.33 Solve Exercise 3.25 as a time-dependent problem with α1 = 4 × 10 –6 m 2 /s, α2= 6 × 10 –7 m 2 /s, and T (x,0) = 35°C.
3.34 Consider the problem of heat conduction in a circular ring discretized using n linear elements, as shown in (a) The x-coordinate is measured in the circular direction, as indicated in the figure, and, in the x-coordinate the problem can be considered one-dimensional The boundary conditions are that the temper- ature and heat flux must both be continuous at x = 0 Describe the structure of the coefficient matrix obtained from a finite element discretization using ne= p lnh+n c nC=0 n vs n e h h ( e 1 ) h ( e 2 ) h ( e 3 )
6 linear elements when the nodes are numbered in the two different ways indicated in (b) and (c) In both cases, find the half-bandwidth when n = 20.
3.35 Determine the temperature at a point 1.5 cm from the left end of the linear element Show, in the figure, if the end temperatures are 100°C and 33°C, respectively Also, determine the temperature gradient.
3.36 Find the nodal temperatures in a two-element model used to discretize a rod attached to a wall, as shown in the figure, where K = 75 W/m 2 C, h = 15 W/m 2 C,
L = 10 cm, and T = 60°C The temperature at the wall is T w = 150°C.
3.37 The deflection of a simply supported beam is governed by the following equa- tion and boundary conditions: and where E 1 is a constant and M is a distributed bending moment Derive the weak statement form of the governing equation.
3.38 Solve Example 3.1 using six linear elements of equal length, and compare results with Example 3.1 and Example 3.5.
3.39 Consider Example 3.6 with an added source term (which is Q/c p ) and eight linear elements.
(a) Find the matrices M and K and the vector F in expression (3.108). (b) Write Eq (3.109) for φ = 1/2 and t = 0.01 s.
(c) Repeat parts (a) and (b) using four quadratic elements.
3.40 Solve the transient one-dimensional heat conduction problem of Example 3.6 using the backwards implicit marching scheme What is the temperature after
3.41 Fill in the details leading to Eq (3.79).
3.42 Verify Eq (3.85) by filling in the missing details.
3.43 Starting from Eq (3.97), use (3.98) and (3.99) to obtain Eq (3.100). x 1 = 1 cm x 2 = 4 cm
Atkinson, K (1985) Elementary Numerical Analysis New York: John Wiley & Sons.
Chapra, S C and Canale, R P (1988) Numerical Methods for Engineers New York: McGraw-Hill. Conte, S D (1965) Elementary Numerical Analysis New York: McGraw-Hill.
Hageman, L A and Young, D M (1981) Applied Iterative Methods New York: Academic Press. Heinrich, J C and Pepper, D W (1999) Intermediate Finite Element Method: Fluid Flow and Heat
Transfer Applications Philadelphia: Taylor & Francis.
Isaacson, E and Keller, H B (1966) Analysis of Numerical Methods New York: John Wiley & Sons.
Numerical Recipes in C/C++ (1999) Cambridge: Cambridge University Press.
Numerical Recipes in FORTRAN (1999) Cambridge: Cambridge University Press.
Numerical Recipes in JAVA (1999) Cambridge: Cambridge University Press.
Pepper, D W and Baker, A J (1979) “A Simple One-Dimensional Finite Element Algorithm with Multidimensional Capabilities.” Num Heat Transfer 2:81–95.
Richtmeyer, R D and Morton, K W (1967) Difference Methods for Initial Value Problems New York: John Wiley & Sons.
Varga, R S (1962) Matrix Iterative Analysis Englewood Cliffs, N.J.: Prentice-Hall.
Young, R C (1989) Fast Matrix Solver, version 4.0 Marlborough, Mass.: Multipath Corp.
Zienkiewicz, O C (1977) The Finite Element Method London: McGraw-Hill.