Vous êtes sur la page 1sur 74

Introduction

A finite element method (abbreviated as FEM) is a numerical technique to obtain an approximate solution to
a class of problems governed by elliptic partial differential equations. Such problems are called as boundary
value problems as they consist of a partial differential equation and the boundary conditions. The finite
element method converts the elliptic partial differential equation into a set of algebraic equations which are
easy to solve. The initial value problems which consist of a parabolic or hyperbolic differential equation and
the initial conditions (besides the boundary conditions) can not be completely solved by the finite element
method. The parabolic or hyperbolic differential equations contain the time as one of the independent
variables. To convert the time or temporal derivatives into algebraic expressions, another numerical technique
like the finite difference method (FDM) is required. Thus, to solve an initial value problem, one needs both the
finite element method as well as the finite difference method where the spatial derivatives are converted into
algebraic expressions by FEM and the temporal derivatives are converted into algebraic equations by FDM.

Historical Background
The words finite element method was first used by Clough in his paper in the Proceedings of 2
nd ASCE (American Society of Civil Engineering) conference on Electronic Computation in 1960.
Clough extended the matrix method of structural analysis, used essentially for frame-like
structures, to two-dimensional continuum domains by dividing the domain into triangular elements
and obtaining the stiffness matrices of these elements from the strain energy expressions by
assuming a linear variation for the displacements over the element. Clough called this method as
the finite element method because the domain was divided into elements of finite size. (An
element of infinitesimal size is used when a physical statement of some balance law needs to be
converted into a mathematical equation, usually a differential equation).
Argyris, around the same time, developed similar technique in Germany. But, the idea of dividing
the domain into a number of finite elements for the purpose of structural analysis is older. It was
first used by Courant in 1943 while solving the problem of the torsion of non-circular shafts.
Courant used the integral form of the balance law, namely the expression for the total potential
energy instead of the differential form (i.e., the equilibrium equation). He divided the shaft crosssection into triangular elements and assumed a linear variation for the primary variable (i.e., the
stress function) over the domain. The unknown constants in the linear variation were obtained by
minimizing the total potential energy expression. The Courant's technique is called as applied
mathematician's version of FEM where as that of Clough and Argyris is called as engineer's
version of FEM.
From 1960 to 1975, the FEM was developed in the following directions:
(1) FEM was extended from a static, small deformation, elastic problems to

dynamic (i.e., vibration and transient) problems,


small deformation fracture, contact and elastic plastic problems,
non-structural problems like fluid flow and heat transfer problems.

(2) In structural problems, the integral form of the balance law namely the total potential energy
expression is used to develop the finite element equations. For solving non-structural problems
like the fluid flow and heat transfer problems, the integral form of the balance law was developed
using the weighted residual method.
(3) FEM packages like NASTRAN, ANSYS, and ABAQUS etc. were developed.
The large deformation (i.e., geometrically non-linear) structural problems, where the domain
changes significantly, were solved by FEM only around 1976 using the updated Lagrangian
formulation. This technique was soon extended to other problems containing geometric nonlinearity :
dynamic problems,
fracture problems,
contact problems,
elastic-plastic (i.e., materially non-linear) problems.

Some new FEM packages for analyzing large deformation problems like LS-DYNA, DEFORM
etc. were developed around this time. Further, the module for analyzing large deformation
problems was incorporated in existing FEM packages like NASTRAN, ANSYS, ABAQUS etc.

Basic Steps
The finite element method involves the following steps.

First, the governing differential equation of the problem is converted into an integral form.
These are two techniques to achieve this : (i) Variational Technique and (ii) Weighted
Residual Technique. In variational technique, the calculus of variation is used to obtain
the integral form corresponding to the given differential equation. This integral needs to
be minimized to obtain the solution of the problem. For structural mechanics problems,
the integral form turns out to be the expression for the total potential energy of the
structure. In weighted residual technique, the integral form is constructed as a weighted
integral of the governing differential equation where the weight functions are known and
arbitrary except that they satisfy certain boundary conditions. To reduce the continuity
requirement of the solution, this integral form is often modified using the divergence
theorem. This integral form is set to zero to obtain the solution of the problem. For
structural mechanics problems, if the weight function is considered as the virtual
displacement, then the integral form becomes the expression of the virtual work of the
structure.

In the second step, the domain of the problem is divided into a number of parts, called as
elements. For one-dimensional (1-D) problems, the elements are nothing but line
segments having only length and no shape. For problems of higher dimensions, the
elements have both the shape and size. For two-dimensional (2D) or axi-symmetric
problems, the elements used are triangles, rectangles and quadrilateral having straight or
curved boundaries. Curved sided elements are good choice when the domain boundary
is curved. For three-dimensional (3-D) problems, the shapes used are tetrahedron and
parallelepiped having straight or curved surfaces. Division of the domain into elements is
called a mesh.

In this step, over a typical element, a suitable approximation is chosen for the primary
variable of the problem using interpolation functions (also called as shape functions) and
the unknown values of the primary variable at some pre-selected points of the element,
called as the nodes. Usually polynomials are chosen as the shape functions. For 1-D
elements, there are at least 2 nodes placed at the end-points. Additional nodes are
placed in the interior of the element. For 2-D and 3-D elements, the nodes are placed at
the vertices (minimum 3 nodes for triangles, minimum 4 nodes for rectangles,
quadrilaterals and tetrahedral and minimum 8 nodes for parallelepiped shaped elements).
Additional nodes are placed either on the boundaries or in the interior. The values of the
primary variable at the nodes are called as the degrees of freedom.

To get the exact solution, the expression for the primary variable must contain a complete set of
polynomials (i.e., infinite terms) or if it contains only the finite number of terms, then the number of
elements must be infinite. In either case, it results into an infinite set of algebraic equations. To
make the problem tractable, only a finite number of elements and an expression with only finite
number of terms are used. Then, we get only an approximate solution. (Therefore, the expression
for the primary variable chosen to obtain an approximate solution is called an approximation). The
accuracy of the approximate solution, however, can be improved either by increasing the number
of terms in the approximation or the number of elements.

In the fourth step, the approximation for the primary variable is substituted into the
integral form. If the integral form is of variational type, it is minimized to get the algebraic
equations for the unknown nodal values of the primary variable. If the integral form is of
the weighted residual type, it is set to zero to obtain the algebraic equations. In each
case, the algebraic equations are obtained element wise first (called as the element
equations) and then they are assembled over all the elements to obtain the algebraic
equations for the whole domain (called as the global equations).

In this step, the algebraic equations are modified to take care of the boundary conditions
on the primary variable. The modified algebraic equations are solved to find the nodal
values of the primary variable.
In the last step, the post-processing of the solution is done. That is, first the secondary
variables of the problem are calculated from the solution. Then, the nodal values of the
primary and secondary variables are used to construct their graphical variation over the
domain either in the form of graphs (for 1-D problems) or 2-D/3-D contours as the case
may be.

Advantages of the finite element method over other numerical methods are as follows:
The method can be used for any irregularshaped domain and all types of boundary
conditions.
Domains consisting of more than one material can be easily analyzed.
Accuracy of the solution can be improved either by proper refinement of the mesh or by
choosing approximation of higher degree polynomials.
The algebraic equations can be easily generated and solved on a computer. In fact, a
general purpose code can be developed for the analysis of a large class of problems.

Objectives of the Course


The objectives of the course are as follows :

To develop the finite element formulation for a model one-dimensional problem like axially
loaded bar for the case of simplest approximation (i.e., linear approximation).
To discuss the possible refinements of the simplest approximation.
To develop the frame work of a finite element code to solve the one- dimensional
problem.
To extend the finite element formulation to other one-dimensional problems like the beam
problem.
To develop the two-dimensional finite element formulation for a model 2-D problem like 2D steady-state heat conduction problem.

Introduction
In this lecture, integral formulations of a boundary value problem are developed. There are two
types of integral formulations :

Weak or Weighted residual formulation and s


Variational formulation

In finite element method, the solution of a boundary value problem is obtained by using one of
these two integral formulations. When it is difficult to solve the differential equation of a boundary
value problem, this method provides an alternative way to obtain the solution. But, usually, it is an
approximate solution

Model Boundary Value Problem


To illustrate the development of integral formulations, the following model boundary value
problem is considered. It represents the axial extension (or compression) of a bar shown in Fig.
2.1.

Figure 2.1
The bar has a variable area of cross-section which is denoted by the function A(x). The length of
the bar is L . The Young's modules of the bar material is E . The bar is fixed at the end x = 0. The
forces acting on the bar are (i) a distributed force f(x), which varies with x and (ii) a point force P
at the end x = L . The axial displacement of a cross-section at x , denoted by u(x), is governed by
the following boundary value problem consisting of a differential equation (DE) and two boundary
conditions (BC):
DE:
BC:

(i) u = 0
(ii) EA(x)

0<x<L

(2.1a)

at x=0

(2.1b)

at x=L

(2.1c)

The differential equation represents the equilibrium of a small element of the bar expressed in
terms of the displacement using the stress-strain and strain-displacement relations. The
boundary condition (2.1b) is a geometric or kinematic boundary condition. Since, it is a condition
on the primary variable u(x), it is called as Dirichlet boundary condition. The second boundary
condition (condition 1c) is a force boundary condition, or a condition on the secondary variable
(i.e., axial force). Since, it is a condition on a derivative of the primary variable; it is called as the
Neumann boundary condition.

Weak or Weighted Residual Formulation


Consider a function u ( x ), defined over the interval [0, L ], which satisfies both the boundary
conditions (2.1b) and (2.1c) but otherwise arbitrary. In general, such a function will not satisfy the
differential equation (2.1a). It means, when u ( x ) is substituted in the left hand side of equation

(2.1a), it will not be equal to f ( x ). In this case, the difference is called as residue or error and is
denoted by R ( x ). Thus,
(2.2)
In Weighted Residual Formulation, an approximate solution to the problem (2.1a, 2.1b and 2.1c)
is obtained by minimizing the weighted' residue or the product of the residue R(x) and certain
weight function, denoted by w (x).
The weight function is chosen to be an arbitrary function except that it is required to satisfy the
following conditions:
1. At the boundary where u is specified, w must be zero. Thus, in the present problem, w =
0 at x = 0.
2. At the boundary, where the derivative of u is specified, w must be unconstrained. Thus in
the present problem, w is unconstrained at x = L .
3. The function w should be smooth enough for the integral of the weighted residue to be
finite.
A collection of all the functions, which satisfy the above conditions, is called as a set or class of
admissible functions. Thus, the weight function must belong to the class of admissible functions.
One common way of minimizing the residue R(x) is to set the integral of the product of R(x) and
w(x) to zero for any admissible function w(x). Thus, an approximate solution to the problem
(1a,1b,1c) is obtained from the following equation:
(2.3)
or,
(2.4)
for any w belonging to the class of admissible functions. To relax the smoothness requirements
on the choice of the approximate function u(x), the left side of equation (2.4) is usually integrated
by parts. This makes the expression symmetric in u and w . By carrying out the integration by
parts, equation (2.4) becomes
(2.5a)
Since w is zero at x = 0, the last term is zero. Further, u satisfies the boundary condition (2.1c).
Then
EA (

) at x = L becomes equal to P . With these simplifications, equation (2.5a) becomes:


(2.5b)

This is called as the weighted residual integral. This is the integral form used in the weighted
Residual Formulation. Now the condition 3 of the class of the admissible functions can be made
explicit. For all the integrals of equation (2.5b) to be finite,
the interval (0, L ). It means
discontinuities.

must be finite at every point of

must be piecewise continuous on (0, L ) with only finite

Expression (2.5b) is also called as the Weak Formulation of the boundary value problem (2.1a),
(2.1b) and (2.1c) because the solution given by the formulation is required to satisfy weaker
smoothness conditions compared to that of the solution of the original boundary value problem.
Depending on the choice of w , various special forms of the weighted residual method exist. They
are :
(i)
Galerkin
Method,
(ii)
Petrov
Galerkin
Method
and
(iii) Least Square Method.
If the condition of smoothness on w (i.e. the 3rd condition) is relaxed, two more special forms
emerge:
(i)
Sub-domain
Method
and
(ii) Collocation Method.
In this lecture, only the Galerkin version of the weighted residual method will be developed. For
the details of other version, see the book by Huebener..

Virtual Work Formulation


Physical interpretation of equation (2.5b) exists if w is interpreted as a virtual displacement. The
concept of a virtual displacement can be defined as follows. Note that, because of the forces
acting on the bar, it will have some real displacement. Even though it is unknown, a typical real
displacement can be represented by a solid curve shown in Fig. 2.2. Now imagine that the bar
undergoes some additional small displacement, which is not real but imaginary. Such a
displacement is called as virtual displacement and is denoted by the symbol

. The dotted line

of Fig. 2.2 represents the graph of


. Thus
is a function which represents a virtual
small change in the value of u(x) at every point of the interval [0, L ].

Fig 2.2

We assume that

satisfies the same admissibility requirements as that of w . Thus,

1. The virtual displacement must be zero at the boundary where u is zero. Thus, in the
present problem,
= 0 at x = 0
2. The virtual displacement must be unconstrained at the boundary where the derivative of
u is specified. Thus, in the present problem, is unconstrained at x = L
3. The virtual displacement
must be smooth enough for an integral of the product of
R(x) and to be finite. After the integration by parts, this integral involves the derivative of

. Thus, in the present problem,


[0, L].
Thus, the virtual displacement
which w is chosen.

If w is set equal to

must be finite at every point of the interval

is chosen from the same class of admissible functions from

, equation (2.5b) becomes


(2.6)

Extension of a bar is a one-dimensional problem. Therefore, u is independent of the other two


coordinates y and z . Further, all the stress components other than
and

are zero. In particular,

are zero. Thus,


(2.7a)
(2.7b)

Further,
dV=A dx

(2.8)

(2.9)
Note that each term in equation (2.9) is an expression of the virtual work. The left side of equation
(2.9) represents the virtual work done by the internal forces. The first term on the right side of
equation (2.9) represents the virtual work done by the distributed external force f(x). The second
term on the right side of the equation (2.9) represents the virtual work done by the point external
force P. Together; the right side of equation (2.9) represents the total virtual work of the external
forces. What equation (2.9) represents is that: for the residue to be zero (or for u to be a solution
of the boundary value problem 2.1a, 2.1b and 2.1c in some sense), the total virtual work must be
zero or the virtual work done by the internal forces must be equal to the virtual work done by the
external forces.
If the symbol
in the expression
is interpreted as an operator somewhat similar to the
differential operator d, equation (2.9) can be transformed to an extremization problem of a
quantity called as functional. This gives the second integral form of the boundary value problem.
Before it is formulated, it is first necessary to discuss the idea of a functional and its extremum.
This is discussed in the next section

Functional
Functional is an operator, which operates on a function and returns a number. In other words,
functional is a function which is defined over a set of functions and whose range is a set of
numbers. The set of functions which constitute the domain of a functional is usually required to
satisfy certain conditions on smoothness and/or on the values at the end points of the interval.
Such a set is called as a set or a class of admissible functions.

As an illustration of a functional, consider a set of functions u(x) which are functions of a single
variable x for 0 x L, which have the value zero at x = 0 and which possess a continuous first
derivative at all points of the interval [0, L]. Then, examples of functional are:

(2.10)

(2.11)

In each of the above examples, the operator

(a(x) is a known function),

(2.12)

(b(x) is a known function),

(2.13)

(c is a known number).

(2.14)

takes a function u(x) and returns a number either

by integrating a quantity depending on u,


and some known functions or by evaluating u at
some point of the interval. The integrand may involve higher derivatives of u or some functions of
u like logarithmic, trigonometric, exponential etc or the power of u, its derivatives or its function. In
classical books, a functional is often written as:

(2.15)

where
(2.16)
However, this case does not include a type of functional defined by equation (2.14).
The branch of calculus, which deals with the operations performed on functionals, is called as the
variational calculus. Some ideas from the variational calculus need to be discussed next.

Variation and Extremum of a Functional


Consider a set of admissible functions on which a functional is defined. If one of the admissibility
conditions is u = 0 at x = 0, then a typical function from this set can be represented as shown in
Fig. 2.3(a).

Figure 2.3 (a)

Figure 2.3 (b)

A small change in the argument of I is called as variation (or first variation) of u and is denoted by
u. It is defined as a small change in the value of u at every point of the interval [0, L]. Note that
u is a function of x over the interval [0, L]. Since u is constrained at x = 0, no change is
expected in u at x = 0. Therefore, the variation
interval where u is specified. The function
small everywhere, it is often expressed as

u takes the value zero at the end-point of the

u is shown in Fig. 2.3(b). Since the value of

u is

(2.17)

u=
where
= a small number and
= an arbitrary function of x which satisfies the condition

= 0 at x = 0.

This small change in the argument of I induces a change in the value of I. It is called as the
variation (or first variation) of I and is denoted by
the value of the functional at the argument
of

for given u and

. Expanding

. To find the expressions of


or

about

. Note that I(

, we consider
) is a function

= 0, we get

(2.18)

The quantity

represents the variation

. Thus,

(2.19)

The functional I is said to be extremum (minimum or maximum) when


The corresponding extremizing function u is found from the condition

or

is zero.

(2.20)

for every function


functions.

such that

= 0 at x = 0 and

belongs to the set of admissible

While deriving the variational integral form from equation (2.6), some properties of the variational
operator

are needed. They are stated next. Note that

operator d operating on usual functions. So, the

is an operator similar to the differential

operator obeys certain properties of d operator

like the product rule etc. Further, operator commutes with d operator, integral operator etc. the
relevant properties needed in the derivation are:
(i)

(ii)

(2.21)

(f is known function or a constant),

(2.22)

(iii)
(2.23)

(iv)

(2.24)

(v)

,
(vi)
(vii)

(2.25)

(2.26)
(2.27)

Variational Formulation
Note that while deriving equation (2.6), it has been assumed that the function u satisfies both the
boundary conditions (2.1b) and (2.1c). Additionally, if it is assumed that u also satisfies the
differential equation (thereby making u the solution of the boundary value problem (2.1a), (2.1b)
and (2.1c), equation (2.6) becomes:

Now, applying the properties of the variational operator

, the first term becomes:

(Property iii)

(Property i)

(Property ii)

(Property iv)

Similarly, the second term becomes

,
(Property ii) ,

,
(Property iv)

Finally, the last terms becomes

,
,

(Property ii)
(Property iv)

Substitution of equations (2.29-2.31) into equation (2.28) leads to

Using property (vi), this becomes

(2.32)
where

(2.33)

Thus, we have proved the following result. The solution u of the boundary value problem (2.1a),
(2.1b) and (2.1c) extremizes the functional I given by equation (2.33). The functional I is called
the variational functional of the boundary value problem (2.1a), (2.1b) and (2.1c). Note that the
functional (2.33) provides an integral form of the boundary value problem. The integral needs to
be extremized to obtain the solution of the boundary value problem. This formulation is called as
the Variational Formulation . Since it is derived from the virtual work formulation (equation 2.6),
it is equivalent to the principle of virtual work. Like equation (2.6), this formulation also has a
physical interpretation. Note that the quality I (expression 2.33) represents the total potential
energy of the bar. Therefore, the variational formulation states the following principle. The solution
of the boundary value problem (2.1a), (2.1b), and (2.1c) extremises the total potential energy of
the bar. This is called as the Principal of the Stationary Value of the Total Potential Energy .
In the variational formulation, solution of the boundary value problem is obtained by extremizing
the corresponding functional. While doing so, a set of admissible functions is chosen. The
conditions which the extremizing function u is supposed to satisfy are similar to the conditions
which the weight function w is expected to satisfy. These conditions are

1. The function u must satisfy the geometric or kinematic boundary conditions (equation 1b).
Thus u = 0 at x = 0. Further, the variation u must be 0 at this point.
2. The function u and its variation u must be unconstrained where the force boundary
condition is specified. Thus, u and d u are unconstrained at x = L.
3. The function u must be smooth enough to make the functional I finite. Thus, u must be
such that du/dx is finite at every point of the interval (0, L).
If our starting point is the integral form given by the variational functional (2.33), rather than the
differential form given by the boundary value problem (2.1a), (2.1b) and (2.1c), then it can be
shown that the function u which extremizes the functional I (equation 2.33) actually satisfies the
differential equation (2.1a). Thus, equation (2.1a) is called the Euler Equation of the functional I
(equation 2.33). While extremizing the functional, the set of admissible functions is assumed to
satisfy the geometric (or kinematic) boundary condition (equation 2.1b). Thus, equation (2.1b) is
called as the Essential Boundary Condition . The condition at the other boundary (equation
2.1c) appears naturally while extremizing the functional I. Therefore, equation (2.1c) is called as
the Natural Boundary Condition .

Euler Equation and Natural Boundary Condition


To derive the Euler equation corresponding to the functional I (2.33), we proceed as follows. Let u
be an admissible function which extremizes the functional. Then u satisfies the condition that its
value is zero at x = 0. Since v is equal to
,
at x = 0. Note that the extremization
condition (2.20) involves the expression for the functional I at
. Using expression (2.33),
we get

(2.34)

Expanding the square term and separating the terms in the powers of

, we get:

(2.35)

.
Since, the first term on the right side of equation (2.35) is nothing but I(u), we get

(2.36)

Taking the limit as

, we get

(2.37)

Since the function u extremizes the functional I,

I = 0 . Therefore, we get

(2.38)

for every which satisfies the condition = 0 at x = 0. The extremizing function u is the solution of
above equation.
To simplify the above equation, the first term is integrated by parts. Then, equation (2.38)
becomes

(2.39)

Since =0 at x = 0, the second term of equation (2.39) is zero. Combining the remaining two
boundary terms and also the integral terms, we get

(2.40)

Note that the above equation must be zero for a set of infinite functions which satisfy the
condition = 0 at x = 0 but otherwise are arbitrary. Let us first choose the following subset of this
set, namely, the set of functions which are also zero at x = L. For such functions ( = 0 at x = L),
equation (2.40) becomes

(2.41)

Note that, equation (2.41) is true for every which is zero at x = 0 and L but otherwise is arbitrary.
There are still infinite numbers of such functions. The only way in which equation (2.41) can be
satisfied for such an infinite set of functions is that its integrand must be zero at every point of the
interval [0, L]. In other words, the extremizing function u must satisfy the differential equation:
(2.42)
which is same as equation (2.1a). Combining equations (2.40) and (2.41), the condition satisfied
by u reduces to
(2.43)
Since, this condition is also true for an infinite number of functions, namely, a set of functions
which satisfy the condition = 0 at x = 0 but otherwise are arbitrary, the only solution of equation
(2.43) is

at x = L.

(2.44)

This condition is same as the boundary condition (2.1c).


What we have shown is as follows. An admissible function u (i.e. a function u that satisfies the
condition u = 0 at x = 0) which extremizes the functional I (expression 2.33) satisfies the DE
(2.1a) (Called as the Euler equation) and the BC (2.1c) (called as the natural boundary condition).

Bilinear and Quadratic Forms


The two integral formulations discussed above, namely (2.5b) or (2.6) and (2.33) can be
expressed conveniently if the following notation is introduced. For any two functions g(x) and h(x)
defined over the interval [0, L], we define

Linear Form :

(2.45)

Bilinear Form :

(2.46)

Quadratic Form :

(2.47)
Here, L is the length of the bar, f is the distributed force acting on the bar, P is the point force
acting on the bar at the end x = L, E is the Young's modulus of the bar and A is the area of the
cross-section of the bar.
If u is the axial displacement and w is the weight function, then the integral formulation (2.5b) is
obtained by replacing the functions g and h by u and w and equating the expressions (2.45) and
(2.46), Thus, the weak or weighted residual formulation is given by
(2.48)
B(u,w)=F(w)
Further, if h is replaced by the virtual displacement
rather than by w, then we get the integral
form (2.6) corresponding to the virtual work formulation:
(2.49)
If the quadratic form (2.47) is used instead of the bilinear form (2.46), then the integral form
(2.33) corresponding to the variational formulation is expressed as
(2.50)
Note that the form (2.50) represents an expression, which needs to be extremized to get the
solution. On the other hand, the forms (2.48) or (2.49) represent equations, which need to be
solved to get the solution.

Ritz Method: Part !

The variational functional I corresponding to the boundary value problem (2.1a), (2.1b) and (2.1c)
is given by equation (2.32). The solution to the boundary value problem is obtained by
extremising the functional I, that is, by setting the first variation of I to zero. Using the expression

Ritz Method

(2.37) for I, substituting u/ for


u and multiplying all the terms by , we get

(3.1)

Note that, using the above equation is equivalent to using the integral form corresponding to the
virtual work formulation (equation 2.6) or the weighted residual (weak) formulation (equation
2.5b). While using the weighted residual formulations, however, one needs to choose an
appropriate form for the weight function w also. This point is made clear in section 3.6
As stated in the introduction, in Ritz method, an approximate solution is assumed as a series of N
terms of the following form :

(3.2)

where
are unknown coefficients and
are a set of linearly independent functions of x
defined over the interval [0,L]. The term linear independence means as follows. Consider a
linear combination of

involving scalar coefficients

for

. If the only solution of the equation

[0,L]

(3.3)

i = 0,1..N,

(3.4)

is that all the coefficient are trivially zero, i.e.


for

then, the set of functions

is said to be linearly independent over the interval [0,L]. The

functions
are called as the basis functions . Here, the basis functions are defined over the
whole bar, i.e. for the interval [0,L]. Thus, they are called as the global basis functions. Later on,
in finite element formulation, the (local) basis functions will be defined over a part of the element,
called as an element.
When the weighted residual formulation is used, in general, the weight functions need not be the
same as the basis functions. However, when both the sets are identical, this special case of the
weighted residual formulation is called as the Galerkin formulation. This point is discussed in
more details in section 3.6.
Note that the function

is required to satisfy the three admissibility conditions stated in

section 2.6. These conditions impose certain restrictions on the basis functions
second condition implies that
that the derivatives

must be unconstrained at

must be finite over the whole interval

. The

. The third condition requires


. The third restriction on

the functions
is imposed by the first admissibility condition that the form
3.2) must satisfy the Dirichlet boundary condition (equation 2.1b). Then we get

(expression

(3.5)

If we assume that all

except

satisfy the condition


(3.6)

at x = 0
then, from equation (3.5), we get

(3.7)
Then, the series in expression (3.2) starts from i = 1 rather than form i = 0. Thus,

(3.8)

where

are linearly independent and satisfy the condition (3.6).

Taking the variation of equation (3.2), we get

(property vii of section 2.5),

(property ii of section 2.5). (3.9)

Substituting the expression (3.9) for

(3.9)

in equation (1), we get

(3.10)

Note that, in the above expression, each of the coefficients

can be varied independently. That

is, for given j, we can choose


to be non zero and all the remaining
Then, the above equation leads to the following set of equations:

to be zero.

(3.11)

Substituting the expression (3.8) for


from i to j, we get

in equation (3.11) and changing the summation index

(3.12)

)-

Now define the following quantities :

(3.13)

(3.14)

Then, equation (3.12) becomes

(3.15)

In matrix form, this can be written as


(3.16)

Note that, if the functions

are non-dimensional, then the dimensions of the vectors

and

turn out to be that of the displacement and force respectively. Then, the dimension of
becomes that of stiffness (i.e. force per unit length). Therefore,
matrix,

is called the displacement vector and

The matrix

is called as the stiffness

is called as the force vector.

has the following properties.

Expression (3.13) shows that


(3.17)

Thus, the matrix


Note that

is symmetric.

(3.18)

Thus,
for any non-trivial vector
Therefore,
Hence,

(3.19)

is a positive definite matrix. This implies that

is invertible or

exists.

(3.20)
Thus, Ritz method converts the differential equation of a boundary value problem into a set of
algebraic equations using the corresponding integral form. Solution of the algebraic equations
(equation 3.16) gives the coefficients of the assumed form of the solution (expression 3.8).
Examples in the next section illustrate this procedure. These examples also show that, as the
number of terms is increased, the solution becomes more accurate. It also illustrates that at the
points of singularity in loading or geometric property (like A) or material property (like E), the
accuracy is poor if only a few terms are chosen.
Amongst the many sets of linearly independent functions available, the set of polynomials offers a
very simple and easy choice as far as the mathematical operations of Ritz method are concerned.
Therefore, we choose

as the following set :


(3.21)

But,
are supposed to satisfy the condition
= 0 at x = 0. The first member of this set
does not satisfy this condition. Therefore, we choose the set without the first function. Therefore
(3.22)
Note that these functions satisfy all the constraints arising out of the three admissibility conditions
required to be satisfied by

Example 1
Consider a bar of uniform cross-section shown in Fig. 3.1. The distributed force acting on the bar
is varying linearly with x. Thus,

f(x)=x

(3.23)

Figure 3.1

We choose the following numerical values of various geometric, material and force parameters.

EA = 1, L = 1, P =10.

(3.24)

We choose a two-term approximation for the solution. Thus,


(3.25)
where the basis functions are chosen to be the polynomials :

(3.26)

Then, the derivatives of the basis functions are given by


(3.27)

Substituting the expressions (3.26) and values from equation (3.24), the expression for
becomes

=
(3.28)

Substituting the expressions (3.23) and (3.26) and values from equation (3.24), the expression for
{F} takes the form :

{F} =

(3.29)

Therefore, the matrix form of the algebraic equations (equation 3.16) becomes

(3.30)

The solution of this equation is given by

(3.31)

Therefore, the approximate solution (equation 3.25) becomes


(3.32)
To study the improvement in the accuracy of the solution, we consider the 3-term approximation
next. Thus,
(3.33)
where,
(3.34)
The derivatives are given by
(3.35)

Substituting the expressions (3.35) and values from (3.24), the

matrix becomes

(3.36)

Further, using the expressions (3.23) and (3.34) and the values from equation (3.24), the vector
{F} becomes

(3.37)

Then, the matrix form (equation 3.16) of the algebraic equations become

(3.38)

The solution of above equation is

(3.39)

Therefore, the approximate solution (equation 3.33) is given by


(3.40)
For comparison purpose, the exact solution is needed. It can be found as follows. Substituting the
expression for f from equation (3.23) and the values of EA , L and P from equation (3.24), the
boundary value problem (equations 2.1a, 21b and 21c) becomes

BC :
(ii)

0 <x <1;

(3.41a)

at x = 0,

(3.41b)

x=1

(3.41c)

at

The solution of this problem is given by


(3.42)

Thus, it is seen that the 3-term approximation gives the exact solution. Substituting x =1 in
equations (3.32) and (3.42), we get
(3.43)
(3.44)
Thus, the 2-term solution, although not exact, gives the exact value of the maximum
displacement

Module 1 :
Lecture 3B : Ritz Method : Part 2

Integral Forms Corresponding to a Point Force in the Interior of the Domain

Ritz Method Corresponding to a Point Force in the Interior of the Domain


As, before, choose an N -term approximation to the solution u (equation 3.8) containing the unknown
coefficients

and the known function

must satisfy the condition

. The known functions

= 0 at x = 0. In Ritz method, the solution is obtained by extremising the

variational functional I , i.e. by setting the first variation


variation in the expression (3.52) for

to zero. Substituting the expressions for u and its

and setting it to zero, we get the same algebraic equations as before

(equation 3.15). Further, the coefficient matrix


but the right side vector

must be linearly independent and

of these equations is the same as before (equation 3.13)

contains an additional term compared to equation (3.14). Thus,

is given by

(3.53)

Example 2
Consider a bar of uniform cross-section shown in Fig. 3.4. Besides the point force P acting at the
end x = L , there is an additional point force F acting at the midpoint, i.e. at the point

Figure 3.4

We choose the same numerical values of the parameters EA , L and P as in example 1. Those
values are given by equation (3.24). We choose the value of force F as

F = 20.

(3.54)

First, we chose the two-term approximation for the solution which is the same as in example 1. It
is given by equations (3.25) and (3.26). Since the value of EA and the expressions for

, i = 1, 2

are the same as in example 1, the coefficient matrix


is the same as before (equation 3.28).
For the evaluation of the right side vector, we use expression (3.53). Since, there is no distributed
force, i.e. f = 0, and the force F acts at the midpoint , i.e.

, equation (3.53) becomes


(3.55)

Substituting the expressions for


3.54 ), we get

(equation 3.26) and the values of P and F (equations 3.24 and

(3.56)

Now, the matrix form of the algebraic equations (equation 3.16) becomes

(3.57)

The solution of this equation is given by

(3.58)

Therefore, the approximate solution (equation 3.25) becomes


(3.59)
Next, we choose the three-term approximation for this solution given by equations (3.33) and
(3.34). Then the coefficient matrix
is given by equation (3.36). Substituting the expression for
(equation 3.34) and the values of P and F (equations 3.24 and 3.54), the expression (3.55) for
{ F } becomes:

(3.60)

Now, the matrix form of the algebraic equations (equation 3.16) becomes

(3.61)

The solution of this equation is given by

(3.62)

Therefore, the approximate solution (equation 3.33) becomes


(3.63)
Thus, there is no improvement in the solution when the third term is added.
For comparison purpose, we find the exact solution. Substituting
, f = 0 and the values of
EA , L , P and F (equations 3.24 and 3.54), the boundary value problem (equations 3.45a, 3.45b,
3.45c, 3.45d) becomes

DE:

0 < x < 0.5, 0.5 <

BC:

at x = 0,

(ii)
(iii)
The solution of this problem is given by

at

x = 1,

x <1;

(3.64a)
(3.64b)
(3.64c)
(3.64d)

(3.65)

The graphical representation of the three solutions


Fig. 3.5

is shown in

Figure 3.5

Whereas the exact solution is piecewise linear, the approximate solution is quadratic over the
whole domain. The maximum value of the displacement (i.e. u at x = 1) predicted by the
approximate solution matches with the exact solution. However, the maximum error of the
approximate solution is -8.33% which occurs at x = 0.5 (the point of application of F ).
Equations (3.59) and (3.65) give the following values of the displacement derivatives of the
approximate solution

and the exact solution

at

x = 1,

at

x = 1.

at x = 1 :

(3.66)

Further, at the point of application of F (i.e., at x = 0.5) :

at
at
at

x = 0.5;
,
(3.67)

Thus, the approximate solution is neither able to provide a good approximation to the derivate nor
able to capture the jump in the derivative.

Weighted Residual Method


In this method, we use the integral form corresponding to the weighted residual formulation
(equation 2.5b) while obtaining an approximate solution. We rearrange equation (2.5b) as
follows :

(3.68)

|
As in the Ritz method, an approximate solution is assumed as a series of N terms involving the
unknown coefficients
interval [0,L] :

and a set of linearly independent functions

defined over the

(3.69)

The application of the Dirichlet boundary condition on


leads to

(equation 2.1b) to this expression

(3.70)
at
If we assume that all

except

satisfy the condition

at

(3.71)

then, from equation (3.70), we get


(3.72)
Then, the expression (3.69) starts from i = 1 rather then from i = 0. Thus,

(3.73)

Substitution of this expression in equation (3.68) leads to :

(3.74)

To convert the above equation into a set of N algebraic equations in the unknown coefficients
we choose N weight functions as follows :

(3.75)

for
Here, the functions

represent another set of linearly independent functions defined over

the interval [0, L ]. Note that the functions

must satisfy the constraints arising out of the

admissibility conditions of the weight function

. These conditions are stated in section 2.2.

When the functions

, the corresponding weighted residual method

are different from

is called as the Petrov-Galerkin Method. On the other hand, when the functions

are the

same as
, then the method is called as the Galerkin Method. The next section describes
the details of the Galerkin method.

Galerkin Method
In Galerkin method, we choose
for
Note that the constraints on

(3.76)

.
arising out of the admissibility conditions of

follows. The first admissibility condition requires that the functions

must be zero at

(that is, at the point of application of the Dirichlet boundary condition on


constraint is identical to the condition (3.71). The second condition implies that
unconstrained at
. The third condition requires that the derivative
over the whole interval (0, L ).
Substituting the expression (3.76) for

). Note that this


should be
must be finite

in equation (3.74), we get

for
Now, define the following :

are as

(3.77)

(3.78)

,
(3.79)

Then, equation (3.77) becomes

(3.80)

In matrix form, this can be written as :


(3.81)
Note that, we get the same set of algebraic equations as in the Ritz method (equations 3.133.16). Therefore, as in the Ritz method, the stiffness matrix
definite.

is symmetric and positive

Introduction
In the last lecture, two examples were solved using the Ritz method. The basis functions chosen
were a set of polynomials (equation 3.21), for which all the derivatives are continuous over the
whole domain. But, as the second example shows, such functions are neither able to provide a
good approximation to the first derivative nor able to capture a jump in the derivative unless a
very large number of terms is chosen. Since, the stresses are the first derivatives of the
displacement, these basis functions are not adequate for providing a good approximation to the
point wise stresses. In this lecture, a new set of basis functions is proposed which can do this job
in a better way.

Basis Functions
Note that, in the second example of Lecture 3, the exact solution is piecewise linear. Consider
another such example shown in Fig. 4.1.

Figure 4.1
Here also, the exact solution is piecewise linear as shown in Fig. 4.2.

Figure 4.2

This suggests that piecewise linear basis functions may be a better choice in simulating the
jumps in the derivatives or providing a more accurate approximation to the derivatives. One such
set of ( N +1) functions is shown in Fig. 4.3. To construct such functions, the domain is partitioned
into N parts (Fig. 4.3) with the intermediate points

. The functions

(except

(x) and

(x)) are zero out side the interval

. Within the interval, they are

piecewise linear with the maximum value of unity at

Figure 4.3

Note that these functions are linearly independent and satisfy all the constraints arising out of the
three admissibility conditions on u(x). In particular, they satisfy the constraint that the derivatives
are finite. For
to be finite, the functions
need not be piece-wise linear.
They only have to be piecewise differentiable with jumps in the derivatives as shown in Fig. 4.4.

Figure 4.4

Solution Procedure
As before, an approximate solution is assumed as a series of N+ 1 terms

(4.1)

However, here, the unknown coefficients are denoted by


rather than as
Note that, the Dirichlet boundary condition (equation 2.1b) implies

at x

(as in equation 3.2).

(4.2)

=0

However, all
except
are zero at x = 0 (Fig. 4.3). Therefore, to satisfy this condition,
the first coefficient must be zero :
(4.3)
Then, the series (4.2) starts from i = 1 rather than from i = 0. Therefore,

(4.4)

When the expression (4.4) is substituted in the integral form (equation 3.52), we get

, for i = 1,2,, N
where the expressions for the stiffness matrix
and the force vector
(3.13) and (3.53). In matrix form, equation (4.5) can be written as

(4.5)

are given by equations

(4.6)

Example 1
In the example, the bar of Fig. 3.4 is considered:

Figure 4.5

The numerical values of various parameters are as before:

EA = 1 , L = 1 , P = 10 , F = 20.

(4.7)

A two-term approximation is chosen for the solution :


(4.8)

where the functions

and

are defined as follows :


for
for

(4.9)

for
for

These functions, along with

are shown in Fig. 4.6.

(4.10)

Figure 4.6

Note that the derivatives of the basis functions are given by :

for
for

(4.11)

for
for

(4.12)

Substituting the expressions (4.11) and (4.12) for


and the values of EI and L from
equation (4.7) in equation (3.13), the elements of the stiffness matrix [ K ] become :

(4.13)

(4.14)
(4.15)
(4.16)

Thus

(4.17)

Substituting f = 0 and a = L /2, the expression (3.53) for

becomes :
(4.18)

Substituting the values of P , F and L from equation (4.7) and the expressions (4.9) and (4.10) for
in the above equation, the elements of the force vector become :
(4.19)
(4.20)
Thus,

(4.21)

Thus, the algebraic equations (equation 4.6) become :

(4.22)

The solution of the above equation is:

(4.23)

Then, the approximate solution (equation 4.8) becomes :

for
for

(4.24)

This is the same as the exact solution (equation 3.65).


The example in the next section shows that, even for a distributed load, the piecewise linear basis
functions can approximate the exact solution to any desired level of accuracy.

Example 2
In this example, the bar of Fig. 3.1. is considered.

Figure 4.7

The distributed force is given by


(4.25)
The values of other parameters are the same as before :

EA = 1 , L = 1 , P = 10.

(4.26)

Again, a two term approximation is chosen (equation 4.8) where the basis functions and their
derivatives are given by equations (4.9)-(4.12). The basis functions are shown in Fig. 4.6. Since
the basis functions and the values of EA and L are the same as in example 1, the [ K ] matrix is
the same as before (equation 4.17). With f ( x ) = x , F = 0 and L = 1, the expression (3.53) for
becomes:

(4.27)

Substituting the expressions (4.9)-(4.10) for


elements of the force vector become :

and the value of P from equation (4.26), the

(4.28)

(4.29)

Thus,

(4.30)

Then, the algebraic equations (equation 4.6) become :

(4.31)

The solution of the above equation is

(4.32)

Then, the approximate solution (equation 4.8) becomes :

for
for

(4.33)

The exact solution of the problem is given by equation (3.42). The graphical representation of the
two solutions (

(x) and

(x)) is shown in Fig. 4.8.

Figure 4.8

If a four-term approximation is chosen


(4.34)

where the basis functions

are as shown in Fig. 4.9,

Figure 4.9

then the approximate solution looks like as shown in Fig. 4.10.

Figure 4.10

Figure 4.10 shows that as we make the approximation finer and finer (i.e., as we add more
terms), the solution becomes more and more accurate. Thus, as the number (N) of terms in the
approximation increases,

Introduction

converges to the exact solution.

In the last lecture, two examples were solved using the hat-shaped, piecewise linear basis
functions to illustrate the effectiveness of these basis functions in providing a better
approximation to the derivatives. Only a few basis functions were used in solving these examples.
In this lecture, a general formulation is proposed using (N+1) piecewise linear basis functions.
Before that, the basis functions and the corresponding division of the domain into the parts (called
as the mesh) are discussed in detail.

Mesh and Global Basis Functions


As mentioned in section 4.1, the piecewise linear basis functions are generated by dividing the
domain
into many parts (Fig. 5.1). Since this is a one-dimensional problem, the domain
is
identical to an interval of length L.

Figure 5.1

To generate (N +1) basis functions, we divide the domain into N parts using the (N -1)
intermediate points and the two end points. These points are called as nodes . Thus, we have (
N +1) nodes. We number these nodes sequentially as shown in Fig. 5.1. In Fig. 4.3 we had
denoted the coordinate of the first node as
the ith node is denoted by

. But, now we label it as

. Thus, the coordinate of

. We place the nodes at the points of

discontinuities in the geometry,


discontinuities in the material properties, and
discontinuities in the loading (which also includes the points of application of the
concentrated forces)

Otherwise the nodes are equally spread.


The parts in which the domain is divided by nodes are called as the elements . These elements
are also numbered sequentially as shown in Fig.5.1. Thus, i th element, denoted by
by
for

i = 1,2,., N

, is defined
(5.1)

If the nodes are equally spaced, then the length of each element is equal. Let this length be
denoted by h . Then
(5.2)
for i = 1,2,, N .
The division of the domain into the elements and the nodes is called as the mesh . When all the
elements are of the same size, it is called as the uniform mesh. The quantity h is called as the
(uniform) mesh size .

h=

The piecewise linear basis functions are defined as follows. The functions
and

) are zero outside the interval

linear with the maximum value of unity at

. Within the interval, they are piecewise

. Thus,

for
for
for

Note that the function

can be expressed as :

for

=0

(except

belonging to other elements,

i = 1,2,., N .

has only a local support over the interval

(5.3)
.

Galerkin Method
We shall use the Galerkin method to obtain an approximate solution. Therefore, the integral form
to be used is given by equation (3.68). This equation is rearranged as

(5.4)

As before, we assume an approximate solution as a series of ( N +1) terms :

(5.5)

where
are the unknown coefficients and
are the basis functions described in the
previous section. Note that, now the basis functions are numbered from one rather than from zero
(as done in Lecture 4). Therefore the summation index also starts from one, and not from zero.
Another departure we make, from the methodology adopted in Lecture 4, is that we do not apply
the Dirichlet boundary condition in the beginning. It will be applied later.
For Galerkin method, we choose the basis functions
for

as the weight functions. Thus,

i=1,2,...,N+1

(5.6)

Note that these functions are linearly independent and satisfy all the constraints arising out of the
three admissibility conditions on
(5.4), we get

. Substituting the expression (5.6) for

in equation

for i = 1,2,., N +1.

(5.7)

Now, we write the integral from 0 to L as a sum of the integrals over N elements. Thus, we have

for

Next, to obtain ( N +1) algebraic equations for the unknowns


(5.5) for

i =1,2,., N +1. (5.8)

, we substitute the approximation

in the above equation. Thus we obtain

for

i = 1,2,.., N +1. (5.9)

for

i = 1,2,., N +1. (5.10)

align
="absmiddle">
Interchanging the sums on the left side, we get

Now, define the following :

i = 1,2,, N +1, j = 1,2,, N


+1;
for

(5.11)

(5.12)
for

i = 1,2,..., N +1.

Then, equation (5.10) becomes :

for

i = 1,2,, N +1.

(5.13)

In matrix form, this can be written as


(5.14)

The last term in the expression (5.12) for

can be simplified as follows. Note that, at the end

point x = L , all
are zero except for i = N +1 (Fig. 5.1). Therefore, the last term is nonzero
only for i = N +1. Thus, the expression (5.12) becomes

for

i = 1,2,, N ;

for

i = N +1.

(5.15)

The expressions (5.11) and (5.15) show that the stiffness matrix
and the force vector are to
be evaluated as the sums of the integrals over N elements. The systematic procedure for this
evaluation will be discussed in the next Lecture. However, for given i , the contribution of many
elements is zero as shown in the next paragraph.
Consider the expressions (5.11) and (5.15) for

and

for i = 1 and N +1, are zero outside the interval


and (5.15) for

and

. Note that the functions

(Fig. 5.1). Therefore, the sums (5.11)

receive the contributions only from the two elements : element i -1 and i,

that is, from

for i = 2,3,.., N . For i = 1, the function

non zero only for the first element

. Thus, for i = 1,

contributions only from the first element. For i = N +1, the function
last, i.e., Nth element

, except

. Thus, for i = N +1,

and

only from the Nth element. Thus , the expressions (5.11) and (5.15) for

for i = 1,
element)

and

is

receive the

is non-zero only for the


receive the contributions
and

become :

j = 1,2,., N +1, (1st

(1st element)

((i-1)th element)

(Nth element)

for

i = 2., N , j = 1,2,., N +1,

for

i = N+1, j = 1,2,.,N+1;

(ith element)

(5.16)

for

i = 1,

for

i = 2.,N,

for

i = N +1.

(1st element)

(5.17)

It is observed that the stiffness matrix


in equation (5.13) is a sparse matrix . More precisely, it
is a banded matrix . This can be shown as follows.
Note that all

except when j = i -1 and i . Similarly,

are zero over the next interval

all
are zero over the next interval
except when j = i and i +1 (Fig. 5.1). Therefore,
the only non-zero contributions to the sum on the left side of the equation (5.13) are from j = i -1, i
, i +1. Thus, ith equation in the set (5.13) becomes

(5.18)

where, for i = 2,3,.., N ,

for

j=

for

j = i,

for

j = i +1,

for remaining

(5.19)

Further, for i = 1, the only non-zero contributions to the sum on the left side of equation (5.13)
come from j =1 and 2. Thus

(5.20)

where

for j

for

= 1,

j = 2,

for remaining j .

(5.21)

Similarly, for i = N +1, the only non-zero contributions to the sum on the left side of equation
(5.13) come from j = N and N +1. Thus,

(5.22)

where

for

j=N,

for

j = N +1,

for remaining j .

(5.23)

Thus, ith equation has non-zero elements only in the columns j = i-1, i , and i +1. The remaining
columns are zero. Further, the 1st equation has non-zero elements only in the 1 st and
. Similarly, the last equation (i.e.,
columns. Thus, the matrix

equation) has non-zero elements only in the

columns
and

is a banded matrix.

Introduction
In the last lecture, general expressions were developed for the stiffness matrix and the force
vector using the piecewise linear basis functions. These expressions are to be evaluated as
the sums of the integrals over all the elements. This lecture discusses the systematic
procedure of this evaluation. First, the integrals are evaluated element wise and then they
are assembled over all the elements. For the convenience of the evaluation of the integrals
over the elements, local or element notation is introduced.

Local or Element Notation


In the last lecture, we introduced a numbering scheme for the elements, nodes, nodal coordinates
and basis functions. This is called as the global numbering scheme . It is shown in Fig. 6.1.

Figure 6.1 Global numbering scheme

For the convenience of the element wise evaluation of the stiffness matrix and the force vector, at
the element level, we introduce another numbering scheme for the nodes, nodal coordinates and
basis functions. This scheme is called as the local or element numbering scheme. For k-th
element, this numbering scheme is illustrated in Fig. 6.2

Figure 6.2 Elemental numbering scheme for k-th element

For k-th element, note that, the global numbers of the two end nodes are k and k+1 respectively
(Fig. 6.1). Now we number them as 1 and 2 (Fig. 6.2). We call it as the local or element node
numbering scheme . Note that the global notation for the coordinates of the end nodes is
and
(Fig. 6.1). Now, we denote them as
and
(Fig. 6.2). This is called as the local or
element notation . The subscript here denotes the local node number. For every element, the
nodes will always be numbered as 1 and 2 according to the local numbering scheme. Therefore
to identify the element under consideration, a superscript is added to the notation of the
coordinates. The superscript denotes the element number. Figure 6.1 shows that the only nonzero basis functions for the

-th element are

and

. This is the global notation for the

basis functions. Under the local or element notation , we denote them as


and
. Here,
the subscript denotes the local number of the node at which the basis function attains the value
unity and the superscript represents the element number under consideration. These functions
are called as the shape or interpolating functions . Using equation (5.3), the expressions for
the shape functions can be written as:

(6.1)

where the expression (5.2) for the element size becomes


(6.2)

=
Consider the expression (5.5) for the approximate solution:

(6.3)

Note that, since


displacement at node
Since, the subscript

is unity at node j (Fig. 6.1), the unknown coefficient


. The unknowns

are called as the degrees of freedom of the rod.

denotes the global number of the node

degrees of freedom . For the


.Therefore, the expression for

is the unknown

, they are called as global

-th element, the only non zero basis functions are


over the

and

-th element becomes

(6.4)
For the convenience of element wise calculations of the stiffness matrix and force vector, we
introduce another notation for
and
. We denote them as
and
. Here, the subscript
denotes the local number of the node to which the displacement belongs and the superscript
represents the element number under consideration. This notation is called as the local or
element notation and (
,
) are called as the local or element degrees of freedom of the
-th element. Then the expression (6.4) under the element notation becomes
(6.5)

Expressions for Element Stiffness Matrix and Force Vector


Now, we shall determine the row and column numbers of the matrix equation (5.14) to
which the
(5.13):

-th element makes the contribution. For this purpose, consider equation

(6.6)

where the expressions for the stiffness matrix


(5.11) and (5.12):

and the force vector

are given by equations

(6.7)

and

(6.8)

The above expression can be written as

(6.9)

(6.10)

and

(6.11)

(6.12)

Note th at

and

represent the contributions of the

-th element to the stiffness matrix

and the force vector


. The second term of equation (6.11) is a contribution from the last
element only. This term needs to be treated separately and therefore not included in the
expression for

and the present discussion. Using the expressions (6.10) and (6.12), the

contribution to equation (6.6) of the

-th element can be written as

(6.13)

Note that the values of

for which

is nonzero over the

. Therefore, the only nonzero rows of

and

nonzero equations of the set (6.13) are =

and =

are =

-th element are


and =

and

. Thus, the only

. These equations are as follows:

(6.14)

(6.15)

Since, the only values of

for which

is nonzero over the interval

are

and

. Therefore, the above equations become:

(6.16)

(6.17)
.
In matrix form, this can be written as

,
where

(6.18)

(6.19)

and

(6.20)

In elemental notation, the above quantities can be written as

(6.21)

and

(6.22)

Note that, the elements of

and

are zero when

or

and

or

. Thus,
(6.23)

and
(6.24)
Therefore, these quantities are often expressed as

(6.25)

,
and

(6.26)

The matrix (6.25) is called as the element stiffness matrix whereas the vector (6.26) is called as
the element force vector . Note that the notation for the elemental quantities uses small letters :
small k for the stiffness matrix and small f for the force vector. The notation for the corresponding
full matrix or full vector uses capital letters : capital K for the stiffness matrix and capital F for the
force vector.
The expressions (6.25) and (6.26) help in the systematic evaluation of the global stiffness
matrix
follows:

and global force vector

of equation (6.6). The procedure can be described as

i.

First, the stiffness matrix and the force vector of each element are evaluated using the
expressions (6.25) and (6.26). This can be done using a DO loop. Thus, for
, the elements stiffness matrix
evaluated using

and element force vector

are

(6.27)
and
(6.28)
ii.
iii.

Next, these quantities are expanded to the full size


and
. This is done
using the relationship between the local and global node numbering systems.
Finally, the expanded matrices and vectors of all the elements are added to get the global
stiffness matrix
expression for

and global force vector

. At this stage, the second term of the

(equation 6.8) also needs to be added.

The last 2 steps constitute what is called as the global assembly procedure. The details of the
procedure are discussed in section 6.4. Before that, section 6.3 discusses an example on
element calculation

6.3 Example on Calculations of Element Stiffness Matrix and Force Vector.


Consider a typical element . The nodes, the coordinates, the degrees of freedom and the shape
functions of the element (in the local notation) are shown in Fig. 6.3

Figure 6.3 A typical element k

Assume that

, a constant,
(6.29)

, a constant.
Using equation (6.1), the expressions for

, = 1,2 become:

,
(6.30)

,
where
(6.31)

Substituting equations (6.29-6.30) into the expression (6.25) for

, we get

(6.32)

Similarly, substituting equations (6.29-6.30) into the expression (6.26) for

, we get

Assembly of Stiffness Matrix and Force Vector


After the evaluation of element stiffness matrix and element force vector for all the elements,
these quantities need to be assembled to get the global stiffness matrix and global force
vector. As stated at the end of section 6.2, this procedure has two steps:
i.
ii.

Expansion of the element stiffness matrix and element force vector to the full size.
Addition of the expanded matrices and vectors over all the elements. At this stage, the
second term of the expression for

(equation 6.8) also needs to be added.

Let us first discuss the first step. Note that equations (6.25) and (6.26) are the expressions for the
element stiffness matrix

and the element force vector

(6.22) are the expressions for their expanded versions

while equations (6.21) and


and

. When we compare

equations (6.25) with (6.21), we observe that (1,1) component of

occupies the position

of the expanded matrix


. This is because
of the element k. Thus, the first step involves:

Choose the component

Find the global number of the local nodes and


respectively.

Then the component


expanded matrix
expanded matrix.

is the global number of the local node 1

of the element

occupies the location in


. Thus, the component

Repeat the steps (i)-(iii) for the other values of

. Let they be

-th row and s -th column of the


goes to the location

and

and

in the

. The remaining components of

are made zero.


The first step can be expressed mathematically by introducing a matrix
, called as the
connectivity matrix , which relates the local and global numbering systems. The number of rows
in the connectivity matrix is equal to the number of elements and the number of columns is equal
to the number of nodes per element. Thus, the row index of

denotes the element number and

the column index of


represents the local node number. The elements of
are the
corresponding global node numbers. Thus, for the mesh of Fig. 6.1, the connectivity matrix
becomes

(6.34)

The first row of the connectivity matrix contains the global numbers of the first and second local
nodes of element 1. The global numbers corresponding to the first and second local nodes of
element 2 are written in the second row. Continuing in this way, the global numbers of the first
and second local nodes of element

appear in the

-th row. The last row contains the global

numbers associated with the first and second local nodes of the last, i.e.
expression (6.34), in the index notation, can be expressed as

-th element. The


(6.35)

It means the global number

of the local node

component of the connectivity matrix in

of the element

-th row and

is obtained as the value of the

-th column. As an example, consider the

case of = 3 and = 2. The expression (6.35) gives


. This means 4 is the global
number of the second local node of the element 3. This can be verified from Fig. 6.1.
Now, the first step of the assembly procedure can be expresses as follows. The expanded matrix
is obtained from the element stiffness matrix

by the relation:
(6.36)

Similarly, to obtain the expanded vector


relation:

from the element force vector

, we use the
(6.37)

Thus, we use the following procedure:


i.
ii.

Choose the component


Find the global number of the local node from the connectivity matrix. Let it be

iii.

Then, the component

iv.

Repeat the steps (i)-(iii) for the other values of


made zero.

goes to the location

of the expanded matrix.


. The remaining components of

are

The second-step is straight-forward. After obtaining the expanded versions of the element
stiffness matrix and the element force vector for all the elements, they are added as follows:

(6.38)

(6.39)
The matrix

corresponds to the second term of equation (6.8). Note that, the only basis

function which is nonzero at

is

. Further, it's value at

is 1. Thus
(6.40)

Therefore, the vector {P} can be written as

(6.41)

Example on Assembly of Stiffness Matrix and Force Vector


As an example, consider the mesh of 6 elements (N = 6) and 7 nodes, shown in Fig. 6.4.

Figure 6.4 Mesh with 6 elements

The connectivity matrix for this mesh can be written as:

(6.42)

.
Let

(6.43)

,
and

(6.44)

be the element stiffness matrix and the element force vector of the elements
Consider the element 1, i.e.

=1,2,3,4,5,6.

. Note that

(6.45)

Then as per equation (6.36), components of the stiffness matrix of the element 1, i.e. of
occupy the following locations in the expanded matrix

:
(6.46)

Similarly, as per equation (6.37), components of the force vector of the element 1, i.e. of
occupy the following locations in the expanded vector

:
(6.47)

The remaining components of the expanded matrix


zero. Thus, the matrix

and the expanded vector

are

becomes:

(6.48)

.
and the vector

becomes:

(6.49)

Similarly, we obtain the expanded versions of the element stiffness matrix


force vector

for the remaining elements, i.e. for

for the 3 rd element (i.e. for


are:

), the expanded matrix

and the element

= 2,3,4,5,6. It can easily be verified that,


and the expanded vector

(6.50a)

(6.50b)

This completes the first step.


In the 2nd step, we add all the expanded matrices and vectors. Thus, equation (6.38) gives the
following expression for the global stiffness matrix:

(6.51)

Similarly, the sum of the expanded force vector becomes:

(6.52)

However, before we get the global force vector


expression. Since
the vector
becomes:

(no. of elements) = 6, the

will be

, we need to add the vector

to the above

-th component, i.e. the 7-th component of

. The remaining components will be zero as per equation (6.41). Thus,

(6.53)

Substituting the expressions (6.52) and (6.53) in equation (6.39), we get the following expression
for the global force vector

(6.54)

Now, as in section 6.3, assume that


Further, assume that the length

and

(distributed force) are constant for the entire bar.

of each element is constant. Let us denote it by h . Then


(6.55)

Then, equation (6.32) implies that the element stiffness matrix


and is given by

is identical for each element

(6.56)

Similarly, equation (6.33) implies that the element force vector


element and is given by

is identical for each

(6.57)

Substituting the expression (6.56) in equation (6.51), we get

(6.58)

Further, substituting the expression (6.57) in equation (6.54), we get

(6.59)

In actual calculations, the assembly procedure is appropriately modified to reduce the


computational time and storage requirements. When, the number of elements is large, storing of
the expanded matrices and vectors for each element needs a lot of storage requirement.
Therefore, the process is modified as follows:

Once the expanded version

of the element stiffness matrix of the first element

is obtained, the element stiffness matrices of other elements are not expanded.

Instead, the locations of the components of the stiffness matrix

are determined using equation (6.36).


From the connectivity (6.34), it is easy to see that

of the element two

(6.60)

Introduction
Determination of the element stiffness matrix and the element force vector and their assembly
into the global stiffness matrix and global force vector were discussed in the last lecture. Before
solving the (global) finite element equations, the essential or the Dirichlet boundary condition (i.e.,
the boundary condition on the primary variable) needs to be applied. This lecture discusses the
procedure of the application of the essential boundary condition.
Note that, in the Ritz Method or in the Weighted Residual Method, the basis functions
0,., N are chosen such that the approximate solution (equations 3.2 and 3.69)

,j=

(7.1)

satisfies the essential boundary condition automatically. Thus, this boundary condition is applied
in the beginning itself. It is applied even before developing the algebraic equations for the
unknown coefficients

.However, in the finite element formulation, the chosen basis functions

do not satisfy the essential boundary condition automatically (see equations 5.5 and 6.3).
Therefore, this boundary condition needs to be applied before solving the (global) finite element
equations.

Application of the Standard Essential Boundary Condition (i.e., Dirichlet Boundary Condition)
We shall illustrate the procedure for the application of the essential boundary condition through an example.
For this purpose, consider the example of section 6.5. Here, the mesh consists of N = 6 elements and N +1 =
7 nodes as shown in Fig.7.1.

Boundary Conditions at Both the Ends


Consider a bar whose both ends are fixed as shown in Fig. 7.3.

Figure 7.3 Bar with essential boundary condition at both the ends
Since, we have an essential boundary condition at the end

at

also, the boundary conditions (1.1c) becomes


(7.18)

Then the weighted residual expression becomes

(7.19)

If we develop the finite element equations for this problem using the 6-element mesh of Fig. 7.1, then the global
stiffness matrix remains unchanged, but the global force vector becomes

(7.20)

Now the finite element equations become


(7.21)
or

(7.22)

.
The essential boundary condition at the left end ( x = 0)
(7.23)

is applied by modifying the matrix

and the vector

using the expressions (7.14) and (7.15). Note that, here

. The essential boundary condition at the right end (

)
(7.24)

is also applied in similar fashion. But now, it is the nodal displacement of the 7 th node that is known. Therefore, we
apply the boundary condition as follows :

Replace the 7th equation by the condition

. Thus

,
for

j = 1,.,6,
(7.25)

Transpose the known terms from the first 6 equations to the right side :
for

j = 1,.,6,

for j = 1,., 6.

(7.26)

Natural Boundary Conditions at Both the Ends


Suppose, we have a bar where there is a natural or free boundary condition at both the ends

Figure 7.4 Bar with natural boundary conditions at both the ends

Then, for static equilibrium


(7.27)
Since, we have a force boundary condition at the left end also, the boundary condition (1.1b) gets
modified to

at

x = 0.

(7.28)

Then, the weighted residual integral becomes

(7.29)

If we develop the finite element equation for this problem using the 6-element mesh of Fig. 7.1,
then the global stiffness matrix remains unchanged, but the global force vector become

(7.30)

Now the finite element equations become


(7.31)
or

(7.32)

Note that by adding all the equations, we get


(7.33)

Since

, we get
(7.34)

This is the same equation as equation (7.27).


Note that, there are no essential boundary conditions. Therefore, no modification of either the
stiffness matrix or the force vector is needed before we solve the system of equations (7.31). But
there is a difficulty in solving these equations. It can be easily verified that the determinant of the
stiffness matrix
is zero or
is singular . In this case, the system of equations (7.31)
possesses many solutions or the solution is not unique . This can be seen as follows. Consider
the vector

(7.35)

, (

= arbitrary number).

It means all the nodal values of the axial displacement


equation (7.10) becomes

are identical (and are equal to

(7.36)

.
This implies that the axial displacement of the rod is same at every point (and is equal to
represents the rigid translation of the bar. Note that

). This

(7.37)

.
Let

). Then,

be a solution of the system of equations (7.31).Then

(7.38)

Thus, if
is a solution of the system of equations (7.31), then
is also a solution of
the same system of equations. Therefore, solution of the system of equations (7.31) is not
unique.
To make the solution unique, we have to make sure that there is no vector like
which
satisfies the equation (7.37). In other words, we have to ensure that there is no rigid body
translation mode in the deformation of the bar. To ensure this, we can set any nodal displacement
to any arbitrary value . To apply this condition, we carry out the modifications similar to
equations (7.14) and (7.15):

Replace the ith equation by the condition

. Thus

for

j = 1,..,7, j

i,
(7.39)

Transpose the known terms from the remaining equations to the right side :
for
for

Then, the modified

j = 1,..,7, j
j = 1,..,7, j

i,
i

(7.40)

becomes non singular and we can solve the modified system of equations

to get a unique solution. Note that the solution gives

Spring at One End


Consider a bar, fixed at the left end and supported by a spring at the right end (Fig. 7.5).

Figure 7.5 Bar supported by a spring at one end (

= pre-compression of the spring)

The above problem can be modeled by replacing the spring with a force

Figure 7.6 Equivalent problem

as shown in Fig. 7.6 .

The expression for the spring force

is
(7.41)

where is the spring force and


is the initial compression in the spring. Since the force is
compressive, the boundary condition (1.1c) becomes

, at

(7.42)

Then the weighted residual integral becomes

(7.43)

or

(7.44)

If we develop the finite element equations for this problem using the 6-element mesh of Fig. 7.1,
then the global stiffness matrix becomes

(7.45)

Further, the global force vector becomes

(7.46)

Then, the finite element equations become


(7.47)
or

(7.48)

Now the essential boundary condition


(7.49)

is applied by modifying the


(7.15). Note that here

matrix and
.

vector as described by equations (7.14) and

Vous aimerez peut-être aussi