introduction to the finite element methodwikicourses.wikispaces.com/file/view/chapterx1... · web...
TRANSCRIPT
Introduction to Finite Element Analysis
Mohammad Tawfik
Contents
1 Introduction..................................................................................................................... 4
2 Numerical Solution of Boundary Value Problems.............................................................4
2.1 Objectives..................................................................................................................4
2.2 Why Approximate?....................................................................................................4
2.3 Classification of Approximate Solutions of D.E.’s.......................................................5
2.4 Basic Concepts...........................................................................................................5
2.5 General Weighted Residual Method..........................................................................6
2.6 Collocation Method...................................................................................................9
2.7 The Subdomain Method..........................................................................................11
2.8 The Galerkin Method...............................................................................................13
3 The Finite Element Method............................................................................................17
3.1 Discretization...........................................................................................................18
3.2 Element Equations...................................................................................................18
3.3 Assembling elements’ equations.............................................................................21
3.4 Applying Boundary Conditions.................................................................................23
3.5 Solving......................................................................................................................23
3.6 Secondary Variables.................................................................................................24
3.7 Generalized Procedure for Getting Interpolation Functions....................................24
4 Trusses............................................................................................................................29
5 Beams and Frames.........................................................................................................33
5.1 Euler-Bernoulli Beam Theory...................................................................................33
5.2 Finite Element Trial Functions..................................................................................33
5.3 Beam Stiffness Matrix..............................................................................................36
6 Two Dimensional Elements............................................................................................38
6.1 A Rectangular Element............................................................................................38
6.2 Assembling 2-D Elements........................................................................................42
7 Stationary Functional Approach.....................................................................................46
7.1 Some Definitions......................................................................................................46
7.2 Applications.............................................................................................................47
7.2.1 The bar tensile problem....................................................................................47
7.2.2 Beam Bending Problem....................................................................................49
7.3 Plane Elasticity.........................................................................................................51
7.3.1 Strain-Displacement Relations..........................................................................52
7.3.2 Strain Energy.................................................................................................... 52Stationary Functional Approach 2
7.4 Finite Element Model of Plates in Bending..............................................................55
7.4.1 Displacement Function.....................................................................................55
7.4.2 Strain-Displacement Relation...........................................................................56
7.4.3 Constitutive Relations of Piezoelectric Lamina.................................................57
7.4.4 Stiffness and Mass Matrices of the Element.....................................................58
Introduction to the finite element method 3
1 Introduction
The finite element method has gained popularity for its simplicity and ability to model complex domains. The programming of the finite element method has been a task that a lot of software development firms have taken as its mission to provide the engineering market with packages that are capable of solving a multitude of problems starting from simple structure of fluid dynamics problems up to complex problems with coupled fields of electricity, mechanics of structures, fluid dynamics, and more.
In this course, we will aim at developing the necessary tools for the student to model physical problems using finite element method as well as programming simple problems of structure mechanics and some coupled problems. To achieve that aim, simple examples will be presented and the MATLAB code used to solve the problems will be listed. Further, the application of symbolic manipulators will be presented using the MATHEMATICA package.
2 Numerical Solution of Boundary Value Problems
Weighted Residual Methods
2.1 Objectives
In this section we will be introduced to the general classification of approximate methods. One of the approximate methods will receive attention, namely, the weighted residual method. Derivation of a system of linear equations to approximate the solution of an ODE will be presented using different techniques as an introduction to the finite element method.
2.2 Why Approximate?
The question that usually rises in the minds of engineers and students alike is, why do we study approximate methods? The main answer that should reply to that question is the ignorance of the humans! Up to this moment, scientists and engineers have been able to present a vast amount of mathematical models for physical phenomena, unfortunately, a very small percentage of those models, which are usually in the form of differential equations, have close form solutions! Thus, the necessity of solving those problems implies the use of approximate methods to get solutions for some specific problems of certain interest.
In the modern engineering life, packages that present solutions for problems using digital computers are everywhere. The understanding of how those packages perform approximate solutions for a certain physical problem is a necessity for the engineer to be able to use them. It is always a good idea to be able to predict how the output of the package is going to be in order to be able to distinguish the right results from errors that may occur due to bugs in the program or errors in the data given to the program.
On the other hand, an engineer who needs to develop a new technique for the solution of an advanced, or a new, problem, has to have a good background on how the old problems were solved.
Stationary Functional Approach 4
2.3 Classification of Approximate Solutions of D.E.’s
Two main families of approximate methods could be identified in the literature. The discrete coordinate methods and the distributed coordinate methods.
Discrete coordinate methods depend on solving the differential relations at pre-specified points in the domain. When those points are determined, the differential equation may be approximately presented in the form of a difference equation. The difference equation presents a relation, based of the differential equation, between the values of the dependent variables at different values of the independents variables. When those equations are solved, the values of the dependent variables are determined at those points giving an approximation of the distribution of the solution. Examples of the discrete coordinate methods are finite difference methods and the Runge-Kutta methods. Discrete coordinate methods are widely used in fluid dynamics and in the solution of initial value problems.
The other family of approximate methods is the distributed coordinate methods. These methods, generally, are based on approximating the solution of the differential equation using a summation of functions that satisfy some or all the boundary conditions. Each of the proposed functions is multiplied by a coefficient, generalized coordinate, that is then evaluated by a certain technique that identifies different methods from one another. After the solution of the problem, you will obtain a function that represents, approximately, the solution of the problem at any point in the domain.
Stationary functional methods are part of the distributed coordinate methods family. These methods depend on minimizing/maximizing the value of a functional that describes a certain property of the solution, for example, the total energy of the system. Using the stationary functional approach, the finite element model of a problem may be obtained. It is usually much easier to present the relations of different variables using a functional, especially when the relations are complex as in the case of fluid structure interaction problems or structure dynamics involving control mechanisms.
The weighted residual methods, on the other hand, work directly on the differential equations. As the approximate solution is introduced, the differential equation is no more balanced. Thus, a residue, a form of error, is introduced to the differential equation. The different weighted residual methods handle the residue in different ways to obtain the values of the generalized coordinates that satisfy a certain criterion.
2.4 Basic Concepts
A differential equation in the dependent variable f with the independent variable x may be written in the form:
L (f ( x ) )=g ( x )or
L (f ( x ) )−g ( x )=0
Introduction to the finite element method 5
Where L(.) is a linear differential operator and g(x) is the excitation function. The above equation has to have certain boundary conditions that render the solution unique. If we select different functions, Ψi, that satisfy all boundary conditions bud do not necessarily satisfy the differential equation, we may write the approximate solution of f(x) in the form of:
f ( x )=∑i=1
n
ai ψ i ( x )
Where ai are the generalized coordinates, or the unknown coefficients. Applying the differential operator on the approximate solution, you get:
L (f ( x ) )−g ( x )=L(∑i=1
n
ai ψ i ( x ))−g ( x )=∑i=1
n
ai L (ψ i (x ) )−g ( x )≠0
Note that the right hand side of the above equation is not equal to zero. The non-zero value
of the right hand side is called the reside.
∑i=1
n
ai L (ψ i (x ) )−g ( x )=R ( x )
The admissibility Conditions
The trial functions need to:
• Satisfy all boundary conditions!
• Be differentiable as much as the higher differentiation in the equation
2.5 General Weighted Residual Method
The general weighted residual method is based on integrating the residue multiplied by
weighting functions and then equating the resulting equations by zero. The weighting
functions are any set of functions that are continuous over the domain of the differential
equation. A set functions may be polynomial, sinusoidal, hyperbolic, or any combination of
functions. The number of functions needed should be equal to the unknown generalized
coordinates to produce a set of equations that are solvable in the unknowns. Also, the
weighting functions need to be linearly independent for the equations to be solvable.
Expanding the series of proposed solution functions, we get:Stationary Functional Approach 6
a1 L (ψ1 ( x ) )+a2 L (ψ2 ( x ))+.. .+an L (ψn ( x ) )−g ( x )=R ( x )
Multiplying by the weighting function and integrating, we get:
∫Domain
w j (x ) R ( x ) dx= ∫Domain
w j ( x )(∑i=1
n
ai L (ψ i ( x ) )−g ( x ))dx=0
∫Domain
w j (x ) R ( x ) dx= ∫Domain
w j ( x ) (a1 L (ψ1 ( x ) )+a2 L (ψ2 (x ) )+ .. .+an L (ψn (x ) )−g ( x )) dx
In matrix form
[k11 ⋯ k i 1 ⋯ k n1
⋮ ⋱ ⋮ ⋰ ⋮k1 j ⋯ k ij ⋯ knj
⋮ ⋰ ⋮ ⋱ ⋮k1 n ⋯ k in ⋯ knn
] {a i}={ ∫Domain
w j ( x ) g ( x )dx }
Where
k ij= ∫Domain
w j (x ) L (ψ i ( x ) ) dx
Example Problem
The bar tensile problem is a classical problem that describes the relation between the axially distributed loads and the displacement of a bar. Let’s consider the bar in Figure 2.1 with constant modulus of elasticity and cross section area. The force displacement relation is given by: Figure 2.1. Sketch of a bar with distributed axial forces
EA ∂2u∂ x2 +F=0
Subject to the boundary conditions
x=0⇒u=0∧x=l⇒du /dx=0
Now, lets use the approximate solution
Introduction to the finite element method 7
u ( x )=∑i=1
n
a iψ i ( x )
Substituting it into the differential equation, we get
EA∑i=1
n
a id2 ψ i ( x )
dx2 +F=R ( x )
Selecting weighting functions, Wi, and applying the method, we get:
EA [∫0l
w j (x )d2ψ i ( x )
dx2 dx] {ai }=−{F∫0
l
w j ( x ) dx}For the boundary conditions to be satisfied, we need a function that has zero value at x=0 and has a slope equal to zero at the free end. Sinusoidal functions are appropriate for this hence, using one-term series, we may use:
ψ ( x )=Sin ( πx2l )
For the weighting function, we may use a polynomial term. The simplest term would be 1.
[∫0
l
EA( π2l )
2Sin ( πx
2l )dx ] {a1}={∫0
l
fdx}Performing the integration, we get:
[EA( π2l )[−Cos( πx
2l )]0
l ] {a1}={fl }
When the equation is solved in the unknown coefficient (generalized coordinate), we get:
a1=fl
EA ( π /2l )=2l2
πf
EA≈0 .637 l2 f
EA
Then, the approximate solution for this problem becomes
u ( x )≈0 .637 l2 fEA
Sin( πx2l )
Stationary Functional Approach 8
Now we may compare the obtained solution with the exact one that may be obtained from solving the differential equation. The maximum displacement and the maximum strain may be compared with the exact solution. The maximum displacement is
u (l )≈0.637 l2 fEA
(exact=0. 5 )
And maximum strain is:
ux (0 )≈1. 0 lfEA
(exact=1 . 0 )
2.6 Collocation Method
The idea behind the collocation method is similar to that behind the buttons of your shirt! Assume a solution, and then force the residue to be zero at the collocation points.
R (x j )=0
The collocation method may be seen as one of the weighted residual family when the
weighting function becomes the delta function. The delta function is one that may be
described as:
δ (x−x j )=1 x= x j
¿0 x≠x j
∫−∞
∞
δ ( x−x j )F ( x ) dx=F (x j )
Now, if we select a set of points xj inside the domain of the problem, we may write down
the integral of the residue, multiplied by the delta functions, as follows:
R (x j )=∑i=1
n
ai L (ψ i (x j ))−F (x j )=0
Which gives
Introduction to the finite element method 9
[k11 ⋯ k i 1 ⋯ k n1
⋮ ⋱ ⋮ ⋰ ⋮k1 j ⋯ k ij ⋯ knj
⋮ ⋰ ⋮ ⋱ ⋮k1 n ⋯ k in ⋯ knn
] {a i}={g (x1)⋮
g (x j)⋮
g (xn)}
Where
k ij=L (ψ i (x j ))
Figure 2.2. A sketch of the differences between the exact and approximate solutions
Example Problem
Applying this method to the bar tensile problem described before, we get:
EA∑i=1
n
a i
d2 ψ i ( x )
dx2 +F (x )=R ( x )
Evaluating the residue at the collocation points, we get
EA∑i=1
n
a i
d2ψ i (x j)dx 2 +F (x j )=0
In matrix form
Stationary Functional Approach 10
[ k11 k21 .. . kn 1
k12 k22 .. . kn 2
⋮ ⋮ ⋱ ⋮k1 n k 2n .. . knn
]{a1
a2
⋮an
}=−{F (x1)F (x2)⋮
F (xn)}
Where
k ij=EAd2 ψ i (x )
dx2 |x=x j
Solve the above system for the “generalized coordinates” ai to get the solution for u(x)
Using Admissible Functions
• For a constant forcing function, F(x)=f
• The strain at the free end of the bar should be zero (slope of displacement is zero). We may use:
ψ ( x )=Sin ( πx2l )
Using the function into the DE:
EA d2 ψ ( x )dx 2 =−EA( π
2 l )2
Sin( πx2 l )
A natural selection for the collocation point may be the central point of the bar. Substituting
by the value of x=l/2, we get
a1=f
EA ( π /2l )2 Sin ( π /4 )=4√2l2
π2f
EA≈0 .57 l2 f
EA
• Then, the approximate solution for this problem is:
u ( x )≈0 . 57 l2 fEA
Sin ( πx2l )
Which gives the maximum displacement to be
Introduction to the finite element method 11
u (l )≈0.57 l2 fEA
(exact=0. 5 )
And maximum strain to be:
ux (0 )≈0 .9 lfEA
(exact=1.0 )
2.7 The Subdomain Method
The idea behind the subdomain method is to force the integral of the residue to be equal to zero on a subinterval of the domain. The method may be also seen as using the unit step functions as weighting functions. The unit step function may be described by the following relation:
U (x−x j )=1 x≥x j
¿0 x<x j
U (x−x j )−U ( x−x j+1)=1 x j+1≥x≥x j
¿0 x<x j or x>x j+1
Hence the integral of the weighted residual method becomes
∫x j
x j+1
R (x ) dx =0
Substituting using the series solution
∑i=1
n
ai ∫x j
x j+1
L (ψ i ( x ) )dx−∫x j
x j+1
g ( x )dx =0
Stationary Functional Approach 12
Figure 2.3. Sketch of the differences between the exact and approximate solutions
For the bar application
EA∑i=1
n
a id2 ψ i ( x )
dx2 +F (x )=R ( x )
Performing the integration and equating by zero
EA∑i=1
n
a i ∫x j
x j+1 d2 ψ i (x )
dx2 dx=−∫x j
x j+1
F (x ) dx
Which gives the equation in matrix form as
EA [∫x j
x j+1 d2ψi ( x )
dx2 dx] {ai }=−{∫x j
x j+1
F (x ) dx }Using Admissible Function
ψ ( x )=Sin ( πx2l )
The differentiation will give
EA d2 ψ ( x )dx 2 =−EA( π
2 l )2Sin( πx
2 l )Since we only have one term in the series, we will perform the integral on one subdomain; i.e. the whole domain
[∫0
l
EA( π2l )
2Sin ( πx
2l )dx ] {a1}={∫0
l
fdx}Performing the integral
[EA( π2l )[−Cos( πx
2l )]0
l ] {a1}={fl }
Introduction to the finite element method 13
Evaluating the generalized coordinate
a1=fl
EA ( π /2l )=2l2
πf
EA≈0 .637 l2 f
EA
Then, the approximate solution for this problem is:
u ( x )≈0 .637 l2 fEA
Sin( πx2l )
Which gives the maximum displacement to be:
u (l )≈0.637 l2 fEA
(exact=0. 5 )
And maximum strain to be:
ux (0 )≈1. 0 lfEA
(exact=1 . 0 )
2.8 The Galerkin Method
The Galerkin method uses the proposed solution functions as the weighting functions. Thus the solution procedure will require the selection of one set of functions. That method has proven very efficient and accurate as a weighted residual method. Many numerical solutions methods are derived from the Galerkin method. The Galerkin method may be presented by the following integral
∫Domain
R ( x )ψ j ( x )dx=0
When substituting with the series solution, the weighted residual integral will become
∑i=1
n
ai ∫Domain
ψ j (x ) L (ψ i (x ) )dx− ∫Domain
ψ j ( x ) g ( x ) dx=0
Applying the Galerkin method to the bar problem, we get
EA∑i=1
n
a i ∫Domain
ψ j ( x )d2 ψ i ( x )
dx2 dx=− ∫Domain
ψ j ( x ) F ( x ) dx
Which in matrix form becomes
Stationary Functional Approach 14
EA [ ∫Domain
ψ j ( x )d2 ψ i ( x )
dx 2 dx ] {ai }=−{ ∫Domain
ψ j ( x ) F ( x ) dx }Solve the above system for the “generalized coordinates” a i to get the solution for u(x). Let’s use the same function as in the previous methods
ψ ( x )=Sin ( πx2l )
Substituting with the approximate solution:
EA∑i=1
n
a i ∫Domain
ψ j ( x )d2 ψ i ( x )
dx2 dx=− ∫Domain
ψ j ( x ) F ( x ) dx
We have
−EA( π2 l )
2a1∫
0
l
Sin( πx2 l )Sin( πx
2l )dx=−EA( π2l )
2a1∫
0
l
Sin 2( πx2 l ) fdx
Which gives
−EA( π2 l )
2a1
l2=−2l
π
Substituting and solving for the generalized coordinate, we get
a1=f
EA16 l2
π3 ≈0.52 fl2
EA
In most structure mechanics problems, the differential equation involves second derivative
or higher for the displacement function. When Galerkin method is applied for such
problems, you get the proposed function multiplied by itself or by one of its function family.
This suggests the use of integration by parts. Let’s examine this for the previous example. Substituting with the approximate solution: (Int. by Parts)
∫Domain
ψ j ( x )d2ψ i (x )
dx2 dx=ψ j (x )dψ i ( x )
dx|0l − ∫
Domain
dψ j ( x )dx
dψ i ( x )dx
dx
Introduction to the finite element method 15
But the boundary integrals are equal to zero since the functions were already chosen to
satisfy the boundary conditions. Evaluating the integrals will give you the same results.
−EA( π2 l )
2a1
l2=−2l
π
a1=f
EA16 l2
π3 ≈0.52 fl2
EA
So, what did we gain by performing the integration by parts?
• The functions are required to be less differentiable
• Not all boundary conditions need to be satisfied
• The matrix became symmetric!
The above gains suggested that the Galerkin method is the best candidate for the derivation of the finite element model as a weighted residual method.
Homework #1
Figure 2.4. A simply supported beam
d4 wdx4 =F ( x )
subject to
w (0 )=w ( l)=0 and d2 w (0)dx 2 =
d2 w ( l)dx2 =0
Exact Solution for this problem is
w ( x )=x3
12+13 x
600<x<1/2
¿−x3
12+x2
4−7x
15+3
101 /2<x<1
Stationary Functional Approach 16
• Solve the beam bending problem, for beam displacement, for a simply supported beam with a load placed at the center of the beam using
– Any weighting function
– Collocation Method
– Subdomain Method
– Galerkin Method
• Use three term Sine series that satisfies all BC’s
• Write a program that produces the results for n-term solution.
Introduction to the finite element method 17
3 The Finite Element Method
2nd order DE’s in 1-D
The finite element method is based on the weighted residual methods presented in the previous chapter. The main difference of the finite element method is that the proposed solution functions have generalized coordinates, coefficients, that are equal to the physical quantity of the unknown variable at some points inside the domain. Hence, the proposed solution becomes an interpolation function for the values intermediate to those points.
Many physical problems may be approximately presented by 1-D differential equation. Such a problem will be characterized by having all dependent variables subject in one independent variable, usually x coordinate, and in initial boundary value problems, the time will be introduced as another independent variable but the problem will be still considered a 1-D problem.
Figure 3.5 presents a sketch for a general 1-D 2nd order problem. The problem may be considered as one describing the steady state of a heat transfer problem with general boundary conditions. Different terms are described in the sketch.
Figure 3.5. A sketch of the 1-D 2nd order problem
Stationary Functional Approach 18
The problem then may be stated as; solve:
−ddx (a du
dx )+cu−f =0
0<x<L
Subject to:
u (0 )=u0 , (a dudx )|x=L=Q0
Now, we will apply the steps of the finite element method to model this problem
approximately.
3.1 Discretization
At the first step of the finite element modeling, we discretize the domain into elements that all lie inside the domain. Those elements are connected at nodes. At each node, the value of the dependent variable will be called a degree of freedom.
Figure 3.6. Discretization of the domain
Introduction to the finite element method 19
3.2 Element Equations
Let’s concentrate our attention to a single element. The same DE applies on the element level; hence, we may follow the procedure for weighted residual methods on the element level using the boundary conditions as the values of the dependent function at the nodes.
−ddx (a du
dx )+cu−f =0
x1<x<x2
Subject to
u (x1)=u1 , u (x2)=u2 ,
(a dudx )|x= x1
=Q1 , (a dudx )|x=x2
=Q2
At this step, let’s think about the interpolation of the values of the function over the element, between the nodes. The most common interpolation function is the polynomial.
Figure 3.7. Single 1-D element with the values of the dependent function and the external excitation function determined at the nodes.
Using linear interpolation, we may write
u ( x )=b1 x+b0
Forcing the value of the function to be equal to the given values at the nodes, we get
u (x1)=u1=b1 x1+b0
u (x2)=u2=b1 x2+b0
When we solve for the unknown values b0 and b1, and rearranging, we get
u ( x )=( x2−xx2−x1
)u1+( x−x1
x2−x1)u2
Stationary Functional Approach 20
Which may be written as
u ( x )=ψ1 u1+ψ2u2=⌊ψ1 ψ2 ⌋{u1
u2}=⌊ψ ( x ) ⌋ {ue }
It may be noticed directly that after rearranging the interpolation function and collecting
terms containing the nodal-values of the dependent variable we get two linear functions
that are used as the proposed solution for the weighted residual method. Note also that the
proposed solution satisfies the essential boundary conditions of the problem; i.e. the values
of the function at the nodes. The sketch of the functions may be seen in
Figure 3.8
Figure 3.8. Sketch of the proposed solution functions
Note also that the proposed functions do not satisfy the original admissibility conditions since we are planning to use the Galerkin method as the weighted residual method of choice.
Assuming constant domain properties a and c may be drawn out of the differentiation in the differential equation to get
−ad2 udx 2 +cu−f =0
x1<x<x2
Using the proposed solution obtained in this section and applying the Galerkin method we get
Introduction to the finite element method 21
∫Domain
(−aψ j ( x )d2 ψ i ( x )
dx2 ui+cψ j ( x )ψ i ( x )u i−ψ j ( x ) f )dx=0
Note that
∫Domain
(−aψ j ( x )d2 ψ i ( x )
dx2 )dx=−aψ j (x )dψ i (x )
dx|x1
x2+a ∫Domain
dψ j ( x )dx
dψ i ( x )dx
dx
And
dψ1 ( x )dx
=− 1he
,dψ2 ( x )
dx= 1
he
Thus, we may write the integral as
−aψ j ( x )dψ i ( x )
dx|x1
x2 +a∫x1
x2 dψ j ( x )dx
dψ i ( x )dx
ui dx+∫x1
x2
(cψ j ( x )ψ i (x ) ui−ψ j ( x ) f )dx =0
For j=1 we may get the first equation
−a 1he
+a 1he
+∫x1
x2
(a 1
h2e
u1−a 1
h2e
u2+c ( x2−xhe
)2
u1+c ( x2−xhe
)( x−x1
he)u2−( x2− x
he) f )dx =0
Which gives
( ahe
+che
3 )u1+(− ahe
+che
6 )u2−fhe
2=0
Repeating for using j=2, we get
(− ahe
+che
6 )u1+( ahe
+che
3 )u2−fhe
2=0
In matrix form
( ahe
[ 1 −1−1 1 ]+ che
6 [2 11 2 ]){u1
u2}= fhe
2 {11 }The above equation is called the element equation.
Stationary Functional Approach 22
3.3 Assembling elements’ equations
In the previous section, we obtained the element equation that relates the element degrees of freedom to the externally applied fields. The element equation may be rewritten in compact form as
[k1 k2
k3 k4 ]{u1
u2}={f 1
f 2}
Now, let’s consider two adjacent elements as in Figure 3.9. The element equation for each element may be written as
[k12 k2
2
k32 k4
2 ]{u12
u22}={f 1
2
f 22}
[k11 k2
1
k31 k4
1 ]{u11
u21}={f 1
1
f 21}
Where the superscript indicates the element number.
Figure 3.9. Sketch of two adjacent elementsNote that for the continuity of the field values, the value of the function at the right-hand side of the first element should be equal to that of the left-hand value of the second element. Hence, we may add the second equation of the first element to the first equation of the second element to obtain three equations in the three unknown degrees of freedom.
[k11 k2
1 0k3
1 k41+k 1
2 k22
0 k32 k 4
2 ]{u1
u2
u3}={f 1
f 2
f 3}+{Q1
Q2
Q3}
The vector {Q} presents any external fields that are concentrated at the nodes; e.g. Support reactions in bar problems or fixed temperature in heat transfer problems.
Example
Let us reconsider the bar problem presented in Figure 2.1.
Introduction to the finite element method 23
Divide the bar into N number of elements. The length of each element will be (L/N). Derive the element equation from the differential equation for constant properties and externally applied force:
∫x 1
x2 [( EAh
e2 )dψ j
dxdψ i
dxui−fψ j]dx =0
The element equation will be obtained as follows
EAhe
[ 1 −1−1 1 ]{u1
e
u2e }= fhe
2 {11}Note that if the integration is evaluated from 0 to he, where he is the element length, the same results will be obtained. That is true due to the fact that the bound integration evaluates the area under the curve, and the area does not change if the axes are transformed from the origin to x1.
Now, let us consider two–Element bar example,
EAhe
[ 1 −1−1 1 ]{u1
1
u21}={f 1
1
f 21}
EAhe
[ 1 −1−1 1 ]{u1
2
u22}={f 1
2
f 22}
Assembling the equations as presented above, we obtain
EAhe [ 1 −1 0
−1 2 −10 −1 1 ]{u1
u2
u3}= fhe
2 {121 }+{R00 }
Where R is the reaction force at the support of the bar. Note that the external forces
corresponding to the second and third nodes are equal to zero as the problem does not
have any external concentrated forces.
Stationary Functional Approach 24
3.4 Applying Boundary Conditions
For the bar with fixed left side and free right side, we may force the value of the left-displacement to be equal to zero; which is the given boundary condition. The obtained equation becomes
EAhe [ 1 −1 0
−1 2 −10 −1 1 ]{ 0
u2
u3}= fhe
2 {121 }+{R00 }
Which may be separated into two equations as follows
EAhe
[ 2 −1−1 1 ]{u2
u3}=fhe
2 {21}EAhe
u2=fhe
2+R
Now, we may solve the first equation in the unknown values of the nodal displacements and then substitute into the second equation to obtain the reaction force.
3.5 Solving
Solving first equation for the displacements, we get
{u2
u3}=fh
e2
2 EA {34 }
Which is the exact value of the displacement that may be obtained if the exact solution was
utilized.
3.6 Secondary Variables
Using the values of the displacements obtained, we may get the value of the reaction force by substituting into the second equation.
−3 fhe
2=
fhe
2+R
R=−2 fhe
Which is the exact value of the reaction force.
Introduction to the finite element method 25
3.7 Generalized Procedure for Getting Interpolation Functions
The need for different types of elements for different structures implied the need for a generalized methodology to increase the flexibility of the finite element programming. A large number of proposed trial/interpolation functions is available in the literature, but the continuous need for development required the development of generalized procedure. In section 3.2, we obtained the element equations for two-node element with linear interpolation functions. Let’s re-derive the equations introducing a more general procedure then use the same procedure for the derivation of a three-node element.
The interpolation Function
u( x )=a1+a2 x
May be written in matrix form as
u ( x )=⌊ H ( x ) ⌋ {a }
Then, forcing the function to equal the values at the nodes gives
u (0 )=u1=⌊H (0 ) ⌋ {a }
u (l )=u2=⌊ H ( l ) ⌋ {a }
This may be written in matrix form as
{u1
u2}=[H (0 )
H (l ) ]{a1
a2}=[1 0
1 l ]{a1
a2}=[ T ] {a }
Solving for the unknown coefficients, we get
{a1
a2}=[ 1 0
−1l
1l ]{u1
u2}
Or {a }=[ T ]−1 {ue }
Substituting into the interpolation function, we get
u ( x )=⌊ H ( x ) ⌋ [T ]−1 {ue }= ⌊N ( x ) ⌋ {ue }
Expanding the terms, we find that
Stationary Functional Approach 26
u ( x )=⌊ 1 x ⌋ [ 1 0−1
l1l ]{u1
u2}=⌊1− x
lxl ⌋{u1
u2}
Or
u( x )=(1− xl )u1+
xl
u2
Now, we may write the element equation using the new notation to be
EA∫0
l
{N x ( x ) } ⌊ N x (x ) ⌋ dx {ue }+∫0
l
{N ( x ) } fdx=0
Note that
∫0
l
{Nx ( x ) } ⌊ N x ( x ) ⌋ dx=∫0
l {− 1l
1l
}⌊−1l
1l ⌋dx=∫
0
l [ ( 1l )
2−( 1
l )2
−( 1l )
2
( 1l )
2 ]dx= 1li[ 1 −1−1 1 ]
Which, again, gives the element equation as
EAhe
[ 1 −1−1 1 ]{u1
e
u2e }= fhe
2 {11}Hw 1,x;Hwx DHw,x;Hwxx DHwx,x;x 0;Tb1 Hw;x A;Tb3 Hw;Clearx;TBTb1, Tb3TBINV InverseTB1, 0,1, A1, 0, 1
A,1A
NN Hw.TBINV1 xA,xA
A LMm InnerTimes, TransposeHw,Hw;Mb IntegrateMm,x, 0, AMb TransposeTBINV.Mb.TBINVMatrixFormIntroduction to the finite element method 27
LL, L2
2,L2
2,L3
3L3 L
6L6
L3
CQC InnerTimes,TransposeHwx,Hwx;CQC IntegrateCQC,x, 0, AKb TransposeTBINV.CQC.TBINVMatrixForm0, 0,0, L1L 1
L
1L
1L
Let us now try to follow the same procedure to obtain the element matrix for an element with three nodes. Since we are considering an element with three nodes, we will need a parabolic interpolation function
Figure 3.10. Three-node bar element
u( x )=a1+a2 x+a3 x2
This function may be written in matrix form as
u ( x )=⌊ H ( x ) ⌋ {a }
Using the values of the function at the nodes, we get
aHuu 00 1
u (l /2 )=u2=⌊ H ( l /2 ) ⌋ {a }
u ( l )=u3=⌊ H ( l ) ⌋ {a }
In matrix form
{u1
u2
u3}=[ H (0 )
H ( l /2 )H (l ) ]{a1
a2
a3}=[T ] {a }
Giving
{a }=[T ]−1 {ue }
Stationary Functional Approach 28
Finally
u ( x )=⌊ H ( x ) ⌋ [T ]−1 {ue }= ⌊N ( x ) ⌋ {ue }
Expanding the function, we get
u ( x )=( x−x2
x1−x2)( x−x3
x1−x3)u1+( x−x1
x2−x1)( x−x3
x2−x3)u2+( x−x1
x3−x1)( x−x2
x3−x2)u3
Which may be also written as
u ( x )=( x−l /2l /2 )( x−l
l )u1+( xl /2 )( x−l
l /2 )u2+( xl )( x−l /2
l /2 )u3
Where “l” is the element length. The proposed solution functions may be plot as in Figure3.11. Note that each of the three functions is equal to one at its corresponding point and zero at the other two points.
Figure 3.11. Plot of the proposed solution functions for A 3-node element
Hw 1,x,xx;Hwx DHw,x;Hwxx DHwx,x;x 0;Tb1 Hw;x A;Tb3 Hw;x A2;Tb2 Hw;Clearx;TBTb1, Tb2, Tb3TBINV InverseTB1, 0, 0,1, A
2,A2
4,1, A, A2
Introduction to the finite element method 29
1, 0, 0, 3A,4A, 1
A,2
A2, 4
A2,
2A2
NN Hw.TBINV1 3xA
2x2
A2,4xA
4x2
A2, x
A 2x2
A2
A LMm InnerTimes, TransposeHw,Hw;Mb IntegrateMm,x, 0, AMb TransposeTBINV.Mb.TBINVMatrixFormLL, L2
2,L3
3,L2
2,L3
3,L4
4,L3
3,L4
4,L5
5
2L15
L15
L30
L15
8L15
L15
L30
L15
2L15
CQC InnerTimes,TransposeHwx,Hwx;CQC IntegrateCQC,x, 0, AKb TransposeTBINV.CQC.TBINVMatrixForm0, 0, 0,0, L, L2,0, L2, 4L3
3
73L
83L
13L
83L
163L
83L
13L
83L
73L
Stationary Functional Approach 30
4 Trusses
A truss is a set of bars that are connected at frictionless joints. The bar does not undergo deformations normal to its axis but when another one that is connected to and is not coaxial with it deforms it rotates around its axis. Since the truss is mainly a set ob bars that generally oriented in the plane and connected to one another, then we have to consider its general motion. Now, the problem lies in the transformation of the local displacements of the bar, which are always in the direction of the bar, to the global degrees of freedom that are generally oriented in the plain.
Figure 4.12. A truss element generally oriented in the plane (a) Displacements and forces in the bar local coordinate (b) Resolution of the displacements and forces in the global coordinates
Consider the truss element presented in Figure 4.12. The force-displacement equations in the local coordinates of the element may be presented by
EAh [ 1 0 −1 0
0 0 0 0−1 0 1 00 0 0 0 ]{u1
v1
u2v2
}={F1
0F2
0}
From the geometry, the local and global coordinates may be related using the relation
{u1
v1
u2v2
}Local DOF
=[ Cos (θ ) Sin (θ ) 0 0−Sin (θ ) Cos (θ ) 0 0
0 0 Cos (θ ) Sin (θ )0 0 −Sin (θ ) Cos (θ ) ]{
u1
v1
u2v2
}¿¿ Transformed ¿ DOF ¿¿¿
Or
{ Δ }Local DOF=[T ] { Δ }¿¿ Transformed ¿ DOF ¿¿¿
Introduction to the finite element method 31
Where { Δ } and { Δ } are the displacements in local and global coordinates respectively and the transformation matrix is
[ T ]=[ Cos (θ ) Sin (θ ) 0 0−Sin (θ ) Cos (θ ) 0 0
0 0 Cos (θ ) Sin (θ )0 0 −Sin (θ ) Cos (θ ) ]
The Equation of Motion Becomes
[ K ] [T ] { Δ}= {F }
Transforming the forces:
[ T ]−1 [ K ] [T ] { Δ }=[T ]−1 { F }
Note that
[ T ]−1=[T ]T
Finally
[ K ] { Δ}= {F }
where
[ K ]=[T ]T [ K ] [T ]
Where
[ K ]= EAh [ 1 0 −1 0
0 0 0 0−1 0 1 00 0 0 0 ]
Element Stiffness Matrix in Global Coordinates becomes
[ K ]= EAh [Cos (θ ) −Sin (θ ) 0 0
Sin (θ ) Cos (θ ) 0 00 0 Cos (θ ) −Sin (θ )0 0 Sin (θ ) Cos (θ ) ][ 1 0 −1 0
0 0 0 0−1 0 1 00 0 0 0 ][ Cos (θ ) Sin (θ ) 0 0
−Sin (θ ) Cos (θ ) 0 00 0 Cos (θ ) Sin (θ )0 0 −Sin (θ ) Cos (θ ) ]
Or
Stationary Functional Approach 32
[ K ]= EAh [ Cos2 (θ ) 1
2Sin (2θ ) −Cos2 (θ ) − 1
2Sin (2 θ )
12
Sin (2θ ) Sin2 (θ ) −12
Sin (2 θ ) −Sin2 (θ )
−Cos2 (θ ) −12
Sin (2θ ) Cos2 (θ ) 12
Sin (2 θ )
−12
Sin (2θ ) −Sin2 (θ ) 12
Sin (2θ ) Sin2 (θ )]
Example
Use the finite element analysis to find the displacements of node C and the stresses in each element.
Figure 4.13. The truss of the exampleThe stiffness matrix in global coordinates of each of the truss elements may be written as
[ K1 ]=EAL [ 1 0 −1 0
0 0 0 0−1 0 1 00 0 0 0 ] [ K2 ]=EA
L [0 0 0 00 1 0 −10 0 0 00 −1 0 1 ]
[ K3 ]= EAL [ 0. 3536 0.3536 −0. 3536 −0. 3536
0. 3536 0.3536 −0. 3536 −0. 3536−0. 3536 −0. 3536 0.3536 0. 3536−0. 3536 −0. 3536 0.3536 0. 3536 ]
Assembling the matrices into the global stiffness matrix, we get
[ K ]= EAL [
1. 3536 0. 3536 −1 0 −0 .3536 −0 .35360 .3536 0. 3536 0 0 −0 .3536 −0 .3536
−1 0 1 0 0 00 0 0 1 0 −1
−0 .3536 −0 .3536 0 0 0 .3536 0 .3536−0 .3536 −0 .3536 0 −1 0 .3536 1. 3536
]Introduction to the finite element method 33
Similarly, the force vector is obtained as
{ F }={F1 x
F1 y
F2 x
F2 y
F3 x
F3 y
}={F1 x
F1 y
F2 x
F2 y
P−2 P
}The boundary conditions of the truss are
U1=V 1=U2=V 2=0
Removing the corresponding rows and columns, we get
EAL [0. 3536 0 . 3536
0. 3536 1 . 3536 ]{U 3
V 3}={ P
−2P}Solving for the displacements, we get
U3=5 . 828 PLEA
, V 3=−3 PLEA
Using the secondary equations to get the reaction forces, we get
F1 x=−P , F1 y=−P , F2 x=0 , F2 y=3 P
Performing post-computation, we get
σ e=−P1
e
Ae=
P2e
Ae
{P1e
P2e }= Ae Ee
L [ 1 −1−1 1 ]{u1
e
u2e }
{u1
v1
u2v2
}=[ Cos (θ ) Sin (θ ) 0 0−Sin (θ ) Cos (θ ) 0 0
0 0 Cos (θ ) Sin (θ )0 0 −Sin (θ ) Cos (θ ) ]{
u1
v1
u2v2
}Finally
σ (1)=0 , σ(2)=−3 PA
, σ (3 )=√2 PA
Stationary Functional Approach 34
5 Beams and Frames
Beams are the most-used structural elements. Many real structures may be approximated as beam elements. Two main beam theories; Euler-Bernoulli beam theory and Timoshenko beam theory. In this chapter, we will be focusing out attention to the Euler-Bernoulli beam theory.
5.1 Euler-Bernoulli Beam Theory
The main assumption in the Euler-Bernoulli beam theory is that the beam’s thickness is too small compared to the beam length. That assumption resulted in that the sheer deformation of the beam may be neglected without much error in the analysis. The equation governing the deformation of and E-B beam under transverse loading may be written as follows
d2
dx2 ( EI ( x ) d2 wdx2 )=F ( x )
Subject to any combination of the following boundary conditions. At x=0
w ( 0 )=w0 or EI (0 ) d3 w (0 )dx3 =P0
Indicating that either the deflection or the sheer force is specified
dw (0 )dx
=w'0 or EI (0 ) d2 w (0 )
dx2 =M 0
Indicating that either the slope or the bending moment is specified. At x=l
w ( l )=wl or EI ( l ) d3 w ( l )dx3 =Pl
Indicating that either the deflection or the sheer force is specified
dw (l )dx
=w'l or EI (l ) d2 w (l )
dx2 =Ml
Indicating that either the slope or the bending moment is specified.
Where w is the transverse deflection of the beam, E is the modulus of elasticity, I is the second moment of area, and F is the transverse load in the positive direction of w.
5.2 Finite Element Trial FunctionsThe finite element model for the EB beam will depend on the knowledge of four boundary conditions, namely, the deflections and slopes at each node of the element (see Figure
Introduction to the finite element method 35
5.14). That will require the use of a third order polynomial to interpolate the deflection function in the element.
w ( x )=a1+a2 x+a3 x2+a4 x3
Figure 5.14. Sketch of a beam elementUsing the same procedure adopted for the bar element, we get
w ( x )= ⌊H ( x ) ⌋ {a }
Enforcing the boundary conditions
w ( 0 )=w1=⌊ H (0 ) ⌋ {a }
w ( l )=w2=⌊ H (l ) ⌋ {a }
w ' (0 )=w '1=⌊ H x (0 ) ⌋ {a }
w ' (l )=w ' 2=⌊ H x (l ) ⌋ {a }
In matrix form
{ w1
w '1w2
w '2}=[ H (0 )
H x (0 )H (l )H x (l ) ]{
a1
a2
a3
a4}= [T ] {a }
Or
{ w1
w '1w2w '2
}=[1 0 0 00 1 0 01 l l2 l3
0 1 2 l 3 l2 ]{a1
a2
a3a4
}Solving
Stationary Functional Approach 36
{a1
a2
a3
a4}=[
1 0 0 00 1 0 0
−3l2
−2l
3l2
−1l
2l3
1l2
−2l3
1l2
]{ w1
w'1
w2
w ' 2}
Which givesw ( x )= ⌊H ( x ) ⌋ {a }= ⌊N ( x ) ⌋ {ue } Where
⌊ N ( x ) ⌋T ={N ( x ) }={1−3x2
l2 +2x3
l3
x−2 x2
l+ x3
l3
3 x2
l2 −2 x3
l3
− x2
l+ x3
l2
}Plotting the four functions, we get the graph in Figure 5.15. Notice that N1 and N3 functions are equal to one at x=0 and x=1 respectively while equal to zero at x=1 and x=0 respectively which can also be related to the fact that N1 and N3 correspond to w1 and w2 respectively. Similarly, N2 and N4 have zero slopes at x=l and x=0 respectively and are corresponding to w’1 and w’2 respectively. Now we may write down the displacement function in terms of the nodal displacements as follows
w ( x )= ⌊H ( x ) ⌋ {a }= ⌊H ( x ) ⌋ [T ]−1 {we }=⌊ N ( x ) ⌋ {we }
Or
w ( x )=∑i=1
4
N i ( x ) w i
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
-0.4
-0.2
-1.11022302462516E-16
0.2
0.4
0.6
0.8
1
X
N(x)
N1
N2
N3
N4
Introduction to the finite element method 37
Figure 5.15. A plot of the beam interpolation functions.
The symbolic manipulator MATHEMATICA may be used to derive the trial functions N(x) as presented below
In[2]:= Hw 1, x, x x, x x x;Hwx DHw, x;Hwxx DHwx, x;
In[5]:= x 0; Tb1 Hw; Tb2 Hwx;x L; Tb3 Hw; Tb4 Hwx;
Clearx;TB Tb1, Tb2, Tb3, Tb4TBINV InverseTB
Out[8]= 1, 0, 0, 0, 0, 1, 0, 0, 1, L, L2, L3, 0, 1, 2 L, 3 L2Out[9]= 1, 0, 0, 0, 0, 1, 0, 0, 3
L2, 2
L,
3
L2, 1
L, 2
L3,
1
L2, 2
L3,
1
L2
In[10]:= NN Hw.TBINV
Out[10]= 1 3 x2
L2 2 x3
L3, x 2 x2
L x3
L2,3 x2
L2 2 x3
L3, x
2
L x3
L2
In[11]:= Simplify NNOut[11]= L x2 L 2 x
L3,
L x2 xL2
,3 L 2 x x2
L3,
x2 L xL2
5.3 Beam Stiffness MatrixRecall that the governing equation is
d2
dx2 ( EI ( x ) d2 wdx2 )=F ( x )
Substituting with the series solution obtained in the previous section
w ( x )=∑i=1
4
N i ( x ) w i
The governing equation becomes
∑i=1
4 d2
dx 2 (EI ( x )d2 N i
dx 2 wi)−F( x )=R( x )
Applying Galerkin method:
Stationary Functional Approach 38
∫0
le
R (x )N j dx=∫0
le (∑i=1
4 d2
dx2 (EI ( x )d2 N i
dx2 wi)−F ( x ))N j dx
Using integration by parts, twice, we get:
∫0
l e (∑i=1
4 (EI ( x )d2 N i
dx2
d2 N j
dx 2 wi)−F ( x )N j)dx=0
In matrix form
∫0
l e
EI (x ) {N xx } ⌊ N xx ⌋dx {w e }=∫0
le
F ( x ) {N xx }dx
Using MATHEMATICA, we get
In[2]:= Hw 1, x, x x, x x x;Hwx DHw, x;Hwxx DHwx, x;
In[5]:= x 0; Tb1 Hw; Tb2 Hwx;x L; Tb3 Hw; Tb4 Hwx;
Clearx;TB Tb1, Tb2, Tb3, Tb4TBINV InverseTB
Out[8]= 1, 0, 0, 0, 0, 1, 0, 0, 1, L, L2, L3, 0, 1, 2 L, 3 L2Out[9]= 1, 0, 0, 0, 0, 1, 0, 0, 3
L2, 2
L,
3
L2, 1
L, 2
L3,
1
L2, 2
L3,
1
L2
In[10]:= NN Hw.TBINV
Out[10]= 1 3 x2
L2 2 x3
L3, x 2 x2
L x3
L2,3 x2
L2 2 x3
L3, x
2
L x3
L2
In[11]:= Simplify NNOut[11]= L x2 L 2 x
L3,
L x2 xL2
,3 L 2 x x2
L3,
x2 L xL2
Giving the stiffness matrix to be
k=EIl3 [ 12 6 l −12 6 l
6 l 4 l2 −6 l 2 l2
−12 −6 l 12 −6 l6 l 2l2 −6 l 4 l2 ]
Introduction to the finite element method 39
6 Two Dimensional Elements
More complicated and realistic problems can not be approximated by one dimensional elements. Problems such as 2-D fluid flow, heat conduction, plate bending, ocean dynamics, and others need a two dimensional element to be used. We will focus in this chapter on 2-D rectangular elements with 1 DOF per node. Later, we will introduce more general elements.
6.1 A Rectangular ElementFor the rectangular element presented in Figure 6.16, the four nodes have the coordinates shown relative to local coordinate system sat has its origin at point 1. For the problem where one dependent variable is being investigated, we may interpolate that function using
Figure 6.16. Sketch of a 2-D rectangular element.f ( x , y )=a1+a2 x+a3 y+a4 xy
Which is a 2-D function composed of two linear terms multiplied by each other. The function may be presented in the general form
f ( x , y )=⌊ H ( x , y ) ⌋ {a }
Now, relating the generalized coordinated to the degrees of freedom at each node, we get
f (0,0 )=f 1= ⌊H (0,0 ) ⌋ {a }
f ( a ,0 )= f 2=⌊H (0 , a ) ⌋ {a }
f ( a ,b )= f 3=⌊ H (a , b ) ⌋ {a }
f (0 ,b )= f 4=⌊ H (0 , b ) ⌋ {a }
In matrix form
Stationary Functional Approach 40
{f 1
f 2
f 3f 4
}=[ H (0,0 )H (a , 0 )H (a , b )H (0b ) ]{
a1
a2
a3a4
}=[ T ] {a }
Or
{f 1
f 2
f 3
f 4}=[1 0 0 0
1 a 0 01 a b ab1 0 b 0 ]{a1
a2
a3
a4}
Inverting the transformation matrix, we get
{a1
a2
a3a4
}=[1 0 0 0
−1a
1a
0 0
−1b
0 0 1b
1ab
−1ab
1ab
−1ab
]{f 1
f 2
f 3f 4
}Giving the interpolation function as
f ( x , y )=⌊ H ( x , y ) ⌋ {a }=⌊ N ( x , y ) ⌋ { f e }
Where
⌊ N ( x , y ) ⌋T= {N ( x , y ) }={1− x
a− y
b+ xy
abxa− xy
abxyab
yb− xy
ab
}Figure 6.17 presents the variation of the functions N1 through N4 in the 2-D domain. Note that each of the function is equal to one at the node that corresponds to it while equals zero at the three other nodes.
Introduction to the finite element method 41
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10
0.3
0.6
0.9
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
N1
x
y0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
0
0.3
0.6
0.9
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
N2
x
y
(a) (b)
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10
0.3
0.6
0.9
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
N3
x
y0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
0
0.3
0.6
0.9
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
N4
x
y
(c) (d)
Figure 6.17. Plot of the 2-D interpolation functions obtained earlier (a) presents the variation of N1, (b) presents the variation of N2, (c) presents the variation of N3, (d) presents the variation of N4.
Example: Laplace Equation
The Laplace equation is used in many engineering applications such as the 2-D potential fluid flow problem. The Laplace equation is presented by the following notation
∇2 φ=0
Where∇2(.) is called the Laplace operator. In expanded form, the equation will be
∂2 φ∂ x2 +
∂2 φ∂ y2=0
Introducing 2-D series solution
φ=∑i=1
4
φ i N i ( x , y )=⌊ N ( x , y ) ⌋ {φe }
Stationary Functional Approach 42
Applying the Galerkin method and integrating by parts, the element equation becomes
∮Boundary
[ {N } ⌊ N x ⌋+ {N } ⌊ N y ⌋ ] dΓ− ∫Area
[{N x } ⌊ N x ⌋+ {N y } ⌊ N y ⌋ ] dA {φe }=0
It can be shown that the boundary integral will be equal to zero. Finally, the equation will be
∫Area
[ {N x } ⌊ N x ⌋+ {N y } ⌊N y ⌋ ] dA {φe }=0
Performing the integration over the area we get
16ab [ 2 ( a2+b2) a2−2 b2 −a2−b2 −2a2+b2
a2−2b2 2 (a2+b2 ) −2 a2+b2 −a2−b2
−a2−b2 −2a2+b2 2 ( a2+b2) a2−2b2
−2 a2+b2 −a2−b2 a2−2 b2 2 (a2+b2 ) ] {φe }={0 }
This may also be obtained using symbolic manipulators as follows
Defining the interpolation function and it’s derivatives
Hw 1, x, y, xy;Hwx DHw, x;Hwy DHw, y;Evaluating the transformation matrix
x 0;y 0; Tb1 Hw;x a;y 0; Tb2 Hw;x a;y b; Tb3 Hw;x 0;y b; Tb4 Hw;Clearx, y;TBTb1, Tb2, Tb3, Tb4;TBINV InverseTB;NN Hw.TBINVMatrixForm1 x
a y
b xy
abxa xy
abxyab
yb xy
ab
Evaluating the integral of the element equation
x InnerTimes, TransposeHwx,Hwx;y InnerTimes, TransposeHwy,Hwy;o x y;1 IntegrateIntegrateo,x, 0, a,y, 0, b; FullSimplifyTransposeTBINV.1.TBINV;MatrixFormIntroduction to the finite element method 43
a2b23ab
a6b
b3a
a2b26ab
a3b
b6a
a6b
b3a
a2b23ab
a3b
b6a
a2b26ab
a2b26ab
a3b
b6a
a2b23ab
a6b
b3a
a3b
b6a
a2b26ab
a6b
b3a
a2b23ab
6.2 Assembling 2-D Elements
The Logistic Problem!
In the 2-D problems, the numbering scheme, usually, is not as straight forward as the 1-D problem. For example, in 1-D problem as that shown in Figure 6.18, we can easily relate the nodes’ numbers to the elements’ numbers. Although the finite element method does not mandate the numbering scheme, it is usually more practical to use the simplest scheme.
Figure 6.18. 1-D elements’ connectivity and nummbering
Figure 6.19. Example of 2-D connectivity and numbering scheme
Table 6.1. Relation between local and global node numbering for element number 5Local Node
NumberGlobal Node
Number1 52 63 94 8
In a 2-D problem, such as that shown in Figure 6.19, the node and element numbering becomes more complicated than the 1-D problem, although, an easy relation may still be
Stationary Functional Approach 44
obtained between the nodes’ and the elements’ numbering it is not advised to keep on applying this relation inside the program. Rather, a register should be filled in which each number is related to the nodes to which it is connected. Table 6.1 shows the register entry for element number 5. The register entry contains the local node number and the corresponding global node number. From the register, it is easy to determine which entry in the global matrix each of the element matrix entries should be added to. Figure 6.20 shows, graphically, the locations of in the global matrix to which the element matrix entries should be added.
121110987654321
1
2
3
4
1,31,41,21,15
2,32,42,22,16
7
4,34,44,24,18
3,33,43,23,19
10
11
12
Figure 6.20. Entries of the global matrix corresponding to each entry of the element matrix of element number 5.
The procedure presented above for the element number 5 is now going to be generalized for the rest of the elements. Table 6.2 presents the local-to-global correspondence node numbering for the 2-D problem presented in Figure 6.19.
Now we need to apply the procedure used for element number 5, explained above, to the rest of the elements. Error: Reference source not found presents an algorithm that may be used for assembling the global matrix for a 2-D problem with a single degree of freedom per node. The algorithm is based on scanning the nodes of each element, reading their corresponding global number
Introduction to the finite element method 45
and adding the local matrix entry to the corresponding global matrix entry. Thus, two loops on the elements’ nodes are used together with the main elements’ loop.
Table 6.2. Element number connectivity table.
Node NumberElement Number
4321
45211
78542
1011873
56324
89655
11
12986
Table 6.3. Algorithm for Assembling Global Matrix
1. Create a square matrix “A”; N*N (N=Number of nodes)2. For the ith element3. Get the element matrix “B”4. For the jth node5. Get its global number k6. For the mth node7. Get its global number n8. Let Akn=Akn+Bjm
9. Repeat for all m10. Repeat for all j11. Repeat for all i
Using the symbolic manipulator MATHEMATICA, a code was created to assemble the global matrix for the above problem. The code uses the results obtained from the previous part that creates the element matrix, then, it creates the element-node registry which is then used to assemble the global matrix.
Nx 2;Ny 3;Filling the element-node correspondence table
Stationary Functional Approach 46
Elements Table0,ii, 1, Nx Ny,jj, 1, 4;Forii 1, ii Nx, ii, Forjj 1, jj Ny, jj,ElNm jj Nyii 1;
ElementsElNm,1 iijj 1Nx 1;ElementsElNm,2 ii1jj 1Nx1;ElementsElNm,3 ii1 jjNx 1;ElementsElNm,4 iijjNx 1;;
ElementsMatrixForm1 2 5 44 5 8 77 8 11 102 3 6 55 6 9 88 9 12 11
Assembling the global matrix
KGlob Table0,ii, 1,Nx 1Ny 1,jj, 1,Nx 1Ny 1;Forii 1, ii Nx Ny, ii,Forjj 1, jj 4, jj,NodeJJ Elementsii, jj;Forll 1, ll 4, ll,NodeLL Elementsii, ll;KGlobNodeJJ,NodeLL KGlobNodeJJ,NodeLL jj,ll;;
Simplify6a b KGlobMatrixFormFinally, the assembled global matrix will look as follows
2a2 b2a2 2b2 0 2a2 b2 a2 b2 0 0 0 0 0 0 0a2 2b2 4a2 b2a2 2b2 a2 b2 4a2 2b2 a2 b2 0 0 0 0 0 0
0 a2 2b2 2a2 b2 0 a2 b2 2a2 b2 0 0 0 0 0 02a2 b2 a2 b2 0 4a2 b22a2 2b2 0 2a2 b2 a2 b2 0 0 0 0a2 b2 4a2 2b2 a2 b2 2a2 2b28a2 b22a2 2b2a2 b2 4a2 2b2 a2 b2 0 0 0
0 a2 b2 2a2 b2 0 2a2 2b24a2 b2 0 a2 b2 2a2 b2 0 0 00 0 0 2a2 b2 a2 b2 0 4a2 b22a2 2b2 0 2a2 b2 a2 b2 00 0 0 a2 b2 4a2 2b2 a2 b2 2a2 2b28a2 b22a2 2b2a2 b2 4a2 2b2 a2 b2
0 0 0 0 a2 b2 2a2 b2 0 2a2 2b24a2 b2 0 a2 b2 2a2 b2
0 0 0 0 0 0 2a2 b2 a2 b2 0 2a2 b2a2 2b2 00 0 0 0 0 0 a2 b2 4a2 2b2 a2 b2 a2 2b2 4a2 b2a2 2b2
0 0 0 0 0 0 0 a2 b2 2a2 b2 0 a2 2b2 2a2 b2
Introduction to the finite element method 47
7 Stationary Functional Approach
In this section, the stationary functional approach will be presented as a method by which the finite element model may be derived. The approach will depend on some definitions that are presented in section 7.1 then some applications will be presented in the following sections.
7.1 Some Definitions
A Functional: Simple Definition
A functional is a “function of functions” that produces a real/complex number. The functional is presented in the form of a bound integral which, when evaluated, produces a real number. In mechanics problems, usually, the functional used is the total energy functional which contains the potential energy, the kinetic energy, and the externally work done on the system. A functional may be presented in the form
I ( f 1 ( x1 ,. .. , xn) , . .. , f m (x1 , .. . , xn ))= ∫Domain
G ( f 1 (x1 , .. . , xn ) ,. . ., f m ( x1 , . .. , xn)) dx1 .. .dxn
Variation: Another simple definition
Variation of a functional is the “differentiation” of the functional with respect to one or more of its entries (functions). Note that the Variation of the functional with respect to the independent variables is always equal to zero.
δI ( f 1 , f 2 ,. . . , f m )= ∫Domain
(dGdf 1
δf 1+dGdf 2
δf 2+ .. .+ dGdf m
δf m)dx1 .. .dxn
Stress-Strain Relation
Stresses in structures are related to the strains through “constitutive relations”. The main components of the constitutive relations is the modulus of elasticity, Hook’s constants. For 1-D structures, we may write
σ=Eε
Strain Displacement Relations
The strain is usually related to the displacement fields in structure mechanics problems. The relation may be obtained from the theory of elasticity or an approximate theory such as the Euler-Bernoulli beam theory. For 1-D elasticity problems, the strain displacement relations are usually simple ones such as the case of a bar, where the relation is defined as
ε x=dudx
Where u is the axial displacement of the bar. Meanwhile, the strain displacement relation for an Euler-Bernoulli beam is given byStationary Functional Approach 48
ε x=−z d2 wdx2
Where w is the transverse deflection of the beam and z is the location above the neutral axis. Other relations exist for different theories, but they will be mentioned in their respective places.
Strain Energy
Strain energy is the amount of mechanical energy stored in a structure, potential energy, due to the deflection of the structure. An expression for the strain energy may be given by
U= ∫Volume
12
εσ dV
Where U is the strain energy. The concept here is defined for linear elastic structures, but may be used for nonlinear material properties as well as dissipative material properties with minor constraints.
7.2 Applications
In the following sections, we will present the application of the concepts of variation and strain energy to obtain the finite element model as well as demonstrate that the presentation is equivalent to the more commonly used differential equation presentation.
7.2.1 The bar tensile problem
The total energy of the elastic structure is given as the difference between the strain energy
and the work done by the externally applied forces. An expression for the total energy for a
bar, may be given by the following integral
Π= ∫BarLength
( 12
EA( ∂u∂ x )
2−u . F ( x ))dx
For equilibrium, the total energy needs to be at a minimum value, that is to say, its variation is zero (note the analogy with the minimum of a function in one dimension where the extreme points are found when the derivative is equal to zero. Obtaining the variation of the total energy, we get
δΠ= ∫BarLength
(EA(∂ δu∂ x )(∂u
∂ x )−δu . F ( x ))dx=0
Introduction to the finite element method 49
Now, let us perform integration by parts, we get
δΠ=EA δu(∂ u∂ x )|0
l − ∫BarLength
(EA δu(∂2u∂ x2 )+δu . F ( x ))dx=0
Which indicates that
EA δu (∂u∂ x )|0l =0⇒EA δu( ∂u
∂ x )|x=0=0∧EA δu(∂ u∂ x )|x=l
These are the boundary conditions; i.e. at any boundary, either the displacement is equal to
zero or the strain is equal to zero. The other term becomes
∫BarLength
(EA δu (∂2 u∂ x2 )+δu .F ( x ))dx=0
Since the above integral is equal to zero, then the integrand should be equal to zero
δu (EA ( ∂2 u∂ x2 )+F ( x ))=0
And, since the variation of the displacement is an arbitrary function, it can not be equal to
zero everywhere which yields
EA( ∂2 u∂ x2 )+F ( x )=0
This is the original differential equation for the displacement function of a bar subject to
distributed loading along its axis. Now, if we select the approximate solution of the problem
and substitute it into the equation representing the variation of the total energy, above, and
handling the variation of the displacement as the weighting functions, we getStationary Functional Approach 50
u ( x )=⌊ N ( x ) ⌋ {ue }
δu ( x )=⌊ N (x ) ⌋ {δue }
Substituting into the energy variation relation:
δΠ= ∫ElementLength
( EA {δue }T {N x } ⌊ N x ⌋ {ue }−{δue }T {N } F ( x ) )dx=0
But the nodal values of the function or its variation are independent of the integration
{δue }T∫0
l
(EA {N x } ⌊ N x ⌋ {ue }− {N } F ( x ) )dx=0
Also, the variation is arbitrary, therefore, it can not be zero; hence:
∫0
l
( EA {N x } ⌊ N x ⌋ {ue }− {N } F ( x ) )dx=0
Now we may write
∫∫ l
el
xx dxxFNudxNNEA00
Or
[ k ] {ue }={ f e }
Where
[ k ]=EA∫0
l
( {N x } ⌊ N x ⌋ ) dx∧{ f e }=∫0
l
( {N } F (x ) ) dx
Which is the same model that we obtained when applying the weighted residual method to the differential equation.
7.2.2 Beam Bending ProblemObtaining the strain energy expression for the beam under transverse loading, we get
Π=∫0
l
( 12 EI ( d2 w
dx 2 )2
−w . F ( x ))dx
The expression for the variation of the total energy becomes
Introduction to the finite element method 51
δΠ=∫0
l
(EI d2 δwdx 2
d2 wdx2 −δw . F ( x ))dx=0
We may continue the derivation, as for the case of the bar, to obtain the differential
equation. But using the approximate solution into the above expression, we have
w ( x )= ⌊N ( x ) ⌋ {we }
And
δw ( x )=⌊ N (x ) ⌋ {δwe }
Which gives
δΠ=∫0
l
(EI {δwe }T {N xx } ⌊ N xx ⌋ {we }−{δwe }T {N } F ( x ) )dx=0
Using the same procedure as for the bar example above, we get
[k ] {we }= {f e }
Where
[k ]=∫0
l
EI {N xx } ⌊N xx ⌋ dx∧ {f e }=∫0
l
{ N } F ( x )dx
Which is, again, the same model as the one obtained using the weighted residual methods.
Stationary Functional Approach 52
7.3 Plane Elasticity
Now, we have enough background to extend our study to cover the plain elasticity problem. In this problem we are only concerned with the thin structures, such as thin plates, that are subjected to in-plane loading. In such a problem, the strain components we are concerned with become the axial strains in the plane of the plate and the shear strain component associated with them. All variables are assumed to constant across the thickness.
Figure 7.21. A sketch presenting a plain element with the stresses applied on it.
The above described stresses and strain are related through the following relations
σ x=Dεx+νDε y
σ y=νDε x+Dε y
τ xy=2Gε xy
Where
D=E1−ν2
G=E2 (1+ν )
In matrix form
{σx
σ y
τ xy}=[ D νD 0
νD D 00 0 2G ]{ε x
ε y
ε xy}
Or
Introduction to the finite element method 53
7.3.1 Strain-Displacement RelationsThe strain displacement relation in the 2-D problem is slightly different taking into account the displacement in the y-direction as well
ε x=dudx
ε y=dvdy
ε xy=12 (du
dy+dv
dx )Or, in matrix form
{εx
ε y
ε xy}={
dudxdvdy
12 ( du
dy +dvdx )}
7.3.2 Strain EnergyThe strain energy should take all stresses and strains into account. Thus, we get the expression as
U= ∫Volume
12
εσ dV= ∫Volume
12
{ε }T [Q ] {ε } dV
For constant thickness, and since all the variables are constant across the thickness, we may simplify the integral over the volume to become an integral over the area
U=h ∫Area
12
{ε }T [Q ] {ε } dA
A Rectangular Element
For the approximation of the displacement function u(x,y) over the element, use the 2-D interpolation function
Stationary Functional Approach 54
{σ }=[ Q ] {ε }
Figure 7.22. A sketch of the plate element
u ( x , y )=a1+a2 x+a3 y+a4 xy
Recall General 2-D Elements
u ( x , y )= ⌊H ( x , y ) ⌋ {a }=⌊ N (x , y ) ⌋ {ue }
⌊ N ( x , y ) ⌋T= {N ( x , y ) }={1− x
a− y
b+ xy
abxa− xy
abxyab
yb− xy
ab
}In the 2-D elasticity problem, we displacements in both the x and y-directions at every point of the plate. For a rectangular element, you get 8 DOF per element
The displacement “vector”
{u ( x , y )v (x , y )}=[N1 , N2 , N3 , N4 0,0,0,0
0,0,0,0 N1 , N2 , N3 , N4 ]{u1
⋮u4
v1⋮v 4
}Strain-Displacement Relations
Introduction to the finite element method 55
{ε x
ε y
γ xy}={
dudxdvdy
dudy
+ dvdx
}=[ N1 x , N2 x , N3 x , N4 x 0,0,0,00,0,0,0 N1 y ,N2 y , N3 y , N4 y
N 1 y ,N2 y , N3 y , N4 y N1 x , N2 x , N3 x , N 4 x]{
u1
⋮u4
v1⋮v 4
}{εm }= [Bm ] {wm }
Strain Energy
U=h ∫Area
12
{ε }T [Q ] {ε } dA
U=h ∫Area
12 {wm }T [ Bm ]T [Q ] [ Bm ] {wm }dA
δU=h ∫Area
{δwm }T [ Bm ]T [ Q ] [ Bm ] {wm }dA={δwm }T [ km ] {wm }
K=t
48 ab [k11 k12
k21 k22]
k11=( 16 b2 D+8a2G −16 b2 D+4 a2G −8b2 D−4 a2 G 8 b2 D−8a2G−16 b2 D+4 a2G 16 b2 D+8 a2G 8b2 D−8 a2G −8 b2 D−4 a2 G−8b2 D−4 a2 G 8 b2 D−8 a2G 16 b2 D+8a2 G −16 b2 D+4 a2G8b2 D−8 a2G −8 b2 D−4 a2 G −16 b2 D+4 a2G 16 b2 D+8 a2 G
)k 22=( 16 a2 D+8b2G −16 a2 D+4b2 G −8 a2 D−4b2G 8 a2 D−8b2G
−16 a2 D+4 b2 G 16 a2 D+8 b2G 8 a2 D−8 b2G −8a2 D−4 b2G−8 a2 D−4 b2G 8 a2 D−8b2 G 16 a2 D+8b2G −16 a2 D+4b2 G8 a2 D−8 b2 G −8a2 D−4 b2G −16 a2 D+4 b2 G 16 a2 D+8b2G
)R=12 Dν+6G∧J=12 Dν−6G
k12=ab(R J −R −J
−J −R J R−R −J R J
J R −J −R)
k 21=ab(R −J −R JJ −R −J R
−R J R −J−J R J −R
)Stationary Functional Approach 56
7.4 Finite Element Model of Plates in Bending
7.4.1 Displacement Function
The transverse displacement w(x,y), at any location x and y inside the plate element, is expressed by
aHyxw w),( (7-1)
where ⌊ Hw ⌋ is a 64 element row vector and {a} is the vector of unknown coefficients. For the plate element under consideration, the bending degrees of freedom associated with each node are
{w∂w∂ x∂w∂ y∂2w
∂ x∂ y}=[ H w
Hw , x
Hw, y
Hw, x , y
]{a1
a2
⋮a16
}(7-2)
where Hw,i is the partial derivative of Hw with respect to i. Substituting the nodal coordinates into equation (13), the nodal bending displacement vector {wb} is obtained as follows,
aTw bb (7-3)
Introduction to the finite element method 57
where
{wb }={w1
∂w1
∂ x∂w1
∂ y∂2w1
∂ x ∂ y⋮
∂2 w4
∂ x∂ y
}∧[T b ]=[Hw (0,0 )Hw , x
(0,0 )
H w, y(0,0 )
Hw, x, y(0,0 )
⋮Hw , x , y
(0 , b )]
(7-4)
From equation (14), we can obtain
bb wTa 1 (7-5)
Substituting equation (16) into equation (12) gives
bwbbw wNwTHyxw 1),( (7-6)
where [Nw] is the shape function for bending given by
1 bww THN (7-7)
7.4.2 Strain-Displacement Relation
Consider the classical plate theory, for the strain vector {} can be written in terms of the lateral deflections as follows
{ε }={ε x
ε y
γ xy}=z {κ }
(7-8)
where z is the vertical distance from the neutral plane and {} is the curvature vector which can be written as,
Stationary Functional Approach 58
}{
22
2
2
2
2
aC
yxw
yw
xw
b
(7-9)
where
xy
yy
xx
w
w
w
b
HHH
C
,
,
,
2(7-10)
Substituting equation (17) into equation (23), gives
}{}{1bbbbb wBwTC (7-11)
where
1 bbb TCB (7-12)
Thus, the strain-nodal displacement relationship can be written as
bb wBzz }{ (7-13)
7.4.3 Constitutive Relations of Piezoelectric Lamina
The general form of the constitutive equation of the piezoelectric patch are written as follows
Ee
eQ
Dxy
y
x
T
E
xy
y
x
(7-14)
where, xyyx ,, are the stress in the x-direction, stress in the y-direction, and the planar
shear stress respectively; xyyx ,, are the corresponding mechanical strains; D is the
Introduction to the finite element method 59
electric displacement (Culomb/m2), E is the electric field (Volt/m), e piezoelectric material constant relating the stress to the electric field, is the material dielectric
constant at constant stress (Farad/m), and EQ is the mechanical stress-strain constitutive
matrix at constant electric field. EQ is given by,
1200
011
011
22
22
E
EE
EE
Q E
where E is the Young’s modulus of elasticity at constant electric field, and is the Poisson’s ratio.
Equation (28) can be rearranged as follows
{σ x
σ y
σ xy
E}=[ [ Q ]E+β {e } {e }T −β {e }
−β {e }T β ]{ε x
ε y
ε xy
D}
(7-15)
or
DeQ
xy
y
xD
xy
y
x
(7-16)
and
DeE
xy
y
xT
(7-17)
where 1
.
Stationary Functional Approach 60
7.4.4 Stiffness and Mass Matrices of the Element
The principal of virtual work states that
0 WTU (7-18)
where is the total energy of the system, U is the strain energy, T is the kinetic energy, W is the external work done, and (.) denotes the first variation.
7.4.4.1 The Potential Energy
The variation of the mechanical and electrical potential energies is given by
∫∫ VV
T dVEDdVU (7-19)
where V is the volume of the structure. Substituting equation (30) and (31) into equation (33) gives,
∫∫ V
T
V
DT dVDzeDdVDezQzU (7-20)
Substituting from equations (20) and (27), we get,
∫
∫
V
DDbbTT
DD
V
DDbbDT
bb
dVwNwBzewN
dVwNewBzQwBzU
(7-21)
The terms of the expansion of equation (35) can be recast as follows
bbT
b
V
bbDT
bb wkwdVwBQwBz ∫ 2
,
DbDT
b
V
DDT
bb wkwdVwNewBz ∫,
bT
bDT
DbDbT
D
V
bbTT
DD wkwwkwdVwBzewN ∫,
Introduction to the finite element method 61
and DD
TD
V
DDT
DD wkwdVwNwN ∫;
where [kb] is bending stiffness matrix, [kbD] is bending displacement-electric displacement coupling matrix, and [kD] is the electric stiffness matrix.
7.4.4.2 The Kinetic Energy
The variation of the kinetic energy T of the plate/piezo patch element is given by,
∫
A
dAtwhwT 2
2
(7-22)
where is the density/equivalent density and h is the thickness of the element. The above equation can be rewritten in terms of nodal displacements as follows
bbT
b
A
bwT
wT
b
A
wmwdAwNNwhdAtwhw
∫∫ 2
2
(7-23)
where [mb] is the element bending mass matrix.
7.4.4.3 The external work
The variation of the external work done exerted by the shunt circuit is given by
δW=∫A−δ DL { q dA ¿
(7-24)
where A is the element area, L is the shunted inductance, and q is the charge flowing in the circuit. But, as the charge is the integral of the electric displacement over the element area; then equation (38) reduces to,
δW=∫A−δ DdA∫
AL D dA
(7-25)
Substituting from equation (20), gives
Stationary Functional Approach 62
δW=−{δw D }T∫A
⌊ ND ⌋T dA∫A
⌊ N D ⌋ L {wD }dA
(7-26)
which can be recast in the following form,
δW=−{δw D }T [mD ] {wD }(7-27)
where [mD] is the element electric mass matrix.
Finally, the element equation of motion with no external forces can be written as
[ [mb ] 00 [ mD ] ]{wb
wD}+[ [k b ] [ kbD ]
[k Db ] [k D ] ]{wb
wD}={00 }
(7-28)
Introduction to the finite element method 63