You are on page 1of 239

FIRST COURSE

in
FINITE ELEMENTS

Jacob Fish and Ted Belytschko


First Course
in Finite
Elements
Preface

This book is intended as a textbook for junior and senior level undergraduate students in
science and engineering. The text material evolved from over 50 years of combined
teaching experience of the authors in undergraduate finite element courses. The book
deals with a formulation and application of the finite element method and it differs from
the related finite element textbooks in the following three respects:

1. It is introductory and self-contained. Only a modest background covered by most


engineering and science curricula in the first two years is required. The relevant
topics in mathematics, such as matrix algebra, differential and integral equations,
and in physics, such as conservation laws and constitutive equations, are reviewed
as needed. reinforced.
2. It is generic. While most introductory finite element textbooks are application
specific, such as being based on energy principles for linear elasticity, the finite
element method in this book is formulated as a general purpose numerical
procedure for solving partial differential equations. Consequently, students from
various engineering and science disciplines will benefit equally from the
exposition of the subject.
3. It is a hands-on experience. The book integrates finite element theory, finite
element code development and application of commercial software packages.
Finite element code development is introduced through MATLAB exercises and a
MATLAB program, whereas ABAQUS is chosen for demonstrating the use of the
finite element method in the commercial arena.

The material in the book can be covered in a single semester. The course material is
organized in three chronological units one month each: (1) the finite element formulation
for one-dimensional problems, (2) the finite element formulation for scalar field problems
in two dimensions, (3) finite element programming and application to scalar field
problems; and finite element formulation for vector field problems in two dimensions and
beams. The following course outline is recommended:

Part 1: Finite element formulation for trusses and one-dimensional problems


Chapter 1: Introduction
Chapter 2: Direct Approach
Chapter 3: Strong and weak forms for one-dimensional problems
Chapter 4: Trial and weight functions for one-dimensional problems

2
Chapter 5: Finite element formulation for one-dimensional problems
******* Quiz 1**********

Part 2: Finite element formulation for scalar field problems in two dimensions
Chapter 6: Strong and weak forms for scalar field problems in two dimensions
Chapter 7: Trial and Weight Functions in two dimensions
Chapter 8: Finite element formulation for two-dimensional heat flow
*******Quiz 2**********

Part 3: Finite element program programming and application to scalar field problems
Chapter 11: Finite element programming with MATLAB.
*********Project assignment*****
Chapter 12: Application of general purpose finite element software – ABAQUS
tutorial for linear heat conduction and elasticity problems
Chapter 9: Finite element formulation for vector field problems in two-
dimensions
Chapter 10: Finite element formulation for beams
*******Project Due**********

3
Chapter

1 Introduction

1.1 Background
Many physical phenomena in engineering and science can be described in terms
of partial differential equations. In general, solving these equations by classical
analytical methods for arbitrary shapes is almost impossible. The finite element method
is a numerical approach by which these partial differential equations can be solved
approximately. From an engineering standpoint, the finite element method is a method
for solving engineering problems such as stress analysis, heat transfer, fluid flow and
electromagnetics by computer simulation.

Figure 1.1: Geometry, loads and finite element meshes


Millions of engineers and scientists worldwide are using the Finite Element
Method (FEM) to predict the behavior of structural, mechanical, thermal, electrical and
chemical systems in both design and performance analysis. Its popularity can be gleaned
by the fact that over $1 billion is spent annually in the United States on FEM software
and computer time. More than 250 books and over 20,000 articles have been published
on this subject.
To explain the basic approach of the finite element method, consider a plate with
a hole as shown in Figure 1.1. Suppose that our objective is to find the temperature
distribution in the plate. In principle, it is possible to write a heat balance equation at
each point in the plate. However, the solution of the partial differential equations that
governs energy balance for a complicated geometry such as an engine block becomes
almost impossible by classical methods like separation of variables. Numerical methods
such as finite difference methods also are quite awkward for arbitrary shapes, software
developers have not marketed finite difference programs that can deal with the arbitrary
geometries that are commonplace in engineering. Similarly, in stress analysis problems,
equilibrium is governed by complex partial differential equations that are very difficult to
solve except for very simple geometries, like rectangles, and engineering problems
seldom have such simple shapes.
The basic idea behind the FE method is to divide the body or region into a finite
number of finite elements, connected by nodes, and obtain an approximate solution in
terms of the temperatures at these nodes. These elements may be one, two or three-
dimensional. A popular two-dimensional element is the triangular element. When a two
dimensional region is divided into non-overlapping triangles, we can see that essentially
any planar geometry can be easily represented by a union (in the language of
mathematical sets) of these elements.
Instead of determining the temperature at every point in the plate, let us consider
determining the temperature at only a finite number of points, the vertices (or nodes) of
the triangles. The finite element method provides a systematic methodology whereby the
temperatures at the nodes (nodal temperatures) can be determined. Interpolation can then
be used to obtain the temperature throughout the problem domain.
For linear problems, we will need to solve a system of linear equations with the
number of unknowns (nodal temperatures) equal to the number of nodes. To obtain a
reasonably accurate solution, thousands of nodes are usually needed, so computers are
essential in solving these equations. Generally, the accuracy of the solution improves as
the number of elements (nodes) increases, but the computer time, and hence the cost, also
increases. The computer program determines the temperature at each node and the heat
flow through each element. The results are usually presented as computer visualizations,
such as contour plots, although selected results are often printed. This information is then
used in the engineering design process.
Although we have just presented the concept in the context of heat transfer, the
same basic concept is applicable in other areas. In stress analysis, the field variables are
the displacements, in chemical systems the variables are material concentrations, and in
electromagnetics, the potential field.
This course is limited to linear finite element analysis. The preponderance of
finite element analyses in engineering design is today still linear FEM. In heat
conduction, linearity requires that the conductance be independent of temperature. In

5
stress analysis, linear FEM is only applicable if the material behavior is linear elastic and
the displacements are small. Additional discussions of the assumptions underlying linear
analysis are given later.
The finite element method was developed in the 1950’s in the aerospace industry.
The major players were Boeing and Bell Aerospace (long vanished) in the U.S. and Rolls
Royce in the U.K. M. J. Turner, R. W. Clough, H. C. Martin, and L. J. Topp published
one of first papers that laid out the major ideas in 1956. It established the procedures of
element matrix assembly and element formulations that you will learn in this course, but
did not use the term “finite elements.” The second author in this paper, Ray Clough, was
a professor at Berkeley, who was at Boeing for a summer job. Subsequently he wrote a
paper that first used the name finite elements, and he is given much credit as one of the
founders of the method. He only worked in finite elements for a few more years, and
then turned to experimental methods, but his work instigated a tremendous effort at
Berkeley, led by the younger professors, primarily E. Wilson and R.L. Taylor and
graduate students such as T.J.R. Hughes, C. Felippa, and K.J. Bathe. These established
Berkeley as the center of linear finite element research for many years. Their work
coincided with the rapid growth of computer power, and the method quickly became
widely used in the nuclear power, defense, automotive and aeronautics industries.
Much of the academic community first viewed finite element methods very
skeptically, and some journals refused to publish papers on FEM-the typical resistance of
mankind (and particularly academic communities) to the new. Nevertheless, several
capable researchers early recognized its potential, most notably O.C. Zienkiewicz (then at
Northwestern) and R.H. Gallagher (at Cornell). O.C. Zienkiwiecz built a renowned group
at Swansea in Wales that included B. Iron, R. Owen and many others who pioneered
concepts like the isoparametric element and nonlinear analysis methds. Other important
early contributors were J.H. Argyris and J.T. Oden.
Subsequently mathematicians discovered a 1943 paper by R. Courant, in which he
used triangular elements with variational principles to solve vibration problems.
Consequently, many mathematicians have claimed that this was the original discovery of
the method (though it is somewhat reminiscent of the claim that the Vikings discovered
America instead of Columbus). It is interesting that for many years the finite element
method lacked a theoretical basis, i.e. any logical underpinning that finite element
solutions gave the right answer, and this original work of Courant’s was duplicated by the
engineering community to provide a mathematical justification for the method. In the
late 1960’s, the field became of great interest to many mathematicians, who showed that
for linear problems, such as we will deal with in this course, finite element solutions
converge to the correct solution of the partial differential equation (provided that certain
aspects of the problem are sufficiently smooth). In other words, it has been shown that as
the number of elements is increased the solutions will improve and tend in the limit to the
exact solution of the partial differential equations.
The improvements in personal computers since the 1980’s have had a major
impact on the finite element applications, and hence engineering. Until about the early
1990’s, personal computers were too feeble to handle the many equations needed for
practical finite element analysis. However, around 1990, personal computers crossed that
threshold, and PCs rapidly became capable of treating finite element analyses of linear
problems required in engineering practice. The software that is most widely used by

6
engineers in stress analysis, such as NASTRAN, ANSYS, ABAQUS, and LSDYNA,
were adapted to PCs. Today a large part of finite element analysis in industry is done by
PCs, identical to yours.

1.2 Matrix Algebra with MATLAB


MATLAB is an interactive software system for numerical computations and graphics. As
the name suggests, MATLAB is especially designed for matrix computations. In addition,
it has a variety of graphical and visualization capabilities, and can be extended through
programs written in its own programming language. Here, we introduce only some basic
ideas so that you can perform essential matrix operations and basic programming needed
for understanding and development of the finite element program.

1.2.1 Definition of matrices


A matrix is an mxn array of numbers or variables arranged in m rows and n columns; such
a matrix is said to have dimension mxn as shown below

⎡ a11 a12 a1n ⎤


⎢ ⎥
⎢ a21 a22 ⎥
a = ⎢⎢ ⎥

⎢ ⎥
⎢a amn ⎥⎥
⎢⎣ m 1 ⎦

Bold letters will denote matrices or vectors. The elements of a matrix a are denoted
by aij , where i is the row number and j is the column number. Note that in both
describing the dimension of the matrix and in the subscripts identifying the row and
column number, the row is always placed first.
An example of a 3x3 matrix is:
⎡1 2 3⎤⎥

⎢ ⎥
a = ⎢4 5 6⎥
⎢ ⎥
⎢7 8 0⎥⎥
⎣⎢ ⎦

The above matrix a is is an example of a square matrix since the number of rows and
columns are equal.
The following commands show how to enter matrices in MATLAB (>> is the
MATLAB prompt; it may be different with different computers or different versions of
MATLAB.)

7
>> a = [1 2 3; 4 5 6; 7 8 0]
a=
1 2 3
4 5 6
7 8 0

Notice that rows of a matrix are separated by semicolons, while the entries on a row are
separated by spaces (or commas). The order of matrix a can be determined from

size(a )

The transpose of any matrix is obtained by interchanging rows and columns. So for
example, the transpose of a is:

⎡1 4 7 ⎤
⎢ ⎥
T ⎢ ⎥
a = ⎢2 5 8 ⎥
⎢ ⎥
⎢ 3 6 0⎥
⎣⎢ ⎥⎦

In MATLAB the transpose of a matrix is denoted by an apostrophe (‘).


Square matrices may be symmetric or diagonal. If aT = a we say a is
symmetric.

A matrix is called a column matrix or a vector if n=1, e.g.

⎡b ⎤
⎢ 1⎥
⎢ ⎥
b = ⎢b2 ⎥
⎢ ⎥
⎢b3 ⎥
⎣⎢ ⎦⎥
A column vector in MATLAB is defined as

>> b = [1 2 3]'
b=
1
2
3

The components of the vector b are b1, b2 , b3 . The transpose of b is given by a row vector

8
bT = ⎡⎢b1 b2 b3 ⎤⎥
⎣ ⎦
or in MATLAB
>> b = [1 2 3]
b=
1 2 3

A matrix is called a diagonal matrix if only the diagonal components are nonzero,
i.e., aij = 0, i ≠ j . For example, the matrix below is a diagonal matrix:
⎡1 0 0 ⎤
a = ⎢⎢0 5 0 ⎥⎥
⎢⎣0 0 6 ⎥⎦

Diagonal matrix in MATLAB is constructed by first defining a row vector b = [1 5 6],


then
>> b = [1 5 6];
>> a = diag (b)
a=
1 0 0
0 5 0
0 0 6

A diagonal matrix where all diagonal components are equal to one is called an identity or
unit matrix and is denoted by I. For example, 2 × 2 identity matrix is given by

⎡ 1 0⎤
I = ⎢⎢ ⎥

0 1
⎣⎢ ⎥⎦

The MATLAB expression for an order n unit matrix is

eye(n )

Thus, the MATLAB expression I = eye(2) gives the matrix above.

A matrix in which all components are zero is called a zero matrix and is denoted by 0. In
MATLAB, B = zeros (m, n) creates m×n matrix B of zeros. A random m×n matrix
can be created by rand (m,n).

9
In finite element method matrices are often sparse, i.e., they contain many zero terms.
MATLAB has the ability to store and manipulate sparse matrices, which greatly increases
its usefulness for realistic problems. The command sparse (m, n) creates an m × n zero
matrix in sparse format. The nonzero entries can then be added one-by-one or in a loop.

>> a = sparse (3,2)


a=
All zero sparse: 3-by-2
>> a(1,2)=1;
>> a(3,1)=4;
>> a(3,2)=-1;
>> a
a=
(3,1) 4
(1,2) 1
(3,2) -1

Notice that the display can be suppressed by ending the line with a semicolon.

The inverse of a square matrix is defined such that

a −1a = aa −1 = I

provided that matrix a is not singular. The MATLAB expression is inv(a ) . The inverse
can also be obtained using backslash operator as shown in Section 1.2.3.
Matrix a is nonsingular if the determinant, denoted by det (a ) , is not equal to
zero. A determinant of order 2 is defined as

⎡a11 a12 ⎤
a = ⎢a ⎥ det (a ) = a11a22 − a12a21
⎢⎣ 22 a22 ⎥⎦

The MATLAB expression for determinant is

det(a )

For example,

10
>> a = [1 3; 4 2];
>> det (a)
ans =
-10

1.2.2 Operation with matrices


1.2.2.1 Addition and Subtraction

⎡ a11 ± b11 a12 ± b12 a1n ± b1n ⎤


⎢ ⎥
⎢ a ±b a22 ± b22 ⎥
⎢ 21 21 ⎥
c=a±b= ⎢ ⎥
⎢ ⎥
⎢ ⎥
⎢am 1 ± bm 1 amn ± bmn ⎥⎥
⎢⎣ ⎦

In example of matrix addition in MATLAB is given below:

>> a = [1 2 3;4 5 6;7 8 9];


>> a = [1 1 1;2 2 2;3 3 3];
>> c = [1 2;3 4;5 6];
>> a+b
ans =
2 3 4
6 7 8
10 11 12
>> a+c
??? Error using ==> +
Matrix dimensions must agree

1.2.2.2 Multiplication

1. Scalar-matrix (vector) multiplication

⎡ a11 a12 a1n ⎤ ⎡ ca11 ca12 ca1n ⎤


⎢ ⎥ ⎢ ⎥
⎢ a21 a22 ⎥ ⎢ ca21 ca22 ⎥
ca = c ⎢⎢ ⎥=⎢
⎥ ⎢


⎢ ⎥ ⎢ ⎥
⎢a amn ⎥⎥ ⎢⎢cam 1 camn ⎥⎥
⎢⎣ m 1 ⎦ ⎣ ⎦

11
2. Scalar product
⎡b1 ⎤
⎢ ⎥
⎢b ⎥
⎡ ⎤ ⎢ 2⎥ n
a b = ⎢a1 a2 … an ⎥ ⎢ ⎥ = ∑ aibi
T
⎣ ⎦⎢ ⎥ i =1
⎢ ⎥
⎢bn ⎥
⎢⎣ ⎥⎦
In MATLAB the scalar product as defined above is either a * b ′ or dot(a, b) .

The length of a vector a is denoted by |a| and is given by

a = a12 + a22 + + an2

3. Product of two matrices

The product of two matrices a (m × k ) and b (k × n ) is defined as

⎡ k k k ⎤
⎢ ∑ a1 jbj 1 ∑ a1jbj 2 ∑a b ⎥
⎢ j =1 1 j jn

⎢ j =1 j =1

⎢ k k ⎥
⎢ ∑ a2 jbj 1 ∑a b ⎥
c = ab = ⎢⎢ j =1 ⎥
2j j2
j =1 ⎥
⎢ ⎥
⎢ ⎥
⎢ k ⎥
⎢ k ⎥
⎢ ∑ amjbj 1 ∑ amjbjn ⎥
⎢ j =1 ⎥
⎣ j =1 ⎦

The components of matrix c are given as


n
cij = ∑ aikbkj
k =1

The product of two matrices a and b can be taken only if the number of columns
in a equals the number of rows in a. In other words, if a is an (m × k ) matrix,
then b must be an (k × n ) matrix, where k is arbitrary. The product c will then
have the same number of rows as a and the same number of columns as b, i.e. it
will be an m × n matrix.

An important fact to remember is that matrix multiplication is not commutative,


i.e. in general ab ≠ ba .

The MATLAB expression for matrix multiplication is

12
c = a *b

Consider the same matrices a and c as before. An example of matrix


multiplication with MATLAB is:

>> a*c
ans =
22 28
49 64
76 100
>> c*c
??? Error using ==> *
Inner matrix dimensions must agree.

4. Other matrix operations


T
a) Transpose of product: (ab) = bT aT
b) Product with identity matrix: aI = a
c) Product with zero matrix: a0 = 0

1.2.3 Solution of system of linear equations


Consider the following system of n equations with n unknowns, dk , k = 1,2, ,n :

⎧⎪K 11d1 + K 2d2 + + K 1ndn = f1


⎪⎪
⎪⎪K d + K d + + K d = f
⎪ 21 1 22 2 2n n 2

⎪⎪
⎪⎪
⎪⎪K n 1d1 + K n 2d2 + + K nndn = fn

We can rewrite this system of equations in matrix notation as follows:

Kd = f

where

13
⎡ K 11 K 12 K 1n ⎤ ⎡ f1 ⎤ ⎡d1 ⎤
⎢ ⎥ ⎢ ⎥ ⎢ ⎥
⎢K ⎥ ⎢f ⎥ ⎢d ⎥
⎢ 21 K 22 ⎥ ⎢ 2⎥ ⎢ 2⎥
K=⎢ ⎥ f=⎢ ⎥ d=⎢ ⎥
⎢ ⎥ ⎢ ⎥ ⎢ ⎥
⎢ ⎥ ⎢ ⎥ ⎢ ⎥
⎢K n 1 K nn ⎥⎥ ⎢ fn ⎥ ⎢dn ⎥
⎢⎣ ⎦ ⎢⎣ ⎥⎦ ⎢⎣ ⎥⎦

The symbolic solution of the above system of equation can be found by multiplying both
sides with inverse of K, which yields

d = K−1f

MATLAB expression for solving the system of equations is

d =K \f
or
d = inv (K ) * f

An example of solution of system of equations with MATLAB is given below:

>> A = rand (3,3)


A=
0.2190 0.6793 0.5194
0.0470 0.9347 0.8310
0.6789 0.3835 0.0346
>> b = rand (3,1)
b=
0.0535
0.5297
0.6711
>> x = A\b
x=
-159.3380
314.8625
-344.5078

14
Remarks
a) In practical FEM analysis, the number of equations n can be very large. PCs
can today solve thousands of equations in a matter of minutes if they are
sparse (as they are in FEM analysis-you will learn about this later) but
sometimes millions of equations are needed, as for an aircraft carrier or a full
model of an aircraft; parallel computers are then needed.
b) Efficient solution techniques that take advantage of the sparsity and other
advantageous properties of FEM equations are essential for treating even
moderately large systems. The issue of how to efficiently solve large systems
will not be considered in this course.
c) In this course, we will see that
• The system matrix for a finite element model K is non-singular (often
called regular), i.e., K−1 exists if the correct boundary conditions are
prescribed and the elements are properly formulated. Furthermore, for
good models it is usually well-conditioned, which means it is not very
sensitive to roundoff errors.
• K is symmetric, i.e. KT = K .
• K is positive definite, i.e., xT Kx > 0 ∀x (meaning for any value of x)
Alternatively, K is said to be positive definite if all the eigenvalues are
strictly positive. The eigenvalue problem consists of finding nonzero
eigenvectors y and the corresponding eigenvalues λ satisfying

Ky = λ y

The MATLAB expression for the eigenvalues problem is:

>> K=[2 -2;-2 4];


>> [y, lamda]=eig(K)
y=
0.8507 -0.5257
-0.5257 0.8507
lamda =
0.7639 0
0 5.2361

15
1.3 Mathematical Preliminaries
1.3.1 Scalar Peoduct Theorem
Consider scalar product of two vetors w and p equal to zero for any vector w denoted as
∀w
wT p = 0 ∀w
or
w1p1 + w2 p2 + … + wn pn = 0 ∀w .

Since the vector component wi are arbitrary it is convenient to make the following
choices:

w1 = 1 w2 = w 3 = … = wn = 0 ⇒ p1 = 0
w 2 = 1 w1 = w 3 = … = w n = 0 ⇒ p2 = 0

wn = 1 w1 = w 2 = … = wn −1 = 0 ⇒ pn = 0

which yields p = 0 .

1.3.2 Taylor’s formula with remainder and the mean value theorem
Taylor’s formula with remainder plays a key role in understanding the behavior of the
finite element method discussed in Chapter 5.7.
A function f (x ) defined on interval 0 ≤ x ≤ l can be expanded around a point
0 ≤ x 0 ≤ l as follows:
1 2
f (x ) = f (x 0 ) + (x − x 0 ) f,x (x 0 ) + (x − x 0 ) f,xx (x 0 )
2
1 (1.1)
+ (x − x 0 )k f,x ...x (c)
k! k times

where c is some point in the interval 0 ≤ c ≤ x 0 .


The mean value theorem is obtained as a special case for k=1

f (x ) = f (x 0 ) + (x − x 0 ) f,x (c) (1.2)

Consider a special case of x 0 = 0 and x = l then

f (l ) − f (0)
f,x (c) = (1.3)
l

16
which means that for any differentiable function f (x ) there is a point in the interval
0 ≤ c ≤ l which has a slope defined by Eq. (1.3). See problem 1.3 for a specific choice
of function f (x ) .

1.4 Programming with MATLAB


MATLAB is very convenient to write simple finite element programs written in its own
programming language. It provides the standard constructs, such as loops and
conditionals; these constructs can be used interactively to reduce the tedium of repetitive
tasks, or collected in programs stored in ''m-files'' (nothing more than a text file with
extension ``.m'').

1.4.1 Conditional and Loops


MATLAB has a standard if-elseif-else conditional.
The general form An example
>> t = 0.76;
if expression1
>> if t > 0.75
statements1
s = 0;
elseif expression2
elseif t < 0.25
statements2
s = 1;

else

s = 1-2*(t-0.25);

end
else
>> s
statements
s=
end
0

MATLAB provides two types of loops, a for-loop (comparable to a Fortran do-loop or a


C for-loop) and a while-loop. A for-loop repeats the statements in the loop as the loop
index takes on the values in a given row vector; the while-loop repeats as long as the
given expression is true (nonzero):

The general form Examples


>> for i=1:1:3
disp(i^2)
for index = start:increment:end
end
statements
1
end
4
9
>> x=1;
while expression
>> while 1+x > 1
statements
x = x/2;
end
end

17
>> x
x=
1.1102e-16

1.4.2 Functions
Functions allow the user to create new MATLAB commands. A function is defined in an
m-file that begins with a line of the following form:

function [output1,output2,...] = cmd_name(input1,input2,...)

The rest of the m-file consists of ordinary MATLAB commands computing the values of
the outputs and performing other desired actions. Here is a simple example of a function;
it computes the quadratic function f (x ) = x 2 − 3x − 1 . The following commands should
be stored in the file fcn.m (the name of the function within MATLAB is the name of the
m-file, without the extension):

function y = fcn( x )
y=x^2-3*x-1;
Then type command:
>> fcn(0.1)
ans =
-1.2900

Problems Chapter 1
Problem 1.1: Write a MATLAB program to generate a set of linear algebraic equations
Ax=b where A is an n × n matrix given by

⎧-1 if i = j − 1 or i = j + 1

Aij = ⎨ 2 if i = j

⎩ 0 otherwise
−1 −1
and compute A . Then check how closely A A corresponds to I . Do this for
n = 5,10,1000 and a larger value you choose. The accuracy of the computed product
can be compared to the correct results by computing a norm of the error given by

∑∑ ( B − I ij )
n n
1 2
err = ij
n2 i =1 j =1

Repeat the above with the matrix A defined by


1
Aij =
i+ j

18
Repeat the above with n = 3,4,5,6,7... . Stop when the error is greater than one, since
the solution is then meaningless.
The top equation is of the form we will see in finite element equations. They can be
accurately solved even for very large system for they are not susceptible to roundoff
error. They are known as well-conditioned. The second matrix is called a Hilbert matrix.
It is an example of an estremely ill-conditioned matrix.

Problem 1.2: Consider a system of linear equations



⎪ 8x 1 + x 2 + 6x 3 = 7.5



⎨ 3x 1 + 5x 2 + 7x 3 = 4



⎪4x + 9x 2 + 2x 3 = 12

⎩ 1
a) Write the system of equations in matrix notation Ax = b and solve for the unknown
x using MATLAB
b) Suppose we impose and additional constraint on the solution
g (x) = x 1 + x 2 + x − 1 = 0 . Using MATLAB find a new vector xnew so that it will
satisfy exactly the constraint equation g (x )
new
and will minimize the error
T
err (x new
) = (Ax new
− b) (Ax new
− b)

x 2 (3l − 2x )
Problem 1.3: Consider a cubic function f (x ) = defined on the interval
l3
0 ≤ x ≤ l and its linaer approximation f (x ) defined such that f (0) = f (0) and
f (l ) = f (l ) . Verify Eq. (1.3) and find a point c, where f,x (c) = f,x

f(x)

f (x )
x
l
Figure 1.2: Cubic function f(x) and its linear approximation g(x)

Problem 1.4: Consider the following symmetrix matrices K:


⎡k −k1 0 ⎤⎥
⎡k1 + k2 −k2 ⎤ ⎡k 0⎤ ⎢ 1
⎢ ⎥; ⎢ ⎥ ⎢ ⎥
⎢ −k ⎥ ⎢0 k ⎥ ; ⎢−k1 k1 + k2 −k2 ⎥ ;
⎢⎣ k 2 ⎥ ⎢⎣ ⎥⎦ ⎢ ⎥
2
⎦ ⎢ 0 −k k ⎥
⎢⎣ 2 2 ⎥

where k, k1, k2 are positive constants.

a) Check if the above three matrices are positive definite. Recall that if for any vector
x ≠ 0 we have xT Kx > 0 then matrix K is called Symmetric Positive Definite

19
T
(SPD). If, on the other hand, x Kx ≥ 0 for any vector x ≠ 0 then the matrix K is
symmetric semi-positive definite. Choose one of the semi-positive definite matrices
shown above and show that for any right hand side vector, f , the system of
equations Kd = f has no unique solution.
b) Verify your results by computing the eigenvalues for the above three matrices

20
Chapter

2 Direct Approach

The FEM consists of the following four steps:

1. Preprocessing: dividing the problem domain into finite elements;


2. Describing the behavior of each element;
3. Assembling the element equations to describe the behavior of elements as a
group. i.e. the behavior of the entire system;
4. Postprocessing quantities of interest, such as for instance stresses and strains.

Step 1, the subdivision of the problem domain into finite elements in today’s Computer
Aided Engineering (CAE) environment is carried by automatic mesh generators. For truss
problems, such as the one shown in Figure 2.1, each truss member is represented by a
finite element. Step 2, the description of the behavior of each element, in general
requires the development of the partial differential equations for the problem and its weak
form. This will be the main focus of subsequent sections. In simple situations, however,
such as systems of springs or trusses, we may describe the behavior of a single element
directly, without considering the governing partial differential equations or its weak form
as in the conventional FE procedure.

Bar
Finite
Element
Figure 2.1: A bridge truss
In this section, we emphasize Step 3, i.e., how to combine the responses of single finite
elements into overall response of the system. Step 4, the postprocessing of quantitities of
interest, is tightly linked to the formulation of the element (Step 2).

2.1 Describing the behavior of a single bar element


The truss structure shown in Figure 2.1 consists of a collection of thin elements,
often called bars. These elements are assumed to be so thin that they have negligible
stiffness in bending or shear. Thus, they only have resistance to axial forces and their
behavior is similar to that of springs. Some of the bar elements in Figure 2.1 are aligned
horizontally, others are positioned at an arbitatry angle φ as shown in Figure 2.2 (on the
right). The primary objective of this section to relate forces acting at the nodes (N 1e , N 2e )
and (N 1ex , N 1ey , N 2ex , N 2ey ) to the corresponding nodal displacements (u1e , u2e ) and
(u1ex , u1ey , u2ex , u2ey ) . Throuhout this textbook the following notation is adopted. The
superscripts will denote the element number; a single subscript denotes the node number;
in case of two subscripts, the first will denote the node number, whereas the second one
5
will denotes the spatial coordinate, such as for instance u2y is displacement in the
direction y at node 2 in element 5. We start by considering a horizontally aligned element
in Section 2.1.1 followed by a general two-dimensional case in Section 2.1.2.

N 2ey , u2ey

N 2ex , u2ex
2
e e e e e N 1ey , u1ey e
N ,u
1 1 N ,u
2 2 φ
x
1 2 e e
N ,u
1x 1x
1

Figure 2.2: Various configurations of bar elements in two dimensions.


(a) Horizontally aligned bar, (b) Bar element positioned at an arbitary angle in two-dimensions.

2.1.1 Horizontally aligned bar element


Consider a single bar element positioned along the x axis as shown in Figure
2.2a. The element stiffness matrix for a bar is usually expressed in terms of its Young’s
modulus E e , its cross-sectional area Ae and the length of the bar l e . The superscript e is
employed to permit various element properties and configurations.

The following equations govern the behavior of the bar:

σe = N e / Ae definition of stress; positive values of stress correspond to tension;


negative ones denote compression;

2
σe = E e εe stress ( σ )-strain ( ε ) relation (Hooke’s law);
e u2e − u1e
ε = strain ( ε ) -displacement (u) relation (compatibility equation);
le

N 1e + N 2e = 0 equilibrium equation.

Combining the above first three equations yields:

Ae E e e
Ne = e
(u2 − u1e ) = k e (u2e − u1e ) ≡ N 2e
l

where k e is as an equivalent spring stiffness of the bar element defined by

E e Ae
ke = (2.1)
le

From equilibrium follows

N 1e = −N 2e = k e (u1e − u2e )

Suppose that N 1e and N 2e are given, then we have two equations, as above, with two
unknowns for u1e and u2e that form the following matrix equation,

⎡ ke −k e ⎤ ⎡u1e ⎤ ⎡N 1e ⎤
⎢ ⎥⎢ ⎥ = ⎢ ⎥
⎢−k e k e ⎥⎥ ⎢⎢u2e ⎥⎥ ⎢⎢N 2e ⎥⎥
⎢⎣ ⎦⎣ ⎦ ⎣ ⎦
or in matrix notation:

Ke de = f e (2.2)
where,

Ke - the element stiffness matrix (note: it is symmetric)


d e - the element displacement vector
f e - the element force vector

Eq. (2.2) represents the relationship between forces and displacements in a single
element, i.e. the behavior of an element.

2.1.2 Bar element positioned at an arbitrary angle

The truss structure, such the one shown in Figure 2.1 consists of a collection of
bar elements positioned at an arbitrary angle in space. In order to analyze general truss
structures, it is necessary to develop the element stiffness matrix for a bar element

3
aligned at an arbitrary angle. We will consider a two dimensional case, i.e. bar elements
are positioned in xy plane as shown in Figure 2.2b.

To obtain a general relation between the internal nodal forces (N 1ex , N 1ey , N 2ex , N 2ey ) and
nodal displacements (u1ex , u1ey , u2ex , u2ey ) , we first define the equilibrium equations in the
local element coordinate system x e y e as shown in Figure 2.3 where x e is aligned along
the axial direction of the bar element.
u2ey , N 2ey

2
u2ex , N 2ex
e e
u ,N
1y 1y k e

y
ye 1 u1ex , N 1ex
xe

x
Figure 2.3: A truss element in the local coordinate system

The equilibrium equation defined in the element coordinate system x e y e is given by:

⎡ ke −k e ⎤ ⎡u1ex ⎤ ⎡N 1ex ⎤
⎢ ⎥⎢ ⎥ ⎢ ⎥
⎢−k e e ⎥ ⎢ e ⎥ = ⎢ e ⎥
⎢⎣ k ⎥ ⎢u2x ⎥ ⎢N 2x ⎥
⎦⎣ ⎦ ⎣ ⎦

The above equation can be expanded by adding zero contributions from normal (acting in
y e direction) forces and displacements:

Ke d e = f e (2.3)

where,

⎡u e ⎤ ⎡N e ⎤ ⎡1 0 − 1 0⎤
⎢ 1x ⎥ ⎢ 1x ⎥ ⎢ ⎥
⎢u e ⎥ ⎢ e ⎥ ⎢0
⎢ 1y ⎥ ⎢ N 1y ⎥ ⎢ 0 0 0⎥⎥
e
d =⎢ e ⎥ f e = ⎢⎢ e ⎥⎥ Ke = k e ⎢ ⎥
⎢u2x ⎥ ⎢N 2x ⎥ ⎢−1 0 1 0⎥
⎢ ⎥ ⎢ e ⎥ ⎢ ⎥
⎢u e ⎥ ⎢ N 2y ⎥ ⎢0 0 0 0⎥
⎣⎢ 2y ⎦⎥ ⎣⎢ ⎦⎥ ⎣ ⎦

4
Let us now establish the relation between (u1ex , u1ey , u2ex , u2ey ) and (u1ex , u1ey , u2ex , u2ey ) by means
of vector transformations.

uiye
uiye
uixe
y
ye φe
i uixe
xe

Figure 2.4: Global and element coordinate systems

The relation between the displacement components in the two coordinate systems shown
in Figure 2.4 at the nodes (i=1, 2) is given as:

uixe = uixe cos φe − uiye sin φe


uiye = uixe sin φe + uiye cos φe

These equations can be written in the matrix form as follows

de = R eT de (2.4)

where
⎡u1ex ⎤ ⎡ cos φe − sin φe 0 0 ⎤
⎢ ⎥ ⎢ ⎥
⎢ ue ⎥ ⎢ sin φe cos φe 0 0 ⎥⎥
e ⎢ iy ⎥ eT ⎢
d = ⎢ e ⎥, R =⎢ ⎥
⎢u2x ⎥ ⎢ 0 0 cos φe − sin φe ⎥
⎢ ⎥ ⎢ ⎥
⎢u e ⎥ ⎢ 0 0 sin φe cos φe ⎥⎥
⎢⎣ 2y ⎥⎦ ⎢⎣ ⎦

Re is the rotation matrix. Note that Re is orthogonal matrix, i.e. it possesses the
following properties: ReT Re = Re ReT = I , and thus Re −1 = ReT . Exploiting
e e
orthogonality and Eq. (2.4) the relation between d and d is given by

Re de = Re ReT de = de
T
The element force vectors, f e = (N 1ex , N 1ey , N 2ex , N 2ey ) and f e = (N 1ex , N 1ey , N 2ex , N 2ey ) ,
T

are related in the same manner as the element displacements

5
f e = Re f e (2.5)

We are now in a position to determine the relation between f e and d e . Substituting Eqs.
(2.4) and (2.5) into the element equilibrium equation in the element coordinate system
(2.3), gives

Ke Re de = Re f e

Premultiplying both sides by ReT yields:

Ke de = f e
where

Ke = ReT Ke Re (2.6)

An explicit expression for Ke is obtained by substituting the matrices found earlier for
ReT , Ke and Re into Eq. (2.6). This results in the following:

⎡ cos2 φe cos φe sin φe − cos2 φe − cos φe sin φe ⎤


⎢ ⎥
⎢ ⎥
e
⎢ cos φ sin φ
e
sin2 φe − cos φe sin φe 2 e
− sin φ ⎥
e e ⎢ ⎥
K =k (2.7)
⎢ − cos2 φe − cos φe sin φe cos2 φe cos φe sin φe ⎥⎥

⎢ ⎥
⎢− cos φe sin φe − sin2 φe cos φe sin φe sin2 φe ⎥
⎣ ⎦

It can be seen that Ke is a symmetric matrix. Note that the angle φe is defined from the
positive x -axis to the positive x e axis and it is positive with counterclockwise rotation.
The x e axis is pointing from element node one to two.

2.2 Describing the behavior of a system

The objective of this section is to construct the behavior of a complete system from
the behavior of individual elements. In Section 2.2.1 we first consider a two-bar system
where both bars are aligned in horizontal direction. A two-bar-system where both bars are
positioned at an arbitrary angle is considered in Example 2.2.

2.2.1 A two-bar system aligned in horizontal direction


Figure 2.5 shows material properties, geometry, loads and boundary conditions of the
two-bar structure considered in this section. The support on the left indicated that the
displacement is prescribed (zero in the present example). The arrows indicate a positive
direction of these variables.
The first step in the finite element method is to divide the problem domain into finite
elements. The resulting finite element model (or mesh) is given on the bottom of Figure
2.5. Each bar segment is modeled as an equivalent spring element based on Eq. (2.1). The

6
finite element model consists of two elements numbered as 1 and 2 and three nodes
sequentially numbered starting from the left. We will comment about node numbering in
Section 2.2.2. At each node we either know forces or displacements but not both. For
example, at node 1 the displacement u1 = u1 is prescribed, whereas the force to be
subsequently referred to as a reaction r1 in unknown. On other hand, at nodes 2 and 3
forces f2 , f3 are known whereas displacements u2 , u 3 are unknown. Vector components of
global displacements ui and forces fi are denoted with a single subscript corresponding
to the global node number.

f2 E 2 , A2
E 1, A1 f3

l1 l2
(a)
r1 f2 f3
1 2

1 2 3
k1 k2
u1 = given u2 u3
(b)
Figure 2.5: Two-element bar structure (top) and the finite element model (bottom)

In Step 2 in the finite element method we describe the response of each element
as shown in Figure 2.6.

N 11 N 21 N 12 N 22
1 2

k1 k2
u11 u21 u12 u22
Figure 2.6: Splitting the structurte into two elements

The behavior of each element was derived in Section 2.1.1 and is summarized here for
convenience (e = 1, 2):

⎡ ke −k e ⎤ ⎡u1e ⎤ ⎡N 1e ⎤
e e e ⎢ ⎥⎢ ⎥ ⎢ ⎥
Kd =f or ⎢−k e e ⎥ ⎢ e⎥ = ⎢ e⎥ (2.8)
k ⎥ ⎢u2 ⎥ ⎢N 2 ⎥
⎣⎢ ⎦⎣ ⎦ ⎣ ⎦

The global system equations will be constructed by exploiting compatibility and nodal
equilibrium conditions. The compatibility condition can be enforced by expressing

7
element nodal displacement vector, de , in terms of the global nodal displacement vector
T
d = ⎡⎢u1 u2 u 3 ⎤⎥
⎣ ⎦

⎡ ⎤ ⎡ ⎤
⎡u11 ⎤ ⎡1 0 0⎤ ⎢u1 ⎥ ⎡u12 ⎤ ⎡0 1 0⎤ ⎢u1 ⎥
d1 = ⎢⎢ 1 ⎥⎥ = ⎢⎢ ⎥ ⎢u ⎥ = L1d
⎥ ⎢ 2⎥ d2 = ⎢⎢ 2 ⎥⎥ = ⎢⎢ ⎥ ⎢u ⎥ = L2 d
⎥ ⎢ 2⎥
⎢⎣u2 ⎥⎦ ⎣⎢0 1 0⎦⎥ ⎢ ⎥ ⎢⎣u2 ⎥⎦ ⎣⎢0 0 1⎦⎥ ⎢ ⎥
⎢⎣u 3 ⎥⎦ ⎢⎣u 3 ⎥⎦

where the matrix Le is called element assembly operator. It plays an important role in
relating element vectors and matrices to the global vectors and matrices.

The element equations can be written as

Ke Le d = f e (2.9)

and the compatibility condition is automatically enforced by Eq. (2.9).

To establish the relation between the unknown element forces N 11, N 21, N 12 , N 22 and the
global forces r1,f2 , f3 we will require that each node is in equilibrium. For this purpose we
construct a free body diagram by exploiting the principle of action and reaction, i.e. that
the forces acting on the opposite sides of the cross section are equal and opposite as
illustrated in Figure 2.7.

r1 f2 f3
1 2

1 N 11 2
N 21 2 N 1 N 22 3
Figure 2.7: The free body diagram

The equilibrium equations at the three nodes are:

⎡N 11 ⎤ ⎡ 0 ⎤ ⎡ r ⎤
⎢ ⎥ ⎢ ⎥ ⎢ 1⎥
⎢ 1⎥ ⎢ 2⎥ ⎢ ⎥
⎢N 2 ⎥ + ⎢N 1 ⎥ = ⎢ f2 ⎥
⎢ ⎥ ⎢ ⎥ ⎢ ⎥
⎢ 0 ⎥ ⎢ 2 ⎥ ⎢f ⎥
⎣⎢ ⎦⎥ ⎣⎢N 2 ⎦⎥ ⎣⎢ 3 ⎦⎥

It can be observed that the first term on the left hand side is equal to L1T f 1 , whereas the
second term on the left hand side is equal to L2T f 2 . The sum of the two element force
T
vectors is equal to the global force vector f = ⎡⎢r1 f2 f3 ⎤⎥
⎣ ⎦

8
2
f = ∑ LeT f e (2.10)
e =1

This suggest that in order to eliminate the unknown element forces one can premultiply
the element equations (2.9) by LeT and then to add them. Thus premultiplying the
element equations by LeT yields

LeT Ke Le d = LeT f e e = 1, 2

We now define the system of equations for the entire system. By adding the element
equations (e = 1, 2) we get

Kd = f (2.11)

where K is called the global stiffness matrix and is given by

2
K = ∑ LeT Ke Le (2.12)
e=1

Substituting the expressions of the element stiffness matrices (2.8) into (2.11) gives the
global equation

⎡ 1 −k 1 0 ⎥⎤ ⎡u ⎤ ⎡r1 ⎤
⎢k ⎢ ⎥
⎢ 1 ⎥ ⎢ 1 ⎥⎥ ⎢ ⎥
2 ⎢
⎢−k k + k −k ⎥ ⎢u2 ⎥ = ⎢ f2 ⎥
1 2
⎢ ⎥⎢ ⎥ ⎢ ⎥
⎢ 2 ⎥ u
⎢⎣ 0 −k 2
k ⎥ ⎢⎣ 3 ⎥⎦ ⎢⎢⎣ f3 ⎥⎥⎦

The above system of three equations can be solved for the three unknowns u2 , u 3 , r1 .
Implementation issues dealing with computational efficiency of obtaining the global
stiffness matrix from element matrices and subsequently solving the global system of
equations are discussed in Section 2.2.2.

2.2.2 Implementation issues

The process in which we obtain the global matrices from the element matrices is
called assembly. Premultiplying and postmultiplying the element stiffness matrices by the
assembly operator, Le , which mostly consists of zero terms is not computationally
efficient. In practice this operation is replaced by the process called Direct Assembly,
which is illustrated next.

We will illustrate the process of Direct Assembly on the two-spring system introduced in
Figure 2.5.

9
The columns and rows of element stiffness matrices given below are tagged with the
global node number (shown at the top of each column and to the right of each row):

1 2 2 3
⎡ k 1 −k 1 ⎤ 1 ⎡ k 2 −k 2 ⎤ 2
K = ⎢⎢ 1
1
1 ⎥
⎥ K = ⎢⎢ 2
2
2 ⎥

⎢⎣−k k ⎥ 2 ⎢⎣−k k ⎥ 3
⎦ ⎦

We now assemble (insert) the value of each term in the element stiffness matrices into the
corresponding location of the global stiffness matrix as shown below

1 2 3
⎡ k1 −k 1 ⎤
⎢ ⎥ 1
⎢ 1 ⎥
K = ⎢−k k 1 + k 2 −k 2 ⎥ 2
⎢ ⎥
⎢ 2 ⎥
⎢⎣ −k 2
k ⎥ 3

The global matrix is initialized to be zero and the contributions from different element
matrices are summed.

We now proceed with the process of effectively solving the global system of equations.
For the purpose of discussion we consider the bar fixed at node 1 ( u1 = 0) with a force
vector given by f2 = 0 and f3 = 0 as shown in Figure 2.6.

k1 k2
10
1 2 3

Figure 2.6: Two-element truss structure with prescribed forces and boundary conditions

Thus the global system of equations is given by

⎡ k1 −k 1 0 ⎤⎥ ⎡ 0 ⎤ ⎡ r1 ⎤
⎢ ⎢ ⎥
⎢ 1 ⎥⎢ ⎥ ⎢ ⎥
⎢−k k 1 + k 2 −k 2 ⎥ ⎢⎢u2 ⎥⎥ = ⎢ 0 ⎥
⎢ ⎥⎢ ⎥ ⎢ ⎥
⎢ 2 2 ⎥ u
⎢ 3 ⎥ ⎢10⎥
0 −k k
⎣⎢ ⎦⎥ ⎣ ⎦ ⎣⎢ ⎦⎥

For convenience of utilizing MATLAB program nodes where the solution (displacements
in this case) is unknown will be numbered first. In general the optimal numbering is
based on computational efficiency considerations and simplicity of the programming.

10
The system of equation is partitioned into two by two blocks. The matrices are
partitioned after nodes where the displacement solution is prescribed, in this case after the
first row and first column

⎡ k1 | −k 1 0 ⎤ ⎡ 0 ⎤ ⎡ r1 ⎤
⎢ ⎥
⎢ ⎥⎢ ⎥ ⎢ ⎥
⎢- - - - | - - - - - - - ⎥ ⎢- - -⎥ ⎢⎢- - -⎥⎥ ⎡A G⎤ ⎡ d ⎤ ⎡ r⎤
⎢ ⎥ ⎢ ⎥ ⎢ ⎥⎢ ⎥ ⎢ ⎥
⎢ −k 1 | k 1
+ k 2
−k 2 ⎥⎢ u ⎥ = ⎢ 0 ⎥ ⇒ ⎢GT ˆ ⎥⎥ ⎢⎢ d
K ˆ ⎥⎥
= ⎢ˆf ⎥
⎢ ⎥⎢ 2
⎥ ⎢ ⎥ ⎢⎣ ⎦⎣ ⎦ ⎢⎣ ⎥⎦
⎢ ⎥ ⎢ u ⎥ ⎢ 10 ⎥
⎢ 0 | −k 2 k 2 ⎥ ⎢⎣ 3 ⎥⎦ ⎢⎣ ⎥⎦
⎣ ⎦

where matrix blocks are defined as


⎡k 1 + k 2 −k 2 ⎤
A = ⎡⎣k ⎤⎦
1
G = ⎡⎢−k 1 0⎤⎥ K = ⎢⎢
ˆ ⎥
2 ⎥
⎣ ⎦ ⎢⎣ −k
2
k ⎥

⎡0⎤ ⎡u2 ⎤
r = [r1 ] d = [0] ˆf = ⎢ ⎥ d ˆ=⎢ ⎥
⎢10⎥ ⎢⎣u 3 ⎥⎦
⎣⎢ ⎦⎥

We first solve for the unknown displacements

ˆ ˆ = ˆf − GT d
Kd (2.13)

followed by the reactions

ˆ
r = Ad + Gd (2.14)

For the two-bar problem the solution for the unknown displacements from Eq. (2.13)
gives

⎡k 1 + k 2 −k 2 ⎤ ⎡u2 ⎤ ⎡ 0 ⎤ ⎡k 1 ⎤
⎢ ⎥ ⎢ ⎥ = ⎢ ⎥ - ⎢ ⎥ [0]
⎢ ⎥ ⎢10⎥ ⎢k 2 ⎥
−k 2 k 2 ⎥ ⎢⎣u 3 ⎥⎦
⎣⎢ ⎦ ⎣⎢ ⎦⎥ ⎣⎢ ⎦⎥

which yields:

10 ⎛1 1⎞
u2 = u 3 = 10 ⎜⎜ 1 + 2 ⎟⎟
k1 ⎝k k ⎠

The reaction force is found from Eq. (2.14) and is given by r1 = −10

11
It can be easily seen that the reduced stiffness matrix is positive definite (see Problem 1.4
in Chapert 4).

Example 2.1
Three bars are joined as shown in Figure 2.7. The left and right ends are both
constrained, i.e. prescribed displacement is zero at both ends. There is a force of 5 units
acting on the middle node. The nodes are numbered starting with the nodes where
displacements are prescribed.

k1 5

k3

k2

1 3 2
Figure 2.7: Three-bar example problem

The element stiffness matrices are:

1 3 1 3 3 2
⎡ k 1 −k 1 ⎤ 1 ⎡ k 2 −k 2 ⎤ 1 ⎡ k 3 −k 3 ⎤ 3
K = ⎢⎢ 1
1
1 ⎥
⎥ K = ⎢⎢ 2
2
2 ⎥
⎥ K = ⎢⎢ 3
3
3 ⎥

⎢⎣−k k ⎥ 3 ⎢⎣−k k ⎥ 3 ⎢⎣−k k ⎥ 2
⎦ ⎦ ⎦

By direct assembly, the global stiffness matrix is:

1 2 3
⎡ k1 + k2 0 −k 1 − k 2 ⎤⎥ 1

⎢ ⎥
K=⎢ 0 k3 −k 3 ⎥ 2
⎢ ⎥
⎢ 1 3⎥
⎥⎦ 3
2 3 1 2
⎢⎣−k − k −k k + k + k

The displacement and force vectors for the system are:

⎡0⎤ ⎡r ⎤
⎢ ⎥ ⎢ 1⎥
d = ⎢⎢ 0 ⎥⎥ f = ⎢⎢r2 ⎥⎥
⎢ ⎥ ⎢ ⎥
⎢⎣u 3 ⎥⎦ ⎢⎣ 5 ⎥⎦

The global system of equations is given by

12
⎡ k1 + k2 0 −k 1 − k 2 ⎤⎥ ⎡ 0 ⎤ ⎡r ⎤

⎢ ⎥ ⎢⎢ ⎥⎥ ⎢⎢ 1 ⎥⎥
Kd = f ⇒ ⎢ 0 k3 −k 3 ⎥ ⎢ 0 ⎥ = ⎢r2 ⎥
⎢ ⎥⎢ ⎥ ⎢ ⎥
⎢ 1 3⎥ u 5
⎢⎣−k − k −k k + k + k ⎥⎦ ⎣⎢ 3 ⎦⎥ ⎣⎢ ⎦⎥
2 3 1 2

Partitioning after two rows and columns, since the first two displacements are prescribed,
gives:

⎡ (k 1 + k 2 ) 0 | ⎤
(−k 1 − k 2 )
⎢ ⎥ ⎡ 0 ⎤ ⎡ r1 ⎤
⎢ ⎥⎢ ⎥ ⎢ ⎥
⎢ 0 k3 | −k 3 ⎥ ⎢ 0 ⎥ ⎢ r2 ⎥
⎢ ⎥⎢ ⎥ ⎢ ⎥
⎢ --- --- -|- ⎥ ⎢- - -⎥ = ⎢- - -⎥
⎢ --- ⎥⎢ ⎥ ⎢ ⎥
⎢ ⎥ ⎢ u ⎥ ⎢ 5 ⎥
3 ⎢ ⎥
⎢(−k 1 − k 2 ) −k 3 | (k + k + k )⎥⎥⎦ ⎣
1 2 3
⎦ ⎣ ⎦
⎢⎣

or
⎡A G⎤ ⎡ d ⎤ ⎡ r⎤
⎢ ⎥⎢ ⎥ = ⎢ ⎥
⎢ T
G ˆ ⎥⎥ ⎢⎢ d
K ˆ ⎥⎥ ⎢ˆf ⎥
⎣⎢ ⎦⎣ ⎦ ⎢⎣ ⎥⎦

where
⎡k1 + k2 0 ⎤ ⎡−k1 − k2 ⎤
A = ⎢⎢ ⎥

ˆ = [k + k + k ];
K 1 2 3 G = ⎢⎢ ⎥;

⎢⎣ 0 k 3⎥ ⎢⎣ − k 3 ⎥
⎦ ⎦
⎡ 0⎤
d = ⎢⎢ ⎥⎥ ; d ˆ = [u ];
3
ˆf = [5 ]
0
⎣⎢ ⎦⎥
The reduced system of equations is given by

ˆ ˆ = ˆf − GT d ⇒ (k + k + k ) u = 5
Kd 1 2 3 3

which yields
5
u3 =
k + k2 + k3
1

Example 2.2
Figure 2.8 (on the left) shows material properties, geometry, loads and boundary
conditions of the two-bar structure. In this example we emphasize the four main steps in
the finite element method, namely: (1) preprocessing, (2) construction of local (element)
behavior, (3) assembling the local matrices to obtain the global behavior, and (4)
postprocessing.

13
Step 1, which is subdividing the structure into elements, assigning the element numbers
to each spring, node numbers to each joint, starting with nodes where the displacements
are prescribed, is shown in Figure 2.8 on the right. The finite element model consists of
two elements numbered 1 and 2 and three nodes sequentially numbered starting from
the left. Detailed solution of the problem is given in Example 2.2.
We proceed with Step 2, which deals with the formulation of each element.

10 3

10

2
1
E, A constant

y 45D
l 2
1

x l

Figure 2.8: Two-element structure

Step 2: Construction of the local element behavior

Element 1

Element one is numbered with global nodes 1 and 3. It is positioned at an angle


φ = 900 with respect to the positive x axis. Other relations are as follows:

0 0 1 1 A1E 1 AE
cos 90 = 0 sin 90 = 1 l =l k = 1 =
l l
⎡0 0 0 0⎤ x
⎢ ⎥ (1 3
⎢ 0 −1⎥⎥
1 AE ⎢ 0 1
K = ⎢ ⎥
l ⎢0 0 0 0⎥
1
⎢ ⎥ (3
⎢ 0 −1 0 1⎥
⎣ ⎦
1
x
Element 2

Element two is numbered with global nodes 2 and 3. It is positioned at an angle


φ = 450 with respect to the positive x axis. Other relations are as follows:

3 x

2
x
14 2
1 1
cos 450 = sin 450 = l2 = 2 l
2 2
A2E 2 AE
k2 = 2
=
l 2 l

⎡ 1 1 1 1⎤
⎢ − − ⎥
⎢ 2 2 2 2⎥
⎢ 1 (2
⎢ 1 1 1 ⎥⎥
− −
AE ⎢⎢ 2 2 2 2 ⎥⎥
K2 =
2 l ⎢⎢ 1 1 1 1 ⎥

− −
⎢ 2 2 2 2 ⎥ (3
⎢ ⎥
⎢ 1 1 1 1 ⎥
⎢− − ⎥
⎢⎣ 2 2 2 2 ⎥⎦

Step 3: Construction of the global behavior

(3a) Direct Assembly

⎡0 0 0 0 0 0 ⎤
⎢ ⎥ (1
⎢0 1 0 0 0 −1 ⎥⎥

⎢ ⎥
⎢0 0 1 1 1 1 ⎥
⎢ − − ⎥
⎢ 2 2 2 2 2 2 2 2 ⎥
AE ⎢ (2
K= ⎢ 1 1 1 1 ⎥⎥
l ⎢0 0 − −
⎢ 2 2 2 2 2 2 2 2 ⎥⎥
⎢ 1 1 1 1 ⎥
⎢0 0 − − ⎥
⎢ 2 2 2 2 2 2 2 2 ⎥
⎢ ⎥
⎢ 1 1 1 1 ⎥ (3
⎢ 0 −1 − − 1+ ⎥
⎢⎣ 2 2 2 2 2 2 2 2 ⎥⎦
where

⎡ 0⎤ ⎡r1x ⎤
⎢ ⎥ ⎢ ⎥
⎢ 0⎥ ⎢r1y ⎥
⎢ ⎥ ⎢ ⎥
⎢ 0⎥ ⎢r2x ⎥
⎢ ⎥
d =⎢ ⎥ f = ⎢⎢r ⎥⎥
⎢ 0⎥ ⎢ 2y ⎥
⎢ ⎥ ⎢10 ⎥
⎢u 3x ⎥ ⎢ ⎥
⎢ ⎥ ⎢ ⎥
⎢u 3y ⎥ ⎢⎣ 0 ⎥⎦
⎣⎢ ⎦⎥
Once again notice that if the external force component at a node is prescribed, then the
corresponding displacement component at that node is unknown. On the other hand, if a

15
displacement component at a node is prescribed, then the corresponding force
component at that node is an unknown reaction.

(3b) Global System of Equations

⎡0 0 0 0 0 0 ⎤
⎢ ⎥
⎢0 1 0 0 0 −1 ⎥⎥ ⎡ 0 ⎤
⎢ ⎡r1x ⎤
⎢ ⎥
⎢0 0 1 1 1 1 ⎥ ⎢⎢ 0 ⎥⎥ ⎢ ⎥
⎢r1y ⎥
⎢ − − ⎥
⎢ 2 2 2 2 2 2 2 2 ⎥ ⎢⎢ ⎥⎥ ⎢ ⎥
⎢r2x ⎥
AE ⎢ 0
⎢ 1 1 1 1 ⎥⎥ ⎢⎢ ⎥⎥ = ⎢ ⎥
− − ⎢r2y ⎥
l ⎢0 0 2 2 2 2 2 2 2 2 ⎥⎥ ⎢⎢ 0 ⎥⎥ ⎢ ⎥
⎢ ⎢10 ⎥
⎢ 1 1 1 1 ⎥ ⎢u 3x ⎥ ⎢ ⎥
⎢0 0 − − ⎥⎢ ⎥ ⎢ ⎥
⎢ 2 2 2 2 2 2 2 2 ⎥ ⎢⎢u 3y ⎥⎥ ⎢⎣ 0 ⎦⎥
⎢ ⎥⎣ ⎦
⎢ 1 1 1 1 ⎥
⎢ 0 −1 − − 1+ ⎥
⎢⎣ 2 2 2 2 2 2 2 2 ⎥⎦

(3c) Reduced Global System of Equations

The global system is partitioning after four rows and four columns:

⎡u1x ⎤ ⎡ 0⎤ ⎡ 1 ⎤
⎢ ⎥ ⎢⎢ ⎥⎥ ⎢
1

⎢u1y ⎥ ⎢ 0⎥ ⎡u 3x ⎤ ⎡10⎤ ⎢2 2 2 2 ⎥
d = ⎢u ⎥ = ⎢ ⎥ ˆ=⎢ ⎥
d ˆf = ⎢ ⎥ ˆ
K=⎢ ⎥
⎢ 2 x ⎥ ⎢ 0⎥ u ⎢0⎥
⎢ ⎥ ⎢ ⎥ ⎣⎢ 3y ⎦⎥ ⎣⎢ ⎦⎥ ⎢ 1
⎢ 1+
1 ⎥

⎢u2y ⎥ ⎢ 0⎥ ⎣2 2 2 2⎦
⎣ ⎦ ⎣ ⎦
⎡ 0 0 ⎤
⎢ ⎥
⎡r1x ⎤ ⎢ 0 −1 ⎥⎥
⎢ ⎥ ⎢
⎢r1y ⎥ ⎢ ⎥
r = ⎢r ⎥ G = ⎢− 1 −
1 ⎥
⎢ 2x ⎥ ⎢ ⎥
⎢ ⎥ ⎢ 2 2 2 2⎥
⎢r2y ⎥ ⎢ 1 ⎥⎥
⎣ ⎦ ⎢− 1 −
⎢ 2 2 2 2 ⎥⎦

The unknown displacement vector is found from the solution of the reduced system of
equations
⎡ 1 1 ⎤
⎢ ⎥
ˆ ˆ = ˆf − GT d AE ⎢ 2 2 2 2 ⎥ ⎢⎡u 3x ⎥⎤ ⎢⎡10⎥⎤
Kd ⇒ ⎢ ⎥ =
l ⎢ 1 1 ⎥ ⎢⎣u 3y ⎥⎦ ⎢⎢ 0 ⎥⎥
⎢ 1+ ⎥ ⎣ ⎦
⎣2 2 2 2⎦

and is given by

16
⎡u 3x ⎤ l ⎡⎢10 + 20 2 ⎤⎥
⎢ ⎥= ⎢ ⎥
u
⎣⎢ 3y ⎦⎥ AE ⎢⎣ −10 ⎥⎦

The unknow reaction vector r is

⎡ 0 0 ⎤
⎢ ⎥ ⎡ 0 ⎤
⎡r1x ⎤ ⎢ 0 −1 ⎥⎥ ⎢ ⎥
⎢ ⎥ ⎢ ⎢ 10 ⎥
⎢r1y ⎥ ⎢ ⎥ AE ⎡⎢10 + 20 2 ⎤⎥ l ⎢ ⎥
ˆ=
r = ⎢r ⎥ = Ad + Gd ⎢ 1 1 ⎥ =⎢ ⎥
⎢ 2x ⎥ ⎢− − ⎥ ⎢ ⎥
⎢ ⎥ ⎢ 2 2 2 2 ⎥ l ⎢⎣ −10 ⎥⎦ AE ⎢−10⎥
⎢r2y ⎥ ⎢ ⎢ ⎥
⎣ ⎦ ⎢− 1 1 ⎥⎥ ⎢−10⎥
⎢ 2 2 − ⎣ ⎦
⎣ 2 2 ⎥⎦

The reaction forces together with the applied forces are shown in Figure 2.9:

3
10

y 22
1

x
r2x r1x
2 1

r1y
r2y

Figure 2.9: Reaction forces for example problem 2.2.

It can be easily verified that the equilibrium equations are satisfied:

∑F x =0; ∑F y =0; ∑M 2 =0

Step 4: Postprocessing

Finally, the stresses in the two elements are computed as follows

17
⎡u1ex ⎤
⎢ ⎥
⎢u e ⎥
u2ex − u1ex E ⎡ ⎢ 1y ⎥ E e
σe = Ee = e ⎢−1 0 1 0⎥⎤ ⎢ e ⎥ = e ⎡ ⎤ e e
⎢⎣−1 0 1 0⎥⎦ R d
le l ⎣ ⎦ ⎢u2x ⎥ l
⎢ ⎥
⎢u e ⎥
⎢⎣ 2y ⎥⎦

Ee ⎡− cos φe
= ⎢⎣ − sin φe cos φe sin φe ⎤⎥ d e
le ⎦

For element one we have


φ1 = 900 (cos φ = 0, sin φ = 1)

⎡u1x ⎤ ⎡⎢ 0 ⎤

⎢ ⎥ ⎢ 0 ⎥
u
⎢ 1y ⎥ ⎢ ⎥ l
d1 = ⎢u ⎥ = ⎢
⎢ 3x ⎥ ⎢10 + 20 2 ⎥⎥ AE
⎢ ⎥ ⎢ ⎥
⎢u 3y ⎥ ⎢
⎣ ⎦ ⎢⎣ −10 ⎥⎦⎥
⎡ 0 ⎤
⎢ ⎥
⎢ 0 ⎥
E ⎡ ⎤ ⎢ ⎥ l −10
σ1 = ⎢⎣ 0 −1 0 1⎥ ⎢ ⎥ =
l ⎦ ⎢10 + 20 2 ⎥ Al A
⎢ ⎥
⎢ −10 ⎥
⎢⎣ ⎥⎦

For element two we have

φ2 = 450 (cos φ = 1/ 2, sin φ = 1/ 2)

⎡u2x ⎤ ⎡⎢ 0 ⎤

⎢ ⎥ ⎢ 0 ⎥
⎢u 2 y ⎥ ⎢ ⎥ l
2 ⎢
d = u =⎢ ⎥
⎢ 3x ⎥ ⎢10 + 20 2 ⎥⎥ AE
⎢ ⎥ ⎢ ⎥
⎢u 3y ⎥ ⎢
⎣ ⎦ ⎢⎣ −10 ⎥⎦⎥

⎡ 0 ⎤
⎢ ⎥
⎢ 0 ⎥
E ⎡ ⎢ ⎥ l 10 2
2
σ = ⎢−1/ 2 −1/ 2 1/ 2 1/ 2 ⎤⎥ ⎢ ⎥ =
l 2 ⎣ ⎦ ⎢10 + 20 2 ⎥ A E A
⎢ ⎥
⎢ ⎥
⎢⎣ −10 ⎥⎦

18
Problems Chapter 2

Problem 2-1: For the spring system given below


3k
k

k 2k
50

Figure 2.10: Data for Problem 2-1

a. Number the elements and nodes


b. Compute the global stiffness and force vector
c. Partition the system and solve for the nodal displacements
d. Compute the reaction forces

Problem 2-2: Show that the equivalent spring stiffness for the bar with a centered square
hole is

5Etab
k=
(a + b)l
where E is the Young’s modulus and

2b a

2b

l/10 l/10
l

Figure 2.11: Data for Problem 2-2

Problem 2-3: Consider the truss structure given in Figure 2.12. Nodes A and B are
constrained. A force acting equal ten units is acting in the positive x direction at node C.

D(0,1) C(1,1)
10
Young Modulus: E = 1
Cross-sectional area: A = 2
A(0,0) B(1,0)

Figure 2.12: Data for Problem 2-3

19
a. Number the elements and nodes
b. Compute the global stiffness and force vector
c. Partition the system and solve for the nodal displacements
d. Compute the stresses and reactions

Problem 2-4: Given the three-bar structure subjected to the prescribed load at point B
equal to 10 units as shown in Figure 2.13. The Young modulus is 1 unit, cross-sectional
area of the bar BC is 2 units and that of BD and BF is 1 unit. Note that point D is free to
move in x direction.

a. Construct the global stiffness matrix and load vector


b. Partition the matrices and solve for the unknown displacements at point B, and
displacement in x direction at point D.
c. Find the stresses in the three bars
d. Find the reactions at nodes C, D and F

F (-1,1 ) C (0,1) D (1,1)

A=2
A=1 A=1

P = 10 x
B (0,0)

Figure 2.13: Data for Problem 2-4

Problem 2-5: In each of the two plane structures shown in Figure 2.14, rigid blocks are
connected by linear springs. Imagine that only horizontal displacements are allowed. In
each case, write the reduced global equilibrium equations in terms of spring stiffness ki ,
unknown nodal displacements ui, and applied loads Fi. You may renumber the nodes so
that the nodes where the displacements are prescribed are numbered first.

20
u2
k1 k2 F2 k1

F3 k2 F4
F1 k3 k5 k3 k4
F1
u3 u4
k4 F2 k6 F3

u1 u2 u1 u3
(a) (b)
Figure 2.14: Data for Problem 2-5

Problem 2-6: The plane structure shown in Figure 2.15 consists of a rigid, weightless bar
and linear springs of stiffness k1 and k2. Only small vertical displacements are permitted.
The reduced stiffness matrix K of this structure is 2 by 2 but can have various forms,
depending on the choice of nodal displacement vector. Determine K for each of the
following choices of lateral translations:

a. v1 at x = 0 and v2 at x = L , as shown in Figure 2.15 on the right. vi are vertical


displacements
b. v1 at x = 0 and vA at x = L 2 .
c. v2 at x = L and vB at x = 2L .

y,v

L L
x v2
v1
A B
k1 k2
d.o.f. in part (a)

Figure 2.15: Data for Problem 2-6

Problem 2-7: Write a MATLAB code that computes the element stiffnesses of bar
elements in two dimensions by Eq. (2.6). For this purpose, let the node numbers of the
elements be stored in an array IEN(i, je), I =1 to 2, je=1 to nel, nel is the number of
elements. Store the x and y coordinates of all nodes in arrays x(i), y(i), i=1 to nnp, the
number of nodes. Use the following formulas to compute the sines and cosines of the
angles φ :

21
x2 − x1 y2 − y1
cos φ = sin φ =
l l
a) Compute and print out the element stiffnesses of the bars Example 2.2. Assemble
the global stiffness matrix by hand (to 3 significant digits) and use Matlab to solve the
equations. Obtain the reactions.
b) Write the MATLAB code to assemble the global stiffness from the element
stiffnesses. This involves a loop over the elements in which the submatrices are
added into the global stiffness according to the IEN array (see Chapter 15). Check
the procedure by testing it against your hand calculation for Example 2.2. Solve the
system of equations by MATLAB. Prior to solving the equations you need to enforce
the support conditions. Use the penalty method to enforce the prescribed zero
6
displacements. In this method you place 10 times the average diagonal element of
the stiffness matrix on the diagonal term that corresponds to the prescribed zero
displacement. Be sure to put a zero on the right hand side of that equation.
c) Compute the stiffness and solve for the nodal displacements of the structure shown
in Fig. 2.16.
d) Plot the deformed structure with MATLAB. For this purpose add the
mag*displacement to the nodal coordinates. The factor mag is to magnify the
displacements so that they are visible.

E = 1.5
4 A=2
For all
bars

F=7.5
3 3 3 3 3

Figure 2.16: Data for Problem 2-7

22
Chapter

3 Strong and Weak Forms for one-


dimensional problems

In Chapter 3, the strong and weak forms for several physical models are
developed in one dimension. The strong form is the name given to the governing
equations and the boundary conditions. The governing equations are usually partial
differential equations, but in the one-dimensional case they become ordinary differential
equations. The weak form is an integral form of these equations which is needed to
formulate the finite element method. Differential equations in one dimension for axially
loaded elastic bars, heat conduction and electric current flow will be considered to
demonstrate the basic steps in formulating the strong and weak forms. We will also
examine the concept of various degrees of continuity, or smoothness, which will play an
important role in developing finite element methods.

3.1 The Strong Form in one-dimensional problems


3.1.2 The Strong Form for an axially loaded elastic bar

We consider the static response of an elastic bar of variable cross-section such as


shown in Figure 3.1. This is an example of a problem of linear stress analysis, where
we seek to find the stress distribution σ ( x ) in the bar. The stress will result from the
deformation of the body, which is characterized by the displacements of points in the
body, u ( x ) . The displacement results in a strain deonoted by ε ( x ) ; strain is a
dimensionless variable. As shown in Fig. 3.1, the bar is subjected to a body force or
distributed loading b ( x ) ; The body force is in units of force per volume, the distributed
axial loading is in units of force per length. For convenience and without loss of
generality the two types of loading will be expressed in units of force per unit length. In
addition loads can be prescribed at the ends where the displacement is not prescribed;
these loads are often called tractions and denoted by σ ; these loads are in units of force
per area. The body force could be due to gravity (if the bar were placed vertically instead
of as shown), a magnetic force, or a thermal stress); its units are force per unit volume.
At the two ends of the bar either a load can be specified or the displacement of the bar
can be specified. These specifications at the end points will result in the boundary
conditions of the problem.

The bar must satisfy the following conditions:

1. it must be in equilibrium
2. it must satisfy the elastic stress-strain law known as Hooke’s law σ = Eε
3. the displacement field must be compatible
4. a relationship between the strain and displacement, known as a strain-
displacement equation

The differential equation for the bar follows from the equilibrium of the forces
acting on any segment of the body. Consider an equilibrium, ∑ Fx = 0 , of an
infinitesimal element as shown in Figure 3.1.

⎛ ∆x ⎞⎟
−N (x ) + b ⎜⎜x + ⎟ ∆x + N (x + ∆x ) = 0
⎝ 2 ⎠⎟

Rearranging terms and dividing by ∆x we obtain

N (x + ∆x ) − N (x ) ⎛ ∆x ⎞⎟
+ b ⎜⎜x + ⎟= 0
∆x ⎝ 2 ⎠⎟
dN
If we take the limit of the above as ∆x → 0 , the first term is the derivative so the
dx
above can be written as

dN
+b = 0 (3.1)
dx

This is the equilibrium equation expressed in terms of the internal force N. The internal
force N is related to the stress by:

N = Aσ (3.2)

The strain-displacement (or kinematical) relation is obtained by applying the


engineering definition of strain we used in Chapter 2 for an infinitesimal segment. The
elongation is given by u ( x + ∆x ) − u ( x ) and the original length by ∆x , so

elongation u (x + ∆x ) − u (x )
ε= =
orig.length ∆x

Taking the limit of the above as ∆x → 0 , we recognize the definition of a derivative, so

2
du
ε= (3.3)
dx

Figure 3.1: Geometry and boundary conditions for the elasticity problem

Substituting Eq.(3.2) and Eq.(3.3) into Eq.(3.1) yields:

d ⎛ du ⎞
⎜AE ⎟⎟ + b = 0 ; 0 < x < l (3.4)

dx ⎝ dx ⎠⎟

In the above, u(x) is the dependent variable, which is the unknown. This differential
equation is another form of the equilibrium equation. As can be seen from how we have
constructed it, it implicitly includes the stress strain law and the definition of strain.
Compatibility is met by requiring the displacement to be continuous. More will be said
about the required continuity later.
To solve the above differential equation, we need to prescribe boundary conditions at
the two ends of the bar. For the purpose of illustration, we consider the following specific
boundary conditions: at x = 0 the force, N is prescribed, and at x = l the displacement,
u, is prescribed, i.e.:

⎛ du ⎞
N (x = 0)/ A(x = 0) = σ(x = 0) = ⎜⎜E ⎟⎟⎟ = σ
⎝ dx ⎠x =0 (3.5)
u(x = l ) = u

The governing differential equation (3.4) along with boundary conditions (3.5) is called
the Strong Form of the problem, which is summarized below:

3
d ⎛ du ⎞
⎜AE ⎟⎟ + b = 0 on 0 < x < l

dx ⎝ dx ⎠⎟
⎛ du ⎞⎟
⎜⎜E ⎟ = σ(x = 0) = σ (3.6)
⎝ dx ⎠⎟x =0
u(x = l ) = u

It should be noted that σ, u , and b are given; these is the data that describes the
problem. The unknown is the displacement u ( x ) . A more general discussion on the
boundary conditions is in given Section 3.3.

3.1.2 The Strong Form for heat conduction in one dimension


Consider a bar of length l as shown in Fig. 3.2. Heat energy is supplied to the bar,
by, for example, heating an electric wire embedded in the bar or through a surface. Heat
supply per unit length and time is denoted by Q and is measured in units of energy per
unit length and time. It is positive if the heat is added to the system. We consider a
steady state problem, i.e. a system that is not changing with time. To establish the
differential equation that governs the system, we consider heat balance (or conservation
of energy) on an infinitesmal element of the bar.

⎛ ∆x ⎞⎟
S (x ) + Q ⎜⎜x + ⎟ ∆x − S (x ++x ) = 0
⎝ 2 ⎠⎟
(3.7)
dS
or, =Q
dx

4
Figure 3.2: Geometry and boundary conditions for the heat conduction problem
where S (x ) is the total heat that enters the cross-sectional area A(x ) . Define the heat flux
q as:
S (x )
q(x ) = (3.8)
A(x )

The constitutive equation for heat flow, which relates the flux (which corresponds
to the stress in the elastic bar) to the temperature, is known as Fourier’s law (it
corresponds to Hooke’s law in elasticity):

dT
q = −k (3.9)
dx

where k is the thermal conductivity (which must be positive) and T is the temperature. A
negative sign appears in Eq. (3.9) because the heat flow direction is from high (hot) to
low temperature (cold).
Inserting Eq. (3.9) and Eq. (3.8) into Eq. (3.7) yields:

d ⎛ dT ⎞⎟
⎜Ak ⎟ +Q = 0 ; 0 < x < l (3.10)
dx ⎜⎝ dx ⎠⎟

For Ak = constant, we obtain:

d 2T
Ak +Q = 0 ; 0 < x < l (3.11)
dx 2

5
At the two ends of the bar, either the flux or the temperature must be prescribed.
This gives the boundary conditions. In this example, we consider the specific boundary
conditions q(x = 0) = q and T (x = l ) = T . The corresponding Strong Form for the
heat conduction problem is given by:

d ⎛ dT ⎞⎟
⎜Ak ⎟ +Q = 0 on 0 <x <l
dx ⎜⎝ dx ⎠⎟
dT
q = −k = q on x =0 (3.12)
dx
T = T on x = l

Further discussion on boundary conditions is given in Section 3.3.

3.1.3 Diffusion in one dimension


In the diffusion problem the unknown is the ion concentration, c. The ion flux qc
is related to the ion concentration by Fick’s law as follows:

dc
qc = −kc
dx
where kc is the diffusion coefficient. Ions move due to the gradient in ion concentration.
The balance equation for the diffusion problem is similar to that of the heat conduction
problem. The resulting differential equation is given by

d ⎛ dc ⎞
⎜Akc ⎟⎟ + Qc = 0 on 0 <x <l

dx ⎝ dx ⎠⎟

where Qc is ion source.

3.1.4 Electric flow in one dimension


The motion of an electric charge flux qV is proportional to the voltage gradient.
This is described by Ohm’s law:
dV
qV = −kV
dx

where kV is electric conductivity and V is the voltage. Again, the balance equation is
similar to that of the heat conduction problem.

d ⎛ dV ⎞⎟
⎜AkV ⎟ + QV = 0 on 0 <x <l

dx ⎝ dx ⎠⎟

where QV is electric charge source.

6
3.2 The Weak Form in one dimension
In general, the exact solution of the Strong Form of boundary value problems is
not possible for problems with complicated geometries. Therefore, most boundary value
problems are solved numerically by methods such as the the Finite Difference Method
(FDM). However, the finite difference method is not as versatile as the finite element
method in dealing with arbitrary geometries, so most engineering software has been
developed in a finite element format.
In order to apply the FEM, the partial differential equations have to be restated in
an integral form. This integral form is called the Weak Form. A weak form is an integral
form of the equations that is completely equivalent to the governing equation and certain
boundary conditions, i.e. the strong form. In many disciplines the weak form has specific
names. For example, it is called the principle of virtual work in stress analysis.
To illustrate how the Weak Form is developed, we consider the Strong Form of
the stress analysis problem given in (3.6). We start by multiplying Eq. (3.6)a by an
arbitrary function w(x ), a function called a weight function or a test function. We then
integrate the product over the problem domain which here is the interval [0, l]:
l
⎡d ⎛ du ⎞ ⎤
∫ w ⎢ ⎜⎜AE ⎟⎟⎟ + b ⎥dx = 0 ∀w
0 ⎣⎢ dx ⎝ dx ⎠ ⎦⎥

For convenience, we rewite the above in the equivalent form


l l
d ⎛ du ⎞
∫ w ⎜⎜AE ⎟⎟dx + ∫ wbdx = 0 ∀w (3.13)
0
dx ⎝ dx ⎠⎟ 0

where ∀w denotes that w(x ) is an arbitrary function, i.e. that the above has to hold for
all functions w(x ) . There are some requirements on the smoothness and boundary values
of w(x ) , but we will get to those later. It is important to note the fact that the weak form
has to hold for all functions w(x ) : without this arbitrariness of the weight function, a
weak form is not equivalent to the strong form (see Section 3.3.5).

One could use the above to develop a finite element method, but it would require
smoother approximations than are generally used (and are in fact hard to construct),
because the expression still contains second derivatives. Furthermore, the stiffness
matrix would not be symmetric. Therefore, we recast it in a form containing only first
derivatives, which will furthermore be a symmetric.
To recast the weak form so that only first derivatives appear, recall the rule for
taking the derivative of a product

d df dw df d dw
(wf ) = w +f ⇒ w = (wf ) − f
dx dx dx dx dx dx

Integrating the right hand side of the above over the domain [0 ,l], we obtain

7
l l l
df d dw
∫ w dx =
dx ∫ dx
(wf )dx − ∫ f
dx
dx
0 0 0

Now we make use of the fundamental theorem of calculus, which states that the integral
of a derivative of a function is the function itself. This enables us to replace the first
integral on the RHS by a set of boundary values
l l l
df l dw dw
∫ w dx = (wf ) 0 − ∫ f
dx dx
dx = w (l ) f (l ) − w (0) f (0) − ∫ f
dx
dx (3.14)
0 0 0

Eq. (3.14)is known as integration by parts. We will find that integration by parts useful
whenever we relate strong forms to weak forms.
du
To apply the integration by parts formulas to Eq.(3.13), let f = AE . Then
dx
Eq. (3.14) can be written as:
l l l
d ⎛ du ⎞ ⎡ du ⎤ dw du
∫ w ⎜⎜AE ⎟⎟⎟dx = ⎢wAE ⎥ − ∫ AE dx (3.15)
0
dx ⎝ dx ⎠ ⎣⎢ dx ⎦⎥ 0 0
dx dx

Using Eq. (3.15), Eq. (3.13) can be written as follows:

l l l
⎡ du ⎤ dw du
⎢wAE ⎥ −
⎢⎣ dx ⎥⎦ 0 ∫ dx
AE
dx
dx + ∫ wbdx =0 ∀w
0 0

Rearranging the terms in the above and writing out the boundary term gives
l l
dw du ⎛ du ⎞ ⎛ du ⎞
∫ AE dx = ⎜⎜wAE ⎟⎟⎟ − ⎜⎜wAE ⎟⎟⎟ + ∫ wbdx ∀w (3.16)
dx dx ⎝ dx ⎠ l ⎝ dx ⎠ 0
0 0

We will now examine the boundary terms, the first two terms on the RHS of the
above. We will see throughout the development of finite element methods that the
boundary terms must be treated carefully and well understood. If we write the boundary
du
term at x = 0 as σ = −σ ( x = 0) = − E x = 0 (i.e., positive prescribed stress σ at x = 0
dx
gives rise to compressive or negative stress), then we have
l l
dw du
∫ dx
AE
dx
dx = (wAσ ) l + (wA) 0 σ + ∫ wbdx ∀w (3.17)
0 0

The above equation is not a useful Weak Form since it involves the stress at x = l , which
is unknown. This difficulty can be circumvented by constructing a set of weight

8
functions that are arbitrary everywhere in the interval (0, l) but vanish at x = l . Then the
weak form becomes
l l
dw du
∫ dx
AE
dx
dx = (wA) 0 σ + ∫ wbdx ∀w such that w (l ) = 0 (3.18)
0 0

We will see in Section 3.3.5 that the above weak form is equivalent to the equilibrium
equation (3.6)a with stress boundary condition (3.6)b. In order for the weak form to be
completely equivalent to the strong form, we must then require the approximation
functions to satisfy the displacement boundary conditions (3.6)c. Since it is essential for
the equivalence that the approximation functions satisfy the displacement boundary
conditions, they are often called essential boundary conditions. We will see in Section
3.3.5 that the stress boundary conditions follow from the weak form and that the
approximation need not be constructed to satisfy them, so they are called natural
boundary conditions.

3.3 Generalization of the Strong and Weak Forms


3.3.1 General Strong Form for one-dimensional stress analysis
We will now consider the more general situation, where instead of specifying a stress
boundary condition at x = 0 and a displacement boundary condition at x = l ,
displacement and stress boundary conditions can be prescribed at either end. For this
purpose, we will need a more general notation for the boundaries.

The boundary of the one dimensional domain, consisting of the two points,
x = 0 and x = l , will be denoted by Γ . The portion of the boundary where the
displacements are presribed is denoted by Γu ; these as you recall, are the essential
boundary conditions. The boundary where where the stress is prescribed is denoted by
Γσ ; these are the natural boundary conditions.

The stress and displacement cannot be prescribed at the same boundary point.
Physically, this can be seen to be impossible by considering a bar such as Figure 3.1. If
we could prescribe both the displacement and the force on the right hand side, this would
mean that the deformation of the bar is independent of the applied force. It would also
mean that the material properties have no effect on the force-displacement behavior of
the bar. Obviously, this is physically unrealistic, so we require that any boundary point
be either a prescribed stress point or a prescribed displacement point. We write this
mathematically as Γσ ∩ Γu = 0 . We will see from subsequent examples that this can be
generalized to other systems: natural boundary conditions and essential boundary
conditions cannot be applied at the same boundary points.

We will often call boundaries with essential boundary conditions essential


boundaries; similarly, boundaries with natural boundary conditions will be called natural

9
boundaries. We can then say that a boundary cannot be both a natural and an essential
boundary.

It can also be shown that one type of boundary condition is needed at each
boundary point, i.e. we cannot have any boundary points at which neither an essential nor
a natural boundary condition is applied. In other words, any point of a boundary is either
an essential boundary or a natural boundary and their union is the entire boundary.
Mathematically, this can be written as Γσ ∪ Γu = Γ .

To summarize the above, at any boundary point, either an essential or a natural


boundary condition must be applied, but we can not apply both at the same boundary
point. In our shorter nomenclature, we can say that any boundary must be an essential
boundary or a natural boundary, but it can’t be both. These conditions are very important
and can be mathematically expressed by the two conditions we have stated in the above:

Γσ ∪ Γu = Γ Γ σ ∩ Γu = 0 (3.19)

Using the above terminology, we can rewrite the strong form (3.12) as

d ⎛ du ⎞
⎜AE ⎟⎟ + b = 0 0 < x < l

dx ⎝ dx ⎠⎟
du
σn = En = σ on Γσ (3.20)
dx
u = u on Γu

In the above, we have added a unit normal to the body and denoted it by n; as can
be seen from Fig. 3.1 it is given by n = −1 at x = 0 , n = +1 at x = l . This trick enables us
to write the boundary condition in terms of the forces applied at the two ends. For
example, when a positive force per unit area σ is applied at the left-hand end of the bar
in Fig. 3.1, then the stress at that end is negative, i.e. compressive, since at that end
σ n = −σ = σ . At any right hand boundary point, n = +1 and so σ n = σ = σ .

3.3.2 The Weak Form for heat conduction in one dimension


We start by multiplying Eq. (3.11) by the weight function w(x ) and integrating it
over the problem domain gives.
l l
d ⎛ dT ⎞⎟
∫ w ⎜⎜Ak
dx ⎝
⎟dx + ∫ wQdx = 0
dx ⎠⎟
∀w (3.21)
0 0

Using the integration by parts of the first term in Eq. (3.21) yields:

10
l l l
dw dT ⎡ dT ⎤
∫ dx
Ak
dx
dx = ⎢wAk
⎣⎢ dx ⎦⎥ 0 ∫0
⎥ + wQdx ∀w (3.22)
0

Recalling that the boundary term can be expressed as


l
⎡ dT ⎤ l
⎢wAk ⎥ = −[wAq ]0 = − (wAq )x =l + (wAq )x =0
⎣⎢ dx ⎦⎥ 0
= − (wAqn )x =l − (wAqn )x =0 (3.23)
= − (wAqn )Γ = − (wAq )Γq

where qn = q on Γq and w = 0 on ΓT . With this in mind and in combination with Eq.


(3.22) the Weak Form can be rearranged as follows:
l l
dw dT
∫ dx
Ak
dx
dx = − (wA) Γ q + ∫ wQdx
q
∀w such that w (ΓT ) = 0 (3.24)
0 0

Notice the similarity between Eqs. (3.24) and (3.18).

3.3.3 General Weak Form for One Dimensional Stress Analysis


We will next develop the weak form for this more general version of the strong form,
Eq.(3.20). We again multiply the strong form by the weight function and integrate over
the domain, which gives Eq. (3.15) as before
l l l
dw du ⎛ du ⎞
∫ AE dx = ⎜⎜wAE ⎟⎟⎟ + ∫ wbdx ∀w (3.25)
dx dx ⎝ dx ⎠ 0
0 0

We next consider the first term on the RHS of the above and rewrite it by using the
normal n defined above
l
⎛ du ⎞ ⎛ du ⎞ ⎛ du ⎞ ⎛ du ⎞ ⎛ du ⎞
⎜⎝⎜wAE dx ⎠⎟⎟⎟ = ⎝⎜⎜wAE dx ⎠⎟⎟⎟ − ⎝⎜⎜wAE dx ⎠⎟⎟⎟ = ⎝⎜⎜wAE dx n ⎠⎟⎟⎟ + ⎝⎜⎜wAE dx n ⎠⎟⎟⎟ (3.26)
0 l 0 l 0

In the above we have simply used the sign of the normal n to change the sign of the
second term; we will see later in two dimensional formulations that the normal appears
naturally in this form on boundary terms.

Since the far RHS of (3.94) now includes all boundary points in the same form,
we can write that

11
l
⎛ du ⎞ ⎛ du ⎞ ⎛ du ⎞ ⎛ du ⎞
⎜wAEn ⎟⎟ = ⎜⎜wAEn ⎟⎟ = ⎜⎜wAEn ⎟⎟ + ⎜⎜wAEn ⎟⎟ (3.27)
⎜⎝ ⎟
dx ⎠ 0 ⎝ ⎟
dx ⎠ Γ ⎝ ⎟
dx ⎠ Γ ⎝ dx ⎠⎟ Γ
u σ

where the second equality in the above follows from the fact that the entire boundary
consists of the displacement boundary and the stress boundary and they do not overlap,
i.e. Eq. (3.19).

In general we can state that for any one dimensional domain denoted by Ω with
boundaries Γ we have
df ( x )
∫Ω dx dx = ( fn ) Γ (3.28)

provided that f ( x ) is sufficiently smooth function. Sufficient smoothness conditions


will be discussed in Sections 3.3.3 and 3.4.4.

Substituting the (3.27) into (3.25) and denoting the integral in one dimensional domain
b

[a, b ] as ∫≡∫ gives


a Ω

dw du ⎛ du ⎞ ⎛ du ⎞
∫ AE dx = ⎜⎜wAEn ⎟⎟⎟ + ⎜⎜wAEn ⎟⎟⎟ + ∫ wAdx ∀w (3.29)
dx dx ⎝ dx ⎠ Γu ⎝ dx ⎠ Γσ
Ω Ω

Inserting (3.20)b into the first two RHS terms of (3.29), we obtain

dw du ⎛ du ⎞
∫ AE dx = ⎜⎜wAE ⎟⎟⎟ + (wAσ ) Γ + ∫ wbdx ∀w
dx dx ⎝ dx ⎠ Γu σ
Ω Ω

du
On the prescribed displacement boundary, the stress and hence is unknown.
dx
Therefore, we perform the same trick as before: we require the weight function to vanish
on the prescribed displacement boundaries. The weak form then becomes
L
dw du
∫ dx
AE
dx
dx = (wAσ ) Γ + ∫ wbdx
σ
∀w such that w = 0 on Γu
0 Ω

The above is the weak form for the general one-dimnesional stress analysis
problem (3.20). Note that it requires the weight function to vanish on the essential
boundaries. As before in Section 3.2, this weak form will not lead to satisfaction of the
essential boundary condition, so the approximation function must be required to satisfy
the essential boundary conditions. With this proviso, we can then state the weak form as:

Find a function u ( x ) such that u ( x ) = u on Γu so that

12
dw du
∫ dx
AE
dx
dx = (wAσ ) Γ + ∫ wbdx
σ
∀w such that w = 0 on Γu (3.30)
Ω Ω

3.3.4 Continuity
Although we have now developed a weak form, we still have not specified how smooth
the weight functions and approximation functions must be. Before examining this topic,
we will first define some notation for various orders of smoothness, i.e. continuity. A
function is called a C n function if its derivatives of order j, where 0 ≤ j ≤ n exist and
are continuous functions in the entire domain.

We will be concerned mainly with C 0 , C −1 and C1 functions. Examples of these


are illustrated in Figure 3.3. As can be seen, a C 0 function is piecewise continuously
differentiable, i.e. its first derivative is continuous except at selected points. The
derivative of a C 0 function is a C −1 function. So for example, if the displacement is a
C 0 function, the strain is a C −1 function. Similarly, if a temperature field is a C 0
function, the flux is a C −1 function if the conductivity is C 0 . In general, the derivative of
a C n function is C n −1 .

f(x)
C1
C −1

C0

x
a/2 a 3a/2

−1 0 1 1
Figure 3.3: Examples of C , C and C functions: C function has continuous derivatives at
x = a , but discontinuous second derivatives at x = a ; C 0 function has discontinuous
derivatives at x = a ; C −1 function is discontinuous at x = a / 2 and x = 3a / 2

3.3.5 Integrability
The smoothness that is required in the weight function and the approximation functions
depends on the integrability of the weak form: they must be smooth enough so that the
integral equation, such as Eq. (3.30), can be evaluated. Any function which is C −1 and
not singular is integrable. Since only first derivatives appear in the integral form,
C 0 continuity should then suffice for the weight and approximation functions. This
continuity requirement can also be justified physically. For example, in stress analyis, a
C −1 displacement field would be associated with gaps or overlaps at the points of

13
discontinuity of the function. This would violate the notion of compatibility of the
displacements. Although gaps are dealt with in more advanced methods to model
fracture, they are not accessible to the methods we are developing here. Similarly in heat
conduction, a C −1 temperature field would imply an infinite heat flux at selected points,
which is not physically reasonable.

We say the derivative of a function is square integrable if the internal energy, Π (u ) ,


defined as
1
( )
2
Π (u ) = ∫ du dx AEdx
2 Ω
is bounded, i.e., Π (u ) < 0 . u Π = Π (u ) is often termed as an energy norm. Note
that the internal enery is obtained by replacing the weight function by the trial function in
the first term of Eq. (3.30). The space that has square integrable derivatives is known as
the Sobolev space of degree one, denoted by H 1 . It can be proved that H 1 is a subspace
of C 0 , i.e. H 1 ⊂ C 0 . In other words, if a function has square integrable derivatives, it is
C 0 function.

An example of the function, which is C 0 , but not H 1 is depicted in Problem 3-3.


To this end we define the spaces U and U 0 for the trial and weight functions,
respectively, as
{
U = u (x ) u (x ) ∈ H 1 , u = u on Γu }
(3.31)
U0 = {w x
( ) w (x ) ∈ H ,w = 0 on Γ }
1
u

The above means that U is a set of functions that are continuous, have square integrable
derivatives and satisfy the essential boundary condition on Γu . The space U 0 is quite
similar except that it vanishes at the essential boundary.

Now we restate the weak form as follows:

find u (x ) ∈ U such that


dw du (3.32)
∫ dx
AE
dx
dx = (wA) |Γσ σ + ∫ wbdx ∀w ∈ U 0
Ω Ω

dw du
Denoting ε (w ) = and σ (u ) = AE then Eq. (3.32) can be interpreted as the
dx dx
principle of virtual work. The weight function w (x ) is called virtual displacement and
ε (w ) is the virtual strain. The left hand side represents the virtual work of internal
stresses, whereas the right hand side has the virtual work of imposed tractions and the
forces applied at the ends of the bar.

Similarly, we can state the weak form for heat conduction problems as:

14
find T (x ) ∈ U such that
dw dT (3.33)
∫ dx
Ak
dx
dx = − (wA) Γ q + ∫ wQdx
q
∀w ∈ U 0
Ω Ω

Where the spaces U and U 0 used in Eq. (3.33) are identical to those defined in Eq.
(3.31) except that u is replaced by T , u by T and ( Γu , Γσ ) by ( ΓT , Γq ).

Remarks
a) It can be seen from the above that in solving the Weak Form, we find the
particular function that satisfies the Weak Form. The set of approximation
functions from which the solution is chosen are functions that are continuous
and satisfy the essential boundary condition. The weight functions and
approximation functions must be constructed so that they satisfy these
conditions.
b) The approximation functions do not need to satisfy the natural boundary
conditions. As we shall see, the natural boundary conditions are naturally met
by solving the Weak Form. It can be seen that the highest order derivative
appearing in the Weak Form is one as opposed to two in the Strong Form, and
therefore the function need not be as smooth as when Eq. (3.13) is used as a
weak form. Eq. (3.13) is still integrable-how do we finesse that?
c) Functions w(x ) and u(x ) appear symmetrically in the first integral in
Eq.(3.32), whereas they do not in Eq. (3.13). In Eq. (3.32) both the
approximation and weight functions appear as first derivatives, whereas in the
first integral in Eq. (3.13), the test function appears directly whereas the trial
function appears as a second derivative. It will be seen that consequently, Eq.
(3.32) leads to a symmetric stiffness matrix and a set of symmetric linear
algebraic equations.

3.3.6 The Equivalence between Weak and Strong Forms


In the previous sections we constructed the Weak Form from the Strong Form. To show
the equivalence between the two, we will now prove that the Weak Form implies the
Strong Form. The equivalence of the two will insure us that when we solve the weak
form, then we have a solution to the strong form.

du
Let v = AE and apply integration by parts to the left side of Eq.(3.32):
dx
l l
dw du ⎛ du ⎞ d ⎛ du ⎞
∫ AE dx = ⎜⎜wnAE ⎟⎟⎟ − ∫ w ⎜⎜AE ⎟⎟⎟dx
dx dx ⎝ dx ⎠ Γ dx ⎝ dx ⎠
0 0

15
l
⎛ du ⎞ d ⎛ du ⎞
= ⎜⎜wnAE ⎟⎟⎟ − ∫ w ⎜⎜AE ⎟⎟⎟dx
⎝ dx ⎠ Γσ dx ⎝ dx ⎠
0

where in the second line Γ has been replaced by Γσ since w = 0 on Γu and Γσ is the
complement of Γu ; see Eq. (3.19). Substituting the above into Eq. (3.33) and placing
the integral terms on the left hand side and the boundary terms on the right hand side
gives
l
d ⎛ du ⎞ ⎛ du ⎞
∫ w dx ⎜⎜⎝AE dx + b⎠⎟⎟⎟dx = wA ⎝⎜⎜En dx − σ ⎠⎟⎟⎟ Γσ
(3.34)
0

The key point in the proof is that w(x ) is an arbitrary function. It can be assumed to be
anything we need in order to prove the equivalence.

First, we define
⎡d ⎛ du ⎞ ⎤
w = ψ(x ) ⎢ ⎜⎜AE ⎟⎟⎟ + b ⎥ (3.35)
⎢⎣dx ⎝ dx ⎠ ⎥⎦

where ψ is smooth and positive ψ(x ) > 0 on 0 < x < l ; and vanish on the boundary
ψ(0) = ψ(1) = 0 . An example of a function satifying the above requirements is
ψ(x ) = x (l − x ) .
Eq. (3.35) implies that w(x = 0) = w(x = l ) = 0 . Inserting(3.35) into Eq. (3.34)
yields:
l 2
⎡d ⎛ du ⎞ ⎤
∫ ψ ⎢ ⎜⎜AE ⎟⎟⎟ + b ⎥ dx = 0 (3.36)
⎢⎣dx ⎝ dx ⎠ ⎥⎦
0 

integrand

Note that the integrand in Eq. (3.36) is positive at every point in the problem domain. So
the only way the integral will vanish is if the integrand is zero at every point. Hence

d ⎛ du ⎞
⎜AE ⎟⎟ + b = 0 0 <x <l (3.37)

dx ⎝ dx ⎠⎟

This is precisely the differential equation appearing in the Strong Form Eq. (3.6)a. Now
after substituting Eq. (3.37) into Eq. (3.34) we are left with:

⎛ du ⎞
wA ⎜⎜En − σ ⎟⎟⎟ = 0 ∀w ∈ U 0 (3.38)
⎝ dx ⎠Γ
σ

Since the weight function is arbitrary on Γσ , we select it such that:

16
w Γσ ≠ 0

Substituting above into Eq. (3.38) and recalling that the cross-sectional area A(x) > 0
implies:
du
nE = σ on Γσ
dx

and thus we recover the natural boundary condition Eq.(3.6)b.

Problems Chapter 3
Problem 3-1: Given the Strong Form representing the heat conduction problem in a
circular plate:
d ⎛ dT ⎞⎟
k ⎜r ⎟ + rQ = 0 0<r ≤R
dr ⎜⎝ dr ⎠⎟

dT
Natural B.C.: (r = 0) = 0
dr

Essential B.C: T (r = R ) = 0

Where R is the total radius of the plate, Q is the heat supply per unit length along the
plate radius, T is the temperature and k is the conductivity. Assume that k, Q and R are
given:

a) Solve the differential equation with the boundary conditions and show that the
temperature distribution along the radius is given as:

Q
T = (R2 − r 2 )
4k

b) Construct the weak form for the heat conduction problem in a circular plate with the
essential and natural boundary conditions given above.

Problem 3-2: Given the Strong Form for the circular bar in torsion:

17
m(x )

φ (x = 0) = φ x

M (x = l ) = h

x =0 x =l

Figure 3.4: Definition of the torsion problem

d ⎛ d φ ⎞⎟
⎜JG ⎟ + m = 0 0 ≤ x ≤ l
dx ⎜⎝ dx ⎠⎟

⎛ dφ ⎞
Natural B.C.: M (x = l ) = ⎜⎜JG ⎟⎟⎟ = M
⎝ dx ⎠x =l

Essential B.C: φ (x = 0) = φ

where m(x) is a distributed moment per unit length, M is a torsion moment, φ is an angle
of rotation. G is a shear modulus, J is a polar moment of inertia given by:
πC 4
J = and C is the radius of the circular shaft.
2
a) Construct the weak form for the circular bar in torsion.

b) Assume that m(x) = 0 and integrate the differential equation given above. Find the

integration constants using boundary conditions.

Problem 3-3: Consider a problem on 0 ≤ x ≤ l which has a solution in the form of


⎪ λ
⎛ 1 ⎞⎟ x l

⎪ − ⎜⎜ ⎟ x≤

⎪ ⎝2⎠ l 2
u =⎨

⎪⎛ x 1 ⎞⎟
λ λ
⎛ 1 ⎞⎟ x l
⎪⎜ ⎜
⎜ − 2 ⎠⎟ − ⎝⎜ 2 ⎠⎟ l x>
⎪⎜
⎩⎝ l
⎪ 2

0
a) Show that for λ > 0 the solution u is C in the interval 0 ≤ x ≤ l
1
b) Show that for 0 < λ ≤ 1/ 2 the solution u is not in H

18
Problem 3-4: Consider an elastic bar with a variable distributed spring p(x ) along its
length as shown in Figure 3.5.

p(x)
x
σ

Figure 3.5: Elastic bar with distributed springs

Assume the bar length l , cross-sectional area A(x ) , Young modulus E (x ) , distributed
loading b(x ) and boundary conditions as shown in Figure 3.5.

a) Construct the strong form


b) Construct the weak form

Problem 3-5: Consider an elastic bar in Figure 3.1. The bar is heated with temperature
T (x ) . In case of thermal loading the stress-strain law is given by
σ(x ) = E (x ) (ε(x ) − α(x )T (x ))

where α is the coefficient of thermal expansion, which may be a function of x .

a) Construct the strong form


b) Construct the weak form

Problem 3-6: Find the weak form for the following strong form:
d 2u
κ 2
− λu + 2 x 2 = 0 , κ, λ are constants, 0 < x <1
dx
Subject to u(0) = 1, u(1) = −2

19
Chapter

4 Trial and Weight Functions for


one-dimensional problems

In Chapter 3 we derived a weak form for the elasticity and heat conduction problems in
one dimension. These equations involve unknown weight and trial (temperature,
displacements, solute concentrations, etc.) functions. In Chapter 4 we focus on
constructing approximations for the weight and trial functions. In the finite element
methods, these functions are constructed by subdividing the domain over which the
problem is defined into elements. In each element, the approximation and weight
functions are constructed in terms of shape function and nodal values of the field. The
methodology is developed so that the functions passes the C 0 continuity required for
solution of the previously developed weak form.
In this chapter any trial (temperature, displacements, solute concentrations, etc.)
function will be denoted by θ .

To illustrate this process consider a one-dimensional domain of two elements as shown in


Figure 4.1. The domain is divided into four segments (finite elements).

1 2

θ1(x )

1
1 2 θ 2 (x )

1 2
2

Figure 4.1: A two-element mesh and the approximations in each element

On each element domain, we introduce a trial funtion θe (x ) . Due to the C0


continuity requirement, the θ(x ) has to be continuous (or compatible) between the
neighboring elements, θ1(x 21 ) = θ 2 (x 12 ) . In each element, we will employ a polynomial
approximation:

θe = αe0 + α1e x + α2e x 2 + αe3x 3 + ...

where α ie are arbitrary coefficients. In the construction of finite element approximations,


the coefficients will be expressed in terms of nodal values.
In order for the finite element method to converge to the correct solution, the
polynomial approximation must be complete. Completeness is a mathematical term that
refers to the capability of a series of functions to approximate a given smooth function
with arbitrary accuracy. For example, the Fourier series are complete. Similarly, it can
be shown (we won’t show it, because the mathematics is pretty complicated) that finite
elements that contain monomials up to a specified order are complete. For example,
elements with a linear approximation θe = α0e + α1e x are complete. An example of an
incomplete approximation is: θe = αe0 + α1e x 2 .

4.1 Two-node linear element


Consider the simplest one-dimensional element in which the trial function is linear

θe = α0e + α1e x (4.1)

We can write this in matrix form as:

⎡αe0 ⎤
θ (x ) = ⎡⎢1 x ⎤⎥ ⎢⎢ e ⎥⎥ = P (x ) αe
e
(4.2)
N⎣ ⎦ ⎢α1 ⎥
P N ⎣ ⎦
αe

Since the linear approximation involves two arbitrary coefficients per element, and two
nodal values, the the trial function θe (x ) can be expressed in terms of the nodal values
θ (x 1e ) ≡ d1e and θ (x 2e ) ≡ d2e . For this purpose we first express the coefficients αe0 and α1e
in terms of the trial function at nodes 1 and 2 as:

θ (x 1e ) ≡ d1e = αe0 + α1e x 1e ⎡d1e ⎤ ⎡1 x 1e ⎤ ⎡αe0 ⎤


→ ⎢ ⎥=⎢ ⎥⎢ ⎥ (4.3)
θ (x 2e ) ≡ d2e = αe0 + α1e x 2e ⎢d e ⎥ ⎢1 x e ⎥ ⎢αe ⎥
⎣⎢N
2⎥
⎣⎢ 2
⎦⎥ ⎣⎢N
⎦  1⎥

de Ce αe

where d e are the nodal values of a trial function for element e. In matrix form the
inverse relation is given by

αe = Ce −1de (4.4)

2
where the second equation expresses the coefficients αe0 and α1e in terms of de .
Substituting Eq. (4.4) into Eq. (4.2)yields:

θe = Ne de where Ne = PCe −1 (4.5)

and N e = ⎡⎢N 1e N 2e ⎤⎥ = PCe −1 is called the element shape function matrix.


⎣ ⎦
We next develop the expressions for the element shape function matrix Ne by
evaluating the matrices in (4.5). From the expression for Ce given in (4.3), it follows that

1 ⎡ x 2e −x 1e ⎤ 1 ⎡ x 2e −x 1e ⎤
e −1
= e ⎢ ⎥ ⎢ ⎥
C
x 2 − x 1e ⎢−1 1 ⎥ = l e ⎢−1 1 ⎥
⎢⎣ ⎥⎦ ⎢⎣ ⎥⎦

where l e is the length of the element e. . Then using (4.5) we obtain

⎡ x 2e −x 1e ⎤ 1
N = ⎡⎢N 1e
e ⎤ ⎡ ⎤
N ⎥ = PC = ⎢1 x ⎥ ⎢⎢
e −1 ⎥ = 1 ⎡x e − x x − x 1e ⎤⎥ (4.6)
⎣ ⎦ 2
⎣ ⎦ ⎢−1 1 ⎥⎥ l e le ⎢⎣ 2 ⎦
⎣ ⎦

N 1e , N 2e are the element shape functions corresponding to nodes one and two,
respectively. These shape functions are shown in Fugure 4.2.

N ie

1
N 2e (x )
N 1e (x )
1 2
x
x 1e x 2e
Figure 4.2: Shape function of 2-node element

It can be seen that the shape functions have the following fundamental property:

N 1e (x 1e ) = 1; N 1e (x 2e ) = 0
N 2e (x 1e ) = 0 N 2e (x 2e ) = 1

In the concise notation the above can be written as

N ie (x je ) = δij (4.7)

3
where δij is called the Kronecker delta (which is defined exactly like the unit matrix):

⎧1 if i = j

δij = ⎪


⎪0 if i ≠ j

Eq. (4.7) is related to a fundamental property of shape functions called the interpolation
property. The approximation at nodes equal to the nodal temperatures. In other words,
shape functions are interpolants.

To show the interpolation property, we write out (4.5), the trial function in terms
of the shape functions and nodal temperatures:

θe (x ) = Ne (x ) de = N 1e (x )d1e + N 2e (x )d2e

Note that θ e ( xi ) = θie . This follows from the property of shape functions. To illustrate
this, consider the above trial function, which can be written at a node x ej as

2
θe (x ej ) = ∑ N ie (x ej )die
i =1

Now if we use (4.7) we obtain

2
θe (x ej ) = ∑ δijdie = d je
i =1

Thus, the finite element approximation of the trial field is exactly equal to the nodal
temperatures at the nodes. This is not surprising since we evaluated the coefficients by
this requirement.

4.1.1 Derivatives of Fields


In the weak form developed in the previous chapter we had to compute the derivatives of
the trial functions. For the 2-node element it yields:

dθ d dNe e dN 1e e dN 2e e
= (N d ) =
e e
d = d1 + d2
dx dx dx dx dx

In matrix form, this gives:


d θ ⎡ dN 1e dN 2e ⎤ ⎢⎡d1 ⎤⎥
e

=⎢ ⎥ ⎢ e ⎥ = Be de
dx ⎢⎣ dx
 dx
⎦⎥ ⎢d2 ⎥
e
⎣ ⎦
B
where

4
⎡ dN e dN 2e ⎤ 1 ⎡−1 +1⎤
Be = ⎢ 1 ⎥= e ⎢⎣ ⎥⎦
⎢⎣ dx dx ⎥⎦ l

In each element, we have used a complete polynomial expansion, i.e., we have


satisfied the completeness requirement. Let us now see if we satisfy the compatibility
(continuity) requirement.

4.1.2 Connectivity matrix


Consider the example shown in Figure 4.3 consisting of 2 two-node elements.
Here the global nodes have been numbered in sequential order. The local node numbers
are always 1 and 2; nodal values expressed in terms of local node numbers are
distinguished by the presence of a superscript on the variable which denotes the element
number.

1 2

1 2 3

1 2

1 2 1 2
Figure 4.3: Global and local node numbers for a finite element mesh

The capital subscripts denote the global node numbering. In order to meet the continuity
requirement,i.e. that θ ( x ) ∈ C 0 it is necessary that:

d21 = d12 = d2

We denote by d the global vector of all nodal values of a trail function

⎡d ⎤
⎢ 1⎥
⎢ ⎥
d = ⎢d2 ⎥
⎢ ⎥
⎢d3 ⎥
⎣⎢ ⎦⎥

Now we need to define a transformation between the global and local node numbers; This
transformation matrix for element e is denoted by Le . This is a Boolean matrix
introduced in Chapter 2 that extracts the global nodal values that correspond to the
element nodal values and is called a connectivity matrix. For example, for the three
elements the connectivity matrices are

5
⎡d ⎤
⎡d11 ⎤ ⎡d1 ⎤ ⎡1 0 0⎤ ⎢ 1 ⎥
d1 = ⎢⎢ 1 ⎥⎥ = ⎢⎢ ⎥⎥ = ⎢⎢ ⎥ ⎢⎢d ⎥⎥ = L1d
⎥ 2
⎢⎣d2 ⎥⎦ ⎣⎢d2 ⎥⎦ ⎣⎢ 0 1 0⎦⎥ ⎢ ⎥

⎢d3 ⎥
L1 ⎣⎢ ⎦⎥

⎡d ⎤
⎡d12 ⎤ ⎡d2 ⎤ ⎡0 1 0⎤ ⎢ 1 ⎥
d2 = ⎢⎢ 2 ⎥⎥ = ⎢⎢ ⎥⎥ = ⎢⎢ ⎥ ⎢⎢d ⎥⎥ = L2 d
⎥ 2
⎢⎣d2 ⎥⎦ ⎢⎣d3 ⎥⎦ ⎣⎢0 0 1⎦⎥ ⎢ ⎥

⎢d3 ⎥
L2 ⎢⎣ ⎥⎦

In general, the relation between element nodal and the global nodal values can be written
as

de = Le d

Using the connectivity matrix, we can write the trial field in each element in terms of the
global nodal values of the trial function as

θe (x ) = Ne (x ) de = Ne (x ) Le d

?
Let us now check if the continuity condition, θ1(x 21 ) = θ 2 (x 12 ) is satisfied for an arbitrary
solution d,

θ1 (x 21 ) = N1 (x 21 ) L1d
⎡ ⎤ ⎡ 1 0 0⎤
= ⎢⎢N 11 (x 21 ) N 21 (x 21 )⎥⎥ ⎢⎢ ⎥d =

⎡ 0 1 0⎤ d = d
⎢⎣ ⎥⎦ 2

⎢⎣ 0

⎥⎦ ⎢⎣ 0 1 0 ⎥⎦
1

θ 2 (x 12 ) = N2 (x 12 ) L2 d
⎡ ⎤ ⎡ 0 1 0⎤
⎢ 2 ⎥ ⎢
= ⎢N 1 (x 1 ) N 2 (x 1 )⎥ ⎢
2 2 2 ⎥ d = ⎡ 0 1 0⎤ d = d


⎢⎣ 1 
⎥⎦ ⎣⎢ 0 0 1 ⎥ ⎣⎢ ⎥⎦ 2
0 ⎥⎦

Thus θ1(x 21 ) = θ 2 (x 12 ) = d2 .

6
4.2 Quadratic one-dimensional element

To develop a quadratic element, we start with a complete polynomial approximation of


order two.
⎡αe ⎤
⎢ 0⎥
⎢ ⎥
θe = αe0 + α1e x + α2e x 2 = ⎡⎢1 x x 2 ⎤⎥ ⎢α1e ⎥ = Pαe (4.8)

⎦ ⎢ ⎥

P(x ) ⎢αe ⎥
⎢⎣N2⎥

αe
Since the polynomial approximation in this element has three constants, this element
must have three nodes, the two end points x 1e , x 3e and a node in the middle x 2e . Otherwise,
it would not be possible to uniquely express the constants (αe0 , α1e , α2e ) in terms of nodal
values of the trial function θ(x 1e ) = d1e , θ(x 2e ) = d2e , θ(x 3e ) = d3e .

To satisfy the interpolation property, we express (αe0 , α1e , α2e ) in terms of nodal values of
thrial function (d1e , d2e , d3e )

d1e = α0e + α1e x 1e + α2e x 1e 2 ⎧


⎪⎪d1e ⎫⎪⎪ ⎛⎜1 x 1e x 1e 2 ⎞⎟ ⎧ ⎪αe0 ⎫
⎪⎪
⎪ ⎪ ⎜⎜ ⎟⎟ ⎪⎪ ⎪
⎪ ⎟
⎪⎨d e ⎪⎬ = ⎜⎜1 x e x e 2 ⎟⎟ ⎪⎨αe ⎪
⎪ ⎪ ⎪⎬
d2e = α0e + α1e x 2e + α2e x 1e 2 → ⎜⎜ 2 ⎟ (4.9)


2
⎪ 2
⎟⎟ ⎪
1

d3e = α0e + α1e x 3e + α2e x 1e 2 ⎪⎪d3 ⎪⎪ ⎜⎜1 x e x e 2 ⎟⎟ ⎪⎪α2e ⎪
e ⎪ ⎜ ⎪ ⎪
⎪N⎭
⎩ ⎪ ⎝
3 3 ⎠⎩

⎪N⎪ ⎪

e e
d e
C α

or in general d e = Ce αe . Combining (4.9) and (4.8) yields

e −1 e
θe = PC e e e e e e e e

d = N d = N 1 d1 + N 2d2 + N 3d3 (4.10)
Ne

Where the shape functions are given by

2 ⎡
Ne = (x − x 2e )(x − x e3 ) −2 (x − x 1e )(x − x e3 ) (x − x1e )(x − x 2e )⎤⎥⎦ (4.11)
l e 2 ⎢⎣

It can be easily shown that these shape functions satisfy the interpolation property. The
shape functions are shown in Figure 4.4. As can be seen, because of the Kronecker delta
property, each shape function is only nonzero at a single node and at that node its value is
unity.

7
N ie
N 1e (x ) N 2e (x ) N 3e (x )

x
1 2 3

Figure 4.4: The quadratic shape functions for a 3-node element

4.3 Direct Construction of Shape Functions in One Dimension.


The shape functions in one dimension that we have developed are called Lagrange
interpolants. The theory of Lagrange interpolants is very useful for constructing higher
order elements (elements with polynomial basis that are higher order than linear). Such
elements, as will be seen from the exercizes, can provide far more accuracy than linear
field elements.

The Lagrange interpolants can be developed more directly than the above procedure by a
simple procedure that takes advantage of the Kronecker delta property of shape functions.
Because of this property, shape function i must vanish at all nodes other than i and be
unity at node i. To see how we use these properties to construct the shape functions,
consider the quadratic shape functions for a three node element.

First we will construct N1e ( x ) . Since the shape function N1e ( x ) is at most quadratic in x,
it has to consist of a product of two monomials in x. The most general form of such a
monomial is

N1e ( x ) =
( x − a )( x − b )
c

where a, b and c are constants that will set so as to meet the Kronecker delta property.
We want N1e ( x ) to vanish at x2 and x3 , which can be accomplished by letting a = x2
and b = x3 . Now we have met two of the conditions on the shape function: that it must
vanish at the other two nodes. It remains to satisfy the condition that N1e x1e = 1 . This is ( )
met by letting the denominator equal the numerator evaluated at x1e , which gives

e
N ( x) =
( x − x )( x − x )
e
2
e
3
1
( x − x )( x − x )
e
1
e
2
e
1
e
3

8
( )
We leave it to the reader to show that N1 x ej = δ1 j . The other two shape functions are
constructed in an identical manner giving

N e
( x) =
( x - x )( x - x )
e
1
e
3
N e
( x) =
( x − x )( x − x )
e
1
e
2
2
( x - x )( x - x )
e
2
e
1
e
2
e
3
3
( x − x )( x − x )
e
3
e
1
e
3
e
2

The above gives the same result as Eq. (4.11). It should be pointed out that the node 2
should always be placed close to the midpoint of the element.

The same procedure can be used to construct the cubic shape functions. The element for
these shape function will have 4 nodes, since there are 4 constants in an arbitrary cubic
polynomial. The shape functions are:

(x − x 2e )(x − x 3e )(x − x 4e ) (x − x 1e )(x − x 2e )(x − x 4e )


N 1e = N e
=
(x 1e − x 2e )(x 1e − x 3e )(x 1e − x 4e ) 3
(x 3e − x 1e )(x 3e − x 2e )(x 3e − x 4e )
e (x − x 1e )(x − x 3e )(x − x 4e ) e (x − x 1e )(x − x 2e )(x − x 3e )
N2 = e N4 = e
(x 2 − x 1e )(x 2e − x 3e )(x 2e − x 4e ) (x 4 − x 1e )(x 4e − x 2e )(x 4e − x 3e )

These shape functions are shown in Figure 4.5.


N ie

N 1e (x ) N 2e (x ) N 3e (x ) N 4e (x )
1

x
1 2 3 4

Figure 4.5: Cubic shape functions of the 4-node one dimesional element; note that each shape
function is nonzero at only one node, where it is unity.

4.3 Approximation of the weight functions


It is not necessary that the weight functions be approximated by the same interpolants
that are used for the solution approximation. For most problems, however, it is
advantageous to use the same approximation for the weight functions and the solution,
and this is the most common practice. The resulting method is called the Galerkin Finite
Element method. This choice is used in the material presented in this book. The weight
functions and their derivatives are then given by

9
w e = Ne we
dw e
= Be we
dx

Problems Chapter 4

Problem 4-1: Consider a 4-node cubic element in one dimension. The element length is
3 units with x1 = −1 ; the remaining nodes are equally spaced.
a) Construct the shape functions for the element.
b) Find the displacement field in the element when
⎧ u1 ⎫ ⎧1 ⎫
⎪u ⎪ ⎪ ⎪
⎪ 2⎪ −3 ⎪ 0 ⎪
d = ⎨ ⎬ = 10 ⎨ ⎬
e

⎪u3 ⎪ ⎪1 ⎪
⎩⎪u4 ⎭⎪ ⎪⎩4 ⎪⎭
e
c) Evaluate the B matrix and find the strain for the above displacement field.
d) Find the strain field when the nodal displacements are d
eT
= [1 1 1 1] . Why is
this result expected?

Problem 4-2: Consider a 5-node element in one dimension. The element length is 4
units, with node 1 at x=2 and the remaining nodes are equally spaced along the x-axis.
a) Construct the shape functions for the element.
b) The temperature field at the nodes is given by:
T1 =3, T2 =1, T3 =0, T4 =-1, T5 =2. Find the temperature field at x=3.5 using
shape functions constructed in (a).

Problem 4-3: Derive the shape functions for the 2-node 1-D element, which are C1
continuous. Note that the shape functions derived in Chapter 4 are C0 continuous. To
enforce C1 continuity, it is necessary to enforce continuity of displacements and their
derivatives between the elements. Start by considering a complete cubic approximation
u e = αe0 + α1e x + α2e x 2 + α3e x 3 and derive four shape functions corresponding to the
temperatures (or displacements) and their derivatives at each node. For clarity of
notation, denote the derivatives at the nodes by φi , i = 1, 2 .

Problem 4-4: Consider the displacement field u


EX
( x ) = x3 , 0 ≤ x ≤ 1 . Write a MATLAB
program that performs the following tasks. (The instructor should specify how many of
these parts should be done).
a) Subdivide the interval [0,1] into two elements. Compute the displacement field in each
element by letting the nodal displacements be given by ui = xi and using a linear 2-
3

node element so that the displacement field in each element is given by


u ( x ) = N e ( x ) de = N e ( x ) Led where Ne ( x ) are the linear shape functions given by Eq.
(4.6) and d is the vector of nodal displacements. Plot the finite element interpolant
u ( x ) and the interpolated field on the same plot on the interval [0,1].
b) Compute the strain in each element by ε ( x ) = Be ( x ) de = Be ( x ) Led and plot the finite
element strain and the exact strain. How do these compare?

10
c) Repeat part c) for meshes of 2, 4 and 8 elements. Does the interpolation of the strain
improve?
d) The error of an interpolation is generally measured by what is called an L2 norm. The
error in the L2 norm, which we denote by e, is given by

( )
L
e2 = ∫ u − u EX dx
2

0
Compute the error e for meshes of 2, 4, and 8 linear displacement elements. Use a
standard MATLAB function for integration. Then plot (this can be done by hand) on a
log-log plot the error versus the element size. This should almost be a straight line.
What is its slope? This slope, we will see later, is indicative of the rate of convergence of
the element.
e) Repeat part d) using quadratic 3-node quadratic elements.

11
Chapter

5 Finite element formulation for one-


dimensional problems

The objective of this Chapter is to combine the weak form with the approximation
functions and weight functions expressed in terms of shape functions to construct the
finte element equations. Most of this material will be presented in the context of heat
conduction. As noted before, the equations of stress analysis are identical except for the
nomenclature for the parameters. Therefore, we will only sketch the development for
stress analysis after completing the development of the finite element method for heat
conduction.
We start with the Weak Form of the heat conduction problem, given in Section
3.3, which states:

Find T (x ) ∈ U such that


dw dT
∫ dx
Ak
dx
dx = − (wA) Γ q + ∫ wQdx
q
∀w ∈ U 0 (5.1)
Ω Ω

We will use shape functions to express the approximation and weight functions in
terms of the nodal temperatures and the nodal values of the weight function, respectively.
We will then obtain the finite element equations.
The basic steps of the FEM are: (i) preprocessing, (ii) approximation of trial and
weight functions, (iii) application of boundary conditions and solution, and (iv)
postprocessing. In the following these steps are described in detailed.

5.1 Preprocessing
The first step in the finite element method is to construct a finite element mesh.
This step can be quite involved for a complex shape in multi-dimensions. Here we will
develop the procedure in one dimension, so a mesh can easily be constructed. Consider a
domain in 1D and divide it into finite elements as shown in Figure 5.1. The nodes and
elements in this figure have been numbered sequentially. This is not necessary in finite
element meshes: the procedure described below will give the correct finite element
equations regardless how the nodes and elements are numbered.

1 2 … e nel
x
1 2 nnp
x =a x =b
Figure 5.1: Finite element mesh in one dimension

The first step in formulating the finite element equations from the weak form is to split
the integration over the problem domain into integration over individual elements. The
integral over the entire domain can then be written as the sum of the integrals over the
elements, i.e. we can replace the integral in Eq. (5.1) by

nel ⎛xnen
e e
xnen ⎞⎟
⎜⎜ dw e e e dT e ⎟⎟ = 0

e =1 ⎜
⎜⎜ ∫
dx
A k
dx
dx + w e e
A |Γq q − ∫ w e
Qdx ⎟⎟ (5.2)
⎝ x1e
x1e ⎠
where nel and nen denote number of elements and number of element nodes,
respectively.

5.2 Trial and weight function approximations


Define the element type to be used (for instance, 2-node or 3-node elements). In
defining the element type, we make a choice of the trial and weight function
approximations. In general, it is possible to have several element types in the same mesh.
Trial function and its gradient pproximations have been described in Chapter 4

dT e
T e = Ne d e = Ne Le d = Be d e = Be Le d (5.3)
dx

Employing Galerkin Finite Element method the weight functions are given by
T T T T
w e = (w e ) = (Ne we ) = weT (N e ) = (Le w) NeT = wT LeT NeT
dw e ⎜⎛dw e ⎞⎟
T (5.4)
e e T T
⎟⎟ = (B w ) = w B = (L w) B = w L B
eT eT e eT T eT eT
= ⎜⎜
dx ⎝ dx ⎠

We have taken the transpose of the weight function so that the matrix expressions which
will appear in sunsequent developments are consistent.

Substituting Eqs. (5.3) and (5.4) into the Weak Form given in (5.2) yields
⎧⎪ ⎫
⎪ wT LeT BeT Aek e Be Le d dx + wT LeT NeT (Γ )Ae (Γ )q − wT LeT NeTQdx ⎪⎪
nel


e =1 ⎩
⎨∫
⎪⎪ Ωe q q ∫e ⎬
⎪⎪ (5.5)
Ω ⎭
= 0 ∀w0
e
xnen

where the integral over the element domain is denoted as ∫ ≡∫ . Note that we have
x1e Ωe

replaced the arbitrary weight functions w by arbitrary parameters w 0 , i.e., ∀w ∈ U 0 has


been replaced by ∀w 0 ; w 0 is the vector of nodal weight functions except for the nodes
where essential boundary conditions are applied. This is an important step with
significant consequences. Since Eq. (5.5) no longer imposes the integral form for all
weight functions in U 0 , the weak form is no longer exactly equivalent to the strong form.
Therefore, the finite element method will not provide exact solutions of the strong form.
Instead, it will only provide approximate solutions of the strong form. We will examine
the quality of these approximate solutions by studying various examples and by sketching
some of the mathematical theory that has been developed. This theory ensures us that if
the approximation functions are complete and the solution is sufficiently smooth, the
finite element solution will converge to the exact solution for the linear boundary value
problems that we are considering.

For subsequent derivations, we recall that:

• w is not a function of x and is a global vector and hence it can be taken outside of
the summation symbol.
• The assembly operator, Le is not a function of x , but is element dependent.
Therefore, it can be taken out of the integration but should remain inside the
summation over the elements.

Based on the above considerations we have the following:


⎧⎪ nel ⎡ ⎤⎫⎪
wT ⎪⎨∑ LeT ⎢⎢ ∫ BeT Aek e Be Le d dx + NeT (Γq )Ae (Γq )q − ∫ NeTQdx ⎥⎥⎪⎬ = 0 ∀w 0 (5.6)
⎪ e =1 ⎪
⎩⎪ ⎣⎢ Ωe Ωe ⎦⎥⎭⎪

To clarify the next steps, we denote the quantity within the brackets of the above equation
by p, so

⎧⎪ nel ⎡ ⎤⎫⎪
p = ⎪⎨∑ LeT ⎢ BeT Aek e Be Le d dx + NeT (Γ )Ae (Γ )q − NeTQdx ⎥⎪⎬
⎢ ∫e ∫e ⎥⎪
⎪ e=1 q q
⎪⎩ ⎣⎢ Ω Ω ⎦⎥⎪⎭

Equation (5.6) can then be written as

wT p = 0 ∀w 0
or
w1p1 + w2 p2 + … + wn pn = 0 ∀w 0 .
From the scalar product theorem described in Chapter 1, it then follows that p = 0 . Note
that pi = 0 only for nodes i that are not on an essential boundary. On an essential
boundary, w i must vanish to meet the condition that w = 0 on an essential boundary, see
Eq. (5.5). Therefore, w i is not arbitrary for nodes on essential boundaries.

Thus Eq. (5.6) reduces to:

nel ⎡ ⎤
∑ L ⎢⎢ ∫ B
eT eT
Aek e Be Le d dx + NeT (Γq )Ae (Γq )q − ∫ NeTQdx ⎥⎥ = 0 (5.7)
e =1 ⎢ ⎣ Ωe Ωe ⎦⎥

Note that d is global vector and thus can be taken outside the element integration. We
now rearrange the terms in Eq.(5.7), which yields:
nel ⎡ ⎤ nel nel ⎡ ⎤
eT ⎢ ⎥Le d = eT ⎢ ⎥ (5.8)
∑ L ⎢ ∫e BeT e e e
A k B dx ⎥ ∑ LeT ⎡
⎣−NeT
(Γq )Ae
(Γq )q ⎦ ∑
⎤ + L ⎢ ∫e NeT
Qdx ⎥
e =1 ⎢⎣ Ω ⎥⎦ e =1 e =1 ⎢⎣ Ω ⎥⎦

To this end it is convenient to define the following element matrices:

Ke = ∫B
eT
Aek e Be dx …element conductance matrix
e

fbe = −NeT (Γq ) Ae (Γq )q …element boundary flux vector (5.9)

fle = ∫N
eT
Qdx …element heat source vector
e

Expressions of element matrices defined in (5.9) are applicable to any one-dimensional


heat conduction elements. We will also see that the expressions for element matrices in
two ad three dimensions are very similar. We will also see that the expressions for stress
analysis and other diffusion equations can be obtained by just replacing k e by the
appropriate parameter.

Substituting the element matrices into Eq.(5.8) yields:

⎡ nel eT e e ⎤ nel nel


⎢ ∑ L K L ⎥ d = ∑ LeT fbe + ∑ LeT fle (5.10)
⎢⎣ e =1 ⎥⎦ e =1 e =1

The global matrices are obtained by assembling element matrices:

nel
K = ∑ LeT Ke Le … global conductance matrix (matrix assembly)
e=1
nel
fb = ∑ LeT fbe … global boundary flux vector (vector assembly)
e=1

nel
fl = ∑ LeT fle … global heat source vector (vector assembly)
e=1

It should be stressed that we do not need to perform the large matrix multiplications
indicated above to assemble the global matrices. The assembly processes are identical to
the assembly procedures we have learned in Chapter 2. The resulting system of
equations is

Kd = f (5.11)

where the global flux vector is

f = fl + fb (5.12)

The above is a system of linear algebraic equations. The number of equations equals the
number of nodes that are not on essential boundaries.

5.3 Boundary conditions, partition and solution


Before solving the system of equations, the global system is partitioned based on
whether a node is on an essential boundary. We partition the nodal displacement vector
⎡d⎤
⎢ ⎥
as d = ⎢ ⎥ where d is the known nodal solution on an essential boundary and d̂ is the
ˆ⎥
⎢d
⎣ ⎦
remaining (unknown) portion of the nodal solution vector.

⎡A G⎤ ⎡ d ⎤ ⎡ r ⎤
⎢ ⎥⎢ ⎥ = ⎢ ⎥ (5.13)
⎢ T
G ˆ ⎥⎥ ⎢⎢ d
K ˆ ⎥⎥ ⎢⎢ˆf ⎥⎥
⎣⎢ ⎦⎣ ⎦ ⎣ ⎦

Note that the solution is carried out for the second block of equations corresponding to
the nodes positioned outside the essential boundary conditions

d ˆ −1 (ˆf − GT d)
ˆ=K (5.14)
5.4 Postprocessing
Once the nodal solution is evaluated, we can evaluate the values of the
temperature, its gradient and the flux in the problem domain. This step is often part of the
post-processing of a finite element solution. For the purpose of plotting these variables,
they are computed on an element level using Eqs.(5.3), which are rewritten below

T e = Ne de = Ne Le d

dT e
q e = −k = −kBe Le d
dx

5.5 Point source

x =a
x
0 P [J/s]

Figure 5.2: Point source acting on the bar

The point source (or the point force in elasticity) is a heat source (or force) acting
at a point as shown in Figure 5.2. The total amount of heat (or force) is denoted by P .
The relation between the distributed heat supply (unknown) and the total amount of heat
can be obtained by integration:
l

∫ Qdx = P
0
Since the segment size on which the point source is acting is infinitesimally small and P
is finite it follows that the equivalent distributed heat supply is infinite at the point where
the point source is applied and vanish elsewhere as shown in Figure 5.3.

Q

x
x =a
Figure 5.3: Graphical illustration of the point source

Mathematically this relation is denoted as:

Q = P δ(x − a )
where δ(x − a ) is dirac delta defined so that it is infinite at the point x = a , the point
where the load is applied, and its integral over the problem domain is one:

⎡∞ when x = a ⎤
δ(x − a ) = ⎢⎢ ⎥,

⎢⎣ 0 when x ≠ a ⎥⎦

∫ δ(x − a )dx = 1
-∞
Consequently, the relation between the point source and the corresponding distributed
source is given as:
∞ ∞

∫ P δ(x − a )dx = P ∫ δ(x − a )dx = P


-∞ -∞

In more general case, for any function f ( x ) , the Dirac delta function has the property
that

∫ f ( x )δ ( x − a ) dx = f ( a )
−∞

The above equation also holds if a is within the limits of limits of integration.

We now proceed with computing the load vector resulting from the point sources
e
xnen +∞ +∞

∫ ∫ − a )dx = N (a )P ∫ δ(x − a )dx = NeT (a )P


e eT eT eT
f =
l N Qdx = N (x ) P δ(x
x1e −∞ −∞

Example 5.1: Heat Conduction

We will use a heat conduction problem with 2-node elements to illustrate how the
finite element procedure is applied. This example will illustrate the construction and
solution of the finite element equations and discuss the accuracy of finite element
solutions. Most of the procedures and qualitative discusiion given in this example apply
equally to stress analysis.
Consider a bar with a constant distributed heat source of Q = 5 J/s m. The bar has a
uniform cross-sectional area of A = 0.1 m2 and constant thermal conductivity k = 2
J/0Cms. The length of the bar is 4 m. The boundary conditions are T(2) = 00 C and
q (x = 6) = 5 J/m2 s as shown in Figure 5.4. Divide the problem domain into 2 linear
temperature 2-node elements and solve it by the FEM.
T (x = 0) = T = 0 C q(x = 4)n = q = 5 J / m 2s
k = 2 J/ o Cms
A = 0.1m2
x
x =0 Q = 5 J/ms x =4m

Figure 5.4: Problem Definition for Example 1

Preprocessing
We start by numbering the nodes on Γu . The finite element mesh is shown in Figure 5.5.

ΓT
nen=2 nel=2

1 1 2 2 3
x
x1 = 0 x2 = 2 x3 = 4

Figure 5.5: Finite element mesh for Example 1

Computation of the element conductance matrix


Recall that the 2-node element shape functions and their derivatives are given as:

x − x 2e 1 dN 1e 1
N 1e = e e
= − e
(x − x e
2 ) B1
e
= =− e
x1 − x 2 l dx l
e e
x − x1 1 dN 2 1
N 2e = e e
= − e (x − x 1e ) B2e = = e
x 2 − x1 l dx l
e e
In the present example A k = Ak = (0.1)(2) = 0.2 for all elements since the
bar has constant cross-sectional area and constant thermal conductivity. The resulting
element shape function derivatives and element conductance matrices are:
1 ⎡−1 1⎤
Be = ⎢⎣ ⎥⎦
le
x e2 ⎡−1⎤ ⎡−1⎤
e
x2
1 ⎢ ⎥ Ak 1 ⎡−1 1⎤ dx = Ak ⎢ ⎥ ⎡−1 1⎤ dx
∫B ∫ ⎥⎦ ∫
e eT e e e
K = A k B dx = ⎢1⎥ ⎢⎣ ⎥⎦ ⎢ 1 ⎥ ⎢⎣
Ωe
x1e
le ⎣⎢ ⎦⎥ le l e2 ⎣⎢ ⎦⎥ x1e
Be
BeT

Ak ⎡ 1 −1⎤ ⎛ ⎞ ⎡ 1 −1⎤
= ⎢ ⎥ ⎜⎜x e − x e ⎟⎟⎟ = Ak ⎢ ⎥
l e2 ⎢−1 1 ⎥ ⎜⎜ 2 1

⎟ l e ⎢
− 1 1 ⎥
⎢⎣ ⎥⎦ ⎝ le ⎠ ⎢⎣ ⎦⎥
Note that this result is identical to the spring element derived in Chapter 2 based on
physical arguments. In other words, the 2-node element with constant cross-sectional
area and constant material properties is similar to that of the spring element except that
the Young modulus is replaced by the conductivity.

For element 1 we have:

x 11 = 0 x 21 = 2 l1 = 2 (Ak )1 = 0.2

0.2 ⎡ 1 −1⎤ ⎡ 0.1 −0.1⎤


K1 = ⎢ ⎥=⎢ ⎥
2 ⎢−1 1 ⎥ ⎢−0.1 0.1 ⎥
⎣ ⎦ ⎣ ⎦
and similarly for element 2:
⎡ 0.1 −0.1⎤
K2 = ⎢⎢ ⎥

⎢⎣− 0.1 0.1 ⎥⎦

Computation of the global conductance matrix


The global conductance matrix is obtained by matrix assembly operation:

nel
K = ∑ LeT Ke Le = L1T K1L1 + L2T K2 L2
e =1
We can use direct matrix assembly to obtain it, but to show that the two
procedures are identical, we will first obtain the global conductance matrix by the above
equation. We will assemble the entire conductance matrix without taking into account the
essential boundary conditions. This means that just as in Chapter 2, we will obtain
equations for which the right hand side contains unknowns. However, by assembling all
of the equations, we will be able to evaluate the fluxes at the essential boundaries.
For this purpose, we need to derive the assembly operators for each element

⎡T ⎤
⎡T11 ⎤ ⎡T1 ⎤ ⎡1 0 0⎤ ⎢ 1 ⎥
d1 = ⎢⎢ 1 ⎥⎥ = ⎢⎢ ⎥⎥ = ⎢⎢ ⎥ ⎢⎢T ⎥⎥ = L1d
T 0 1 0 ⎥ ⎢ 2⎥
⎢⎣T2 ⎥⎦ ⎣⎢ 2 ⎥⎦ ⎣⎢ ⎦⎥ ⎢T ⎥
⎣⎢ 3 ⎦⎥
⎡T ⎤
⎡T12 ⎤ ⎡T2 ⎤ ⎡ 0 1 0⎤ ⎢ 1 ⎥
d2 = ⎢⎢ 2 ⎥⎥ = ⎢⎢ ⎥⎥ = ⎢⎢ ⎥ ⎢⎢T ⎥⎥ = L2 d
⎥ 2
⎢⎣T2 ⎥⎦ ⎣⎢T3 ⎥⎦ ⎣⎢ 0 0 1⎥⎦ ⎢ ⎥
⎢T ⎥
⎣⎢ 3 ⎦⎥
Assembling the conductance matrix for element 1 gives

⎡ 1 0⎤ ⎡ ⎤
⎢ ⎥ ⎡ 0.1 −0.1⎤ ⎡1 0 0⎤ ⎢ 0.1 −0.1 0⎥
⎢ ⎥ ⎥ = ⎢⎢−0.1 0.1 0⎥⎥
L1T K1L1 = ⎢0 1⎥ ⎢⎢ ⎥⎢ (5.15)
⎢ ⎥ −0.1 0.1 ⎥⎦ ⎢⎣ 0 1 0⎥⎥⎦ ⎢
⎥ ⎢ ⎥
⎢0 0⎥ ⎢⎣ ⎢ 0 0 0 ⎥
⎢⎣ ⎥⎦ ⎢⎣ ⎥⎦

The product of the assembly operator with the element conductance matrices is
computationally expensive. Therefore, in practice a direct assembly is employed. The
process of direct assembly was discussed previously in Chapter 2. The direct assembly
for Element 1 yields:
⎡ 0.1 -0.1 0⎤ (1
⎡ 0.1 −0.1⎤ (1 ⎢ ⎥
⎢ ⎥ ⎢ ⎥
⎢−0.1 0.1 ⎥ (2 ⇒ ⎢ -0.1 0.1 0⎥ (2
⎣⎢ ⎦⎥ ⎢ ⎥
⎢ 0 0 0 ⎥ (3
⎣⎢ ⎥⎦

It can be seen that the direct assembly operation is identical to the triple matrix product
(5.15). The matrix assembly of element 2 yields:

⎡ 0 0⎤ ⎡ 0 ⎤⎥
⎢ ⎥ ⎡ 0.1 −0.1⎤ ⎡ 0 1 0⎤ ⎢0 0
⎢ ⎥ ⎥ = ⎢⎢0 0.1 −0.1⎥⎥
L2T K2 L2 = ⎢1 0⎥ ⎢⎢ ⎥⎢
⎥ ⎢ ⎥ ⎢
⎢ ⎥ − 0.1 0.1 0 0 1 ⎥ (5.16)
⎢ 0 1⎥ ⎣⎢ ⎦⎥ ⎣⎢ ⎥⎦ ⎢
0 − 0.1 0.1 ⎥
⎣⎢ ⎥⎦ ⎣⎢ ⎦⎥

Again, we can easily obtain the matrix in (5.16) by direct assembly:

⎡0 0 0 ⎤⎥ (1
⎡ 0.1 −0.1⎤ (2 ⎢
⎢ ⎥ ⎢ ⎥
⎢−0.1 0.1 ⎥ (3 ⇒ ⎢ 0 0.1 -0.1⎥ (2
⎢⎣ ⎥⎦ ⎢ ⎥
⎢ 0 -0.1 0.1 ⎥ (3
⎢⎣ ⎥⎦

Adding the matrices from (5.15) and (5.16) gives the global conductance matrix:

⎡ 0.1 −0.1 0 ⎤⎥

⎢ ⎥
K = ⎢−0.1 0.2 −0.1⎥
⎢ ⎥
⎢ 0 − 0.1 0.1 ⎥
⎢⎣ ⎥⎦

Computation of the boundary flux vector


The element boundary flux vectors are calculated as:
fbe = −NeT (Γq ) Ae (Γq )q = −NeT (x 3 ) ⋅ (0.1) ⋅ (5) = −0.5NeT (x 3 )

Note that the shape functions for element 1 (shown in Figure 5.6) vanish on Γq . In
general, only shape functions which are nonzero on the natural boundary Γq will have a
nontrivial contribution to the boundary flux vector. Therefore, in computing the nodal flux
vector we only need to consider those elements which border the natural boundary.

N 11 N 21
1 Given: h = 5 at x 3
A = 0.1 = constant

1 2 3
0 x
x1 1 x2 2
x3
0
Figure 5.6: Shape functions for for element 1

Thus the boundary flux vectors for the two elements are given as:

⎡ N11 (x 3 )⎤ ⎡ 0⎤ ⎡ 0⎤ ⎡ N12 (x 3 )⎤ ⎡ 0⎤ ⎡ 0 ⎤
f = −0.5 ⎢⎢ 1
b
1 ⎥ = −0.5 ⎢ ⎥ = ⎢ ⎥
⎥ ⎢ 0⎥ ⎢ 0⎥ f = −0.5 ⎢⎢ 2
b
2 ⎥ = −0.5 ⎢ ⎥ = ⎢


⎢1⎥ ⎢−0.5⎥
⎢⎣N2 (x 3 )⎥⎦ ⎣⎢ ⎦⎥ ⎣⎢ ⎥⎦ ⎢⎣ N2 (x 3 )⎥⎦ ⎣⎢ ⎦⎥ ⎣⎢ ⎦⎥

The vector assembly process then gives the global boundary vector.

2
fb = ∑ LeT fbe
e =1

⎡ 1 0⎤ ⎡ ⎤ ⎡ ⎤ (1
⎢ ⎥ ⎡ 0⎤ ⎢ 0 0⎥ ⎡ 0 ⎤ ⎢ 0 ⎥
⎢ ⎥ ⎢ ⎥ ⎥ = ⎢⎢ 0 ⎥⎥
fb = ⎢0 1⎥ ⎢⎢ ⎥⎥ + ⎢1 0⎥ ⎢⎢ ⎥ (2
⎢ ⎥ 0 ⎢ ⎥ − 0.5 ⎥⎦ ⎢⎢ ⎥
⎢0 0⎥ ⎣⎢ ⎦⎥ ⎢ 0 1⎥ ⎣⎢ − 0.5⎥ (3
⎢⎣ ⎥⎦ ⎢⎣ ⎦⎥ ⎢⎣ ⎥⎦

Note that this result is the same as assigning −A(Γq )q to the node where the flux is
prescribed and zero at all other nodes. In this way, the boundary vector can be computed
directly.

Computation of the heat source vector

Element heat source vectors are computed from


e
xnen
fle = ∫ NeTQdx
x1e
where Q = 5 = constant in the present example. The load vector for element 1 is given
as

⎡ 1 1 ⎤
x 21 ⎡N 11 ⎤ 2 ⎢− 1 (x − x 2 )⎥ 2 ⎡−(x − x 21 )⎤ 2
⎡2 − x ⎤
f = 5∫ ⎢ ⎥ dx = 5 ⎢ l ⎥ dx = 5 ⎛⎜ 1 ⎞⎟ ⎢ ⎥ dx =5 ⎛⎜ 1 ⎞⎟ ⎢ ⎥
∫ ⎜⎝l 1 ⎠⎟ ∫ ⎝⎜ 2 ⎠⎟ ∫
1
l ⎢ 1⎥
⎢⎣N 2 ⎥⎦
⎢ ⎥
⎢ 1 (x − x 1 ) ⎥
⎢ 1 ⎥
⎢⎣ x − x 1 ⎥⎦ ⎢ x ⎥ dx
x11 0
⎢ l1 1 ⎥ 0 0 ⎣ ⎦
⎣ ⎦
2
⎡ x2 ⎤
⎢2x − ⎥ ⎡ 4 − 2⎤ ⎡1⎤
⎢ 2⎥ ⎢ ⎥ = 5⎢ ⎥
= 2.5 ⎢ ⎥ = 2.5 ⎢2 − 0 ⎥ ⎢1⎥
⎢ x2 ⎥
⎢ ⎥ ⎣⎢ ⎦⎥ ⎣⎢ ⎦⎥
⎢⎣ 2 ⎥⎦ 0

It can be seen that half of the heat goes to node 1 and half to node 2. Note that the
integral of linear shape functions over the element can be computed as an area of a
triangle with height equal to one and the base equal to the element length, this follows
easily from Figure 5.6.

For element 2 we have

⎪⎧⎪− 1 x − x 2 ⎪⎫⎪

⎪⎪N 12 ⎫
x 22 ⎪⎪ 4
⎪ l2 ( 2 )⎪
⎪dx = 5 ⎛⎜ 1 ⎞⎟
4
⎪⎧⎪4 − x ⎫⎪⎪
fl = 5∫ ⎨ 2 ⎬ dx = 5∫ ⎪
⎜⎝ 2 ⎠⎟ ∫
2
⎨ ⎬ ⎨ ⎬dx
⎪N 2 ⎪ ⎪⎪ 1 2 ⎪ ⎪
⎪⎩x − 2⎭⎪
x12 ⎪
⎪ ⎪
⎩ ⎪
⎭ 2
⎪⎪ 2 (x − x 1 ) ⎪⎪
⎪ 2 ⎪
⎩ l ⎭
4
⎡ x2 ⎤
⎢4x − ⎥ ⎡(16 − 8) − (8 − 2)⎤ ⎡2⎤ ⎡1⎤
⎢ 2 ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥
= 2.5 ⎢ 2 ⎥ = 2.5 ⎢ ⎥ = 2.5 ⎢2⎥ = 5 ⎢1⎥
⎢x ⎥ ⎢⎣ (8 − 8) − (2 − 4) ⎥⎦
⎢ − 2x ⎥ ⎣⎢ ⎦⎥ ⎣⎢ ⎥⎦
⎣⎢ 2 ⎥⎦ 2

The heat source vector is then assembled in a manner similar to the boundary flux
vector:

⎡ ⎤ ⎡ ⎤ ⎡ ⎤
⎢ 1 0 ⎥ ⎡ 5⎤ ⎢ 0 0 ⎥ ⎡ 5 ⎤ ⎢ 5 ⎥
2
⎢ ⎥ ⎢ ⎥
fl = ∑ LeT fle = ⎢ 0 1⎥ ⎢ ⎥ + ⎢1 0⎥ ⎢ ⎥ = ⎢⎢10⎥⎥
⎢ ⎥ ⎢ 5 ⎥ ⎢ ⎥ ⎢ 5⎥ ⎢ ⎥
⎢ 0 0⎥ ⎣ ⎦ ⎢ 0 1 ⎥ ⎣ ⎦ ⎢ 5 ⎥
e =1

⎣⎢ ⎥⎦ ⎣⎢ ⎥⎦ ⎣ ⎦

In practice, a direct vector assembly is used instead:

1) ⎡5⎤
⎢ ⎥ ⎡ 5 ⎤ (1
2) ⎢⎣5⎥⎦ ⎢ ⎥
⇒ ⎢5+5⎥ (2
2) ⎡5⎤ ⎢ ⎥
⎢ ⎥
⎢ ⎥ ⎢⎣ 5 ⎥⎦ (3
3) ⎣⎢5⎦⎥
Partition and solution

The global system of equations follows from (5.11) and (5.12) is given as

⎡ 0.1 -0.1 0 ⎤ ⎡ 0 ⎤ ⎡ 5 ⎤ ⎡ ? ⎤ ⎡ r ⎤
⎢ ⎥⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥
⎢ ⎥⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥
⎢ -0.1 0.2 -0.1⎥ ⎢T2 ⎥ = ⎢10⎥ + ⎢ 0 ⎥ = ⎢ 10 ⎥
⎢ ⎥⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥
⎢ 0 -0.1 0.1 ⎥ ⎢T3 ⎥ ⎢ 5 ⎥ ⎢−0.5⎥ ⎢ 4.5⎥
⎢⎣ ⎥⎦ ⎢⎣ ⎥⎦ ⎣ ⎦ ⎢⎣ ⎥⎦ ⎢⎣ ⎥⎦

Note that on the right hand side we have indicated a question mark where unknown
fluxes appear on the essential boundaries. Partitioning of the above system of equations
gives

⎡A G⎤ ⎡ d ⎤ ⎡ r ⎤
⎢ ⎥⎢ ⎥ = ⎢ ⎥
⎢ T ˆ ⎥ ⎢ ˆ ⎥ ⎢ˆf ⎥
⎢⎣G K⎥ ⎢ d ⎥
⎦ ⎣ ⎦ ⎢⎣ ⎥⎦

where
⎡ 0.2 −0.1⎤ ⎡T ⎤ ⎡ 10 ⎤
ˆ =⎢
K ⎥ dˆ = ⎢ 2 ⎥ ˆf = ⎢ ⎥
⎢−0.1 0.1 ⎥ ⎢T ⎥ ⎢4.5⎥
⎣⎢ ⎦⎥ ⎣⎢ 3 ⎥⎦ ⎣⎢ ⎥⎦
and the unknown temperatures are found from

⎡ 0.2 -0.1⎤ ⎡T2 ⎤ ⎡ 10 ⎤ ⎡145⎤


ˆ ˆ = ˆf − GT d ⇒ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ˆ=⎢ ⎥
Kd ⎢ -0.1 0.1 ⎥ ⎢T ⎥ = ⎢4.5⎥ ⇒ d ⎢190⎥
⎣⎢ ⎥⎦ ⎢⎣ 3 ⎥⎦ ⎣⎢ ⎥⎦ ⎣⎢ ⎦⎥

In the above, the term G d is dropped immediately since there are no nonzero
T

prescribed temperatures. Whenever essential boundary conditions involve nonzero


prescribed temperatures, this term must be retained and evaluated.

Postprocessing
The temperature gradient defined in Eq. (5.3)b is given asas

⎡ ⎤
1 ⎡ 1 0 0 ⎤ ⎢ 0 ⎥
dT 1
= B1L1d = ⎡⎢−1 1⎤⎥ ⎢⎢ ⎥ ⎢⎢145⎥⎥ = 72.5
dx 2 ⎣ ⎦ 0 1 0⎥⎥ ⎢ ⎥
⎣⎢ ⎦ ⎢190⎥
⎣⎢ ⎦⎥
⎡ ⎤
2 ⎡ 0 1 0 ⎤ ⎢ 0 ⎥
dT 1
= B2 L2 d = ⎡⎢−1 1⎤⎥ ⎢⎢ ⎥ ⎢⎢145⎥⎥ = 22.5
dx 2 ⎣ ⎦ 0 0 1⎥⎥ ⎢ ⎥
⎣⎢ ⎦ ⎢190⎥
⎣⎢ ⎦⎥
Note that the temperature gradient is piecewise constant and as will be seen in plotting it,
−1
a C function.

Estimation of solution quality

The finite element solution will now be compared to the exact analytical solution.
This type of comparison can only be done for some simple problems (primarily in one
dimension) for which the exact solution is known.

We start from the Strong Form:

d ⎛ dT ⎞⎟ d 2T
⎜⎜0.2 ⎟ + 5 = 0 ⇒ = −25
dx ⎝ dx ⎠⎟ dx 2
dT dT 5
T (0) = 0 q(4) = −k |x =4 = 5 ⇒ (4) = = −2.5
dx dx −2
Integrating the governing differential equation gives:

d 2T dT dT
= −25 ⇒ = −25x + c1 ⇒ (4) = -2.5 = −25 ⋅ 4 + c1 ⇒ c1 = 97.5
dx 2 dx dx
The expression for the temperature is obtained by integrating the temperature gradient,
which gives
dT
= −25x + 97.5 ⇒ T = −12.5x 2 + 97.5x + c2
dx
T (0) = 0 ⇒ − 12.5(0)2 + 97.5(0) + c2 = 0 ⇒ c2 = 0

Thus the exact temperature and temperature gradient are:

dT EX
T EX = −12.5x 2 + 97.5x = −25x + 97.5
dx
Figure 5.7 compares the FEM solution with the exact solution. It can be seen
that the nodal temperatures for the FEM solution are exact. This is an unusual anomaly
of finite element solutions in one-dimension and does not occur in multi-dimensional
solutions. Note that the essential boundary condition is satisfied exactly. This is not
surprising since the approximation function was constructed so as to satisfy the essential
boundary condition. In finite element solutions, essential boundary conditions will always
be satisfied exactly.

Figure 5.8 compares the derivative of the finite element solution with the exact
derivative (the derivative is proportional to the flux). As can be seen from Figure 5.8 and
−1
as mentioned before, the derivative is a C function: the derivative of the temperature,
and hence the flux, in the finite element solution is discontinuous between elements. As
pointed out in the figure, the natural boundary condition at x = 4 is not satisfied by the
finite element solution. However, we will see in other examples and in exercizes that the
natural boundary condition is met more accurately as the mesh is refined. Thus while we
don’t have to construct the finite element approximations to satisfy the natural boundary
conditions, they are only met approximately.

EX 2
T = −12.5x + 97.5x
T

FE
T

Figure 5.7: Comparison of the exact and finite element solution of temperature

dT
dx

EX
dT
= −25x + 97.5
dx
FE
dT
dx
x

Figure 5.8: Comparison of the exact and finite element solution of temperature gradient

It is also instructive to see how well the heat conduction equation is met by the
finite element solution. Recall the heat conduction equation derived in Chapter 3 and
substitute the finite element solution for the temperature:

d2
Ak
dx 2( )
N e ( x ) Led + Q ( x ) = err ( x ) (5.17)
In the above, we have replaced the zero on the RHS of the heat conduction equation by
“err” since the deviation from zero is indicative of the error in the finite element solution.
The the first term of Eq. (5.17) will vanish inside an element, since the shape functions
are linear in x . Therefore, inside the elements, the error in the heat conduction equation
will be

err ( x ) = Q ( x ) for x ≠ xi

This error actually appears to be quite large, and furthermore would not decrease with
refinement of the mesh. The behavior at the nodes is more complicated and will not be
considered here.

Thus both the natural boundary condition and the balance equations are only met
approximately by the finite element solution. However, it can be shown that the finite
element solution converges to the exact solution as the mesh is refined, although this is
not readily apparent from the weak form. Convergence of the finite element solution to
the exact solution is discussed in Section 5.8.

5.7 Gauss Qudrature


The product of the FEM is a computer code. Therefore, integration of element
matrices cannot be done using hand calculations. Moreover, closed form integration is
not always possible, and therefore, numerical integration is a natural choice. There are
numerous numerical integration techniques. Gauss Quadrature, which is considered in
this section, is one of the most efficient numerical integration techniques for functions
that are polynomials or nearly polynomials. In the following we will derive the Gauss
Quadrature method and then apply it to the evaluation of FE matrices.

Consider the following integral:


b
I = ∫ a
f (x )dx = ? (5.18)

For convenience we will map the problem domain, [a, b] into a standard domain on [-1,
1] using a linear mapping as shown in Figure 5.9. Note that at x = a, t = -1 and at x=b,
t=1.
l

x t
a b -1 0 1
Figure 5.9: Mapping of one-dimensional domain

This gives us the following equation relating x and t:


1 1
x = (a + b ) + t (b − a ) (5.19)
2 2
From Eq. (5.19) we get the following:

1 l
dx = (b − a )dt = dt = Jdt (5.20)
2 2

Where dx and dt are related by the Jacobian, J = (b − a ) / 2 . We now write the integral
(5.18) as:
1

I = J ∫ f (t )dt = JIˆ
−1

where
1

Iˆ = ∫ f (t )dt
−1

In the numerical integration procedure outlined below, we approximate the integral by:

⎡ f (t )⎤
⎢ 1 ⎥
⎢ f (t )⎥
ˆ ⎡ ⎤ ⎢ 2 ⎥
I = w1 f (t1 ) + w 2 f (t2 ) + … = ⎢w1 w 2 wn ⎥ ⎢ ⎥ = WTf (5.21)
⎣ ⎦⎢ ⎥
⎢ ⎥
⎢ f (t )⎥
⎢⎣ n ⎥⎦
where wi are the weights and ti are the points at which the integrand is to be evaluated.

The basic idea of the Gauss Quadrature is to choose the weights and the
integration points so that the highest possible polynomial is integrated exactly. Therefore
the function f(t) is approximated by a polynomial as
⎡ α1 ⎤
⎢ ⎥
⎢α2 ⎥
f (t ) = α1 + α2t + α3t 2 + … = ⎢⎡1 t t 2 ⎤ ⎢ ⎥ = P(t )α (5.22)
⎣ ⎦⎥ ⎢⎢α3 ⎥⎥
⎢ ⎥
⎢⎣ ⎥⎦
We can see that if we evaluate f(t) at the integration points, then we have:

f (t1 ) = α1 + α2t1 + α3t12 + … ⎡ f (t1 )⎤ ⎡1 t1 t12 ⎤


⎢ ⎥ ⎢ ⎥ ⎡ α1 ⎤
⎢ f (t )⎥ ⎢1 t ⎥ ⎢α ⎥
f (t2 ) = α1 + α2t2 + α3t22 + … ⎢ 2 ⎥ ⎢ t22 ⎥ ⎢ 2⎥
⎥⎢ ⎥
2
or ⎢ ⎥=⎢ (5.23)
⎢ ⎥ ⎢ ⎥⎢ ⎥
⎢ ⎥ ⎢ ⎥⎢ ⎥
⎢ f (t )⎥ ⎢ ⎥ ⎢αn ⎥
f (tn ) = α1 + α2tn + α3tn2 + … ⎢⎣ n ⎥⎦ ⎣⎢1 tn tn2 ⎥ ⎣⎢ ⎦⎥
⎦ α
f G
Based on Eq. (5.23) and Eq.(5.21) the integral can be written as:

Iˆ = W TGα (5.24)

Alternatively, we can integrate the polynomial approximation of f (t ) in closed form:


⎡ a1 ⎤
⎢ ⎥
1 1 ⎢a2 ⎥ ⎡ t2 t3 t4 ⎤
1
ˆ ⎡
I = ∫ f (t )dt = ∫ ⎢1 t t t ⎤ ⎢ ⎥
⎥⎦ ⎢ ⎥ dt = ⎢⎢t 2 3 4 ⎥ α
2 3
⎣ ⎢ ⎥ ⎣ ⎥⎦ −1
−1 −1
⎢a ⎥ (5.25)
⎣⎢ n ⎦⎥
⎡ 2 ⎤ ˆα
= ⎢2 0 0 ⎥α = P
⎢⎣ 3 ⎥⎦
ˆ
P

The two integrals in Eq. (5.25) and Eq. (5.24) have to be identical which yields:

ˆα ⇒
W TGα = P ˆT
GT W = P (5.26)

Equation (5.26) is a system of nonlinear algebraic equations for unknown matrices G and
W.

Note that if n is the number of integration points, the polynomial order that can be
integrated exactly is: 2n - 1 ≥ p. The reason for this is that a polynomial of order p is
defined by p+1 parameters. Since both the weights and the integration points are
unknown, the n-point integration scheme has 2n parameters that have to be calculated.
Thus for a given polynomial order the number of integration points required is

p +1
p + 1 ≤ 2n ⇒ n≥
2

For example, to integrate a quadratic polynomial (p=2) exactly, we need a minimum of 2


integration points.

Example 5.2
Find the integral below using 2-point Gauss Integration.
5

∫ (x + x 2 )dx
3
I = 2n − 1 = 3 ⇒ n = 2
2

Since n = 2 (two point integration), we must use Eq. (5.26) to compute (w1, t1 )
and (w 2 , t2 ) .
⎡1 1⎤ ⎡2⎤
⎢ ⎥ ⎢ ⎥
⎢ t1 t2 ⎥ w ⎢ 0⎥ w1 = w 2 = 1
⎢ ⎥ ⎡ 1 ⎤ ⎢⎢ ⎥⎥
⎢ 2 2 ⎥ ⎢w ⎥ = ⎢ 2 ⎥ ⇒ 1 1
⎢t1 t2 ⎥ ⎢⎣ 2 ⎥⎦ ⎢ ⎥ t1 = − t2 =
⎢ ⎥ ⎢ 3⎥ 3 3
⎢t13 t23 ⎥ ⎢ ⎥
⎢⎣ ⎥⎦ ⎢⎣ 0 ⎥⎦
To obtain the above, we note that by symmetry, w1 = w2 and t1 = -t2. The first equation
can then be used to obtain the weights and the third equation the integration points.
Next, we will use Eq.(5.20), a = 2, and b = 5 to express x in terms of t :

1 1
x = (a + b ) + t (b − a ) = 3.5 + 1.5t and
2 2
f (t ) = (3.5 + 1.5t )3 + (3.5 + 1.5t )2

Using Eq (5.21) the integral becomes:

1
l
I = ∫ ((3.5 + 1.5t ) + (3.5 + 1.5t ) )dt
3 2

2 −1
l l
=
2
( 3 2

2
) 3
(
w1 (3.5 + 1.5t1 ) + (3.5 + 1.5t1 ) + w 2 (3.5 + 1.5t2 ) + (3.5 + 1.5t2 )
2
)
= 37.818 + 153.432 = 191.25
In this case, we can check the result by performing analytical integration, which yields

5 5
⎛x 4 x 3 ⎞
∫ (x + x )dx = ⎜⎜⎜ + ⎟⎟⎟ = 197.917 − 6.667 = 191.25
3 2

2
⎝4 3 ⎠2
(wi , ti ) can be calculated for any number of integration points. These results are tabulated in
Table 5.1. In the finite element program these values can be programmed once so that Eq.
(5.26) does not have to be repeatedly solved.

Number of points, n Location, ti Weights, wi


1 0.0 2.0
2 ± 1 3 = ±0.5773502692 1.0
3 ±0.7745966692 0.5555555556
0.0 0.8888888889
4 ±0.8611363116 0.3478548451
±0.3399810436 0.6521451549
5 ±0.9061798459 0.2369268851
±0.5384693101 0.4786286705
0.0 0.5688888889
±0.9324695142 0.1713244924
6 ±0.6612093865 0.3607615730
±0.2386191861 0.4679139346
Table 5.1: Position of Gauss points and corresponding weights

Example 5.3
Consider the problem of an axially loaded elastic bar as shown in Figure 5.10. Solve for
the displacement and stresses using Gauss quadrature. The elasticity problem is
equivalent to a heat conduction problem considered in Example 5.1 in the following
manner:

T ↔ u (displacements) k ↔ E (Young’s modulus);

Q ↔ b (body force) Qs ↔ P (point force);

dT du dT du
↔ = ε (strain) q = −k ↔ −σ = −E (stress)
dx dx dx dx
The corresponding finite element matrices are:

Ke = ∫B
eT
Ae E e Be dx …element stiffness matrix
Ωe

fbe = NeT (Γq ) Ae (Γq ) σ …element boundary force vector

fle = ∫N
eT
bdx …element body force vector
Ωe

f e = fle + fbe …element force vector

E = 8 kg/cm2
A = 2x
u(x = 2) = 0

P (x = 5) = 24
x
A
σ(x = 6) = 0
x =2
b = 8 kg/cm
x =6
Figure 5.10: Geometry, loads and boundary conditions for Exmaple 5.3

Consider a finite element mesh consisting of a single 3-node element as shown in Figure
5.11.
1 2 3
x
x 11 = 2 x 21 = 4 P x 31 = 6

Figure 5.11: Finite element mesh for Exmaple 5.3

Recall that the element shape functions are given as:

1 (x − x 21 )(x − x 31 ) (x − 4)(x − 6) 1
N = 1 = = (x − 4)(x − 6)
1
(x1 − x 21 )(x11 − x 31 ) (−2)(−4) 8

1 (x − x 11 )(x − x 31 ) (x − 2)(x − 6) 1
N2 = 1 = = − (x − 2)(x − 6)
(x 2 − x 1 )(x 2 − x 3 )
1 1 1
(2)(−2) 4

1 (x − x11 )(x − x 21 ) (x − 2)(x − 4) 1


N3 = 1 = = (x − 2)(x − 4)
(x 3 − x11 )(x 31 − x 21 ) (4)(2) 8

and the corresponding B-matrix is:

dN 1 1 dN 2 1 dN 3 1
B11 = = (x − 5) B21 = = (4 − x ) B31 = = (x − 3)
dx 4 dx 2 dx 4
1⎡
B1 = (x − 5) (8 − 2x ) (x − 3)⎤⎥
4 ⎢⎣ ⎦

Stiffness matrix computation


The element stiffness matrix is given by:

⎡ ⎤
x3 6 ⎢ (x − 5) ⎥
1⎢ ⎥ 1
K1 = K = ∫ B AEBdx = ∫
T
⎢(8 − 2x )⎥ (2x )(8) ⎡⎢(x − 5) (8 − 2x ) (x − 3)⎤⎥ dx
4⎢ ⎥ 4⎣ ⎦
x1 2 ⎢ (x − 3) ⎥
⎣⎢ ⎦⎥

⎡ x (x − 5)2 x (x − 5)(8 − 2x ) x (x − 5)(x − 3) ⎤⎥


6 ⎢
⎢ ⎥
= ∫ ⎢x (8 − 2x )(x − 5)

x (8 − 2x )2 x (8 − 2x )(x − 3)⎥dx

2 ⎢ 2 ⎥
⎢⎣ x (x − 3)(x − 5) x (x − 3)(8 − 2x ) x (x − 3) ⎥⎦

Since the polynomial order to be integrated is p=3 the number of Quadrature points
required for exact polynomial integration is: 2n -1 = 3 ⇒ n = 2, i.e., 2-point Gauss
Quadrature is required for exact integration of a cubic polynomial. Writing x in terms of t,
we have:
1 1 ⎡ t = −1 ↔ x = 2 ⎤
x = (a + b ) + t (b − a ) = 4 + 2t ⎢ ⎥
2 2 ⎢t = 1 ↔ x = 6 ⎥
⎣⎢ ⎥⎦
dx = 2dt
Rewriting the integral:

6
4
1 ⎡ ⎤
∫ f (x )dx = ∫ f (x (t ))dt = 2 ⎢⎢w1 f (x (t1 )) + w2 f (x (t2 ))⎥⎥ = 2 ⎡⎣ f (x 1 ) + f (x 2 )⎤⎦ (5.27)
2
2 −1 ⎣⎢ 1 1 ⎦⎥
where
⎛ 1 ⎞⎟
x 1 = x (t1 ) = 4 + 2t1 = 4 + 2 ⎜⎜⎜− ⎟ = 2.8453 w1 = 1
⎝ 3 ⎠⎟
⎛ 1 ⎞
x 2 = x (t2 ) = 4 + 2t2 = 4 + 2 ⎜⎜⎜ ⎟⎟⎟ = 5.1547 w 2 = 1
⎝ 3⎠

Using Eq. (5.27) to evaluate the stiffness matrix terms yields the following values:

∫ x (x − 5) dx = 2 (2.8453 (2.8453 − 5) + 5.1547 (5.1547 − 5) ) = 26.667


2 2 2
K 11 =
2

∫ (x − 5x ) (8 − 2x )dx
2
K 12 =
2

= 2 ((2.84532 − 5 ⋅ (2.8453)) + (5.15472 − 5 ⋅ (5.1547)) (8 − 2 ⋅ (5.1547))) = −16.0 ⋅ 2 = −32

We leave to the reader to complete the integration of the remaining terms. The stiffness
matrix is then given by:

⎡ 2 1 ⎤ ⎡ 2 1 ⎤
⎢26 −32 5 ⎥ ⎢26 −32 5 ⎥
⎢ 3 3 ⎥ ⎢ 3 3 ⎥
⎢ 1 1 ⎥ ⎢ 1 1⎥
K = ⎢⎢ 85 −53 ⎥⎥ = ⎢⎢−32 85 −53 ⎥⎥
⎢ 3 3⎥ ⎢ 3 3⎥
⎢ sym 48 ⎥ ⎢ 1 1 ⎥
⎢ ⎥ ⎢5 -53 48 ⎥
⎢⎣ ⎥⎦ ⎢⎣ 3 3 ⎥⎦

Load vector computation


x3

∫N
eT
1
fl = f =
l bdx + NeT (x = 5) P
x1
⎡ 1 ⎤ ⎡ 1 ⎤
⎢ (x − 4)(x − 6) ⎥ ⎢ (x − 4)(x − 6) ⎥
⎢ 8 ⎥ ⎢ 8 ⎥
6 ⎢ 1 ⎥ ⎢ 1 ⎥
⎢− (x − 2)(x − 6)⎥ 8dx + ⎢− (x − 2)(x − 6)⎥
fl = ∫ ⎢ 4



⎢ 4



⋅ 24
2
⎢ 1 ⎥ ⎢ 1 ⎥
⎢ (x − 2)(x − 4) ⎥ ⎢ (x − 2)(x − 4) ⎥
⎢⎣ 8 ⎥⎦ ⎢⎣ 8 ⎥⎦ x =5

The 2-point Gauss integration is needed because the function is quadratic. As before, 2-
6

point integration gives ∫ f (x )dx = 2 ⎡⎣ f (x ) + f (x


1 2 )⎤⎦ and
2

⎡2 ⎡N 1 (x ) + N 1 (x )⎤ ⎤ ⎡ ⎤
⎢ ⎣ 1 1 1 2 ⎦⎥ ⎢ 3 (5 − 4)(5 − 6) ⎥
⎢ ⎥ ⎢ ⎥
fl = 8 ⎢2 ⎡⎣N 21 (x 1 ) + N 21 (x 2 )⎤⎦ ⎥ + ⎢−6 (5 − 2)(5 − 6)⎥
⎢ ⎥ ⎢ ⎥
⎢ ⎡ 1 ⎤ ⎥ ⎢ 3 (5 − 2)(5 − 4) ⎥
⎢2 ⎣N 3 (x 1 ) + N 3 (x 2 )⎦ ⎥ ⎣⎢
1
⎦⎥
⎣ ⎦

⎡ 2 ((2.8453 − 4)(2.8453 − 6) + (5.1547 − 4)(5.1547 − 6)) ⎤ ⎡−3⎤


⎢ ⎥ ⎢ ⎥
⎢ ⎥ ⎢ ⎥
= ⎢−4 ((2.8453 − 2)(2.8453 − 6) + (5.1547 − 2)(5.1547 − 6))⎥ + ⎢ 18 ⎥
⎢ ⎥ ⎢ ⎥
⎢ ⎥ ⎢9⎥
⎢⎣ 2 ((2.8453 − 2)(2.8453 − 4 ) + (5.1547 − 2)(5.1547 − 4)) ⎥⎦ ⎢⎣ ⎥⎦
Total: 24
⎡ 1⎤ ⎡ 1⎤
⎢5 ⎥ ⎡ ⎤ ⎢2 ⎥
⎢ 3 ⎥ ⎢−3⎥ ⎢ 3 ⎥
⎢ 1⎥ ⎢ ⎥ ⎢ 1⎥
= ⎢⎢21 ⎥⎥ + ⎢ 18 ⎥ = ⎢⎢39 ⎥⎥
⎢ 3 ⎥ ⎢⎢ ⎥⎥ ⎢ 3 ⎥
⎢ 1 ⎥ ⎢ 9 ⎥ ⎢ 1⎥
⎢ 5 ⎥ ⎣ ⎦ ⎢14 ⎥
⎢⎣ 3 ⎥⎦ 24 ⎢⎣ 3 ⎥⎦
8⋅4

Note that boundary vector is zero, since the prescribed stress at the right hand
side σ (x = 6) = 0 . Thus the force vector is equal to the body force vector

⎡ 1 ⎤
⎢2 + ?⎥
⎢ 3 ⎥
⎢ 1 ⎥
f = fl = ⎢⎢ 39 ⎥⎥
⎢ 3 ⎥
⎢ ⎥
⎢ 14 1 ⎥
⎢⎣ 3 ⎥⎦
where the questionmark denotes unknown reaction. The resulting global system of
equations is given as
⎡ 2 1 ⎤ ⎡ ⎤
⎢26 −32 5 ⎥ ⎡ ⎤ ⎢ 1 ⎥⎥ ⎢ r
⎢ 3 3 ⎥⎢0⎥ ⎢ ⎥
⎢ 1 1 ⎥⎥ ⎢⎢u2 ⎥⎥ = ⎢ 39 1 ⎥
⎢ 85 −53 ⎥ ⎢ ⎥
⎢ 3 3 ⎥ ⎢⎢u ⎥⎥ ⎢ 3 ⎥
⎢ sym
⎢ 48 ⎥ ⎣ 3 ⎦ ⎢⎢14 1 ⎥⎥
⎣⎢ ⎦⎥ ⎣⎢ 3 ⎦⎥
Partitioning after the first row and column gives the reduced system of equations

ˆ ˆ = ˆf − BT d
Kd
where
⎡ 1 1⎤ ⎡ 1⎤
⎢ 85 −53 ⎥ ⎡u ⎤ ⎢ 39 ⎥ ⎡u2 ⎤ ⎡2.1193⎤
⎢ 3 3⎥ ⎢ 2 ⎥ ⎢ 3⎥ ⎢ ⎥=⎢ ⎥
⎢ ⎥ ⎢u ⎥ = ⎢ 1 ⎥ ⇒
⎢⎣u 3 ⎥⎦ ⎢2.6534⎥
⎢−53 1 48 ⎥⎥ ⎣ ⎦ ⎢⎢14 ⎥⎥
3
⎢⎣ ⎥⎦
⎢ 3
⎣ ⎦ ⎣ 3⎦

Post-processing
Once the nodal displacements have been calculated, the displacement field can be
obtained using quadratic element shape functions.
⎡ 0 ⎤
⎢ ⎥
1 ⎢ ⎥
. u = N 1u1 + N 2u2 + N 3u 3 d = d = ⎢2.1193⎥
⎢ ⎥
⎢2.6534⎥
⎣⎢ ⎦⎥
1 −1 1
u = (x − 4)(x − 6) (0) + (x − 2)(x − 6)(2.1193) + (x − 2)(x − 4)(2.6534)
8 4 8

= −0.19815x 2 + 2.24855x − 3.7045

The stress field is given as

du d
σ=E =E (N1d1 ) = EB1d1
dx dx
⎡ 0 ⎤
⎢ ⎥
1⎡ ⎤ ⎢ ⎥
= 8 ⎢(x − 5) (8 − 2x ) (x − 3)⎥ ⎢2.1193⎥ == −3.17x + 17.99
4⎣ ⎦⎢ ⎥
⎢2.6534⎥
⎢⎣ ⎥⎦

Estimation of solution quality


For simplicity only the quality of stress calculations will be assessed.
Since the problem is statically determined the exact stress field can be calculated from
exact N exact
the known axial force: σ = . Figure 5.12 compares the FE solution of the
A
2x
stress field, (shown with a solid line) with the exact stress field (shown with a dashed
line). Notice that the FE stress field does not capture the jump that occurs at the location
of the point source application.

σ
36 − 4x
15 14
x
11.65
10
24 − 4x
3.2
5 x
2.14
0.8
x
2 4 -1.03
6
Figure 5.12: Comparison of the finite element and exact stresses for Example 5.5.

5.8 Convergence of the finite element method1

The fact that finite element solutions are approximate solutions is very important
in their application. It is crucial that the user of a finite element program have some way
in assessing the quality of his solution. This can be done by refining the mesh and seeing
how much the solution changes with refinement: if there are large changes, then the
original mesh was inadequate and the new mesh may also be inadequate, so that further
refinement may be necessary. Finite element software today often includes error
indicators that provide estimates of the error in the solution. These error indicators
should be computed to gauge the accuracy of the solution.

It is important to undertstand that a finite element solution is an approximate


solution. The approximate character of the weak form stems from replacing the space of
all functions in U and U 0 by a finite dimensional spaces U FE ⊂ U and U FE 0 ⊂ U0
defined as
{
U FE = T (x ) T (x ) ∈ H 1 , T e = Ne de ,T = T on ΓT } (5.28)

U FE
0 = {w x( ) w (x ) ∈ H 1 , w e = N w , w = 0 on Γ }
e e
T (5.29)

1
Advanced reading
There are an infinite number of functions in U and U 0 , i.e. these spaces are of
infinite dimension. When we represent the weight functions by shape functions, then the
space of weight functions U FE0 becomes of finite dimension (equal to the number of

nodal weights). Similarly, the space U FE in which we seek our finite element solution
becomes finite dimensional and equal to the number of nodal temperatures, i.e. the
number of unknowns in the linear system equations. While the weak form is exactly
equivalent to the strong form for the infinite dimensional spaces U and U 0 , it is only
approximately equivalent for the finite dimensional spaces U FE ⊂ U and U FE 0 ⊂ U0
which are used in the finite element method. Therefore, the equations that emanate from
the weak form, the balance equation and the natural boundary conditions, are only
satisfied approximately. In this Section we will distinguish between the weak forms
defined for the exact and finite element solutions. The weak form will be restated as
follows. Find T EX (x ) ∈ U and T FE (x ) ∈ U FE such that

L L
dw dT EX
∫ dx
Ak
dx
dx = (wA) Γ q + ∫ wQdx
q
∀w ∈ U 0
0 0
L L
(5.30)
dw dT FE
∫ dx
Ak
dx
dx = (wA) Γ q + ∫ wQdx
q
∀w ∈ U FE
0
0 0

where superscripts EX and FE denote the exact and finite element solutions,
respectively. To analyxe how close is T FE (x ) to T EX (x ) we start by showing that
T FE (x ) minimizes the energy norm of error e Π = T EX − T FE Π
, i.e.,

T EX − T FE Π
= min
FE
T EX − T Π
(5.31)
T ∈U

and
l
1
e Π = ∫
2 0
ke,2xdx (5.32)

The definition of e Π in Eq. (5.32) is similar to the square root of the internal energy for
elasticity problems defined in Chapter 3. Even though the norm in Eq. (5.32) has no
longer the meaning of energy, we will refer to e Π as the energy norm of error.

To prove Eq. (5.31) we expand the right hand side as


2

2
T EX − T Π
= (T EX − T FE ) + (T FE − T )
e w ∈U FE
0 Π
FE
Note that that since T and T satisfy essential boundary conditions, it follows that
(T FE − T ) ≡ w ∈ U FE0 and thus
L
dw de
e+w 2
Π = e 2
Π + w 2
Π +∫ Ak dx
0
dx dx

Subtracting the two weak forms in Eq. (5.30) and taking w ∈ U FE


0 yields
L
dw de
∫ dx
Ak dx = 0 . Since w
dx
Π > 0 for any w ≠ 0 , we get that e Π is minimum.
0

From Eq. (5.31) we can obtain a quantitive estimate for the energy norm of error
e Π by estimating T EX − T where T ∈ U FE is a suitably chosen auxiliary function
Π
defined in the same space as the finite element solution. We denote the error of auxiliary
function in element e as ee = T EX − T for (e − 1)h ≤ x ≤ eh where h=l/n is the length
of n equal-size elements.

Let us choose the auxiliary function T ∈ U FE to be a linear interpolation function such


that it is equal to the exact solution at the finite element nodes, i.e. T (x J ) = T EX (x J ) as
shown in Figure 5.13. Note that for one-dimensional problems the interpolation function
coincides with the finite element solution (see Example 5.1).

T T EX

Element e

xJ xJ +1
x
h

Figure 5.13: Interpolation function approximation of the exact solution

The derivative of the interpolation function T,x in element e is given by

T (xJ +1 ) − T (xJ )
T,x (x ) =
xJ +1 − xJ
where xJ = (e − 1)h and xJ +1 = eh . By Mean Value theorem (see Chaper 1.2.6) there is
a point c in the interval xJ ≤ c ≤ xJ +1 such that

T,x = T,xEX (c) (5.33)

We now expand the derivative of the excat solution T,xEX (x ) using Taylor’s formula with
remainder (see Chaper 1.2.6) around point c satifying Eq. (5.33)

T,xEX (x ) = T,xEX (c) + (x − c )T,xxEX (ζ ) (5.34)

where c ≤ ζ ≤ x .

Subtracting Eq. (5.33) from Eq. (5.34) and assuming that T,xEX (ζ ) ≤ C we have

ee,x = T,xEX − T,x ≤ C x − xJ ≤ Ch (e − 1) h ≤ x ≤ eh (5.35)

The energy norm of error in the interpolation function can be bounded as


l eh
1 1 n 1
( ,x ) Ak (ee,x ) dx ≤ n h K (hC )
2 2
∫ ∑ ∫
2 2
e Π = Ak e dx = (5.36)
2 0 2 e =1 (e−1)h 2

where A(x )k (x ) ≤ K . Denoting n h = l and recalling that the energy norm of the finite
element solution error is less than or equal to the energy norm of the interpolation
function error we have
1 α
eΠ≤ KLC 2h 2 = kCh = (5.37)
2 N
l
where N ≈ is the number of degrees-of-freedom equal to the number of finite element
h
nodes ouside the the essential boundary conditions for one dimensaional problems. Note
that C is independent of the mesh size h, but depends on the smoothness of the solution.

The error estimate for higher order elements can be obtained in a similar fashion
as for the linear element except that a higher order Taylor’s formula with remainder has
to be used instead (see Problem 5-5 for error estimation in quadratic elements). It can be
shown that the energy norm of error for finite elements of order p is bounded by

α
e Π ≤ (5.38)
Np

provided that p+1 derivative of the exact solution is bounded, T ,( p +1) (ζ ) ≤ C . In Eq.
(5.38) α is independent of h, but depends on the polynomial order p of element.
From Eq. (5.38) it can be seen that the energy norm of error is reduced, i.e. the
quality of the finite element approximation is improved, as the number of degrees-of-
freedom is increased. This can be accomplished in two ways: (i) by increasing the
number of elements and/or (ii) by increasing the order of the polynomial approximation
in each element.

It is further instructive to point out that halving the size of finite elements reduces
the energy norm of error by a factor of 2 p , i.e. by a factor of 2 for linear elements and a
factor of 4 for quadratic elements. In other words the rate of convergence, i.e. how fast
the finite element solution approaches the exact solution, is improving as the polynomial
order of elements is increased. This statement holds provided that the solution is
sufficiently smooth, i.e., p+1 derivatives of the excat solution are bounded. On the other
hand, if the solution is not smooth even though it lives in H 1 , such as for instance
T EX ≈ x λ with 1/ 2 < λ < 2 (see also Problem 4 in Section 3) the estimate in Eq. (5.38)
is no longer valid. Without proof2 we state a general result, which accounts for the effect
of singularity on the convergence of the finite element method in one dimension

α
e Π ≤ (5.39)

where
⎛ 1⎞
β = min ⎜⎜p, λ − ⎟⎟ λ > 1/ 2 p ≥1 (5.40)
⎝ 2⎠

For the bound (5.39) and (5.40) to be valid three requirements must be met: (i) the exact
solution has to live in H 1 (integrability), i.e. λ > 1/ 2 in Eq. (5.40), (ii) the finite
element solution has to be at least C 0 continuous (continuity) and integrable, and (iii) the
polynomial expansion has to be complete up to order p with p ≥ 1 (completeness).

Problems Chapter 5
Problem 5-1: Consider the heat conduction problem shown below on the domain [0, 20].
The bar has a constant cross-sectional area A=10, constant thermal conductivity k=5 and
the heat supply Q=100. The boundary conditions are T(x=0)=0, q(x=20)=0. Solve the
dT ( x )
problem with 2 linear elements. Plot the finite element solution for T ( x ) and
dx
and compare to the exact solution which is given by T ( x) = − x + 40 x .
2

Problem 5-2: Repeat problem 5.1 with a 4 and 8 element meshes of equal sized
elements. (You don’t need to set up all of the equations because the pattern of the finite
element equations for interior nodes are all the same for a given mesh). Solve the
equations with a calculator or MATLAB or whatever else you prefer. Compare the

2
W.Gui and I. Babuska, “The h-, p- and hp-versions of the Finite Element Method in One Dimension,
Numerische Methematik, Vol. 49. pp. 577-683, (1986)
solutions to the exact solution. Plot the error in the natural boundary condition as the
mesh is refined-what is the pattern?

Problem 5-3: Consider a heat conduction problem shown below. The bar has a constant
cross-sectional area A=10, constant thermal conductivity, k=5, and linear heat supply Q
as shown below:
x
x =1 x =4

50
Q= (x + 2)
3

The boundary conditions are: T(x=1) = 1 and T(x=4) = 0.

Divide the bar into two elements as shown below:

Element 1 Element 2
x
x =1 x =2 x =3 x =4
Note that Element 1 is a three-node (quadratic) element, whereas Element 2 is a two-
node (linear) element.

a) State the strong form representing the heat flow and solve it analytically. Find the
temperature and flux distributions.
b) Construct the element load vectors and assemble them to obtain the global force
vector. Note that the boundary vector is zero.
c) Construct the element stiffness matrices and assemble them to obtain the global
stiffness matrix.
d) Find the temperature distribution using the finite element method. Sketch the
analytical (exact) and the finite element temperature distributions.
e) Find the flux distribution using the finite element method. Sketch the exact and the
finite element flux distributions.

Problem 5-4: Given a one-dimension elasticity problem as shown below. The Bar
(Modulus E=2) is constrained at both ends (A and C). Its cross sectional area is constant
(A=1) on AB and varies linearly (A=0.5(x -1)) on BC. A distributed load b(x) = 5 is applied
along the left portion of the bar AB and a point force P=10 is applied at point B. Use a 3-
node element on AB and a 2-node element on BC as shown below.

a) Construct the element load vectors and assemble them to obtain the global force
vector.
b) Construct the element stiffness matrices and assemble them to obtain the global
stiffness matrix.
c) Find the displacement distribution using the finite element method. Sketch the finite
element displacement distributions.
d) Find the stress distribution using the finite element method. Sketch the finite element
stress distributions.
E =2
b(x ) = 5
P = 10
x
A B C

xA = 1 xB = 3 xC = 5

A D B C
1 3 4 2
Element 1 Element 2

Problem 5-5: Consider the axial tension problem. The bar has a linearly varying cross-
sectional area A = x+1 in the region 0 < X <1, and constant cross-section A = 2 on 1 < X
< 2. Young modulus is E = 5 N/m2. The bar is subjected to the point load P = -2 N at X =
0.75m, and quadratic varying distributed loading b = x2 N/m in the region 1 < X < 2. The
bar is constrained at X = 0 and is traction free at X = 2.

u(x = 0) = 0 P (x = 3 / 4) = −2 b(x ) = x 2
σ(x = 2) = 0
x

x =0 x =1 x =2

Divide the bar into a single quadratic element with the center node at x = 1.

1. Construct the element stiffness matrix and force vector and carry out numerical
integration of element stiffness matrix using one point integration and the load vector
using two point Gauss Quadrature.
2. Solve the system of linear equations and find the nodal displacements and stresses.
3. Find the exact stress distribution and compare it to the finite element solution.
4. Suggest how to improve the finite element model to get more accurate results.

Problem 5-6: Solve the Problem 1 using three-element mesh shown below. The three
elements are linear two-node elements

A B C D
x =0 x = 3/4 x = 1 x =2
Find the exact stress distribution and compare it to the finite element solutions.
Problem 5-7: Consider a weak form given in Eq. (5.1). Proof that for sufficiently smooth
functions (having p+1 bounded derivatives) the error in energy norm of the finite solution
α
of order p=2 is bounded by e Π ≤ . Follow the steps below to prove the bound:
N2
a) In each element expand the exact Temperature using Taylor’s formula with
remainder up to quadratic order. Show that there is a point c within the element
domain such that

T EX (x 3 ) − 2T EX (x 2 ) + T (x 1 )
T,xxEX (c) = 2 0 ≤c ≤l
(l / 2)
where l = x 3 − x 1 x 2 − x 1 = l / 2 .

b) On each element domain assume a quadratic interpolation function T to be exact at


EX EX
three points: T (x 1 ) = T (x 1 ) , T (x 2 ) = T (x 2 ) , T (x 3 ) = T EX (x 3 ) and
construct a quadratic approximation.
EX
c) Using Taylor’s formula with remainder up to quadratic order expand T,x around the
point c found in a).
d) Write the derivative of the interpolation function constructed in b) as
T,x = a + bx
where a and b are expressed in terms of the exact nodal temperatures.
e) Show that there is a constant c in the interval 0 ≤ c ≤ l for which the coefficients
of the exact and interpolation temperatures up to linear order are identical.
Chapter

6 Strong and Weak Forms for two-


dimensional scalar field problems

In this Chapter we will develop the strong and weak forms for the steady-state heat
conduction problem. A steady state problems is defined as one in which the scalar field
(temperature) does not change with time.
We start by the exposition of the necessary mathematical preliminaries required to
derive the weak form from the strong form in multidimensions. For one-dimensional
problems, we derived the Weak Form and the Strong Form using integration by parts in
Chapter 3. In multidimensions, the Gauss Divergence and Green Gauss theorems serve
as the vehicle to obtain a Weak Form from the Strong Form. We start by the derivation of
the two theorems in Sections 6.2 qnd 6.3. Derivation of the Strong and Weak forms is
given in Section 6.4?/ for heat conduction problem.

6.1 Mathematical Preliminaries


6.1.1 Gradient
The gradient of a function is given by

⎡∂⎤ ⎡ ∂f ⎤
⎢ ∂x ⎥ ⎢ ∂x ⎥
∇ f = ⎢ ⎥ f ( x, y ) = ⎢ ⎥
⎢∂⎥ ⎢ ∂f ⎥
⎢⎣ ∂y ⎥⎦ ⎢⎣ ∂y ⎥⎦

The gradient is a vector, and in courses in physics and mechanics it is often written as

G ∂ ∂
∇=i +j
∂y ∂y

where i and j are unit vectors in the x and y directions, respectively. In developing the
finite element method, we will not keep track of the unit vectors and just let the first entry
correspond to the x component and the second the the y component, just as for the nodal
displacements in Chapter 2. In vector notation, the gradient of a function is given by

G ∂f ∂f
∇f = i + j
∂y ∂y

6.1.2 Gauss Theorems


Consider a scalar field f = f (x , y ) defined on a domain Ω , as shown in Figure 6.1. The
boundary of the domain is denoted by Γ as shown. Examples of the scalar fields we will
consider are the temperature field T (x , y ) and the potential field φ(x, y ) . The unit
normal to the domain is denoted by n , where in two dimensions

nT = ⎡⎣ nx n y ⎤⎦ (6.1)

and nx and n y are the x and y components of the vector normal to the domain, called the
normal vector or just the normal. Since n is a unit vector, it follows that nx2 + n 2y = 1 .

Γ
D
y =d
x = x 1(y ) dx
dy

dΩ

y =c
C
x = x 2 (y )
x
Figure 6.1: Problem settings

The purpose of Chapter 6.2 is to present a method for transforming an integral of a


gradient of a function over an area to a contour integral. The two theorems are called
Gauss’s gradient and Gauss’s divergence theorem.

The Gauss’s gradient theorem states that

If f ( x, y ) ∈ C 0 then

2
∫ ∇f d Ω = v∫ fnd Γ
Ω Γ
(6.2)

In Eq.(6.2), in a two dimsional problem, the LHS integral is a double integral, and can
also be written as ∫∫ ∇f dxdy , where we have omitted the limits of integration because
they are awkward to write for arbitrary shapes. The RHS of (6.2) in two dimensions is a
contour integral. Note that Eq. (6.2) represents two scalar equations

∂f ∂f
∫ ∂x d Ω = ∫ fn d Γ ∫ ∂y d Ω = ∫ fn d Γ
Ω Γ
x
Ω Γ
y (6.3)

We will now prove the Gauss’s gradient theorem for a convex domain (a convex domain
is a domain for which any line joining two points in the domain is entirely in the domain).
This is not a very resticitve assumption because any domain can be subdivided into
convex subdomains and the same methods can then be used to prove the theorem.

Let us consider the area integral:


∂f
Ix = ∫ ∂x d Ω (6.4)

The maximum and minimum y-values of the domain are indicated by the points P1 and P2
in Fig.7.1, where the corresponding y-values are y = a and y = b, respectively. These
two points divide the boundary into two curves as shown. The first curve, x = x 1(y ),
starts at P1 and follows a clockwise path ending at P2. The second curve, x = x 2 (y ),
follows a counterclockwise path from P1 to P2.

Using these definitions of the boundary of the domain, Eq (6.4) can be rewritten as
follows:

b ⎛x2 (y ) ⎞
∂f ∂f ⎜⎜ ∂f ⎟⎟
Ix = ∫ ∂x
dΩ = ∫∫ ∂x
dxdy = ∫ ⎜⎜ ∫ dx ⎟⎟dy
⎜⎝x1 (y ) ∂x ⎠⎟
Ω a

Now applying the fundamental theorem of calculus to the above, we obtain


b b

∫ ( f (x, y ) )dy =∫ ( f (x (y), y ) − f (x (y), y))dy


x =x 2 (y )
Ix = x =x1 (y ) 2 1
a a
b b

= ∫ f (x (y ), y )dy − ∫ f (x (y ), y )dy
2 1
a a
Now we reverse the limits of integration on the second integral, which requires that we
change the sign on the integral, giving
b a

Ix = ∫ f (x (y ), y )dy + ∫ f (x (y ), y )dy
2 1 (6.5)
a b

3
The first term in Eq.(6.5) is the integral of f evaluated on the boundary x = x 2 (y ) in the
counterclockwise direction. The second term is the integral of f taken along x = x 1(y )
also in the counterclockwise direction. Thus the sum of the integrals gives the complete
contour integral, and it follows that:

∂f
∫ ∂x d Ω = ∫v f (x, y )dy (6.6)
Ω Γ

where v∫ is the boundary integral taken counterclockwise on the boundary Γ .


Similarly, it can be shown that for some other function

∂f
∫ ∂y d Ω = −∫v f (x, y )dx (6.7)
Ω Γ
The change in the sign is due to how the counterclockwise path affects integrals. To
complete the proof, let us express dx and dy in terms of the incremental arc length dΓ as
shown in Figure 6.2.
y

D(x + dx , y + dy ) n is normal, i.e.,


n2x + ny2 = 1
n ny
dy nx
dx
E (x , y )

x
Figure 6.2: A segment of the boundary showing the unit normal n

dx n
− = y ⇒ dx = −nyd Γ (6.8)
dΓ 1

dy n
= x ⇒ dy = nxd Γ (6.9)
dΓ 1

Combining Eqs. (6.7), (6.8) and (6.9) it follows that:

∂f ∂f
∫ ∂x d Ω = ∫v fnxd Γ and ∫ ∂y d Ω = ∫v fnyd Γ (6.10)
Ω Γ Ω Γ

which completes the proof of Gauss’s gradient theorem.

4
The Gauss’s gradient theorem can be used to obtain a theorem that we will use to relate
area integrals of vector fields (a vector field is a vector which is a function of the spatial
variables) to contour integrals of the vector field. The theorem is called Gauss’s
divergence theorem. This theorem states that

∫∇ q d Ω = ∫ qT n d Γ
T
(6.11)
Ω Γ

The integrand of Eq. (6.11) can be written out as

⎡∂ ∂ ⎤ ⎡ qx ⎤ ∂qx ∂q y
∇T q = ⎢ ⎢ ⎥= +
⎣ ∂x ∂y ⎥⎦ ⎣ q y ⎦ ∂x ∂y

∇ T q is called the divergence of a vector field, hence the name divergence theorem.

Letting f = qx in Eq (6.10)a and f = q y in (6.10)b and adding these equations yields:

⎛ ∂q x ∂q ⎞
∫ ⎜⎜ + y ⎟⎟⎟d Ω = ∫v (q n + q y n y )d Γ (6.12)
⎜⎝ ∂x ∂y ⎠
x x
Ω Γ

6.1.3 Green-Gauss theorem


The Green-Gauss theorem is the counterpart of integration by parts in one dimesion. It
states that

∫ w∇ ∫v (wq ) nd Γ − ∫ ∇T wqd Ω
T T
qdA =
Ω Γ Ω

We now turn to the derivation of the Green-Gauss theorem. Let us first find
∇ T ( wq )

∂ ∂ ∂w ∂q ∂w ∂q
∇ T ( wq ) = ( wqx ) + ( wq y ) = qx + w x + q y + w y
∂x ∂y ∂x ∂x ∂y ∂y
⎛ ∂q ∂q ⎞ ⎛ ∂w ∂w ⎞ (6.13)
= w⎜ x + y ⎟ + ⎜ qx + q y ⎟ = w∇T q + (∇w)T q
∂ ∂ ∂ ∂
⎝
⎠ ⎝

x y x y

⎡∂ ∂ ⎤ ⎡ qx ⎤ ⎡ ∂w ∂w ⎤ ⎡ qx ⎤
⎢ ⎥ ⎢ ⎢ ⎥

⎣ ∂x ∂y ⎦⎥ ⎣⎢ q y ⎦⎥ ⎣ ∂x ∂y ⎦⎥ ⎣⎢ q y ⎦⎥

5
Note the similarity of Eq. (6.13) with the derivative of a product formula: the operator
d
is just replaced by ∇ T . Integrating Eq. (6.13) over the domain yields:
dx

∫∇ (wq )d Ω = ∫ w ∇T qd Ω + ∫ (∇w )T qd Ω
T
(6.14)
Ω Ω Ω

Applying Gauss's divergence theorem to the left hand side of Eq. (6.14) and then
rearranging terms yields the Green-Gauss theorem:

∫ w∇ ∫v (wq ) nd Γ − ∫ ∇T (wq )d Ω
T T
qdA = (6.15)
Ω Γ Ω

Note that if qy = 0 and qx = u and nx = 1 (ny = 0) (which corresponds to a long strip)

∂u ∂w
∫ w ∂x d Ω = ∫v uwd Γ − ∫ ∂x
ud Ω (6.16)
Ω Γ Ω

This is equivalent to the integration by parts in 1-D:


l l
∂u ∂w
∫ w
∂x
dx = (uwn ) Γ − ∫ u
∂x
dx (6.17)
0 0

Example 6.1
Given the rectangular shape domain bxh, as shown in Figure 6.3, and the flux
⎡q x ⎤ ⎡⎢xy ⎤⎥
2

vector q = ⎢ ⎥ = ⎢
⎢⎣qy ⎥⎦ ⎢ 0 ⎥⎥
, verify the divergence theorem.
⎣ ⎦

6
y ⎡ 0⎤
n = ⎢⎢ ⎥⎥
1
⎣⎢ ⎦⎥

C B

h
⎡−1⎤ ⎡ 1⎤
n = ⎢⎢ ⎥⎥ + n = ⎢⎢ ⎥⎥
⎢⎣ 0 ⎥⎦ 0
⎣⎢ ⎦⎥

x
0 b A
⎡0⎤
n = ⎢⎢ ⎥⎥
−1
⎣⎢ ⎦⎥
Figure 6.3: Domain used for illustration of divergence theorem

The unit normal vectors for the four sides are shown in Figure 6.3 and their numerical
values are given. We need to verify Eq. (6.11) for these fields, i.e.

∫∇ ∫v q
T T
qd Ω = nd Γ
Ω Γ

We first evaluate the left hand side:


∂qx ∂q y ∂ (xy 2 )
∇T q = + = = y2
∂x ∂y ∂x

b ⎛h ⎞ b h
⎡y 3 ⎤ h3
b
bh 3
⎜⎜ y 2dy ⎟⎟dx =
∫ ∫ ⎜⎜ ∫ ∫ ⎢ ⎥ dx = ∫
T
∇ qd Ω = ⎟ dx =
⎝0 ⎠⎟ ⎢⎣ 3 ⎥⎦ 0 3 3
Ω 0 0 0

Next we proceed with the right hand side:

⎡nx ⎤
qT n = ⎡⎢qx qy ⎤⎥ ⎢n ⎥ = qx nx
⎣ ⎦ ⎢⎣ y ⎥⎦

∫v q ∫q Γ + ∫ qNx nNx dNΓ + ∫ qx nNx dNΓ + ∫ qNx nNx dN


T
nd Γ = x nNx dN Γ
Γ OA 0 dx AB by 2 dy 1 −dx BC 0 −dy CO Oy 2 −1

h h
⎡y 3 ⎤ bh 3
= ∫ by dy = b ⎢ ⎥ =
2
⎢⎣ 3 ⎦⎥ 0 3
0

Thus we have verified the theorem for this example.

7
Example 6.2
Given the vector field q x = 3x 2y + y 3 , qy = 3x + y 3 on the domain as shown
in Figure 7-4. Verify the divergence theorem.
y

C
(0,1) n2

n3
B
A x
(2,0)
n1
Figure 6.4: Triangular problem domain used for illustration of divergence theorem

∂q x ∂q
∇T q = + y = 6xy + 3y 2
∂x ∂y
2⎡
(6xy + 3y 2 )dy ⎤⎥dx =
1−0.5x 2
⎡3x (1 − 0.5x )2 + (1 − 0.5x )3 ⎤dx = 1.5
∫ ∇T qd Ω = ∫ ⎢ ∫
0 ⎣ 0 ⎦ ∫ 0
⎢⎣ ⎥⎦

1) Boundary integral on AB:


⎡0⎤
n1 = ⎢⎢ ⎥⎥ ; d Γ = dx ; y=0
⎢⎣−1⎥⎦
⎡0⎤ 2
⎡q qy ⎤⎥ ⎢⎢ ⎥⎥ d Γ =
∫ qT nd Γ = ∫ ⎢⎣ x ⎦ ⎢−1⎥ ∫ −3xdx = −6
AB AB ⎣ ⎦ 0

2) Boundary integral on BC:

The equation for line BC is: y = 1 − 0.5x ;

5 ⎡1⎤ 5
n2 = ⎢ ⎥; dΓ = − dx ; y = 1 − 0.5x
5 ⎢2 ⎥ 2
⎣⎢ ⎦⎥

5 ⎡⎢1⎤⎥
0
⎡q 1
∫q
T
ndL = ∫ ⎢⎣ x qy ⎤⎥ dL = ∫ − 2 ⎡⎣⎢(3x
2
+ y 3 ) + 2 (3x + y 3 )⎤⎦⎥ dx = 7.75
⎦ 5 ⎢⎢2⎥⎥
BC AB ⎣ ⎦ 2

8
3) Boundary integral on CA:
⎡−1⎤
n 3 = ⎢⎢ ⎥⎥ d Γ = −dy x =0
⎢⎣ 0 ⎦⎥
⎡−1⎤ 0
⎡q qy ⎤⎥ ⎢⎢ ⎥⎥ dL =
∫q ∫ ∫ y dy = −0.25
T 3
nd Γ = ⎢⎣ x ⎦⎢ 0 ⎥
BC AB ⎣ ⎦ 1

Therefore,

∫v q ∫q nd Γ + ∫ qT nd Γ + ∫ qT nd Γ = −6 + 7.75 − 0.25 = 1.5


T T
nd Γ =
Γ AB BC CA

∫ div qd Ω = ∫v q
T
and nd Γ
Ω Γ

The divergence theorem is verified.

6.2 Strong Form


To construct the Strong Form we will start with the derivation of the energy balance
equation on the infinitesimal area. The Strong Form will be completed by stating the
generalized Fourier law and the boundary conditions. Finally, the Weak Form will be
formulated by applying the Green-Gauss theorem (equivalent to the integration by parts
in 1D) to the Strong Form.

Consider a plate with varying thickness t as shown in Figure 6.5a. The heat
source Q is applied per unit area of the plate.

q
n +y
y qy (x , y + )
2

qn
∆y ∆y O(x , y )
∆x
+x +x
q x (x − , y) q x (x + , y)
2 ∆x 2
Q
x +y
qy (x , y − )
2
(a) (b)
Figure 6.5: Problem definition. (a) domain of the plate, (b) heat fluxes in the infinitesimal element

9
The energy entering or exiting the plate is obtained by integrating heat source over the
infinitesimal domain (area in 2D) of the plate and the heat flux on the boundary. The
energy is positive if it enters the plate. The flux vector q can be decomposed into two
components: tangential qt and normal qn to the boundary

⎡qn ⎤
q = ⎢q ⎥
⎢⎣ t ⎥⎦
The tangential component, qt does not contribute to the flux entering or exiting the plate.
The normal component, qn is given as

qn = qT n = qx nx + qy ny
where
⎡qx ⎤ ⎡nx ⎤
q = ⎢q ⎥ , n = ⎢n ⎥ , nx2 + ny2 = 1
⎢⎣ y ⎥⎦ ⎢⎣ y ⎥⎦

On the infinitesimal volume depicted in Figure 5b only normal components of flux


contributing to the heat balance equation are shown. Assuming steady state problem
where the temperature, and hence the heat energy, in the domain does not change with
time, the heat balance equation on the infinitesimal volume is given by

+x +x +x +x
qx (x − , y )t(x − , y )+y − qx (x + , y )t(x + , y )+y
2 2 2 2
+y +y +y +y
+qy (x , y − )t(x , y − )+x − qy (x , y + )t(x , y + )+x + Q(x , y )t(x , y )+x +y = 0
2 2 2 2

Dividing the above by +x +y and recalling the definition of the partial derivative

+x +x +x +x
qx (x + , y )t(x + , y ) − q x (x − , y )t(x − , y ) ∂ (tq )
lim 2 2 2 2 = x
+x →0 +x ∂x
+y +y +y +y
qy (x , y + )t(x , y + ) − qy (x , y − )t(x , y − ) ∂ (tq )
lim 2 2 2 2 = y
+y → 0 +x ∂y

which yields the balance equation in the matrix form:

∇T (tq ) − Q = 0 (6.18)

Recall that the constitutive equation (Fourier’s Law for heat conduction problems)
dT
in one-dimension is: q = −k = −k ∇T . In two dimensions, we have two flux
dx
components and two temperature gradient components:

10
⎡ ∂T ⎤
⎢ ⎥
⎡qx ⎤ ⎢ ∂x ⎥
q= q ⎥
⎢ ∇T = ⎢ ⎥
⎢⎣ y ⎥⎦ ⎢ ∂T ⎥
⎢ ⎥
⎣⎢ ∂y ⎦⎥

The flux and temperature gradient vectors are related by the generalized Fourier’s law:

⎡ ∂T ⎤
⎡qx ⎤ ⎡kxx kxy ⎤ ⎢⎢ ∂x ⎥⎥
⎢ ⎥ = −⎢ ⎥⎢ ⎥
⎢⎣qy ⎥⎦ ⎢k kyy ⎥⎥ ⎢ ∂T ⎥
⎣⎢ yx ⎦⎢ ⎥
⎣⎢ ∂y ⎦⎥
or
q = −D∇T (6.19)

where D is the constitutive matrix (positive definite) or generalized Fourier’s matrix.


The minus sign in (6.19) reflects the fact that the gradient of temperature vector points
from low to high temperature, whereas the heat flows in the opposite direction.

Substituting the constitutive equation into the balance equation yields:

∇T (tD∇T ) + Q = 0

For isotropic materials the constitutive tensor is given by

⎡k 0⎤
D = ⎢⎢ ⎥ = kI

0 k
⎣⎢ ⎥⎦

Assuming that both t and k are constant gives

⎡ ∂ ⎛ ∂T ⎞ ⎛ ⎞⎤
∇T (tD∇T ) = tk ⎢ ⎜⎜ ⎟ + ∂ ⎜⎜ ∂T ⎟⎟⎥ = −Q
⎟ (6.20)
⎢ ∂x ⎝ ∂x ⎠⎟ ∂y ⎜⎝ ∂y ⎠⎟⎥
⎣ ⎦

For a problem with constant thermal isotropic conductivity and constant thickness, the
heat balance equation becomes the Laplacian equation:

Q ∂ 2T ∂2T Q
∇2T + = + + =0 (6.21)
tk ∂x 2 ∂y 2 tk

To solve the partial differential equation we have to set up the boundary conditions as
shown in Fig. 6.6. As can be seen, the boundary consists on a prescribed temperature
boundary and a prescribed lux boundary, which are denoted by ΓT and Γ q , respectively.
We write the prescribed temperature boundary condition as

11
T ( x, y ) = T ( x, y ) on ΓT (6.22)

where T ( x, y ) is the prescribed temperature; as indicated, the prescribed temperature


along the boundary can be a function of the spatial coordinates. We will see that these
are the essential boundary conditions.

On a prescribed flux boundary, only the normal flux can be prescribed. The normal flux
is the proportional to the gradient of the temperature in the normal direction, i.e. it is
proportional to nT ∇T , i.e. for an isotropic conductivity

qn = − knT ∇T

So for an isotropic material, we can write the prescribed flux condition as

qn = − knT ∇T = qn on Γ q (6.23)

Note that the above boundary condition involves the derivatives of the temperature, so
these are the natural boundary conditions.

As in the one-dimensional case, we cannot prescribe both the temperature and the normal
flux at the same point of the boundary, and furthermore, on any point of the boundary,
either the normal flux or the temperature must be prescribed. We write this in the same
form as (6.28)in Chapter 3.3.

ΓT ∪ Γ q = Γ and ΓT ∩ Γ q = 0 (6.24)

y
q n = qT n = q on Γq

Γ = ΓT + Γq

T = T on ΓT
x
Figure 6.6: Problem domain and boundary conditions

The resulting Strong Form for the heat conduction problem in 2-D is stated as follows:

12
find T on Ω such that :
∇T (tD∇T ) + Q = 0 on Ω
(6.25)
qn = qT n = q on Γq
T = T on ΓT

Q, D,T , q are the input data for the problem. These, along with the geometry of the
domain Ω must be input to the finite element program.

6.3 Weak Form


To obtain the Weak Form we follow the same steps as for the one-dimensional problem
in Chapter 3. In order to simplify the algebra, we start with the strong form of the energy
balance equation expressed in terms of the flux q rather than Eq. (6.26)a. Note that Eq.
(6.25) is just a special case of the energy balance equation for a material that obeys the
Fourier law (6.19). Eq. (6.18) holds for any material, including materials that have more
complicated nonlinear laws relating the heat flux to the temperature. We can get the
weak form for the particular case we are considering by then substituting the Fourier law
for the flux into the weak form. Problem 6.4 illustrates this approach for one-
dimensional heat conduction to assure you that the approach is equivalent.
We first multiply the Strong Form, Eq. (6.18) by a weight function w and integrate over
the problem domain Ω and state that

∫ w∇ (tq )d Ω − ∫ wQd Ω = 0
T
∀w (6.27)
Ω Ω
It is crucial in the equivalence of the strong and weak forms that the weak form holds for
all functions w. As in one dimension, we will find that there are some condtions on the
weigt function, but we will develop these as we need them. Applying the Green - Gauss
theorem to the first term in Eq.(6.27) yields

∫ w∇ ∫v wtq nd Γ − ∫ (∇w ) qtd Ω


T
T
(tq )d Ω = T
∀w (6.28)
Ω Γ Ω

Inserting Eq.(6.28) into Eq.(6.27) yields:

∫ (∇w ) ∫v wtq − ∫ wQd Ω


T T
qtd Ω = nd Γ (6.29)


Ω 

Γ Ω
T
∫ (∇w ) ∫ wqtd Γ+ ∫ w tq
T
(−D∇T )tdΩ nd Γ
Ω Γq ΓT

We now subdivide the first integral on the RHS of (6.29) into the prescribed temperature
and prescribed flux boundaries, which is permissible because of (6.24):

13
∫v wtq ∫ +wtq nd Γ + ∫ +wtqT nd Γ
T T
nd Γ =
Γ ΓT ΓT

where we have replaced the flux on the natural boundary by its prescribed value. Since
the fux on the prescribed temperature boundary is not known, the resulting Weak Form in
2-D can be summarized as follows:

find T ∈ U on Ω such that:

∫ (∇w ) tD∇Td Ω = −∫ wqtd Γ + ∫ wQd Ω


T
∀w ∈ U 0 (6.30)
Ω Γq Ω

The definition of spaces U and U 0 in Eq. (6.30) is similar to that define in Chapter 3
for one-dimensional problems. The approximation and weight functions have to be
C 0 continuous so that the integral on the left hand side of Eq. (6.30) would be bounded.
The approximation functions have to satify essential boundary conditions, whereas the
weight functions have to vanish on essential boundary conditions.

6.4 The Equivalence between Weak and Strong Forms


In Section 7.2 we constructed the Weak Form from the Strong Form. To complete the
proof of equivalence between the two forms, it remains to show that the Weak Form
implies the Strong Form. This procedure is similar to the one used in Chapter 3.3.5 for
showing equivalence for one dimensional problems.

Let T be the solution of the Weak Form Eq. (6.30) and apply integration by parts to the
left hand side of Eq.(6.30), which gives that for all ∀w ∈ U 0

∫ w (−∇ (tq ) + Q )d Ω + ∫ w (q − qT n) td Γ = 0
T
(6.31)
Ω ΓT

Since the weight function w(x ) is arbitrary, it can be assumed to be in the form of

First, we define
⎡0 on Γ⎤
w = ψ(x ) (−∇T (tq ) + Q ) where ψ = ⎢⎢ ⎥ (6.32)
⎢⎣> 0 on Ω⎥⎥

Inserting Eq. (6.32) into Eq. (6.31) yields:

2
∫ ψ (−∇ (tq ) + Q ) d Ω = 0
T
(6.33)

Eq. (6.33) is positive at every point in the domain. For the integral in Eq. (6.33) to vanish
the integrand has to be zero. Hence

14
−∇T (tq ) + Q on Ω (6.34)

which recovers the Strong Form Eq. (6.18). Now after substituting Eq. (6.34) into Eq.
(6.31) and selecting select the weight function

w Γσ ≠ 0

yields the missing natural boundary condition (6.25)b

qT n = q on Γq

Problems Chapter 6
2
Problem 6-1: Given the vector field q x = −y , qy = −2xy on the domain shown in Fig.
6.4, verify the divergence theorem for this case.

2 3 3
Problem 6-2: Given vector field q x = 3x y + y , qy = 3x + y on the domain shown in
Fig 6.5, verify the divergence theorem. The curved upper boundary of the domain is
parabola.

(0,4)
n2

x
(-2,0) (2,0)
n1

Figure 6.5: Parabolic problem domain used for illustration of divergence theorem

Problem 6-3: Using Green-Gauss theorem show:

(a) ∫ ∇φd Ω = ∫v φnd Γ


Ω Γ

(b) ∫v nd Γ = 0
Γ

15
⎡ 1⎤ ⎡ 0⎤
Hint: In (a) first assume q = ⎢ ⎥ q = ⎢ ⎥ . Combine the two results.
⎢0⎥ and then repeat with ⎢ 1⎥
⎣⎢ ⎦⎥ ⎣⎢ ⎥⎦
Problem 6-4: Starting with the strong form

dq
+Q = 0 q ( 0) = q T (l ) = T
dx
develop a weak form. Note that the flux q is related to the temperature through Fourier’
law, but develop the weak form first in terms of the flux.

16
Chapter

7 Trial and Weight Functions


for two dimensional problems

In Chapter 6 we derived the weak form for heat conduction problem. The weak form for
the vector field elasticity problem is derived in Chapter 11. To solve for the unknown
trial function (temperature or displacements) Chapert 7 focusses on approximating the
trial and weight functions. A similar procedure was used in Chapter 4 for one-
dimensional problems. Folloing the nomenclature introduced in Chapter 4, we will
denote an arbitrary trial function by θ(x , y ) .
We have already noted, the situation in multidimensions is altogether different
since the exact solution is possible for problems on simple domains and boundary
conditions, and thus numerical solution for practical problems is the only alternative. The
ultimate goal remains the same: develop an approximation functions so that the more
elements are used the better quality of the solution is obtained. In the limit as h → 0 (h
being the element size) or the polyniomial order is increased the FE solution converges to
the exact solution. For the one-dimensional problems discussed in Chapter 4, the finite
element approximation had to be constructed in such a way so that the polynomial
expansion for each element is complete and the trial solution (temperature,
displacements, etc.) is C 0 continuous or compatible between the elements.
In multidimensions, these requirements remain the same, but the choice of trial
functions presents several challenges. To fix ideas consider a simple problem domain
shown in Figure 7.1. The domain is subdivided (meshed) into triangular subdomains,
which is one of the finite elements to be considered in this Chapter, as shown in Figure
7.2. The solution is then approximated on each element separately.We start with the
issue of completeness.
C
B

A
Figure 7.1: Triangular plate domain

h h h

Figure 7.2: Various finite element meshes

Consider the following possible polynomial expansions:

T = α1 + α2x + α3y
T = α1 + α2x + α3y + α4xy + α5x 2 + α6x 3y
T = α1 + α2x + α3y + α4x 2y 2 + α5xy + α6y 3

Which of the three is a useful polynomial polynomial expansion to be considered in the


finite element approximations? The answer is given by the Pascal triangle shown in
Figure 7.3

1
x y
x2 xy y2
x3 x 2y xy 2 y2

Figure 7.3: Pascal Triangle in 2D

2
Complete polynomial expansions, based on the Pascal Triangle are as follows:

In 1-D:
linear θe (x ) = α0e + α1e x
quadratic θe (x ) = α0e + α1e x + α2e x 2
cubic θe (x ) = α0e + α1e x + α2e x 2 + α3e x 3

In 2-D:

linear θe (x ) = αe0 + α1e x + α2ey


quadratic θe (x ) = αe0 + α1e x + α2ey + αe3x 2 + αe4xy + α5ey 2
cubic θe (x ) = αe0 + α1e x + α2ey + αe3x 2 + αe4xy + α5ey 2 + α6e x 3 + α7e x 2y + αe8y 2x + α9ey 3

To clarify the concept of compatibility consider two adjacent elements shown in Figure
7.4 approximated with a linear complete polunomial expansion:

θ1 = α01 + α11x + α21y


θ 2 = α02 + α12x + α22y
y

1 2

Γ12

x
2
Figure 7.4: Compatibility between two linear triangular elements

The compatibility at the interface is guaranteed if the trial function is C 0 continuous at


every point at the interface (not just at the nodes):

θ1 (Γ12 ) = θ 2 (Γ12 )

which suggests that α01, α11, α21, α02 , α12 , α22 have to be carefully chosen to satisfy
compatibility. In the following we describe how to select both complete and compatible

3
approximations for traiangular and quadrilateral elements starting with a three-node
triangular element.

7.1 Three-node triangular element

The solution for the triangular element is approximated using complete linear field

θe (x ) = αe0 + α1e x + α2ey

To satisfy the compatibility we express nodal values


θe (x 1e , y1e ) = d1e , θe (x 2e , y2e ) = d2e , θe (x 3e , y 3e ) = d3e in terms of parameters (αe0 , α1e , α2e )
⎡αe ⎤
⎢ 0⎥
⎡ ⎤ ⎢ ⎥
θ = α0 + α1 x + α2y = ⎢1 x y ⎥ ⎢α1e ⎥ = Pαe
e e e e


⎦ ⎢ e ⎥
P(x ,y ) ⎢α ⎥
⎣⎢N2⎥

αe

d1e = α0e + α1e x 1e + α2ey1e ⎡d e ⎤ ⎡1 x e y e ⎤ ⎡αe ⎤


⎢ 1⎥ ⎢ 1 1⎥ ⎢ 0⎥
⎢ e⎥ ⎢ ⎥⎢ ⎥
d2e = α0e + α1e x 2e + α2ey2e ⇒ ⎢d2 ⎥ = ⎢1 x 2 y2e ⎥ ⎢α1e ⎥
e

⎢ ⎥ ⎢ ⎥⎢ ⎥
e e
d =α +α x +α y e e e e ⎢d e ⎥ ⎢1 x e y e ⎥ ⎢αe ⎥
3 0 1 3 2 3 ⎢⎣N3⎥
⎦ ⎢⎣
3 3⎥ ⎢ 2⎥

⎦ N
⎣ ⎦
de Ce αe
The inverse relation is given

α e = C −1 d e θ e = PC e −1 e

d
e
N
The resulting shape functions are defined as:

Ne = PCe −1 = ⎡⎢N 1e N 2e N 3e ⎤⎥
⎣ ⎦

where
1
e ( 2 3
N 1e = x ey e − x 3ey2e + (y2e − y 3e ) x + (x 3e − x 2e ) y )
2A

1
e ( 3 1
N 2e = x ey e − x 1ey 3e + (y 3e − y1e ) x + (x 1e − x 3e ) y )
2A

1
e ( 1 2
N 3e = x ey e − x 2ey1e + (y1e − y2e ) x + (x 2e − x 1e ) y )
2A

and Ae is the area of the triangular element given by

4
2Ae = (x 2ey 3e − x 3ey2e ) − (x 1ey 3e − x 3ey1e ) + (x 1ey2e − x 2ey1e )

The Graphical Illustration of shape functionsis given in Figure 7.5.

N ie y N ej N ke y
y
1 1
1
3 2 3 2 3 2
1 x 1 1 x
x
Figure 7.5: Three-node tringular element shape functions

To verify if the interlement compatibility is satisfied we express the trial function in term
of the global nodal trial function vector. For illustration consider a two-element domain
shown in Figure 7.6.
y
3

1
1 (x 21, y21 )
2 1
K 3
2
2 L
1 2 2
I 2 (x 2 , y2 )
J (xJ , yJ )
x
Figure 7.6: Local and global node numbering

The element trial function vectors can be expressed in terms of the global nodal
trial function vector as follows:

⎡ dI ⎤
⎡d 1 ⎤ ⎡ d ⎤ ⎡ ⎤ ⎢ ⎥
⎢ 1⎥ ⎢ I ⎥ ⎢ 1 0 0 0 ⎥ ⎢d ⎥
⎢ ⎥ ⎢ ⎥ ⎢ ⎥⎢ J⎥
d1 = ⎢d21 ⎥ = ⎢dJ ⎥ = ⎢ 0 1 0 0⎥ ⎢ ⎥ = L1d
⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢d ⎥
⎢ 1 ⎥ ⎢d ⎥ ⎢ 0 0 1 0⎥ ⎢ K ⎥
⎢⎣d3 ⎥⎦ ⎣⎢ K ⎦⎥ ⎢⎣ ⎥⎦ ⎢d ⎥
⎢⎣NL⎥

d

5
⎡ dI ⎤
⎡d 2 ⎤ ⎡d ⎤ ⎡ ⎤ ⎢ ⎥
⎢ 1⎥ ⎢ K⎥ ⎢ 0 0 1 0 ⎥ ⎢d ⎥
⎢ ⎥ ⎢ ⎥ ⎢ ⎥⎢ J⎥
d2 = ⎢d22 ⎥ = ⎢ dJ ⎥ = ⎢ 0 1 0 0⎥ ⎢ ⎥ = L2 d
⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢d ⎥
⎢ 2 ⎥ ⎢ d ⎥ ⎢ 0 0 0 1⎥ ⎢ K ⎥
d
⎣⎢ 3 ⎦⎥ ⎣⎢ ⎥⎦ ⎣⎢
L ⎥⎦ ⎢d ⎥
⎢⎣N L⎥

d
or in general:
θe = Ne de = Ne Le d

The resulting temperature field in element 1 is


⎡1 0 0 0⎤⎥

⎡ 1⎤ ⎢ ⎥
1 1 1 1 1
θ = N L d = ⎢N 1 N 2 N 3 ⎥ ⎢ 0 1 0 0⎥ d = ⎡⎢N 11 N 21 N 31 0⎤⎥ d
⎣ ⎦⎢ ⎥ ⎣ ⎦
⎢0 0 1 0⎥⎥
⎣⎢ ⎦
and in element 2 is
⎡0 0 1 0⎤⎥

⎡ 2⎤ ⎢ ⎥
2
θ = N 2 2
L d 2 2
= ⎢N 1 N 2 N 3 ⎥ ⎢ 0 1 0 0⎥ d = ⎡⎢ 0 N 22 N 12 N 32 ⎤⎥ d
⎣ ⎦⎢ ⎥ ⎣ ⎦
⎢0 0 ⎥
0 1⎥
⎣⎢ ⎦

The trail function at the interface between the two elements is

θ1 (ΓKJ ) = ⎡⎢N 11 (ΓKJ ) N 21 (ΓKJ ) N 31 (ΓKJ ) 0⎤⎥ d


⎣ ⎦
θ 2 (ΓKJ ) = ⎡⎢ 0 N 22 (ΓKJ ) N 12 (ΓKJ ) N 32 (ΓKJ )⎤⎥ d
⎣ ⎦

Figure 7.7 shows that: N 11 (ΓKJ ) = N 32 (ΓKJ ) = 0 ; N 21 (ΓKJ ) = N 22 (ΓKJ ) ;


N 31 (ΓKJ ) = N 12 (ΓKJ ) , and thus: θ1 (ΓKJ ) = θ 2 (ΓKJ ) = 0 .

6
1 N k1(Γkj )

1 3 (K) 3 (K) N j1(Γkj )


3 (K)
1 N i1(Γkj ) 1
1
1 1 1
1
2 (J) 2 (J) 2 (J)
N i1 N j1 N k1
1
3 3
1 3
(k) 2 (k)
(k) 2 1 2
1 1 1
N j2 (Γkj ) N k2 (Γkj )
N i2 (Γkj ) 2 (J) 2 (J) 2 (J)
2
N i2 N j N k2
Figure 7.7: Interelement compatibility

The gradient of the trial function is computed by appropriate differentiation

⎡ ∂θ ⎤ ⎡ ∂N 1e e ∂N 2e e ∂N 3e e ⎤
⎢ ⎥ ⎢ d + d2 + d3 ⎥
⎢ ∂x ⎥ ⎢ ∂ x 1 ∂x ∂x ⎥
∇θ = ⎢ ⎥ = ⎢ e e e ⎥
⎢ ∂θ ⎥ ⎢ ∂N 1 d e + ∂N 2 d e + ∂N 3 d e ⎥
⎢ ⎥ ⎢ 1 2 3⎥
⎢⎣ ∂y ⎥⎦ ⎢⎣ ∂y ∂y ∂y ⎥⎦
⎡ ∂N 1 ∂N 2 ∂N 3 ⎤ ⎡d e ⎤
e e e
⎢ ⎥⎢ 1⎥
⎢ ∂x ∂x ∂x ⎥ ⎢ e ⎥ e e
=⎢ e e e ⎥ ⎢d2 ⎥ = B d
⎢ ∂N 1 ∂N 2 ∂ N 3 ⎥ ⎢ ⎥
⎢ ⎥ ⎢ e⎥
⎢⎣ ∂y ∂y ∂y ⎥⎦ ⎢⎣d3 ⎥⎦

N
Be de
where the B-matrix is given by:

⎛ e e ⎞
1 ⎜⎜(y2 − y 3 ) (y 3 − y1 ) (y1 − y2 )⎟⎟
e e e e
e
B = ⎜ ⎟
2Ae ⎜⎜⎝(x 3e − x 2e ) (x 1e − x 3e ) (x 2e − x 1e )⎠⎟⎟

7.2 Four node quadrilateral element


We next consider a 4-node quadrilateral element element as shown in Figure 7.8.

7
e e
3 (x 3 , y 3 )
e e
y 4 (x 4 , y 4 )

e e e e
1 (x 1 , y1 ) 2 (x 2 , y2 )

Figure 7.8: 4-node quadrilateral element

The 4-node element polynomial expansion consists of four polynomial terms


(equal to the number of element nodes) and it represents an incomplete quadratic
expansion. The bilinear term ( xy ) is selected due to symmetry

θe = α0e + α1e x + α2ey + αe3xy

Following the procedure described in Section 8.1 in principle it is possible to


express (α1, α2 , α3 , α4 ) in terms of nodal values of trial function (d1e , d2e , d 3e , d 4e ) . This
would require a symbolic inversion of 4 × 4 C matrix. Unlike in the case of the 3-node
triangular element described in the previous section, a close form symbolic inversion is
very cumbersome and gives rise to very complex expression of the shape functions.

Therefore, we will employ a different approach by which the element is mapped


into so-called natural coordinate system where the functions can be constructed directly.
By mapping we understand here a unique, one-to-one relationship between element
coordinates in the cartesian coordinate system (x , y ) and natural coordinate system (t, r )
as illustrated in Figure 7.9. A mapping is usually described in terms of some functional
relationship between the two coordinate systems which can be generally expressed as

x = x (t, r )
(7.1)
y = y(t, r )

8
r
3 +1
y
4
x = x (t, r )-1 +1
y = y(t, r ) t

1 2
-1
x

Figure 7.9: A general Mapping from Natural to Global Cartesian coordinate system

One of the adavatages of this approach is that the shape functions Ne can be
constructed directly in the natural coordinate system by exploiting the fundamental
property of shape functions, i.e.:
⎡1 i = j ⎤
N ie (t j , rj ) = ⎢⎢ ⎥

⎢⎣ 0 i ≠ j ⎥⎦
In this Section attention is restricted to quadrilateral element that has staright
edges as shown in Figure 7.8. We start by constructing one-dimensional shape functions
of the two node element corresponding to the edges of the square in the natural
coordinate system. The two dimensional shape functions will then be obtained as a
product of one-dimensional shape functions as shown in Figure 7.10. Both the 1D and the
resulting 2D shape functions are summarized in the Table 7.1.

N ie
r

r3 = r4 = +1 4 +1 3

-1 +1 t
N 2e (r )
r1 = r2 = −1 1 -1 2
N 2e (t ) N 1e (r )

N 1e (t )

t1 = t4 = −1 t2 = t 3 = 1
Figure 7.10: Construction of two-dimensional shape functions

9
Node N 1e (t ) N 2e (t ) N 1e (r ) N 2e (r ) N ie (t, r )
1 1 0 1 0 N 1e (t )N 1e (r )
2 0 1 1 0 N 2e (t )N 1e (r )
3 0 1 0 1 N 2e (t )N 2e (r )
4 1 0 0 1 N 1e (t )N 2e (r )
Table 7.1: Shape function construction table

From the Table 7.1 it can be seen that the two-dimensional shape functions satisfy the
fundamental property of shape functions. The two-dimensional shape functions are
summarized below

t − t2 r − r4 1
N 1e (t, r ) = = (1 − t )(1 − r )
t1 − t2 r1 − r4 4
t − t1 r − r4 1
N 2e (t, r ) = = (1 + t )(1 − r )
t2 − t1 r1 − r4 4
(7.2)
t − t1 r − r1 1
N 3e (t, r ) = = (1 + t )(1 + r )
t2 − t1 r4 − r1 4
t − t2 r − r1 1
N 4e (t, r ) = = (1 − t )(1 + r )
t1 − t2 r4 − r1 4

The Graphical Illustration of shape functions is given in Figure 7.11.

4 3 4 3

1 2 1 2
N e N 2e
1

4 3 4
3

2 1 2
e
N e
3
N 4

Figure 7.11: Graphical illustration of shape functions

10
7.2.1 Compatibility
To investigate compatibility of trial solution consider a two-element problem in Figure
7.12.
y
local
4 3
1
1 2 4 3
N M 2
L
1 2
1 2

I J K
x
Figure 7.12: Global and local node numbering

We start by expressing the element temperature in terms of the global nodal trial vector:
⎡ dI ⎤
⎢ ⎥
⎡d1 ⎤ ⎡ d ⎤ ⎡1 0 0 0 0 0⎤ ⎢ d ⎥
1
⎢ ⎥ I
⎥ ⎢⎢ J ⎥⎥
⎢ 1 ⎥ ⎢⎢ ⎥⎥ ⎢⎢ ⎥
⎢d2 ⎥ ⎢ dJ ⎥ ⎢ 0 1 0 0 0 0⎥ ⎢dK ⎥
d1 = ⎢ 1 ⎥ = ⎢ ⎥ = ⎢ ⎢ ⎥ = L1d
⎢d ⎥ ⎢dM ⎥ ⎢ 0 0 0 0 1 0⎥⎥ ⎢ dL ⎥
⎢ 3⎥ ⎢ ⎥
⎢ 1 ⎥ ⎢⎢d ⎥⎥ ⎢⎢ 0 0 0 0 0 1⎥⎥ ⎢d ⎥
⎢d ⎥ ⎦ ⎢⎢ M ⎥⎥
⎣ 4 ⎦ ⎣⎢ ⎦⎥ ⎣
N

⎢TN ⎥
⎣ ⎦
θ1 = N1d1 = N1L1d = ⎡⎢N 11 N 21 0 0 N 31 N 41 ⎤⎥ d
⎣ ⎦

The temperature field from element 1 at the interface is given by:

θ1 (ΓJM ) = ⎡⎢N 11 (ΓJM ) N 21 (ΓJM ) 0 0 N 31 (ΓJM ) N 41 (ΓJM )⎤⎥ d


⎣ ⎦

We repeat the same calculations for element 2:

11
⎡d ⎤
⎢ I⎥
⎡d 2 ⎤ 0⎤ ⎢⎢ dJ ⎥⎥
⎢ 1 ⎥ ⎢⎡ dJ ⎥⎤ ⎢⎡ 0 1 0 0 0
⎥⎢ ⎥
⎢ 2⎥
⎢d2 ⎥ ⎢⎢dK ⎥⎥ ⎢⎢ 0 0 1 0 0 0⎥⎥ ⎢dK ⎥
d = ⎢ 2⎥ = ⎢ ⎥ = ⎢
2
⎥ ⎢⎢ ⎥⎥ = L d
2
⎢ ⎥ d 0 0 0 1 0 0⎥ d L
⎢d3 ⎥ ⎢⎢ L ⎥⎥ ⎢⎢ ⎥ ⎢⎢ ⎥⎥
⎢ ⎥
⎢d42 ⎥ ⎢⎣⎢dM ⎥⎦⎥ ⎣⎢ 0 0 0 0 1 0⎥ ⎢dM ⎥
⎦⎢ ⎥
⎣ ⎦
⎢dN ⎥
⎣ ⎦
θ 2 = N2 d2 = N2 L2 d = ⎡⎢0 N 12 N 22 N 3 N 42 0⎤⎥ d
2
⎣ ⎦

The temperature field of element 2 at the interface is:

θ 2 (ΓJM ) = ⎡⎢0 N 12 (ΓJM ) N 22 (ΓJM ) N 32 (ΓJM ) N 42 (ΓJM ) 0⎤⎥ d


⎣ ⎦

Since the following holds

N 11 (ΓJM ) = N 31 (ΓJM ) = N 22 (ΓJM ) = N 42 (ΓJM ) = 0


N 21 (ΓJM ) = N 12 (ΓJM ) N 41 (ΓJM ) = N 32 (ΓJM )

the formulation is compatible.

7.2.2. Coordinates mapping


Eq. (7.1) indicates a general mapping from natural coordinate system to a global catesian
system. It is advantageous, however, to exploit shape functions in constructing mapping
functions.
x e (t, r ) = Ne xe
(7.3)
y e (t, r ) = Ne ye

where xe and ye are vectors of nodal x and y coordinates. For quadrilaterals having
straight edges the shape functions in Eq. (7.3) are identical to those given in Eq. (7.2).
Such a formulation that uses identical set of shape function for both the trial solution
and the coordinates interpolation is called isoparatmetric formulation.

7.2.3 Derivatives of shape functions


The gradient of trial function for the 4-node rectangular element can be expressed as

∇θ = Be de (7.4)

where

12
⎡ ∂N 1e ∂N 2e ∂N 3e ∂N 4e ⎤
⎢ ⎥
e ⎢ ∂x ∂x ∂x ∂x ⎥
B =⎢ e ⎥
⎢ ∂N 1 ∂N 2e ∂N 3e ∂N 4e ⎥
⎢ ⎥
⎣⎢ ∂y ∂y ∂y ∂y ⎥⎦

To obtain the derivatives of shape functions expressed in natural coordinates with respect
to the (x , y ) coordinates we will need to exploit the chain rule

∂N ie ∂N ie ∂x ∂N ie ∂y
= +
∂t ∂x ∂t ∂y ∂t
e
∂N i ∂N ie ∂x ∂N ie ∂y
= +
∂r ∂x ∂r ∂y ∂r

The required derivatives can be obtained by inversion as

⎡ ∂N e ⎤ ⎡ ∂N e ⎤ ⎡ ∂x ∂y ⎤
⎢ i⎥ ⎢ i⎥ ⎢ ⎥
⎢ ∂x ⎥ -1 ⎢ ∂t ⎥ ⎢ ∂t ⎥
⎢ e⎥ = J ⎢ e ⎥, J = ⎢ ∂t ⎥ (7.5)

⎢ i⎥ N ⎢ ∂N i ⎥ ⎢ ∂x ∂y ⎥
⎢ ⎥ ⎢ ⎥ ⎢ ⎥
⎣⎢ ∂y ⎦⎥ ⎣ ∂r ⎦ ⎣ ∂r ∂r ⎦

Exploiting the mapping (7.3) the Jacobian matrix can be computed as

⎡x 1e y1e ⎤
⎡ 4 ∂N ie e 4
∂N ie e ⎤ ⎡ ∂N 1e ∂N e
∂N e
∂N ⎢ e
e
⎤ ⎥
⎢∑ x ∑ yi ⎥ ⎢ ⎥ ⎢x y2e ⎥⎥
2 3 4
⎢ i =1 ∂t i i =1 ∂t
⎥ ⎢ ∂t ∂t ∂t ∂t ⎥ ⎢ 2
J=⎢ 4 ⎥=⎢ ⎥⎢ ⎥
⎢ ∂N ie e 4
∂ N i e ⎥ ⎢ ∂N 1
e e
∂N 2e ∂N 3e ∂N 4e ⎥ ⎢x e3 y e3 ⎥
⎢∑ x ∑ yi ⎥ ⎥⎢ ⎥
⎢⎣ i =1 ∂r i i =1 ∂r
⎥⎦ ⎢⎣ ∂r ∂r ∂r ∂ r ⎦ ⎢x e y e4 ⎥⎥
⎢⎣ 4 ⎦
For the mapping to be unique we will require that

det ( J) > 0 (7.6)


0
This requirement is fulfilled if all the angles in a quadrilateral are less than 180 (See
Problem 7-3).

7.3 Higher order quadrilateral elements


Similarly, the shape functions for higher order quadrilateral elements can be constructed
in the natural coordinate system using the fundamental property of shape functions. For
instance, the shape functions of 12-node qudrilateral element are illustrated in Figure 9-
13. The construction table is given in Table 7.2.

13
N ie
r

9 10 11 12
r =1

5 6 7 8 t
r =0

1 2 3 4
r = −1
N 1e (r ) N 2e (r ) N 3e (r )
N 1e (t )

N 2e (t )

N 3e (t )

N 4e (t )
t = −1 1 1 t =1
t =− t=
3 3
Figure 7.13: Construction of shape functions for 12-node quadrilateral element

Node N 1e (t ) N 2e (t ) N 3e (t ) N 4e (t ) N 1e (r ) N 2e (r ) N 3e (r ) N ie (x , y )
1 1 0 0 0 1 0 0 N 1e (t )N 1e (r )
2 0 1 0 0 1 0 0 N 2e (t )N 1e (r )
3 0 0 1 0 1 0 0 N 3e (t )N 1e (r )
4 0 0 0 1 1 0 0 N 4e (t )N 1e (r )
5 1 0 0 0 0 1 0 N 1e (t )N 2e (r )
6 0 1 0 0 0 1 0 N 2e (t )N 2e (r )
7 0 0 1 0 0 1 0 N 3e (t )N 2e (r )
8 0 0 0 1 0 1 0 N 4e (t )N 2e (r )
9 1 0 0 0 0 0 1 N 1e (t )N 3e (r )
10 0 1 0 0 0 0 1 N 2e (t )N 3e (r )
11 0 0 1 0 0 0 1 N 3e (t )N 3e (r )
12 0 0 0 1 0 0 1 N 4e (t )N 3e (r )
Table 7.2: Construction table for 12-node quadrilateral element

Problems Chapter 7

14
Problem 7-1: Given the 9-node rectangular element as shown below:
(i) Construct the element shape functions for 9-node element.
(ii) If the temperature field at nodes A and B is 1 unit and zero at all other nodes, what is
the temperature at x=y=1.
(iii) Consider the 3-node triangular element ABC located to the right of 9-node
rectangular element. Is the compatibility between 9-node rectangle and the three node
triangle exist? Explain.
y

A
y =2

y =1
B C
x
x =2 x =4 x =6

Problem 7-2: Consider two triangular elements as shown in the figure below:
If the exact temperature field is equal to x 2 , can the two elements represent the exact
solution? Explain.
y

2 3 (2,1)

1 4
x
Problem 7-3: Show that if one of the angles in a quadrilateral is greater than 1800 than the
det ( J) may not be positive.

15
Chapter

8 Finite element formulation for two


dimensional scalar field problems

In this Chapter we derive algebraic system of equations from the weak form derived in
Chapter 6. The Weak Form for the scalar field problem (for instance, heat conduction)
states:

find T (x , y ) ∈ U such that :


(8.1)
∫ (∇w ) tD∇Td Ω = −∫ wqtd Γ + ∫ wQd Ω ∀w ∈ U 0
T

Ω Γq Ω

where
⎡ ∂T ⎤
⎢ ⎥ ⎡kxx kxy ⎤
⎢ ∂x ⎥ ⎡qx ⎤
∇T = ⎢ ⎥ ; q = ⎢q ⎥ = −D∇T is the Fourier law; and D = ⎢⎢ ⎥ the

⎢ ∂T ⎥ ⎢⎣ y ⎥⎦ k k
⎢ ⎥ ⎢
⎣ xy yy ⎥

⎣⎢ ∂y ⎦⎥
conductivity matrix. We will consider the problem domain to be discretized with
triangular, quadrilateral or mixture of different types of elements as shown in Figure 8.1.
y
q = q on Γq

T = T on ΓT
x
Figure 8.1: Finite element model in two dimensions
The finite element approximation of the trial function (temperature in this case) is given
by:

T e = Ne d e = N 1eT1e + N 2eT2e + … = N e Le d

⎡ ∂T e ⎤ ⎡ ∂N 1e e ∂N 2e e ⎤ ⎡ ∂N 1e ∂N 2e ⎤
⎢ ⎥ ⎢ T + T2 + ⎥ ⎢ ⎥
⎢ ∂x ⎥ ⎢ ∂ x 1 ∂x ⎥ ⎢ ∂x ∂x ⎥ e
∇T = ⎢
e
e⎥ = ⎢ e e ⎥=⎢ e ⎥d
⎢ ∂T ⎥ ⎢ ∂ N 1 T e + ∂ N 2 T e + ⎥ ⎢ ∂N 1 ∂N 2e ⎥
⎢ ⎥ ⎢ 1 2 ⎥ ⎢ ⎥
⎢⎣ ∂y ⎥⎦ ⎢⎣ ∂y ∂y ⎥⎦ ⎢⎣ ∂y ∂y ⎥⎦

= Be d e = Be Le d (8.2)
⎡T e ⎤
⎢ 1⎥
⎢ ⎥
where d = ⎢T2e ⎥ .
e

⎢ ⎥
⎢ ⎥
⎣⎢ ⎦⎥

The weight functions are approximated using the same set of shape functions
T
w e = Ne we = weT NeT = (Le w ) NeT = wT LeT NeT

T T T
(∇w e ) = (Be we ) = w eT BeT = (Le w) BeT = wT LeT BeT (8.3)

We next divide the integration domain into the summation of integrals over the elements

⎛ ⎞⎟
nel
⎜⎜ ⎟
∑ ⎜
⎜Ω
e T
⎜ ∫ (∇w ) tD (∇T )d Ω + ∫ w qtd Γ − ∫ w Qd Ω⎟⎟ = 0
e e e

∀w ∈ U 0 (8.4)
e =1 ⎝ e e
Γq Ωe
⎠⎟

Substituting the trial and weight functions approximations, in Eqs. (8.2) and (8.3) into Eq
(8.4) yields:

nel ⎧⎪ ⎫⎪
⎪⎪ ⎪
∑ ⎨∫ w L B tDB L dd Ω + ∫ w L N qtd Γ − ∫ w L N Qd Ω⎪⎬ = 0
T eT eT e e T eT eT T eT eT
∀w 0

e =1 ⎪ Ωe Ωe
⎪⎪
⎩⎪ Γeq
⎭⎪
(8.5)

Following the procedure established in Chapter 5 we replace the arbitrary weight


functions w by an arbitrary set of parameters w 0 . The subscript zero denotes the fact
weight functions are arbitrary except for the nodes on the essential boundary
.Rearranging Eq (8.5) gives:

2
⎧⎪ nel ⎡ ⎤ ⎫⎪
⎪ ⎢ BeT tDBe Le dd Ω + NeT qtd Γ − NeTQd Ω⎥ ⎪⎪ = 0 ∀w
w ⎪⎨∑ LeT
T
⎢∫ ∫e ∫e ⎥ ⎬⎪
⎪⎪ e =1⎢ Ωe ⎥⎪
0

⎩⎪ ⎣ Γq Ω ⎦ ⎭⎪
nel ⎡ ⎤
Denoting p = ∑ L ⎢ ∫ B tDB L dd Ω + ∫ N qtd Γ − ∫ N Qd Ω⎥⎥
eT ⎢ eT e e eT eT

e =1 ⎢ Ωe Ωe ⎥
⎣ Γeq

and exploiting arbitrariness of w 0 gives

wT p = 0 ∀wT ⇒ p=0

or

nel ⎡ ⎤ nel nel


⎢ LeT BeT tDBed ΩLe ⎥ d = − LeT NeT qtd Γ +
∑ ⎢
e =1 ⎣⎢
∫ ⎥ ∑ ∫ ∑ LeT ∫ NeTQd Ω (8.6)
Ωe ⎦⎥ e =1 Γeq e =1 Ωe

Further defining:

Ke = ∫B
eT
Element conductance matrix: tDBed Ω
Ωe

Element boundary flux vector: fbe = −∫ NeT qtd Γ


Γeq

fle = ∫N
eT
Element heat source vector: Qd Ω
Ωe

yields:
nel nel nel

∑ ⎡⎣LeT Ke Le ⎤⎦ d = ∑ LeT fbe + ∑ LeT fle


e =1 e =1 e =1
(8.7)

Recognazing the global matrices and right hand side vectors to be


nel nel nel
K = ∑ LeT Ke Le fb = ∑ LeT fbe fl = ∑ LeT fle
e =1 e =1 e =1
In practice, however, we do not multiply by assembly operator, but instead carry out
direct assembly. This will be illustrated in the two numerical examples that follow.

Finally, we obtain an algebraic linear system of equations:

Kd = fb + fl = f

The application of boundary conditions and post processing is identical to that described
for one-dimensional problems in Chapter 5.

3
In the remaining of Chapter 8 we will solve a haet conduction problem on a rectangular
domain (se Figure 8.2) using two triangular elements (Example 8.1) and a single
quadrilateral element using Gauss qudrature (Example 8.2).

Example 8.1
y
t = 0.1m (thickness)

Isotropic
qn = h = -kx conductivity
⎛1 0⎞
D = k⎜ ⎟ = kI
⎝0 1⎠
k = 4 J/℃ms
Γq
1m
T=0

ΓT qn = h = -ky

T=0
x
2m
Figure 8.2: Problem definition

Consider the finite element mesh consisting of two triangles as shown below:

3 4

1
x
1 2
Figure 8.3: Finite eelement mesh

To calculate conductance matrix of the triangular element recall the Be matrix given by

⎡(y2e − y e3 ) (y e3 − y1e ) (y1e − y2e )⎤


e 1 ⎢ ⎥
B = ⎢ e e ⎥
⎢⎣(x 3 − x 2 ) (x 1 − x 3 ) (x 2 − x 1 )⎥⎦
e e e e
2Ae
where
2Ae = (x 2ey 3e − x 3ey2e ) − (x 1ey 3e − x 3ey1e ) + (x 1ey2e − x 2ey1e ) .

4
e
Since B , t, and k are constants and D = kI the expression of the conductance
matrix can be simplified as:

Ke = ∫B ∫B Betkd Ω = BeT Betk ∫ d Ω


eT
DBetd Ω = eT

Ωe Ωe Ωe
or
Ke = BeT BetkAe
The counterclockwise direction is used for local numbering of element nodes as shown in
Figure 10-4.
3

e
1
2
Figure 8.4: Counterclockwise numbering of element nodes

The Be matrix for element 1 yields:

1 ⎡−⎢
1 1 0⎤

B1 =
2 ⎢⎢⎣ 0 −2 2⎥⎥⎦

where the following numbering of element nodes is employed


y
3 (2,1)

1
x
1(0,0) 2(2,0)
Figure 8.5: Local node numbering for element 1

and the resulting conductance


⎡ 1 −1 0 ⎤ (1
⎢ ⎥
1 1 1T 1 ⎢ ⎥
K = ktA B B = 0.1 ⎢−1 5 −4⎥ (2
⎢ ⎥
⎢ 0 −4 4 ⎥ (4
⎢⎣ ⎥⎦

The Be matrix for element 2:


1 ⎡⎢ 0 1 −1⎤⎥
B2 =
2 ⎢⎣⎢−2 0 2 ⎥⎦⎥

5
which corresponds to the following node numbering for element 2:
y

3(0,1) 2 (2,1)
2

x
1(0,0)
Figure 8.6: Local node numbering for element 2

and the corresponding conductance matrix is:

⎡ 0 −4⎤⎥ (1
⎢4
⎢ ⎥
K2 = ktA2 B2T B2 = 0.1 ⎢ 0 1 −1⎥ (4
⎢ ⎥
⎢−4 −1 5 ⎥ (3
⎣⎢ ⎥⎦

The global conductance matrix is obtained by directly assembling the two element
stiffness matrices

⎡1 + 4 −1 −4 0 + 0⎤ (1 ⎡ 5 −1 −4 0 ⎤
⎢ ⎥ ⎢ ⎥
⎢ −1 5 0 − 4 ⎥ (2 ⎢−1 5 0 − 4 ⎥
⎢ ⎥ ⎢ ⎥
K = 0.1 ⎢ ⎥ = 0.1 ⎢ ⎥
⎢ − 4 0 5 − 1 ⎥ (3 ⎢− 4 0 5 − 1 ⎥
⎢ ⎥ ⎢ ⎥
⎢ 0 + 0 −4 −1 4 + 1⎥ (4 ⎢ 0 − 4 −1 5 ⎥
⎣ ⎦ ⎣ ⎦

Let us now consider the element heat source vector:

fle = ∫N
eT
Qd Ω
Ωe
where triangular element shape functions are:

1
e ( 2 3
N 1e = x ey e − x 3ey2e + (y2e − y 3e ) x + (x 3e − x 2e ) y )
2A
1
e ( 3 1
N 2e = x ey e − x 1ey 3e + (y 3e − y1e ) x + (x 1e − x 3e ) y )
2A
1
e ( 1 2
e
N3 = x ey e − x 2ey1e + (y1e − y2e ) x + (x 2e − x 1e ) y )
2A

Ae

e
In the special case when Q is constant and since Ned Ω = as can be seen from
Ωe
3
the Figure 8.7

6
N1
1

1 3

Ae
2
1
Figure 8.7: Volume under the shape function N

yields
⎡1⎤
⎢ ⎥ e
QA ⎢ ⎥
fle = Q ∫ eT
N dΩ = ⎢1⎥
Ωe
3 ⎢ ⎥
⎢1⎥
⎢⎣ ⎥⎦
e
In the present example, Q = 0 so:
⎡ 0⎤
⎢ ⎥
⎢ ⎥
fle = fl1 = fl2 = ⎢0⎥
⎢ ⎥
⎢ 0⎥
⎣⎢ ⎦⎥
The global load vector is obtained by vector assembly:

⎡ 0 + 0⎤ (1 ⎡ 0⎤
⎢ ⎥ ⎢ ⎥
⎢ 0 ⎥ (2 ⎢ 0⎥
⎢ ⎥ ⎢ ⎥
fl = ⎢ ⎥ =⎢ ⎥
⎢ 0 ⎥ (3 ⎢ 0⎥
⎢ ⎥ ⎢ ⎥
⎢ 0 + 0⎥ (4 ⎢ 0⎥
⎣ ⎦ ⎣ ⎦

We now proceed with the computation of the element boundary flux vectors given by:

fbe = −∫ N eTqtd Γ
Γq

For element 1 we have: edge Γ12 to be part of ΓT , and Γ13 to be internal edge. Thus
the only contribution to the boundary vector comes from the edge Γ23 which yields:

7
3

Internal

h = - ky
1

1 ΓT 2
Figure 8.8: Natural boundary conditions for element 1

y =1

fb1 = −∫ N1 (Γ32 )q (Γ23 )td Γ = 0.4 ∫ N1 (x = 2) ydy


Γ23 −ky y =0

To evaluate the above integral we need to compute the shape function along x=2:

⎡ 1 ⎡x 21y 31 − x 31y21 + (y21 − y 31 ) x + (x 31 − x 21 ) y ⎤ ⎤⎥


⎢ 2 ⎢⎣ ⎥⎦ ⎥
⎢ 2A
⎢ 1 ⎥
N1 = ⎢⎢ 2 ⎡x 31y11 − x 11y 31 + (y 31 − y11 ) x + (x 11 − x 31 ) y ⎤ ⎥
⎢⎣ ⎥⎦ ⎥
⎢ 2A ⎥
⎢ 1 ⎥
⎢ 2 ⎡x 1y2 − x 2y1 + (y1 − y2 ) x + (x 2 − x 1 ) y ⎤ ⎥
1 1 1 1 1 1 1 1

⎣⎢ 2A ⎣⎢ ⎦⎥ ⎦⎥
where:

1⋅ 2
A1 = =1 (x11 = 0, y11 = 0) (x 21 = 2, y21 = 0) (x 31 = 2, y31 = 1) x =2
2

which results in the following expression for the shape functions:

⎡2 + (−1) ⋅ 2 + 0 ⋅ y ⎤ ⎡ 0 ⎤
⎢ ⎥ ⎢ ⎥
1 1⎢ ⎥ ⎢ ⎥
N (x = 2) = ⎢ 1⋅ 2 − 2 ⋅ y ⎥ = ⎢1 − y ⎥
2⎢ ⎥ ⎢ ⎥
⎢ ⋅ + ⋅ ⎥ y ⎥
⎢⎣ 0 2 2 y ⎥⎦ ⎢⎣ ⎦

The resulting boundary heat flux vector for element 1 is given by:

1
⎡ ⎤ ⎡ ⎤
⎡ 0 ⎤ ⎢ c ⎥ ⎢0⎥
⎢ ⎥ ⎢ ⎥ ⎢ ⎥
y =1
⎢ ⎥ ⎢ 2 3⎥ ⎢1⎥
⎢ y y ⎥
fb1 = 0.4 ∫ ⎢(1 − y )y ⎥ dy = 0.4 ⎢ − ⎥ = 0.4 ⎢⎢ ⎥⎥
⎢ ⎥ ⎢2 3⎥ ⎢6⎥
y =0 ⎢ ⎥
⎢⎣ y
2
⎥⎦ ⎢ 3 ⎥ ⎢1⎥
⎢ y ⎥ ⎢ ⎥
⎢ ⎥ ⎢⎣ 3 ⎥⎦
⎣ 3 ⎦0

8
For element 2 we have: edge Γ12 is internal; the edge Γ13 is part of ΓT . Thus, the only
contribution to the boundary vector comes from edge Γ23 which yields:

h = - kx
3
2

Γg 2

Internal
1
Figure 8.9: Natural boundary conditions for element 2

x =2

fb2 = −∫ N2 (Γ23 )q (Γ23 )td Γ = 0.4 ∫ N2 (y = 1) xdx


Γ23 −kx x =0

At y=2 the shape function is given by:

⎡ 1 ⎡x 22y 32 − x 32y22 + (y22 − y 32 ) x + (x 32 − x 22 ) y ⎤ ⎤⎥


⎢ 2 ⎢⎣ ⎥⎦ ⎥
⎢ 2A
⎢ 1 ⎥
N2 = ⎢⎢ 2 ⎡x 32y12 − x 12y 32 + (y 32 − y12 ) x + (x 12 − x 32 ) y ⎤ ⎥
⎣⎢ ⎦⎥ ⎥
⎢ 2A ⎥
⎢ 1 ⎥
⎢ ⎡x 1 y2 − x 2 y1 + (y1 − y2 ) x + (x 2 − x 1 ) y ⎤ ⎥
2 2 2 2 2 2 2 2
⎢⎣ 2A2 ⎣⎢ ⎦⎥ ⎥⎦
where:

1⋅ 2
A2 = =1 (x 12 = 0, y12 = 0) (x 22 = 0, y22 = 1) (x 32 = 0, y32 = 1) y =1
2

which gives:

⎡ ⎤ ⎡ ⎤
⎢2 + 0 ⋅ x + (−2) ⋅ 1⎥ ⎢ 0 ⎥
1⎢ ⎥ 1⎢ ⎥
N2 (y = 1) = ⎢ 1⋅ x + 0 ⋅1 ⎥= ⎢ x ⎥
2⎢ ⎥ 2⎢ ⎥
⎢ (−1) ⋅ x + 2 ⋅ 1 ⎥ ⎢2 − x ⎥
⎢⎣ ⎥⎦ ⎢⎣ ⎥⎦

The boundary flux vector for element 2 is given by:

9
2
⎡ ⎤ ⎡ ⎤ ⎡ ⎤
⎢ 0 ⎥ ⎢ c ⎥ ⎢ 0⎥
⎢ ⎥ ⎢ ⎥ ⎢ ⎥
x =2 ⎢ ⎥ ⎢ ⎥ ⎢4⎥
⎢ x2 ⎥ ⎢ x
3
⎥ ⎢ ⎥
fb2 = 0.4 ∫ ⎢ ⎥ dx = 0.4 ⎢ ⎥ = 0.4 ⎢ 3⎥
x =0 ⎢
2 ⎥ ⎢ 6 ⎥ ⎢ ⎥
⎢ ⎥ ⎢ 2 3⎥ ⎢2⎥
⎢x x2 ⎥ x
⎢ − ⎥ x ⎢ ⎥
⎢ − ⎥ ⎢ ⎥
⎣ 2⎦ ⎣2 6 ⎦0 ⎣⎢ 3 ⎦⎥

The global boundary flux vector is obtained by direct assembly of the element vectors:

⎡ 0 + 0 + ?⎤
⎢ ⎥ ⎡?⎤
⎢ 1 ⎥ ⎢ ⎥
⎢ ⎥ ⎢?⎥
⎢ 6 +? ⎥ ⎢ ⎥
⎢ ⎥
fb = 0.4 ⎢ 2 ⎥ = ⎢⎢ ? ⎥⎥
⎢ +? ⎥ ⎢ ⎥
⎢ 3 ⎥ ⎢2⎥
⎢ 1 4 ⎥ ⎢ ⎥
⎢ ⎥ ⎣⎢ 3 ⎦⎥
⎢ 3+3 ⎥
⎣ ⎦
where the question mark indicate unknown contribution from the essential boundary.
Finally, the global force vector is given by the summation of global boundary flux and
heat source vectors:
⎡r1 ⎤
⎢ ⎥
⎢r2 ⎥
⎢ ⎥
f = fb + fl = ⎢r3 ⎥
⎢ ⎥
⎢2⎥
⎢ ⎥
⎢⎣ 3 ⎥⎦

The resulting system of equations to be solved is given by:

⎡ 5 −1 −4 0 ⎤ ⎡ 0 ⎤ ⎡r1 ⎤
⎢ ⎥ ⎢ ⎥ ⎢r ⎥
⎢ −1 5
⎢ 0 −4⎥⎥ ⎢⎢ 0 ⎥⎥ ⎢⎢ 2 ⎥⎥
0.1 ⎢ ⎥ ⎢ ⎥ = ⎢r ⎥
⎢−4 0 5 −1⎥ ⎢ 0 ⎥ ⎢ 3 ⎥
⎢ ⎥ ⎢ ⎥ ⎢2⎥
⎢ 0 −4 −1 5 ⎥ ⎢T4 ⎥ ⎢ ⎥
⎣ ⎦ ⎣ ⎦ ⎢⎣ 3 ⎥⎦
which yelds:
2 4
0.5 ⋅ T4 = ⇒ T4 =
3 3
The global and local solution (temperature) vectors are given as:
⎡ 0 ⎤
⎢ ⎥ ⎡ 0 ⎤ (1 ⎡ ⎤
⎢ 0 ⎥ ⎢ ⎥ ⎢ 0 ⎥ (1
⎢ ⎥ 1 ⎢ ⎥ ⎢ ⎥
d=⎢ ⎥ d = ⎢ 0 ⎥ (2 d2 = ⎢4 / 3⎥ (4
⎢ 0 ⎥ ⎢ ⎥ ⎢ ⎥
⎢ ⎥ ⎢4 / 3⎥ (4 ⎢ 0 ⎥ (3
⎢ 4 / 3⎥ ⎢⎣ ⎥⎦ ⎢⎣ ⎥⎦
⎢⎣ ⎥⎦

10
For postprocessing we compute fluxes starting from element 1:

q 1 = −D∇T 1 = −kIB1d1 = −kB1d1


⎡ 0 ⎤
⎡− 1 1 0 ⎤ ⎢ ⎥ ⎡ 0 ⎤
1⎢ ⎥ ⎢ ⎥ ⎢ ⎥
−4 ⎢ ⎥ ⎢ 0 ⎥ = ⎢ 16 ⎥
2 ⎢⎣ 0 −2 2⎥⎦ ⎢ ⎥ ⎢− ⎥
⎢ 4 / 3⎥ ⎢⎣ 3 ⎥⎦
⎢⎣ ⎥⎦

The flux vector in element 2 is given by


⎡ 0 ⎤
⎡ 0 1 − 1⎤ ⎢ ⎥ ⎡−8 / 3⎤
1
q 2 = −kB2 d2 = −4 ⎢⎢ ⎥ ⎢⎢ 4 / 3⎥⎥ = ⎢ ⎥
2 ⎣⎢− 2 0 2 ⎥
⎥⎦ ⎢⎢ ⎥ ⎣⎢ 0 ⎥⎦⎥

0 ⎥
⎣⎢ ⎦⎥
Remark: For this problem, we can find the exact solution which has the close form T=xy,
exact
so for node 2 (x=2, y=1), the exact solution T (x = 2, y = 1) = 2 , is quite different
from the finite solution because the finite element mesh is too coarse to capture the
essential physics of the problem.

As in 1D problems the finite element solution gives a distribution of fluxes which is


discontinuous between the elements.

8.2 Gauss quadrature in two-dimensions


In Chapter 4 we have seen that for general quadrilateral elements the shape functions are
expressed in the natuarl coordinate system and yet the integral in the weak form have to
be carried out over the physical domain of the element. Consider a typical integral
defined over the domain of a quadrilateral element

∫ f (t, r )d Ω
e
I = (8.8)
Ωe
To evaluate the integral we must express the intifinitesimal area d Ωe by in terms of
dr and dt . For this purpose Figure 8.10 shows how the infinitesimal area dt dr in the
natural coordinate system is mapped in the global Cartesian system.

11
r r
∂R
dt
∂t
dr P
y ∂R t
P dt dr
t ∂r

x
(a) (b)
Figure 8.10: Mapping of the infinitesimal areas from the naturaral coordinate system (a) to the
global cartesian coordinate sysytem

Vector R representing an arbitrary point P in Figure 8.10 is given as

R = xi + yi

The rate of change of R with respect to the natural coordinates is given by

∂R ∂x ∂y
= i+ j
∂t ∂t ∂t
∂R ∂x ∂y
= i+ j
∂r ∂r ∂r

The infinitesimal area area in the physical domain d Ωe can be determined from the
following triple product

⎛ ∂R ∂R ⎞⎟
d Ωe = ⎜⎜ dt × dr ⎟ ⋅ k
⎝ ∂t ∂r ⎠⎟
(8.9)
⎛ ∂x ∂y ∂x ∂y ⎞⎟
= ⎜⎜ − ⎟dt dr
⎝ ∂t ∂r ∂r ∂t ⎠⎟

Eq. (8.9) can be written as a 2 × 2 determinant

⎛ ∂x ∂y ⎞⎟
⎜⎜ ⎟

d Ω = det ⎜⎜ ∂t ∂t ⎟⎟⎟dt dr = det J dt dr
e
( ) (8.10)
⎜⎜⎜ ∂x ∂y ⎟⎟⎟

⎜⎝ ∂r ∂r ⎠⎟

12
Thus the integral in Eq. (8.8) can be expressed as
1 1

I = ∫ ∫ det ( J(t, r )) f (t, r )dtdr


r =−1 t =−1

We first carry out Gauss integration over t and then over r, which yields:

1 ⎛ 1 ⎞⎟ 1 n

I = ∫ ⎜⎜ ∫ det ( J(t, r )) f (t, r )dt ⎟⎟dr = ∫ ∑Wi det ( J(ti , r )) f (ti , r )dr

r =−1 ⎝t =−1 ⎠⎟ r =−1 i =1
n n
=∑ ∑WW i j det ( J(ti , rj )) f (ti , rj )
i =1 j =1

Example
Consider one of the stiffness matrix terms from the previous chapter:

x 2 =2 y2 =1
⎡(1 − y )2 + (2 − x )2 ⎤ dydx
K 11 = ∫ ∫ ⎣⎢ ⎦⎥
x1 =0 y1 =0 f (x ,y )

f (x , y ) is quadratic in x and quadratic in y . We need 2 point Gauss integration in x and


y to integrate it exactly. The relation between physical and mapped coordinates is given
by
1 1
x = (0 + 2) + t (2 − 0) = 1 + t
2 2
1 1
y = (0 + 1) + r (1 − 0) = 0.5 (1 + r )
2 2

The parametric and physical coordinates of the Gauss points are:


1 1
t1 = − ⇒ x 1 = 0.42265 r1 = − ⇒ y1 = 0.211325
3 3
1 1
t2 = ⇒ x 2 = 1.57735 r2 = ⇒ y2 = 0.788675
3 3

The corresponding function at the Gauss points is


2 2
f (x 1, y1 ) = (1 − y1 ) + (2 − x 1 ) = 3.11 f (x 2 , y1 ) = 0.8006

f (x 1, y2 ) = 2.533 f (x 1, y2 ) = 0.2233

The weights for the two-point Gauss Quadrature are

13
W1 = 1 W2 = 1 Ae = (2 − 0)(1 − 0) = 2

The resulting integral is given as:

⎛ 1 1 f (x 1, y1 ) + WW ⎞
1 2 f (x 1, y 2 ) +⎟
Ae 2 2
1 ⎜⎜WW ⎟⎟
K 11 = ∑ ∑ WW
i j f (x i , y j ) = ⎜⎜ ⎟⎟
2 1 f (x 2 , y1 ) + WW
2 2 f (x 2 , y 2 ) ⎠
4 i =1 j =1 2 ⎜⎝WW
2
4

1 1
= (3.11 + 0.8006 + 2.533 + 0.2233) = 3
2 3

Example 8.2
Consider the problem on a rectangular domain 2m x 1m as shown in Figure
y

qn = h = 30
D C
k=4 t =1
qn = h = 0 T = 1.0
Q = 45
x
A qn = h = 0 B
Figure 8.11: Problem definition for Example 2

Solve for the temperature and fluxes using Gauss Quadrature. Use a single rectangular
finite element as shown below
y

3 2

x
4 1
Figure 8.12 Global node numbering

14
4 3

1 2
Figure 8.13 Local element node numbering

We start by calculating the Jacobian matrix:


⎡x 1e y1e ⎤
⎡ ∂N 1e ∂N e
∂N e
∂N e
⎤ ⎢ ⎥
⎢ 2 3 4
⎥ ⎢x e y2e ⎥⎥

J = ⎢ ∂t e ∂t ∂t ∂t ⎥ ⎢ 2
⎥⎢ ⎥
⎢ ∂N 1 ∂N 2e ∂N 3e ∂N 4e ⎥ ⎢x 3e y 3e ⎥
⎢ ⎥⎢ ⎥
⎣ ∂r ∂r ∂r ∂r ⎦ ⎢x e y e4 ⎥⎥
⎢⎣ 4 ⎦
⎡ 0 0⎤
⎢ ⎥
⎡− (1 − r ) (1 − r ) (1 + r ) − (1 + r )⎤ ⎢ 2 0⎥ ⎡ 1 0 ⎤
1 ⎥⎢ ⎥ ⎢ ⎥
= ⎢⎢ ⎥ ⎢ ⎥=⎢ 1 ⎥
4 ⎢ −(1 − t ) −(1 + t ) (1 + t ) (1 − t ) ⎥ ⎢ 2 1 ⎥ ⎢ 0 2⎥
⎣ ⎦⎢ ⎥ ⎣ ⎦
⎢ 0 1⎥
⎣ ⎦
Note that in the case of rectangular elements the Jacobian matrix is constant and
diagonal, with diagonals J 11 and J 22 equal to half width and height of the rectangle. The
inverse of Jacobian matrix is given by
⎡ 1 0⎤
J−1 = ⎢⎢ ⎥

⎢⎣ 0 2 ⎥⎦
The derivatives of the shape functions with respect to the global Cartesian coordinates are
given
⎡ ∂N 1e ∂N 2e ∂N 3e ∂N 4e ⎤
⎢ ⎥
e ⎢ ∂t ∂ t ∂ t ∂ t ⎥
B = J⎢ e e e e⎥
⎢ ∂N 1 ∂N 2 ∂N 3 ∂N 4 ⎥
⎢ ⎥
⎣ ∂r ∂r ∂r ∂r ⎦

⎡(y − y 4 ) (y 3 − y ) (y − y2 ) (y1 − y )⎤ ⎡(y − 1) (1 − y ) (y ) (−y ) ⎤


e 1 ⎢ ⎥ = 1⎢ ⎥
B = e ⎢ ⎥
A (⎢⎣ x − x 2 ) (x 1 − x ) (x − x 4 ) (x 3 − x )⎥⎦ 2 ⎢⎢⎣(x − 2) (−x ) (x ) (2 − x )⎥⎥⎦

and the resulting stiffness matrix with constant thickness and conductivity

15
Ke = ∫B DBetd Ω = tk ∫ BeT Bed Ω
eT

Ωe Ωe

⎡(y − 1) (x − 2)⎤
⎢ ⎥
⎢(1 − y ) (−x ) ⎥ ⎡(y − 1) (1 − y ) (y ) (−y ) ⎤
1⎢ ⎥1
= 4∫ ⎢ ⎥ ⎢⎢ ⎥ dΩ


2 (y ) (x ) ⎥ 2 (x − 2) (−x ) (x ) (2 − x )
Ωe ⎢ ⎥ ⎢⎣ ⎥⎦
⎢ ⎥
⎢⎣ (−y ) (2 − x )⎥⎦

Individual stiffness matrix terms can be computed analytically. Note that not all the terms
have to be computed due to symmetry and the fact that the sum of the terms in each row
(or column) has to be equal to zero.

2 1 2 1
⎡(y − 1)2 + (x − 2)2 ⎤ dydx = 10 2
K 11e = ∫∫ K 12e = ∫ ∫ ⎡⎣−(y − 1) − x (x − 2)⎤⎦ dydx =
2
⎢⎣ ⎥⎦ 3 3
0 0 0 0
2 1 2 1
10 7
∫ ∫ ⎣⎢⎡(1 − y ) + x 2 ⎦⎥⎤ dydx = ∫ ∫ ⎣⎡y(1 − y ) − x ⎤
2
K 22e = K 23e = 2
⎦ dydx = − 3
0 0
3 0 0
2 1 2 1
5 10
K 24e = ∫∫ [y (y − 1) + x (x − 2)]dydx = − K 33e = ∫ ∫ ⎡⎣y + x 2 ⎤⎦ dydx =
2

0 0
3 0 0
3
2 1 2 1
2 10
K 34e = ∫ ∫ ⎡⎣−y + x (2 − x )⎤⎦ dydx = ∫ ∫ ⎡⎣y + (2 − x )2 ⎤⎦ dydx =
2
K 44e = 2

0 0
3 0 0
3

The resulting stiffness matrix is given by:

⎡ 10 2 −5 −7 ⎤ (4
⎢ ⎥
⎢ −5⎥⎥ (1
1 ⎢ 2 10 −7
Ke = ⎢ ⎥
3 ⎢−5 −7 10 2 ⎥ (2
⎢ ⎥
⎢−7 −5 2 10 ⎥ (3
⎣ ⎦
So the global matrix is given by:
⎡ 10 −7 −5 2 ⎤ (1
⎢ ⎥
⎢ −5⎥⎥ (2
1 ⎢−7 10 2
K= ⎢ ⎥
3 ⎢−5 2 10 −7 ⎥ (3
⎢ ⎥
⎢ 2 −5 − 7 10 ⎥ (4
⎣ ⎦

Let us now compute the load vector:

16
fle = Qt ∫ NeTd Ω
Ωe

where the shape functions are given as:

1 1 1
N 1e =
A e
(x − x 2 )(y − y 4 ) = (x − 2)(y − 1)
2 ∫∫ N dxdy = 2
1

1 1 1
N 2e = − e (x − x 1 )(y − y 4 ) = − (x − 0) (y − 1)
A 2 ∫∫ N dxdy = 2
2

1 1 1
N 3e = e (x − x 1 )(y − y1 ) = (x − 0) (y − 0)
A 2 ∫∫ N dxdy = 2
3

1 1 1
N 4e = − e (x − x 2 )(y − y1 ) = − (x − 2) y
A 2 ∫∫ N dxdy = 2
4

Thus the load vector is given as:


⎡1⎤
⎢ ⎥
⎢2⎥ ⎡1⎤
⎢1⎥ ⎢ ⎥
⎢ ⎥
⎢ 2 ⎥ 45 ⎢⎢1⎥⎥
fle = 45 ⋅ 1 ⎢⎢ ⎥⎥ = ⎢ ⎥
⎢1⎥ 2 ⎢1⎥
⎢ ⎥
⎢2⎥ ⎢1⎥
⎢ ⎥ ⎣ ⎦
⎢1⎥
⎢ ⎥
⎢⎣ 2 ⎥⎦
We proceed with the computation of the boundary vector. The only contribution to the
boundary vector comes from edge Γ 23 which yields:

x =2

fbe = −∫ Ne (Γ32 )q (Γ32 )td Γ = −30 ∫ Ne (y = 1)dx


Γ32 30 x =0

The shape function along the boundary is identical to the shape function of 1D element
and it are is equal to the half length.
⎡ 0 ⎤ ⎡ 0 ⎤
⎢ ⎥ ⎢ ⎥
⎢ 0 ⎥ ⎢ 0 ⎥
⎢ ⎥ ⎢ ⎥
fbe = −30 ⎢ ⎥=⎢ ⎥
⎢(2 ⋅ 1) / 2 ⎥ ⎢− 30 ⎥
⎢ ⎥ ⎢ ⎥
⎢(2 ⋅ 1) / 2⎥ ⎢−30⎥
⎢⎣ ⎥⎦ ⎣ ⎦
Remark: since h and t are constant the boundary vector is equally distributed between
the nodes connecting the edge on which the flux is prescribed.

Thus the force vector is given as

17
⎡22.5⎤ ⎡ 0 ⎤ ⎡ 22.5 ⎤ (4
⎢ ⎥ ⎢ ⎥ ⎢ ⎥
⎢22.5⎥ ⎢ 0 ⎥ ⎢ 22.5 ⎥ (1
⎢ ⎥ ⎢ ⎥ ⎢ ⎥
fe = ⎢ ⎥+⎢ ⎥=⎢ ⎥
⎢22.5⎥ ⎢−30⎥ ⎢−7.5⎥ (2
⎢ ⎥ ⎢ ⎥ ⎢ ⎥
⎢22.5⎥ ⎢−30⎥ ⎢−7.5⎥ (3
⎣ ⎦ ⎣ ⎦ ⎣ ⎦

So the global force vector is:


⎡ 22.5 ⎤ (1
⎢ ⎥
⎢−7.5⎥ (2
⎢ ⎥
f=⎢ ⎥
⎢−7.5⎥ (3
⎢ ⎥
⎢ 22.5 ⎥ (4
⎣ ⎦
The resulting system of equations is given as

⎡ 10 −7 −5 2 ⎤ ⎡T1 ⎤ ⎡ 22.5 ⎤
⎢ ⎥⎢ ⎥ ⎢ ⎥
⎢−7 10 2 −5⎥ ⎢T ⎥ ⎢−7.5⎥
1⎢ ⎥ ⎢ 2⎥ ⎢ ⎥
⎢ ⎥⎢ ⎥ = ⎢ ⎥
3⎢− 5 2 10 − 7 T
⎥ ⎢ 3⎥ ⎢− 7.5 ⎥
⎢ ⎥⎢ ⎥ ⎢ ⎥
⎢ 2 −5 −7 10 ⎥ ⎢T4 ⎥ ⎢ 22.5 ⎥
⎣ ⎦⎣ ⎦ ⎣ ⎦

Partitioning after the first two rows and columns yields:

⎡−7.5⎤ 1 ⎡−5 2 ⎤ ⎡1⎤ ⎡−6.5⎤


ˆ ˆ = ˆf − BT d = ⎢ ⎥ ⎢ ⎥⎢ ⎥ ⎢ ⎥
Ka ⎢ 22.5 ⎥ − 3 ⎢ 2 −5⎥ ⎢1⎥ = ⎢ 23.5 ⎥
⎣⎢ ⎦⎥ ⎣⎢ ⎥⎦ ⎣⎢ ⎦⎥ ⎣⎢ ⎥⎦
⎡ 1 ⎤
⎢ ⎥
⎡ 10 − 7 ⎤ ⎡
T ⎤ ⎡− 6.5 ⎤ ⎡ T ⎤ ⎡ 5.85 ⎤ ⎢ 1 ⎥
1⎢ ⎥ ⎢ 3⎥ = ⎢ ⎥ → ⎢ 3⎥ = ⎢ ⎥ → d = ⎢⎢ ⎥

⎢ ⎥ ⎢ ⎥ ⎢
3 ⎢⎣−7 10 ⎥⎦ ⎢⎣T4 ⎥⎦ ⎢⎣ 23.5 ⎥⎦ ⎥ ⎢ ⎥ ⎢ ⎥
⎢⎣T4 ⎥⎦ ⎢⎣11.15⎥⎦ ⎢ 5.85 ⎥
⎢ ⎥
⎢11.15⎥
⎣ ⎦
The resulting flux vector is:
⎡11.15⎤
⎢ ⎥
⎡ (y − 1 ) ( 1 − y ) (y ) ( −y ) ⎤ ⎢ 1 ⎥ ⎡20.3 − 10.6y ⎤
1 ⎥⎢ ⎥ ⎢
q = −kB1d1 = −4 ⋅ ⎢⎢ ⎥ ⎢ ⎥= ⎥
2 ⎢(x − 2) (−x ) (x ) (2 − x )⎥ ⎢ 1 ⎥ ⎢⎢⎣21.2 − 10.6x ⎥⎥⎦
⎣ ⎦⎢ ⎥
⎢ 5.85 ⎥
⎣ ⎦

18
Problems
Problem 1: Consider a triangular panel made of two isotropic materials with thermal
conductivities of k1 = 4 and k2 = 8. A constant temperature of T = 10 is prescribed along
the edge BC. The edge AB is insulated and a linear distribution of flux, h = 15x, is
applied along the boundary AC. Point Source Qs = 45 is applied at (x=3, y=0). The plate
has a constant thickness equal to 0.1.

For the finite element model consider two triangular elements, ABD and BDC. Use
appropriate node numbering.
y

B
3
Insulated
T = 10
k1=4 k2=8

D C
A x
h = 15 x

2 2

Carry out hand calculations and find the temperature and flux distribution in the plate.

Problem 2: Finite element mesh consisting of rectangular and triangular elements is


shown in the figure below. A constant temperature T=10 is prescribed along the
boundaries y=0. A constant and linear flux distribution as shown below is applied along
the edges y=x+2 and x=0, respectively. The edge x=2 is isolated. A point sources equal to
Qs = 10 acts at a point (0, 2). Assume constant thickness t=0.1. The material is isotropic
with k=1 for element 1 and k=2 for element 2. Compute the nodal temperatures.

19
y

4
h = 30
h=0 2
5 1
Q = 10 3

h = 15y h=0 2
2
1 2
x
T = 10 T = 10
2

20
Chapter

8 Finite element formulation for two


dimensional scalar field problems

In this Chapter we derive algebraic system of equations from the weak form derived in
Chapter 6. The Weak Form for the scalar field problem (for instance, heat conduction)
states:

find T (x , y ) ∈ U such that :


(8.1)
∫ (∇w ) tD∇Td Ω = −∫ wqtd Γ + ∫ wQd Ω ∀w ∈ U 0
T

Ω Γq Ω

where
⎡ ∂T ⎤
⎢ ⎥ ⎡kxx kxy ⎤
⎢ ∂x ⎥ ⎡qx ⎤
∇T = ⎢ ⎥ ; q = ⎢q ⎥ = −D∇T is the Fourier law; and D = ⎢⎢ ⎥ the

⎢ ∂T ⎥ ⎢⎣ y ⎥⎦ k k
⎢ ⎥ ⎢
⎣ xy yy ⎥

⎣⎢ ∂y ⎦⎥
conductivity matrix. We will consider the problem domain to be discretized with
triangular, quadrilateral or mixture of different types of elements as shown in Figure 8.1.
y
q = q on Γq

T = T on ΓT
x
Figure 8.1: Finite element model in two dimensions
The finite element approximation of the trial function (temperature in this case) is given
by:

T e = Ne d e = N 1eT1e + N 2eT2e + … = N e Le d

⎡ ∂T e ⎤ ⎡ ∂N 1e e ∂N 2e e ⎤ ⎡ ∂N 1e ∂N 2e ⎤
⎢ ⎥ ⎢ T + T2 + ⎥ ⎢ ⎥
⎢ ∂x ⎥ ⎢ ∂ x 1 ∂x ⎥ ⎢ ∂x ∂x ⎥ e
∇T = ⎢
e
e⎥ = ⎢ e e ⎥=⎢ e ⎥d
⎢ ∂T ⎥ ⎢ ∂ N 1 T e + ∂ N 2 T e + ⎥ ⎢ ∂N 1 ∂N 2e ⎥
⎢ ⎥ ⎢ 1 2 ⎥ ⎢ ⎥
⎢⎣ ∂y ⎥⎦ ⎢⎣ ∂y ∂y ⎥⎦ ⎢⎣ ∂y ∂y ⎥⎦

= Be d e = Be Le d (8.2)
⎡T e ⎤
⎢ 1⎥
⎢ ⎥
where d = ⎢T2e ⎥ .
e

⎢ ⎥
⎢ ⎥
⎣⎢ ⎦⎥

The weight functions are approximated using the same set of shape functions
T
w e = Ne we = weT NeT = (Le w ) NeT = wT LeT NeT

T T T
(∇w e ) = (Be we ) = w eT BeT = (Le w) BeT = wT LeT BeT (8.3)

We next divide the integration domain into the summation of integrals over the elements

⎛ ⎞⎟
nel
⎜⎜ ⎟
∑ ⎜
⎜Ω
e T
⎜ ∫ (∇w ) tD (∇T )d Ω + ∫ w qtd Γ − ∫ w Qd Ω⎟⎟ = 0
e e e

∀w ∈ U 0 (8.4)
e =1 ⎝ e e
Γq Ωe
⎠⎟

Substituting the trial and weight functions approximations, in Eqs. (8.2) and (8.3) into Eq
(8.4) yields:

nel ⎧⎪ ⎫⎪
⎪⎪ ⎪
∑ ⎨∫ w L B tDB L dd Ω + ∫ w L N qtd Γ − ∫ w L N Qd Ω⎪⎬ = 0
T eT eT e e T eT eT T eT eT
∀w 0

e =1 ⎪ Ωe Ωe
⎪⎪
⎩⎪ Γeq
⎭⎪
(8.5)

Following the procedure established in Chapter 5 we replace the arbitrary weight


functions w by an arbitrary set of parameters w 0 . The subscript zero denotes the fact
weight functions are arbitrary except for the nodes on the essential boundary
.Rearranging Eq (8.5) gives:

2
⎧⎪ nel ⎡ ⎤ ⎫⎪
⎪ ⎢ BeT tDBe Le dd Ω + NeT qtd Γ − NeTQd Ω⎥ ⎪⎪ = 0 ∀w
w ⎪⎨∑ LeT
T
⎢∫ ∫e ∫e ⎥ ⎬⎪
⎪⎪ e =1⎢ Ωe ⎥⎪
0

⎩⎪ ⎣ Γq Ω ⎦ ⎭⎪
nel ⎡ ⎤
Denoting p = ∑ L ⎢ ∫ B tDB L dd Ω + ∫ N qtd Γ − ∫ N Qd Ω⎥⎥
eT ⎢ eT e e eT eT

e =1 ⎢ Ωe Ωe ⎥
⎣ Γeq

and exploiting arbitrariness of w 0 gives

wT p = 0 ∀wT ⇒ p=0

or

nel ⎡ ⎤ nel nel


⎢ LeT BeT tDBed ΩLe ⎥ d = − LeT NeT qtd Γ +
∑ ⎢
e =1 ⎣⎢
∫ ⎥ ∑ ∫ ∑ LeT ∫ NeTQd Ω (8.6)
Ωe ⎦⎥ e =1 Γeq e =1 Ωe

Further defining:

Ke = ∫B
eT
Element conductance matrix: tDBed Ω
Ωe

Element boundary flux vector: fbe = −∫ NeT qtd Γ


Γeq

fle = ∫N
eT
Element heat source vector: Qd Ω
Ωe

yields:
nel nel nel

∑ ⎡⎣LeT Ke Le ⎤⎦ d = ∑ LeT fbe + ∑ LeT fle


e =1 e =1 e =1
(8.7)

Recognazing the global matrices and right hand side vectors to be


nel nel nel
K = ∑ LeT Ke Le fb = ∑ LeT fbe fl = ∑ LeT fle
e =1 e =1 e =1
In practice, however, we do not multiply by assembly operator, but instead carry out
direct assembly. This will be illustrated in the two numerical examples that follow.

Finally, we obtain an algebraic linear system of equations:

Kd = fb + fl = f

The application of boundary conditions and post processing is identical to that described
for one-dimensional problems in Chapter 5.

3
In the remaining of Chapter 8 we will solve a haet conduction problem on a rectangular
domain (se Figure 8.2) using two triangular elements (Example 8.1) and a single
quadrilateral element using Gauss qudrature (Example 8.2).

Example 8.1
y
t = 0.1m (thickness)

Isotropic
qn = h = -kx conductivity
⎛1 0⎞
D = k⎜ ⎟ = kI
⎝0 1⎠
k = 4 J/℃ms
Γq
1m
T=0

ΓT qn = h = -ky

T=0
x
2m
Figure 8.2: Problem definition

Consider the finite element mesh consisting of two triangles as shown below:

3 4

1
x
1 2
Figure 8.3: Finite eelement mesh

To calculate conductance matrix of the triangular element recall the Be matrix given by

⎡(y2e − y e3 ) (y e3 − y1e ) (y1e − y2e )⎤


e 1 ⎢ ⎥
B = ⎢ e e ⎥
⎢⎣(x 3 − x 2 ) (x 1 − x 3 ) (x 2 − x 1 )⎥⎦
e e e e
2Ae
where
2Ae = (x 2ey 3e − x 3ey2e ) − (x 1ey 3e − x 3ey1e ) + (x 1ey2e − x 2ey1e ) .

4
e
Since B , t, and k are constants and D = kI the expression of the conductance
matrix can be simplified as:

Ke = ∫B ∫B Betkd Ω = BeT Betk ∫ d Ω


eT
DBetd Ω = eT

Ωe Ωe Ωe
or
Ke = BeT BetkAe
The counterclockwise direction is used for local numbering of element nodes as shown in
Figure 10-4.
3

e
1
2
Figure 8.4: Counterclockwise numbering of element nodes

The Be matrix for element 1 yields:

1 ⎡−⎢
1 1 0⎤

B1 =
2 ⎢⎢⎣ 0 −2 2⎥⎥⎦

where the following numbering of element nodes is employed


y
3 (2,1)

1
x
1(0,0) 2(2,0)
Figure 8.5: Local node numbering for element 1

and the resulting conductance


⎡ 1 −1 0 ⎤ (1
⎢ ⎥
1 1 1T 1 ⎢ ⎥
K = ktA B B = 0.1 ⎢−1 5 −4⎥ (2
⎢ ⎥
⎢ 0 −4 4 ⎥ (4
⎢⎣ ⎥⎦

The Be matrix for element 2:


1 ⎡⎢ 0 1 −1⎤⎥
B2 =
2 ⎢⎣⎢−2 0 2 ⎥⎦⎥

5
which corresponds to the following node numbering for element 2:
y

3(0,1) 2 (2,1)
2

x
1(0,0)
Figure 8.6: Local node numbering for element 2

and the corresponding conductance matrix is:

⎡ 0 −4⎤⎥ (1
⎢4
⎢ ⎥
K2 = ktA2 B2T B2 = 0.1 ⎢ 0 1 −1⎥ (4
⎢ ⎥
⎢−4 −1 5 ⎥ (3
⎣⎢ ⎥⎦

The global conductance matrix is obtained by directly assembling the two element
stiffness matrices

⎡1 + 4 −1 −4 0 + 0⎤ (1 ⎡ 5 −1 −4 0 ⎤
⎢ ⎥ ⎢ ⎥
⎢ −1 5 0 − 4 ⎥ (2 ⎢−1 5 0 − 4 ⎥
⎢ ⎥ ⎢ ⎥
K = 0.1 ⎢ ⎥ = 0.1 ⎢ ⎥
⎢ − 4 0 5 − 1 ⎥ (3 ⎢− 4 0 5 − 1 ⎥
⎢ ⎥ ⎢ ⎥
⎢ 0 + 0 −4 −1 4 + 1⎥ (4 ⎢ 0 − 4 −1 5 ⎥
⎣ ⎦ ⎣ ⎦

Let us now consider the element heat source vector:

fle = ∫N
eT
Qd Ω
Ωe
where triangular element shape functions are:

1
e ( 2 3
N 1e = x ey e − x 3ey2e + (y2e − y 3e ) x + (x 3e − x 2e ) y )
2A
1
e ( 3 1
N 2e = x ey e − x 1ey 3e + (y 3e − y1e ) x + (x 1e − x 3e ) y )
2A
1
e ( 1 2
e
N3 = x ey e − x 2ey1e + (y1e − y2e ) x + (x 2e − x 1e ) y )
2A

Ae

e
In the special case when Q is constant and since Ned Ω = as can be seen from
Ωe
3
the Figure 8.7

6
N1
1

1 3

Ae
2
1
Figure 8.7: Volume under the shape function N

yields
⎡1⎤
⎢ ⎥ e
QA ⎢ ⎥
fle = Q ∫ eT
N dΩ = ⎢1⎥
Ωe
3 ⎢ ⎥
⎢1⎥
⎢⎣ ⎥⎦
e
In the present example, Q = 0 so:
⎡ 0⎤
⎢ ⎥
⎢ ⎥
fle = fl1 = fl2 = ⎢0⎥
⎢ ⎥
⎢ 0⎥
⎣⎢ ⎦⎥
The global load vector is obtained by vector assembly:

⎡ 0 + 0⎤ (1 ⎡ 0⎤
⎢ ⎥ ⎢ ⎥
⎢ 0 ⎥ (2 ⎢ 0⎥
⎢ ⎥ ⎢ ⎥
fl = ⎢ ⎥ =⎢ ⎥
⎢ 0 ⎥ (3 ⎢ 0⎥
⎢ ⎥ ⎢ ⎥
⎢ 0 + 0⎥ (4 ⎢ 0⎥
⎣ ⎦ ⎣ ⎦

We now proceed with the computation of the element boundary flux vectors given by:

fbe = −∫ N eTqtd Γ
Γq

For element 1 we have: edge Γ12 to be part of ΓT , and Γ13 to be internal edge. Thus
the only contribution to the boundary vector comes from the edge Γ23 which yields:

7
3

Internal

h = - ky
1

1 ΓT 2
Figure 8.8: Natural boundary conditions for element 1

y =1

fb1 = −∫ N1 (Γ32 )q (Γ23 )td Γ = 0.4 ∫ N1 (x = 2) ydy


Γ23 −ky y =0

To evaluate the above integral we need to compute the shape function along x=2:

⎡ 1 ⎡x 21y 31 − x 31y21 + (y21 − y 31 ) x + (x 31 − x 21 ) y ⎤ ⎤⎥


⎢ 2 ⎢⎣ ⎥⎦ ⎥
⎢ 2A
⎢ 1 ⎥
N1 = ⎢⎢ 2 ⎡x 31y11 − x 11y 31 + (y 31 − y11 ) x + (x 11 − x 31 ) y ⎤ ⎥
⎢⎣ ⎥⎦ ⎥
⎢ 2A ⎥
⎢ 1 ⎥
⎢ 2 ⎡x 1y2 − x 2y1 + (y1 − y2 ) x + (x 2 − x 1 ) y ⎤ ⎥
1 1 1 1 1 1 1 1

⎣⎢ 2A ⎣⎢ ⎦⎥ ⎦⎥
where:

1⋅ 2
A1 = =1 (x11 = 0, y11 = 0) (x 21 = 2, y21 = 0) (x 31 = 2, y31 = 1) x =2
2

which results in the following expression for the shape functions:

⎡2 + (−1) ⋅ 2 + 0 ⋅ y ⎤ ⎡ 0 ⎤
⎢ ⎥ ⎢ ⎥
1 1⎢ ⎥ ⎢ ⎥
N (x = 2) = ⎢ 1⋅ 2 − 2 ⋅ y ⎥ = ⎢1 − y ⎥
2⎢ ⎥ ⎢ ⎥
⎢ ⋅ + ⋅ ⎥ y ⎥
⎢⎣ 0 2 2 y ⎥⎦ ⎢⎣ ⎦

The resulting boundary heat flux vector for element 1 is given by:

1
⎡ ⎤ ⎡ ⎤
⎡ 0 ⎤ ⎢ c ⎥ ⎢0⎥
⎢ ⎥ ⎢ ⎥ ⎢ ⎥
y =1
⎢ ⎥ ⎢ 2 3⎥ ⎢1⎥
⎢ y y ⎥
fb1 = 0.4 ∫ ⎢(1 − y )y ⎥ dy = 0.4 ⎢ − ⎥ = 0.4 ⎢⎢ ⎥⎥
⎢ ⎥ ⎢2 3⎥ ⎢6⎥
y =0 ⎢ ⎥
⎢⎣ y
2
⎥⎦ ⎢ 3 ⎥ ⎢1⎥
⎢ y ⎥ ⎢ ⎥
⎢ ⎥ ⎢⎣ 3 ⎥⎦
⎣ 3 ⎦0

8
For element 2 we have: edge Γ12 is internal; the edge Γ13 is part of ΓT . Thus, the only
contribution to the boundary vector comes from edge Γ23 which yields:

h = - kx
3
2

Γg 2

Internal
1
Figure 8.9: Natural boundary conditions for element 2

x =2

fb2 = −∫ N2 (Γ23 )q (Γ23 )td Γ = 0.4 ∫ N2 (y = 1) xdx


Γ23 −kx x =0

At y=2 the shape function is given by:

⎡ 1 ⎡x 22y 32 − x 32y22 + (y22 − y 32 ) x + (x 32 − x 22 ) y ⎤ ⎤⎥


⎢ 2 ⎢⎣ ⎥⎦ ⎥
⎢ 2A
⎢ 1 ⎥
N2 = ⎢⎢ 2 ⎡x 32y12 − x 12y 32 + (y 32 − y12 ) x + (x 12 − x 32 ) y ⎤ ⎥
⎣⎢ ⎦⎥ ⎥
⎢ 2A ⎥
⎢ 1 ⎥
⎢ ⎡x 1 y2 − x 2 y1 + (y1 − y2 ) x + (x 2 − x 1 ) y ⎤ ⎥
2 2 2 2 2 2 2 2
⎢⎣ 2A2 ⎣⎢ ⎦⎥ ⎥⎦
where:

1⋅ 2
A2 = =1 (x 12 = 0, y12 = 0) (x 22 = 0, y22 = 1) (x 32 = 0, y32 = 1) y =1
2

which gives:

⎡ ⎤ ⎡ ⎤
⎢2 + 0 ⋅ x + (−2) ⋅ 1⎥ ⎢ 0 ⎥
1⎢ ⎥ 1⎢ ⎥
N2 (y = 1) = ⎢ 1⋅ x + 0 ⋅1 ⎥= ⎢ x ⎥
2⎢ ⎥ 2⎢ ⎥
⎢ (−1) ⋅ x + 2 ⋅ 1 ⎥ ⎢2 − x ⎥
⎢⎣ ⎥⎦ ⎢⎣ ⎥⎦

The boundary flux vector for element 2 is given by:

9
2
⎡ ⎤ ⎡ ⎤ ⎡ ⎤
⎢ 0 ⎥ ⎢ c ⎥ ⎢ 0⎥
⎢ ⎥ ⎢ ⎥ ⎢ ⎥
x =2 ⎢ ⎥ ⎢ ⎥ ⎢4⎥
⎢ x2 ⎥ ⎢ x
3
⎥ ⎢ ⎥
fb2 = 0.4 ∫ ⎢ ⎥ dx = 0.4 ⎢ ⎥ = 0.4 ⎢ 3⎥
x =0 ⎢
2 ⎥ ⎢ 6 ⎥ ⎢ ⎥
⎢ ⎥ ⎢ 2 3⎥ ⎢2⎥
⎢x x2 ⎥ x
⎢ − ⎥ x ⎢ ⎥
⎢ − ⎥ ⎢ ⎥
⎣ 2⎦ ⎣2 6 ⎦0 ⎣⎢ 3 ⎦⎥

The global boundary flux vector is obtained by direct assembly of the element vectors:

⎡ 0 + 0 + ?⎤
⎢ ⎥ ⎡?⎤
⎢ 1 ⎥ ⎢ ⎥
⎢ ⎥ ⎢?⎥
⎢ 6 +? ⎥ ⎢ ⎥
⎢ ⎥
fb = 0.4 ⎢ 2 ⎥ = ⎢⎢ ? ⎥⎥
⎢ +? ⎥ ⎢ ⎥
⎢ 3 ⎥ ⎢2⎥
⎢ 1 4 ⎥ ⎢ ⎥
⎢ ⎥ ⎣⎢ 3 ⎦⎥
⎢ 3+3 ⎥
⎣ ⎦
where the question mark indicate unknown contribution from the essential boundary.
Finally, the global force vector is given by the summation of global boundary flux and
heat source vectors:
⎡r1 ⎤
⎢ ⎥
⎢r2 ⎥
⎢ ⎥
f = fb + fl = ⎢r3 ⎥
⎢ ⎥
⎢2⎥
⎢ ⎥
⎢⎣ 3 ⎥⎦

The resulting system of equations to be solved is given by:

⎡ 5 −1 −4 0 ⎤ ⎡ 0 ⎤ ⎡r1 ⎤
⎢ ⎥ ⎢ ⎥ ⎢r ⎥
⎢ −1 5
⎢ 0 −4⎥⎥ ⎢⎢ 0 ⎥⎥ ⎢⎢ 2 ⎥⎥
0.1 ⎢ ⎥ ⎢ ⎥ = ⎢r ⎥
⎢−4 0 5 −1⎥ ⎢ 0 ⎥ ⎢ 3 ⎥
⎢ ⎥ ⎢ ⎥ ⎢2⎥
⎢ 0 −4 −1 5 ⎥ ⎢T4 ⎥ ⎢ ⎥
⎣ ⎦ ⎣ ⎦ ⎢⎣ 3 ⎥⎦
which yelds:
2 4
0.5 ⋅ T4 = ⇒ T4 =
3 3
The global and local solution (temperature) vectors are given as:
⎡ 0 ⎤
⎢ ⎥ ⎡ 0 ⎤ (1 ⎡ ⎤
⎢ 0 ⎥ ⎢ ⎥ ⎢ 0 ⎥ (1
⎢ ⎥ 1 ⎢ ⎥ ⎢ ⎥
d=⎢ ⎥ d = ⎢ 0 ⎥ (2 d2 = ⎢4 / 3⎥ (4
⎢ 0 ⎥ ⎢ ⎥ ⎢ ⎥
⎢ ⎥ ⎢4 / 3⎥ (4 ⎢ 0 ⎥ (3
⎢ 4 / 3⎥ ⎢⎣ ⎥⎦ ⎢⎣ ⎥⎦
⎢⎣ ⎥⎦

10
For postprocessing we compute fluxes starting from element 1:

q 1 = −D∇T 1 = −kIB1d1 = −kB1d1


⎡ 0 ⎤
⎡− 1 1 0 ⎤ ⎢ ⎥ ⎡ 0 ⎤
1⎢ ⎥ ⎢ ⎥ ⎢ ⎥
−4 ⎢ ⎥ ⎢ 0 ⎥ = ⎢ 16 ⎥
2 ⎢⎣ 0 −2 2⎥⎦ ⎢ ⎥ ⎢− ⎥
⎢ 4 / 3⎥ ⎢⎣ 3 ⎥⎦
⎢⎣ ⎥⎦

The flux vector in element 2 is given by


⎡ 0 ⎤
⎡ 0 1 − 1⎤ ⎢ ⎥ ⎡−8 / 3⎤
1
q 2 = −kB2 d2 = −4 ⎢⎢ ⎥ ⎢⎢ 4 / 3⎥⎥ = ⎢ ⎥
2 ⎣⎢− 2 0 2 ⎥
⎥⎦ ⎢⎢ ⎥ ⎣⎢ 0 ⎥⎦⎥

0 ⎥
⎣⎢ ⎦⎥
Remark: For this problem, we can find the exact solution which has the close form T=xy,
exact
so for node 2 (x=2, y=1), the exact solution T (x = 2, y = 1) = 2 , is quite different
from the finite solution because the finite element mesh is too coarse to capture the
essential physics of the problem.

As in 1D problems the finite element solution gives a distribution of fluxes which is


discontinuous between the elements.

8.2 Gauss quadrature in two-dimensions


In Chapter 4 we have seen that for general quadrilateral elements the shape functions are
expressed in the natuarl coordinate system and yet the integral in the weak form have to
be carried out over the physical domain of the element. Consider a typical integral
defined over the domain of a quadrilateral element

∫ f (t, r )d Ω
e
I = (8.8)
Ωe
To evaluate the integral we must express the intifinitesimal area d Ωe by in terms of
dr and dt . For this purpose Figure 8.10 shows how the infinitesimal area dt dr in the
natural coordinate system is mapped in the global Cartesian system.

11
r r
∂R
dt
∂t
dr P
y ∂R t
P dt dr
t ∂r

x
(a) (b)
Figure 8.10: Mapping of the infinitesimal areas from the naturaral coordinate system (a) to the
global cartesian coordinate sysytem

Vector R representing an arbitrary point P in Figure 8.10 is given as

R = xi + yi

The rate of change of R with respect to the natural coordinates is given by

∂R ∂x ∂y
= i+ j
∂t ∂t ∂t
∂R ∂x ∂y
= i+ j
∂r ∂r ∂r

The infinitesimal area area in the physical domain d Ωe can be determined from the
following triple product

⎛ ∂R ∂R ⎞⎟
d Ωe = ⎜⎜ dt × dr ⎟ ⋅ k
⎝ ∂t ∂r ⎠⎟
(8.9)
⎛ ∂x ∂y ∂x ∂y ⎞⎟
= ⎜⎜ − ⎟dt dr
⎝ ∂t ∂r ∂r ∂t ⎠⎟

Eq. (8.9) can be written as a 2 × 2 determinant

⎛ ∂x ∂y ⎞⎟
⎜⎜ ⎟

d Ω = det ⎜⎜ ∂t ∂t ⎟⎟⎟dt dr = det J dt dr
e
( ) (8.10)
⎜⎜⎜ ∂x ∂y ⎟⎟⎟

⎜⎝ ∂r ∂r ⎠⎟

12
Thus the integral in Eq. (8.8) can be expressed as
1 1

I = ∫ ∫ det ( J(t, r )) f (t, r )dtdr


r =−1 t =−1

We first carry out Gauss integration over t and then over r, which yields:

1 ⎛ 1 ⎞⎟ 1 n

I = ∫ ⎜⎜ ∫ det ( J(t, r )) f (t, r )dt ⎟⎟dr = ∫ ∑Wi det ( J(ti , r )) f (ti , r )dr

r =−1 ⎝t =−1 ⎠⎟ r =−1 i =1
n n
=∑ ∑WW i j det ( J(ti , rj )) f (ti , rj )
i =1 j =1

Example
Consider one of the stiffness matrix terms from the previous chapter:

x 2 =2 y2 =1
⎡(1 − y )2 + (2 − x )2 ⎤ dydx
K 11 = ∫ ∫ ⎣⎢ ⎦⎥
x1 =0 y1 =0 f (x ,y )

f (x , y ) is quadratic in x and quadratic in y . We need 2 point Gauss integration in x and


y to integrate it exactly. The relation between physical and mapped coordinates is given
by
1 1
x = (0 + 2) + t (2 − 0) = 1 + t
2 2
1 1
y = (0 + 1) + r (1 − 0) = 0.5 (1 + r )
2 2

The parametric and physical coordinates of the Gauss points are:


1 1
t1 = − ⇒ x 1 = 0.42265 r1 = − ⇒ y1 = 0.211325
3 3
1 1
t2 = ⇒ x 2 = 1.57735 r2 = ⇒ y2 = 0.788675
3 3

The corresponding function at the Gauss points is


2 2
f (x 1, y1 ) = (1 − y1 ) + (2 − x 1 ) = 3.11 f (x 2 , y1 ) = 0.8006

f (x 1, y2 ) = 2.533 f (x 1, y2 ) = 0.2233

The weights for the two-point Gauss Quadrature are

13
W1 = 1 W2 = 1 Ae = (2 − 0)(1 − 0) = 2

The resulting integral is given as:

⎛ 1 1 f (x 1, y1 ) + WW ⎞
1 2 f (x 1, y 2 ) +⎟
Ae 2 2
1 ⎜⎜WW ⎟⎟
K 11 = ∑ ∑ WW
i j f (x i , y j ) = ⎜⎜ ⎟⎟
2 1 f (x 2 , y1 ) + WW
2 2 f (x 2 , y 2 ) ⎠
4 i =1 j =1 2 ⎜⎝WW
2
4

1 1
= (3.11 + 0.8006 + 2.533 + 0.2233) = 3
2 3

Example 8.2
Consider the problem on a rectangular domain 2m x 1m as shown in Figure
y

qn = h = 30
D C
k=4 t =1
qn = h = 0 T = 1.0
Q = 45
x
A qn = h = 0 B
Figure 8.11: Problem definition for Example 2

Solve for the temperature and fluxes using Gauss Quadrature. Use a single rectangular
finite element as shown below
y

3 2

x
4 1
Figure 8.12 Global node numbering

14
4 3

1 2
Figure 8.13 Local element node numbering

We start by calculating the Jacobian matrix:


⎡x 1e y1e ⎤
⎡ ∂N 1e ∂N e
∂N e
∂N e
⎤ ⎢ ⎥
⎢ 2 3 4
⎥ ⎢x e y2e ⎥⎥

J = ⎢ ∂t e ∂t ∂t ∂t ⎥ ⎢ 2
⎥⎢ ⎥
⎢ ∂N 1 ∂N 2e ∂N 3e ∂N 4e ⎥ ⎢x 3e y 3e ⎥
⎢ ⎥⎢ ⎥
⎣ ∂r ∂r ∂r ∂r ⎦ ⎢x e y e4 ⎥⎥
⎢⎣ 4 ⎦
⎡ 0 0⎤
⎢ ⎥
⎡− (1 − r ) (1 − r ) (1 + r ) − (1 + r )⎤ ⎢ 2 0⎥ ⎡ 1 0 ⎤
1 ⎥⎢ ⎥ ⎢ ⎥
= ⎢⎢ ⎥ ⎢ ⎥=⎢ 1 ⎥
4 ⎢ −(1 − t ) −(1 + t ) (1 + t ) (1 − t ) ⎥ ⎢ 2 1 ⎥ ⎢ 0 2⎥
⎣ ⎦⎢ ⎥ ⎣ ⎦
⎢ 0 1⎥
⎣ ⎦
Note that in the case of rectangular elements the Jacobian matrix is constant and
diagonal, with diagonals J 11 and J 22 equal to half width and height of the rectangle. The
inverse of Jacobian matrix is given by
⎡ 1 0⎤
J−1 = ⎢⎢ ⎥

⎢⎣ 0 2 ⎥⎦
The derivatives of the shape functions with respect to the global Cartesian coordinates are
given
⎡ ∂N 1e ∂N 2e ∂N 3e ∂N 4e ⎤
⎢ ⎥
e ⎢ ∂t ∂ t ∂ t ∂ t ⎥
B = J⎢ e e e e⎥
⎢ ∂N 1 ∂N 2 ∂N 3 ∂N 4 ⎥
⎢ ⎥
⎣ ∂r ∂r ∂r ∂r ⎦

⎡(y − y 4 ) (y 3 − y ) (y − y2 ) (y1 − y )⎤ ⎡(y − 1) (1 − y ) (y ) (−y ) ⎤


e 1 ⎢ ⎥ = 1⎢ ⎥
B = e ⎢ ⎥
A (⎢⎣ x − x 2 ) (x 1 − x ) (x − x 4 ) (x 3 − x )⎥⎦ 2 ⎢⎢⎣(x − 2) (−x ) (x ) (2 − x )⎥⎥⎦

and the resulting stiffness matrix with constant thickness and conductivity

15
Ke = ∫B DBetd Ω = tk ∫ BeT Bed Ω
eT

Ωe Ωe

⎡(y − 1) (x − 2)⎤
⎢ ⎥
⎢(1 − y ) (−x ) ⎥ ⎡(y − 1) (1 − y ) (y ) (−y ) ⎤
1⎢ ⎥1
= 4∫ ⎢ ⎥ ⎢⎢ ⎥ dΩ


2 (y ) (x ) ⎥ 2 (x − 2) (−x ) (x ) (2 − x )
Ωe ⎢ ⎥ ⎢⎣ ⎥⎦
⎢ ⎥
⎢⎣ (−y ) (2 − x )⎥⎦

Individual stiffness matrix terms can be computed analytically. Note that not all the terms
have to be computed due to symmetry and the fact that the sum of the terms in each row
(or column) has to be equal to zero.

2 1 2 1
⎡(y − 1)2 + (x − 2)2 ⎤ dydx = 10 2
K 11e = ∫∫ K 12e = ∫ ∫ ⎡⎣−(y − 1) − x (x − 2)⎤⎦ dydx =
2
⎢⎣ ⎥⎦ 3 3
0 0 0 0
2 1 2 1
10 7
∫ ∫ ⎣⎢⎡(1 − y ) + x 2 ⎦⎥⎤ dydx = ∫ ∫ ⎣⎡y(1 − y ) − x ⎤
2
K 22e = K 23e = 2
⎦ dydx = − 3
0 0
3 0 0
2 1 2 1
5 10
K 24e = ∫∫ [y (y − 1) + x (x − 2)]dydx = − K 33e = ∫ ∫ ⎡⎣y + x 2 ⎤⎦ dydx =
2

0 0
3 0 0
3
2 1 2 1
2 10
K 34e = ∫ ∫ ⎡⎣−y + x (2 − x )⎤⎦ dydx = ∫ ∫ ⎡⎣y + (2 − x )2 ⎤⎦ dydx =
2
K 44e = 2

0 0
3 0 0
3

The resulting stiffness matrix is given by:

⎡ 10 2 −5 −7 ⎤ (4
⎢ ⎥
⎢ −5⎥⎥ (1
1 ⎢ 2 10 −7
Ke = ⎢ ⎥
3 ⎢−5 −7 10 2 ⎥ (2
⎢ ⎥
⎢−7 −5 2 10 ⎥ (3
⎣ ⎦
So the global matrix is given by:
⎡ 10 −7 −5 2 ⎤ (1
⎢ ⎥
⎢ −5⎥⎥ (2
1 ⎢−7 10 2
K= ⎢ ⎥
3 ⎢−5 2 10 −7 ⎥ (3
⎢ ⎥
⎢ 2 −5 − 7 10 ⎥ (4
⎣ ⎦

Let us now compute the load vector:

16
fle = Qt ∫ NeTd Ω
Ωe

where the shape functions are given as:

1 1 1
N 1e =
A e
(x − x 2 )(y − y 4 ) = (x − 2)(y − 1)
2 ∫∫ N dxdy = 2
1

1 1 1
N 2e = − e (x − x 1 )(y − y 4 ) = − (x − 0) (y − 1)
A 2 ∫∫ N dxdy = 2
2

1 1 1
N 3e = e (x − x 1 )(y − y1 ) = (x − 0) (y − 0)
A 2 ∫∫ N dxdy = 2
3

1 1 1
N 4e = − e (x − x 2 )(y − y1 ) = − (x − 2) y
A 2 ∫∫ N dxdy = 2
4

Thus the load vector is given as:


⎡1⎤
⎢ ⎥
⎢2⎥ ⎡1⎤
⎢1⎥ ⎢ ⎥
⎢ ⎥
⎢ 2 ⎥ 45 ⎢⎢1⎥⎥
fle = 45 ⋅ 1 ⎢⎢ ⎥⎥ = ⎢ ⎥
⎢1⎥ 2 ⎢1⎥
⎢ ⎥
⎢2⎥ ⎢1⎥
⎢ ⎥ ⎣ ⎦
⎢1⎥
⎢ ⎥
⎢⎣ 2 ⎥⎦
We proceed with the computation of the boundary vector. The only contribution to the
boundary vector comes from edge Γ 23 which yields:

x =2

fbe = −∫ Ne (Γ32 )q (Γ32 )td Γ = −30 ∫ Ne (y = 1)dx


Γ32 30 x =0

The shape function along the boundary is identical to the shape function of 1D element
and it are is equal to the half length.
⎡ 0 ⎤ ⎡ 0 ⎤
⎢ ⎥ ⎢ ⎥
⎢ 0 ⎥ ⎢ 0 ⎥
⎢ ⎥ ⎢ ⎥
fbe = −30 ⎢ ⎥=⎢ ⎥
⎢(2 ⋅ 1) / 2 ⎥ ⎢− 30 ⎥
⎢ ⎥ ⎢ ⎥
⎢(2 ⋅ 1) / 2⎥ ⎢−30⎥
⎢⎣ ⎥⎦ ⎣ ⎦
Remark: since h and t are constant the boundary vector is equally distributed between
the nodes connecting the edge on which the flux is prescribed.

Thus the force vector is given as

17
⎡22.5⎤ ⎡ 0 ⎤ ⎡ 22.5 ⎤ (4
⎢ ⎥ ⎢ ⎥ ⎢ ⎥
⎢22.5⎥ ⎢ 0 ⎥ ⎢ 22.5 ⎥ (1
⎢ ⎥ ⎢ ⎥ ⎢ ⎥
fe = ⎢ ⎥+⎢ ⎥=⎢ ⎥
⎢22.5⎥ ⎢−30⎥ ⎢−7.5⎥ (2
⎢ ⎥ ⎢ ⎥ ⎢ ⎥
⎢22.5⎥ ⎢−30⎥ ⎢−7.5⎥ (3
⎣ ⎦ ⎣ ⎦ ⎣ ⎦

So the global force vector is:


⎡ 22.5 ⎤ (1
⎢ ⎥
⎢−7.5⎥ (2
⎢ ⎥
f=⎢ ⎥
⎢−7.5⎥ (3
⎢ ⎥
⎢ 22.5 ⎥ (4
⎣ ⎦
The resulting system of equations is given as

⎡ 10 −7 −5 2 ⎤ ⎡T1 ⎤ ⎡ 22.5 ⎤
⎢ ⎥⎢ ⎥ ⎢ ⎥
⎢−7 10 2 −5⎥ ⎢T ⎥ ⎢−7.5⎥
1⎢ ⎥ ⎢ 2⎥ ⎢ ⎥
⎢ ⎥⎢ ⎥ = ⎢ ⎥
3⎢− 5 2 10 − 7 T
⎥ ⎢ 3⎥ ⎢− 7.5 ⎥
⎢ ⎥⎢ ⎥ ⎢ ⎥
⎢ 2 −5 −7 10 ⎥ ⎢T4 ⎥ ⎢ 22.5 ⎥
⎣ ⎦⎣ ⎦ ⎣ ⎦

Partitioning after the first two rows and columns yields:

⎡−7.5⎤ 1 ⎡−5 2 ⎤ ⎡1⎤ ⎡−6.5⎤


ˆ ˆ = ˆf − BT d = ⎢ ⎥ ⎢ ⎥⎢ ⎥ ⎢ ⎥
Ka ⎢ 22.5 ⎥ − 3 ⎢ 2 −5⎥ ⎢1⎥ = ⎢ 23.5 ⎥
⎣⎢ ⎦⎥ ⎣⎢ ⎥⎦ ⎣⎢ ⎦⎥ ⎣⎢ ⎥⎦
⎡ 1 ⎤
⎢ ⎥
⎡ 10 − 7 ⎤ ⎡
T ⎤ ⎡− 6.5 ⎤ ⎡ T ⎤ ⎡ 5.85 ⎤ ⎢ 1 ⎥
1⎢ ⎥ ⎢ 3⎥ = ⎢ ⎥ → ⎢ 3⎥ = ⎢ ⎥ → d = ⎢⎢ ⎥

⎢ ⎥ ⎢ ⎥ ⎢
3 ⎢⎣−7 10 ⎥⎦ ⎢⎣T4 ⎥⎦ ⎢⎣ 23.5 ⎥⎦ ⎥ ⎢ ⎥ ⎢ ⎥
⎢⎣T4 ⎥⎦ ⎢⎣11.15⎥⎦ ⎢ 5.85 ⎥
⎢ ⎥
⎢11.15⎥
⎣ ⎦
The resulting flux vector is:
⎡11.15⎤
⎢ ⎥
⎡ (y − 1 ) ( 1 − y ) (y ) ( −y ) ⎤ ⎢ 1 ⎥ ⎡20.3 − 10.6y ⎤
1 ⎥⎢ ⎥ ⎢
q = −kB1d1 = −4 ⋅ ⎢⎢ ⎥ ⎢ ⎥= ⎥
2 ⎢(x − 2) (−x ) (x ) (2 − x )⎥ ⎢ 1 ⎥ ⎢⎢⎣21.2 − 10.6x ⎥⎥⎦
⎣ ⎦⎢ ⎥
⎢ 5.85 ⎥
⎣ ⎦

18
Problems
Problem 1: Consider a triangular panel made of two isotropic materials with thermal
conductivities of k1 = 4 and k2 = 8. A constant temperature of T = 10 is prescribed along
the edge BC. The edge AB is insulated and a linear distribution of flux, h = 15x, is
applied along the boundary AC. Point Source Qs = 45 is applied at (x=3, y=0). The plate
has a constant thickness equal to 0.1.

For the finite element model consider two triangular elements, ABD and BDC. Use
appropriate node numbering.
y

B
3
Insulated
T = 10
k1=4 k2=8

D C
A x
h = 15 x

2 2

Carry out hand calculations and find the temperature and flux distribution in the plate.

Problem 2: Finite element mesh consisting of rectangular and triangular elements is


shown in the figure below. A constant temperature T=10 is prescribed along the
boundaries y=0. A constant and linear flux distribution as shown below is applied along
the edges y=x+2 and x=0, respectively. The edge x=2 is isolated. A point sources equal to
Qs = 10 acts at a point (0, 2). Assume constant thickness t=0.1. The material is isotropic
with k=1 for element 1 and k=2 for element 2. Compute the nodal temperatures.

19
y

4
h = 30
h=0 2
5 1
Q = 10 3

h = 15y h=0 2
2
1 2
x
T = 10 T = 10
2

20
Chapter

9 Finite element formulation for vector


field problems – linear elasticity

The discipline underlying linear stress analysis is the theory of elasticity. Both
linear and nonlinear elasticity have been studied extensively over the past two centuries,
beginning with Hooke, a contemporary of Newton’s, who formulated what has come to
be known as Hooke’s law, the stress-strain relation for linear materials. Linear elasticity
deals with many important phenomena, such as the stress and strain fields around cracks
and dislocations. These are not relevant to this course. Instead, the objective of this
Chapter is to present the basic assumptions and governing equations for linear elasticity.
Finite element formulation for linear elasticity is given in Chapter 14.
The theory of linear elasticity hinges on the following four assumptions:

i. deformations are small


ii. the behavior of the material is linear
iii. dynamic effects are neglected
iv. no gaps or overlaps occur during the deformation of the solid

In the following, we discuss each of these and provide some background on these
assumptions. The first assumption is also made in any strength of materials course that is
taught at the undergraduate level. One can explain this assumption by pointing out that
certain second order terms in strain displacement equations are neglected and that the
body is treated as if the shape did not change under the influence of the loads. The
second description is more useful for making judgments as to when linear analysis is
appropriate: when the application of the forces does not significantly change the
configuration of the solid or structure, then linear stress analysis is applicable. For solids
large enough so that their behavior can readily be observed by the naked eye, this
assumption implies that the deformations of the solid should not be visible. For example,
when a car passes over a bridge, the deformations of the bridge are invisible (at least we
hope so). Similarly, wind loads on a high-rise building, although the occupants can often
feel them, result in invisible deformations. The deformations of an engine block due to
the detonations in the cylinders are also invisible. On the other hand, the deformation of
a blank in a punch press is readily visible, so this problem is not amenable to linear
analysis. Other examples that require nonlinear analysis are:
1. the deformations of a car in a crash
2. the failure of an earth embankment
3. the deformations of the skin during a massage
As a rough rule, the deformations should be on the order of 10-2 of the dimensions for
linear stress analysis to apply. As we will see later, this implies that are quadratic in the
deformations are of the order 10-2 of the strains, and consequently the errors due of the
assumption of linearity are of the order of 1%.
There are many situations that are just barely linear, where the analyst must exercise
significant judgment as to whether to trust a linear analysis. For example, the
deformations of a diving board under a diver are quite visible, yet a linear analysis often
suffices. Sometimes these decisions are driven by practicality. For example, you have
probably seen the motions of the wingtip of a Boeing 747 on takeoff. Would a linear
analysis be adequate? It turns out that the design of aircraft is still mainly done by linear
analysis, because thousands of loadings need to be considered, and this is much more
complex with nonlinear analysis.
The linearity of material behavior is also a matter of judgment. Many metals exhibit a
relationship between stress and strain that deviates from linearity by only a few percent
until the onset of plastic yielding. Until the yield point, a linear stress strain law very
accurately reproduces the behavior of the material. Beyond the yield point, a linear
analysis is quite useless.
The assumption of static behavior corresponds to assuming that the accelerations
sustained during the loading are small. This statement by itself gives no meaningful
criterion, for one can immediately ask, “small compared to what?” There are several
ways to answer this question. One way is to consider the d’Alembert force f d ' Alem due to
the acceleration, which is given by

f d ' Alem = Ma

where M is the mass that is being accelerated and a the acceleration; we have put absolute
values signs on both sides of the equation because we are only interested in magnitudes.
The dynamic effect can be viewed as the overshoot you will see on a floor scale if you
jump on it compared to stepping on it slowly.
An easier way to judge the appropriateness of a static analysis, i.e. neglecting
dynamic effects, is to compare the time of load application to the lowest period of the
solid or structure. The lowest period is the time for a structure when vibrating freely, like
the vibrations of a violin of guitar string after it is plucked, to go through one cycle.
The fourth assumption states that as the solid deforms, it does not crack or
interpenetrate. Interpenetration of material is generally not possible, unless one material
is liquefied or vaporized, so this part of the assumption is just common sense. The first
part of the assumption states that the material does not crack or fail in some other way.
Obviously, materials do fail, but linear stress analysis is then not appropriate.

2
As we will come to see, this last assumption can be interpreted in terms of the
mathematical concept of continuity. It states that the deformation is smooth: the order of
smoothness that is required is something we will learn in the course.
The requirements of a linear stress analysis solution are closely related to the
assumptions. They are
1. the body must be in equilibrium
2. it must satisfy the stress-strain law
3. the deformation must be smooth
In addition to the above, in order to write a stress-strain law, we need a measure of
the strain that expresses the strain in terms of the deformation. Equilibrium requires that
the sum of the forces at any point of the solid must vanish. The second two requirements
have already been discussed.

9.1 Kinematics
The displacement vector in two dimensions is a vector with two components. We
will use a Cartesian coordinate system, so the components of the displacement are the x-
component and the y-component, so we write

⎡ux ⎤
u = ⎢u ⎥
⎢⎣ y ⎥⎦

where the subscript indicates the component. Displacements of a point (x,y) are denoted
by u = u(x,y). At a neighboring point (x+dx, y+dy), the displacements is given by u +
du. Using the chain rule, du can be written as

∂u x ∂u
dux = dx + x dy
∂x ∂y
∂u ∂u
duy = y dx + y dy
∂x ∂y

Under the assumption of small displacement gradients, we can use three independent
quantities to describe the deformation of unit square, as shown in Figure 13-1.

3
y y y
∂u x
ux + ⋅ dx
ux ∂x ∂u y
uy + ⋅ dy
∂y

dy θ2

dx uy θ1
x x x
∂u ∂u y ∂u y ∂u
εxx = x εyy = γyy = + x
∂x ∂y ∂x ∂y
Figure 9.1: Strain Components

The normal strains, εxx and εxx , can be derived exactly like the derivation for the one-
dimensional extensional strain. The shear strain, εxx , measure the change in angle
between the unit vectors in the x and y directions in units of radians. In two dimensions,
we have the relation:
∂u
ux + x dx − ux
∂x ∂u
εxx = = x
dx ∂x
∂u y
uy + dy − uy
∂y ∂u
εyy = = y
dy ∂y
∂u ∂u
γxy = θ1 + θ2 = y + x
∂x ∂y

There are two forms of the shear strain that appear commonly in finite element
software: the engineering shear strain γxy given above, and the tensor shear
strain εxy = 12 γxy .
The strains are arranged in a one dimensional column matrix ε in the as shown below
T
ε = ⎡⎢ εx εy γxy ⎤⎥
⎣ ⎦

The strains can be written in terms of the displacements in a single matrix equation if
ˆ as shown below
we define an operator ∇

4
⎡ ⎤ ⎡ ∂ / ∂x 0 ⎤
⎢ εx ⎥ ⎢⎢ ⎥u
⎥⎡ x⎤
ˆu
ε =∇ ⎢ ⎥ ∂ / ∂y ⎥ ⎢u ⎥
or ⎢ εy ⎥ = ⎢⎢ 0 ⎥ ⎢⎣ y ⎥⎦
⎢ ⎥ ⎢
⎢⎣ γxy ⎥⎦ ⎢ ∂ / ∂y ∂ / ∂x ⎥⎥
⎣ ⎦
ˆ

9.2 Stress and traction


The stress state in a two-dimensional body is described by two normal stresses σx and σy
and a shear stress σxy as illustrated in Figure 9.2.
y
σyy
σyx
σxy
σxx

x
Figure 9.2: Stress Components

The normal stresses are sometimes written as σxx and σyy . Stresses are related to
forces per unit area (or traction) acting on the plane normal to the x or y-axes. If the
traction is acting on the plane with normal vector n aligned along the x-axis than its
T
components are given as Σx = ⎡⎢σxx σxy ⎤⎥ . Likewise, if the outer normal unit vector n is
⎣ ⎦
T
taken in the direction of the y-axis the corresponding components are Σy = ⎡⎢σyx σyy ⎤⎥ .
⎣ ⎦
Stresses can be arranged in the column matrix similar to the arrangement of the
strains
σ T = ⎡⎢σx σy σxy ⎤⎥
⎣ ⎦

or they can also written as a symmetric square matrix:

⎡σxx σxy ⎤
Σ = ⎢σ ⎥ ⎡ Σy ⎤⎥
⎢⎣ xy σyy ⎥ = ⎢⎣Σx ⎦

Based on the momen equilibrium in a unit square (Figure 9.2) follows that stresses are
symmetric, i.e. σxy = σyx or Σ = ΣT .
The above form of the stress matrix can be used to obtain the tractions on any cross-
section of the body. Tractions, like stress, are forces per unit area but they are associated

5
with a specific surface, whereas the stress matrix gives you information about tractions
on any surface at a point. This relationship is written in terms of the unit normal to the
surface n, as illustrated in Figure 9.3. The thickness of the triangle is taken to be equal to
one unit.
y

ny
n
dΓx

dΓ nx
−Σ x
x
dΓy
−Σy
Figure 9.3 Relationship between stress and traction

At the surface with outer unit normal vector n, we have the traction vector t. On the
planes parallel to the coordinate planes the traction vectors are - Σx and - Σy . The
components of the unit normal vector n are given by

⎡nx ⎤
n = ⎢n ⎥
⎢⎣ y ⎥⎦

From Figure 9.3 the following relations can be established:

d Γx = n x d Γ d Γy = nyd Γ

The condition of force equilibrium of the triangle requires that

td Γ − Σxd Γx − Σyd Γy = 0

Dividing the equilibrium equation by d Γ , we obtain

t − Σx nx − Σyny = 0

Accounting for symmetry of σ we obtain

6
⎡nx ⎤
t = Σx nx + Σyny = ⎢⎡Σx Σy ⎥⎤ ⎢n ⎥ = σ Τ n = σ n
⎣ ⎦ ⎢⎣ y ⎥⎦
or in the component form

tx = σx nx + σxy ny = ΣTx n
ty = σyx nx + σyny = ΣTy n

9.3 Equilibrium
Consider the plate shown Figure 9.4 with unit thickness, the body force and
surface traction are assumed to be acting in the xy- plane.
t

b

Γ
Figure 9.4: Body forces and tractions acting on the plate

The forces acting on the plate are given by the traction vector t along the boundary
surface Γ and the body force b acting per unit volume d Ω . The body force b has the
T
components b = ⎡⎢bx by ⎤⎥ . Examples of body forces are gravity and magnetic forces.
⎣ ⎦
Thermal stresses manifest themselves as body forces as well.
Equilibrium requires that

∫ Γ
td Γ + ∫ bd Ω = 0

This expression comprises of two equations which become

∫ Γ
txd Γ + ∫ bxd Ω = 0

∫ Γ
tyd Γ + ∫ byd Ω = 0

With tx given above, the first equation may be written as

7
∫ Γ
ΣTx nd Γ + ∫ bxd Ω = 0

The first term can reformulated using Gauss’ divergence theorem to obtain

∫ Ω
(∇T Σx + bx )d Ω = 0

As this expression holds for arbitrary regions Ω , it follows that

∇T Σx + bx = 0

Inserting the expression for Σx as given above and expnding ∇T Σx gives


∂σxx ∂σ
+ xy + bx = 0
∂x ∂y

Similarly, we obtain the second differential equation:

∂σyx ∂σyy
+ + by = 0
∂x ∂y

Recalling the definitions of the stress vector and matrix differential operator
⎡∂ ∂⎤ ⎡σ ⎤
⎢ 0 ⎥ ⎢ xx ⎥
⎢ ∂x ∂y ⎥
ˆ
∇ =⎢
T
⎥ ; σ = ⎢⎢σyy ⎥⎥
⎢ ∂ ∂⎥ ⎢ ⎥
⎢ 0 ⎥ ⎢⎣σxy ⎥⎦
⎢⎣ ∂y ∂x ⎥⎦
then the equilibrium equations can be written in the compact matrix from as

ˆ Tσ + b = 0

9.4 Constitutive equation


Now let us consider the relation between stresses and strains, which is called the
constitutive relation. Examples are elasticity, plasticity, viscoelasticity, viscoplasticity,
and creep. Here, we shall focus on the simplest constitutive theory, namely linear
elasticity.
Recall that in one dimension, linear elasticity is governed by the Hooke’s
law σ = E ε , where the material constant E is Young’s modulus. In two dimensions,
maintains the concept of linearity between stresses and strains, we obtain the similar
formula
σ = Dε
which is referred to as generalized Hooke’s law, where D is 3 by 3 matrix. The matrix D
depends on whether one is assuming a plane stress or plane strain condition. These
assumptions determine how the model is simplified from a three dimensional physical

8
body to a two dimensional model. A plane strain model assumes that the body is thick
relative to the xy-plane in which the model is constructed. Consequently the strain
normal to the plane, εz is zero and the shear strains γxz and γyz are assumed to vanish. A
plane stress model is appropriate when the object is thin relative to the dimensions in the
xy-plane. In that case, we assume that no loads are applied on the z-faces of the body and
that the stress normal to the xy-plane, σz , is assumed to vanish. The physical arguments
for these assumptions are as follows. If a body is thin, since the stress σz must vanish on
the outside surfaces, there is no mechanism for developing a significant nonzero stress σz .
On the other hand, when a body is thick, significant stresses can develop on the z-faces,
in particular the normal stress σz .
For isotropic material and plane stress problem, we have

⎡1 ν 0 ⎤
⎢ ⎥
E ⎢ ⎥
D= ⎢ν 1 0 ⎥
1 − ν2 ⎢ ⎥
⎢ 0 0 (1 − ν ) 2⎥⎥
⎢⎣ ⎦

In this case, D is given by two independent coefficients. These coefficients are


Young’s modulus E and Poisson’s ratio ν . Up to now, we have the relation between the
stress and strain. D is called the elasticity matrix or the Hookean matrix. The elasticity
matrix for general anisotropic material is symmetric, but has four material constants.
Many materials, such as most steels, aluminums, or concrete, are modeled as
isotropic. An isotropic material is a material whose stress-strain law is independent of
the coordinate system, which means that regardless of the orientation of the coordinate
system, the elasticity matrix is the same.
In some circumstances, a two dimensional model is appropriate but the above
assumptions are too simplified because while the z components of the stress or strain are
constant, they are nonzero. This is called a state of generalized plane stress when σz or
εz are constant, respectively.

9.5 Strong and Weak Forms


Let us summarize the relations established so far for 2D linear elasticity.

Equilibrium equation:
ˆ Tσ + b = 0

Kinematics equation (strain- displacement relation):

ˆu
ε =∇

Constitutive equation (stress-strain relation):

9
σ = Dε
Substitute the last two relations into equilibrium equation, we obtain:

ˆ T (D∇
∇ ˆ u) + b = 0

To solve the above differential equation we have to set up the boundary conditions.

t = σn = t on Γσ
u=u on Γu

The resulting Strong Form for the linear elasticity problem in 2-D is stated as follows:

Find u on Ω such that:

ˆ T (D∇
∇ ˆ u) + b = 0 on Ω
σn = t on Γσ
u=u on Γu

To obtain the Weak Form, we first pre-multiply the Strong Form by a weight
vector w and integrate over the problem domain Ω .

ˆ T ( D∇
ˆ u)d Ω + wT bd Ω = 0
∫ Ω
wT ∇ ∫ Ω
∀w ∈ U 0
σ
where
⎡wx ⎤
w = ⎢w ⎥
⎢⎣ y ⎥⎦

Applying the Green - Gauss theorem to the first term yields

ˆ T σd Ω = ˆ w )T σ d Ω
∫ Ω
wT ∇ ∫ Γ
wT σn d Γ − ∫ (∇
t Ω ˆu
D∇

Substituting the above into the Weak Form and recalling that w vanishes on Γu yields:

ˆ w)T D∇
ˆ u dΩ =
∫ Ω
(∇ ∫ Γσ
wT t d Γ + ∫ wT b d Ω

∀w ∈ U 0

The resulting Weak Form in 2-D can be summarized as follows:

Find u ∈ U on Ω such that:

10
ˆ w)T D∇
ˆ u dΩ =
∫ Ω
(∇ ∫ Γσ
wT t d Γ + ∫ wT b d Ω on Ω ∀w ∈ U 0

Remarks: In this Chapter, some characteristics of elasticity have been presented so that
you can better understand finite element solutions. The underlying theory is quite
extensive, but fortunately, a grasp of a few basic facts will help immensely in developing
finite element models and in interpreting and checking results.
Similarly to steady state heat conduction problem considered in the previous
chapters the partial differential equation that governs linear elasticity is elliptic. One of
the most important characteristics of these types of equations is that their solutions are
very smooth. Thus, the roughness you may see in finite element solution of stresses is an
artifact of the finite element approximation.
One characteristic of elliptic systems is that they are not sensitive to local
perturbations, and as you get away from the area of the perturbation, it has very little
effect. This means that if you are interested in the stresses reasonably far from were the
loads are applied, it is not necessary to apply the loads precisely as they would be applied
in reality. For example, the loads applied by a wrench to a pipe would be difficult to
model. However, as long as the force you apply to the model is equal to that of the
wrench, the stresses at a small distance from the wrench would be affected very little.
This behavior is known as St. Venant’s effect.
Similarly, geometric errors in a model have little effect on the stresses a moderate
distance away. Thus, if you model a hole with a rather rough approximation of ten or so
straight-sided elements, the stresses near the hole can be quite erroneous, but away from
the hole, the errors can be quite small.
One peculiarity of elastic solutions that can be quite troublesome if you try to
obtain very accurate solutions is that some solutions are singular, i.e. the exact stresses
for these problems are infinite at some points. Singularities occur in corners of less than
90 degrees. Therefore, if you compare a fine mesh solution with a coarse mesh solution
near a corner, you will often find large differences in the stresses in the elements
immediately adjacent to the corner, no matter how fine you make the mesh. The stresses
in a real material will not be infinite, because most materials will not behave linearly
when the stresses get very high. For example, in a metal, a sharp corner would result in a
small area in which the material becomes plastic.
Another group of problems associated with singular solutions is problems with
point loads. For example, if a point load is applied to a two-dimensional model, then the
exact displacement solutions to the elasticity equations become infinite at the point of the
load. Again, this would mean that as you refine the mesh around the load, the
displacement would get larger and larger. In this case, you cannot use arguments like
plasticity to argue the overall meaningfulness of the results. However, according to Saint
Venant’s principle, the solution will be close to the solution for a distributed load with a
resultant equal to the point load once you get away from the area where the point load is
applied. Thus, two-dimensional solutions with point loads are also of engineering value if
the displacements in the immediate vicinity of the point load are not of interest.
In this regard, it should be stressed that a point load is an idealization of what the
actual loads, since a point load model assumes that the load is applied over zero area.
This idealization is adequate when the stresses in the area near the load are not of primary

11
interest. However, immediately under the point load, the stresses are infinite, which is
not physically meaningful.
The stresses in a solid can be thought of as a force flux: recall the analogy
between heat conduction and linear elasticity, where stress corresponds to the heat flux.
Stress behaves very much like a steady-state flow: where there are obstructions, the stress
rises, particularly around the obstruction. For example, around a hole in a plate under
tensile load, the stress increases significantly next to the hole: this is known as a stress
concentration.

9.6 Finite Element Discretization

We start by restating the Weak Form:

Find u on Ω such that:


∫ (∇ˆ w) D∇ˆ u d Ω = ∫ w t d Γ + ∫ w b d Ω on Ω ∀w ∈ U 0
T T T
Ω Γσ Ω

We will consider the problem domain to be discretized with triangular (or other) elements
as shown in Figure 9.6.

y t = t on Γσ

u = u on Γu x

Figure 9.6: Finite element model in two dimensions

First, define the shape functions and nodal displacement vector as:

12
⎡u x 1 ⎤
⎢ ⎥
⎢ uy 1 ⎥
⎢ ⎥
⎢ux 2 ⎥
⎡N 1e 0 N 2e 0 … N ne 0⎤ ⎢ ⎥
N = ⎢⎢
e ⎥
e⎥; d = ⎢⎢uy 2 ⎥⎥
e

0 N 1e 0 N 2e … 0 Nn ⎥ ⎢ ⎥
⎣⎢ ⎦ ⎢ ⎥
⎢u ⎥
⎢ xn ⎥
⎢ ⎥
⎢⎣uyn ⎥⎦

So the finite element approximation of displacement field can be expressed by:

u e = Ne d e = Ne Le d

Recall the kinematics (strain-displacement) relation:

⎡ ∂ / ∂x 0 ⎤⎥

ˆu
ε =∇ ˆ = ⎢⎢ 0
where ∇ ∂ / ∂y ⎥

⎢ ⎥
⎢ ∂ / ∂y ∂ / ∂ x ⎥
⎢⎣ ⎦⎥
The B-matrix is then given by:

⎡ ∂N e ∂N 2e ∂N ne ⎤
⎢ 1 0 0 … 0 ⎥⎥
⎢ ∂x ∂x ∂x
⎢ ⎥
⎢ ∂N 1e ∂N 2e ∂N ne ⎥
e ˆN = ⎢ 0
B =∇ e
0 … 0 ⎥
⎢ ∂y ∂y ∂y ⎥
⎢ ⎥
⎢ ∂N 1e ∂N 1e ∂N 2e ∂N 2e ∂N ne ∂N ne ⎥
⎢ … ⎥
⎢⎣ ∂y ∂x ∂y ∂x ∂y ∂x ⎥⎦

Finite element approximation of strain can be expressed by:

⎡ ⎤
⎢ εx ⎥
ε = ⎢⎢ εy ⎥⎥ = ∇
ˆ u = Be d e = Be Le d (9.1)
⎢ ⎥
⎢⎣ γxy ⎥⎦

The weight functions are approximated using the same set of shape functions:
T
we = Ne we = weT NeT = (Le w ) NeT = wT LeT NeT

(∇w
ˆ )
T T T
e
= (Be we ) = weT BeT = (Le w ) BeT = wT LeT BeT (9.2)

13
We next divide the integration domain into the summation of integrals over the elements:

∑ (∫ )
nel
ˆ we )T D∇
ˆ ued Ω −
∫ e w td Γ − ∫ e w bd Ω = 0 on Ω ∀w ∈ U 0
eT eT
(∇ (9.3)
Ωe Γσ Ω
e=1

Substituting the solution and weight functions approximations, Eqns (9.1) and (9.2) into
the Eq (9.3) yields:

nel ⎧
⎪ ⎫

⎪ ⎪
∑ ⎨
⎪ ∫
e =1 ⎪ Ωe
wT eT eT
L B DBe e
L d d Ω − ∫ wT eT
L NeT
t d Γ − ∫ wT eT
L NeT
b d Ω⎬ = 0 ∀w 0

(9.4)

⎩ Γe
σ Ωe ⎪

Rearranging Eq (9.4) gives:

⎧ nel
⎪ ⎡ ⎤⎪ ⎫
⎪ ⎢ BeT DBe Le dd Ω − NeT td Γ − NeT bd Ω⎥ ⎪ ⎪
w ⎪
T
⎨∑ L
eT
⎢∫ ∫ ∫ ⎥⎬ = 0 ∀w 0

⎪ ⎢⎣ Ωe ⎥⎦ ⎪

⎪ e =1
⎩ Γeσ Ωe ⎪

nel ⎡ ⎤
Define: p = ∑ L ⎢ ∫ B DB L dd Ω − ∫ N td Γ − ∫ N bd Ω⎥⎥
eT ⎢ eT e e eT eT

e =1 ⎢⎣ Ωe Γeσ Ωe ⎥⎦

Then due to arbitrariness of w we get

wT p = 0 ∀w 0 ⇒ p=0

or

nel ⎡ ⎤ nel nel


⎢ LeT BeT DBed ΩLe ⎥ d =
∑ ⎢
e =1 ⎣⎢
∫ ⎥ ∑ LeT
∫ NeT
t d Γ + ∑ LeT ∫ NeT bd Ω (9.5)
Ωe ⎦⎥ e =1 Γeσ e =1 Ωe

Defining:

Ke = ∫B
eT
Element stiffness matrix: DBed Ω (9.6)
e

∫N
e eT
Element boundary vector: f =
b td Γ (9.7)
Γeσ

fle = ∫N
eT
Element load vector: bd Ω (9.8)
e

yields:
nel nel nel

∑ ⎡⎣LeT Ke Le ⎤⎦ d = ∑ LeT fbe + ∑ LeT fle


e =1 e =1 e =1
(9.9)

14
The global stiffness matrix and force vectors are defined as follows:
nel nel nel
K = ∑ LeT Ke Le fb = ∑ LeT fbe fl = ∑ LeT fle
e =1 e =1 e =1

As mentioned earlier, we do not multiply by assembly operator, but instead carry out
direct assembly.

Finally, we obtain an algebraic linear system of equations:

Kd = fb + fl = f

The application of boundary conditions and post processing is identical to that described
earlier.

Example 9.1
Consider the problem on a rectangular domain 2 x 1 unit as shown below:

D C

A B

2
Figure 9.7: Problem definition

Linae eleastic material properties: Young's modulus E = 30 × 10e6, Poisson's ratio ν=


0.3.

Boundary conditions:
uAx = uAy = uBy = 0

A distributed pressure of 1000/length is applied on each edge. Equivalent concentrated


shear forces corresponding to distributed shear loading of 1000 per unit length are
applied on each edge in the directions shown.

The problem domain is discretized using a single rectangular element as shown below, in
this case the global numbering and local numbering are identical.

15
4 3

1 2
Figure 9.8: Node numbering

Define the nodal displacement vector:

T
d = de = ⎡⎢u1x u1y u2x u 2y u 3x u 3y u 4x u4y ⎤⎥
⎣ ⎦
The B-matrix for the rectangular element for elasticity problems is given by:

⎡y − y 4 0 y3 − y y − y2 y1 − y ⎤
⎢ ⎥
1
Be = e ⎢⎢ 0 x − x2 x1 − x x − x4 x 3 − x ⎥⎥
A ⎢ ⎥
⎢⎣x − x 2 y − y4 x1 − x y3 − y x − x 4 y − y2 x3 − x y1 − y ⎥

Substituting element coordinates gives:

⎡y − 1 0 1−y 0 y 0 −y 0 ⎤⎥

e 1⎢ ⎥
B = ⎢ 0 x −2 0 −x 0 x 0 2 − x⎥
2⎢ ⎥
⎢x − 2 y − 1 −x 1 − y x y 2 − x −y ⎥⎥
⎣⎢ ⎦
The constitutive matrix D is:

⎡ ⎤
⎢ ⎥ ⎡ 1 0.3
⎢ 1 ν 0 ⎥ ⎢ 0 ⎤⎥
E ⎢ ⎥ ⎢ ⎥
D= ⎢ν 1
2 ⎢
0 ⎥ = 3.3 ⋅ 107 ⎢0.3 1 0 ⎥
1−ν ⎥ ⎢ ⎥
⎢ ⎥ ⎢ 0 ⎥
⎢0 0 1 − ν ⎥ ⎣⎢
0 0.35 ⎥⎦
⎢⎣ 2 ⎥⎦

So the element stiffness matrix (also the global stiffness matrix) is:

16
K = Ke = ∫B
eT
DBetd Ω
Ωe

⎡1.6 0.65 −0.2 −0.05 −0.8 −0.65


0.05 ⎤ −0.6
⎢ ⎥
⎢ 2.9 0.05 1.1 −0.65 −1.45 −0.05 −2.55⎥⎥

⎢ ⎥
⎢ 1.6 −0.65 −0.6 −0.05 −0.8 0.65 ⎥
⎢ ⎥
⎢ 2.9 0.05 −2.55 0.65 −1.45⎥
6 ⎢ ⎥
= 8.24 ⋅ 10 ⎢
⎢ 1.6 0.65 −0.2 −0.05⎥⎥
⎢ ⎥
⎢ SYM 2.9 0.05 1.1 ⎥
⎢ ⎥
⎢ 1.6 −0.65⎥⎥

⎢ 2.9 ⎥⎥
⎢⎣ ⎦
Let us now compute the force vector:

f = fb + fl

In this case, the body force is equal to zero, so the only contribution comes from the
boundary vector:

fbe = ∫N
eT
td Γ
Γeσ
Let us first look at the edge 23. Because the traction components in both of x and y
directions are constant, instead of computing the boundary vector using (9.7), we can
equily distribute the resultant forces to corresponding terms. Therefore, for edge 23 we
have:

⎡ f ⎤ ⎡−500⎤
⎢ 2x ⎥ ⎢ ⎥
⎢ f ⎥ ⎢−500⎥
⎢ 2y ⎥ ⎢ ⎥
fΓ23 =⎢ ⎥=⎢ ⎥
⎢ f3x ⎥ ⎢−500⎥
⎢ ⎥ ⎢ ⎥
⎢ f3y ⎥ ⎢−500⎥
⎣⎢ ⎦⎥ ⎣ ⎦

Likewise, the boundary force vector corresponding to other three edges is given:

⎡ f ⎤ ⎡−1000⎤ ⎡ f ⎤ ⎡500⎤ ⎡ f ⎤ ⎡1000⎤


⎢ 3x ⎥ ⎢ ⎥ ⎢ 4x ⎥ ⎢ ⎥ ⎢ 1x ⎥ ⎢ ⎥
⎢ f ⎥ ⎢−1000⎥ ⎢ f ⎥ ⎢500⎥ ⎢ f ⎥ ⎢1000⎥
⎢ 3y ⎥ ⎢ ⎥ ⎢ 4y ⎥ ⎢ ⎥ ⎢ 1y ⎥ ⎢ ⎥
fΓ34 =⎢ ⎥=⎢ ⎥ fΓ41 =⎢ ⎥=⎢ ⎥ fΓ12 =⎢ ⎥=⎢ ⎥
⎢ f4x ⎥ ⎢−1000⎥ ⎢ f1x ⎥ ⎢500⎥ ⎢ f2x ⎥ ⎢1000⎥
⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥
⎢ f4y ⎥ ⎢−1000⎥ ⎢ f1y ⎥ ⎢500⎥ ⎢ f2y ⎥ ⎢1000⎥
⎢⎣ ⎥⎦ ⎣ ⎦ ⎣⎢ ⎦⎥ ⎣ ⎦ ⎣⎢ ⎦⎥ ⎣ ⎦
Assembling the elemental contribution to the global boundary vector yields

17
⎡ f ⎤ ⎡ 1500 ⎤
⎢ 1x ⎥ ⎢ ⎥
⎢ f ⎥ ⎢ 1500 ⎥
⎢ ⎥ ⎢
1y ⎥
⎢ ⎥ ⎢ ⎥
⎢ f2x ⎥ ⎢ 500 ⎥
⎢ ⎥ ⎢ ⎥
⎢ f2y ⎥ ⎢ 500 ⎥
f = f e = ⎢⎢ ⎥⎥ = ⎢⎢ ⎥

f
⎢ 3x ⎥ ⎢ − 1500 ⎥
⎢ ⎥ ⎢ ⎥
⎢ f3y ⎥ ⎢−1500⎥
⎢ ⎥ ⎢ ⎥
⎢ f ⎥ ⎢ −500 ⎥
⎢ 4x ⎥ ⎢ ⎥
⎢ ⎥ ⎢
⎢f ⎥ −500 ⎥⎥
⎣ 4y ⎦ ⎢⎣ ⎦

The resulting system of equations is given as

⎡1.6 0.65 −0.2 −0.05 −0.8 0.05 ⎤ ⎡ 0 ⎤ ⎡1500 + ?⎤


−0.65 −0.6
⎢ ⎥⎢ ⎥ ⎢ ⎥

⎢ 2.9 0.05 1.1 −0.65 −1.45 −0.05 −2.55⎥⎥ ⎢⎢ 0 ⎥⎥ ⎢⎢1500 + ?⎥⎥
⎢ ⎥⎢ ⎥ ⎢ ⎥
⎢ 1.6 −0.65 −0.6 −0.05 −0.8 0.65 ⎥ ⎢ f2x ⎥ ⎢ 500 ⎥
⎢ ⎥⎢ ⎥ ⎢ ⎥
⎢ 2.9 0.05 −2.55 0.65 −1.45⎥ ⎢ 0 ⎥ ⎢ 500 + ? ⎥
8.24 ⋅ 106 ⎢⎢ ⎥⎢ ⎥ = ⎢ ⎥
⎢ 1.6 0.65 −0.2 −0.05⎥⎥ ⎢⎢ f3x ⎥⎥ ⎢⎢ −1500 ⎥⎥
⎢ ⎥⎢ ⎥ ⎢ ⎥
⎢ SYM 2.9 0.05 1.1 ⎥ ⎢ f3y ⎥ ⎢ −1500 ⎥
⎢ ⎥⎢ ⎥ ⎢ ⎥

⎢ 1.6 −0.65⎥⎥ ⎢⎢ f4x ⎥⎥ ⎢⎢ −500 ⎥⎥
⎢ ⎢ ⎥
⎢⎣ 2.9 ⎥⎥ ⎢ f4y ⎥ ⎢⎢ −500 ⎥⎥
⎦⎣ ⎦ ⎣ ⎦

Exchanging rows (columns) three and four and partitioning after the first three rows and
columns yields:

⎡1.6 −0.6 −0.05 −0.8 0.65 ⎤ ⎡u ⎤ ⎡ 500 ⎤


⎢ ⎥ ⎢ 2x ⎥ ⎢ ⎥
⎢ 1.6 0.65 − 0.2 − 0.05 ⎥ ⎢u ⎥ ⎢−1500⎥
⎢ ⎥ ⎢ 3x ⎥ ⎢ ⎥
⎢ ⎥ ⎢u ⎥ ⎢ ⎥
6
8.24e ⎢ 2.9 0.05 1.1 ⎥ ⎢ 3y ⎥ = ⎢− 1500 ⎥
⎢ ⎥⎢ ⎥ ⎢ ⎥
⎢ 1.6 −0.65⎥ ⎢u 4x ⎥ ⎢ −500 ⎥
⎢ ⎥⎢ ⎥ ⎢ ⎥
⎢ 2.9 ⎥ ⎢u 4y ⎥ ⎢ −500 ⎥
⎢⎣ ⎥⎦ ⎣ ⎦ ⎣⎢ ⎥⎦

⎡u 2 x ⎤ ⎡4.6667 ⎤
⎢ ⎥ ⎢ ⎥
⎢u3x ⎥ ⎢13.333 ⎥
⎢ ⎥ ⎢ ⎥
⎢u3y ⎥ = −10−5 ⎢⎢2.3333 ⎥⎥
⎢ ⎥ ⎢ ⎥
⎢u4x ⎥ ⎢ 8.6667 ⎥
⎢ ⎥ ⎢ ⎥
⎢u4y ⎥ ⎢2.3333 ⎥
⎣⎢ ⎦⎥ ⎢⎣ ⎥⎦

18
The resulting strain vector is:

⎡ε ⎤ ⎡ 2.3333 ⎤
⎢ x⎥ ⎢ ⎥
⎢ ⎥ ˆ −5 ⎢ ⎥
ε = ⎢ εy ⎥ = ∇u = B d = −10 ⎢ 2.3333 ⎥
e e

⎢ ⎥ ⎢ ⎥
⎢⎣ γxy ⎥⎦ ⎢ 8.6667 ⎥
⎣⎢ ⎦⎥
The resulting stress vector is:

⎡ ⎤ ⎡−1000⎤
⎢ σx ⎥ ⎢ ⎥
⎢ ⎥ ⎢ ⎥
σ = ⎢ σy ⎥ = Dε = DB d = ⎢−1000⎥
e e

⎢ ⎥ ⎢ ⎥
⎢⎣σxy ⎦⎥ ⎢−1000⎥
⎣⎢ ⎥⎦

For this problem, we can find the exact solution, which has the close form:

⎡ ⎤ ⎡−1000⎤ ⎡2.3333 ⎤
⎡ux ⎤ ⎡x εx + y γxy ⎤ ⎢ σx ⎥ ⎢ ⎥ ⎢ ⎥
⎢ ⎥ ⎢ ⎥
u = ⎢u ⎥ = ⎢ ⎥ σ = ⎢⎢ σy ⎥⎥ = ⎢−1000⎥ ε = −10−5 ⎢2.3333 ⎥
⎢⎣ y ⎥⎦ ⎢ y εy ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥
⎣ ⎦
⎢⎣σxy ⎦⎥ ⎢⎢−1000⎥⎥ ⎢8.6667 ⎥
⎣ ⎦ ⎣⎢ ⎦⎥
It can be seen that we get the exact solution using a single rectangular finite element.

19
Chapter

10 Finite element formulation for beam


problems

10.1 Euler-Bernoulli Beam Theory


Let’s consider the following beam problem shown in Figure 1. The material and cross-
section of the beam are symmetric about x-y plane. The distributed load q(x) is also
symmetric about x-y plane.
y

q(x )

z
Figure 10.1:

Based on Bernoulli’s assumption the plane sections normal to the beam axis remain plane
and normal to the beam axis during the deformation. Following this assumption, we can
obtain special kinematics’ relations:
∂u ∂u ∂u ∂ 2uy
θ =− y ux = y ⋅ θ = −y y εx = x = −y
∂x ∂x ∂x ∂x 2
y

duy
A′
dx
B′

uy
ux

A
x
B -y

Figure 10.2:

According to the Hook’s Law,


∂ 2uy
σx = E εx = −Ey
∂x 2
This stress component gives rise to a bending moment m on section.
2
2 ∂ uy ∂2uy
m = ∫ −y σxdA = ∫ Ey dA = EI
A A
∂x 2 ∂x 2

Where I is the moment of inertia about z axis.


P(x)

s s + ds

m m + dm

dx

Figure 12-3:

Now let’s consider the equilibrium conditions for an infinite small part of beam. The
vertical equilibrium requires that:
ds
P=
dx

The moment equilibrium requires that:

2
dm ∂ 3uy
s =− = −EI
dx ∂x 3

Combining above equations yields:


d 2 ⎛⎜ ∂ uy ⎞⎟
2
d ⎛ dm ⎞⎟
P= ⎜− ⎟ = − 2 ⎜⎜EI ⎟
dx ⎜⎝ dx ⎠⎟ dx ⎝⎜ ∂x 2 ⎠⎟⎟

For simplification, only constant EI along the beam would be considered in this chapter.
Therefore, Governing differential equation for the beam is:
∂ 4uy
EI +P = 0
∂x 4

If we use u instead of uy , the governing equation is:

∂ 4u
EI +P = 0
∂x 4

10.2 The Weak Form


The strong form for beam problem is:
∂ 4u
EI +P = 0 0≤x ≤L
∂x 4
∂u
u = u on Γu = θ on Γθ
∂x
∂ 3u ∂ 2u
−EI = S on ΓS EI = M on ΓM
∂x 3 ∂x 2
Γu ∪ ΓS = Γ Γ θ ∪ ΓM = Γ

To obtain the Weak Form, we multiply the above differential equation by arbitrary
weight function v (x ) , and integrate over the problem domain.
L
⎛ ∂ 4u ⎞
∫ ⎜⎜⎜⎝EI ∂x 4 + P ⎠⎟⎟⎟wdx = 0 ∀v
0
By using integration by parts,
x =L x =L x =L
L ∂ 4u ⎡ ∂ 3u ⎤ L ∂ 3u ∂w ⎡ ∂ 3u ⎤ ⎡ ∂ 2u ∂w ⎤ L ∂ 2u ∂ 2w
∫ 0
EI
∂x 4
vdx =
⎢⎣ ∂x 3 ⎥⎦ x =0 ∫0
⎢ EI v ⎥ − EI
∂x 3 ∂ x
dx =
⎢⎣ ∂x 3 ⎥⎦ x =0 ⎢⎣ ∂x 2 ∂x ⎥⎦ x =0 ∫0
⎢ EI v ⎥ − ⎢EI ⎥ + EI
∂x 2 ∂ x 2
d

Therefore, equation can be written as:

3
x =L x =L
L ∂ 2u ∂2w ⎡ ∂ 3u ⎤ ⎡ ∂2u ∂w ⎤ L

∫0 ∂x 2 ∂x 2
EI dx + ⎢ EI w ⎥ − ⎢EI
⎢⎣ ∂x ⎥⎦ x =0 ⎢⎣ ∂x ∂x ⎥⎦ x =0
3 2
⎥ + ∫ Pwdx = 0
0

Let’s assume that:


∂u
u =u =θ on x = 0
∂x
∂ 3u ∂ 2u
−EI = S EI = M on x = L
∂x 3 ∂x 2
Incorporating BC the above equation can be further written as:
L ∂ 2u ∂2v L ⎡ ∂w ⎤ ⎡ ∂ 2u ∂w ⎤ ⎡ ∂ 3u ⎤
∫0 ∂x 2 ∂x 2
EI dx + ∫0 Pwdx − [v ]x =L S − ⎢ ⎥
⎢⎣ ∂x ⎥⎦ x =L
M + ⎢ EI ⎥ − ⎢
⎢⎣ ∂x 2 ∂x ⎥⎦ x =0 ⎢⎣
EIw ⎥
∂x 3 ⎥⎦ x =0
=0

Assuming that the weight function and its derivative vanish on L1g and L2g , respectively,
yields the Weak Form:
L ∂ 2u ∂ 2w L ⎡ ∂w ⎤

0
EI 2
∂x ∂ x 2
dx + ∫ Pwdx − [v ]ΓS S − ⎢
0
⎥ M =0
⎢⎣ ∂x ⎥⎦ ΓM
∂u
u = u on Γu = θ on Γθ
∂x
∂w
w = 0 on Γu = 0 on Γθ
∂x

10.3 Finite Formulation for Beam Element


Preprocessing
We first divide the problem domain into elements and integrate over element subdomains.

1 2 e
x
1 2 nen
x =a x =b

Figure 12-4:

nel ⎛ xnen e
∂ 2u e ∂2w e e
⎡ ∂w e ⎤ ⎞⎟
⎜⎜ x nen

e =1 ⎝⎜⎜ ∫x1e
EI
∂x 2 ∂x 2
dx + ∫x1e Pw e
dx + [v e
]ΓM
M − ⎢ ⎥ S
⎣⎢ ∂x ⎦⎥ ΓS ⎠⎟
⎟⎟ = 0

where, nel – number of elements nen – number of element nodes.

4
10.3.1 Solution approximation
y

u2
u1

θ1 L θ2
x
1 2
Figure 10.5:

Recall the homework problem in Chapter 4. We have derived shape functions for 2-node
element, which have continuity of derivatives. This type of function is called C1
continuous. Arranging nodal solution as d e = u1 θ1 u2 { }
θ2 the corresponding shape
functions are given as
⎛ x ⎟⎞
2
⎛ x ⎞⎟
3 ⎡⎛ x ⎞ ⎛ x ⎞⎟
2
⎛ x ⎞⎟ ⎤⎥
3
⎢ ⎟
N 1 = 1 − 3 ⎜⎜ ⎟ + 2 ⎜⎜ ⎟ ; N 2 = L ⎜⎜ ⎟ − 2 ⎜⎜ ⎟ + ⎜⎜ ⎟
⎝L ⎠ ⎝L ⎠ ⎢⎣⎝ L ⎠ ⎝L ⎠ ⎝ L ⎠ ⎥⎦
⎛ x ⎞⎟
2
⎛ x ⎞⎟
3 ⎡ ⎛ x ⎞2 ⎛ x ⎞3 ⎤
N 3 = 3 ⎜⎜ ⎟ − 2 ⎜⎜ ⎟ ; N 4 = L ⎢− ⎜⎜ ⎟⎟ + ⎜⎜ ⎟⎟ ⎥
⎝L ⎠ ⎝L ⎠ ⎢⎣ ⎝ L ⎠ ⎝ L ⎠ ⎥⎦
or
u e = Ne de = Ne Le d
The corresponding derivatives are given as
du e d 2u e dBe e dBe e
= Be de = Be Le d = d = Ld
dx dx 2 dx dx
where
1 ⎡ ⎛x ⎞ ⎛x ⎞ ⎤
2 ⎡ ⎛x ⎞ ⎛x ⎞ ⎤
2
B1 = ⎢−6 ⎜⎜ ⎟⎟ + 6 ⎜⎜ ⎟⎟ ⎥ ; B2 = ⎢1 − 4 ⎜⎜ ⎟⎟ + 3 ⎜⎜ ⎟⎟ ⎥
L ⎢⎣ ⎝ L ⎠ ⎝ L ⎠ ⎥⎦ ⎢⎣ ⎝L ⎠ ⎝ L ⎠ ⎥⎦
1 ⎡ ⎛x ⎞ ⎛x ⎞ ⎤
2 ⎡ ⎛x ⎞ ⎛x ⎞ ⎤
2
B3 = ⎢6 ⎜⎜ ⎟⎟ − 6 ⎜⎜ ⎟⎟ ⎥ ; B4 = ⎢−2 ⎜⎜ ⎟⎟ + 3 ⎜⎜ ⎟⎟ ⎥
L ⎢⎣ ⎝ L ⎠ ⎝ L ⎠ ⎥⎦ ⎢⎣ ⎝ L ⎠ ⎝ L ⎠ ⎥⎦
and
dB1 1 ⎡ ⎛ x ⎞⎤ dB 1⎡ ⎛ x ⎞⎤
= 2 ⎢−6 + 12 ⎜⎜ ⎟⎟⎥ ; 2 = ⎢−4 + 6 ⎜⎜ ⎟⎟⎥
dx L ⎢⎣ ⎝ L ⎠⎥⎦ dx L ⎢⎣ ⎝ L ⎠⎥⎦
dB3 1 ⎡ ⎛ x ⎞⎤ dB 1⎡ ⎛ x ⎞⎤
= 2 ⎢6 − 12 ⎜⎜ ⎟⎟⎥ ; 4 = ⎢−2 + 6 ⎜⎜ ⎟⎟⎥
dx L ⎢⎣ ⎝ L ⎠⎥⎦ dx L ⎢⎣ ⎝ L ⎠⎥⎦

5
10.3.2 Weight function approximation
T T T
w e = (w e ) = (Ne w e ) = w eT N eT = (Le w) N eT = w T LeT NeT
T
dw e ⎛⎜dw e ⎞⎟ e e T T
⎟⎟ = (B w ) = w B = (L w ) B = w L B
eT eT e eT T eT eT
= ⎜⎜
dx ⎝ dx ⎠

Substituting the shape and weight functions into the Weak Form yields

nel
T eT ⎜
⎛ xnene
⎛dBe ⎞⎟
T
⎛dBe ⎞⎟ e e
xnen
eT ∂v
e ⎞⎟

e =1
w L ⎜ ∫ e


⎜⎜⎝ x1 ⎝⎜ dx ⎠⎟ ⎟ EI ⎜
⎜ ⎟
⎝⎜ dx ⎠⎟
L d dx + ∫ e
x1
NeT
Pdx − NeT
( ΓS ) S − N
∂x
( Γ M ) M ⎟⎟ = 0
⎠⎟
∀w 0

⎛ e e T ⎞⎟
⎜⎜ xnen ⎜⎛dB ⎞⎟ EI ⎛⎜dB ⎞⎟dx Le d =
e

nel ∫ ⎜
⎜⎜ x1e ⎝⎜ dx ⎠⎟

⎝⎜⎜ dx ⎠⎟
⎟ ⎟⎟
⎟⎟
eT ⎜ ⎟⎟ = 0
∑ L ⎜⎜ nel nel ⎛ ⎛ e T ⎞ ⎞ ⎟
⎜ ⎛ ⎞ ⎛ ∂ N ⎞ ⎟⎟⎟⎟⎟⎟⎟
e

⎜⎜−∑ ⎜LeT
xnen
⎜LeT ⎜⎜⎜
⎠⎟ ∑
e =1
⎟ ⎟
∫x1e ⎜ ( ) ( )
eT eT
N Pdx + ⎟ Γ M + N Γ S ⎟⎟⎟
⎜⎜⎝ e =1 ⎝⎜ e =1 ⎜

⎝ ⎜⎝⎜⎝ ∂x ⎠⎟
⎜⎜ M S
⎠⎟⎠⎟⎟⎟⎠
Finally, we define the following element matrices:
T
e
x nen ⎛dBe ⎞⎟ ⎛dBe ⎞⎟
Ke = ∫ e ⎜⎜⎜ ⎟ EI ⎜ ⎟dx …… Element stiffness matrix
x1 ⎝ dx ⎠⎟ ⎝⎜⎜ dx ⎠⎟

For the C1 continuous 2-node shape functions the resulting stiffness matrix is given:

⎡ 12 6L −12 6L ⎤
⎢ ⎥
⎢ 2 2 ⎥
EI ⎢ 6L 4L −6L 2L ⎥
T
e
xnen ⎛dBe ⎞⎟ ⎛dBe ⎞⎟
e
K = ∫ ⎜⎜ ⎟ EI ⎜⎜⎜ ⎟⎟dx = 3 ⎢ ⎥
x1e ⎝⎜ dx ⎠⎟ ⎝ dx ⎠ L ⎢−12 −6L 12 −6L ⎥
⎢ ⎥
⎢ 6L 2L2 −6L 4L2 ⎥
⎢⎣ ⎥⎦

⎛⎛ ∂Ne ⎞T ⎞
f = ⎜⎜⎜⎜⎜⎜
e ⎟⎟ (ΓM ) M ⎟⎟ + (NeT (ΓS ) S ) …… Element boundary vector

⎝⎜⎝ ∂x ⎠⎟ ⎠⎟
b

e
x nen
fle = −∫ e NeT Pdx …… Element load vector
x1

⎛ nel eT e e ⎞⎟ nel nel


⎜⎜∑ L K L ⎟ d = ∑ (LeT f e ) + ∑ LeT f e
⎜⎝ e =1 ⎠⎟
b l
e =1 e =1

The global matrices are obtained by assembling local matrices:

6
nel
K = ∑ LeT Ke Le global stiffness matrix
e =1
nel
fb = ∑ (LeT fbe ) global boundary vector
e =1
nel
fl = ∑ (LeT fl e ) global load vector
e =1

Kd = fl + fb = f

4. Apply boundary conditions, partition and solve.


Before solving the system of equations the global system is partitioned based on the
prescribed boundary conditions:
⎛ A B⎞⎟ ⎧ ⎪⎪d⎫ ⎪⎪ ⎪⎧ r⎪ ⎫
⎜⎜⎜ ⎟⎟ ⎪ ⎪ = ⎪ ⎪ solve ˆ
⎜⎜BT Kˆ ⎟⎟ ⎪d⎨
ˆ



⎪ˆf ⎬⎪ ⎯⎯⎯→ d
⎝ ⎠⎩ ⎪⎪ ⎭ ⎪⎪ ⎩⎪ ⎭⎪

5. Post-processing
Once the nodal solution is evaluated we can post-process the value of the displacements,
moments and shear forces.
u e = Ne de = Ne Le d
d 2u e dBe e
Me = EI = EI Ld
dx 2 dx
d 3u e d 2 Be e
Se = −EI = −EI Ld
dx 3 dx 2

Illustrative Example
Consider the following example. The beam ABC shown below is fixed at left side and
simply supported at right side. The beam is divided into two elements.
y

P1 = 10
P2 = 5 P3 = 20
q=1
M = 20
1 2 3
x
A 1 B 2 C

4 4 4
EI = 10000
Figure 10.6:

7
y

u1 u3 u5
1 2 3
x
u2 u4 u6
A 1 B 2 C

Figure 10.7:

1. Element stiffness matrix computation

For Element 1 we have:


EI = 10 L=8

⎡ 12 6L −12 6L ⎤ ⎡ 0.23 0.94 0.94 ⎤ (1)


−0.23
⎢ ⎥ ⎢ ⎥
⎢ 6L 4L2 −6L 2L2 ⎥ ⎢ 0.94 5.00 −0.94 2.50 ⎥⎥ (2)
EI ⎢ ⎥ ⎢
Ke = 3 ⎢ ⎥ = 103 ⎢ ⎥
L ⎢ − 12 − 6L 12 − 6L ⎥ ⎢−0.23 −0.94 0.23 −0.94⎥ (3)
⎢ ⎥ ⎢ ⎥
⎢ 6L 2L2 −6L 4L2 ⎥ ⎢ 2.50 −0.94 5.00 ⎥⎥ (4)
⎢⎣ ⎥⎦ ⎢⎣ 0.94 ⎦
and similarly for Element 2:
EI = 10 L =4

⎡ 12 6L −12 6L ⎤ ⎡ 1.88 3.75 −1.88 3.75 ⎤ (3)


⎢ ⎥ ⎢ ⎥
⎢ 6L 4L2 −6L 2L2 ⎥ ⎢ 3.75 10.00 −3.75 5.00 ⎥ (4)
EI ⎢ ⎥ ⎢ ⎥
Ke = 3 ⎢ ⎥ = 103 ⎢ ⎥
L ⎢ − 12 − 6L 12 − 6L ⎥ ⎢ − 1.88 − 3.75 1.88 − 3.75 ⎥ (5)
⎢ ⎥ ⎢ ⎥
⎢ 6L 2L2 −6L 4L2 ⎥ ⎢ 3.75 5.00 − 3.75 10.00 ⎥ (6)
⎣⎢ ⎥⎦ ⎣⎢ ⎦⎥

2. Computation of the global stiffness matrix

The global stiffness matrix is computed using direct assembly operation

8
⎡ 0.23 0.94 −0.23 0.94 0 0 ⎤ (1)
⎢ ⎥
⎢ 0.94 5.00 − 0.94 2.50 0 0 ⎥ (2)
⎢ ⎥
⎢ ⎥
⎢ −0.23 −0.94 2.11 2.81 −1.88 3.75 ⎥ (3)
K = 103 ⎢ ⎥
⎢ 0.94 2.50 2.81 15.00 −3.75 5.00 ⎥ (4)
⎢ ⎥
⎢ 0 0 − 1.88 − 3.75 1.88 − 3.75 ⎥( )
⎢ ⎥ 5
⎢ ⎥
⎢⎢ 0 0 3.75 5.00 −3.75 10.00 ⎥⎥ (6)
⎣ ⎦

3. Boundary vector computation

⎛⎛ ∂Ne ⎞T ⎞

f = ⎜⎜⎜⎜⎜
e ⎟⎟ (ΓM ) M ⎟⎟ + (NeT (ΓS ) S )

⎝⎜⎝ ∂x ⎠⎟ ⎠⎟
b

For element 1: fb1 = 0



⎪ 0 ⎫⎪ (3)

⎪ ⎪


⎪ 0 ⎪
⎪ ( 4)
{ } { }
T T
For element 2: fb2 = 0 0 0 1 ×M + 0 0 1 0 ⎪
×S = ⎨ ⎪


⎪−20⎪ ⎪ (5)

⎪ ⎪


⎪ 20 ⎪⎪ (6)
⎩ ⎭
Global boundary vector can be obtained by direct assembly:

⎪ 0 ⎫⎪ (1)

⎪ ⎪


⎪ 0 ⎪
⎪ (2)

⎪ ⎪


⎪ 0 ⎪ ⎪ (3)
fb = ⎪
⎨ ⎪


⎪ 0 ⎪⎪ (4)

⎪ ⎪


⎪− 20 ⎪
⎪ (5)

⎪ ⎪

⎪ 20 ⎪ (6)

⎩ ⎪

Note: The final result is the same as putting −EI (Lh )h at the node where the moment
and/or shear force are prescribed and zero at all other nodes. This property can be used to
directly compute the boundary vector.

4. Load vector computation


e
x nen
fle = −∫ e NeT Pdx
x1

For element 1:

9
⎡ ⎧
⎪N1 ⎫⎪ ⎧N 1 (x
⎪ ⎫ ⎤ ⎧
= 4)⎪ ⎪ −9 ⎫⎪ (1)
⎢ ⎪ ⎪ ⎪
⎪⎪ ⎪
⎪⎪ ⎥⎥ ⎪ ⎪
⎢ e ⎪ ⎪ ⎪ ⎪ ⎪⎪ ⎪⎪
⎢ x nen ⎪N 2 ⎪ ⎪N 2 (x = 4)⎪⎪ ⎥⎥ ⎪ 15.3⎪ (2)
fl1 = − ⎢ ∫ e ⎪ ⎪ qdx + ⎪ P = ⎪ ⎪
⎢ x1 ⎨ ⎪
⎪N 3⎪




⎪ N 3 (x = 4)⎪
⎬ 1⎥ ⎨
⎪ ⎪
⎪ − 9


⎪ (3)
⎢ ⎪ ⎪ ⎪ ⎪ ⎥ ⎪ ⎪
⎢ ⎪ ⎪
⎪N 4 ⎪ ⎪
⎪ ⎪ ⎥ ⎪ ⎪
⎢⎢⎣ N (x = 4)⎪ ⎪15.3⎪ (4)
⎪ ⎭
⎩ ⎪ ⎪⎩
⎪ 4 ⎪ ⎥⎥⎦ ⎩

⎭ ⎪ ⎪

For element 2:
⎡⎧N 1 (x = 0)⎪ ⎫ ⎤ ⎧ ⎪ (3
⎢⎪⎪ ⎪ ⎪⎪ ⎥ ⎪⎪5⎪⎫
⎢⎪N (x = 0)⎪ ⎥ ⎪0⎪ (4 ⎪ ⎪
⎢⎪ 2 ⎪ ⎥ ⎪ ⎪
fl = − ⎢⎨⎪
2
⎬ P2 ⎥⎥ = ⎨⎪ ⎬⎪

⎢⎪ N (x = 0) ⎪ ⎪0⎪ (5
⎢⎪ ⎪
3 ⎪
⎪ ⎥ ⎪ ⎪ ⎪

⎢⎪ ⎪ ⎥ ⎪ ⎪
⎢⎢⎣⎪⎩ ⎪ ⎥⎥⎦ ⎪⎪⎩0⎪⎪⎭ (6
⎪N 4 (x = 0)⎪⎭
⎪ ⎪
The direct assembly of the load vector yields

⎪⎧⎪ −9 ⎫⎪⎪ (1)


⎪⎪ ⎪
⎪⎪−15.3⎪⎪⎪ (2)
⎪⎪ ⎪
⎪⎪ −4 ⎪⎪⎪ (3)
fl = ⎨ ⎬
⎪⎪ 15.3 ⎪⎪ (4)
⎪⎪ ⎪
⎪⎪ 0 ⎪⎪⎪ (5)
⎪⎪ ⎪
⎪⎪ 0 ⎪⎪⎪ (6)
⎩ ⎭

5. Application of boundary conditions and solution

The assembled and partitioned system is given below.


⎡ 0.23 0.94 −0.23 0.94 0 0 ⎤ ⎧⎪u1 = 0⎪⎫ ⎧⎪ −9 + r1 ⎫⎪
⎢ ⎥ ⎪⎪ ⎪ ⎪ ⎪
⎢ 0.94 5.00 − 0.94 2.50 0 0 ⎥ ⎪θ = 0⎪⎪ ⎪⎪⎪−15.3 + r ⎪⎪⎪
⎢ ⎥ ⎪⎪ 1 ⎪⎪ ⎪ 2
⎪⎪
⎢ ⎥⎪ ⎪ ⎪⎪ ⎪⎪
⎢− 0.23 − 0.94 2.11 2.81 − 1.88 3.75 ⎪ u
⎥ ⎪⎪ 2 ⎪⎪ ⎪⎪⎪ − 4
⎢ ⎥⎨ =
⎬ ⎨ ⎪

⎢ 0.94 2.50 2.81 15.00 −3.75 5.00 ⎥ ⎪⎪ θ2 ⎪⎪ ⎪⎪ 15.3 ⎪⎪
⎢ ⎥⎪
⎢ 0 0 − 1.88 − 3.75 1.88 − 3.75 ⎥ ⎪⎪ u 3 ⎪⎪⎪ ⎪⎪⎪ −20 ⎪⎪⎪
⎢ ⎥⎪ ⎪ ⎪ ⎪⎪
⎢ ⎥ ⎪⎪ θ ⎪⎪ ⎪⎪ ⎪⎪
⎢ 0 0 3.75 5.00 −3.75 10.00 ⎥⎥ ⎪⎪⎩ 3 ⎪⎪⎭ ⎪ 20
⎣⎢ ⎦ ⎩⎪ ⎪⎭
which yields:
⎪⎧⎪u2 ⎪⎫⎪ ⎧⎪⎪−0.55⎫⎪⎪
⎪⎪θ ⎪⎪ ⎪⎪−0.11⎪⎪
⎪⎪ 2 ⎪⎪ ⎪⎪ ⎪⎪ ⎪⎧⎪r1 ⎪⎫⎪ ⎪⎧⎪ 33 ⎪⎫⎪
⎨u ⎬ ⎨ = ⎬ ⎨r ⎬ = ⎨ ⎬
⎪⎪ 3 ⎪⎪ ⎪⎪−1.03⎪⎪ ⎪⎩⎪ 2 ⎪⎭⎪ ⎪252⎪
⎪⎪ ⎪⎪ ⎪⎪ ⎪⎪ ⎩⎪ ⎭⎪
θ
⎪⎩⎪ 3 ⎪⎭⎪ ⎪ − 0.12 ⎪
⎩⎪ ⎭⎪

10
6. Postprocessing

⎡0⎤
⎢ ⎥
2 e ⎡ 1 1 1 `⎤⎢ 0⎥
du dB dB2 dB3 dB4 ⎢ ⎥
M 1 = EI = EI ⎢ 1 ⎥ ⎢ ⎥ = −240.64 + 25.785x
dx 2 ⎢
⎣ dx dx dx dx ⎥⎦ ⎢u2 ⎥
⎢ ⎥
θ
⎣⎢ 2 ⎥⎦
⎡0⎤
⎢ ⎥
d 3u e ⎡ d 2B11 d 2B21 d 2B31 d 2B41 ⎤ ⎢⎢ 0 ⎥⎥
S 1 = −EI = − EI ⎢ 2 ⎥ ⎢ ⎥ = −25.785
dx 3 ⎢⎣ dx dx 2 dx 2 dx 2 ⎥⎦ ⎢u2 ⎥
⎢ ⎥
θ
⎣⎢ 2 ⎦⎥
⎡u2 ⎤
⎢ ⎥
2 e ⎡ 2 2 2 2 ⎤ ⎢θ ⎥
d u dB dB dB dB 4 ⎢
⎥ ⎢ ⎥⎥ = −104.5 + 39.75x
2
M 2 = EI = EI ⎢ 1 2 3

dx 2
⎢⎣ dx dx dx dx ⎥⎦ ⎢u 3 ⎥
⎢θ ⎥
⎣⎢ 3 ⎥⎦
⎡u2 ⎤
⎢ ⎥
3 e ⎡ 2 2 2 2 2 2 2 2 ⎤ ⎢θ ⎥
du d B1 d B2 d B3 d B4 ⎢ 2 ⎥
S 2 = −EI = − EI ⎢ ⎥ = −39.75
dx 3 ⎢⎣ dx 2 dx 2 dx 2 dx 2 ⎥⎦ ⎢⎢u 3 ⎥⎥
⎢θ ⎥
⎣⎢ 3 ⎥⎦

11
Chapter

11 Finite element programming with


MATLAB

Introduction
In this chapter we present as simple finite element program written in MATLAB. The
computer program is developed for one dimensional problems, but the data structure is
flexible for it to be extended to two- or three- dimensional problems. In the program
presented the focus is clarity and and not on computational efficiency. MATLAb is
selected due its simplicity and trasperancy. For example, one page in MATLAB code
may equivalent to many pages of other programming language codes.

The main routines in the finite element code are:

1. Preprocessing including input data, meshing and allocation of proper arrays.


2. Calculation of element stiffness matrices and force vectors
3. Direct assembly of matrices and vectors
4. Partition and solution
5. Postprocessing for secondary variables

Explanation for various MATLAB ruotines (stored in *.m files) are described as
comments within each subroutine.

Notations and definitions


nsd: Dimension of the problem (e.g. 1-D problem)
nnp: number of total nodes
nel: number of total elements
nen: number of nodes in each element
neq: number of total equations
ng: number of essential B.C.'s
nh: number of natural B.C.
np: number of point sources
ID: Destination array
Reordered global node number = ID (Initial global node number)
IE: Connectivity information array
Initial global node number = IEN (Local node number, element number)
LM: Location matrix
Reordered global node number = LM (Local node number, element number)
FIX: Flag array for essential B.C., natural B. and point source
FIX ((Initial global node number) = Flag
Flag values are as follows:
0 – zero poit source
1 – nonzero point source
2 – essential boundary condition
3 – natural boundary condition
g: vector (scalar) of essential boundary condition
h: vector (scalar) of essential boundary condition
Q: matrix of values of heat supply – defined at the element nodes
Q (Local node number, element number) = heat supply input
x: vector (matrix in 2D) of nodal coordinate
a: vector of crosssectional areas (1-D) or thickenss(2-D)
k: vector of material conductivities
K: Global stiffness matrix
F: Global "force" vector

MATLAB Finite element program listing

main.m
% FE main program for one-dimesinal problems

clear all;clf; hold on;


global nnp nel nen nsd neq fix
global Q Qs g gg h ID IEN LM x a k

% Read data, get mesh information

[K,F] = init;

% Calculate and assemble element stiffness matrices Ke and element load vectors fe

for e = 1:nel
[Ke,fe] = element(e);
[K ,F ] = assemble(e,Ke,fe,K,F);
end

% Add point sources to the load vector vector

2
F = p_source(F);

% Partition the system of equations and solve

[KK,FF] = bc(K,F);

% Solve linear system of equations


TT = KK\FF;

% Post process the temperature and fluxes


for e = 1:nel
post(TT,e);
end

init.m

% Preprocessing

function [K,F] = init


global nnp

% Read data from input data file. The input data includes geometric, material, and loading data
data;

% Reordering
mesh;

% Zero out K and F


F = zero(nnp,1);
K = zero(nnp,2);

data.m

% input data information


function input_data
global nsd nnp nel nen neq fix
global Q Qs g ng gg h ID IEN LM x a k

nsd = 1;
nnp = 4;
nel = 3;
nen = 2;

ng = 1;
nh = 1;
np = 0;

% Node #, coords
x(1) = 2.0;
x(2) = 4.0;
x(3) = 6.0;
x(4) = 8.0;

% Element #, connectivity, Q values

3
IEN(1,1) = 1;
IEN(2,1) = 2;
Q(1,1) = 100.0;
Q(2,1) = 100.0;
IEN(1,2) = 2;
IEN(2,2) = 3;
Q(1,2) = 100.0;
Q(2,2) = 100.0;
IEN(1,3) = 3;
IEN(2,3) = 4;
Q(1,3) = 100.0;
Q(2,3) = 100.0;

% Material property
a = 10;
k = 5;

fix = zero(nnp,1);
g = zero(nnp,1);
Qs = zero(nnp,1);

% Essential B.C.
fix(1) = 2;

% Natural B.C.
fix(4) = 3;
h = -15;

% Point sources

mesh.m

% Function to describe the geometry,


% B.C. and Connectivity
function mesh
global nnp nel nen ng
global fix ng g gg ID IEN LM

neq = 0; % neq: # of equations


count = 0;
for loop = 1:nnp
if fix(loop) == 2
count = count + 1;
ID(loop) = count;
gg(count) = g(loop);
else
ID(loop) = nnp - neq;
neq = neq + 1;
end
end

for loop1 = 1:nel


for loop2 = 1:nen
LM(loop2,loop1)=ID(IEN(loop2,loop1));
end

4
end

zero.m

% Function to zero out


% a vector when d == 1
% or a n by n matrix when d == 2

function y = zero(n,d)

if d == 1
for loop = 1:n
y(loop) = 0.0;
end
elseif d == 2
for loop1 = 1:n
for loop2 = 1:n
y(loop1,loop2) = 0.0;
end
end
end

element.m

% Function to generate the element stiffness matrix Ke and the element force vector fe
% e is element number

function [Ke,fe] = element(e)


global nsd

% Stiffness matrix for 1-D


if nsd == 1
[Ke,fe] = stiff(e);

elseif nsd == 2
% Stiffness matrix for 2-D (not provided)
end

stiff.m

% Stiffness matrix for 1-D

function [Ke,fe] = stiff(e)


global nen nsd a k x Q IEN

IENe = IEN(:,e);
Qe = Q(:,e);
xe = x(IENe(:));
J = xe(nen) - xe(1);

ngp = nen-1;
[w,gp] = gauss(ngp);

5
Ke = zero(nen,2);
fe = zero(nen,1);
for loop = 1:ngp
xt=xe(1)+0.5*J*(gp(loop)+1);
Ke = Ke + w(loop)*(B(xt,xe))'*B(xt,xe);
fe = fe + w(loop)*N(xt,xe)*(N(xt,xe)*Qe);
end

Ke = 0.5*J*Ke*a*k;

fe = 0.5*J*fe;

gauss.m

% Function to get Gauss points


% and weight factors

function [w,gp] = gauss(n)


global nsd

if nsd == 1
if n == 1
w(1) = 2;
gp(1) = 0;
elseif n == 2
gp(1) = -0.57735027;
gp(2) = 0.57735027;
w(1) = 1;
w(2) = 1;
end
elseif nsd == 2
% 2-D problem
end

N.m

% Shape function

function SH = N(xt,x)
global nen nsd

% 1-D problem
if nsd == 1
if nen == 2
SH(1) = (xt-x(2))/(x(1)-x(2));
SH(2) = (xt-x(1))/(x(2)-x(1));
elseif nen == 3
SH(1)=(xt-x(2))*(xt-x(3))/((x(1)-x(2))*(x(1)-x(3)));
SH(2)=(xt-x(1))*(xt-x(3))/((x(2)-x(1))*(x(2)-x(3)));
SH(3)=(xt-x(1))*(xt-x(2))/((x(3)-x(1))*(x(3)-x(2)));
end
elseif nsd == 2

6
% 2-D problem
end

B.m

% B matrix

function BM = B(xt,x)
global nen nsd

% 1-D problem
if nsd == 1
if nen == 2
BM(1) = 1/(x(1)-x(2));
BM(2) = -BM(1);
elseif nen == 3
BM(1)=(2*xt-x(2)-x(3))/((x(1)-x(2))*(x(1)-x(3)));
BM(2)=(2*xt-x(1)-x(3))/((x(2)-x(1))*(x(2)-x(3)));
BM(3)=(2*xt-x(1)-x(2))/((x(3)-x(1))*(x(3)-x(2)));
end
elseif nsd == 2
% 2-D problem
end

assemble.m

% Function to assemble element stiffness matrix Ke and element nodal force vector fe into global K and F.
% e is element number

function [K,F] = assemble(e,Ke,fe,K,F)


global nen LM

for loop1 = 1:nen


i = LM(loop1,e);
F(i) = F(i) + fe(loop1);
for loop2 = 1:nen
j = LM(loop2,e);
K(i,j) = K(i,j) + Ke(loop1,loop2);
end
end

p_source.m

% Add point sources to force vector


% Prescribe natural B.C.

function F = p_source(F);
global ng nnp Qs fix ID h a

for ps = 1:nnp
if fix(ps) == 1
F(ID(ps)) = F(ID(ps)) + Qs(ps);
elseif fix(ps) == 3
F(ID(ps)) = F(ID(ps)) + a*h;
end
end

7
bc.m

% Function to prescribe
% essential B.C.'s
function [KK,FF] = bc(K,F)
global nnp ng gg

KK = K(ng+1:nnp,ng+1:nnp);
A2 = K(1:ng,ng+1:nnp);
FF = (F(ng+1:nnp))' - A2'*gg';

post.m

% Function to plot temperature and flux


function post(TT,e)
global nnp nen ng ID IEN LM g gg x k

T(1:ng) = gg;
T(ng+1:nnp) = TT;
Te = T(LM(:,e));

IENe = IEN(:,e);
x1 = x(IENe(1));
xn = x(IENe(nen));
xe = x(IENe);
nplot = 30; % # of points plotted
for loop = 1:nplot
xp(loop)=x1+(loop-1)*(xn-x1)/(nplot-1);
tp(loop)=N(xp(loop),xe)*Te';
qp(loop)=-k*B(xp(loop),xe)*Te';
end

plot(xp,tp); plot(xp,qp,'r--');
xlabel('x'); ylabel('T ______ q -----');
title('FE analysis of heat flow problem');

8
Introduction
In this tutorial1 you will become familiar with the process of creating an ABAQUS
model interactively by using ABAQUS/CAE. Two problems will be considered: (1)
steady state heat conduction in a rectangular plate, (2) elasticity problem of a
plate with a hole subjected to uniform tension.

Staedy state heat flow example


You will use the ABAQUS/CAE modules to create a model of the plate shown in
Figure 12.1. The plate is of unit thickness and subject to the conditions shown in
the figure. You will create a series of models with increasing mesh refinement
using both linear triangular and linear quadrilateral elements.

Figure 12.1. Rectangular plate

Preliminaries
1. Start a new session of ABAQUS/CAE by entering abq642se cae at the
prompt.
2. Select Create Model Database from the Start Session dialog box.

1
Prepared by ABAQUS, Inc
3. To create a model, select ModelÆCreate from the main menu bar and enter the
name triangles in the Edit Model Attributes dialog box. Click OK.
4. To save the model database, select FileÆSave As from the main menu bar and
enter the name tutorial in the Selection line of the Save Model Database
As dialog box. Click OK.
The .cae extension is added automatically.

Creating a part
The first step involves sketching the geometry for a two-dimensional, planar,
deformable solid body.
1. ABAQUS/CAE automatically loads the Part module. Any other module can be
accessed from the Module list located under the toolbar, as shown in Figure 16-
2.

Figure 12.2. Module list

2. From the main menu bar, select PartÆCreate to create a new part.
The Create Part dialog box appears.
3. Name the part plate. In the Create Part dialog box, select 2D Planar as the
part’s modeling space, Deformable as the type, and Shell as the base feature. In
the Approximate size text field, type 10.
4. Click Continue to exit the Create Part dialog box.
ABAQUS/CAE displays text in the prompt area near the bottom of the window to
guide you through the procedure, as shown in Figure 12.3. Click the cancel button
to cancel the current task; click the backup button to cancel the current step in the
task and return to the previous step.

2
Figure 12.3. Prompt area
The Sketcher toolbox appears in the left side of the main window, and the
Sketcher grid appears in the viewport.
To sketch the plate, you need to draw a rectangle. To select the rectangle drawing
tool, do the following:
A. Click the Create Lines: Rectangle tool in the
upper–right corner of the Sketcher toolbox, as
shown in Figure 12.4.

Figure 12.4. Rectangle sketch tool


The rectangle drawing tool appears in the Sketcher toolbox with a white
background, indicating that you selected it. ABAQUS/CAE displays prompts
in the prompt area to guide you through the procedure.
B. Notice that as you move the cursor around the
viewport, ABAQUS/CAE displays the cursor’s
X– and Y–coordinates in the upper–left corner.
C. Click one corner of the rectangle at coordinates
(0, 0).
D. Move the cursor to the opposite corner (2, 1) so
that the rectangle is 5 grid squares long and 2.5
grid squares high, as shown in Figure 12.5.

Figure 12.5. Rectangle drawn with sketcher


E. Click mouse button 1 to create the rectangle.
F. Click mouse button 2 anywhere in the viewport to
finish using the rectangle tool. (Mouse button 2 is
the middle mouse button on a three-button mouse;

3
on a two-button mouse, press both mouse buttons
simultaneously.)
G. Click Done in the prompt area to exit the
sketcher.
ABAQUS/CAE displays the new part, as shown in Figure 12.6.

3 1

Figure 12.6. Finished part

Creating a material definition


You will now create a single linear material with a conductivity of 4 units.

To define a material:
1. In the Module list located under the toolbar, select Property to enter the
Property module.
2. From the main menu bar, select MaterialÆCreate to create a new material.
3. In the Edit Material dialog box, name the material example. Notice the various
options available in this dialog box.

Figure 12.7. Pull–down menu


4. From the material editor’s menu bar, select ThermalÆConductivity, as shown
in Figure 12.7.
ABAQUS/CAE displays the Conductivity data form.
5. Enter a value of 4.0 for the conductivity, as shown in Figure 12.8. Use the
mouse to select a cell for data entry.

4
Figure 12.8. Material editor
6. Click OK to exit the material editor.

Defining and assigning section properties


Material properties are associated with part regions through the use of section properties.
You will define a solid section property that references the material created above and
assign this section property to the part.

To define the homogeneous solid section:


1. From the main menu bar, select SectionÆCreate.
2. In the Create Section dialog box:
A. Name the section plateSection.
B. In the Category list, accept Solid as the default
category selection.
C. In the Type list, accept Homogeneous as the
default type selection.
D. Click Continue.
The solid section editor appears.
3. In the Edit Section dialog box:
A. Accept the default selection of example for the
Material associated with the section.
B. Accept the default value of 1 for Plane
stress/strain thickness.
C. Click OK.

To assign the section definition to the plate:


1. From the main menu bar, select AssignÆSection.
ABAQUS/CAE displays prompts in the prompt area to guide you through the
procedure.
2. Click anywhere on the plate to select the entire part.
ABAQUS/CAE highlights the plate.
3. Click mouse button 2 in the viewport or click Done in the prompt area to accept
the selected geometry.
The Assign Section dialog box appears containing a list of existing section
definitions.
4. Accept the default selection of plateSection as the section definition, and
click OK.

5
ABAQUS/CAE assigns the solid section definition to the plate and closes the
Assign Section dialog box.

Assembling the model


Every ABAQUS model is based on the concept of an assembly of part instances. You
will create an assembly containing a single instance of the part created earlier.

To assemble the model:


1. In the Module list located under the toolbar, select Assembly to enter the
Assembly module.
2. From the main menu bar, select InstanceÆCreate.
3. In the Create Instance dialog box, select plate and click OK.

Configuring the analysis


To simulate the thermal response of the plate, a single heat transfer step will be used.

To create a heat transfer analysis step:


1. In the Module list located under the toolbar, select Step to enter the Step
module.
2. From the main menu bar, select StepÆCreate to create a step.
3. From the list of available general procedures in the Create Step dialog box,
select Heat transfer and click Continue.
4. In the Description field of the Basic tabbed page, enter Two-dimensional
steady state heat transfer.
5. Change the response type to Steady state.
6. Accept all other default values provided for the step.
7. Click OK to create the step and to exit the step editor.

Applying a boundary condition and a load to the model


The loads and boundary conditions applied to the model are depicted in Figure 1. When
assigning these attributes, you have the choice of selecting regions directly in the
viewport or assigning them to predefined sets and surfaces. In this example, we adopt the
latter approach. Thus, you will first define the necessary sets and surfaces and then define
the loads.

To define sets and surfaces:


1. In the Module list located under the toolbar, select Load to enter the
Load module.
2. From the main menu bar, select ToolsÆSetÆCreate. In the Create Set dialog
box, name the set right and click Continue. Select the right vertical edge of the
plate and click Done in the prompt area.
3. Similarly, create a set named plate that includes the entire plate.

6
4. From the main menu bar, select ToolsÆSurfaceÆCreate. In the Create
Surface dialog box, name the surface top and click Continue. Select the top
horizontal edge of the plate and click Done in the prompt area.

To apply boundary conditions to the plate:


1. From the main menu bar, select BCÆCreate.
2. In the Create Boundary Condition dialog box:
A. Name the boundary condition edge
temperature.
B. Select Step-1 as the step in which the boundary
condition will be activated.
C. In the Category list, select Other.
D. In the Types for Selected Step list, select
Temperature and click Continue.
3. In the prompt area, click Sets to open the Region Selection dialog box. Select
the set right and toggle on Highlight selection in viewport. The highlighted
edge appears as shown in Figure 12.9.

Y
2X
Z
3 1

Figure 12.9. Right edge selected

4. When you are satisfied that the correct set has been selected, click Continue.
The Edit Boundary Condition dialog box appears.
5. In the Edit Boundary Condition dialog box, enter a magnitude of 10.
6. Accept the default Amplitude selection (Ramp) and the default Distribution
(Uniform).
7. Click OK to create the boundary condition and to exit the editor.
ABAQUS/CAE displays yellow squares along the edge to indicate a temperature
boundary condition has been prescribed.

To apply a surface flux to the top edge of the plate:


1. From the main menu bar, select LoadÆCreate.
The Create Load dialog box appears.
2. In the Create Load dialog box:
A. Name the load edge flux.

7
B. Select Step-1 as the step in which the load will
be applied.
C. In the Category list, select Thermal.
D. In the Types for Selected Step list, select
Surface heat flux.
E. Click Continue.
3. In the Region Selection dialog box, select the surface named top. The surface
appears as shown in Figure 12.10.

Y
2X
Z
3 1

Figure 12.10. Top surface selected

4. When you are satisfied that the correct surface has been selected, click
Continue.
The Edit Load dialog box appears.
5. In the Edit Load dialog box:
A. Enter a magnitude of -30 for the load.
B. Accept the default Amplitude selection (Ramp)
and the default Distribution (Uniform).
C. Click OK to create the load definition and to exit
the editor.
ABAQUS/CAE displays green upward–pointing arrows along the top face of the
plate to indicate an outward flux.

To apply a body flux to the plate:


1. From the main menu bar, select LoadÆCreate.
The Create Load dialog box appears.
2. In the Create Load dialog box:
A. Name the load body flux.
B. Select Step-1 as the step in which the load will
be applied.
C. In the Category list, select Thermal.
D. In the Types for Selected Step list, select
Body heat flux.
E. Click Continue.
3. In the Region Selection dialog box, select the set named plate and click
Continue.

8
4. In the Edit Load dialog box:
A. Enter a magnitude of 45 for the load.
B. Accept the default Amplitude selection (Ramp)
and the default Distribution (Uniform).
C. Click OK to create the load definition and to exit
the editor.
ABAQUS/CAE displays yellow squares along the remaining edges of the plate.
The left and bottom edges of the plate are fully insulated. This is default boundary
condition for a thermal analysis model. Thus, you need not apply a boundary condition or
load to these edges.

Meshing the model


You use the Mesh module to generate the finite element mesh. You can choose
the meshing technique that ABAQUS/CAE will use to create the mesh, the
element shape, and the element type. ABAQUS/CAE offers a number of different
meshing techniques. The default meshing technique assigned to the model is
indicated by the color of the model when you enter the Mesh module; if
ABAQUS/CAE displays the model in orange, it cannot be meshed without
assistance from the user.

To assign the mesh controls:


1. In the Module list located under the toolbar, select Mesh to enter the Mesh
module.
2. From the main menu bar, select MeshÆControls.
3. In the Mesh Controls dialog box, choose Tri as the Element Shape selection.
4. Accept Free as the default Technique selection.
5. Click OK to assign the mesh controls and to close the dialog box.

To assign an ABAQUS element type:


1. From the main menu bar, select MeshÆElement Type.
You are prompted to choose the regions to which you will assign an element type.
Since you previously used predefined sets and surfaces to assign model attributes,
the Region Selection dialog box appears in the viewport. Here you will select
regions directly in the viewport.
2. In the prompt area, click Select in viewport. Click anywhere on the plate and
then click Done in the prompt area.
3. In the Element Type dialog box, choose the following:
• Standard as the Element Library selection.
• Linear as the Geometric Order.
• Heat Transfer as the Family of elements.
4. In the lower portion of the dialog box, examine the element shape options. A brief
description of the default element selection is available at the bottom of each
tabbed page.
5. Click OK to assign the element type and to close the dialog box.

9
To mesh the model:
1. From the main menu bar, select SeedÆInstance to seed the part instance.
The prompt area displays the default element size that ABAQUS/CAE will use to
seed the part instance. This default element size is based on the size of the part
instance.
2. In the prompt area, enter a global element size of 2.0 and press [Enter] or click
mouse button 2 in the viewport. This element size is chosen so that only one
element will be created along each edge of the plate.
3. ABAQUS/CAE applies the seeds to the part, as shown in Figure 12.11. The
squares in the figure indicate fixed seed locations.

Y 2
Z X3 1

Figure 12.11. Seeded part instance

4. From the main menu bar, select MeshÆInstance to mesh the part.
5. Click Yes in the prompt area or click mouse button 2 in the viewport to confirm
that you want to mesh the part instance.
6. ABAQUS/CAE meshes the part instance and displays the resulting mesh, as
shown in Figure 12.12a.
7. If you wish to change the diagonal of the elements, select ToolsÆEdit Mesh. In
the Edit Mesh dialog box, select Element as the category and Swap diagonal
as the method. Click OK. In the viewport, select the shared diagonal edge of the
elements. Click Yes in the prompt area to complete the operation. The mesh
appears as shown in Figure 12.12b.

Y 2 Y 2
Z X3 1
Z X3 1

(a) (b)
Figure 12.12. Part instance showing the resulting mesh

Creating and submitting an analysis job


You will now create a job and submit it for analysis.

10
To create and submit an analysis job:
1. In the Module list located under the toolbar, select Job to enter the Job module.
2. From the main menu bar, select JobÆCreate to create a job.
The Create Job dialog box appears.
3. Name the job tri-1x1.
4. From the list of available models select triangles.
5. Click Continue to create the job.
6. In the Description field of the Edit Job dialog box, enter Plate meshed
with 1x1 triangles.
7. Click the tabs to see the contents of each folder of the job editor and to review the
default settings. Click OK to accept the default job settings.
8. Select JobÆManager to start the Job Manager.
9. From the buttons on the right edge of the Job Manager, click Submit to submit
your job for analysis. The status field will show Running.
10. When the job completes successfully, the status field will change to Completed.
You are now ready to view the results of the analysis in the Visualization module.

Viewing the analysis results


1. Click Results in the Job Manager to enter the Visualization module.
ABAQUS/CAE opens the output database created by the job (tri-1x1.odb)
and displays a fast plot of the model.
You will create a contour plot of the temperature distribution.
2. From the main menu bar, select ResultÆField Output and select NT11 as the
output variable to be displayed.
3. In the Select Plot Mode dialog box, select As is and click OK.
4. From the main menu bar, select PlotÆContours to view a contour plot of the
temperature distribution, as shown in Figure 12.13.
NT11
+2.000e+01
+1.917e+01
+1.833e+01
+1.750e+01
+1.667e+01
+1.583e+01
+1.500e+01
+1.417e+01
+1.333e+01
+1.250e+01
+1.167e+01
+1.083e+01
+1.000e+01

2
Plate meshed with 1x1 triangles
ODB: tri-1x1.odb ABAQUS/Standard Student Edition 6.4-
3 1
Step: Step-1, Two-dimensional steady state heat transfer
Increment 1: Step Time = 1.000
Primary Var: NT11

Figure 12.13. Temperature contour plot: 1x1 tri model

11
Solving the problem using quadrilaterals
You will now solve the problem using quadrilateral elements. This involves copying the
current model, changing the element shape of the new model, and creating and
submitting a new job. The steps are outlined below.

To copy and modify a model:


1. From the main menu bar, select ModelÆCopy modelsÆtriangles. Name the
new model quads.
2. Switch to the Mesh module.
3. From the main menu bar, select MeshÆControls. Select Quad as the element
shape and click OK.
4. A warning is issued indicating that the current mesh will be deleted. Click Delete
Meshes in the ABAQUS dialog box to proceed.
5. From the main menu bar, select MeshÆInstance to mesh the part.
6. Click Yes in the prompt area or click mouse button 2 in the viewport to confirm
that you want to mesh the part instance.
7. Switch to the Job module and create a new job associated with the quad mesh
model. Name this job quad-1x1 and give it the following description: Plate
meshed with 1x1 quads.
8. Submit the job for analysis and monitor its progress. When the job completes,
open the file quad-1x1.odb in the Visualization module (click Results in the
Job Manager or select FileÆOpen from the main menu bar).
9. Plot the temperature contours for this model. The result in shown in Figure 12.14.
NT11
+2.015e+01
+1.930e+01
+1.846e+01
+1.761e+01
+1.676e+01
+1.592e+01
+1.507e+01
+1.423e+01
+1.338e+01
+1.254e+01
+1.169e+01
+1.085e+01
+1.000e+01

2
Plate meshed with 1x1 quads
ODB: quad-1x1.odb ABAQUS/Standard Student Edition 6.4
3 1
Step: Step-1, Two-dimensional steady state heat transfer
Increment 1: Step Time = 1.000
Primary Var: NT11

Figure 12.14. Temperature contour plot: 1x1 quad model

12
Refining the mesh
Clearly the mesh used to solve this problem was too coarse. For each model (triangles
and quads), change the mesh seed size to refine the mesh. Use the following mesh seed
sizes:
• 0.20 (this produces a 10×5 mesh)
• 0.05 (this produces a 40×20 mesh)

Thus, you will run create and run four additional jobs:
• tri-10x5
• tri-40x20
• quad-10x5
• quad-40x20
You do not need to create new models for each of these jobs. Simply edit the appropriate
model to refine the mesh. Create a new job, and submit it for analysis. Repeat this
process until all jobs listed above have been submitted.
The results of the refined mesh models are shown in Figure 12.15.

NT11 NT11
+1.874e+01 +1.877e+01
+1.801e+01 +1.803e+01
+1.729e+01 +1.729e+01
+1.656e+01 +1.654e+01
+1.583e+01 +1.580e+01
+1.510e+01 +1.506e+01
+1.437e+01 +1.432e+01
+1.364e+01 +1.357e+01
+1.291e+01 +1.283e+01
+1.219e+01 +1.209e+01
+1.146e+01 +1.135e+01
+1.073e+01 +1.060e+01
+1.000e+01 +9.862e+00

2 2
Plate meshed with 10x5 triangles Plate meshed with 10x5 quads
ODB: tri-10x5.odb ABAQUS/Standard Student Edition 6.4 ODB: quad-10x5.odb ABAQUS/Standard Student Edition 6.
3 1 3 1
Step: Step-1, Two-dimensional steady state heat transfer Step: Step-1, Two-dimensional steady state heat transfer
Increment 1: Step Time = 1.000 Increment 1: Step Time = 1.000
Primary Var: NT11 Primary Var: NT11
Deformed Var not set Deformation Scale Factor not se Deformed Var not set Deformation Scale Factor not se
NT11 NT11
+1.874e+01 +1.875e+01
+1.799e+01 +1.799e+01
+1.723e+01 +1.723e+01
+1.648e+01 +1.648e+01
+1.572e+01 +1.572e+01
+1.497e+01 +1.496e+01
+1.421e+01 +1.421e+01
+1.346e+01 +1.345e+01
+1.270e+01 +1.269e+01
+1.194e+01 +1.193e+01
+1.119e+01 +1.118e+01
+1.043e+01 +1.042e+01
+9.679e+00 +9.664e+00

2 2
Plate meshed with 40x20 triangles Plate meshed with 40x20 quads
ODB: tri-40x20.odb ABAQUS/Standard Student Edition 6. ODB: quad-40x20.odb ABAQUS/Standard Student Edition 6
3 1 3 1
Step: Step-1, Two-dimensional steady state heat transfer Step: Step-1, Two-dimensional steady state heat transfer
Increment 1: Step Time = 1.000 Increment 1: Step Time = 1.000
Primary Var: NT11 Primary Var: NT11

Figure 12.15. Temperature contour plots: refined mesh models

13
From the main menu bar, select FileÆSave to save your model database file. Close the
ABAQUS/CAE session by selecting FileÆExit from the main menu bar.

Plate with a hole in tension


Consider plate model shown in Figure 12.16. The plate is of unit thickness and
subject to tension in the horizontal direction. Because of the symmetry in the
model and loading, you need only model one quarter of the plate. You will create
a series of models with increasing levels of mesh refinement and compare the
value of the stress at the top of the hole with the theoretical value.

Figure 12.16. Plate under tension (left); quarter-symmetry model (right)

Preliminaries
10. Start a new session of ABAQUS/CAE by entering abq642se cae at the prompt.
11. Select Create Model Database from the Start Session dialog box.
12. To rename a model, select ModelÆRenameÆModel-1 from the main menu
bar and enter the name plate in the Rename Model dialog box. Click OK.
13. To save the model database, select FileÆSave As from the main menu bar and
enter the name hole-tutorial in the Selection line of the Save Model
Database As dialog box. Click OK.
The .cae extension is added automatically.

Creating a part
The first step involves sketching the geometry for a two-dimensional, planar,
deformable solid body.
14. ABAQUS/CAE automatically loads the Part module. Any other module can be
accessed from the Module list located under the toolbar, as shown in Figure
12.17.

14
Figure 12.17. Module list

15. From the main menu bar, select PartÆCreate to create a new part.
The Create Part dialog box appears.
16. Name the part plate. In the Create Part dialog box, select 2D Planar as the
part’s modeling space, Deformable as the type, and Shell as the base feature.
17. Click Continue to exit the Create Part dialog box.
ABAQUS/CAE displays text in the prompt area near the bottom of the window to
guide you through the procedure, as shown in Figure 12.18. Click the cancel
button to cancel the current task; click the backup button to cancel the current step
in the task and return to the previous step.

Figure 12.18. Prompt area


The Sketcher toolbox appears in the left side of the main window, and the
Sketcher grid appears in the viewport.
To sketch the plate, you need to draw a rectangle. To select the rectangle drawing
tool, do the following:
D. Click the Create Lines: Rectangle tool in the upper–right corner of the
Sketcher toolbox, as shown in Figure 12.19.

15
Figure 12.19. Rectangle sketch tool
The rectangle drawing tool appears in the Sketcher toolbox with a white
background, indicating that you selected it. ABAQUS/CAE displays prompts
in the prompt area to guide you through the procedure.
E. Notice that as you move the cursor around the viewport, ABAQUS/CAE
displays the cursor’s X– and Y–coordinates in the upper–left corner.
F. Click one corner of the rectangle at coordinates (−20, −20).
G. Move the cursor to the opposite corner (20, 20).
H. Click mouse button 1 to create the rectangle.
I. Click mouse button 2 anywhere in the viewport to finish using the rectangle
tool. (Mouse button 2 is the middle mouse button on a three-button mouse; on
a two-button mouse, press both mouse buttons simultaneously.)
J. Create a circle centered at the origin with a perimeter point located at (2.5,
0.0).

Figure 12.20. Rectangle with hole drawn with sketcher


K. Click Done in the prompt area to exit the sketcher.
L. Quarter the plate to remove all but the upper right quadrant. To do this:
From the main menu bar, select ShapeÆCutÆExtrude.
Using the Create Lines: Connected tool located in the upper right-
hand corner of the Sketcher toolbox, sketch the series of connected lines
shown in Figure 12.21. Click Done to complete the operation.

16
Figure 12.21. Sketch of cutting tool

ABAQUS/CAE displays the new part, as shown in Figure 12.16 (right).

Creating a material definition


You will now create a single linear elastic material.

To define a material:
18. In the Module list located under the toolbar, select Property to enter the
Property module.
19. From the main menu bar, select MaterialÆCreate to create a new material.
20. In the Edit Material dialog box, name the material steel. Notice the various
options available in this dialog box.

Figure 12.22. Pull–down menu


21. From the material editor’s menu bar, select MechanicalÆElasticityÆElastic,
as shown in Figure 12.22.
ABAQUS/CAE displays the Elastic data form.
22. Enter a value of 2.e11 for the Young’s modulus and 0.3 for Poisson’s ratio, as
shown in Figure 12.23. Use the mouse to select a cell for data entry.

17
Figure 12.23. Material editor
23. Click OK to exit the material editor.

Defining and assigning section properties


Material properties are associated with part regions through the use of section properties.
You will define a solid section property that references the material created above and
assign this section property to the part.

To define the homogeneous solid section:


24. From the main menu bar, select SectionÆCreate.
25. In the Create Section dialog box:
M. Name the section plateSection.
N. In the Category list, accept Solid as the default category selection.
O. In the Type list, accept Homogeneous as the default type selection.
P. Click Continue.
The solid section editor appears.
26. In the Edit Section dialog box:
Q. Accept the default selection of steel for the Material associated with the
section.
R. Accept the default value of 1 for Plane stress/strain thickness.
S. Click OK.

To assign the section definition to the plate:


27. From the main menu bar, select AssignÆSection.
ABAQUS/CAE displays prompts in the prompt area to guide you through the
procedure.
28. Click anywhere on the plate to select the entire part.
ABAQUS/CAE highlights the plate.
29. Click mouse button 2 in the viewport or click Done in the prompt area to accept
the selected geometry.
The Assign Section dialog box appears containing a list of existing section
definitions.
30. Accept the default selection of plateSection as the section definition, and click
OK.
ABAQUS/CAE assigns the solid section definition to the plate and closes the
Assign Section dialog box.

18
Assembling the model
Every ABAQUS model is based on the concept of an assembly of part instances. You
will create an assembly containing a single instance of the part created earlier.

To assemble the model:


31. In the Module list located under the toolbar, select Assembly to enter the
Assembly module.
32. From the main menu bar, select InstanceÆCreate.
33. In the Create Instance dialog box, select plate and click OK.

Configuring the analysis


To simulate the mechanical response of the plate, a single general static step will be used.

To create a general static analysis step:


34. In the Module list located under the toolbar, select Step to enter the Step
module.
35. From the main menu bar, select StepÆCreate to create a step.
36. From the list of available general procedures in the Create Step dialog box,
select Static, General and click Continue.
37. In the Description field of the Basic tabbed page, enter Plate with hole
under tension.
38. Accept all default values provided for the step.
39. Click OK to create the step and to exit the step editor.

Applying a boundary condition and a load to the model


You will apply symmetry boundary conditions along the left and bottom edges of the
plate and a negative pressure on the right edge to simulate tension. When assigning these
attributes, you have the choice of selecting regions directly in the viewport or assigning
them to predefined sets and surfaces. In this example, we adopt the latter approach. Thus,
you will first define the necessary sets and surfaces and then define the loads.

To define sets and surfaces:


40. In the Module list located under the toolbar, select Load to enter the
Load module.
41. From the main menu bar, select ToolsÆSetÆCreate. In the Create Set dialog
box, name the set left and click Continue. Select the left vertical edge of the
plate and click Done in the prompt area.
42. Similarly, create a set named bottom that includes the bottom horizontal edge of
the plate.
43. From the main menu bar, select ToolsÆSurfaceÆCreate. In the Create
Surface dialog box, name the surface pull and click Continue. Select the right
vertical edge of the plate and click Done in the prompt area.

19
To apply boundary conditions to the plate:
44. From the main menu bar, select BCÆCreate.
45. In the Create Boundary Condition dialog box:
T. Name the boundary condition left.
U. Select Step-1 as the step in which the boundary condition will be activated.
V. In the Category list, select Mechanical.
W. In the Types for Selected Step list, select
Symmetry/Antisymmetry/Encastre and click Continue.
46. In the prompt area, click Sets to open the Region Selection dialog box. Select
the set left and toggle on Highlight selection in viewport. The highlighted
edge appears as shown in Figure 12.24.

Y
Z X
Figure 16-24. Left edge selected

47. When you are satisfied that the correct set has been selected, click Continue.
The Edit Boundary Condition dialog box appears.
48. In the Edit Boundary Condition dialog box, select XSYMM.
Click OK to create the boundary condition and to exit the editor.
ABAQUS/CAE displays glyphs along the edge to indicate boundary conditions
have been applied.
49. Similarly, create a symmetry boundary condition named bottom on the bottom
edge of the plate. Select bottom as the set and YSYMM as the boundary
condition type.

To apply a pressure to the right edge of the plate:


50. From the main menu bar, select LoadÆCreate.
The Create Load dialog box appears.
51. In the Create Load dialog box:
X. Name the load tension.
Y. Select Step-1 as the step in which the load will be applied.
Z. In the Category list, select Mechanical.
AA. In the Types for Selected Step list, select Pressure.
BB. Click Continue.
52. In the Region Selection dialog box, select the surface named pull. The surface
appears as shown in Figure 12.25.

20
Y
Z X

Figure 12.25. Right surface selected

53. When you are satisfied that the correct surface has been selected, click
Continue.
The Edit Load dialog box appears.
54. In the Edit Load dialog box:
CC. Enter a magnitude of -10e3 for the load.
DD. Accept the default Amplitude selection (Ramp) and the default
Distribution (Uniform).
EE.Click OK to create the load definition and to exit the editor.
ABAQUS/CAE displays outward–pointing arrows along the edge of the plate to
indicate a tensile load.

Meshing the model


You use the Mesh module to generate the finite element mesh. You can choose
the meshing technique that ABAQUS/CAE will use to create the mesh, the
element shape, and the element type. ABAQUS/CAE offers a number of different
meshing techniques. The default meshing technique assigned to the model is
indicated by the color of the model when you enter the Mesh module; if
ABAQUS/CAE displays the model in orange, it cannot be meshed without
assistance from the user.

To assign the mesh controls:


55. In the Module list located under the toolbar, select Mesh to enter the Mesh
module.
56. From the main menu bar, select MeshÆControls.
57. In the Mesh Controls dialog box, choose Quad as the Element Shape
selection.
58. Accept Free as the default Technique selection.
59. Click OK to assign the mesh controls and to close the dialog box.

To assign an ABAQUS element type:


60. From the main menu bar, select MeshÆElement Type.

21
61. In the Element Type dialog box, choose the following:
• Standard as the Element Library selection.
• Quadratic as the Geometric Order.
• Plane Stress as the Family of elements.
62. In the lower portion of the dialog box, examine the element shape options. A brief
description of the default element selection is available at the bottom of each
tabbed page.
63. Click OK to accept and assign CPS8R elements to the plate and to close the
dialog box.

You will now partition the plate in half in order to gain better control over the
mesh.

To partition the plate:


64. From the main menu bar, select ToolsÆPartition.
65. In the Create Partition dialog box, select Face as the type and Sketch as the
method. Click OK.
66. In the sketcher, draw a line connecting the origin of the circle with the upper right
corner of the plate.
67. Click the middle mouse button twice then click Done.

To mesh the model:


68. From the main menu bar, select SeedÆInstance to seed the part instance.
The prompt area displays the default element size that ABAQUS/CAE will use to
seed the part instance. This default element size is based on the size of the part
instance.
69. In the prompt area, specify a global element size of 2.0 and press [Enter] or
click mouse button 2 in the viewport.
70. ABAQUS/CAE applies the seeds to the part, as shown in Figure 12.26. The
squares in the figure indicate fixed node locations. The circles indicate target node
locations.

Y
Z X

Figure 16-26. Seeded part instance

71. From the main menu bar, select MeshÆInstance to mesh the part.
72. Click Yes in the prompt area or click mouse button 2 in the viewport to confirm
that you want to mesh the part instance.

22
73. ABAQUS/CAE meshes the part instance and displays the resulting mesh, as
shown in Figure 12.27.

Y
Z X

Figure 12.27. Part instance showing the resulting mesh

Creating and submitting an analysis job


You will now create a job and submit it for analysis.

To create and submit an analysis job:


74. In the Module list located under the toolbar, select Job to enter the Job module.
75. From the main menu bar, select JobÆCreate to create a job.
The Create Job dialog box appears.
76. Name the job hole-coarse.
77. From the list of available models select plate.
78. Click Continue to create the job.
79. In the Description field of the Edit Job dialog box, enter Coarse mesh.
80. Click the tabs to see the contents of each folder of the job editor and to review the
default settings. Click OK to accept the default job settings.
81. Select JobÆManager to start the Job Manager.
82. From the buttons on the right edge of the Job Manager, click Submit to submit
your job for analysis. The status field will show Running.
83. When the job completes successfully, the status field will change to Completed.
You are now ready to view the results of the analysis in the Visualization module.

Viewing the analysis results


84. Click Results in the Job Manager to enter the Visualization module.
ABAQUS/CAE opens the output database created by the job (hole-
coarse.odb) and displays a fast plot of the model.
You will create a contour plot of the stress distribution.
85. From the main menu bar, select ResultÆField Output and select S11 as the
output variable to be displayed.
86. In the Select Plot Mode dialog box, select As is and click OK.
87. From the main menu bar, select PlotÆContours to view a contour plot of the
stress distribution, as shown in Figure 12.28.

23
Figure 12.28. Stress contour plot: coarse model

Refining the mesh


The theoretical value of the stress at the top of the hole is 3 × the applied stress (30e3 in
this case). Clearly the mesh used to solve this problem was too coarse. Reduce the mesh
seed size to refine the mesh. Use the following mesh seed sizes:
• 1.2
• 1.2 global seed size with local biased edge seeds along the left, bottom, and
diagonal edges:
i) From the main menu bar of the mesh module, select SeedÆEdge Biased.
ii) Using Shift+Click, select the left, bottom, and diagonal edges at the ends
near the hole.
iii) Enter a bias ratio of 3.
iv) Enter 20 for the number of elements along the edges.

Thus, you will run create and run two additional jobs:
• hole-fine
• hole-biased
You do not need to create new models for each of these jobs. Simply edit the appropriate
model to refine the mesh. Create a new job, and submit it for analysis. Repeat this
process until all jobs listed above have been submitted.
The results of the refined mesh models are shown in Figure 12.29 and Figure 12.30.

24
Figure 12.29. Stress contour plot: fine model

Figure 12.30. Stress contour plot: biased model

From the main menu bar, select FileÆSave to save your model database file. Close the
ABAQUS/CAE session by selecting FileÆExit from the main menu bar.

25

You might also like