Survey of Finite Element Shape Functions
Survey of Finite Element Shape Functions
ALAN LATTIMER
1. Overview In the nite element method (FEM), we construct piecewise polynomials to approximate the solution. These can be of any order, p, but for this discussion, we will restrict the discussion to piecewise cubic polynomials. There are several methods that can be used to generate these cubic polynomials. We discuss three of the most common types of cubic shape functions used: Lagrange, Hermite, and B-splines. One of the principle dierences between these shape functions is the behavior of the derivatives. We dene piecewise continuous and piecewise smooth functions as dened by Ewing (1985). Denition 1. A piecewise continuous function is a function f : [a, b] R such that (i) f is bounded on [a, b], (ii) The right limit f (x+) exists for all x [a, b), (iii) The left limit f (x) exists for all x (a, b], (iv) There is a nite partition of [a, b], a = x0 < x1 < < xn1 < xn = b, such that each subinterval (xi , xi+1 ) is continuous. To denote that a function is piecewise continuous we write f P W C[a, b] Denition 2. A piecewise smooth function is a continuous function f : [a, b] R such that there exists g P W C[a, b] and a constant C where
x
f (x) = C +
a
g(t) dt
ALAN LATTIMER
Denition 3. Let f : [a, b] R be a function such that f (n) (x) P W S(a, b), but f (n+1) (x) is discontinuous on (a, b). We say that f C n [a, b]. By convention, f (x) = f (0) (x). In order to use these cubic polynomials or basis functions in the FEM, we divide our doomain into subintervals (elements). We could then dene the set of basis functions on each element, but in practice this is inecient. Typically the basis functions are developed in a reference region and then mapped to each element as needed using a simple change of variables. Each section will discuss the particular reference region being used. While looking at these basis functions in an element-wise is important from a numerical method sense, it can also be helpful to view these functions from a global basis standpoint. This is especially advantageous for the Hermite and B-spline formulations. This global basis is formed by piecing together all of the functions from a given element into a set of global piecewise smooth functions. 2. Lagrange Cubic Shape Functions 2.1. Description. The rst type of basis function is chosen to match only the function values at a certain number of points. In particular, this requires four points in order to account for the four degrees of freedom. Further, we stipulate that each function should have the Kronecker delta property. That is ij = 1, 0, i=j i=j
We also note that by our construction, we have not taken the derivative into account. This omission will have signicant eects on the dierentiability of the global basis. 2.2. Formulation. We rst select our reference interval to be [1, 1]. We then subdivide our interval using four nodes 1 = x0 < x1 < x2 < x3 = 1 As described in Prenter (1975), we can form cubic polynomials using the Lagrange technique where
3
li (x) =
j=0,i=j
x xj , xi xj li (xj ) = ij .
for i = 0, 1, 2, 3.
This means that combining the four functions we can estimate the actual function on each element as follows
3
L3 (x) =
i=0
If our nodes are equally spaced, then we can compute the exact functions. Here x0 = 1, x1 = 1 , 3 1 x2 = , 3 x3 = 1
Given this we dene our basis functions as follows l0 (x) = (a1 a2 a3 ) l1 (x) = (a0 a2 a3 ) l2 (x) = (a0 a1 a3 ) l3 (x) = (a0 a1 a2 ) 3 3 1 9 = (a1 a2 a3 ) 2 4 2 16 27 3 3 3 = (a1 a2 a3 ) 2 2 4 8 3 3 3 27 = (a0 a1 a3 ) 4 2 2 8 1 3 3 9 = (a0 a1 a2 ) 2 4 2 16
We can see the plots for each of these functions in Figure 1. The rst and second derivatives of these basis functions are non-zero functions. If we look at the example where the domain [a, b] = [0, 8] is divided into four subintervals, then we can plot the complete global space as d L3 (x) in Figure 2. Globally we can see that L3 (x) P W S(a, b) and that the derivative dx 0 [a, b]. is not continuous. Therefore L3 C We can see the plots for each of these functions in Figure 1. The rst and second derivatives of these basis functions are non-zero functions. If we look at the example where the domain [a, b] = [0, 8] is divided into four subintervals, then we can plot the complete global space as d in Figure 2. Globally we can see that L3 (x) P W S(a, b) and that the derivative L3 (x) dx is not continuous. Therefore L3 C 0 [a, b].
ALAN LATTIMER
1.2
1.2
1.2
1.2
0.8
0.8
0.8
0.8
0.6
0.6
0.6
0.6
0.4
0.4
0.4
0.4
0.2
0.2
0.2
0.2
0.2
0.2
0.2
0.2
0.4
x_i
x_{i+1}
x_{i+2}
x_{i+3}
0.4
x_i
x_{i+1}
x_{i+2}
x_{i+3}
0.4
x_i
x_{i+1}
x_{i+2}
x_{i+3}
0.4
x_i
x_{i+1}
x_{i+2}
x_{i+3}
(a) l0 (x)
(b) l1 (x)
(c) l2 (x)
(d) l3 (x)
1.2
0.8
0.6
0.4
0.2
0.2
0.4 0 1 2 3 4 5 6 7 8
(a) Function
5 15
4 10 3
2 5 1
1 5 2
3 10 4
5 0 1 2 3 4 5 6 7 8
15 0 1 2 3 4 5 6 7 8
3. Hermite Cubic Shape Functions 3.1. Description. In order to provide for a greater amount of smoothness, we would like to impose a further condition that our basis belong to C 1 (a, b). Specically, we would like to know if there is a basis such that we can match the derivative and the function value at the endpoints of our interval [a, b]. From Prenter (1975), we see the answer to this question is yes and it is the cubic Hermite basis. 3.2. Formulation. First, we set out reference interval to [0, 1]. As before, in order to account for the four degrees of freedom, we will have four functions. However, these functions are split into two groups. The rst matches the function and the second matches the derivative. In Prenter (1975), the functions are dened as follows (x b)2 [(a b) + 2(a x)] (a b)3 (x a)2 [(a b) + 2(x b)] 1 (x) = (a b)3 (x a)(x b)2 0 (x) = (a b)2 (x a)2 (x b) 1 (x) = (a b)2 0 (x) = If a = x0 and b = x1 , then for 0 i, j 1 we have i (xj ) = ij i (xj ) = 0 i (xj ) = 0 i (xj ) = ij Now, we let a = 0 and b = 1 to obtain our basis H00 = H10 H01 H11 (x 1)2 (1 2x) = (x 1)2 (2x + 1) 1 x2 (1 + 2 2x) = = x2 (3 2x) 1 x(x 1)2 = = x(x 1)2 1 x2 (x 1) = x2 (x 1) = 1
ALAN LATTIMER
We can see the plot of these over four elements in Figure 3. Also, we can see them as a global basis in Figure 4. Based on the graphs of the derivatives, we can see that Hij C 1 [a, b].
1.2
0.8
0.6
0.4
0.2
0.2 0 1 2 3 4 5 6 7 8
1.2
0.8
0.6
0.4
0.2
0.2
x_i
x_{i+1}
x_{i+2}
(a) Function
1.5 6
0.5
0.5
1.5
x_i
x_{i+1}
x_{i+2}
x_i
x_{i+1}
x_{i+2}
Figure 4. Cubic Hermite Shape Functions - Hi0 is blue and Hi1 is red.
4. B-Spline Cubic Shape Functions 4.1. Description. Finally we would like to increase the smoothness requirement so that our basis functions belong to C 2 (a, b). First, we dene spline functions. Denition 4. A spline function, Sn (x) is a piecewise polynomial of degree n where up (n1) to the n 1 derivative, Sn (x) is continuous. Specically, Sn C n1 (x). So, by denition, a cubic spline function is a piecewise cubic polynomial that is twice continuously dierentiable. (Prenter (1975)) 4.2. Formulation. From Prenter (1975) we have the following basis functions
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0 2
10
12
5. Conclusions We see that each of these methods provides an increasing level of smoothness to the shape functions. As a consequence, the shape functions tend to have a smoothing eect to the
ALAN LATTIMER
0.7
0.6
0.5
0.4
0.3
0.2
0.1
x_{i2}
x_{i1}
x_i
x_{i+1}
x_{i+2}
(a) Function
2 1.5
1.5
2.5
x_{i2}
x_{i1}
x_i
x_{i+1}
x_{i+2}
x_{i2}
x_{i1}
x_i
x_{i+1}
x_{i+2}
problem. Depending on the problem itself, this may or may not the desired behavior. In addition, by raising the degree of the basis functions (p-renement), we hope to get faster convergence and thus reach our target error tolerance faster. However, Lagrange polynomials tend to oscillate as p increases. We are looking to see if the increased smoothness requirements will prevent the oscillations in the basis functions.
References Ewing, G. (1985). Calculus of variations with applications, Dover Pubns. Prenter, P. (1975). Splines and variational methods, Wiley New York.
Department of Mathematics, Virginia Tech, Blacksburg, VA 24073 E-mail address: [email protected]