2 12. polynomial interpolation › ... › chap_2_polynomials.pdf · 2.1 types of interpolation:...

39
Lecture Notes: Finite Element Analysis, J.E. Akin, Rice University, Copyright 2017-20, All rights reserved. 1 2-12. Polynomial interpolation Contents 2. POLYNOMIAL INTERPOLATION ....................................................................................................................... 1 2.1 TYPES OF INTERPOLATION ............................................................................................................................ 1 2.2 LAGRANGE ONE-DIMENSIONAL INTERPOLATION .......................................................................................... 2 2.3 NATURAL COORDINATES* ...........................................................................................................................15 2.4 HERMITE ONE-DIMENSIONAL INTERPOLATION* ..........................................................................................16 2.5 LAGRANGIAN QUADRILATERAL ELEMENTS ..................................................................................................19 2.6 LAGRANGIAN TRIANGULAR ELEMENTS ........................................................................................................22 2.7 SERENDIPITY QUADRILATERALS ...................................................................................................................28 2.8 HIERARCHICAL INTERPOLATION* .................................................................................................................30 2.9 SUMMARY AND NOTATION ........................................................................................................................35 2.10 EXERCISES .................................................................................................................................................38 2.10 INDEX ........................................................................................................................................................38 2.1 Types of interpolation: Three types of polynomial scalar interpolation will be used in most of the applications given later. The most common ones (Lagrange interpolation and Serendipity interpolation) use only the value of a function at every node on the element. In one- dimension, adding another node simply raises the polynomial degree by one. Such elements are usually employed to solve second order partial differential equations (PDEs). A third approach, Hermite interpolation, uses the value of a function and its spatial derivative(s) at every node on the element. In one-dimension, when using the function and just its slope, adding another node raises the polynomial degree by two. Such elements are usually employed to solve fourth order PDEs. When simulating plates or shells, the nodal degrees of freedom can be extended to include the curvature (second or higher derivatives) at the nodes. These types of interpolations are classified mathematically by the level of continuity between adjacent regions of interpolation. A function is said to be continuous when the function (n = 0) through its n-th derivative is continuous. All of the interpolation functions used here are on the element interior, but have very low continuity at their boundary with another element. The Lagrange interpolation and Serendipity interpolation functions only have their values (zero-th derivative) shared at the boundary of an adjacent element. Therefore, they are referred to as 0 elements. The Hermite family has the function and at least the first derivative(s) shared at the boundary with an adjacent element. Therefore, they are at least 1 elements, but can be 2 or higher in their continuity. In one-dimension it is easy to create elements, but it is very difficult to create them in two- and three-dimensions (while retaining local support). Hermite 1 interpolation is typically used on 4-th order PDEs (like beams and plates) and Hermite 2 interpolation is typically used on 6-th order PDEs (like ideal centrifuge flows).

Upload: others

Post on 05-Jul-2020

19 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 2 12. Polynomial interpolation › ... › Chap_2_Polynomials.pdf · 2.1 Types of interpolation: Three types of polynomial scalar interpolation will be used in most of the applications

Lecture Notes: Finite Element Analysis, J.E. Akin, Rice University, Copyright 2017-20, All rights reserved.

1

2-12. Polynomial interpolation

Contents 2. POLYNOMIAL INTERPOLATION ....................................................................................................................... 1

2.1 TYPES OF INTERPOLATION ............................................................................................................................ 1

2.2 LAGRANGE ONE-DIMENSIONAL INTERPOLATION .......................................................................................... 2

2.3 NATURAL COORDINATES* ........................................................................................................................... 15

2.4 HERMITE ONE-DIMENSIONAL INTERPOLATION* .......................................................................................... 16

2.5 LAGRANGIAN QUADRILATERAL ELEMENTS .................................................................................................. 19

2.6 LAGRANGIAN TRIANGULAR ELEMENTS ........................................................................................................ 22

2.7 SERENDIPITY QUADRILATERALS ................................................................................................................... 28

2.8 HIERARCHICAL INTERPOLATION* ................................................................................................................. 30

2.9 SUMMARY AND NOTATION ........................................................................................................................ 35

2.10 EXERCISES ................................................................................................................................................. 38

2.10 INDEX ........................................................................................................................................................ 38

2.1 Types of interpolation: Three types of polynomial scalar interpolation will be used in

most of the applications given later. The most common ones (Lagrange interpolation and

Serendipity interpolation) use only the value of a function at every node on the element. In one-

dimension, adding another node simply raises the polynomial degree by one. Such elements are

usually employed to solve second order partial differential equations (PDEs). A third approach,

Hermite interpolation, uses the value of a function and its spatial derivative(s) at every node on

the element. In one-dimension, when using the function and just its slope, adding another node

raises the polynomial degree by two. Such elements are usually employed to solve fourth order

PDEs. When simulating plates or shells, the nodal degrees of freedom can be extended to include

the curvature (second or higher derivatives) at the nodes.

These types of interpolations are classified mathematically by the level of continuity between

adjacent regions of interpolation. A function is said to be 𝐶𝑛continuous when the function (n =

0) through its n-th derivative is continuous. All of the interpolation functions used here are 𝐶∞

on the element interior, but have very low continuity at their boundary with another element. The

Lagrange interpolation and Serendipity interpolation functions only have their values (zero-th

derivative) shared at the boundary of an adjacent element. Therefore, they are referred to as

𝐶0elements. The Hermite family has the function and at least the first derivative(s) shared at the

boundary with an adjacent element. Therefore, they are at least 𝐶1elements, but can be 𝐶2or

higher in their continuity. In one-dimension it is easy to create 𝐶𝑛 elements, but it is very

difficult to create them in two- and three-dimensions (while retaining local support). Hermite 𝐶1

interpolation is typically used on 4-th order PDEs (like beams and plates) and Hermite 𝐶2

interpolation is typically used on 6-th order PDEs (like ideal centrifuge flows).

Page 2: 2 12. Polynomial interpolation › ... › Chap_2_Polynomials.pdf · 2.1 Types of interpolation: Three types of polynomial scalar interpolation will be used in most of the applications

Lecture Notes: Finite Element Analysis, J.E. Akin, Rice University, Copyright 2017-20, All rights reserved.

2

It is not necessary to require the same number of unknowns at each node, but that common

approach will be followed in this book. All of the interpolation functions to be used here have

been known for at least fifty years and can be found in handbooks on finite element analysis or

handbooks on mathematical analysis. However, experience shows that students do not find them

obvious. Therefore, several of them are derived herein and Matlab symbolic scripts are given to

illustrate how they can be derived in general.

2.2 Lagrange one-dimensional interpolation: Applying Lagrange interpolation requires

estimating the values of a function u(r) based on locations 𝑟𝑘 for 𝑘 = 1, … , 𝑛 at which the values

𝑢𝑘 are known. In this book, only equally spaced intervals, ∆𝑟, will be employed in the parametric

space. The expressions for the finite element interpolations are well known and will generally be

given without proof. For completeness, the one-dimensional (𝑛𝑝 = 1) quadratic 𝐶0

interpolation function, in unit coordinates will be derived here. Consider a three-node quadratic

line element (𝑛𝑛 = 3). A complete quadratic polynomial in one-dimension has three constants.

In the unit coordinate space ranging from zero to one, the three equally spaced parametric

locations are 𝑟1 = 0, 𝑟2 = 1 2⁄ and 𝑟3 = 1, and the non-dimensional measure of the parametric

range is 𝜆 = (𝑟3 − 𝑟1) = 1. Let the polynomial data fit be

𝑢(𝑟) = 𝑐1 + 𝑐2𝑟 + 𝑐3𝑟2 = [1 𝑟 𝑟2] {

𝑐1

𝑐2

𝑐3

} ≡ [𝑃(𝑟)]{𝑐} = 𝑷(𝑟)𝒄 = 𝒄𝑻𝑷𝑻(𝑟)

Where the row matrix 𝑷(𝑟)is the assumed polynomial and 𝒄 denotes a column matrix of

mathematical constants. A quadratic interpolation using three data-values is shown in Fig. 2.2-1

(where the interior node 𝑥2 does not have to be L/2, but it usually is).

Figure 2.2-1 A quadratic line interpolation between three values

The solution could be completed using these mathematical constants, but engineers prefer to

relate the solution to the actual solution physical values. To relate the three constants to physical

values note that there is an identity at each local parametric node:

𝑢(𝑟𝑘) ≡ 𝑢𝑘 = 𝑐1 + 𝑐2𝑟𝑘 + 𝑐3𝑟𝑘2 = [1 𝑟𝑘 𝑟𝑘

2] {

𝑐1

𝑐2

𝑐3

} , 1 ≤ 𝑘 ≤ 3

Evaluate this identity at the three uniformly spaced parametric locations (𝑟1 = 0, 𝑟2 = 0.5, 𝑟3 =1), where the three function values (𝑢1, 𝑢2, 𝑢3) occur, on at each node. These three identities can

be written together to yield a matrix identity:

Page 3: 2 12. Polynomial interpolation › ... › Chap_2_Polynomials.pdf · 2.1 Types of interpolation: Three types of polynomial scalar interpolation will be used in most of the applications

Lecture Notes: Finite Element Analysis, J.E. Akin, Rice University, Copyright 2017-20, All rights reserved.

3

{

𝑢(𝑟1)𝑢(𝑟2)𝑢(𝑟3)

} ≡ {

𝑢1

𝑢2

𝑢3

} = [1 0 02

1 0.5 0.52

1 1 12

] {

𝑐1

𝑐2

𝑐3

} , 𝑜𝑟 𝒖𝑒 = 𝑮 𝒄

where 𝒖𝑒denotes a column matrix containing the physical value of the solution at the nodes.

Each row of the square matrix, 𝑮, is just the polynomial row matrix evaluated at the local node

coordinates:

𝑮 ≡ [

𝑷(𝑟1)

𝑷(𝑟2)

𝑷(𝑟3)]

= [

1 𝑟1 𝑟12

1 𝑟2 𝑟22

1 𝑟3 𝑟32

],

Here, 𝑮 is non-singular and its inverse is computable, and it lets the initial constants, 𝒄, be

replaced by the spaced physical values, 𝒖𝑒:

𝒄 = 𝑮−𝟏 𝒖𝒆 = [ 1 0 0−3 4 −1 2 −4 2

] 𝒖𝒆.

Eliminating the non-physical constants in favor of the interpolation data yields the interpolation

equations, 𝑯(𝑟) in finite element analysis: 𝑢(𝑟) = 𝑷(𝑟) 𝑮−𝟏 𝒖𝒆 ≡ 𝑯(𝑟)𝒖𝒆. These functions are

also known as the shape functions because in structural analysis they actually describe the shape

of the deformed member. Note that the interpolation (shape) functions are formed from an

assumed polynomial, geometrical data about the local non-dimensional placement of the nodes,

and the physical values at those nodes:

𝑢(𝑟) = [1 𝑟 𝑟2] [ 1 0 0−3 4 −1 2 −4 2

] {

𝑢1

𝑢2

𝑢3

}

𝑢(𝑟) = [(1 − 3𝑟 + 2𝑟2) (4𝑟 − 4𝑟2) (−𝑟 + 2𝑟2)] {

𝑢1

𝑢2

𝑢3

}

𝑢(𝑟) = [𝐻1(𝑟) 𝐻2(𝑟) 𝐻3(𝑟)] {

𝑢1

𝑢2

𝑢3

}. (2.2-1)

Since 𝑢(𝑟) is a scalar quantity it is the same as its transpose: 𝑢(𝑟) = 𝑢(𝑟)𝑇 = 𝒖𝒆𝑇𝑯(𝑟)𝑇.

Also, since the interpolation functions, 𝑯(𝑟), are dimension-less the approximation u(r) takes

on the units of the item being interpolated, 𝒖𝒆. Having made this selection for the parametric

spatial form, the parametric local derivative is also known:

𝜕𝑢

𝜕𝑟(𝑟) =

𝜕𝑯(𝑟)

𝜕𝑟𝒖𝒆 = [

𝜕𝐻1

𝜕𝑟(𝑟)

𝜕𝐻2

𝜕𝑟(𝑟)

𝜕𝐻3

𝜕𝑟(𝑟)] {

𝑢1

𝑢2

𝑢3

}

𝜕𝑢

𝜕𝑟(𝑟) = [(−3 + 4𝑟) (4 − 8𝑟) (−1 + 4𝑟)] {

𝑢1

𝑢2

𝑢3

} (2.2-2)

Page 4: 2 12. Polynomial interpolation › ... › Chap_2_Polynomials.pdf · 2.1 Types of interpolation: Three types of polynomial scalar interpolation will be used in most of the applications

Lecture Notes: Finite Element Analysis, J.E. Akin, Rice University, Copyright 2017-20, All rights reserved.

4

since the derivative of any matrix contains the derivative of each of its terms. The above

quadratic interpolation functions and their parametric local derivatives can easily be obtained

using symbolic calculations. The symbolic Matlab script equivalent to the above derivation is

given in Fig. 2.2-2, while its output is given in Fig. 2.2-3. (Note: the latest releases of Matlab

have discontinued the use of the keyword ‘positive’ and just uses ‘real’.)

This quadratic interpolation also includes the subset for a linear interpolation or a constant

value. For a result that is linear, 𝑢2 = (𝑢1 + 𝑢3)/2 and the above quadratic simplifies to a linear

interpolation, which depends only on the two end values, namely

𝑢(𝑟) = (1 − 3𝑟 + 2𝑟2)𝑢1 + ((4𝑟 − 4𝑟2) 𝑢1 2⁄ + (4𝑟 − 4𝑟2) 𝑢3 2⁄ ) + (−𝑟 + 2𝑟2)𝑢3

𝑢(𝑟) = (1 − 3𝑟 + 2𝑟2 + 2𝑟 − 2𝑟2)𝑢1 + (2𝑟 − 2𝑟2 − 𝑟 + 2𝑟2)𝑢3

𝑢(𝑟) = (1 − 𝑟)𝑢1 + 𝑟𝑢3 = [(1 − 𝑟) 𝑟] {𝑢1

𝑢3}.

However, if we wanted just a linear approximation it is more common just to use a two node

element, as in Fig. 2.2-4, and denote its interpolation as

𝑢(𝑟) = [(1 − 𝑟) 𝑟] {𝑢1

𝑢2} = [𝐻1(𝑟) 𝐻2(𝑟)] {

𝑢1

𝑢2}. (2.2-3)

Likewise, if all the values are the same constant then the quadratic interpolation must

simplify to that constant. For that to be true, all the interpolation functions must sum to unity for

any and all values of r:

∑ 𝐻𝑘𝑘 (𝑟) ≡ 1 (2.2-4)

Page 5: 2 12. Polynomial interpolation › ... › Chap_2_Polynomials.pdf · 2.1 Types of interpolation: Three types of polynomial scalar interpolation will be used in most of the applications

Lecture Notes: Finite Element Analysis, J.E. Akin, Rice University, Copyright 2017-20, All rights reserved.

5

Figure 2.2-2 Matlab symbolic derivations of the quadratic line interpolation functions

To illustrate that (convergence) requirement use the constant data 𝑣 = 𝑢1 = 𝑢2 = 𝑢3. Then

the quadratic interpolation degenerates to

𝑢(𝑟) = (1 − 3𝑟 + 2𝑟2)𝑣 + (4𝑟 − 4𝑟2)𝑣 + (−𝑟 + 2𝑟2)𝑣,

or simply 𝑢(𝑟) = 𝑣, as expected. These two simplifications of a quadratic interpolation are also

confirmed by the Matlab symbolic calculations in Fig. 2.2-5. Since Lagrangian interpolations,

𝐻𝑘, sum to unity at any local point their values can be thought of as the percent of 𝑢1, 𝑢2, and 𝑢3

that contribute to the total interpolated value of u (r).

Since this interpolation approach exactly matches the data, 𝑢𝑘, at the control points, 𝑟𝑘, this is

a Lagrangian interpolation. In this book, linear through cubic 𝐶0 Lagrangian polynomials will be

applied to first and second order PDEs. Cubic through quintic 𝐶1 Hermite polynomials will be

utilized in fourth order PDEs. In general, a Lagrange interpolation function evaluated at its

control point will have a value of unity and it will be zero at any other control point:

𝐻𝑘(𝑟𝑗 , 𝑠𝑗 , 𝑡𝑗) = {1 𝑖𝑓 𝑗 = 𝑘0 𝑖𝑓 𝑗 ≠ 𝑘

≡ 𝛿𝑗𝑘 (2.2-5)

Page 6: 2 12. Polynomial interpolation › ... › Chap_2_Polynomials.pdf · 2.1 Types of interpolation: Three types of polynomial scalar interpolation will be used in most of the applications

Lecture Notes: Finite Element Analysis, J.E. Akin, Rice University, Copyright 2017-20, All rights reserved.

6

Figure 2.2-3 Output for line quadratic interpolation (L3_C0)

Figure 2.2-4 Linear line element interpolation functions (L2_C0)

The process so far only gives the interpolation and parametric derivative of the interpolated

quantity. Differential equations utilize the physical (x) derivatives of u(r), and once u(r) is known

it is usually necessary to find its gradient, 𝜕𝑢 𝜕𝑥 =⁄ 𝜕𝑢 𝜕𝑟⁄ 𝜕𝑟 𝜕𝑥⁄ . In order to do that, the

physical coordinate, x, must be defined in terms of the local parametric coordinate. Then the

nodal 𝑢𝑘 values are simply replaced by nodal 𝑥𝑘 values.

The above quadratic interpolation was described as interpolating a solution value, but it could

be applied to interpolating anything that is associated with the three nodes on the element. For a

straight line element only the two end point coordinates are needed for the geometry. A linear

geometry interpolation is obtained by having (2.2-3) interpolate the end coordinate values

instead of solution values:

Page 7: 2 12. Polynomial interpolation › ... › Chap_2_Polynomials.pdf · 2.1 Types of interpolation: Three types of polynomial scalar interpolation will be used in most of the applications

Lecture Notes: Finite Element Analysis, J.E. Akin, Rice University, Copyright 2017-20, All rights reserved.

7

𝑥(𝑟) = [(1 − 𝑟) 𝑟] {𝑥1

𝑥3} = 𝑥1 + 𝑟(𝑥3 − 𝑥1) = 𝑥1 + 𝑟 𝐿 (2.2-6)

where L is the physical length (or measure) of the element. This form automatically occurs (as

seen in Fig. 2.2-5) when the interior node is placed exactly at the mid-point of the physical

length. That is almost always the preferred way to describe the geometry. The unit coordinate

version of the 1D linear, quadratic, and cubic 𝐶0 Lagrangian interpolation functions are given in

Matlab script Lagrangian_1D_library.m shown in Fig. 2.2-6.

Figure 2.2-5 Constant and linear results are included in quadratic interpolation

Mathematical terminology defines that a function is 𝐶𝑛 continuous when the function and its

first n derivatives are continuous. Therefore, the prior Lagrangian elements are called 𝐶0 on their

boundaries, but are 𝐶∞ on the interior of the element. Several 𝐶0 interpolation functions for 1D,

2D, and 3D elements are given in the Matlab script el_shape_n_local_deriv.m which is also

included in the general library of finite element scripts. A subset of the one-dimensional

interpolations is included in Lagrangian_1D_library.m. Such a function accepts a numerical

Page 8: 2 12. Polynomial interpolation › ... › Chap_2_Polynomials.pdf · 2.1 Types of interpolation: Three types of polynomial scalar interpolation will be used in most of the applications

Lecture Notes: Finite Element Analysis, J.E. Akin, Rice University, Copyright 2017-20, All rights reserved.

8

Figure 2.2-6 Placing interpolation functions in a script for a library of 1D elements

value for the parametric coordinate(s) and returns numerical values of the interpolation functions

and numerical values for the (rectangular array) of local derivatives of those interpolation

functions. It will be shown later that such scripts are necessary to automate the numerical

integration processes almost always needed in a finite element simulation.

In general, for straight line elements using equal physical space increments between the

nodes causes this linear mapping between parametric and physical spaces. For this common

special case, 𝜕𝑥 𝜕𝑟 = 𝐿⁄ and the physical derivative of u(r) in a straight element is

𝜕𝑢

𝜕𝑥=

𝜕𝑢

𝜕𝑟

𝜕𝑟

𝜕𝑥=

𝜕𝑢

𝜕𝑟

1

𝐿 . (2.2-7)

Example 2.2-1 Given: A four-node cubic line element (L4_C0), with equal node x-spacing, has

temperature nodal values of u1 = 2 ℃, u2 = 3 ℃, u3 = 2 ℃, and u4 = −1 ℃. The physical

coordinates are x1 = 2 cm, x2 = 4 cm, x3 = 6 cm, and x4 = 8 cm, so the length of the element

is L = 6 cm. Fill in the element degree of freedom vector, ue, and the element coordinate vector,

xe. At local point r = 0.7 find the physical coordinate, x, the interpolated value of u(r), and the

physical gradient of the solution, ∂u ∂x⁄ . Solution: The element degrees of freedom are

𝐮𝐞𝐓 = [2 3 2 −1] ℃ (transposed) and its coordinates are 𝐱𝐞𝐓 = [2 4 6 8] cm. From

or the script Lagrange_1D_library.m the shape functions are:

𝐇(r) =1

2[(2 − 11r + 18r2 − 9r3) (18r − 45r2 + 27r3) …

(−9r + 36r2 − 27r3) (2r − 9r2 + 9r3)]

Page 9: 2 12. Polynomial interpolation › ... › Chap_2_Polynomials.pdf · 2.1 Types of interpolation: Three types of polynomial scalar interpolation will be used in most of the applications

Lecture Notes: Finite Element Analysis, J.E. Akin, Rice University, Copyright 2017-20, All rights reserved.

9

The equal spacing of the physical nodes causes a linear geometry mapping. That could be seen

by doing the actual multiplication, x(r) = 𝐇(r)𝐱𝐞 = (2 + 6r) cm = x1 + L r. So at x(0.7) =6.2 cm. In practice, the r coordinate is substituted into H to get its numerical values and then the

two arrays are simply multiplied:

x(r = 0.7) = 𝐇(0.7)𝐱𝐞 = [0.0165 − 0.0945 1.0395 0.0385] {

2468

} cm = 6.200 cm.

It happens that the u(r) values falls on a parabola, so they are actually quadratic. The cubic

interpolation automatically can capture a set of quadratic data, or linear data, or constant. That

could be seen by actual multiplication, u(r) = 𝐇(r)𝐮𝐞 = (2 + 6r − 9r2) ℃, so at the local point

u(0.7) = 1.79 ℃. Again, in practice, the process is automated by just multiplying the numerical

values of H and by the nodal degrees of freedom:

u(r = 0.7) = 𝐇(0.7)𝐮𝐞 = [0.0165 − 0.0945 1.0395 0.0385] {

2 3 2−1

} ℃ = 1.790 ℃.

Fig. 2.2-7 shows the red interpolated u(x) curve for these data. The blue line at the top represents

the range of the unit coordinates. The arrows show the interpolated values at the given r value.

To compute the physical gradient it is necessary to compute the Jacobian and its inverse.

Looking up the local derivatives from the same sources for the cubic gives

∂𝐇(r) ∂r⁄ = [(−11 + 36r − 27r2) (18 − 90r + 81r2) …

(−9 + 72r − 81r2) (2 − 18r + 27r2)]/2 The Jacobian is J(r) = ∂x ∂r⁄ = ∂𝐇(r) ∂r⁄ 𝐱𝐞. If the actual multiplication is done to get the

Jacobian as a function of r the result (in this case) is J(r) = 6 cm/1. That is, the Jacobian

(matrix) is constant. In practice, this process is automated by substituting the numerical value of

r into the expression

Je(0.7) = ∂x

∂r=

∂𝐇(0.7)

∂r𝐱𝐞 = [0.485 − 2.655 0.855 1.315] {

2468

} cm = 6.000 cm/1

The determinant and inverse are Je(0.7) = |Je(0.7)|, and Je(0.7)−1 = ∂r ∂x⁄ = 1 6⁄ cm. The

superscript ‘e’ was added as a reminder that element geometry was used. The local derivative is

∂u(0.7)

∂r= ∂𝐇(0.7) ∂r ⁄ 𝐮𝐞 = [0.485 − 2.655 0.855 1.315] {

2 3 2−1

} ℃ = −6.600 ℃/1.

The physical gradient is

∂u(r = 0.7) ∂x⁄ = ∂u(r = 0.7) ∂r ×⁄ ∂r(0.7) ∂x⁄ = (−6.600 ℃) (1

6 cm) = −1.100 ℃ cm⁄ .

Figure 2.2-8 shows the interpolated red gradient curve for these data. The blue line at the top

represents the range of the unit coordinates. The arrows show the interpolated values at the given

r value. This example could be thought of as computing one point on a graph of the solution and

Page 10: 2 12. Polynomial interpolation › ... › Chap_2_Polynomials.pdf · 2.1 Types of interpolation: Three types of polynomial scalar interpolation will be used in most of the applications

Lecture Notes: Finite Element Analysis, J.E. Akin, Rice University, Copyright 2017-20, All rights reserved.

10

its gradient. Of course, if the interpolations are done using natural coordinate interpolations the

exact same results are obtained. It is often desired to plot such a graph for all the elements at

once. The next example shows how to build such a graph for only one element.

Example 2.2-2 Given: Change the data given in Ex. 2.2-1 to 𝑢3 = 0, and plot the temperature

and the temperature gradient. Solution: The change in the EBC value means that the full cubic

nature is active (since the data no longer fits on a parabola). To create the graph it just necessary

to loop over the number of points in the parametric domain needed to make the physical domain

graph look smooth. At each point in the local coordinate the above example calculations are

repeated. The results are shown in Fig. 2.2-9. A script for creating the graph is given in Fig. 2.2-

10. If the lines for calculating arrays H and DLH were replaced with a call to the library of 1D

elements this process would work for any 1D Lagrangian element considered here. Such a script

is in the FEA analysis library as script Lib_1D_graph.m. (Think about how you could extent this

process to plot all elements in the mesh.) Note that if the given requirement was to plot the

magnitude of the heat flux vector then the process would be essentially the same. The material

thermal conductivity, K, would have also been input. After the gradient values were computer

and stored in its array Fourier’s Law would have been applied: �⃗� = −𝐾 ∇⃗⃗⃗𝑢. In other words, the

second plot would have its sign changed and its height scaled by K.

Example 2.2-3 Given: A 90 degree segment of a circular arc of radius 4 cm is modeled by a

single four-node line element in order to approximately determine the arc length. Plot the curved

element in physical space. Solution: Let the arc center point be at the x, y origin. Then the x-

and y-coordinates of the four nodes are

𝒙𝒆 = [4, 3.464, 2, 0]𝑐𝑚, 𝒚𝒆 = [0, 2, 3.464, 4]𝑐𝑚

To plot this one element, just alter the previous temperature graphing script by replacing the u

values with the y-values. The mesh curve is in Fig. 2.2-11, and the modified script to plot the

curve is in Fig. 2.2-12. The integer node numbers were added for clarity.

Page 11: 2 12. Polynomial interpolation › ... › Chap_2_Polynomials.pdf · 2.1 Types of interpolation: Three types of polynomial scalar interpolation will be used in most of the applications

Lecture Notes: Finite Element Analysis, J.E. Akin, Rice University, Copyright 2017-20, All rights reserved.

11

Figure 2.2-7 Using a cubic to exactly interpolate a parabola

Figure 2.2-8 The interpolated gradient of a parabola

Page 12: 2 12. Polynomial interpolation › ... › Chap_2_Polynomials.pdf · 2.1 Types of interpolation: Three types of polynomial scalar interpolation will be used in most of the applications

Lecture Notes: Finite Element Analysis, J.E. Akin, Rice University, Copyright 2017-20, All rights reserved.

12

Figure 2.2-9 Graph of a cubic element and its gradient

Page 13: 2 12. Polynomial interpolation › ... › Chap_2_Polynomials.pdf · 2.1 Types of interpolation: Three types of polynomial scalar interpolation will be used in most of the applications

Lecture Notes: Finite Element Analysis, J.E. Akin, Rice University, Copyright 2017-20, All rights reserved.

13

Figure 2.2-10 A Matlab script to graph a cubic element (L4_C0)

Page 14: 2 12. Polynomial interpolation › ... › Chap_2_Polynomials.pdf · 2.1 Types of interpolation: Three types of polynomial scalar interpolation will be used in most of the applications

Lecture Notes: Finite Element Analysis, J.E. Akin, Rice University, Copyright 2017-20, All rights reserved.

14

Figure 2.2-11 Plot of a single curved cubic element

Figure 2.2-12 Script to plot a single curved parametric element BOLD

Page 15: 2 12. Polynomial interpolation › ... › Chap_2_Polynomials.pdf · 2.1 Types of interpolation: Three types of polynomial scalar interpolation will be used in most of the applications

Lecture Notes: Finite Element Analysis, J.E. Akin, Rice University, Copyright 2017-20, All rights reserved.

15

2.3 Natural coordinates*: In addition to the above unit coordinate system, much of the finite

element literature also utilizes a parametric system set on −𝟏 ≤ 𝒂 ≤ 𝟏. Here, this is called a

natural coordinate system. The above symbolic process works just as well for deriving the

corresponding quadratic interpolation functions in that coordinate system, as shown by the

Matlab symbolic script in Fig. 2.3-1. Of course, the two parametric coordinates are related since

𝒓 = (𝒂 + 𝟏)/𝟐. Therefore, any interpolation function given in one coordinate system is easily

converted to the other. The natural coordinate system is popular in part because most of the data

required for numerical integration were originally published for such a domain.

Figure 2.3-1 The Lagrange quadratic line interpolation in natural coordinates

Page 16: 2 12. Polynomial interpolation › ... › Chap_2_Polynomials.pdf · 2.1 Types of interpolation: Three types of polynomial scalar interpolation will be used in most of the applications

Lecture Notes: Finite Element Analysis, J.E. Akin, Rice University, Copyright 2017-20, All rights reserved.

16

2.4 Hermite one-dimensional interpolation*: Polynomials that exactly interpolate the

data, 𝐮𝐤, and one or more of the physical derivatives at the control points, like 𝛛𝐮𝐤 𝛛𝐱 = 𝐮𝐤′⁄ =

𝛉𝐤, define a 𝐂𝟏 Hermite interpolation. In that case, there are two degrees of freedom at each

control point (𝐧𝐠 = 𝟐). Hermite interpolation uses a higher degree on mathematical continuity

between the elements. Hermite polynomials are at least 𝐂𝟏 on their boundary but also 𝐂∞ on the

interior of the element.

The one-dimensional (𝑛𝑝 = 1) three-node (𝑛𝑛 = 3) parametric space 𝐶1Hermite element

would have six constants(𝑛𝑖 = 𝑛𝑔 × 𝑛𝑛 = 6) so the polynomial must be of fifth degree . Since

the physical slope is included in the control data it is necessary to also define x(r). Since x is a

scalar, use the same quadratic interpolation process and set 𝑥(𝑟) = 𝑯(𝑟) 𝒙𝒆. Usually, the

physical nodes are also equally spaced. In that case, 𝑥2 = 𝑥1 + 𝐿 2⁄ and 𝑥3 = 𝑥1 + 𝐿, where 𝐿 is

the length of the region in one-dimensional physical space (𝑛𝑠 = 1). Then, the quadratic terms

cancel and the geometry mapping is linear 𝑥(𝑟) = (1 − 𝑟)𝑥1 + 𝑟 (𝑥1 + 𝐿) = 𝑥1 + 𝑟𝐿.

Repeating the above process used for the prior 𝐶0interpolation functions and inverting the

resulting 6×6 𝑮 matrix gives the three-node quintic Hermite interpolation:

𝑢(𝑟) = [𝑢1(1 − 23𝑟2 + 66𝑟3 − 68𝑟4 + 24𝑟5) + 𝜃1(𝑟 − 6𝑟2 + 13𝑟3 − 12𝑟4 + 4𝑟5)𝐿

+𝑢2(16𝑟2 − 32𝑟3 + 16𝑟4) + 𝜃2(−8𝑟2 + 32𝑟3 − 40𝑟4 + 16𝑟5)𝐿

+𝑢3(7𝑟2 − 34𝑟3 + 52𝑟4 − 24𝑟5) + 𝜃3(−𝑟2 + 5𝑟3 − 8𝑟4 + 4𝑟5)𝐿] (2.4-1)

and its slope (first derivative):

𝜃(𝑟) = 𝜕𝑢(𝑟) 𝜕𝑥⁄ = [𝑢1(−46𝑟 + 198𝑟2 − 272𝑟3 + 120𝑟4)/𝐿

𝜃1(1 − 12𝑟 + 39𝑟2 − 48𝑟3 + 20𝑟4) + 𝑢2(32𝑟 − 96𝑟2 + 64𝑟3)/𝐿

+𝜃2(−16𝑟 + 96𝑟2 − 160𝑟3 + 80𝑟4) + 𝑢3(14𝑟 − 102𝑟2 + 208𝑟3 − 120𝑟4)/𝐿

+𝜃3(−2𝑟 + 15𝑟2 − 32𝑟3 + 20𝑟4)]. (2.4-2)

Note that Hermite interpolations also depend on the physical element size (L) as well as the

parametric measure. The symbolic derivation of this quintic C1 line element is given in Fig. 2.4-

1. This element gives excellent results for beam bending applications and most fourth order

ordinary differential equations.

The simplest element in the 𝐶1 Hermite family is a two node (𝑛𝑛 = 2) straight line element.

It has four nodal constants (𝑛𝑖 = 4) and therefore defines a cubic polynomial in one-dimension.

It is famous for being the first beam bending element and is still widely used for that purpose,

even though a three node bending element is much more accurate. The symbolic derivation of

the cubic C1 line element is also given in Fig. 2.4-1 and yields the interpolation:

𝑢(𝑥) = 𝑢1(1 − 3𝑟2 + 2𝑟3) + 𝜃1(𝑟 − 2𝑟2 + 𝑟3)𝐿 + 𝑢2(3𝑟2 − 2𝑟3) + 𝜃2(𝑟3 − 𝑟2)𝐿. (2.4-3)

Those two C1 Hermite interpolations are included in script Hermite_1D_C1_library.m, as

shown in Fig. 2.4-2. Given the input of the local coordinate of a point and the physical length of

Page 17: 2 12. Polynomial interpolation › ... › Chap_2_Polynomials.pdf · 2.1 Types of interpolation: Three types of polynomial scalar interpolation will be used in most of the applications

Lecture Notes: Finite Element Analysis, J.E. Akin, Rice University, Copyright 2017-20, All rights reserved.

17

the element, that function returns the numerical values in the interpolation array, H, and the

numerical valuate of the physical derivative matrix, 𝑑𝑯 𝑑𝑥⁄ . It also returns derivatives

𝑑2𝑯 𝑑𝑥2⁄ and 𝑑3𝑯 𝑑𝑥3⁄ because they are usually needed to solve and/or post-process fourth

order differential equations. Also, the Hermite interpolations require the input of the physical

length, L, of the element.

Figure 2.4-1 First two C

1 Hermite line interpolations and physical derivatives

Page 18: 2 12. Polynomial interpolation › ... › Chap_2_Polynomials.pdf · 2.1 Types of interpolation: Three types of polynomial scalar interpolation will be used in most of the applications

Lecture Notes: Finite Element Analysis, J.E. Akin, Rice University, Copyright 2017-20, All rights reserved.

18

Figure 2.4-2 Symbolic derivation of the cubic C

1 line element interpolation

Page 19: 2 12. Polynomial interpolation › ... › Chap_2_Polynomials.pdf · 2.1 Types of interpolation: Three types of polynomial scalar interpolation will be used in most of the applications

Lecture Notes: Finite Element Analysis, J.E. Akin, Rice University, Copyright 2017-20, All rights reserved.

19

2.5 Lagrangian quadrilateral elements: The Lagrangian quadrilateral element

interpolations are just the products of the above one-dimensional form, used in each parametric

direction. Here, the interpolation functions for the Lagrange bi-linear four-node quadrilateral

will be developed, in unit coordinates, by using the product of the linear one-dimensional

functions. From Fig. 2.5-1 the first two nodes on the quadrilateral have the interpolations at s = 0

multiplied times the two r-interpolations, and so on:

𝐻1(𝑟, 𝑠) = 𝐻1(𝑟)𝐻1(𝑠) = (1 − 𝑟)(1 − 𝑠) = 1 − 𝑟 − 𝑠 + 𝑟𝑠

𝐻2(𝑟, 𝑠) = 𝐻2(𝑟)𝐻1(𝑠) = 𝑟(1 − 𝑠) = 𝑟 − 𝑟𝑠

𝐻3(𝑟, 𝑠) = 𝐻2(𝑟)𝐻2(𝑠) = 𝑟𝑠

𝐻4(𝑟, 𝑠) = 𝐻1(𝑟)𝐻2(𝑠) = (1 − 𝑟)𝑠 = 𝑠 − 𝑟𝑠,

so 𝑯(𝑟, 𝑠) = [(1 − 𝑟 − 𝑠 + 𝑟𝑠) (𝑟 − 𝑟𝑠) (𝑟𝑠) (𝑠 − 𝑟𝑠)] (2.5-1)

These are identical to those derived by a different approach in Fig. 2.4-2, and they satisfy the

requirement that ∑ 𝐻𝑘(𝑟, 𝑠) ≡ 1 𝑘 , as expected.

Figure 2.5-1 Four and eight node Lagrangian quadrilaterals in unit coordinates

This form is useful for lectures, but most quadrilaterals and hexahedra are formulated in

natural coordinates, -1 ≤ (a, b) ≤ 1 (because most integration data are tabulated for that space). In

natural coordinates the above Q4 Lagrange interpolation functions for node k can be expressed

simply as

𝐻𝑘(𝑎, 𝑏) =1

4(1 + 𝑎 𝑎𝑘)(1 + 𝑏 𝑏𝑘) (2.5-2)

where (𝑎𝑘 , 𝑏𝑘) are the parametric coordinates of the node. That is, (𝑎𝑘 , 𝑏𝑘) = (±1, ±1). The

most common quadrilateral elements are shown in a mesh in Fig. 2.5-3. The beginning of the

quadrilateral element interpolations are shown in function Lagrange_quadrilaterals.m in Fig.

2.5-4.

Page 20: 2 12. Polynomial interpolation › ... › Chap_2_Polynomials.pdf · 2.1 Types of interpolation: Three types of polynomial scalar interpolation will be used in most of the applications

Lecture Notes: Finite Element Analysis, J.E. Akin, Rice University, Copyright 2017-20, All rights reserved.

20

Figure 2.5-2 Symbolic derivation of four node Lagrangian quadrilateral interpolations

Page 21: 2 12. Polynomial interpolation › ... › Chap_2_Polynomials.pdf · 2.1 Types of interpolation: Three types of polynomial scalar interpolation will be used in most of the applications

Lecture Notes: Finite Element Analysis, J.E. Akin, Rice University, Copyright 2017-20, All rights reserved.

21

Figure 2.5-3 Mesh with Lagrangian quadrilaterals Q4, Q9, Q16, and Q25

Page 22: 2 12. Polynomial interpolation › ... › Chap_2_Polynomials.pdf · 2.1 Types of interpolation: Three types of polynomial scalar interpolation will be used in most of the applications

Lecture Notes: Finite Element Analysis, J.E. Akin, Rice University, Copyright 2017-20, All rights reserved.

22

Figure 2.5-4 Top of the Lagrange quadrilaterals script

2.6 Lagrangian triangular elements: The linear line, triangular, and tetrahedral elements

are “simplex elements” which are defined as having one more node than the dimension of their

space. For triangles and tetrahedra their Lagrange interpolations can be obtained by the same

process outlined for the quadratic line element by solving a small system of linear equations.

When the parametric nodes are equally spaced then the required matrix inversion succeeds.

These elements are usually expressed in unit coordinates or in baracentric (area or volume)

coordinates. This linear triangle is illustrated in Fig. 2.6-1 for three-dimensional (top) and two-

dimensional physical studies. In Fig. 2.6-1 it is important to notice that the inclined side in the

parametric space has the equation 𝑟 + 𝑠 = 1. That relation is needed when analytic integrals are

being evaluated in the parametric space.

Lagrangian triangular and tetrahedral elements interpolations always have the same complete

polynomial degree on their interior, on any faces, and along their edges. This assures that

adjacent two-dimensional elements of the same degree are continuous along the edges; and that

adjacent three-dimensional elements are continuous along their faces. For the complete linear

three-node triangle in unit coordinates the interpolation functions at the counter-clockwise node

coordinates of (0, 0), (1, 0) and (0, 1) are:

𝐻1(𝑟, 𝑠) = 1 − 𝑟 − 𝑠 𝐻2(𝑟, 𝑠) = 𝑟 𝐻3(𝑟, 𝑠) = 𝑠 (2.6-1)

and they satisfy the Lagrange requirement that ∑ 𝐻𝑘(𝑟, 𝑠) ≡ 1 𝑘 . The symbolic Matlab script in

Fig. 2.4-2 is easily changed to derive the three node triangle interpolations.

Page 23: 2 12. Polynomial interpolation › ... › Chap_2_Polynomials.pdf · 2.1 Types of interpolation: Three types of polynomial scalar interpolation will be used in most of the applications

Lecture Notes: Finite Element Analysis, J.E. Akin, Rice University, Copyright 2017-20, All rights reserved.

23

The values of all three Lagrange interpolation functions, and their sum, are sketched in Fig.

2.6-2. These functions can interpolate the surface that defines the spatial variation of the

unknown, u(r, s) between the three vertices. They can also be used to calculate the x- or y-

coordinates of any point by interpolating between the nodal coordinates. In the literature this is

called an isoparametric analysis because a single (iso) parametric function is used to represent

all spatial quantities: the unknown, the coordinates, any spatially dependent properties, etc.

Figure 2.6-1 Linear unit triangle in two- and three-dimensions

Figure 2.6-2 Linear triangle dimensionless interpolation and their sums

Page 24: 2 12. Polynomial interpolation › ... › Chap_2_Polynomials.pdf · 2.1 Types of interpolation: Three types of polynomial scalar interpolation will be used in most of the applications

Lecture Notes: Finite Element Analysis, J.E. Akin, Rice University, Copyright 2017-20, All rights reserved.

24

Note that the local derivatives of the three node triangle interpolation are constant:

[𝜕𝑯 𝜕𝑟⁄

𝜕𝑯 𝜕𝑠⁄] = [

−1 1 0−1 0 1

]

That means that the solution in that element will have a constant gradient. In the finite element

literature the three node triangle is often called the constant stress triangle.

The symbol T# (like T3, T6, T10, T15) is being used herein to indicate a triangular element

with a specific number of nodes that in turn define the degree of its interpolation functions. The

most common Lagrange triangular elements are shown in a mesh in Fig. 2.6-3. The complete

quadratic six-node triangle (T6) interpolations, numbered CCW with the corners first and then

the mid-side nodes, are:

𝐻1(𝑟, 𝑠) = 1 − 3𝑟 + 2𝑟2 − 3𝑠 + 4𝑟𝑠 + 2𝑠2

𝐻2(𝑟, 𝑠) = −𝑟 + 2𝑟2 𝐻3(𝑟, 𝑠) = −𝑠 + 2𝑠2

𝐻4(𝑟, 𝑠) = 4𝑟 − 4𝑟2 − 4𝑟𝑠 𝐻5(𝑟, 𝑠) = 4𝑟𝑠

𝐻6(𝑟, 𝑠) = 4𝑠 − 4𝑟𝑠 − 4𝑠2. (2.6-2)

They are derived symbolically in Fig. 2.6-4. Figure 2.6-5 shows the beginning of the Matlab

script Lagrangian_triangles.m which contains the above two interpolations functions. Those

interpolations are also included in the script el_shape_n_local_deriv.m which contains all of the

𝐶0 interpolation functions.

Example 2.6-1 Given: A parametric triangle is defined in the unit coordinate space. Find its

non-dimensional area (measure) by analytic integration and check the result using basic

geometry. Solution: The analytic integral for the non-dimensional area is

⊡ = ∫ ∫ 𝑑𝑠 𝑑𝑟 = ∫ 𝑠 |(1 − 𝑟)

0

1

0

1−𝑟

0

1

0 𝑑𝑟 = ∫ (1 − 𝑟)

1

0𝑑𝑟 = [𝑟 − 𝑟2 2⁄ ] |

10

=1

2

The parametric triangle is a right triangle. From geometry the area of a right triangle is simply

half of the base, ∆𝑟, times the height, ∆s. But the base and height both have dimensionless unit

values, so its parametric measure is also dimensionless:

⊡ =1

2 𝑏𝑎𝑠𝑒 × ℎ𝑒𝑖𝑔ℎ𝑡 =

1

2(1)(1) =

1

2

Page 25: 2 12. Polynomial interpolation › ... › Chap_2_Polynomials.pdf · 2.1 Types of interpolation: Three types of polynomial scalar interpolation will be used in most of the applications

Lecture Notes: Finite Element Analysis, J.E. Akin, Rice University, Copyright 2017-20, All rights reserved.

25

Figure 2.6-3 Mesh with T3, T6, T10 and T15 Lagrangian triangles

Page 26: 2 12. Polynomial interpolation › ... › Chap_2_Polynomials.pdf · 2.1 Types of interpolation: Three types of polynomial scalar interpolation will be used in most of the applications

Lecture Notes: Finite Element Analysis, J.E. Akin, Rice University, Copyright 2017-20, All rights reserved.

26

Figure 2.6-4 Symbolic derivation for a Lagrangian quadratic triangle

Page 27: 2 12. Polynomial interpolation › ... › Chap_2_Polynomials.pdf · 2.1 Types of interpolation: Three types of polynomial scalar interpolation will be used in most of the applications

Lecture Notes: Finite Element Analysis, J.E. Akin, Rice University, Copyright 2017-20, All rights reserved.

27

Figure 2.6-5 Top of a script to access Lagrange triangle interpolations

2.7 Tetrahedral elements in unit coordinates*: The extension of the three node

triangular element to the solid pyramid four node tetrahedra (P4), shown in Fig. 2.7-1, is straight

forward. The tetrahedron interpolation functions are often written in a condensed form using the

four coordinates of a baracentric (volume) coordinate system rather than the unit coordinate

system with three local coordinates employed here.

Figure 2.7-1 The linear tetrahedra simplex element (P4_C0)

The four-noded linear tetrahedron Lagrange interpolation functions and their derivatives in

unit coordinates, 0 ≤ r, s, t ≤ 1 are:

𝑯(𝑟, 𝑠, 𝑡) = [(1 − 𝑟 − 𝑠 − 𝑡) (𝑟) (𝑠) (𝑡)]

Page 28: 2 12. Polynomial interpolation › ... › Chap_2_Polynomials.pdf · 2.1 Types of interpolation: Three types of polynomial scalar interpolation will be used in most of the applications

Lecture Notes: Finite Element Analysis, J.E. Akin, Rice University, Copyright 2017-20, All rights reserved.

28

Figure 2.7-2 The unit tetrahedral coordinate system for P4 and P10 elements

For local nodes at (0, 0, 0), (1, 0, 0), (0, 1, 0), and (0, 0, 1). The ten-noded quadratic tetrahedron

Lagrange interpolation functions are

𝑯(𝑟, 𝑠, 𝑡) = [(2𝑟2 + 4rs + 4rt − 3r + 2𝑠2 + 4st − 3s + 2𝑡2 − 3t + 1), r(2r − 1), s(2s − 1), t(2t − 1),

−4r(r + s + t − 1), (4rs), −4s(r + s + t − 1), −4t(r + s + t − 1), (4rt), (4st)]

with four local nodes at corner coordinates of (0, 0, 0), (1, 0, 0), (0, 1, 0), (0, 0, 1), and with six

mid-edge coordinates of (0.5, 0, 0), (0.5, 0.5, 0), (0, 0.5, 0), (0, 0, 0.5), (0.5, 0, 0.5), and (0, 0.5,

0.5). When the coordinates are restricted to any face, like 𝑡 = 0, the interpolations reduce to

those on a triangle.

For any straight edged, and thus flat faced, tetrahedral element the geometric Jacobian matrix

is a constant given by

𝑱𝒆 = [

(𝑥2 − 𝑥1) (𝑥3 − 𝑥1) (𝑥4 − 𝑥1)

(𝑦2 − 𝑦1) (𝑦3 − 𝑦1) (𝑦4 − 𝑦1)

(𝑧2 − 𝑧1) (𝑧3 − 𝑧1) (𝑧4 − 𝑧1)]

𝑒

, |𝑱𝒆| = 6𝑉𝑒

since the determinate of this constant Jacobian is the ratio of the physical volume, 𝑉𝑒, divided by

the non-dimensional volume in the parametric coordinates, ⊡= 1 3⁄ (1) 1 2⁄ = 1 6⁄ .

2.8 Serendipity quadrilaterals*: In the very earliest days of finite element analysis the

computers had very severe limits on the available memory. Since the internal nodes of the

Lagrangian elements do not contribute to the required inter-element compatibility matrix algebra

was used to “condense” them out before assembly and to recover them after the solution was

obtained. Studies were undertaken to find higher order quadrilaterals that had few, if any,

internal nodes. The interpolation functions were found accidentally, so they were named after the

lucky men in the fairy tale called The Three Princes of Serendip.

The natural coordinates polynomial variation for Serendipity quadrilaterals are incomplete.

The polynomials for the first three members are:

𝑃(𝑎, 𝑏) = 𝑐1 + 𝑐2𝑎 +𝑐3𝑏 + 𝑐4𝑎𝑏 (for SQ4)

+ 𝑐5𝑎2 + 𝑐6𝑏2 + 𝑐7𝑎2𝑏 + 𝑐8𝑎𝑏2 (for SQ8)

+ 𝑐9𝑎3 + 𝑐10𝑏3 + 𝑐11𝑎3𝑏 + 𝑐12𝑎𝑏3 (for SQ12).

Page 29: 2 12. Polynomial interpolation › ... › Chap_2_Polynomials.pdf · 2.1 Types of interpolation: Three types of polynomial scalar interpolation will be used in most of the applications

Lecture Notes: Finite Element Analysis, J.E. Akin, Rice University, Copyright 2017-20, All rights reserved.

29

The corresponding interpolation arrays were first published in 1967. Unfortunately the widely

published interpolation functions for the SQ12 are incorrect due to a topographical error in the

original article. The incorrect functions do NOT satisfy the necessary condition that they must

sum to unity at any interior point, ∑ 𝐻𝑘𝑘 (𝑎, 𝑏) ≡ 1. The correct forms can be calculated

symbolically (like the algorithm in Fig. 2.6-4). Due to those widespread SQ12 errors, the correct

interpolations are given here. For the SQ8:

𝐻1(𝑎, 𝑏) = (1 − 2𝑎 − 2𝑏)(1 − 𝑎)(1 − 𝑏)

𝐻2(𝑎, 𝑏) = (1 − 2𝑎 + 2𝑏)(𝑏 − 1)𝑎

𝐻3(𝑎, 𝑏) = 𝑎𝑏(2𝑎 + 2𝑏 − 3)

𝐻4(𝑎, 𝑏) = 𝑏(𝑎 − 1)(2𝑎 − 2𝑏 + 1)

𝐻5(𝑎, 𝑏) = (𝑏 − 1)((2𝑎 − 1)2 − 1)

𝐻6(𝑎, 𝑏) = 𝑎(1 − (2𝑏 − 1)2)

𝐻7(𝑎, 𝑏) = 𝑏(1 − (2𝑎 − 1)2)

𝐻8(𝑎, 𝑏) = (𝑎 − 1)((2𝑏 − 1)2 − 1) (2.8-1)

For the SQ12:

𝐻1(𝑎, 𝑏) = (9𝑎2 + 9𝑏2 − 10)(1 − 𝑎)(1 − 𝑏)/32

𝐻2(𝑎, 𝑏) = (9𝑎2 + 9𝑏2 − 10)(1 + 𝑎)(1 − 𝑏)/32

𝐻3(𝑎, 𝑏) = (9𝑎2 + 9𝑏2 − 10)(1 + 𝑎)(1 + 𝑏)/32

𝐻4(𝑎, 𝑏) = (9𝑎2 + 9𝑏2 − 10)(1 − 𝑎)(1 + 𝑏)/32

𝐻5(𝑎, 𝑏) = (1 − 3𝑎 − 𝑎2 + 3𝑎3)(1 − 𝑏)9/32

𝐻6(𝑎, 𝑏) = (1 − 3𝑏 − 𝑏2 + 3𝑏3)(1 + 𝑎)9/32

𝐻7(𝑎, 𝑏) = (1 + 3𝑎 − 𝑎2 − 3𝑎3)(1 + 𝑏)9/32

𝐻8(𝑎, 𝑏) = (1 + 3𝑏 − 𝑏2 − 3𝑏3)(1 − 𝑎)9/32

𝐻9(𝑎, 𝑏) = (1 + 3𝑎 − 𝑎2 − 3𝑎3)(1 − 𝑏)9/32

𝐻10(𝑎, 𝑏) = (1 + 3𝑏 − 𝑏2 − 3𝑏3)(1 + 𝑎)9/32

𝐻11(𝑎, 𝑏) = (1 − 3𝑎 − 𝑎2 + 3𝑎3)(1 + 𝑏)9/32

𝐻12(𝑎, 𝑏) = (1 − 3𝑏 − 𝑏2 + 3𝑏3)(1 − 𝑎)9/32 (2.8-2)

Of course, the SQ4 interpolation is identical to the Lagrangian Q4 given in (2.5-2). The

Serendipity quadrilateral elements SQ4, SQ8, and SQ12 are included in the provided element

library in function Serendipity_quads.m. A mesh with the most common Serendipity

quadrilaterals is shown in Fig. 2.8-1. All of the Serendipity quadrilateral elements shown there

were created with the structured mesh generator presented in Appendix A.

Page 30: 2 12. Polynomial interpolation › ... › Chap_2_Polynomials.pdf · 2.1 Types of interpolation: Three types of polynomial scalar interpolation will be used in most of the applications

Lecture Notes: Finite Element Analysis, J.E. Akin, Rice University, Copyright 2017-20, All rights reserved.

30

Figure 2.8-1 Mesh of Serendipity quadrilaterals SQ8, SQ12, SQ16, and SQ17

2.9 Hierarchical interpolation*: Another type of interpolation that is useful for adaptive

analysis, is called hierarchical functions. The unique feature of these interpolations is that the

higher order polynomials, with a new type of degree of freedom, are simply added the lower

order ones. This concept is shown in one-dimension in Fig. 2.9-1. Thus, to get new functions you

simply add some terms to the old functions. To illustrate this concept let us return to the

linear element in local natural coordinates. In that element:

𝑢(𝑎) = 𝐻1(𝑎)𝑢1𝑒 + 𝐻2(𝑎)𝑢2

𝑒 (2.9-1)

where the two Hj are the linear interpolations given in (4.10). The goal is to generate a quadratic

interpolation form that will not destroy the lower order functions, Hj(a). The key to

accomplishing that is to note that the second derivative of (2.9-1) is everywhere zero. Thus,

introduce a new degree of freedom related to the second derivative of u(x) which will not affect

the linear terms. Figure 2.9-1 shows the linear element with a third control node at the midpoint (a = 0) to be associated with the quadratic additions. There the new degree of freedom be the

second local derivative, d2ue dx2⁄ . Upgrade the lower order approximation by adding a

polynomial that is one degree higher (quadratic):

𝑢(𝑎) = 𝐻1(𝑎)𝑢1𝑒 + 𝐻2(𝑎)𝑢2

𝑒 + 𝐻3(𝑎) 𝑑2𝑢𝑒 𝑑𝑥2⁄ . (2.9-2)

This is called increasing the hierarchic of the approximation, and such elements are known as

hierarchical elements. When hierarchical functions are utilized, the element matrices for a p-th

order polynomial are partitions of the element matrices for a (p+1) order polynomial.

Page 31: 2 12. Polynomial interpolation › ... › Chap_2_Polynomials.pdf · 2.1 Types of interpolation: Three types of polynomial scalar interpolation will be used in most of the applications

Lecture Notes: Finite Element Analysis, J.E. Akin, Rice University, Copyright 2017-20, All rights reserved.

31

Figure 2.9-1 Concept of hierarchical shape functions

The hierarchical quadratic addition is: 𝐻3(𝑎) = 𝑐1 + 𝑐2𝑎 + 𝑐3𝑎2. The three constants are

found from the conditions that 𝐻3 vanishes at the two original nodes, so as not to change 𝐻1 and

𝐻2, and the second derivative is unity at the new midpoint node. There are various functions that

satisfy those conditions, after being multiplied by a scaling constant. The element square matrix

always involves an integral of the product of the derivatives of the interpolation functions. If

those derivatives were orthogonal then they would result in a diagonal square matrix. That would

be very desirable. It is well known that integrals of products of Legendre polynomials are

orthogonal. This suggests that it would be useful to pick interpolation functions that are integrals

of Legendre polynomials so that their derivatives are Legendre polynomials. The first six

Legendre polynomials are

𝑃0(𝑎) = 1 𝑃1(𝑎) = 𝑎 𝑃2(𝑎) = (3𝑎2 − 1)/2 𝑃3(𝑎) = (5𝑎3 − 3𝑎)/2 𝑃4(𝑎) = (35𝑎4 − 30𝑎2 + 3)/8 𝑃5(𝑎) = (63𝑎5 − 70𝑎3 + 15𝑎)/8 𝑃6(𝑎) = (231𝑎6 − 315𝑎4 + 105𝑎2 − 5)/16 To avoid round off error and unnecessary calculations, there are recursion relations that should

be used when computing the above Legendre polynomials. To create a family of functions for

use as hierarchical interpolation functions the properties of Legendre polynomials suggest using

the relation defining the sequence of functions 𝜓𝑗(𝑎) = 𝑃𝑗(𝑎) − 𝑃𝑗−2(𝑎). The first five are

𝜓2(𝑎) = 3(𝑎2 − 1)/2

𝜓3(𝑎) = 5(𝑎3 − 𝑎)/2

𝜓4(𝑎) = 7(5𝑎4 − 6𝑎2 + 1)/8

𝜓5(𝑎) = 9(7𝑎5 − 10𝑎3 + 3𝑎)/8

𝜓6(𝑎) = 11(21𝑎6 − 35𝑎4 + 15𝑎2 − 1)/16 (2.9-3)

Page 32: 2 12. Polynomial interpolation › ... › Chap_2_Polynomials.pdf · 2.1 Types of interpolation: Three types of polynomial scalar interpolation will be used in most of the applications

Lecture Notes: Finite Element Analysis, J.E. Akin, Rice University, Copyright 2017-20, All rights reserved.

32

When 𝜓2is divided by 3 its second derivative is unity. Likewise, all of the 𝜓𝑗 functions can be

scaled with a constant, 𝜆𝑗, to have the j-th (tangential) derivative become unity and be zero at the

vertices 𝑎 = ±1. Therefore, the midpoint hierarchical interpolation functions are taken as

𝐻𝑗(𝑎) = 𝜓𝑗−1(𝑎)/𝜆𝑗−1, 𝑗 ≥ 3 (2.9-4)

Figure 2.9-3 illustrates how adding 𝜓2 through 𝜓4 to a two-node linear line element (or edge)

can be used to enrich the element from degree p = 1 through p = 4. Figure 2.8-4 shows that the

quadratic or cubic line elements used before can also be enriched to higher degree polynomials

by adding hierarchical functions beginning with one degree higher. Note that if the above

domain was the edge of a two-dimensional element then the above derivatives would be viewed

as tangential derivatives on that edge. The same is true for edges of solid elements.

The hierarchical interpolations are most useful in adaptive programs having an error estimator.

Changing just the polynomial degree in a mesh is called p-adaptivity. Changing the element sizes

due to local error estimates is called h-adaptivity. Rather than change the mesh to make the

element smaller in regions of high error its (and any element neighbor’s) polynomial degree can

be increased by one. Conversely the degree can be decreased by one rather than making the

element larger in regions of low error. Of course, both changes can be made to reduce the error,

and that is called hp-adaptivity. It has been shown that such an approach gives the fastest error

reduction. However, it is a challenge to program that sort of adaptivity, but it is quite rewarding

when accomplished.

The hierarchical line (edge) element has more degrees of freedom (DOF) at a hierarchical

node than at the end vertices (or other standard nodes). That slightly complicates the system

equation vector subscript (herein index) that must be used to gather or scatter all of the element’s

DOF. That requires having the number of DOF at every node. That list, say dof_n, is easily built

by first setting them all to zero. Then, as the element connections (and element type) are read the

first element to connect to a node will define the number of DOF at that node. In other words, a

vertex node would be set to the number of DOF for a vertex (ng) while a hierarchical node

would be set to the number of enriching hierarchical DOF (nh), etc. One other integer array, of

size (nm + 1), is required containing the sum of all of the prior DOF on the previous nodes.

Denote that array with the name prior. Then the first entry is prior (1) = 0 and the last entry

defines the total number of equations to be solved, prior (nm + 1) = nd, and is used to allocate

memory for the system square and column matrices. In other words, the number of system dof

occurring before node j is prior (j) and the number of DOF at that node is

𝑛𝑔𝑗= 𝑝𝑟𝑖𝑜𝑟 (𝑗 + 1) − 𝑝𝑟𝑖𝑜𝑟 (𝑗) (2.9-5)

These minor changes are included in the function get_element_index_varies.m which would

replace the function get_element_index.m which is used throughout this text.

Page 33: 2 12. Polynomial interpolation › ... › Chap_2_Polynomials.pdf · 2.1 Types of interpolation: Three types of polynomial scalar interpolation will be used in most of the applications

Lecture Notes: Finite Element Analysis, J.E. Akin, Rice University, Copyright 2017-20, All rights reserved.

33

Figure 2.9-3 Creating Lagrange and hierarchical Legendre polynomials to degree 4

Figure 2.9-4 Any Lagrangian line element can be hierarchically enriched

Page 34: 2 12. Polynomial interpolation › ... › Chap_2_Polynomials.pdf · 2.1 Types of interpolation: Three types of polynomial scalar interpolation will be used in most of the applications

Lecture Notes: Finite Element Analysis, J.E. Akin, Rice University, Copyright 2017-20, All rights reserved.

34

Example 2.9-1 Given: A two element mesh of linear elements (L2) is each enriched with three

hierarchical DOF at their mid-points. Construct the prior array to determine the total number of

unknowns and the system index for each element. Solution: First sketch the mesh, the number of

mesh nodes is nm = 5, the number of elements is ne = 2, the number of nodes per element is

nn = 3. This application sets the number of unknowns at any standard node as ng = 1 and the

number of unknowns at a hierarchical node as nh = 3.

DOF 1 3 1 3 1 Connections: [1 2 3]

*----------*----------*----------*----------* [3 4 5]

Node 1 2 3 4 5

Eqs. 1 2,3,4 5 6,7,8 9

The first (1 × nm) system degree of freedom array is dof_n = [ng nh ng nh ng] =

[1 3 1 3 1] and the second (1 × (nm + 1)) DOF array is

prior = [0 (0 + ng) (ng + nh) (ng + nh + ng) ⋯ ] = [0 1 4 5 8 9]

The last entry sets the size of the system rows and columns to be 𝑛𝑑 = 9. The DOF numbers for

any standard node, say k, in the mesh are [(prior(k) + 1) (prior(k) + 2) ⋯ (prior(k) + ng)]

and at a hierarchical node ng is replaced with nh. The index of system equation numbers for an

element is built up by appending that list for each of its nodes. Therefore, the first and second

elements index arrays, for 𝑛𝑖 = 5 DOF per element, are: [{0 + 1} {(1 + 1) (1 + 2) (1 + 3)} {4 + 1}] = [1 2 3 4 5] [{4 + 1} {(5 + 1) (5 + 2) (5 + 3)} {8 + 1}] = [5 6 7 8 9].

2.10 List of Examples Ex 2.2-1 Numerical interpolation value and slope using a four-node line element, L4 Ex 2.2-2 Change one value in Ex 2.2-2 and graph with Matlab Ex 2.2-3 Approximate and graph a circular arc using a four-node line element, L4 Ex 2.6-1 Exactly integrate the local area of a parametric triangle (T3, or T6, etc.) Ex 2.9-1 Example of hierarchical line interpolation, with scatter

Page 35: 2 12. Polynomial interpolation › ... › Chap_2_Polynomials.pdf · 2.1 Types of interpolation: Three types of polynomial scalar interpolation will be used in most of the applications

Lecture Notes: Finite Element Analysis, J.E. Akin, Rice University, Copyright 2017-20, All rights reserved.

35

2.11 Summary and Notation 𝑛𝑏 ≡ Number of boundary segments 𝑛𝑒 ≡ Number of elements

𝑛𝑔 ≡ Number of generalized DOF per node 𝑛𝑖 ≡ Element independent DOF

𝑛𝑚 ≡ Number of mesh nodes 𝑛𝑛 ≡ Number of nodes per element

𝑛𝑝 ≡ Dimension of parametric space 𝑛𝑠 ≡ Dimension of physical space

b = boundary segment number e = element number

Element interpolation functions given in this chapter

Element

Type

Example or

(Equation)

Polynomial

Degree

𝑛𝑝

𝑛𝑔

𝑛𝑛

𝑛𝑖

Continuity

Level

Lagrange L2 (2.2-6) 1 1 1 2 2 𝐶0

Lagrange L3 (2.2-1) 2 1 1 3 3 𝐶0

Lagrange L4 2.2-1,2,3 3 1 1 4 4 𝐶0

Hermite L2C1 (2.4-3) 3 1 2 2 4 𝐶1

Hermite L3C1 (2.4-1) 5 1 2 3 6 𝐶1

Hermite L2C2 Summary 5 1 3 2 6 𝐶2

Lagrange T3 2.6-1 (2.6-1) 1 2 1 3 3 𝐶0

Lagrange T6 (2.6-2) 2 2 1 6 6 𝐶0

Lagrange Q4 (2.5-1,2) 1+ 2 1 4 4 𝐶0

Serendipity SQ8 (2.7-1) 2+ 2 1 8 8 𝐶0

Serendipity SQ12 (2.7-2) 3+ 2 1 12 12 𝐶0

Lagrange P4 2.6, S 1 3 1 4 4 𝐶0

Lagrange P10 Summary 2 3 1 10 10 𝐶0

Lagrange H8 Summary 1 3 1 8 8 𝐶0

Transpose of a product: (𝐀 𝐁 𝐂)𝐓 = 𝐂𝐓 𝐁𝐓 𝐀𝐓

Parametric interpolations: 𝑢(𝑟) = 𝑯(𝑟) 𝜹𝒆 = ∑ 𝐻𝑘(𝑟) 𝛿𝑘𝑒

𝒌 = 𝜹𝒆𝑻𝑯(𝑟)𝑻

Natural line coordinates: −1 ≤ 𝑎 ≤ +1; etc. b, c, so 𝑟 = (𝑎 + 1) 2⁄ etc. s, t.

Unit coordinates: 0 ≤ 𝑟 ≤ 1; etc. s, t, so 𝑎 = (2𝑟 − 1) etc. b, c.

Measure of unit coordinate line: ⊡ = ∫ 𝑑𝑟1

0= 1,

Measure of natural coordinate line: ⊡ = ∫ 𝑑𝑎1

−1= 2

Measure of unit coordinate triangle: ⊡ = ∫ ∫ 𝑑𝑠 𝑑𝑟 =1−𝑟

0

1

01 2⁄

Measure of unit coordinate square: ⊡ = ∫ ∫ 𝑑𝑠 𝑑𝑟 =1

0

1

01

Page 36: 2 12. Polynomial interpolation › ... › Chap_2_Polynomials.pdf · 2.1 Types of interpolation: Three types of polynomial scalar interpolation will be used in most of the applications

Lecture Notes: Finite Element Analysis, J.E. Akin, Rice University, Copyright 2017-20, All rights reserved.

36

Measure of natural coordinate square: ⊡ = ∫ ∫ 𝑑𝑎 𝑑𝑏 =1

−1

1

−14

Lagrange linear 𝐶0 line interpolations (𝑛𝑝 = 1), in unit coordinates: ,

𝑯(𝑟) = [(1 − 𝑎)/2 (1 + 𝑎)/2], local nodes at (-1) and (1), 𝑛𝑛 = 2, 𝑛𝑔 = 1,

𝜹𝒆𝑻 = [𝑢1 𝑢2]

Lagrange linear 𝐶0 line interpolations (𝑛𝑝 = 1), in natural coordinates: ,

𝑯(𝑎) = [(1 − 𝑟) 𝑟], local nodes at (0) and (1), 𝑛𝑛 = 2, 𝑛𝑔 = 1, 𝜹𝒆𝑻 = [𝑢1 𝑢2]

Lagrange quadratic 𝐶0 line interpolations (𝑛𝑝 = 1), in unit coordinates:

𝑯(𝑟) = [(1 − 3𝑟 + 2𝑟2) (4𝑟 − 4𝑟2) (−𝑟 + 2𝑟2)], local nodes at (0), (1/2), and (1) ,

𝑛𝑛 = 3, 𝑛𝑔 = 1, 𝜹𝒆𝑻 = [𝑢1 𝑢2 𝑢3]

Lagrange cubic 𝐶0 line interpolations (𝑛𝑝 = 1), in unit coordinates:

𝑯(𝑟) =1

2[(2 − 11𝑟 + 18𝑟2 − 9𝑟3) (18𝑟 − 45𝑟2 + 27𝑟3) (−9𝑟 + 36𝑟2 − 27𝑟3) …

(2𝑟 − 9𝑟2 + 9𝑟3)], local nodes at (0), (1/3), (2/3) and (1), 𝑛𝑛 = 4, 𝑛𝑔 = 1,

𝜹𝒆𝑻 = [𝑢1 𝑢2 𝑢3 𝑢4]

Lagrange linear triangle 𝐶0 interpolation (𝑛𝑝 = 2), in unit coordinates:

𝑯(𝑟, 𝑠) = [(1 − 𝑟 − 𝑠) (𝑟) (𝑠)], local nodes at (0, 0), (1, 0), and (0, 1), 𝑛𝑛 = 3,

𝑛𝑔 = 1, 𝜹𝒆𝑻 = [𝑢1 𝑢2 𝑢3].

Lagrange linear triangle 𝐶0 interpolation in physical coordinates

𝑯 = [𝐻1 𝐻2 𝐻3]; 𝐻𝑖(𝑥, 𝑦) = 1

2𝐴𝑒 [𝑎𝑖 + 𝑏𝑖𝑥 + 𝑐𝑖𝑦]

2𝐴𝑒 = 𝑎1 + 𝑎2 + 𝑎3 = 𝑏2𝑐3 − 𝑏3𝑐2: 𝑖𝑗𝑘 → 123 → 231 → 312

𝑎𝑖 = 𝑥𝑗𝑦𝑘 − 𝑥𝑘𝑦𝑗 , 𝑏𝑖 = 𝑦𝑗 − 𝑦𝑘, 𝑐𝑖 = 𝑥𝑘 − 𝑥𝑗

𝑎1 = 𝑥2𝑦3 − 𝑥3𝑦2, 𝑎2 = 𝑥3𝑦1 − 𝑥1𝑦3, 𝑎3 = 𝑥1𝑦2 − 𝑥2𝑦1 𝑏1 = 𝑦2 − 𝑦3, 𝑏2 = 𝑦3 − 𝑦1, 𝑏3 = 𝑦1 − 𝑦2

𝑐1 = 𝑥3 − 𝑥2, 𝑐2 = 𝑥1 − 𝑥3, 𝑐3 = 𝑥2 − 𝑥1

Lagrange quadratic triangle 𝐶0 interpolation (𝑛𝑝 = 2), in unit coordinates:

𝑯(𝑟, 𝑠) = [(1 − 3𝑟 + 2𝑟2 − 3𝑠 + 4𝑟𝑠 + 2𝑠2) (−𝑟 + 2𝑟2) (−𝑠 + 2𝑠2)

(4𝑟 − 4𝑟2 − 4𝑟𝑠) (4𝑟𝑠) (4𝑠 − 4𝑟𝑠 − 4𝑠2)], local corner vertices at (0, 0),

(1, 0), and (0, 1), 𝑛𝑛 = 6, 𝑛𝑔 = 1, 𝜹𝒆𝑻 = [𝑢1 𝑢2 𝑢3 𝑢4 𝑢5 𝑢6].

Lagrange Bi-linear quadrilateral 𝐶0 interpolation (𝑛𝑝 = 2), in unit coordinates:

𝑯(𝑟, 𝑠) = [(1 − 𝑟 − 𝑠 + 𝑟𝑠) (𝑟 − 𝑟𝑠) (𝑟𝑠) (𝑠 − 𝑟𝑠)], local nodes at (0, 0),

(1, 0), (1, 1) and (0, 1), 𝑛𝑛 = 4, 𝑛𝑔 = 1.

Lagrange Bi-linear quadrilateral 𝐶0 interpolation (𝑛𝑝 = 2), in

natural coordinates (a, b): −1 ≤ 𝑎, 𝑏 ≤ 1; 𝐻𝑘(𝑎, 𝑏) =1

4(1 + 𝑎 𝑎𝑘)(1 + 𝑏 𝑏𝑘), 𝑎𝑘 = ±1,

Page 37: 2 12. Polynomial interpolation › ... › Chap_2_Polynomials.pdf · 2.1 Types of interpolation: Three types of polynomial scalar interpolation will be used in most of the applications

Lecture Notes: Finite Element Analysis, J.E. Akin, Rice University, Copyright 2017-20, All rights reserved.

37

𝑏𝑘 = ±1, 𝜹𝒆𝑻 = [𝑢1 𝑢2 𝑢3 𝑢4].

Lagrange Tri-linear hexahedra 𝐶0 interpolation (𝑛𝑝 = 3), in natural coordinates (a, b, c):

𝐻𝑘(𝑎, 𝑏, 𝑐) =1

8(1 + 𝑎 𝑎𝑘)(1 + 𝑏 𝑏𝑘)(1 + 𝑐 𝑐𝑘), 𝑎𝑘 = ±1, 𝑏𝑘 = ±1, 𝑐𝑘 = ±1 ,

𝜹𝒆𝑻 = [𝑢1 𝑢2 𝑢3 𝑢4 𝑢5 𝑢6 𝑢7 𝑢8].

Lagrange linear tetrahedron Lagrange interpolation (𝑛𝑝 = 3) , in unit coordinates:

𝑯(𝑟, 𝑠, 𝑡) = [(1 − 𝑟 − 𝑠 − 𝑡) (𝑟) (𝑠) (𝑡)], local nodes at (0, 0, 0), (1, 0, 0), (0, 1, 0),

and (0, 0, 1), 𝑛𝑛 = 4, 𝑛𝑔 = 1, 𝜹𝒆𝑻 = [𝑢1 𝑢2 𝑢3 𝑢4].

Lagrange quadratic tetrahedron Lagrange interpolation (𝑛𝑝 = 3), in unit coordinates:

𝑯(𝑟, 𝑠, 𝑡) = [(2𝑟2 + 4rs + 4rt − 3r + 2𝑠2 + 4st − 3s + 2𝑡2 − 3t + 1), r(2r − 1), s(2s − 1), t(2t − 1), −4r(r + s + t − 1), (4rs), −4s(r + s + t − 1), −4t(r + s + t − 1), (4rt), (4st)], local nodes at (0, 0, 0), (1, 0, 0), (0, 1, 0), (0, 0, 1),

(0.5, 0, 0), (0.5, 0.5, 0), (0, 0.5, 0), (0, 0, 0.5), (0.5, 0, 0.5), and (0, 0.5, 0.5), 𝑛𝑛 = 4,

𝑛𝑔 = 1, 𝜹𝒆𝑻 = [𝑢1 𝑢2 … 𝑢10].

Hermite cubic 𝐶1 line interpolations (𝑛𝑝 = 1), in unit coordinates (L is physical length):

𝑯(𝑟) = [(1 − 3𝑟2 + 2𝑟3) (𝑟 − 2𝑟2 + 𝑟3)𝐿 (3𝑟2 − 2𝑟3) (𝑟3 − 𝑟2)𝐿], local nodes at

(0) and (1), 𝑛𝑛 = 2, 𝑛𝑔 = 2, 𝜹𝒆𝑻 = [𝑢1 𝜃1 𝑢2 𝜃2], 𝜃 = 𝑑𝑢 𝑑𝑥⁄ .

Hermite quintic 𝐶1 line interpolations (𝑛𝑝 = 1), in unit coordinates (L is physical length):

𝑯(𝑟) = [(1 − 23𝑟2 + 66𝑟3 − 68𝑟4 + 24𝑟5) (𝑟 − 6𝑟2 + 13𝑟3 − 12𝑟4 + 4𝑟5)𝐿 … (16𝑟2 − 32𝑟3 + 16𝑟4) (−8𝑟2 + 32𝑟3 − 40𝑟4 + 16𝑟5)𝐿 … (7𝑟2 − 34𝑟3 + 52𝑟4 − 24𝑟5) (−𝑟2 + 5𝑟3 − 8𝑟4 + 4𝑟5)𝐿], local nodes

at (0), (1/2) and (1), 𝑛𝑛 = 3, 𝑛𝑔 = 2, 𝜹𝒆𝑻 = [𝑢1 𝜃1 𝑢2 𝜃2 𝑢3 𝜃3].

Hermite quintic 𝐶2 line interpolations (𝑛𝑝 = 1), in unit coordinates (L is physical length):

𝑯(𝑟) = [(1 − 10𝑟3 + 15𝑟4 − 6𝑟5) (𝑟 − 6𝑟3 + 8𝑟4 − 3𝑟5)𝐿 (𝑟2 − 3𝑟3 + 3𝑟4 − 𝑟5)𝐿2 … (10𝑟3 − 15𝑟4 + 6𝑟5) (7𝑟4 − 3𝑟5 − 4𝑟3)𝐿 ( 𝑟3 − 2𝑟4 + 𝑟5)𝐿2], local nodes

at (0) and (1), 𝑛𝑛 = 2, 𝑛𝑔 = 3, 𝜹𝒆𝑻 = [𝑢1 𝜃1 𝜅1 𝑢2 𝜃2 𝜅2], 𝜃 = 𝑑𝑢 𝑑𝑥⁄ ,

𝜅 = 𝑑2𝑢 𝑑𝑥2⁄ .

Page 38: 2 12. Polynomial interpolation › ... › Chap_2_Polynomials.pdf · 2.1 Types of interpolation: Three types of polynomial scalar interpolation will be used in most of the applications

Lecture Notes: Finite Element Analysis, J.E. Akin, Rice University, Copyright 2017-20, All rights reserved.

38

2.11 Exercises

1. A straight line runs from point x1 to point x2 and has a linear line load running with a

value of p1 at the first end to point value p2 at the other end. Their data are:

Node k rk xk (m) pk (N/m)

1 0.0 20 40

2 1.0. 30 3

Using parametric linear interpolation, of a two-node element, find the position and value

of the line load at a point 35% along the length, from the first node.

2. For the above data find the non-dimensional pressure derivative, 𝜕𝑝 𝜕𝑟⁄ at the same

point.

3. A straight line runs from x1 to midpoint x2 to x3and has a line load running with a value

of p1 at the first end to point value p2 at the mid-point to a value of p3 at the other end.

Their data are

Node k rk xk (m) pk (N/m)

1 0.0 20 40

2 0.5 25 46

3 1.0 30 34

Using parametric linear interpolation find the position, line load value, and local

derivative, 𝜕𝑝 𝜕𝑟⁄ , of the line load at a point 35% along the length, from the first node.

4. A linear triangle has a normal pressure ranging from p1 = 40 to p2 = 46 to p3 =34 N m2⁄ at its three corners. The local nodes are at (0, 0), (1, 0), and (0, 1) respectively.

Using parametric unit coordinate linear interpolation, for a T3 element, find the pressure

value, and the parametric pressure gradient, 𝜕𝑝 𝜕𝑟 and 𝜕𝑝 𝜕𝑠⁄ ⁄ , at a non-dimensional

interior point (𝑟 = 0.32, 𝑠 = 0.43).

2.10 List of examples Ex 2.2-1 Numerical interpolation value and slope using a four-node line element, L4 Ex 2.2-2 Change one value in Ex 2.2-2 and graph with Matlab Ex 2.2-3 Approximate and graph a circular arc using a four-node line element, L4 Ex 2.6-1 Exactly integrate the local area of a parametric triangle (T3, or T6, etc.) Ex 2.9-1 Example of hierarchical line interpolation, with scatter

2.11 Subject Index axis, 13 beam element, 16 bi-linear quadrilateral, 38 case, 8 circular arc, 10

continuity level, 1 cubic interpolation, 5, 8, 9, 11 curvature, 1 DOF per element, 36 el_shape_n_local_deriv.m, 7, 26

Page 39: 2 12. Polynomial interpolation › ... › Chap_2_Polynomials.pdf · 2.1 Types of interpolation: Three types of polynomial scalar interpolation will be used in most of the applications

Lecture Notes: Finite Element Analysis, J.E. Akin, Rice University, Copyright 2017-20, All rights reserved.

39

element connections, 34 element neighbor, 34 error estimator, 34 Exercises, 39 for, 13 fprintf, 13 get_element_index.m, 35 gradient, 12 H8_C0, 38 h-adaptivity, 34 Hermite interpolation, 1, 16 Hermite_1D_C1_library.m, 17, 18 hierarchical interpolation, 32 hierarchical node, 32 hp-adaptivity, 34 incorrect interpolation functions, 31 inter-element continuity, 30 isoparametric, 25 Jacobian, 9 Jacobian determinant, 9 Jacobian inverse, 9 L2_C0, 6, 37 L2_C1, 37, 38 L2_C2, 37, 38 L3_C0, 6, 37 L3_C1, 16, 38 L4_C0, 8, 13, 37 Lagrange interpolation, 1, 2 Lagrange_quadrilaterals.m, 21, 24 Lagrangian_1D_library.m, 7, 8 Lagrangian_triangles.m, 26 Legendre polynomials, 33 linear interpolation, 4, 7 linear tetrahedron, 38 linear triangle, 24, 25, 39 local derivatives, 4 matrix partition, 32 measure, 7, 26 natural coordinates, 10, 15, 37 non-dimensional area, 26 orthogonality, 33 P4_C0, 26, 30, 38 p-adaptivity, 34 parabola, 11

parametric coordinates, 8 parametric derivatives, 4 physical derivative, 8 physical gradient, 8 physical length, 7, 16 plot, 13 polynomial interpolation, 1 pressure gradient, 39 print, 13 prior DOF, 34 Q16, 23 Q25, 23 Q4_C0, 20, 22, 38 Q8_C0, 20 Q9, 23 quadratic interpolation, 2, 5, 6, 7, 32 quadratic line element, 2 quadrilateral element, 20 quintic interpolation, 5, 16 real, 16 recursion relations, 33 scaling constant, 33 second derivatives, 33 Serendipity interpolation, 1 Serendipity quadrilaterals, 30 shape functions, 3 simplex element, 24 SQ12, 31 SQ16, 32 SQ17, 32 SQ8, 31, 37 standard nodes, 34 sum to unity, 4 Summary, 37 switch, 8 symbolic derivation, 16, 20, 22, 30 syms, 16 T10, 28 T15, 28 T3_C0, 24, 37 T6_C0, 26 tangential derivative, 34 tetrahedra, 24 thermal conductivity, 10 unit coordinates, 9, 24 vector subscript, 34